diff --git a/Cargo.toml b/Cargo.toml index d2c26dc..3669b71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,13 @@ [package] name = "winrt" version = "0.1.0" -authors = ["Patrick Reisert"] +authors = ["Patrick Reisert", "Max Strini"] +description = "Automatically generated, (mostly) safe bindings for the Windows Runtime APIs" +repository = "https://github.com/contextfree/winrt-rust" +readme = "README.md" +keywords = ["winrt", "uwp", "windows", "runtime"] +license = "MIT OR Apache-2.0" +exclude = ["Generator/**"] [dependencies] winapi = "0.2.8" diff --git a/Generator/Generator.cs b/Generator/Generator.cs index e2ee1c8..0342ba3 100644 --- a/Generator/Generator.cs +++ b/Generator/Generator.cs @@ -92,10 +92,7 @@ public void CollectDependencies() public void EmitTypes() { - // TODO: get rid of this and enable all modules (disabled because it results in a huge file and very long compilation) - var assemblyNames = new string[] { "Windows.Foundation", "Windows.Devices"/*, "Windows.Storage", "Windows.Media", "Windows.System", "Windows.Graphics"*/ }; - - foreach (var type in definitionsList.Values.Where(t => assemblyNames.Contains(t.Module.Assembly.Name.Name))) + foreach (var type in definitionsList.Values) { type.Emit(); } diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 100644 index 0000000..8f71f43 --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/LICENSE b/LICENSE-MIT similarity index 95% rename from LICENSE rename to LICENSE-MIT index 7026926..89b40ba 100644 --- a/LICENSE +++ b/LICENSE-MIT @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Max Strini +Copyright (c) 2016 Max Strini, Patrick Reisert Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 18695e5..f2d5d3c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,85 @@ -# winrt-rust -Windows Runtime APIs with Rust +# winrt-rust [![crates.io](https://img.shields.io/crates/v/winrt.svg)](https://crates.io/crates/winrt) + +This crate provides type and method definitions to use the *Windows Runtime (WinRT)* APIs from Rust. + +## Status +The library is still subject to breaking changes, but it is already possible to use all APIs, including asynchronous ones +(a completion handler can to be passed as a closure). +Since we can not yet guarantee the safety of the generated wrappers, all methods are currently marked as `unsafe`. +Creating custom WinRT classes using inheritance is not yet supported, so it is not yet possible to create user interfaces using *XAML*. + +## Prerequisites +Using this crate requires at least Rust 1.13 (after the removal of dropflags) and the MSVC toolchain (because there is a bug in one of MinGWs import libraries). +Additional nightly features (e.g. generating enum variants as associated constants) can be enabled with the `nightly` cargo feature. + +## Design +All definitions are automatically generated from *WinMD* metadata files. +The module structure of the generated code reflects the namespace structure of the original definitions +starting at `winrt::windows` (if the crate has not been renamed on import) for the `Windows` namespace. + +All names have been adjusted to fit the Rust coding style, therefore module names are all in lower case and function names +are converted to `snake_case`. + +Since it takes a long time to compile all generated definitions (the [generated file](https://github.com/contextfree/winrt-rust/blob/master/src/rt/gen.rs) has about 170k LOC), +cargo features have been introduces that correspond to the *WinMD* files. For example, to use the definitions from `Windows.Devices.winmd`, use the feature `windows.devices`. +There is no feature for definitions from `Windows.Foundation.winmd`, these are always available. Whenever a (method) definition references a type from a different *WinMD* file, +it is also not available until you enable the corresponding features for all required type definitions. + +With only the definitions from `Windows.Foundation`, this crates takes about 10s to compile. With all features enabled (there is a shortcut feature `all`), compilation can take +as long as 10 minutes or longer, so it is highly recommended to enable features only as you need them. + +## Example +```rust +extern crate winrt; + +use winrt::*; // import various helper types +use winrt::windows::system::diagnostics::*; // import namespace Windows.System.Diagnostics + +fn main() { + let rt = RuntimeContext::init(); // initialize the Windows Runtime + // get factory, which is also used to call static methods + let mut pdi_statics = IProcessDiagnosticInfoStatics::factory(); + let mut infos = unsafe { pdi_statics.get_for_processes().unwrap() }; + println!("Currently executed processes ({}):", unsafe { infos.get_size().unwrap() }); + for mut p in infos.into_iter() { + let pid = unsafe { p.get_process_id().unwrap() }; + let exe = unsafe { p.get_executable_file_name().unwrap() }; + println!("[{}] {}", pid, exe); + } +} +``` + +Output: +``` +Currently executed processes (132): +[4] System +[392] smss.exe +[520] csrss.exe +[604] wininit.exe +[612] csrss.exe +[708] winlogon.exe +... +``` + +## WinRT and UWP +The *Windows Runtime (WinRT)* has been introduced in Windows 8 and provides the foundation for building +Windows applications that run on different devices using different programming languages. The *Universal Windows Platform (UWP)* is +an extension of WinRT, introduced in Windows 10, that allows using additional, more platform-specific APIs besides those provided by WinRT (according to +[MSDN](https://msdn.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide)). +*WinRT* is not to be confused with the discontinued flavor of the Windows operating system for ARM devices, *Windows RT*. + +## License + +Licensed under either of + + * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) + * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + +at your option. + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally +submitted for inclusion in the work by you, as defined in the Apache-2.0 +license, shall be dual licensed as above, without any additional terms or +conditions. \ No newline at end of file diff --git a/examples/test.rs b/examples/test.rs index ccdbe8c..19e09d2 100644 --- a/examples/test.rs +++ b/examples/test.rs @@ -1,5 +1,3 @@ -#![allow(non_snake_case)] - extern crate winapi as w; extern crate winrt as wrt; // TODO: don't use functions from runtimeobject directly @@ -21,10 +19,10 @@ fn main() { fn run() { use std::sync::{Arc, Mutex, Condvar}; - let mut uriFactory = Uri::factory(); + let mut uri_factory = Uri::factory(); let base = FastHString::new("https://github.com"); let relative = FastHString::new("contextfree/winrt-rust"); - let uri = unsafe { uriFactory.create_with_relative_uri(&base, &relative).unwrap() }; + let uri = unsafe { uri_factory.create_with_relative_uri(&base, &relative).unwrap() }; let to_string = unsafe { uri.query_interface::().unwrap().to_string().unwrap() }; println!("{} -> {}", uri.get_runtime_class_name(), to_string); println!("TrustLevel: {:?}", uri.get_trust_level()); @@ -34,55 +32,55 @@ fn run() { println!(" [{}] = {:?}", i, iids[i]); } - let mut outPortStatics = IMidiOutPortStatics::factory(); - //println!("outPortStatics: {}", outPortStatics.get_runtime_class_name()); // this is not allowed (prevented statically) + let mut out_port_statics = IMidiOutPortStatics::factory(); + //println!("out_port_statics: {}", out_port_statics.get_runtime_class_name()); // this is not allowed (prevented statically) - let deviceSelector = unsafe { outPortStatics.get_device_selector().unwrap() }; - println!("{}", deviceSelector); + let device_selector = unsafe { out_port_statics.get_device_selector().unwrap() }; + println!("{}", device_selector); - let mut deviceInformationStatics = IDeviceInformationStatics::factory(); + let mut device_information_statics = IDeviceInformationStatics::factory(); unsafe { use runtimeobject::*; use ::w::S_OK; // Test some error reporting by using an invalid device selector - let wrongDeviceSelector: FastHString = "Foobar".into(); - let res = deviceInformationStatics.find_all_async_aqs_filter(&wrongDeviceSelector); + let wrong_deviceselector: FastHString = "Foobar".into(); + let res = device_information_statics.find_all_async_aqs_filter(&wrong_deviceselector); if let Err(e) = res { println!("HRESULT (FindAllAsyncAqsFilter) = {:?}", e.as_hresult()); - let mut errorInfo = { + let mut error_info = { let mut res = ptr::null_mut(); assert_eq!(GetRestrictedErrorInfo(&mut res), S_OK); ComPtr::wrap(res) }; - let (description, error, restrictedDescription, _) = { + let (description, error, restricted_description, _) = { let mut description = ptr::null_mut(); let mut error = 0; - let mut restrictedDescription = ptr::null_mut(); - let mut capabilitySid = ptr::null_mut(); - assert_eq!(errorInfo.GetErrorDetails(&mut description, &mut error, &mut restrictedDescription, &mut capabilitySid), S_OK); - (BStr::wrap(description), error, BStr::wrap(restrictedDescription), BStr::wrap(capabilitySid)) + let mut restricted_description = ptr::null_mut(); + let mut capability_sid = ptr::null_mut(); + assert_eq!(error_info.GetErrorDetails(&mut description, &mut error, &mut restricted_description, &mut capability_sid), S_OK); + (BStr::wrap(description), error, BStr::wrap(restricted_description), BStr::wrap(capability_sid)) }; - println!("Got Error Info: {} ({})", description, restrictedDescription); + println!("Got Error Info: {} ({})", description, restricted_description); assert_eq!(error, e.as_hresult()); // the returned HRESULT within IRestrictedErrorInfo is the same as the original HRESULT } // NOTE: `res` is still null pointer at this point }; - //let mut asyncOp = unsafe { deviceInformationStatics.find_all_async_aqs_filter(deviceSelector.get_ref()).unwrap() }; - let mut asyncOp = unsafe { deviceInformationStatics.find_all_async().unwrap() }; + //let mut async_op = unsafe { device_information_statics.find_all_async_aqs_filter(device_selector.get_ref()).unwrap() }; + let mut async_op = unsafe { device_information_statics.find_all_async().unwrap() }; - println!("CLS: {}", asyncOp.get_runtime_class_name()); + println!("CLS: {}", async_op.get_runtime_class_name()); - let mut asi = asyncOp.query_interface::().unwrap(); - println!("IAsyncInfo: {:p}, IAsyncOperation: {:p}", asi, asyncOp); + let mut asi = async_op.query_interface::().unwrap(); + println!("IAsyncInfo: {:p}, Iasync_operation: {:p}", asi, async_op); - let unknown = asyncOp.query_interface::().unwrap(); - println!("IAsyncInfo: {:p}, IAsyncOperation: {:p}, IUnknown: {:p}", asi, asyncOp, unknown); + let unknown = async_op.query_interface::().unwrap(); + println!("IAsyncInfo: {:p}, Iasync_operation: {:p}, IUnknown: {:p}", asi, async_op, unknown); let unknown = asi.query_interface::().unwrap(); - println!("IAsyncInfo: {:p}, IAsyncOperation: {:p}, IUnknown: {:p}", asi, asyncOp, unknown); + println!("IAsyncInfo: {:p}, Iasync_operation: {:p}, IUnknown: {:p}", asi, async_op, unknown); let id = unsafe { asi.get_id().unwrap() }; println!("id: {:?}", id); @@ -93,7 +91,7 @@ fn run() { let pair = Arc::new((Mutex::new(false), Condvar::new())); { let pair2 = pair.clone(); - let mut myHandler = AsyncOperationCompletedHandler::new(move |_op, status| { + let mut my_handler = AsyncOperationCompletedHandler::new(move |_op, status| { println!("Result handler invoked! Status: {:?}", status); let &(ref lock, ref cvar) = &*pair2; let mut started = lock.lock().unwrap(); @@ -101,8 +99,8 @@ fn run() { cvar.notify_one(); Ok(()) }); - unsafe { asyncOp.set_completed(&mut myHandler).unwrap() }; - // local reference to myHandler is dropped here -> Release() is called + unsafe { async_op.set_completed(&mut my_handler).unwrap() }; + // local reference to my_handler is dropped here -> Release() is called } println!("Waiting for results of async call ..."); @@ -114,16 +112,16 @@ fn run() { started = cvar.wait(started).unwrap(); } - let mut deviceInformationCollection = unsafe { asyncOp.get_results().unwrap() }; - println!("CLS: {}", deviceInformationCollection.get_runtime_class_name()); - let count = unsafe { deviceInformationCollection.get_size().unwrap() }; + let mut device_information_collection = unsafe { async_op.get_results().unwrap() }; + println!("CLS: {}", device_information_collection.get_runtime_class_name()); + let count = unsafe { device_information_collection.get_size().unwrap() }; println!("Device Count: {}", count); let mut remember = None; let mut i = 0; - for mut current in deviceInformationCollection.into_iter() { - let deviceName = unsafe { current.get_name().unwrap() }; - println!("Device Name ({}): {}", i, deviceName); + for mut current in device_information_collection.into_iter() { + let device_name = unsafe { current.get_name().unwrap() }; + println!("Device Name ({}): {}", i, device_name); if i == 100 { // remember the 100th value and try to find it later using IndexOf remember = Some(current); @@ -133,21 +131,21 @@ fn run() { assert_eq!(i, count); let mut buffer = Vec::with_capacity(2000); - unsafe { deviceInformationCollection.get_many(0, &mut buffer).unwrap() }; + unsafe { device_information_collection.get_many(0, &mut buffer).unwrap() }; for (b, i) in buffer.iter_mut().zip(0..) { - let deviceName = unsafe { b.get_name().unwrap() }; - println!("Device Name ({}): {}", i, deviceName); + let device_name = unsafe { b.get_name().unwrap() }; + println!("Device Name ({}): {}", i, device_name); } let len = buffer.len(); drop(buffer); println!("Freed result of GetMany ({} values).", len); if let Some(mut r) = remember { - let (index, found) = unsafe { deviceInformationCollection.index_of(&mut r).unwrap() }; + let (index, found) = unsafe { device_information_collection.index_of(&mut r).unwrap() }; println!("Found remembered value: {} (index: {})", found, index); } - match unsafe { deviceInformationCollection.get_at(count + 42) } { + match unsafe { device_information_collection.get_at(count + 42) } { Err(e) => println!("Error getting element at {}: {:?}", count + 42, e), // will be out of bounds Ok(_) => panic!("expected Error") }; diff --git a/src/bstr.rs b/src/bstr.rs index a71851d..bf8c952 100644 --- a/src/bstr.rs +++ b/src/bstr.rs @@ -4,6 +4,10 @@ use ::std::fmt; use ::w::*; use ::oleaut32::*; +// TODO: move to separate crate? + +/// A wrapper around `BSTR`, a string type used by classic COM. This is usually not needed when +/// working with WinRT, but can be helpful when interacting with other APIs. pub struct BStr(BSTR); impl<'a> From<&'a str> for BStr { diff --git a/src/cominterfaces.rs b/src/cominterfaces.rs index b6cc3c1..d5c9ae1 100644 --- a/src/cominterfaces.rs +++ b/src/cominterfaces.rs @@ -18,11 +18,15 @@ pub trait ComIid { // extend some definitions from winapi (re-export existing types where possible!) DEFINE_IID!(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + +/// Re-export from WinAPI crate pub type IUnknown = ::w::IUnknown; impl ComIid for IUnknown { fn iid() -> &'static Guid { &IID_IUnknown } } impl ComInterface for IUnknown { type Vtbl = ::w::IUnknownVtbl; } DEFINE_IID!(IID_IRestrictedErrorInfo, 0x82BA7092, 0x4C88, 0x427D, 0xA7, 0xBC, 0x16, 0xDD, 0x93, 0xFE, 0xB6, 0x7E); + +/// Re-export from WinAPI crate pub type IRestrictedErrorInfo = ::w::IRestrictedErrorInfo; pub type IRestrictedErrorInfoVtbl = ::w::IRestrictedErrorInfoVtbl; impl ComIid for IRestrictedErrorInfo { fn iid() -> &'static Guid { &IID_IRestrictedErrorInfo } } @@ -30,6 +34,8 @@ impl ComInterface for IRestrictedErrorInfo { type Vtbl = IRestrictedErrorInfoVtb DEFINE_IID!(IID_IAgileObject, 0x94EA2B94, 0xE9CC, 0x49E0, 0xC0, 0xFF, 0xEE, 0x64, 0xCA, 0x8F, 0x5B, 0x90); +/// Interface that marks an object as agile. +/// It inherits from `IUnknown` and does not have additional members. #[repr(C)] #[derive(Debug)] pub struct IAgileObject { lpVtbl: *const ::w::IUnknownVtbl // IAgileObject has no methods besides what IUnknown has diff --git a/src/comptr.rs b/src/comptr.rs index ab0f697..e2fb927 100644 --- a/src/comptr.rs +++ b/src/comptr.rs @@ -3,6 +3,8 @@ use std::fmt; use std::ptr; use ::{ComIid, ComInterface, RtInterface, RtClassInterface, IInspectable, Guid}; +/// Smart pointer for Windows Runtime objects. This pointer automatically maintains the +/// reference count of the underlying COM object. #[repr(C)] #[derive(Debug)] pub struct ComPtr(*mut T); // TODO: use NonZero or Shared (see https://github.com/rust-lang/rust/issues/27730) @@ -12,6 +14,7 @@ impl fmt::Pointer for ComPtr { } } +// This is a helper method that is not exposed publically by the library pub fn query_interface(interface: &T) -> Option> where Target: ComIid, T: ComInterface { let iid: &'static Guid = Target::iid(); let as_unknown = unsafe { &mut *(interface as *const T as *mut T as *mut ::w::IUnknown) }; @@ -33,23 +36,46 @@ impl ComPtr { /// Creates a `ComPtr` to wrap a raw pointer. /// It takes ownership over the pointer which means it does __not__ call `AddRef`. /// `T` __must__ be a COM interface that inherits from `IUnknown`. + /// The wrapped pointer must not be null. pub unsafe fn wrap(ptr: *mut T) -> ComPtr { // TODO: Add T: ComInterface bound debug_assert!(!ptr.is_null()); ComPtr(ptr) } + /// Returns the underlying WinRT object as a reference to an `IInspectable` object. fn as_inspectable(&self) -> &mut IInspectable where T: RtInterface { unsafe { &mut *(self.0 as *mut IInspectable) } } + /// Returns the underlying WinRT or COM object as a reference to an `IUnknown` object. fn as_unknown(&self) -> &mut ::w::IUnknown { unsafe { &mut *(self.0 as *mut ::w::IUnknown) } } + /// Gets the fully qualified name of the current Windows Runtime object. + /// This is only available for interfaces that inherit from `IInspectable` and + /// are not factory or statics interfaces. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use winrt::*; + /// use winrt::windows::foundation::Uri; + /// + /// # let rt = winrt::RuntimeContext::init(); + /// let mut uri_factory = Uri::factory(); + /// let uri = FastHString::new("https://www.rust-lang.org"); + /// let uri = unsafe { uri_factory.create_uri(&uri).unwrap() }; + /// assert_eq!("Windows.Foundation.Uri", uri.get_runtime_class_name().to_string()); + /// ``` pub fn get_runtime_class_name(&self) -> ::HString where T: RtClassInterface { HiddenGetRuntimeClassName::get_runtime_class_name(self.as_inspectable()) } + /// Retrieves a `ComPtr` to the specified interface, if it is supported by the underlying object. + /// If the requested interface is not supported, `None` is returned. pub fn query_interface(&self) -> Option> where Target: ComIid, T: ComInterface { query_interface::<_, Target>(&**self) } @@ -84,8 +110,9 @@ impl PartialEq> for ComPtr { } } -/// Owned array type that is returned from WinRT calls. -/// Has been allocated by WinRT and will be deallocated using `CoTaskMemFree` on drop. +/// Owned array type that is used as return type when WinRT methods return arrays. +/// It wraps a block of memory that has been allocated by WinRT and will be deallocated +/// using `CoTaskMemFree` on drop. pub struct ComArray where T: ::RtType { size: u32, first: *mut T::Abi @@ -101,6 +128,7 @@ impl ComArray where T: ::RtType { } } + /// Returns the length of the array. #[inline] pub fn len(&self) -> usize { self.size as usize diff --git a/src/guid.rs b/src/guid.rs index 779fcab..08be1c8 100644 --- a/src/guid.rs +++ b/src/guid.rs @@ -1,5 +1,6 @@ use std::{fmt, cmp, mem}; +/// Represents a GUID type in the Windows Runtime type system. #[derive(Copy, Clone)] #[repr(C)] pub struct Guid { // TODO: fields should not be public (requires const fn constructor) diff --git a/src/hstring.rs b/src/hstring.rs index c39bf45..858972e 100644 --- a/src/hstring.rs +++ b/src/hstring.rs @@ -58,13 +58,26 @@ pub struct HStringReference<'a>(HSTRING_HEADER, PhantomData<&'a ()>); impl<'a> HStringReference<'a> { #[inline] /// Creates a new `HStringReference` from a UTF-16 encoded slice, which must be null-terminated. - /// This function does not allocate. + /// This function does not allocate and is the fastest option if you already have UTF-16 encoded + /// data. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use winrt::HStringReference; + /// let sparkle_heart = vec![0xD83D, 0xDC96, 0x0]; + /// let r = HStringReference::from_utf16(&sparkle_heart); + /// assert_eq!("💖", r.to_string()); + /// ``` pub fn from_utf16(slice: &'a [u16]) -> HStringReference<'a> { assert!(slice[slice.len() - 1] == 0, "input must be null-terminated"); unsafe { HStringReference::from_utf16_unchecked(slice) } } - /// Won't check if the string is null terminated + /// Creates a new `HStringReference` from a UTF-16 encoded slice, which must be null-terminated. + /// This function is unsafe because the caller must make sure that the data really is null-terminated. pub unsafe fn from_utf16_unchecked(slice: &'a [u16]) -> HStringReference<'a> { let mut hstrref: HStringReference = HStringReference(zero_header(), PhantomData); if slice.len() == 0 { return hstrref; } @@ -76,20 +89,33 @@ impl<'a> HStringReference<'a> { hstrref } + /// Returns the length of the string in Unicode characters, as specified by `WindowsGetStringLen`. #[inline] pub fn len(&self) -> u32 { unsafe { WindowsGetStringLen(self.as_hstring()) } } + /// Checks whether the string is empty. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use winrt::HString; + /// let s = HString::empty(); + /// assert!(s.is_empty()); + /// ``` #[inline] pub fn is_empty(&self) -> bool { unsafe { WindowsIsStringEmpty(self.as_hstring()) != 0 } } - // Since HSTRING is just a pointer to HSTRING_HEADER in disguise, we can just return - // a pointer to our wrapper header and cast it accordingly. + /// Returns the `HSTRING` that this instance is wrapping. #[inline] unsafe fn as_hstring(&self) -> HSTRING { + // Since HSTRING is just a pointer to HSTRING_HEADER in disguise, we can just return + // a pointer to our wrapper header and cast it accordingly. &self.0 as *const HSTRING_HEADER as *mut HSTRING_HEADER as *mut HSTRING__ } } @@ -140,14 +166,26 @@ impl<'a> Deref for HStringReference<'a> { } } -/// An `HSTRING` wrapper with several benefits -/// -/// - Faster allocation -/// - Faster (basically free) creation of references -/// - Manages its own memory and won't be freed by calls into the Windows Runtime +/// A string type that should be used to create strings that can be passed to Windows Runtime +/// functions. Creating a new `FastHString` is faster than creating an instance of `HString` +/// because it eliminates an additional allocation. Furthermore, obtaining a `HStringArg` from +/// a `FastHString` is basically free, which is not the case for `HString`. pub struct FastHString(HSTRING_HEADER); impl FastHString { + /// Creates a new `FastHString` from a Rust string. `FastHString` uses the Rust allocator to + /// create a storage buffer for its contents, where the string is stored in UTF-16 encoding. + /// The buffer is freed on when the `FastHString` is dropped. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use winrt::FastHString; + /// let s = FastHString::new("hello"); + /// assert_eq!("hello", s.to_string()); + /// ``` pub fn new(s: &str) -> FastHString { let mut hstrref: FastHString = FastHString(zero_header()); if s.is_empty() { @@ -177,29 +215,64 @@ impl FastHString { hstrref } + /// Creates an empty `FastHString`. #[inline] pub fn empty() -> FastHString { FastHString(zero_header()) } - - // Since HSTRING is just a pointer to HSTRING_HEADER in disguise, we can just return - // a pointer to our wrapped header and cast it accordingly. + + /// Returns the `HSTRING` that this instance is wrapping. #[inline] unsafe fn as_hstring(&self) -> HSTRING { + // Since HSTRING is just a pointer to HSTRING_HEADER in disguise, we can just return + // a pointer to our wrapped header and cast it accordingly. &self.0 as *const HSTRING_HEADER as *mut HSTRING_HEADER as *mut HSTRING__ } + /// Returns the length of the string in Unicode characters, as specified by `WindowsGetStringLen`. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use winrt::FastHString; + /// let s = FastHString::new("hello"); + /// assert_eq!(5, s.len()); + /// ``` #[inline] pub fn len(&self) -> u32 { - // This is okay even if pointer is null (returns 0) unsafe { WindowsGetStringLen(self.as_hstring()) } } + /// Checks whether the string is empty. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use winrt::FastHString; + /// let s = FastHString::empty(); + /// assert!(s.is_empty()); + /// ``` #[inline] pub fn is_empty(&self) -> bool { unsafe { WindowsIsStringEmpty(self.as_hstring()) != 0 } } + /// Creates an `HStringReference` that points to the contents of this `FastHString`. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use winrt::FastHString; + /// let s = FastHString::new("hello"); + /// let r = s.make_reference(); + /// assert_eq!("hello", r.to_string()); + /// ``` #[inline] pub fn make_reference(&self) -> HStringReference { // Creating another reference is basically free, @@ -277,18 +350,18 @@ impl<'a> Deref for FastHString { pub struct HStringArg(HSTRING_HEADER); impl HStringArg { - // Since HSTRING is just a pointer to HSTRING_HEADER in disguise, we can just return - // a pointer to our wrapper header and cast it accordingly. #[inline] pub unsafe fn get(&self) -> HSTRING { + // Since HSTRING is just a pointer to HSTRING_HEADER in disguise, we can just return + // a pointer to our wrapper header and cast it accordingly. &self.0 as *const HSTRING_HEADER as *mut HSTRING_HEADER as *mut HSTRING__ } } -/// A wrapper over an HSTRING whose memory is managed by the Windows Runtime. -/// This is what you get as return values from WinRT methods. +/// A wrapper over an `HSTRING` whose memory is managed by the Windows Runtime. +/// This is what you get as return values when calling WinRT methods that return strings. /// Note that dereferencing to `&HStringArg` is not implemented for this, because -/// the containing HSTRING might be null (empty string), and null references +/// the containing `HSTRING` might be null (empty string), and null references /// are not allowed. In order to obtain an `&HStringArg` from an `HString`, /// first create an `HStringReference` using `make_reference()`. pub struct HString(HSTRING); @@ -314,32 +387,70 @@ impl HString { hstr } + /// Wraps an existing `HSTRING` inside this `HString`. This is only safe + /// when the `HSTRING` was allocated by the Windows Runtime. #[inline] pub unsafe fn wrap(hstr: HSTRING) -> HString { HString(hstr) } + /// Creates an empty `HString`. #[inline] pub fn empty() -> HString { - HString(ptr::null_mut()) + HString(ptr::null_mut()) // an empty HSTRING is represented by a null-pointer } + /// Returns the length of the string in Unicode characters, as specified by `WindowsGetStringLen`. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use winrt::HString; + /// let s = HString::new("hello"); + /// assert_eq!(5, s.len()); + /// ``` #[inline] pub fn len(&self) -> u32 { // This is okay even if pointer is null (returns 0) unsafe { WindowsGetStringLen(self.0) } } + /// Checks whether the string is empty. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use winrt::HString; + /// let s = HString::empty(); + /// assert!(s.is_empty()); + /// ``` #[inline] pub fn is_empty(&self) -> bool { unsafe { WindowsIsStringEmpty(self.0) != 0 } } + /// Returns the `HSTRING` that this instance is wrapping. #[inline] unsafe fn as_hstring(&self) -> HSTRING { self.0 } + /// Creates an `HStringReference` that points to the contents of this `HString`. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use winrt::HString; + /// let s = HString::new("hello"); + /// let r = s.make_reference(); + /// assert_eq!(s.to_string(), r.to_string()); + /// ``` #[inline] pub fn make_reference<'a>(&'a self) -> HStringReference<'a> { let mut len = 0; diff --git a/src/lib.rs b/src/lib.rs index ca872c9..2494b93 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,27 @@ +//! Using Windows Runtime APIs from Rust. +//! +//! ## Example +//! ``` +//! # // THIS IS THE SAME CODE THAT IS SHOWN IN README.md +//! # // PLEASE KEEP THEM IN SYNC SO WE CAN RELY ON DOCTESTS! +//! extern crate winrt; +//! +//! use winrt::*; // import various helper types +//! use winrt::windows::system::diagnostics::*; // import namespace Windows.System.Diagnostics +//! +//! fn main() { +//! let rt = RuntimeContext::init(); // initialize the Windows Runtime +//! // get factory, which is also used to call static methods +//! let mut pdi_statics = IProcessDiagnosticInfoStatics::factory(); +//! let mut infos = unsafe { pdi_statics.get_for_processes().unwrap() }; +//! println!("Currently executed processes ({}):", unsafe { infos.get_size().unwrap() }); +//! for mut p in infos.into_iter() { +//! let pid = unsafe { p.get_process_id().unwrap() }; +//! let exe = unsafe { p.get_executable_file_name().unwrap() }; +//! println!("[{}] {}", pid, exe); +//! } +//! } + #![cfg(windows)] #![cfg_attr(test,feature(test))] @@ -14,7 +38,9 @@ extern crate oleaut32; mod guid; pub use guid::Guid; -pub use ::w::TrustLevel; + +///Represents the trust level of an activatable class (re-export from WinAPI crate) +pub type TrustLevel = ::w::TrustLevel; // Compared to the DEFINE_GUID macro from winapi, this one creates a private const macro_rules! DEFINE_IID { @@ -45,8 +71,6 @@ pub use cominterfaces::{ComInterface, ComIid, IUnknown, IRestrictedErrorInfo, IA mod rt; pub use rt::{RtInterface, RtClassInterface, RtValueType, RtType, RtActivatable, IInspectable, IInspectableVtbl, Char, RuntimeContext}; -pub use rt::handler::IntoInterface; - mod result; pub use result::{Result, Error, HRESULT}; diff --git a/src/result.rs b/src/result.rs index 9a7c831..1bd44e2 100644 --- a/src/result.rs +++ b/src/result.rs @@ -1,7 +1,9 @@ -pub type HRESULT = ::w::HRESULT; // re-export HRESULT from WinAPI +/// Re-export from WinAPI crate +pub type HRESULT = ::w::HRESULT; // TODO: add more codes from https://msdn.microsoft.com/en-us/library/windows/desktop/dd542643(v=vs.85).aspx, especially the `RO_`-prefixed +/// Represents an error as a result of a Windows Runtime method call. #[derive(Debug, PartialEq, Eq)] pub enum Error { OperationAborted, @@ -61,4 +63,5 @@ impl Error { } } +/// A specialized `Result` type for Windows Runtime method calls. pub type Result = ::std::result::Result; \ No newline at end of file diff --git a/src/rt/gen.rs b/src/rt/gen.rs index 66ffe91..50a1f2d 100644 --- a/src/rt/gen.rs +++ b/src/rt/gen.rs @@ -1,12718 +1,16916 @@ // DO NOT MODIFY THIS FILE - IT IS AUTOMATICALLY GENERATED! #![allow(non_camel_case_types, unused_imports)] pub mod windows { // Windows -#[cfg(feature="windows.devices")] -pub mod devices { // Windows.Devices +#[cfg(feature="windows.applicationmodel")] +pub mod applicationmodel { // Windows.ApplicationModel use ::prelude::*; - RT_STRUCT! { struct DevicesLowLevelContract { + RT_STRUCT! { struct FullTrustAppContract { }} - DEFINE_IID!(IID_ILowLevelDevicesAggregateProvider, 2805880348, 43713, 20167, 168, 82, 71, 159, 112, 96, 208, 31); - RT_INTERFACE!{interface ILowLevelDevicesAggregateProvider(ILowLevelDevicesAggregateProviderVtbl): IInspectable(IInspectableVtbl) [IID_ILowLevelDevicesAggregateProvider] { - fn get_AdcControllerProvider(&mut self, out: *mut *mut adc::provider::IAdcControllerProvider) -> HRESULT, - fn get_PwmControllerProvider(&mut self, out: *mut *mut pwm::provider::IPwmControllerProvider) -> HRESULT, - fn get_GpioControllerProvider(&mut self, out: *mut *mut gpio::provider::IGpioControllerProvider) -> HRESULT, - fn get_I2cControllerProvider(&mut self, out: *mut *mut i2c::provider::II2cControllerProvider) -> HRESULT, - fn get_SpiControllerProvider(&mut self, out: *mut *mut spi::provider::ISpiControllerProvider) -> HRESULT + DEFINE_IID!(IID_IFullTrustProcessLauncherStatics, 3615785855, 4352, 15467, 164, 85, 246, 38, 44, 195, 49, 182); + RT_INTERFACE!{static interface IFullTrustProcessLauncherStatics(IFullTrustProcessLauncherStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFullTrustProcessLauncherStatics] { + fn LaunchFullTrustProcessForCurrentAppAsync(&mut self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn LaunchFullTrustProcessForCurrentAppWithParametersAsync(&mut self, parameterGroupId: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn LaunchFullTrustProcessForAppAsync(&mut self, fullTrustPackageRelativeAppId: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn LaunchFullTrustProcessForAppWithParametersAsync(&mut self, fullTrustPackageRelativeAppId: HSTRING, parameterGroupId: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT }} - impl ILowLevelDevicesAggregateProvider { - #[inline] pub unsafe fn get_adc_controller_provider(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AdcControllerProvider)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pwm_controller_provider(&mut self) -> Result> { + impl IFullTrustProcessLauncherStatics { + #[inline] pub unsafe fn launch_full_trust_process_for_current_app_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PwmControllerProvider)(self, &mut out); + let hr = ((*self.lpVtbl).LaunchFullTrustProcessForCurrentAppAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_gpio_controller_provider(&mut self) -> Result> { + #[inline] pub unsafe fn launch_full_trust_process_for_current_app_with_parameters_async(&mut self, parameterGroupId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_GpioControllerProvider)(self, &mut out); + let hr = ((*self.lpVtbl).LaunchFullTrustProcessForCurrentAppWithParametersAsync)(self, parameterGroupId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_i2c_controller_provider(&mut self) -> Result> { + #[inline] pub unsafe fn launch_full_trust_process_for_app_async(&mut self, fullTrustPackageRelativeAppId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_I2cControllerProvider)(self, &mut out); + let hr = ((*self.lpVtbl).LaunchFullTrustProcessForAppAsync)(self, fullTrustPackageRelativeAppId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_spi_controller_provider(&mut self) -> Result> { + #[inline] pub unsafe fn launch_full_trust_process_for_app_with_parameters_async(&mut self, fullTrustPackageRelativeAppId: &HStringArg, parameterGroupId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SpiControllerProvider)(self, &mut out); + let hr = ((*self.lpVtbl).LaunchFullTrustProcessForAppWithParametersAsync)(self, fullTrustPackageRelativeAppId.get(), parameterGroupId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ILowLevelDevicesAggregateProviderFactory, 2596580086, 13427, 18014, 150, 213, 54, 40, 26, 44, 87, 175); - RT_INTERFACE!{static interface ILowLevelDevicesAggregateProviderFactory(ILowLevelDevicesAggregateProviderFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ILowLevelDevicesAggregateProviderFactory] { - fn Create(&mut self, adc: *mut adc::provider::IAdcControllerProvider, pwm: *mut pwm::provider::IPwmControllerProvider, gpio: *mut gpio::provider::IGpioControllerProvider, i2c: *mut i2c::provider::II2cControllerProvider, spi: *mut spi::provider::ISpiControllerProvider, out: *mut *mut LowLevelDevicesAggregateProvider) -> HRESULT + RT_ACTIVATABLE!{IFullTrustProcessLauncherStatics [CLSID_FullTrustProcessLauncher]} + DEFINE_CLSID!(CLSID_FullTrustProcessLauncher = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,70,117,108,108,84,114,117,115,116,80,114,111,99,101,115,115,76,97,117,110,99,104,101,114,0]); + DEFINE_IID!(IID_IAppDisplayInfo, 451612931, 58580, 16810, 164, 246, 196, 162, 118, 231, 158, 172); + RT_INTERFACE!{interface IAppDisplayInfo(IAppDisplayInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAppDisplayInfo] { + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetLogo(&mut self, size: super::foundation::Size, out: *mut *mut super::storage::streams::RandomAccessStreamReference) -> HRESULT }} - impl ILowLevelDevicesAggregateProviderFactory { - #[inline] pub unsafe fn create(&mut self, adc: &adc::provider::IAdcControllerProvider, pwm: &pwm::provider::IPwmControllerProvider, gpio: &gpio::provider::IGpioControllerProvider, i2c: &i2c::provider::II2cControllerProvider, spi: &spi::provider::ISpiControllerProvider) -> Result> { + impl IAppDisplayInfo { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, adc as *const _ as *mut _, pwm as *const _ as *mut _, gpio as *const _ as *mut _, i2c as *const _ as *mut _, spi as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class LowLevelDevicesAggregateProvider: ILowLevelDevicesAggregateProvider [ILowLevelDevicesAggregateProviderFactory] [CLSID_LowLevelDevicesAggregateProvider]} - DEFINE_CLSID!(CLSID_LowLevelDevicesAggregateProvider = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,76,111,119,76,101,118,101,108,68,101,118,105,99,101,115,65,103,103,114,101,103,97,116,101,80,114,111,118,105,100,101,114,0]); - DEFINE_IID!(IID_ILowLevelDevicesController, 784481748, 6043, 17886, 155, 57, 58, 224, 37, 39, 222, 82); - RT_INTERFACE!{interface ILowLevelDevicesController(ILowLevelDevicesControllerVtbl): IInspectable(IInspectableVtbl) [IID_ILowLevelDevicesController] { - - }} - DEFINE_IID!(IID_ILowLevelDevicesControllerStatics, 155095658, 64715, 17300, 166, 151, 25, 222, 99, 124, 45, 179); - RT_INTERFACE!{static interface ILowLevelDevicesControllerStatics(ILowLevelDevicesControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILowLevelDevicesControllerStatics] { - fn get_DefaultProvider(&mut self, out: *mut *mut ILowLevelDevicesAggregateProvider) -> HRESULT, - fn put_DefaultProvider(&mut self, value: *mut ILowLevelDevicesAggregateProvider) -> HRESULT - }} - impl ILowLevelDevicesControllerStatics { - #[inline] pub unsafe fn get_default_provider(&mut self) -> Result> { + #[inline] pub unsafe fn get_description(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DefaultProvider)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_default_provider(&mut self, value: &ILowLevelDevicesAggregateProvider) -> Result<()> { - let hr = ((*self.lpVtbl).put_DefaultProvider)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_logo(&mut self, size: super::foundation::Size) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetLogo)(self, size, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class LowLevelDevicesController: ILowLevelDevicesController} - RT_ACTIVATABLE!{ILowLevelDevicesControllerStatics [CLSID_LowLevelDevicesController]} - DEFINE_CLSID!(CLSID_LowLevelDevicesController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,76,111,119,76,101,118,101,108,68,101,118,105,99,101,115,67,111,110,116,114,111,108,108,101,114,0]); -pub mod adc { // Windows.Devices.Adc -use ::prelude::*; - RT_ENUM! { enum AdcChannelMode: i32 { - SingleEnded (AdcChannelMode_SingleEnded) = 0, Differential (AdcChannelMode_Differential) = 1, - }} - DEFINE_IID!(IID_IAdcController, 712434864, 43158, 16921, 134, 182, 234, 140, 220, 233, 143, 86); - RT_INTERFACE!{interface IAdcController(IAdcControllerVtbl): IInspectable(IInspectableVtbl) [IID_IAdcController] { - fn get_ChannelCount(&mut self, out: *mut i32) -> HRESULT, - fn get_ResolutionInBits(&mut self, out: *mut i32) -> HRESULT, - fn get_MinValue(&mut self, out: *mut i32) -> HRESULT, - fn get_MaxValue(&mut self, out: *mut i32) -> HRESULT, - fn get_ChannelMode(&mut self, out: *mut AdcChannelMode) -> HRESULT, - fn put_ChannelMode(&mut self, value: AdcChannelMode) -> HRESULT, - fn IsChannelModeSupported(&mut self, channelMode: AdcChannelMode, out: *mut bool) -> HRESULT, - fn OpenChannel(&mut self, channelNumber: i32, out: *mut *mut AdcChannel) -> HRESULT + RT_CLASS!{class AppDisplayInfo: IAppDisplayInfo} + DEFINE_IID!(IID_IAppInfo, 3481229747, 27145, 19944, 166, 192, 87, 146, 213, 104, 128, 209); + RT_INTERFACE!{interface IAppInfo(IAppInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAppInfo] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppUserModelId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayInfo(&mut self, out: *mut *mut AppDisplayInfo) -> HRESULT, + fn get_PackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IAdcController { - #[inline] pub unsafe fn get_channel_count(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ChannelCount)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolution_in_bits(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ResolutionInBits)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IAppInfo { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_min_value(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinValue)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_app_user_model_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppUserModelId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_max_value(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxValue)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_display_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_channel_mode(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ChannelMode)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_package_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_channel_mode(&mut self, value: AdcChannelMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_ChannelMode)(self, value); + } + RT_CLASS!{class AppInfo: IAppInfo} + RT_CLASS!{class SuspendingEventArgs: ISuspendingEventArgs} + RT_CLASS!{class LeavingBackgroundEventArgs: ILeavingBackgroundEventArgs} + RT_CLASS!{class EnteredBackgroundEventArgs: IEnteredBackgroundEventArgs} + DEFINE_IID!(IID_ISuspendingDeferral, 1494484233, 35785, 20148, 182, 54, 218, 189, 196, 244, 111, 102); + RT_INTERFACE!{interface ISuspendingDeferral(ISuspendingDeferralVtbl): IInspectable(IInspectableVtbl) [IID_ISuspendingDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl ISuspendingDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn is_channel_mode_supported(&mut self, channelMode: AdcChannelMode) -> Result { + } + RT_CLASS!{class SuspendingDeferral: ISuspendingDeferral} + DEFINE_IID!(IID_ISuspendingOperation, 2644822593, 8417, 20123, 159, 101, 169, 244, 53, 52, 12, 58); + RT_INTERFACE!{interface ISuspendingOperation(ISuspendingOperationVtbl): IInspectable(IInspectableVtbl) [IID_ISuspendingOperation] { + fn GetDeferral(&mut self, out: *mut *mut SuspendingDeferral) -> HRESULT, + fn get_Deadline(&mut self, out: *mut super::foundation::DateTime) -> HRESULT + }} + impl ISuspendingOperation { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deadline(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsChannelModeSupported)(self, channelMode, &mut out); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn open_channel(&mut self, channelNumber: i32) -> Result> { + } + RT_CLASS!{class SuspendingOperation: ISuspendingOperation} + DEFINE_IID!(IID_ISuspendingEventArgs, 2516982789, 11706, 19720, 176, 189, 43, 48, 161, 49, 198, 170); + RT_INTERFACE!{interface ISuspendingEventArgs(ISuspendingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISuspendingEventArgs] { + fn get_SuspendingOperation(&mut self, out: *mut *mut SuspendingOperation) -> HRESULT + }} + impl ISuspendingEventArgs { + #[inline] pub unsafe fn get_suspending_operation(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).OpenChannel)(self, channelNumber, &mut out); + let hr = ((*self.lpVtbl).get_SuspendingOperation)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class AdcChannel: IAdcChannel} - DEFINE_IID!(IID_IAdcControllerStatics, 3437858316, 504, 18577, 188, 59, 190, 83, 239, 39, 156, 164); - RT_INTERFACE!{static interface IAdcControllerStatics(IAdcControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAdcControllerStatics] { - fn GetControllersAsync(&mut self, provider: *mut provider::IAdcProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + DEFINE_IID!(IID_ILeavingBackgroundEventArgs, 969338010, 44654, 18169, 160, 122, 207, 194, 63, 136, 115, 62); + RT_INTERFACE!{interface ILeavingBackgroundEventArgs(ILeavingBackgroundEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ILeavingBackgroundEventArgs] { + fn GetDeferral(&mut self, out: *mut *mut super::foundation::Deferral) -> HRESULT }} - impl IAdcControllerStatics { - #[inline] pub unsafe fn get_controllers_async(&mut self, provider: &provider::IAdcProvider) -> Result>>> { + impl ILeavingBackgroundEventArgs { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetControllersAsync)(self, provider as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class AdcController: IAdcController} - RT_ACTIVATABLE!{IAdcControllerStatics2 [CLSID_AdcController]} - RT_ACTIVATABLE!{IAdcControllerStatics [CLSID_AdcController]} - DEFINE_CLSID!(CLSID_AdcController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,100,99,46,65,100,99,67,111,110,116,114,111,108,108,101,114,0]); - DEFINE_IID!(IID_IAdcControllerStatics2, 2730048285, 38779, 20314, 165, 254, 166, 171, 175, 254, 100, 132); - RT_INTERFACE!{static interface IAdcControllerStatics2(IAdcControllerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdcControllerStatics2] { - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + DEFINE_IID!(IID_IEnteredBackgroundEventArgs, 4146257090, 38951, 16445, 170, 237, 236, 202, 154, 193, 115, 152); + RT_INTERFACE!{interface IEnteredBackgroundEventArgs(IEnteredBackgroundEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEnteredBackgroundEventArgs] { + fn GetDeferral(&mut self, out: *mut *mut super::foundation::Deferral) -> HRESULT }} - impl IAdcControllerStatics2 { - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + impl IEnteredBackgroundEventArgs { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IAdcChannel, 67892244, 9608, 19030, 171, 239, 115, 162, 96, 172, 198, 10); - RT_INTERFACE!{interface IAdcChannel(IAdcChannelVtbl): IInspectable(IInspectableVtbl) [IID_IAdcChannel] { - fn get_Controller(&mut self, out: *mut *mut AdcController) -> HRESULT, - fn ReadValue(&mut self, out: *mut i32) -> HRESULT, - fn ReadRatio(&mut self, out: *mut f64) -> HRESULT + RT_ENUM! { enum PackageSignatureKind: i32 { + None (PackageSignatureKind_None) = 0, Developer (PackageSignatureKind_Developer) = 1, Enterprise (PackageSignatureKind_Enterprise) = 2, Store (PackageSignatureKind_Store) = 3, System (PackageSignatureKind_System) = 4, }} - impl IAdcChannel { - #[inline] pub unsafe fn get_controller(&mut self) -> Result> { + DEFINE_IID!(IID_IPackageIdWithMetadata, 1079474812, 3230, 17469, 144, 116, 133, 95, 92, 224, 160, 141); + RT_INTERFACE!{interface IPackageIdWithMetadata(IPackageIdWithMetadataVtbl): IInspectable(IInspectableVtbl) [IID_IPackageIdWithMetadata] { + fn get_ProductId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Author(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPackageIdWithMetadata { + #[inline] pub unsafe fn get_product_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Controller)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ProductId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn read_value(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).ReadValue)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_author(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Author)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn read_ratio(&mut self) -> Result { + } + DEFINE_IID!(IID_IPackageWithMetadata, 2509543296, 7657, 16626, 180, 82, 13, 233, 241, 145, 0, 18); + RT_INTERFACE!{interface IPackageWithMetadata(IPackageWithMetadataVtbl): IInspectable(IInspectableVtbl) [IID_IPackageWithMetadata] { + fn get_InstallDate(&mut self, out: *mut super::foundation::DateTime) -> HRESULT, + fn GetThumbnailToken(&mut self, out: *mut HSTRING) -> HRESULT, + fn Launch(&mut self, parameters: HSTRING) -> HRESULT + }} + impl IPackageWithMetadata { + #[inline] pub unsafe fn get_install_date(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).ReadRatio)(self, &mut out); + let hr = ((*self.lpVtbl).get_InstallDate)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn get_thumbnail_token(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetThumbnailToken)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch(&mut self, parameters: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).Launch)(self, parameters.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } } -pub mod provider { // Windows.Devices.Adc.Provider -use ::prelude::*; - RT_ENUM! { enum ProviderAdcChannelMode: i32 { - SingleEnded (ProviderAdcChannelMode_SingleEnded) = 0, Differential (ProviderAdcChannelMode_Differential) = 1, + RT_STRUCT! { struct PackageVersion { + Major: u16, Minor: u16, Build: u16, Revision: u16, }} - DEFINE_IID!(IID_IAdcControllerProvider, 3193198632, 33133, 19941, 160, 72, 171, 160, 105, 88, 170, 168); - RT_INTERFACE!{interface IAdcControllerProvider(IAdcControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_IAdcControllerProvider] { - fn get_ChannelCount(&mut self, out: *mut i32) -> HRESULT, - fn get_ResolutionInBits(&mut self, out: *mut i32) -> HRESULT, - fn get_MinValue(&mut self, out: *mut i32) -> HRESULT, - fn get_MaxValue(&mut self, out: *mut i32) -> HRESULT, - fn get_ChannelMode(&mut self, out: *mut ProviderAdcChannelMode) -> HRESULT, - fn put_ChannelMode(&mut self, value: ProviderAdcChannelMode) -> HRESULT, - fn IsChannelModeSupported(&mut self, channelMode: ProviderAdcChannelMode, out: *mut bool) -> HRESULT, - fn AcquireChannel(&mut self, channel: i32) -> HRESULT, - fn ReleaseChannel(&mut self, channel: i32) -> HRESULT, - fn ReadValue(&mut self, channelNumber: i32, out: *mut i32) -> HRESULT + DEFINE_IID!(IID_IPackageStatus, 1608994673, 41829, 19465, 160, 45, 4, 109, 82, 94, 161, 218); + RT_INTERFACE!{interface IPackageStatus(IPackageStatusVtbl): IInspectable(IInspectableVtbl) [IID_IPackageStatus] { + fn VerifyIsOK(&mut self, out: *mut bool) -> HRESULT, + fn get_NotAvailable(&mut self, out: *mut bool) -> HRESULT, + fn get_PackageOffline(&mut self, out: *mut bool) -> HRESULT, + fn get_DataOffline(&mut self, out: *mut bool) -> HRESULT, + fn get_Disabled(&mut self, out: *mut bool) -> HRESULT, + fn get_NeedsRemediation(&mut self, out: *mut bool) -> HRESULT, + fn get_LicenseIssue(&mut self, out: *mut bool) -> HRESULT, + fn get_Modified(&mut self, out: *mut bool) -> HRESULT, + fn get_Tampered(&mut self, out: *mut bool) -> HRESULT, + fn get_DependencyIssue(&mut self, out: *mut bool) -> HRESULT, + fn get_Servicing(&mut self, out: *mut bool) -> HRESULT, + fn get_DeploymentInProgress(&mut self, out: *mut bool) -> HRESULT }} - impl IAdcControllerProvider { - #[inline] pub unsafe fn get_channel_count(&mut self) -> Result { + impl IPackageStatus { + #[inline] pub unsafe fn verify_is_ok(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ChannelCount)(self, &mut out); + let hr = ((*self.lpVtbl).VerifyIsOK)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_resolution_in_bits(&mut self) -> Result { + #[inline] pub unsafe fn get_not_available(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ResolutionInBits)(self, &mut out); + let hr = ((*self.lpVtbl).get_NotAvailable)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_min_value(&mut self) -> Result { + #[inline] pub unsafe fn get_package_offline(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinValue)(self, &mut out); + let hr = ((*self.lpVtbl).get_PackageOffline)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_value(&mut self) -> Result { + #[inline] pub unsafe fn get_data_offline(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxValue)(self, &mut out); + let hr = ((*self.lpVtbl).get_DataOffline)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_channel_mode(&mut self) -> Result { + #[inline] pub unsafe fn get_disabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ChannelMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_Disabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_channel_mode(&mut self, value: ProviderAdcChannelMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_ChannelMode)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_needs_remediation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NeedsRemediation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn is_channel_mode_supported(&mut self, channelMode: ProviderAdcChannelMode) -> Result { + #[inline] pub unsafe fn get_license_issue(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsChannelModeSupported)(self, channelMode, &mut out); + let hr = ((*self.lpVtbl).get_LicenseIssue)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn acquire_channel(&mut self, channel: i32) -> Result<()> { - let hr = ((*self.lpVtbl).AcquireChannel)(self, channel); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_modified(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Modified)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn release_channel(&mut self, channel: i32) -> Result<()> { - let hr = ((*self.lpVtbl).ReleaseChannel)(self, channel); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_tampered(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Tampered)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn read_value(&mut self, channelNumber: i32) -> Result { + #[inline] pub unsafe fn get_dependency_issue(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).ReadValue)(self, channelNumber, &mut out); + let hr = ((*self.lpVtbl).get_DependencyIssue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_servicing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Servicing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deployment_in_progress(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeploymentInProgress)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IAdcProvider, 680867432, 37721, 19543, 188, 136, 226, 117, 232, 22, 56, 201); - RT_INTERFACE!{interface IAdcProvider(IAdcProviderVtbl): IInspectable(IInspectableVtbl) [IID_IAdcProvider] { - fn GetControllers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT - }} - impl IAdcProvider { - #[inline] pub unsafe fn get_controllers(&mut self) -> Result>> { + RT_CLASS!{class PackageStatus: IPackageStatus} + DEFINE_IID!(IID_IPackageId, 450586206, 14279, 18320, 153, 128, 221, 122, 231, 78, 139, 178); + RT_INTERFACE!{interface IPackageId(IPackageIdVtbl): IInspectable(IInspectableVtbl) [IID_IPackageId] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Version(&mut self, out: *mut PackageVersion) -> HRESULT, + #[cfg(not(feature="windows.system"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.system")] fn get_Architecture(&mut self, out: *mut super::system::ProcessorArchitecture) -> HRESULT, + fn get_ResourceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Publisher(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PublisherId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FullName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FamilyName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPackageId { + #[inline] pub unsafe fn get_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetControllers)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } -} // Windows.Devices.Adc.Provider -} // Windows.Devices.Adc -pub mod gpio { // Windows.Devices.Gpio -use ::prelude::*; - RT_ENUM! { enum GpioSharingMode: i32 { - Exclusive (GpioSharingMode_Exclusive) = 0, SharedReadOnly (GpioSharingMode_SharedReadOnly) = 1, - }} - RT_ENUM! { enum GpioOpenStatus: i32 { - PinOpened (GpioOpenStatus_PinOpened) = 0, PinUnavailable (GpioOpenStatus_PinUnavailable) = 1, SharingViolation (GpioOpenStatus_SharingViolation) = 2, - }} - RT_ENUM! { enum GpioPinDriveMode: i32 { - Input (GpioPinDriveMode_Input) = 0, Output (GpioPinDriveMode_Output) = 1, InputPullUp (GpioPinDriveMode_InputPullUp) = 2, InputPullDown (GpioPinDriveMode_InputPullDown) = 3, OutputOpenDrain (GpioPinDriveMode_OutputOpenDrain) = 4, OutputOpenDrainPullUp (GpioPinDriveMode_OutputOpenDrainPullUp) = 5, OutputOpenSource (GpioPinDriveMode_OutputOpenSource) = 6, OutputOpenSourcePullDown (GpioPinDriveMode_OutputOpenSourcePullDown) = 7, - }} - RT_ENUM! { enum GpioPinValue: i32 { - Low (GpioPinValue_Low) = 0, High (GpioPinValue_High) = 1, - }} - RT_ENUM! { enum GpioPinEdge: i32 { - FallingEdge (GpioPinEdge_FallingEdge) = 0, RisingEdge (GpioPinEdge_RisingEdge) = 1, - }} - DEFINE_IID!(IID_IGpioPinValueChangedEventArgs, 825731809, 28733, 16473, 189, 36, 181, 178, 93, 255, 184, 78); - RT_INTERFACE!{interface IGpioPinValueChangedEventArgs(IGpioPinValueChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGpioPinValueChangedEventArgs] { - fn get_Edge(&mut self, out: *mut GpioPinEdge) -> HRESULT - }} - impl IGpioPinValueChangedEventArgs { - #[inline] pub unsafe fn get_edge(&mut self) -> Result { + #[inline] pub unsafe fn get_version(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Edge)(self, &mut out); + let hr = ((*self.lpVtbl).get_Version)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class GpioPinValueChangedEventArgs: IGpioPinValueChangedEventArgs} - RT_CLASS!{class GpioPin: IGpioPin} - DEFINE_IID!(IID_IGpioController, 675287779, 29793, 18076, 168, 188, 97, 214, 157, 8, 165, 60); - RT_INTERFACE!{interface IGpioController(IGpioControllerVtbl): IInspectable(IInspectableVtbl) [IID_IGpioController] { - fn get_PinCount(&mut self, out: *mut i32) -> HRESULT, - fn OpenPin(&mut self, pinNumber: i32, out: *mut *mut GpioPin) -> HRESULT, - fn OpenPinWithSharingMode(&mut self, pinNumber: i32, sharingMode: GpioSharingMode, out: *mut *mut GpioPin) -> HRESULT, - fn TryOpenPin(&mut self, pinNumber: i32, sharingMode: GpioSharingMode, pin: *mut *mut GpioPin, openStatus: *mut GpioOpenStatus, out: *mut bool) -> HRESULT - }} - impl IGpioController { - #[inline] pub unsafe fn get_pin_count(&mut self) -> Result { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_architecture(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PinCount)(self, &mut out); + let hr = ((*self.lpVtbl).get_Architecture)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn open_pin(&mut self, pinNumber: i32) -> Result> { + #[inline] pub unsafe fn get_resource_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).OpenPin)(self, pinNumber, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ResourceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn open_pin_with_sharing_mode(&mut self, pinNumber: i32, sharingMode: GpioSharingMode) -> Result> { + #[inline] pub unsafe fn get_publisher(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).OpenPinWithSharingMode)(self, pinNumber, sharingMode, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Publisher)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn try_open_pin(&mut self, pinNumber: i32, sharingMode: GpioSharingMode) -> Result<(ComPtr, GpioOpenStatus, bool)> { - let mut pin = null_mut(); let mut openStatus = zeroed(); let mut out = zeroed(); - let hr = ((*self.lpVtbl).TryOpenPin)(self, pinNumber, sharingMode, &mut pin, &mut openStatus, &mut out); - if hr == S_OK { Ok((ComPtr::wrap(pin), openStatus, out)) } else { err(hr) } + #[inline] pub unsafe fn get_publisher_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PublisherId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_full_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FullName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGpioControllerStatics, 785839150, 31479, 16662, 149, 51, 196, 61, 153, 161, 251, 100); - RT_INTERFACE!{static interface IGpioControllerStatics(IGpioControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGpioControllerStatics] { - fn GetDefault(&mut self, out: *mut *mut GpioController) -> HRESULT + RT_CLASS!{class PackageId: IPackageId} + DEFINE_IID!(IID_IPackage, 373061935, 48501, 16700, 191, 35, 177, 254, 123, 149, 216, 37); + RT_INTERFACE!{interface IPackage(IPackageVtbl): IInspectable(IInspectableVtbl) [IID_IPackage] { + fn get_Id(&mut self, out: *mut *mut PackageId) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_InstalledLocation(&mut self, out: *mut *mut super::storage::StorageFolder) -> HRESULT, + fn get_IsFramework(&mut self, out: *mut bool) -> HRESULT, + fn get_Dependencies(&mut self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT }} - impl IGpioControllerStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + impl IPackage { + #[inline] pub unsafe fn get_id(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class GpioController: IGpioController} - RT_ACTIVATABLE!{IGpioControllerStatics2 [CLSID_GpioController]} - RT_ACTIVATABLE!{IGpioControllerStatics [CLSID_GpioController]} - DEFINE_CLSID!(CLSID_GpioController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,112,105,111,46,71,112,105,111,67,111,110,116,114,111,108,108,101,114,0]); - DEFINE_IID!(IID_IGpioControllerStatics2, 2435546400, 27812, 16646, 163, 115, 255, 253, 52, 107, 14, 91); - RT_INTERFACE!{static interface IGpioControllerStatics2(IGpioControllerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGpioControllerStatics2] { - fn GetControllersAsync(&mut self, provider: *mut provider::IGpioProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl IGpioControllerStatics2 { - #[inline] pub unsafe fn get_controllers_async(&mut self, provider: &provider::IGpioProvider) -> Result>>> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_installed_location(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetControllersAsync)(self, provider as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_InstalledLocation)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_is_framework(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFramework)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dependencies(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_Dependencies)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGpioPin, 299479175, 44974, 18320, 158, 233, 224, 234, 201, 66, 210, 1); - RT_INTERFACE!{interface IGpioPin(IGpioPinVtbl): IInspectable(IInspectableVtbl) [IID_IGpioPin] { - fn add_ValueChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ValueChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_DebounceTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_DebounceTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_PinNumber(&mut self, out: *mut i32) -> HRESULT, - fn get_SharingMode(&mut self, out: *mut GpioSharingMode) -> HRESULT, - fn IsDriveModeSupported(&mut self, driveMode: GpioPinDriveMode, out: *mut bool) -> HRESULT, - fn GetDriveMode(&mut self, out: *mut GpioPinDriveMode) -> HRESULT, - fn SetDriveMode(&mut self, value: GpioPinDriveMode) -> HRESULT, - fn Write(&mut self, value: GpioPinValue) -> HRESULT, - fn Read(&mut self, out: *mut GpioPinValue) -> HRESULT + RT_CLASS!{class Package: IPackage} + RT_ACTIVATABLE!{IPackageStatics [CLSID_Package]} + DEFINE_CLSID!(CLSID_Package = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,80,97,99,107,97,103,101,0]); + DEFINE_IID!(IID_IPackage2, 2791387062, 30344, 19150, 149, 251, 53, 149, 56, 231, 170, 1); + RT_INTERFACE!{interface IPackage2(IPackage2Vtbl): IInspectable(IInspectableVtbl) [IID_IPackage2] { + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PublisherDisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Logo(&mut self, out: *mut *mut super::foundation::Uri) -> HRESULT, + fn get_IsResourcePackage(&mut self, out: *mut bool) -> HRESULT, + fn get_IsBundle(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDevelopmentMode(&mut self, out: *mut bool) -> HRESULT }} - impl IGpioPin { - #[inline] pub unsafe fn add_value_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ValueChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IPackage2 { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_value_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ValueChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_publisher_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PublisherDisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_debounce_timeout(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DebounceTimeout)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_debounce_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { - let hr = ((*self.lpVtbl).put_DebounceTimeout)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_pin_number(&mut self) -> Result { + #[inline] pub unsafe fn get_is_resource_package(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PinNumber)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsResourcePackage)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { + #[inline] pub unsafe fn get_is_bundle(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsBundle)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn is_drive_mode_supported(&mut self, driveMode: GpioPinDriveMode) -> Result { + #[inline] pub unsafe fn get_is_development_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsDriveModeSupported)(self, driveMode, &mut out); + let hr = ((*self.lpVtbl).get_IsDevelopmentMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_drive_mode(&mut self) -> Result { + } + DEFINE_IID!(IID_IPackage3, 1601407841, 63594, 18711, 147, 209, 241, 238, 157, 59, 53, 217); + RT_INTERFACE!{interface IPackage3(IPackage3Vtbl): IInspectable(IInspectableVtbl) [IID_IPackage3] { + fn get_Status(&mut self, out: *mut *mut PackageStatus) -> HRESULT, + fn get_InstalledDate(&mut self, out: *mut super::foundation::DateTime) -> HRESULT, + fn GetAppListEntriesAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IPackage3 { + #[inline] pub unsafe fn get_status(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_installed_date(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetDriveMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_InstalledDate)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_drive_mode(&mut self, value: GpioPinDriveMode) -> Result<()> { - let hr = ((*self.lpVtbl).SetDriveMode)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_app_list_entries_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAppListEntriesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn write(&mut self, value: GpioPinValue) -> Result<()> { - let hr = ((*self.lpVtbl).Write)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IPackage4, 1705955758, 47451, 17676, 136, 43, 98, 85, 24, 127, 57, 126); + RT_INTERFACE!{interface IPackage4(IPackage4Vtbl): IInspectable(IInspectableVtbl) [IID_IPackage4] { + fn get_SignatureKind(&mut self, out: *mut PackageSignatureKind) -> HRESULT, + fn get_IsOptional(&mut self, out: *mut bool) -> HRESULT, + fn VerifyContentIntegrityAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPackage4 { + #[inline] pub unsafe fn get_signature_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SignatureKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn read(&mut self) -> Result { + #[inline] pub unsafe fn get_is_optional(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).Read)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsOptional)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } -pub mod provider { // Windows.Devices.Gpio.Provider -use ::prelude::*; - RT_ENUM! { enum ProviderGpioSharingMode: i32 { - Exclusive (ProviderGpioSharingMode_Exclusive) = 0, SharedReadOnly (ProviderGpioSharingMode_SharedReadOnly) = 1, - }} - RT_ENUM! { enum ProviderGpioPinDriveMode: i32 { - Input (ProviderGpioPinDriveMode_Input) = 0, Output (ProviderGpioPinDriveMode_Output) = 1, InputPullUp (ProviderGpioPinDriveMode_InputPullUp) = 2, InputPullDown (ProviderGpioPinDriveMode_InputPullDown) = 3, OutputOpenDrain (ProviderGpioPinDriveMode_OutputOpenDrain) = 4, OutputOpenDrainPullUp (ProviderGpioPinDriveMode_OutputOpenDrainPullUp) = 5, OutputOpenSource (ProviderGpioPinDriveMode_OutputOpenSource) = 6, OutputOpenSourcePullDown (ProviderGpioPinDriveMode_OutputOpenSourcePullDown) = 7, - }} - RT_ENUM! { enum ProviderGpioPinValue: i32 { - Low (ProviderGpioPinValue_Low) = 0, High (ProviderGpioPinValue_High) = 1, - }} - RT_ENUM! { enum ProviderGpioPinEdge: i32 { - FallingEdge (ProviderGpioPinEdge_FallingEdge) = 0, RisingEdge (ProviderGpioPinEdge_RisingEdge) = 1, - }} - DEFINE_IID!(IID_IGpioPinProviderValueChangedEventArgsFactory, 1053494105, 22156, 17298, 178, 74, 138, 89, 169, 2, 177, 241); - RT_INTERFACE!{static interface IGpioPinProviderValueChangedEventArgsFactory(IGpioPinProviderValueChangedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGpioPinProviderValueChangedEventArgsFactory] { - fn Create(&mut self, edge: ProviderGpioPinEdge, out: *mut *mut GpioPinProviderValueChangedEventArgs) -> HRESULT - }} - impl IGpioPinProviderValueChangedEventArgsFactory { - #[inline] pub unsafe fn create(&mut self, edge: ProviderGpioPinEdge) -> Result> { + #[inline] pub unsafe fn verify_content_integrity_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, edge, &mut out); + let hr = ((*self.lpVtbl).VerifyContentIntegrityAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class GpioPinProviderValueChangedEventArgs: IGpioPinProviderValueChangedEventArgs [IGpioPinProviderValueChangedEventArgsFactory] [CLSID_GpioPinProviderValueChangedEventArgs]} - DEFINE_CLSID!(CLSID_GpioPinProviderValueChangedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,112,105,111,46,80,114,111,118,105,100,101,114,46,71,112,105,111,80,105,110,80,114,111,118,105,100,101,114,86,97,108,117,101,67,104,97,110,103,101,100,69,118,101,110,116,65,114,103,115,0]); - DEFINE_IID!(IID_IGpioPinProviderValueChangedEventArgs, 849794802, 15707, 17613, 143, 190, 19, 166, 159, 46, 219, 36); - RT_INTERFACE!{interface IGpioPinProviderValueChangedEventArgs(IGpioPinProviderValueChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGpioPinProviderValueChangedEventArgs] { - fn get_Edge(&mut self, out: *mut ProviderGpioPinEdge) -> HRESULT + DEFINE_IID!(IID_IPackageStatics, 1314081759, 10592, 18552, 151, 164, 150, 36, 222, 183, 47, 45); + RT_INTERFACE!{static interface IPackageStatics(IPackageStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPackageStatics] { + fn get_Current(&mut self, out: *mut *mut Package) -> HRESULT }} - impl IGpioPinProviderValueChangedEventArgs { - #[inline] pub unsafe fn get_edge(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Edge)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IPackageStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGpioPinProvider, 1110723767, 27324, 16639, 156, 231, 115, 184, 83, 1, 185, 0); - RT_INTERFACE!{interface IGpioPinProvider(IGpioPinProviderVtbl): IInspectable(IInspectableVtbl) [IID_IGpioPinProvider] { - fn add_ValueChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ValueChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn get_DebounceTimeout(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn put_DebounceTimeout(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_PinNumber(&mut self, out: *mut i32) -> HRESULT, - fn get_SharingMode(&mut self, out: *mut ProviderGpioSharingMode) -> HRESULT, - fn IsDriveModeSupported(&mut self, driveMode: ProviderGpioPinDriveMode, out: *mut bool) -> HRESULT, - fn GetDriveMode(&mut self, out: *mut ProviderGpioPinDriveMode) -> HRESULT, - fn SetDriveMode(&mut self, value: ProviderGpioPinDriveMode) -> HRESULT, - fn Write(&mut self, value: ProviderGpioPinValue) -> HRESULT, - fn Read(&mut self, out: *mut ProviderGpioPinValue) -> HRESULT + DEFINE_IID!(IID_IPackageStagingEventArgs, 272721965, 21730, 20305, 184, 40, 158, 247, 4, 108, 33, 15); + RT_INTERFACE!{interface IPackageStagingEventArgs(IPackageStagingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPackageStagingEventArgs] { + fn get_ActivityId(&mut self, out: *mut Guid) -> HRESULT, + fn get_Package(&mut self, out: *mut *mut Package) -> HRESULT, + fn get_Progress(&mut self, out: *mut f64) -> HRESULT, + fn get_IsComplete(&mut self, out: *mut bool) -> HRESULT, + fn get_ErrorCode(&mut self, out: *mut super::foundation::HResult) -> HRESULT }} - impl IGpioPinProvider { - #[inline] pub unsafe fn add_value_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + impl IPackageStagingEventArgs { + #[inline] pub unsafe fn get_activity_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ValueChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_ActivityId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_value_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ValueChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_package(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_debounce_timeout(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + #[inline] pub unsafe fn get_progress(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DebounceTimeout)(self, &mut out); + let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_debounce_timeout(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { - let hr = ((*self.lpVtbl).put_DebounceTimeout)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pin_number(&mut self) -> Result { + #[inline] pub unsafe fn get_is_complete(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PinNumber)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsComplete)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn is_drive_mode_supported(&mut self, driveMode: ProviderGpioPinDriveMode) -> Result { + } + RT_CLASS!{class PackageStagingEventArgs: IPackageStagingEventArgs} + DEFINE_IID!(IID_IPackageInstallingEventArgs, 2540969655, 43898, 16410, 139, 97, 235, 14, 127, 175, 242, 55); + RT_INTERFACE!{interface IPackageInstallingEventArgs(IPackageInstallingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPackageInstallingEventArgs] { + fn get_ActivityId(&mut self, out: *mut Guid) -> HRESULT, + fn get_Package(&mut self, out: *mut *mut Package) -> HRESULT, + fn get_Progress(&mut self, out: *mut f64) -> HRESULT, + fn get_IsComplete(&mut self, out: *mut bool) -> HRESULT, + fn get_ErrorCode(&mut self, out: *mut super::foundation::HResult) -> HRESULT + }} + impl IPackageInstallingEventArgs { + #[inline] pub unsafe fn get_activity_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsDriveModeSupported)(self, driveMode, &mut out); + let hr = ((*self.lpVtbl).get_ActivityId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_drive_mode(&mut self) -> Result { + #[inline] pub unsafe fn get_package(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_progress(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetDriveMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_drive_mode(&mut self, value: ProviderGpioPinDriveMode) -> Result<()> { - let hr = ((*self.lpVtbl).SetDriveMode)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write(&mut self, value: ProviderGpioPinValue) -> Result<()> { - let hr = ((*self.lpVtbl).Write)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_is_complete(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsComplete)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn read(&mut self) -> Result { + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).Read)(self, &mut out); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IGpioControllerProvider, 2903625415, 6634, 19233, 135, 79, 185, 26, 237, 74, 37, 219); - RT_INTERFACE!{interface IGpioControllerProvider(IGpioControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_IGpioControllerProvider] { - fn get_PinCount(&mut self, out: *mut i32) -> HRESULT, - fn OpenPinProvider(&mut self, pin: i32, sharingMode: ProviderGpioSharingMode, out: *mut *mut IGpioPinProvider) -> HRESULT + RT_CLASS!{class PackageInstallingEventArgs: IPackageInstallingEventArgs} + DEFINE_IID!(IID_IPackageUpdatingEventArgs, 3447407144, 64884, 17470, 177, 20, 35, 230, 119, 176, 232, 111); + RT_INTERFACE!{interface IPackageUpdatingEventArgs(IPackageUpdatingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPackageUpdatingEventArgs] { + fn get_ActivityId(&mut self, out: *mut Guid) -> HRESULT, + fn get_SourcePackage(&mut self, out: *mut *mut Package) -> HRESULT, + fn get_TargetPackage(&mut self, out: *mut *mut Package) -> HRESULT, + fn get_Progress(&mut self, out: *mut f64) -> HRESULT, + fn get_IsComplete(&mut self, out: *mut bool) -> HRESULT, + fn get_ErrorCode(&mut self, out: *mut super::foundation::HResult) -> HRESULT }} - impl IGpioControllerProvider { - #[inline] pub unsafe fn get_pin_count(&mut self) -> Result { + impl IPackageUpdatingEventArgs { + #[inline] pub unsafe fn get_activity_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PinCount)(self, &mut out); + let hr = ((*self.lpVtbl).get_ActivityId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn open_pin_provider(&mut self, pin: i32, sharingMode: ProviderGpioSharingMode) -> Result> { + #[inline] pub unsafe fn get_source_package(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).OpenPinProvider)(self, pin, sharingMode, &mut out); + let hr = ((*self.lpVtbl).get_SourcePackage)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IGpioProvider, 1156065031, 2250, 17226, 175, 224, 214, 21, 128, 68, 111, 126); - RT_INTERFACE!{interface IGpioProvider(IGpioProviderVtbl): IInspectable(IInspectableVtbl) [IID_IGpioProvider] { - fn GetControllers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT - }} - impl IGpioProvider { - #[inline] pub unsafe fn get_controllers(&mut self) -> Result>> { + #[inline] pub unsafe fn get_target_package(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetControllers)(self, &mut out); + let hr = ((*self.lpVtbl).get_TargetPackage)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn get_progress(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_complete(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsComplete)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } } -} // Windows.Devices.Gpio.Provider -} // Windows.Devices.Gpio -pub mod i2c { // Windows.Devices.I2c -use ::prelude::*; - RT_ENUM! { enum I2cBusSpeed: i32 { - StandardMode (I2cBusSpeed_StandardMode) = 0, FastMode (I2cBusSpeed_FastMode) = 1, - }} - RT_ENUM! { enum I2cTransferStatus: i32 { - FullTransfer (I2cTransferStatus_FullTransfer) = 0, PartialTransfer (I2cTransferStatus_PartialTransfer) = 1, SlaveAddressNotAcknowledged (I2cTransferStatus_SlaveAddressNotAcknowledged) = 2, - }} - RT_ENUM! { enum I2cSharingMode: i32 { - Exclusive (I2cSharingMode_Exclusive) = 0, Shared (I2cSharingMode_Shared) = 1, - }} - RT_STRUCT! { struct I2cTransferResult { - Status: I2cTransferStatus, BytesTransferred: u32, + RT_CLASS!{class PackageUpdatingEventArgs: IPackageUpdatingEventArgs} + DEFINE_IID!(IID_IPackageUninstallingEventArgs, 1145285202, 43810, 17613, 130, 187, 78, 201, 184, 39, 54, 122); + RT_INTERFACE!{interface IPackageUninstallingEventArgs(IPackageUninstallingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPackageUninstallingEventArgs] { + fn get_ActivityId(&mut self, out: *mut Guid) -> HRESULT, + fn get_Package(&mut self, out: *mut *mut Package) -> HRESULT, + fn get_Progress(&mut self, out: *mut f64) -> HRESULT, + fn get_IsComplete(&mut self, out: *mut bool) -> HRESULT, + fn get_ErrorCode(&mut self, out: *mut super::foundation::HResult) -> HRESULT }} - DEFINE_IID!(IID_II2cConnectionSettingsFactory, 2176157363, 38547, 16817, 162, 67, 222, 212, 246, 230, 105, 38); - RT_INTERFACE!{static interface II2cConnectionSettingsFactory(II2cConnectionSettingsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_II2cConnectionSettingsFactory] { - fn Create(&mut self, slaveAddress: i32, out: *mut *mut I2cConnectionSettings) -> HRESULT + impl IPackageUninstallingEventArgs { + #[inline] pub unsafe fn get_activity_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActivityId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_package(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_progress(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_complete(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsComplete)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PackageUninstallingEventArgs: IPackageUninstallingEventArgs} + DEFINE_IID!(IID_IPackageStatusChangedEventArgs, 1132294477, 48512, 19056, 188, 80, 246, 231, 150, 80, 149, 117); + RT_INTERFACE!{interface IPackageStatusChangedEventArgs(IPackageStatusChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPackageStatusChangedEventArgs] { + fn get_Package(&mut self, out: *mut *mut Package) -> HRESULT }} - impl II2cConnectionSettingsFactory { - #[inline] pub unsafe fn create(&mut self, slaveAddress: i32) -> Result> { + impl IPackageStatusChangedEventArgs { + #[inline] pub unsafe fn get_package(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, slaveAddress, &mut out); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class I2cConnectionSettings: II2cConnectionSettings [II2cConnectionSettingsFactory] [CLSID_I2cConnectionSettings]} - DEFINE_CLSID!(CLSID_I2cConnectionSettings = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,73,50,99,46,73,50,99,67,111,110,110,101,99,116,105,111,110,83,101,116,116,105,110,103,115,0]); - DEFINE_IID!(IID_II2cConnectionSettings, 4074443527, 43887, 17977, 167, 103, 84, 83, 109, 195, 70, 15); - RT_INTERFACE!{interface II2cConnectionSettings(II2cConnectionSettingsVtbl): IInspectable(IInspectableVtbl) [IID_II2cConnectionSettings] { - fn get_SlaveAddress(&mut self, out: *mut i32) -> HRESULT, - fn put_SlaveAddress(&mut self, value: i32) -> HRESULT, - fn get_BusSpeed(&mut self, out: *mut I2cBusSpeed) -> HRESULT, - fn put_BusSpeed(&mut self, value: I2cBusSpeed) -> HRESULT, - fn get_SharingMode(&mut self, out: *mut I2cSharingMode) -> HRESULT, - fn put_SharingMode(&mut self, value: I2cSharingMode) -> HRESULT + RT_CLASS!{class PackageStatusChangedEventArgs: IPackageStatusChangedEventArgs} + DEFINE_IID!(IID_IPackageCatalog, 587872081, 40419, 17477, 190, 116, 145, 251, 50, 90, 190, 254); + RT_INTERFACE!{interface IPackageCatalog(IPackageCatalogVtbl): IInspectable(IInspectableVtbl) [IID_IPackageCatalog] { + fn add_PackageStaging(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageStaging(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageInstalling(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageInstalling(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageUpdating(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageUpdating(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageUninstalling(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageUninstalling(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageStatusChanged(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageStatusChanged(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT }} - impl II2cConnectionSettings { - #[inline] pub unsafe fn get_slave_address(&mut self) -> Result { + impl IPackageCatalog { + #[inline] pub unsafe fn add_package_staging(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SlaveAddress)(self, &mut out); + let hr = ((*self.lpVtbl).add_PackageStaging)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_slave_address(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_SlaveAddress)(self, value); + #[inline] pub unsafe fn remove_package_staging(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PackageStaging)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_bus_speed(&mut self) -> Result { + #[inline] pub unsafe fn add_package_installing(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BusSpeed)(self, &mut out); + let hr = ((*self.lpVtbl).add_PackageInstalling)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_bus_speed(&mut self, value: I2cBusSpeed) -> Result<()> { - let hr = ((*self.lpVtbl).put_BusSpeed)(self, value); + #[inline] pub unsafe fn remove_package_installing(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PackageInstalling)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { + #[inline] pub unsafe fn add_package_updating(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); + let hr = ((*self.lpVtbl).add_PackageUpdating)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_sharing_mode(&mut self, value: I2cSharingMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_SharingMode)(self, value); + #[inline] pub unsafe fn remove_package_updating(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PackageUpdating)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_II2cDeviceStatics, 2443394019, 29492, 17682, 150, 188, 251, 174, 148, 89, 245, 246); - RT_INTERFACE!{static interface II2cDeviceStatics(II2cDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_II2cDeviceStatics] { - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromFriendlyName(&mut self, friendlyName: HSTRING, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, settings: *mut I2cConnectionSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl II2cDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn add_package_uninstalling(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PackageUninstalling)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_friendly_name(&mut self, friendlyName: &HStringArg) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromFriendlyName)(self, friendlyName.get(), &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_package_uninstalling(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PackageUninstalling)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg, settings: &I2cConnectionSettings) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), settings as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn add_package_status_changed(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PackageStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class I2cDevice: II2cDevice} - RT_ACTIVATABLE!{II2cDeviceStatics [CLSID_I2cDevice]} - DEFINE_CLSID!(CLSID_I2cDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,73,50,99,46,73,50,99,68,101,118,105,99,101,0]); - DEFINE_IID!(IID_II2cController, 3297423794, 34720, 16742, 142, 62, 180, 184, 249, 124, 215, 41); - RT_INTERFACE!{interface II2cController(II2cControllerVtbl): IInspectable(IInspectableVtbl) [IID_II2cController] { - fn GetDevice(&mut self, settings: *mut I2cConnectionSettings, out: *mut *mut I2cDevice) -> HRESULT - }} - impl II2cController { - #[inline] pub unsafe fn get_device(&mut self, settings: &I2cConnectionSettings) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDevice)(self, settings as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_package_status_changed(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PackageStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_II2cControllerStatics, 1090257765, 24325, 20094, 132, 189, 16, 13, 184, 224, 174, 197); - RT_INTERFACE!{static interface II2cControllerStatics(II2cControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_II2cControllerStatics] { - fn GetControllersAsync(&mut self, provider: *mut provider::II2cProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class PackageCatalog: IPackageCatalog} + RT_ACTIVATABLE!{IPackageCatalogStatics [CLSID_PackageCatalog]} + DEFINE_CLSID!(CLSID_PackageCatalog = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,80,97,99,107,97,103,101,67,97,116,97,108,111,103,0]); + DEFINE_IID!(IID_IPackageCatalogStatics, 2710345366, 58971, 17972, 186, 33, 94, 99, 235, 114, 68, 167); + RT_INTERFACE!{static interface IPackageCatalogStatics(IPackageCatalogStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPackageCatalogStatics] { + fn OpenForCurrentPackage(&mut self, out: *mut *mut PackageCatalog) -> HRESULT, + fn OpenForCurrentUser(&mut self, out: *mut *mut PackageCatalog) -> HRESULT }} - impl II2cControllerStatics { - #[inline] pub unsafe fn get_controllers_async(&mut self, provider: &provider::II2cProvider) -> Result>>> { + impl IPackageCatalogStatics { + #[inline] pub unsafe fn open_for_current_package(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetControllersAsync)(self, provider as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).OpenForCurrentPackage)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + #[inline] pub unsafe fn open_for_current_user(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + let hr = ((*self.lpVtbl).OpenForCurrentUser)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class I2cController: II2cController} - RT_ACTIVATABLE!{II2cControllerStatics [CLSID_I2cController]} - DEFINE_CLSID!(CLSID_I2cController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,73,50,99,46,73,50,99,67,111,110,116,114,111,108,108,101,114,0]); - DEFINE_IID!(IID_II2cDevice, 2251735350, 47557, 20336, 148, 73, 204, 70, 220, 111, 87, 235); - RT_INTERFACE!{interface II2cDevice(II2cDeviceVtbl): IInspectable(IInspectableVtbl) [IID_II2cDevice] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ConnectionSettings(&mut self, out: *mut *mut I2cConnectionSettings) -> HRESULT, - fn Write(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, - fn WritePartial(&mut self, bufferSize: u32, buffer: *mut u8, out: *mut I2cTransferResult) -> HRESULT, - fn Read(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, - fn ReadPartial(&mut self, bufferSize: u32, buffer: *mut u8, out: *mut I2cTransferResult) -> HRESULT, - fn WriteRead(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT, - fn WriteReadPartial(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8, out: *mut I2cTransferResult) -> HRESULT + DEFINE_IID!(IID_IDesignModeStatics, 741905356, 63514, 20090, 184, 87, 118, 168, 8, 135, 225, 133); + RT_INTERFACE!{static interface IDesignModeStatics(IDesignModeStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDesignModeStatics] { + fn get_DesignModeEnabled(&mut self, out: *mut bool) -> HRESULT }} - impl II2cDevice { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + impl IDesignModeStatics { + #[inline] pub unsafe fn get_design_mode_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesignModeEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_connection_settings(&mut self) -> Result> { + } + RT_ACTIVATABLE!{IDesignModeStatics [CLSID_DesignMode]} + DEFINE_CLSID!(CLSID_DesignMode = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,68,101,115,105,103,110,77,111,100,101,0]); + RT_STRUCT! { struct StartupTaskContract { + + }} + RT_ENUM! { enum StartupTaskState: i32 { + Disabled (StartupTaskState_Disabled) = 0, DisabledByUser (StartupTaskState_DisabledByUser) = 1, Enabled (StartupTaskState_Enabled) = 2, + }} + DEFINE_IID!(IID_IStartupTask, 4150010824, 46578, 20332, 136, 221, 54, 203, 29, 89, 157, 23); + RT_INTERFACE!{interface IStartupTask(IStartupTaskVtbl): IInspectable(IInspectableVtbl) [IID_IStartupTask] { + fn RequestEnableAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn Disable(&mut self) -> HRESULT, + fn get_State(&mut self, out: *mut StartupTaskState) -> HRESULT, + fn get_TaskId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStartupTask { + #[inline] pub unsafe fn request_enable_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ConnectionSettings)(self, &mut out); + let hr = ((*self.lpVtbl).RequestEnableAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn write(&mut self, buffer: &[u8]) -> Result<()> { - let hr = ((*self.lpVtbl).Write)(self, buffer.len() as u32, buffer.as_ptr() as *mut _); + #[inline] pub unsafe fn disable(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Disable)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn write_partial(&mut self, buffer: &[u8]) -> Result { + #[inline] pub unsafe fn get_state(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).WritePartial)(self, buffer.len() as u32, buffer.as_ptr() as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn read(&mut self, bufferSize: u32, buffer: *mut u8) -> Result<()> { - let hr = ((*self.lpVtbl).Read)(self, bufferSize, buffer); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read_partial(&mut self, bufferSize: u32, buffer: *mut u8) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).ReadPartial)(self, bufferSize, buffer, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_task_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TaskId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn write_read(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { - let hr = ((*self.lpVtbl).WriteRead)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IStartupTaskStatics, 3998965949, 41288, 16807, 178, 110, 232, 184, 138, 30, 98, 248); + RT_INTERFACE!{static interface IStartupTaskStatics(IStartupTaskStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStartupTaskStatics] { + fn GetForCurrentPackageAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn GetAsync(&mut self, taskId: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStartupTaskStatics { + #[inline] pub unsafe fn get_for_current_package_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentPackageAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn write_read_partial(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).WriteReadPartial)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_async(&mut self, taskId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAsync)(self, taskId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } -pub mod provider { // Windows.Devices.I2c.Provider + RT_CLASS!{class StartupTask: IStartupTask} + RT_ACTIVATABLE!{IStartupTaskStatics [CLSID_StartupTask]} + DEFINE_CLSID!(CLSID_StartupTask = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,83,116,97,114,116,117,112,84,97,115,107,0]); +pub mod socialinfo { // Windows.ApplicationModel.SocialInfo use ::prelude::*; - RT_ENUM! { enum ProviderI2cBusSpeed: i32 { - StandardMode (ProviderI2cBusSpeed_StandardMode) = 0, FastMode (ProviderI2cBusSpeed_FastMode) = 1, + RT_STRUCT! { struct SocialInfoContract { + }} - RT_ENUM! { enum ProviderI2cTransferStatus: i32 { - FullTransfer (ProviderI2cTransferStatus_FullTransfer) = 0, PartialTransfer (ProviderI2cTransferStatus_PartialTransfer) = 1, SlaveAddressNotAcknowledged (ProviderI2cTransferStatus_SlaveAddressNotAcknowledged) = 2, + RT_ENUM! { enum SocialItemBadgeStyle: i32 { + Hidden (SocialItemBadgeStyle_Hidden) = 0, Visible (SocialItemBadgeStyle_Visible) = 1, VisibleWithCount (SocialItemBadgeStyle_VisibleWithCount) = 2, }} - RT_ENUM! { enum ProviderI2cSharingMode: i32 { - Exclusive (ProviderI2cSharingMode_Exclusive) = 0, Shared (ProviderI2cSharingMode_Shared) = 1, + RT_ENUM! { enum SocialFeedKind: i32 { + HomeFeed (SocialFeedKind_HomeFeed) = 0, ContactFeed (SocialFeedKind_ContactFeed) = 1, Dashboard (SocialFeedKind_Dashboard) = 2, }} - RT_STRUCT! { struct ProviderI2cTransferResult { - Status: ProviderI2cTransferStatus, BytesTransferred: u32, + RT_ENUM! { enum SocialFeedItemStyle: i32 { + Default (SocialFeedItemStyle_Default) = 0, Photo (SocialFeedItemStyle_Photo) = 1, }} - DEFINE_IID!(IID_IProviderI2cConnectionSettings, 3923463732, 58640, 17591, 128, 157, 242, 248, 91, 85, 83, 57); - RT_INTERFACE!{interface IProviderI2cConnectionSettings(IProviderI2cConnectionSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IProviderI2cConnectionSettings] { - fn get_SlaveAddress(&mut self, out: *mut i32) -> HRESULT, - fn put_SlaveAddress(&mut self, value: i32) -> HRESULT, - fn get_BusSpeed(&mut self, out: *mut ProviderI2cBusSpeed) -> HRESULT, - fn put_BusSpeed(&mut self, value: ProviderI2cBusSpeed) -> HRESULT, - fn get_SharingMode(&mut self, out: *mut ProviderI2cSharingMode) -> HRESULT, - fn put_SharingMode(&mut self, value: ProviderI2cSharingMode) -> HRESULT + RT_ENUM! { enum SocialFeedUpdateMode: i32 { + Append (SocialFeedUpdateMode_Append) = 0, Replace (SocialFeedUpdateMode_Replace) = 1, }} - impl IProviderI2cConnectionSettings { - #[inline] pub unsafe fn get_slave_address(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SlaveAddress)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + DEFINE_IID!(IID_ISocialItemThumbnail, 1556054810, 16136, 18815, 145, 127, 87, 224, 157, 132, 177, 65); + RT_INTERFACE!{interface ISocialItemThumbnail(ISocialItemThumbnailVtbl): IInspectable(IInspectableVtbl) [IID_ISocialItemThumbnail] { + fn get_TargetUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_TargetUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_ImageUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_ImageUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_BitmapSize(&mut self, out: *mut super::super::graphics::imaging::BitmapSize) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn put_BitmapSize(&mut self, value: super::super::graphics::imaging::BitmapSize) -> HRESULT, + #[cfg(feature="windows.storage")] fn SetImageAsync(&mut self, image: *mut super::super::storage::streams::IInputStream, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl ISocialItemThumbnail { + #[inline] pub unsafe fn get_target_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TargetUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_slave_address(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_SlaveAddress)(self, value); + #[inline] pub unsafe fn set_target_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetUri)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_bus_speed(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BusSpeed)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_image_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ImageUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_bus_speed(&mut self, value: ProviderI2cBusSpeed) -> Result<()> { - let hr = ((*self.lpVtbl).put_BusSpeed)(self, value); + #[inline] pub unsafe fn set_image_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_ImageUri)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_bitmap_size(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_BitmapSize)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_sharing_mode(&mut self, value: ProviderI2cSharingMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_SharingMode)(self, value); + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_bitmap_size(&mut self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { + let hr = ((*self.lpVtbl).put_BitmapSize)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class ProviderI2cConnectionSettings: IProviderI2cConnectionSettings} - DEFINE_IID!(IID_II2cControllerProvider, 1640151938, 17680, 16739, 168, 124, 78, 21, 169, 85, 137, 128); - RT_INTERFACE!{interface II2cControllerProvider(II2cControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_II2cControllerProvider] { - fn GetDeviceProvider(&mut self, settings: *mut ProviderI2cConnectionSettings, out: *mut *mut II2cDeviceProvider) -> HRESULT - }} - impl II2cControllerProvider { - #[inline] pub unsafe fn get_device_provider(&mut self, settings: &ProviderI2cConnectionSettings) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_image_async(&mut self, image: &super::super::storage::streams::IInputStream) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceProvider)(self, settings as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).SetImageAsync)(self, image as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_II2cProvider, 1863518270, 48994, 20450, 169, 90, 240, 137, 153, 102, 152, 24); - RT_INTERFACE!{interface II2cProvider(II2cProviderVtbl): IInspectable(IInspectableVtbl) [IID_II2cProvider] { - fn GetControllersAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + DEFINE_IID!(IID_ISocialFeedContent, 2721375273, 15929, 18765, 163, 124, 244, 98, 162, 73, 69, 20); + RT_INTERFACE!{interface ISocialFeedContent(ISocialFeedContentVtbl): IInspectable(IInspectableVtbl) [IID_ISocialFeedContent] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_Message(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Message(&mut self, value: HSTRING) -> HRESULT, + fn get_TargetUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_TargetUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT }} - impl II2cProvider { - #[inline] pub unsafe fn get_controllers_async(&mut self) -> Result>>> { + impl ISocialFeedContent { + #[inline] pub unsafe fn get_title(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetControllersAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_message(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Message)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_target_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TargetUri)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn set_target_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - DEFINE_IID!(IID_II2cDeviceProvider, 2905876052, 22504, 17726, 131, 41, 209, 228, 71, 209, 3, 169); - RT_INTERFACE!{interface II2cDeviceProvider(II2cDeviceProviderVtbl): IInspectable(IInspectableVtbl) [IID_II2cDeviceProvider] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn Write(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, - fn WritePartial(&mut self, bufferSize: u32, buffer: *mut u8, out: *mut ProviderI2cTransferResult) -> HRESULT, - fn Read(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, - fn ReadPartial(&mut self, bufferSize: u32, buffer: *mut u8, out: *mut ProviderI2cTransferResult) -> HRESULT, - fn WriteRead(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT, - fn WriteReadPartial(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8, out: *mut ProviderI2cTransferResult) -> HRESULT + DEFINE_IID!(IID_ISocialUserInfo, 2656967633, 37072, 19997, 149, 84, 132, 77, 70, 96, 127, 97); + RT_INTERFACE!{interface ISocialUserInfo(ISocialUserInfoVtbl): IInspectable(IInspectableVtbl) [IID_ISocialUserInfo] { + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_UserName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_UserName(&mut self, value: HSTRING) -> HRESULT, + fn get_RemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RemoteId(&mut self, value: HSTRING) -> HRESULT, + fn get_TargetUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_TargetUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT }} - impl II2cDeviceProvider { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl ISocialUserInfo { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn write(&mut self, buffer: &[u8]) -> Result<()> { - let hr = ((*self.lpVtbl).Write)(self, buffer.len() as u32, buffer.as_ptr() as *mut _); + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn write_partial(&mut self, buffer: &[u8]) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).WritePartial)(self, buffer.len() as u32, buffer.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_user_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn read(&mut self, bufferSize: u32, buffer: *mut u8) -> Result<()> { - let hr = ((*self.lpVtbl).Read)(self, bufferSize, buffer); + #[inline] pub unsafe fn set_user_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_UserName)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn read_partial(&mut self, bufferSize: u32, buffer: *mut u8) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).ReadPartial)(self, bufferSize, buffer, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_remote_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn write_read(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { - let hr = ((*self.lpVtbl).WriteRead)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); + #[inline] pub unsafe fn set_remote_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteId)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn write_read_partial(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).WriteReadPartial)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_target_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TargetUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_target_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } } -} // Windows.Devices.I2c.Provider -} // Windows.Devices.I2c -pub mod pwm { // Windows.Devices.Pwm -use ::prelude::*; - RT_ENUM! { enum PwmPulsePolarity: i32 { - ActiveHigh (PwmPulsePolarity_ActiveHigh) = 0, ActiveLow (PwmPulsePolarity_ActiveLow) = 1, - }} - DEFINE_IID!(IID_IPwmController, 3294583941, 53992, 17103, 155, 214, 207, 94, 208, 41, 230, 167); - RT_INTERFACE!{interface IPwmController(IPwmControllerVtbl): IInspectable(IInspectableVtbl) [IID_IPwmController] { - fn get_PinCount(&mut self, out: *mut i32) -> HRESULT, - fn get_ActualFrequency(&mut self, out: *mut f64) -> HRESULT, - fn SetDesiredFrequency(&mut self, desiredFrequency: f64, out: *mut f64) -> HRESULT, - fn get_MinFrequency(&mut self, out: *mut f64) -> HRESULT, - fn get_MaxFrequency(&mut self, out: *mut f64) -> HRESULT, - fn OpenPin(&mut self, pinNumber: i32, out: *mut *mut PwmPin) -> HRESULT + DEFINE_IID!(IID_ISocialFeedItem, 1326682795, 8050, 19763, 182, 149, 222, 62, 29, 182, 3, 23); + RT_INTERFACE!{interface ISocialFeedItem(ISocialFeedItemVtbl): IInspectable(IInspectableVtbl) [IID_ISocialFeedItem] { + fn get_Author(&mut self, out: *mut *mut SocialUserInfo) -> HRESULT, + fn get_PrimaryContent(&mut self, out: *mut *mut SocialFeedContent) -> HRESULT, + fn get_SecondaryContent(&mut self, out: *mut *mut SocialFeedContent) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_Timestamp(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_TargetUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_TargetUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Thumbnails(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_SharedItem(&mut self, out: *mut *mut SocialFeedSharedItem) -> HRESULT, + fn put_SharedItem(&mut self, value: *mut SocialFeedSharedItem) -> HRESULT, + fn get_BadgeStyle(&mut self, out: *mut SocialItemBadgeStyle) -> HRESULT, + fn put_BadgeStyle(&mut self, value: SocialItemBadgeStyle) -> HRESULT, + fn get_BadgeCountValue(&mut self, out: *mut i32) -> HRESULT, + fn put_BadgeCountValue(&mut self, value: i32) -> HRESULT, + fn get_RemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RemoteId(&mut self, value: HSTRING) -> HRESULT, + fn get_ChildItem(&mut self, out: *mut *mut SocialFeedChildItem) -> HRESULT, + fn put_ChildItem(&mut self, value: *mut SocialFeedChildItem) -> HRESULT, + fn get_Style(&mut self, out: *mut SocialFeedItemStyle) -> HRESULT, + fn put_Style(&mut self, value: SocialFeedItemStyle) -> HRESULT }} - impl IPwmController { - #[inline] pub unsafe fn get_pin_count(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PinCount)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl ISocialFeedItem { + #[inline] pub unsafe fn get_author(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Author)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_actual_frequency(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ActualFrequency)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_primary_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrimaryContent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_desired_frequency(&mut self, desiredFrequency: f64) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).SetDesiredFrequency)(self, desiredFrequency, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_secondary_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecondaryContent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_min_frequency(&mut self) -> Result { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinFrequency)(self, &mut out); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_frequency(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxFrequency)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_timestamp(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_Timestamp)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn open_pin(&mut self, pinNumber: i32) -> Result> { + #[inline] pub unsafe fn get_target_uri(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).OpenPin)(self, pinNumber, &mut out); + let hr = ((*self.lpVtbl).get_TargetUri)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class PwmPin: IPwmPin} - DEFINE_IID!(IID_IPwmControllerStatics, 1113832865, 35142, 17412, 189, 72, 129, 221, 18, 74, 244, 217); - RT_INTERFACE!{static interface IPwmControllerStatics(IPwmControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPwmControllerStatics] { - fn GetControllersAsync(&mut self, provider: *mut provider::IPwmProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT - }} - impl IPwmControllerStatics { - #[inline] pub unsafe fn get_controllers_async(&mut self, provider: &provider::IPwmProvider) -> Result>>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetControllersAsync)(self, provider as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_target_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class PwmController: IPwmController} - RT_ACTIVATABLE!{IPwmControllerStatics [CLSID_PwmController]} - RT_ACTIVATABLE!{IPwmControllerStatics2 [CLSID_PwmController]} - DEFINE_CLSID!(CLSID_PwmController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,119,109,46,80,119,109,67,111,110,116,114,111,108,108,101,114,0]); - DEFINE_IID!(IID_IPwmControllerStatics2, 1157389087, 61721, 19421, 151, 173, 247, 110, 249, 134, 115, 109); - RT_INTERFACE!{static interface IPwmControllerStatics2(IPwmControllerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IPwmControllerStatics2] { - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl IPwmControllerStatics2 { - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_thumbnails(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_Thumbnails)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IPwmPin, 580333000, 50895, 18465, 183, 249, 198, 69, 79, 182, 175, 121); - RT_INTERFACE!{interface IPwmPin(IPwmPinVtbl): IInspectable(IInspectableVtbl) [IID_IPwmPin] { - fn get_Controller(&mut self, out: *mut *mut PwmController) -> HRESULT, - fn GetActiveDutyCyclePercentage(&mut self, out: *mut f64) -> HRESULT, - fn SetActiveDutyCyclePercentage(&mut self, dutyCyclePercentage: f64) -> HRESULT, - fn get_Polarity(&mut self, out: *mut PwmPulsePolarity) -> HRESULT, - fn put_Polarity(&mut self, value: PwmPulsePolarity) -> HRESULT, - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT, - fn get_IsStarted(&mut self, out: *mut bool) -> HRESULT - }} - impl IPwmPin { - #[inline] pub unsafe fn get_controller(&mut self) -> Result> { + #[inline] pub unsafe fn get_shared_item(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Controller)(self, &mut out); + let hr = ((*self.lpVtbl).get_SharedItem)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_active_duty_cycle_percentage(&mut self) -> Result { + #[inline] pub unsafe fn set_shared_item(&mut self, value: &SocialFeedSharedItem) -> Result<()> { + let hr = ((*self.lpVtbl).put_SharedItem)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_badge_style(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetActiveDutyCyclePercentage)(self, &mut out); + let hr = ((*self.lpVtbl).get_BadgeStyle)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_active_duty_cycle_percentage(&mut self, dutyCyclePercentage: f64) -> Result<()> { - let hr = ((*self.lpVtbl).SetActiveDutyCyclePercentage)(self, dutyCyclePercentage); + #[inline] pub unsafe fn set_badge_style(&mut self, value: SocialItemBadgeStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_BadgeStyle)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_polarity(&mut self) -> Result { + #[inline] pub unsafe fn get_badge_count_value(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Polarity)(self, &mut out); + let hr = ((*self.lpVtbl).get_BadgeCountValue)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_polarity(&mut self, value: PwmPulsePolarity) -> Result<()> { - let hr = ((*self.lpVtbl).put_Polarity)(self, value); + #[inline] pub unsafe fn set_badge_count_value(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_BadgeCountValue)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); + #[inline] pub unsafe fn get_remote_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_remote_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteId)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); + #[inline] pub unsafe fn get_child_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChildItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_child_item(&mut self, value: &SocialFeedChildItem) -> Result<()> { + let hr = ((*self.lpVtbl).put_ChildItem)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_started(&mut self) -> Result { + #[inline] pub unsafe fn get_style(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStarted)(self, &mut out); + let hr = ((*self.lpVtbl).get_Style)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn set_style(&mut self, value: SocialFeedItemStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_Style)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } } -pub mod provider { // Windows.Devices.Pwm.Provider -use ::prelude::*; - DEFINE_IID!(IID_IPwmControllerProvider, 318789947, 58083, 16548, 183, 217, 72, 223, 240, 55, 122, 82); - RT_INTERFACE!{interface IPwmControllerProvider(IPwmControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_IPwmControllerProvider] { - fn get_PinCount(&mut self, out: *mut i32) -> HRESULT, - fn get_ActualFrequency(&mut self, out: *mut f64) -> HRESULT, - fn SetDesiredFrequency(&mut self, frequency: f64, out: *mut f64) -> HRESULT, - fn get_MaxFrequency(&mut self, out: *mut f64) -> HRESULT, - fn get_MinFrequency(&mut self, out: *mut f64) -> HRESULT, - fn AcquirePin(&mut self, pin: i32) -> HRESULT, - fn ReleasePin(&mut self, pin: i32) -> HRESULT, - fn EnablePin(&mut self, pin: i32) -> HRESULT, - fn DisablePin(&mut self, pin: i32) -> HRESULT, - fn SetPulseParameters(&mut self, pin: i32, dutyCycle: f64, invertPolarity: bool) -> HRESULT + RT_CLASS!{class SocialUserInfo: ISocialUserInfo} + RT_CLASS!{class SocialFeedContent: ISocialFeedContent} + RT_CLASS!{class SocialItemThumbnail: ISocialItemThumbnail} + RT_CLASS!{class SocialFeedSharedItem: ISocialFeedSharedItem} + RT_CLASS!{class SocialFeedChildItem: ISocialFeedChildItem} + DEFINE_IID!(IID_ISocialFeedChildItem, 191535194, 54685, 16574, 152, 12, 72, 138, 42, 179, 10, 131); + RT_INTERFACE!{interface ISocialFeedChildItem(ISocialFeedChildItemVtbl): IInspectable(IInspectableVtbl) [IID_ISocialFeedChildItem] { + fn get_Author(&mut self, out: *mut *mut SocialUserInfo) -> HRESULT, + fn get_PrimaryContent(&mut self, out: *mut *mut SocialFeedContent) -> HRESULT, + fn get_SecondaryContent(&mut self, out: *mut *mut SocialFeedContent) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_Timestamp(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_TargetUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_TargetUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Thumbnails(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_SharedItem(&mut self, out: *mut *mut SocialFeedSharedItem) -> HRESULT, + fn put_SharedItem(&mut self, value: *mut SocialFeedSharedItem) -> HRESULT }} - impl IPwmControllerProvider { - #[inline] pub unsafe fn get_pin_count(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PinCount)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl ISocialFeedChildItem { + #[inline] pub unsafe fn get_author(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Author)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_actual_frequency(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ActualFrequency)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_primary_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrimaryContent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_desired_frequency(&mut self, frequency: f64) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).SetDesiredFrequency)(self, frequency, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_secondary_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecondaryContent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_max_frequency(&mut self) -> Result { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxFrequency)(self, &mut out); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_min_frequency(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinFrequency)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_timestamp(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_Timestamp)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn acquire_pin(&mut self, pin: i32) -> Result<()> { - let hr = ((*self.lpVtbl).AcquirePin)(self, pin); + #[inline] pub unsafe fn get_target_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TargetUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_target_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetUri)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn release_pin(&mut self, pin: i32) -> Result<()> { - let hr = ((*self.lpVtbl).ReleasePin)(self, pin); + #[inline] pub unsafe fn get_thumbnails(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnails)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_shared_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SharedItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_shared_item(&mut self, value: &SocialFeedSharedItem) -> Result<()> { + let hr = ((*self.lpVtbl).put_SharedItem)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn enable_pin(&mut self, pin: i32) -> Result<()> { - let hr = ((*self.lpVtbl).EnablePin)(self, pin); + } + DEFINE_IID!(IID_ISocialFeedSharedItem, 2080087616, 42666, 17831, 159, 246, 84, 196, 33, 5, 221, 31); + RT_INTERFACE!{interface ISocialFeedSharedItem(ISocialFeedSharedItemVtbl): IInspectable(IInspectableVtbl) [IID_ISocialFeedSharedItem] { + fn get_OriginalSource(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_OriginalSource(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Content(&mut self, out: *mut *mut SocialFeedContent) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_Timestamp(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_TargetUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_TargetUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn put_Thumbnail(&mut self, value: *mut SocialItemThumbnail) -> HRESULT, + fn get_Thumbnail(&mut self, out: *mut *mut SocialItemThumbnail) -> HRESULT + }} + impl ISocialFeedSharedItem { + #[inline] pub unsafe fn get_original_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OriginalSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_original_source(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_OriginalSource)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn disable_pin(&mut self, pin: i32) -> Result<()> { - let hr = ((*self.lpVtbl).DisablePin)(self, pin); + #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_timestamp(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_Timestamp)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_pulse_parameters(&mut self, pin: i32, dutyCycle: f64, invertPolarity: bool) -> Result<()> { - let hr = ((*self.lpVtbl).SetPulseParameters)(self, pin, dutyCycle, invertPolarity); + #[inline] pub unsafe fn get_target_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TargetUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_target_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetUri)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IPwmProvider, 2737836584, 21233, 18352, 147, 73, 102, 186, 67, 210, 89, 2); - RT_INTERFACE!{interface IPwmProvider(IPwmProviderVtbl): IInspectable(IInspectableVtbl) [IID_IPwmProvider] { - fn GetControllers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT - }} - impl IPwmProvider { - #[inline] pub unsafe fn get_controllers(&mut self) -> Result>> { + #[inline] pub unsafe fn set_thumbnail(&mut self, value: &SocialItemThumbnail) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbnail)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetControllers)(self, &mut out); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } -} // Windows.Devices.Pwm.Provider -} // Windows.Devices.Pwm -pub mod spi { // Windows.Devices.Spi + RT_CLASS!{class SocialFeedItem: ISocialFeedItem} +pub mod provider { // Windows.ApplicationModel.SocialInfo.Provider use ::prelude::*; - RT_ENUM! { enum SpiMode: i32 { - Mode0 (SpiMode_Mode0) = 0, Mode1 (SpiMode_Mode1) = 1, Mode2 (SpiMode_Mode2) = 2, Mode3 (SpiMode_Mode3) = 3, - }} - RT_ENUM! { enum SpiSharingMode: i32 { - Exclusive (SpiSharingMode_Exclusive) = 0, Shared (SpiSharingMode_Shared) = 1, + DEFINE_IID!(IID_ISocialFeedUpdater, 2047609511, 60809, 19413, 168, 217, 21, 244, 217, 134, 28, 16); + RT_INTERFACE!{interface ISocialFeedUpdater(ISocialFeedUpdaterVtbl): IInspectable(IInspectableVtbl) [IID_ISocialFeedUpdater] { + fn get_OwnerRemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Kind(&mut self, out: *mut super::SocialFeedKind) -> HRESULT, + fn get_Items(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn CommitAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - DEFINE_IID!(IID_ISpiConnectionSettingsFactory, 4288219166, 4292, 17591, 159, 234, 167, 72, 181, 164, 111, 49); - RT_INTERFACE!{static interface ISpiConnectionSettingsFactory(ISpiConnectionSettingsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISpiConnectionSettingsFactory] { - fn Create(&mut self, chipSelectLine: i32, out: *mut *mut SpiConnectionSettings) -> HRESULT + impl ISocialFeedUpdater { + #[inline] pub unsafe fn get_owner_remote_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OwnerRemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Items)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn commit_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CommitAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISocialDashboardItemUpdater, 1021222345, 18432, 18125, 134, 155, 25, 115, 236, 104, 91, 222); + RT_INTERFACE!{interface ISocialDashboardItemUpdater(ISocialDashboardItemUpdaterVtbl): IInspectable(IInspectableVtbl) [IID_ISocialDashboardItemUpdater] { + fn get_OwnerRemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Content(&mut self, out: *mut *mut super::SocialFeedContent) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn put_Timestamp(&mut self, value: ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn put_Thumbnail(&mut self, value: *mut super::SocialItemThumbnail) -> HRESULT, + fn get_Thumbnail(&mut self, out: *mut *mut super::SocialItemThumbnail) -> HRESULT, + fn CommitAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn get_TargetUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn put_TargetUri(&mut self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT }} - impl ISpiConnectionSettingsFactory { - #[inline] pub unsafe fn create(&mut self, chipSelectLine: i32) -> Result> { + impl ISocialDashboardItemUpdater { + #[inline] pub unsafe fn get_owner_remote_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, chipSelectLine, &mut out); + let hr = ((*self.lpVtbl).get_OwnerRemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_timestamp(&mut self, value: ::rt::gen::windows::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_Timestamp)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_thumbnail(&mut self, value: &super::SocialItemThumbnail) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbnail)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn commit_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CommitAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_target_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TargetUri)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn set_target_uri(&mut self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class SpiConnectionSettings: ISpiConnectionSettings [ISpiConnectionSettingsFactory] [CLSID_SpiConnectionSettings]} - DEFINE_CLSID!(CLSID_SpiConnectionSettings = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,112,105,46,83,112,105,67,111,110,110,101,99,116,105,111,110,83,101,116,116,105,110,103,115,0]); - DEFINE_IID!(IID_ISpiConnectionSettings, 1384358783, 63797, 19359, 167, 167, 58, 120, 144, 175, 165, 206); - RT_INTERFACE!{interface ISpiConnectionSettings(ISpiConnectionSettingsVtbl): IInspectable(IInspectableVtbl) [IID_ISpiConnectionSettings] { - fn get_ChipSelectLine(&mut self, out: *mut i32) -> HRESULT, - fn put_ChipSelectLine(&mut self, value: i32) -> HRESULT, - fn get_Mode(&mut self, out: *mut SpiMode) -> HRESULT, - fn put_Mode(&mut self, value: SpiMode) -> HRESULT, - fn get_DataBitLength(&mut self, out: *mut i32) -> HRESULT, - fn put_DataBitLength(&mut self, value: i32) -> HRESULT, - fn get_ClockFrequency(&mut self, out: *mut i32) -> HRESULT, - fn put_ClockFrequency(&mut self, value: i32) -> HRESULT, - fn get_SharingMode(&mut self, out: *mut SpiSharingMode) -> HRESULT, - fn put_SharingMode(&mut self, value: SpiSharingMode) -> HRESULT + DEFINE_IID!(IID_ISocialInfoProviderManagerStatics, 461956395, 30599, 18646, 170, 18, 216, 232, 244, 122, 184, 90); + RT_INTERFACE!{static interface ISocialInfoProviderManagerStatics(ISocialInfoProviderManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISocialInfoProviderManagerStatics] { + fn CreateSocialFeedUpdaterAsync(&mut self, kind: super::SocialFeedKind, mode: super::SocialFeedUpdateMode, ownerRemoteId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn CreateDashboardItemUpdaterAsync(&mut self, ownerRemoteId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn UpdateBadgeCountValue(&mut self, itemRemoteId: HSTRING, newCount: i32) -> HRESULT, + fn ReportNewContentAvailable(&mut self, contactRemoteId: HSTRING, kind: super::SocialFeedKind) -> HRESULT, + fn ProvisionAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn DeprovisionAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl ISpiConnectionSettings { - #[inline] pub unsafe fn get_chip_select_line(&mut self) -> Result { + impl ISocialInfoProviderManagerStatics { + #[inline] pub unsafe fn create_social_feed_updater_async(&mut self, kind: super::SocialFeedKind, mode: super::SocialFeedUpdateMode, ownerRemoteId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSocialFeedUpdaterAsync)(self, kind, mode, ownerRemoteId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_dashboard_item_updater_async(&mut self, ownerRemoteId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDashboardItemUpdaterAsync)(self, ownerRemoteId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_badge_count_value(&mut self, itemRemoteId: &HStringArg, newCount: i32) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateBadgeCountValue)(self, itemRemoteId.get(), newCount); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn report_new_content_available(&mut self, contactRemoteId: &HStringArg, kind: super::SocialFeedKind) -> Result<()> { + let hr = ((*self.lpVtbl).ReportNewContentAvailable)(self, contactRemoteId.get(), kind); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn provision_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProvisionAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn deprovision_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeprovisionAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SocialFeedUpdater: ISocialFeedUpdater} + RT_CLASS!{class SocialDashboardItemUpdater: ISocialDashboardItemUpdater} + RT_ACTIVATABLE!{ISocialInfoProviderManagerStatics [CLSID_SocialInfoProviderManager]} + DEFINE_CLSID!(CLSID_SocialInfoProviderManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,83,111,99,105,97,108,73,110,102,111,46,80,114,111,118,105,100,101,114,46,83,111,99,105,97,108,73,110,102,111,80,114,111,118,105,100,101,114,77,97,110,97,103,101,114,0]); +} // Windows.ApplicationModel.SocialInfo.Provider +} // Windows.ApplicationModel.SocialInfo +pub mod calls { // Windows.ApplicationModel.Calls +use ::prelude::*; + RT_STRUCT! { struct CallsVoipContract { + + }} + RT_ENUM! { enum VoipPhoneCallMedia: u32 { + None (VoipPhoneCallMedia_None) = 0, Audio (VoipPhoneCallMedia_Audio) = 1, Video (VoipPhoneCallMedia_Video) = 2, + }} + RT_ENUM! { enum VoipPhoneCallRejectReason: i32 { + UserIgnored (VoipPhoneCallRejectReason_UserIgnored) = 0, TimedOut (VoipPhoneCallRejectReason_TimedOut) = 1, OtherIncomingCall (VoipPhoneCallRejectReason_OtherIncomingCall) = 2, EmergencyCallExists (VoipPhoneCallRejectReason_EmergencyCallExists) = 3, InvalidCallState (VoipPhoneCallRejectReason_InvalidCallState) = 4, + }} + RT_ENUM! { enum VoipPhoneCallState: i32 { + Ended (VoipPhoneCallState_Ended) = 0, Held (VoipPhoneCallState_Held) = 1, Active (VoipPhoneCallState_Active) = 2, Incoming (VoipPhoneCallState_Incoming) = 3, Outgoing (VoipPhoneCallState_Outgoing) = 4, + }} + RT_ENUM! { enum VoipPhoneCallResourceReservationStatus: i32 { + Success (VoipPhoneCallResourceReservationStatus_Success) = 0, ResourcesNotAvailable (VoipPhoneCallResourceReservationStatus_ResourcesNotAvailable) = 1, + }} + DEFINE_IID!(IID_ICallStateChangeEventArgs, 3937547422, 26357, 18425, 159, 181, 69, 156, 81, 152, 199, 32); + RT_INTERFACE!{interface ICallStateChangeEventArgs(ICallStateChangeEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICallStateChangeEventArgs] { + fn get_State(&mut self, out: *mut VoipPhoneCallState) -> HRESULT + }} + impl ICallStateChangeEventArgs { + #[inline] pub unsafe fn get_state(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ChipSelectLine)(self, &mut out); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_chip_select_line(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ChipSelectLine)(self, value); + } + RT_CLASS!{class CallStateChangeEventArgs: ICallStateChangeEventArgs} + DEFINE_IID!(IID_ICallAnswerEventArgs, 4252538391, 11735, 19596, 178, 189, 149, 209, 122, 91, 183, 51); + RT_INTERFACE!{interface ICallAnswerEventArgs(ICallAnswerEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICallAnswerEventArgs] { + fn get_AcceptedMedia(&mut self, out: *mut VoipPhoneCallMedia) -> HRESULT + }} + impl ICallAnswerEventArgs { + #[inline] pub unsafe fn get_accepted_media(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AcceptedMedia)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CallAnswerEventArgs: ICallAnswerEventArgs} + DEFINE_IID!(IID_ICallRejectEventArgs, 3662150359, 5076, 19858, 161, 194, 183, 120, 17, 238, 55, 236); + RT_INTERFACE!{interface ICallRejectEventArgs(ICallRejectEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICallRejectEventArgs] { + fn get_RejectReason(&mut self, out: *mut VoipPhoneCallRejectReason) -> HRESULT + }} + impl ICallRejectEventArgs { + #[inline] pub unsafe fn get_reject_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RejectReason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CallRejectEventArgs: ICallRejectEventArgs} + DEFINE_IID!(IID_IVoipPhoneCall, 1827795354, 30612, 19034, 140, 104, 174, 135, 148, 122, 105, 144); + RT_INTERFACE!{interface IVoipPhoneCall(IVoipPhoneCallVtbl): IInspectable(IInspectableVtbl) [IID_IVoipPhoneCall] { + fn add_EndRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EndRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_HoldRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_HoldRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ResumeRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ResumeRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AnswerRequested(&mut self, acceptHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AnswerRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RejectRequested(&mut self, rejectHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RejectRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn NotifyCallHeld(&mut self) -> HRESULT, + fn NotifyCallActive(&mut self) -> HRESULT, + fn NotifyCallEnded(&mut self) -> HRESULT, + fn get_ContactName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ContactName(&mut self, value: HSTRING) -> HRESULT, + fn get_StartTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_StartTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_CallMedia(&mut self, out: *mut VoipPhoneCallMedia) -> HRESULT, + fn put_CallMedia(&mut self, value: VoipPhoneCallMedia) -> HRESULT, + fn NotifyCallReady(&mut self) -> HRESULT + }} + impl IVoipPhoneCall { + #[inline] pub unsafe fn add_end_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EndRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_end_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EndRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_mode(&mut self) -> Result { + #[inline] pub unsafe fn add_hold_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + let hr = ((*self.lpVtbl).add_HoldRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_mode(&mut self, value: SpiMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_Mode)(self, value); + #[inline] pub unsafe fn remove_hold_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_HoldRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_data_bit_length(&mut self) -> Result { + #[inline] pub unsafe fn add_resume_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DataBitLength)(self, &mut out); + let hr = ((*self.lpVtbl).add_ResumeRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_data_bit_length(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_DataBitLength)(self, value); + #[inline] pub unsafe fn remove_resume_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ResumeRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_clock_frequency(&mut self) -> Result { + #[inline] pub unsafe fn add_answer_requested(&mut self, acceptHandler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ClockFrequency)(self, &mut out); + let hr = ((*self.lpVtbl).add_AnswerRequested)(self, acceptHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_clock_frequency(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ClockFrequency)(self, value); + #[inline] pub unsafe fn remove_answer_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AnswerRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { + #[inline] pub unsafe fn add_reject_requested(&mut self, rejectHandler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); + let hr = ((*self.lpVtbl).add_RejectRequested)(self, rejectHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_sharing_mode(&mut self, value: SpiSharingMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_SharingMode)(self, value); + #[inline] pub unsafe fn remove_reject_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RejectRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_ISpiBusInfo, 2569618506, 21746, 18630, 185, 82, 156, 50, 252, 2, 198, 105); - RT_INTERFACE!{interface ISpiBusInfo(ISpiBusInfoVtbl): IInspectable(IInspectableVtbl) [IID_ISpiBusInfo] { - fn get_ChipSelectLineCount(&mut self, out: *mut i32) -> HRESULT, - fn get_MinClockFrequency(&mut self, out: *mut i32) -> HRESULT, - fn get_MaxClockFrequency(&mut self, out: *mut i32) -> HRESULT, - fn get_SupportedDataBitLengths(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT - }} - impl ISpiBusInfo { - #[inline] pub unsafe fn get_chip_select_line_count(&mut self) -> Result { + #[inline] pub unsafe fn notify_call_held(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyCallHeld)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_call_active(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyCallActive)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_call_ended(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyCallEnded)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_contact_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContactName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_contact_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContactName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_start_time(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ChipSelectLineCount)(self, &mut out); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_min_clock_frequency(&mut self) -> Result { + #[inline] pub unsafe fn set_start_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_StartTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_call_media(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinClockFrequency)(self, &mut out); + let hr = ((*self.lpVtbl).get_CallMedia)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_clock_frequency(&mut self) -> Result { + #[inline] pub unsafe fn set_call_media(&mut self, value: VoipPhoneCallMedia) -> Result<()> { + let hr = ((*self.lpVtbl).put_CallMedia)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_call_ready(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyCallReady)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class VoipPhoneCall: IVoipPhoneCall} + DEFINE_IID!(IID_IMuteChangeEventArgs, 2240143705, 3137, 17196, 129, 77, 197, 241, 253, 245, 48, 190); + RT_INTERFACE!{interface IMuteChangeEventArgs(IMuteChangeEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMuteChangeEventArgs] { + fn get_Muted(&mut self, out: *mut bool) -> HRESULT + }} + impl IMuteChangeEventArgs { + #[inline] pub unsafe fn get_muted(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxClockFrequency)(self, &mut out); + let hr = ((*self.lpVtbl).get_Muted)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_data_bit_lengths(&mut self) -> Result>> { + } + RT_CLASS!{class MuteChangeEventArgs: IMuteChangeEventArgs} + DEFINE_IID!(IID_IVoipCallCoordinator, 1326549967, 59631, 17460, 156, 95, 168, 216, 147, 250, 254, 121); + RT_INTERFACE!{interface IVoipCallCoordinator(IVoipCallCoordinatorVtbl): IInspectable(IInspectableVtbl) [IID_IVoipCallCoordinator] { + fn ReserveCallResourcesAsync(&mut self, taskEntryPoint: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_MuteStateChanged(&mut self, muteChangeHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MuteStateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn RequestNewIncomingCall(&mut self, context: HSTRING, contactName: HSTRING, contactNumber: HSTRING, contactImage: *mut super::super::foundation::Uri, serviceName: HSTRING, brandingImage: *mut super::super::foundation::Uri, callDetails: HSTRING, ringtone: *mut super::super::foundation::Uri, media: VoipPhoneCallMedia, ringTimeout: super::super::foundation::TimeSpan, out: *mut *mut VoipPhoneCall) -> HRESULT, + fn RequestNewOutgoingCall(&mut self, context: HSTRING, contactName: HSTRING, serviceName: HSTRING, media: VoipPhoneCallMedia, out: *mut *mut VoipPhoneCall) -> HRESULT, + fn NotifyMuted(&mut self) -> HRESULT, + fn NotifyUnmuted(&mut self) -> HRESULT, + fn RequestOutgoingUpgradeToVideoCall(&mut self, callUpgradeGuid: Guid, context: HSTRING, contactName: HSTRING, serviceName: HSTRING, out: *mut *mut VoipPhoneCall) -> HRESULT, + fn RequestIncomingUpgradeToVideoCall(&mut self, context: HSTRING, contactName: HSTRING, contactNumber: HSTRING, contactImage: *mut super::super::foundation::Uri, serviceName: HSTRING, brandingImage: *mut super::super::foundation::Uri, callDetails: HSTRING, ringtone: *mut super::super::foundation::Uri, ringTimeout: super::super::foundation::TimeSpan, out: *mut *mut VoipPhoneCall) -> HRESULT, + fn TerminateCellularCall(&mut self, callUpgradeGuid: Guid) -> HRESULT, + fn CancelUpgrade(&mut self, callUpgradeGuid: Guid) -> HRESULT + }} + impl IVoipCallCoordinator { + #[inline] pub unsafe fn reserve_call_resources_async(&mut self, taskEntryPoint: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedDataBitLengths)(self, &mut out); + let hr = ((*self.lpVtbl).ReserveCallResourcesAsync)(self, taskEntryPoint.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class SpiBusInfo: ISpiBusInfo} - DEFINE_IID!(IID_ISpiDeviceStatics, 2725832025, 22304, 19775, 189, 147, 86, 245, 255, 90, 88, 121); - RT_INTERFACE!{static interface ISpiDeviceStatics(ISpiDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpiDeviceStatics] { - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromFriendlyName(&mut self, friendlyName: HSTRING, out: *mut HSTRING) -> HRESULT, - fn GetBusInfo(&mut self, busId: HSTRING, out: *mut *mut SpiBusInfo) -> HRESULT, - fn FromIdAsync(&mut self, busId: HSTRING, settings: *mut SpiConnectionSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl ISpiDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + #[inline] pub unsafe fn add_mute_state_changed(&mut self, muteChangeHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MuteStateChanged)(self, muteChangeHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_mute_state_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MuteStateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn request_new_incoming_call(&mut self, context: &HStringArg, contactName: &HStringArg, contactNumber: &HStringArg, contactImage: &super::super::foundation::Uri, serviceName: &HStringArg, brandingImage: &super::super::foundation::Uri, callDetails: &HStringArg, ringtone: &super::super::foundation::Uri, media: VoipPhoneCallMedia, ringTimeout: super::super::foundation::TimeSpan) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).RequestNewIncomingCall)(self, context.get(), contactName.get(), contactNumber.get(), contactImage as *const _ as *mut _, serviceName.get(), brandingImage as *const _ as *mut _, callDetails.get(), ringtone as *const _ as *mut _, media, ringTimeout, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_friendly_name(&mut self, friendlyName: &HStringArg) -> Result { + #[inline] pub unsafe fn request_new_outgoing_call(&mut self, context: &HStringArg, contactName: &HStringArg, serviceName: &HStringArg, media: VoipPhoneCallMedia) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromFriendlyName)(self, friendlyName.get(), &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).RequestNewOutgoingCall)(self, context.get(), contactName.get(), serviceName.get(), media, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_bus_info(&mut self, busId: &HStringArg) -> Result> { + #[inline] pub unsafe fn notify_muted(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyMuted)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_unmuted(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyUnmuted)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn request_outgoing_upgrade_to_video_call(&mut self, callUpgradeGuid: Guid, context: &HStringArg, contactName: &HStringArg, serviceName: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetBusInfo)(self, busId.get(), &mut out); + let hr = ((*self.lpVtbl).RequestOutgoingUpgradeToVideoCall)(self, callUpgradeGuid, context.get(), contactName.get(), serviceName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, busId: &HStringArg, settings: &SpiConnectionSettings) -> Result>> { + #[inline] pub unsafe fn request_incoming_upgrade_to_video_call(&mut self, context: &HStringArg, contactName: &HStringArg, contactNumber: &HStringArg, contactImage: &super::super::foundation::Uri, serviceName: &HStringArg, brandingImage: &super::super::foundation::Uri, callDetails: &HStringArg, ringtone: &super::super::foundation::Uri, ringTimeout: super::super::foundation::TimeSpan) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, busId.get(), settings as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).RequestIncomingUpgradeToVideoCall)(self, context.get(), contactName.get(), contactNumber.get(), contactImage as *const _ as *mut _, serviceName.get(), brandingImage as *const _ as *mut _, callDetails.get(), ringtone as *const _ as *mut _, ringTimeout, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn terminate_cellular_call(&mut self, callUpgradeGuid: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).TerminateCellularCall)(self, callUpgradeGuid); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn cancel_upgrade(&mut self, callUpgradeGuid: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).CancelUpgrade)(self, callUpgradeGuid); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class SpiDevice: ISpiDevice} - RT_ACTIVATABLE!{ISpiDeviceStatics [CLSID_SpiDevice]} - DEFINE_CLSID!(CLSID_SpiDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,112,105,46,83,112,105,68,101,118,105,99,101,0]); - DEFINE_IID!(IID_ISpiController, 2832451625, 39061, 16729, 169, 52, 135, 65, 241, 238, 109, 39); - RT_INTERFACE!{interface ISpiController(ISpiControllerVtbl): IInspectable(IInspectableVtbl) [IID_ISpiController] { - fn GetDevice(&mut self, settings: *mut SpiConnectionSettings, out: *mut *mut SpiDevice) -> HRESULT + RT_CLASS!{class VoipCallCoordinator: IVoipCallCoordinator} + RT_ACTIVATABLE!{IVoipCallCoordinatorStatics [CLSID_VoipCallCoordinator]} + DEFINE_CLSID!(CLSID_VoipCallCoordinator = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,97,108,108,115,46,86,111,105,112,67,97,108,108,67,111,111,114,100,105,110,97,116,111,114,0]); + DEFINE_IID!(IID_IVoipCallCoordinatorStatics, 2136809259, 57418, 19728, 179, 26, 165, 92, 146, 44, 194, 251); + RT_INTERFACE!{static interface IVoipCallCoordinatorStatics(IVoipCallCoordinatorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IVoipCallCoordinatorStatics] { + fn GetDefault(&mut self, out: *mut *mut VoipCallCoordinator) -> HRESULT }} - impl ISpiController { - #[inline] pub unsafe fn get_device(&mut self, settings: &SpiConnectionSettings) -> Result> { + impl IVoipCallCoordinatorStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDevice)(self, settings as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ISpiControllerStatics, 223488482, 5003, 20040, 185, 100, 79, 47, 121, 185, 197, 162); - RT_INTERFACE!{static interface ISpiControllerStatics(ISpiControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpiControllerStatics] { - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetControllersAsync(&mut self, provider: *mut provider::ISpiProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + RT_ENUM! { enum PhoneCallHistoryEntryOtherAppReadAccess: i32 { + Full (PhoneCallHistoryEntryOtherAppReadAccess_Full) = 0, SystemOnly (PhoneCallHistoryEntryOtherAppReadAccess_SystemOnly) = 1, }} - impl ISpiControllerStatics { - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + RT_ENUM! { enum PhoneCallHistoryEntryMedia: i32 { + Audio (PhoneCallHistoryEntryMedia_Audio) = 0, Video (PhoneCallHistoryEntryMedia_Video) = 1, + }} + RT_ENUM! { enum PhoneCallHistoryEntryRawAddressKind: i32 { + PhoneNumber (PhoneCallHistoryEntryRawAddressKind_PhoneNumber) = 0, Custom (PhoneCallHistoryEntryRawAddressKind_Custom) = 1, + }} + RT_ENUM! { enum PhoneCallHistoryEntryQueryDesiredMedia: u32 { + None (PhoneCallHistoryEntryQueryDesiredMedia_None) = 0, Audio (PhoneCallHistoryEntryQueryDesiredMedia_Audio) = 1, Video (PhoneCallHistoryEntryQueryDesiredMedia_Video) = 2, All (PhoneCallHistoryEntryQueryDesiredMedia_All) = 4294967295, + }} + RT_ENUM! { enum PhoneCallHistoryStoreAccessType: i32 { + AppEntriesReadWrite (PhoneCallHistoryStoreAccessType_AppEntriesReadWrite) = 0, AllEntriesLimitedReadWrite (PhoneCallHistoryStoreAccessType_AllEntriesLimitedReadWrite) = 1, AllEntriesReadWrite (PhoneCallHistoryStoreAccessType_AllEntriesReadWrite) = 2, + }} + RT_ENUM! { enum PhoneCallHistorySourceIdKind: i32 { + CellularPhoneLineId (PhoneCallHistorySourceIdKind_CellularPhoneLineId) = 0, PackageFamilyName (PhoneCallHistorySourceIdKind_PackageFamilyName) = 1, + }} + DEFINE_IID!(IID_IPhoneCallHistoryEntry, 4205895977, 12964, 19333, 131, 209, 249, 13, 140, 35, 168, 87); + RT_INTERFACE!{interface IPhoneCallHistoryEntry(IPhoneCallHistoryEntryVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallHistoryEntry] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Address(&mut self, out: *mut *mut PhoneCallHistoryEntryAddress) -> HRESULT, + fn put_Address(&mut self, value: *mut PhoneCallHistoryEntryAddress) -> HRESULT, + fn get_Duration(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Duration(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_IsCallerIdBlocked(&mut self, out: *mut bool) -> HRESULT, + fn put_IsCallerIdBlocked(&mut self, value: bool) -> HRESULT, + fn get_IsEmergency(&mut self, out: *mut bool) -> HRESULT, + fn put_IsEmergency(&mut self, value: bool) -> HRESULT, + fn get_IsIncoming(&mut self, out: *mut bool) -> HRESULT, + fn put_IsIncoming(&mut self, value: bool) -> HRESULT, + fn get_IsMissed(&mut self, out: *mut bool) -> HRESULT, + fn put_IsMissed(&mut self, value: bool) -> HRESULT, + fn get_IsRinging(&mut self, out: *mut bool) -> HRESULT, + fn put_IsRinging(&mut self, value: bool) -> HRESULT, + fn get_IsSeen(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSeen(&mut self, value: bool) -> HRESULT, + fn get_IsSuppressed(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSuppressed(&mut self, value: bool) -> HRESULT, + fn get_IsVoicemail(&mut self, out: *mut bool) -> HRESULT, + fn put_IsVoicemail(&mut self, value: bool) -> HRESULT, + fn get_Media(&mut self, out: *mut PhoneCallHistoryEntryMedia) -> HRESULT, + fn put_Media(&mut self, value: PhoneCallHistoryEntryMedia) -> HRESULT, + fn get_OtherAppReadAccess(&mut self, out: *mut PhoneCallHistoryEntryOtherAppReadAccess) -> HRESULT, + fn put_OtherAppReadAccess(&mut self, value: PhoneCallHistoryEntryOtherAppReadAccess) -> HRESULT, + fn get_RemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RemoteId(&mut self, value: HSTRING) -> HRESULT, + fn get_SourceDisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SourceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SourceId(&mut self, value: HSTRING) -> HRESULT, + fn get_SourceIdKind(&mut self, out: *mut PhoneCallHistorySourceIdKind) -> HRESULT, + fn put_SourceIdKind(&mut self, value: PhoneCallHistorySourceIdKind) -> HRESULT, + fn get_StartTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_StartTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT + }} + impl IPhoneCallHistoryEntry { + #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_controllers_async(&mut self, provider: &provider::ISpiProvider) -> Result>>> { + #[inline] pub unsafe fn get_address(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetControllersAsync)(self, provider as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Address)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class SpiController: ISpiController} - RT_ACTIVATABLE!{ISpiControllerStatics [CLSID_SpiController]} - DEFINE_CLSID!(CLSID_SpiController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,112,105,46,83,112,105,67,111,110,116,114,111,108,108,101,114,0]); - DEFINE_IID!(IID_ISpiDevice, 97858925, 4534, 19769, 132, 213, 149, 223, 180, 201, 242, 206); - RT_INTERFACE!{interface ISpiDevice(ISpiDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ISpiDevice] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ConnectionSettings(&mut self, out: *mut *mut SpiConnectionSettings) -> HRESULT, - fn Write(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, - fn Read(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, - fn TransferSequential(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT, - fn TransferFullDuplex(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT - }} - impl ISpiDevice { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_address(&mut self, value: &PhoneCallHistoryEntryAddress) -> Result<()> { + let hr = ((*self.lpVtbl).put_Address)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_connection_settings(&mut self) -> Result> { + #[inline] pub unsafe fn get_duration(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ConnectionSettings)(self, &mut out); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn write(&mut self, buffer: &[u8]) -> Result<()> { - let hr = ((*self.lpVtbl).Write)(self, buffer.len() as u32, buffer.as_ptr() as *mut _); + #[inline] pub unsafe fn set_duration(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Duration)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn read(&mut self, bufferSize: u32, buffer: *mut u8) -> Result<()> { - let hr = ((*self.lpVtbl).Read)(self, bufferSize, buffer); + #[inline] pub unsafe fn get_is_caller_id_blocked(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCallerIdBlocked)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_caller_id_blocked(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsCallerIdBlocked)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn transfer_sequential(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { - let hr = ((*self.lpVtbl).TransferSequential)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); + #[inline] pub unsafe fn get_is_emergency(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEmergency)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_emergency(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsEmergency)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn transfer_full_duplex(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { - let hr = ((*self.lpVtbl).TransferFullDuplex)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); + #[inline] pub unsafe fn get_is_incoming(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsIncoming)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_incoming(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsIncoming)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } -pub mod provider { // Windows.Devices.Spi.Provider -use ::prelude::*; - RT_ENUM! { enum ProviderSpiMode: i32 { - Mode0 (ProviderSpiMode_Mode0) = 0, Mode1 (ProviderSpiMode_Mode1) = 1, Mode2 (ProviderSpiMode_Mode2) = 2, Mode3 (ProviderSpiMode_Mode3) = 3, - }} - RT_ENUM! { enum ProviderSpiSharingMode: i32 { - Exclusive (ProviderSpiSharingMode_Exclusive) = 0, Shared (ProviderSpiSharingMode_Shared) = 1, - }} - DEFINE_IID!(IID_IProviderSpiConnectionSettingsFactory, 1715825498, 3193, 17379, 159, 60, 229, 151, 128, 172, 24, 250); - RT_INTERFACE!{static interface IProviderSpiConnectionSettingsFactory(IProviderSpiConnectionSettingsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IProviderSpiConnectionSettingsFactory] { - fn Create(&mut self, chipSelectLine: i32, out: *mut *mut ProviderSpiConnectionSettings) -> HRESULT - }} - impl IProviderSpiConnectionSettingsFactory { - #[inline] pub unsafe fn create(&mut self, chipSelectLine: i32) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, chipSelectLine, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_is_missed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsMissed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class ProviderSpiConnectionSettings: IProviderSpiConnectionSettings [IProviderSpiConnectionSettingsFactory] [CLSID_ProviderSpiConnectionSettings]} - DEFINE_CLSID!(CLSID_ProviderSpiConnectionSettings = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,112,105,46,80,114,111,118,105,100,101,114,46,80,114,111,118,105,100,101,114,83,112,105,67,111,110,110,101,99,116,105,111,110,83,101,116,116,105,110,103,115,0]); - DEFINE_IID!(IID_IProviderSpiConnectionSettings, 4127409488, 42306, 20160, 150, 1, 164, 221, 104, 248, 105, 123); - RT_INTERFACE!{interface IProviderSpiConnectionSettings(IProviderSpiConnectionSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IProviderSpiConnectionSettings] { - fn get_ChipSelectLine(&mut self, out: *mut i32) -> HRESULT, - fn put_ChipSelectLine(&mut self, value: i32) -> HRESULT, - fn get_Mode(&mut self, out: *mut ProviderSpiMode) -> HRESULT, - fn put_Mode(&mut self, value: ProviderSpiMode) -> HRESULT, - fn get_DataBitLength(&mut self, out: *mut i32) -> HRESULT, - fn put_DataBitLength(&mut self, value: i32) -> HRESULT, - fn get_ClockFrequency(&mut self, out: *mut i32) -> HRESULT, - fn put_ClockFrequency(&mut self, value: i32) -> HRESULT, - fn get_SharingMode(&mut self, out: *mut ProviderSpiSharingMode) -> HRESULT, - fn put_SharingMode(&mut self, value: ProviderSpiSharingMode) -> HRESULT - }} - impl IProviderSpiConnectionSettings { - #[inline] pub unsafe fn get_chip_select_line(&mut self) -> Result { + #[inline] pub unsafe fn set_is_missed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsMissed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_ringing(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ChipSelectLine)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsRinging)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_chip_select_line(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ChipSelectLine)(self, value); + #[inline] pub unsafe fn set_is_ringing(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsRinging)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_mode(&mut self) -> Result { + #[inline] pub unsafe fn get_is_seen(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsSeen)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_mode(&mut self, value: ProviderSpiMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_Mode)(self, value); + #[inline] pub unsafe fn set_is_seen(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSeen)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_data_bit_length(&mut self) -> Result { + #[inline] pub unsafe fn get_is_suppressed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DataBitLength)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsSuppressed)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_data_bit_length(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_DataBitLength)(self, value); + #[inline] pub unsafe fn set_is_suppressed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSuppressed)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_clock_frequency(&mut self) -> Result { + #[inline] pub unsafe fn get_is_voicemail(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ClockFrequency)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsVoicemail)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_clock_frequency(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ClockFrequency)(self, value); + #[inline] pub unsafe fn set_is_voicemail(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsVoicemail)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { + #[inline] pub unsafe fn get_media(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_Media)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_sharing_mode(&mut self, value: ProviderSpiSharingMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_SharingMode)(self, value); + #[inline] pub unsafe fn set_media(&mut self, value: PhoneCallHistoryEntryMedia) -> Result<()> { + let hr = ((*self.lpVtbl).put_Media)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_ISpiControllerProvider, 3244844292, 718, 16934, 163, 133, 79, 17, 251, 4, 180, 27); - RT_INTERFACE!{interface ISpiControllerProvider(ISpiControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_ISpiControllerProvider] { - fn GetDeviceProvider(&mut self, settings: *mut ProviderSpiConnectionSettings, out: *mut *mut ISpiDeviceProvider) -> HRESULT - }} - impl ISpiControllerProvider { - #[inline] pub unsafe fn get_device_provider(&mut self, settings: &ProviderSpiConnectionSettings) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceProvider)(self, settings as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_other_app_read_access(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OtherAppReadAccess)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_ISpiProvider, 2528403938, 30676, 18638, 170, 160, 117, 113, 90, 131, 98, 207); - RT_INTERFACE!{interface ISpiProvider(ISpiProviderVtbl): IInspectable(IInspectableVtbl) [IID_ISpiProvider] { - fn GetControllersAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT - }} - impl ISpiProvider { - #[inline] pub unsafe fn get_controllers_async(&mut self) -> Result>>> { + #[inline] pub unsafe fn set_other_app_read_access(&mut self, value: PhoneCallHistoryEntryOtherAppReadAccess) -> Result<()> { + let hr = ((*self.lpVtbl).put_OtherAppReadAccess)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetControllersAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_RemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_ISpiDeviceProvider, 219952195, 12363, 16476, 180, 247, 245, 171, 16, 116, 70, 30); - RT_INTERFACE!{interface ISpiDeviceProvider(ISpiDeviceProviderVtbl): IInspectable(IInspectableVtbl) [IID_ISpiDeviceProvider] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ConnectionSettings(&mut self, out: *mut *mut ProviderSpiConnectionSettings) -> HRESULT, - fn Write(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, - fn Read(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, - fn TransferSequential(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT, - fn TransferFullDuplex(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT - }} - impl ISpiDeviceProvider { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn set_remote_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source_display_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_SourceDisplayName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_connection_settings(&mut self) -> Result> { + #[inline] pub unsafe fn get_source_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ConnectionSettings)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_SourceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn write(&mut self, buffer: &[u8]) -> Result<()> { - let hr = ((*self.lpVtbl).Write)(self, buffer.len() as u32, buffer.as_ptr() as *mut _); + #[inline] pub unsafe fn set_source_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SourceId)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn read(&mut self, bufferSize: u32, buffer: *mut u8) -> Result<()> { - let hr = ((*self.lpVtbl).Read)(self, bufferSize, buffer); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_source_id_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SourceIdKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn transfer_sequential(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { - let hr = ((*self.lpVtbl).TransferSequential)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); + #[inline] pub unsafe fn set_source_id_kind(&mut self, value: PhoneCallHistorySourceIdKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_SourceIdKind)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn transfer_full_duplex(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { - let hr = ((*self.lpVtbl).TransferFullDuplex)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); + #[inline] pub unsafe fn get_start_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_start_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_StartTime)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } } -} // Windows.Devices.Spi.Provider -} // Windows.Devices.Spi -pub mod custom { // Windows.Devices.Custom -use ::prelude::*; - RT_STRUCT! { struct CustomDeviceContract { - - }} - DEFINE_IID!(IID_IKnownDeviceTypesStatics, 3998513602, 21576, 17882, 173, 27, 36, 148, 140, 35, 144, 148); - RT_INTERFACE!{static interface IKnownDeviceTypesStatics(IKnownDeviceTypesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownDeviceTypesStatics] { - fn get_Unknown(&mut self, out: *mut u16) -> HRESULT + RT_CLASS!{class PhoneCallHistoryEntryAddress: IPhoneCallHistoryEntryAddress [IPhoneCallHistoryEntryAddressFactory] [CLSID_PhoneCallHistoryEntryAddress]} + DEFINE_CLSID!(CLSID_PhoneCallHistoryEntryAddress = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,97,108,108,115,46,80,104,111,110,101,67,97,108,108,72,105,115,116,111,114,121,69,110,116,114,121,65,100,100,114,101,115,115,0]); + DEFINE_IID!(IID_IPhoneCallHistoryEntryAddress, 821123546, 14677, 16450, 132, 230, 102, 238, 191, 130, 230, 127); + RT_INTERFACE!{interface IPhoneCallHistoryEntryAddress(IPhoneCallHistoryEntryAddressVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallHistoryEntryAddress] { + fn get_ContactId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ContactId(&mut self, value: HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_RawAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RawAddress(&mut self, value: HSTRING) -> HRESULT, + fn get_RawAddressKind(&mut self, out: *mut PhoneCallHistoryEntryRawAddressKind) -> HRESULT, + fn put_RawAddressKind(&mut self, value: PhoneCallHistoryEntryRawAddressKind) -> HRESULT }} - impl IKnownDeviceTypesStatics { - #[inline] pub unsafe fn get_unknown(&mut self) -> Result { + impl IPhoneCallHistoryEntryAddress { + #[inline] pub unsafe fn get_contact_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContactId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_contact_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContactId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_raw_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RawAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_raw_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RawAddress)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_raw_address_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Unknown)(self, &mut out); + let hr = ((*self.lpVtbl).get_RawAddressKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn set_raw_address_kind(&mut self, value: PhoneCallHistoryEntryRawAddressKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_RawAddressKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_ACTIVATABLE!{IKnownDeviceTypesStatics [CLSID_KnownDeviceTypes]} - DEFINE_CLSID!(CLSID_KnownDeviceTypes = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,67,117,115,116,111,109,46,75,110,111,119,110,68,101,118,105,99,101,84,121,112,101,115,0]); - RT_ENUM! { enum IOControlAccessMode: i32 { - Any (IOControlAccessMode_Any) = 0, Read (IOControlAccessMode_Read) = 1, Write (IOControlAccessMode_Write) = 2, ReadWrite (IOControlAccessMode_ReadWrite) = 3, - }} - RT_ENUM! { enum IOControlBufferingMethod: i32 { - Buffered (IOControlBufferingMethod_Buffered) = 0, DirectInput (IOControlBufferingMethod_DirectInput) = 1, DirectOutput (IOControlBufferingMethod_DirectOutput) = 2, Neither (IOControlBufferingMethod_Neither) = 3, - }} - DEFINE_IID!(IID_IIOControlCode, 244668903, 24776, 17269, 167, 97, 127, 136, 8, 6, 108, 96); - RT_INTERFACE!{interface IIOControlCode(IIOControlCodeVtbl): IInspectable(IInspectableVtbl) [IID_IIOControlCode] { - fn get_AccessMode(&mut self, out: *mut IOControlAccessMode) -> HRESULT, - fn get_BufferingMethod(&mut self, out: *mut IOControlBufferingMethod) -> HRESULT, - fn get_Function(&mut self, out: *mut u16) -> HRESULT, - fn get_DeviceType(&mut self, out: *mut u16) -> HRESULT, - fn get_ControlCode(&mut self, out: *mut u32) -> HRESULT + DEFINE_IID!(IID_IPhoneCallHistoryEntryAddressFactory, 4212108730, 51184, 19382, 159, 107, 186, 93, 115, 32, 154, 202); + RT_INTERFACE!{static interface IPhoneCallHistoryEntryAddressFactory(IPhoneCallHistoryEntryAddressFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallHistoryEntryAddressFactory] { + fn Create(&mut self, rawAddress: HSTRING, rawAddressKind: PhoneCallHistoryEntryRawAddressKind, out: *mut *mut PhoneCallHistoryEntryAddress) -> HRESULT }} - impl IIOControlCode { - #[inline] pub unsafe fn get_access_mode(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AccessMode)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffering_method(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BufferingMethod)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IPhoneCallHistoryEntryAddressFactory { + #[inline] pub unsafe fn create(&mut self, rawAddress: &HStringArg, rawAddressKind: PhoneCallHistoryEntryRawAddressKind) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, rawAddress.get(), rawAddressKind, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_function(&mut self) -> Result { + } + DEFINE_IID!(IID_IPhoneCallHistoryEntryQueryOptions, 2623529308, 35821, 16586, 176, 110, 196, 202, 142, 174, 92, 135); + RT_INTERFACE!{interface IPhoneCallHistoryEntryQueryOptions(IPhoneCallHistoryEntryQueryOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallHistoryEntryQueryOptions] { + fn get_DesiredMedia(&mut self, out: *mut PhoneCallHistoryEntryQueryDesiredMedia) -> HRESULT, + fn put_DesiredMedia(&mut self, value: PhoneCallHistoryEntryQueryDesiredMedia) -> HRESULT, + fn get_SourceIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IPhoneCallHistoryEntryQueryOptions { + #[inline] pub unsafe fn get_desired_media(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Function)(self, &mut out); + let hr = ((*self.lpVtbl).get_DesiredMedia)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DeviceType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_desired_media(&mut self, value: PhoneCallHistoryEntryQueryDesiredMedia) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredMedia)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_control_code(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ControlCode)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_source_ids(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceIds)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IIOControlCodeFactory, 2238348528, 19473, 17582, 175, 198, 184, 212, 162, 18, 120, 143); - RT_INTERFACE!{static interface IIOControlCodeFactory(IIOControlCodeFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IIOControlCodeFactory] { - fn CreateIOControlCode(&mut self, deviceType: u16, function: u16, accessMode: IOControlAccessMode, bufferingMethod: IOControlBufferingMethod, out: *mut *mut IOControlCode) -> HRESULT + DEFINE_IID!(IID_IPhoneCallHistoryEntryReader, 1642915006, 36230, 18335, 132, 4, 169, 132, 105, 32, 254, 230); + RT_INTERFACE!{interface IPhoneCallHistoryEntryReader(IPhoneCallHistoryEntryReaderVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallHistoryEntryReader] { + fn ReadBatchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT }} - impl IIOControlCodeFactory { - #[inline] pub unsafe fn create_iocontrol_code(&mut self, deviceType: u16, function: u16, accessMode: IOControlAccessMode, bufferingMethod: IOControlBufferingMethod) -> Result> { + impl IPhoneCallHistoryEntryReader { + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateIOControlCode)(self, deviceType, function, accessMode, bufferingMethod, &mut out); + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class IOControlCode: IIOControlCode [IIOControlCodeFactory] [CLSID_IOControlCode]} - DEFINE_CLSID!(CLSID_IOControlCode = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,67,117,115,116,111,109,46,73,79,67,111,110,116,114,111,108,67,111,100,101,0]); - RT_ENUM! { enum DeviceAccessMode: i32 { - Read (DeviceAccessMode_Read) = 0, Write (DeviceAccessMode_Write) = 1, ReadWrite (DeviceAccessMode_ReadWrite) = 2, - }} - RT_ENUM! { enum DeviceSharingMode: i32 { - Shared (DeviceSharingMode_Shared) = 0, Exclusive (DeviceSharingMode_Exclusive) = 1, - }} - DEFINE_IID!(IID_ICustomDeviceStatics, 3357672210, 61260, 18097, 165, 142, 238, 179, 8, 220, 137, 23); - RT_INTERFACE!{static interface ICustomDeviceStatics(ICustomDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICustomDeviceStatics] { - fn GetDeviceSelector(&mut self, classGuid: Guid, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, desiredAccess: DeviceAccessMode, sharingMode: DeviceSharingMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class PhoneCallHistoryEntry: IPhoneCallHistoryEntry} + DEFINE_IID!(IID_IPhoneCallHistoryStore, 797998520, 46094, 16939, 133, 69, 203, 25, 16, 166, 28, 82); + RT_INTERFACE!{interface IPhoneCallHistoryStore(IPhoneCallHistoryStoreVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallHistoryStore] { + fn GetEntryAsync(&mut self, callHistoryEntryId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetEntryReader(&mut self, out: *mut *mut PhoneCallHistoryEntryReader) -> HRESULT, + fn GetEntryReaderWithOptions(&mut self, queryOptions: *mut PhoneCallHistoryEntryQueryOptions, out: *mut *mut PhoneCallHistoryEntryReader) -> HRESULT, + fn SaveEntryAsync(&mut self, callHistoryEntry: *mut PhoneCallHistoryEntry, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteEntryAsync(&mut self, callHistoryEntry: *mut PhoneCallHistoryEntry, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteEntriesAsync(&mut self, callHistoryEntries: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn MarkEntryAsSeenAsync(&mut self, callHistoryEntry: *mut PhoneCallHistoryEntry, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn MarkEntriesAsSeenAsync(&mut self, callHistoryEntries: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetUnseenCountAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn MarkAllAsSeenAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetSourcesUnseenCountAsync(&mut self, sourceIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn MarkSourcesAsSeenAsync(&mut self, sourceIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT }} - impl ICustomDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&mut self, classGuid: Guid) -> Result { + impl IPhoneCallHistoryStore { + #[inline] pub unsafe fn get_entry_async(&mut self, callHistoryEntryId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, classGuid, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetEntryAsync)(self, callHistoryEntryId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg, desiredAccess: DeviceAccessMode, sharingMode: DeviceSharingMode) -> Result>> { + #[inline] pub unsafe fn get_entry_reader(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), desiredAccess, sharingMode, &mut out); + let hr = ((*self.lpVtbl).GetEntryReader)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class CustomDevice: ICustomDevice} - RT_ACTIVATABLE!{ICustomDeviceStatics [CLSID_CustomDevice]} - DEFINE_CLSID!(CLSID_CustomDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,67,117,115,116,111,109,46,67,117,115,116,111,109,68,101,118,105,99,101,0]); - DEFINE_IID!(IID_ICustomDevice, 3710919967, 50315, 17341, 188, 177, 222, 200, 143, 21, 20, 62); - RT_INTERFACE!{interface ICustomDevice(ICustomDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ICustomDevice] { - #[cfg(feature="windows.storage")] fn get_InputStream(&mut self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_OutputStream(&mut self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, - #[cfg(feature="windows.storage")] fn SendIOControlAsync(&mut self, ioControlCode: *mut IIOControlCode, inputBuffer: *mut super::super::storage::streams::IBuffer, outputBuffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows.storage")] fn TrySendIOControlAsync(&mut self, ioControlCode: *mut IIOControlCode, inputBuffer: *mut super::super::storage::streams::IBuffer, outputBuffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl ICustomDevice { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_input_stream(&mut self) -> Result> { + #[inline] pub unsafe fn get_entry_reader_with_options(&mut self, queryOptions: &PhoneCallHistoryEntryQueryOptions) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InputStream)(self, &mut out); + let hr = ((*self.lpVtbl).GetEntryReaderWithOptions)(self, queryOptions as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream(&mut self) -> Result> { + #[inline] pub unsafe fn save_entry_async(&mut self, callHistoryEntry: &PhoneCallHistoryEntry) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_OutputStream)(self, &mut out); + let hr = ((*self.lpVtbl).SaveEntryAsync)(self, callHistoryEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_iocontrol_async(&mut self, ioControlCode: &IIOControlCode, inputBuffer: &super::super::storage::streams::IBuffer, outputBuffer: &super::super::storage::streams::IBuffer) -> Result>> { + #[inline] pub unsafe fn delete_entry_async(&mut self, callHistoryEntry: &PhoneCallHistoryEntry) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SendIOControlAsync)(self, ioControlCode as *const _ as *mut _, inputBuffer as *const _ as *mut _, outputBuffer as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).DeleteEntryAsync)(self, callHistoryEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn try_send_iocontrol_async(&mut self, ioControlCode: &IIOControlCode, inputBuffer: &super::super::storage::streams::IBuffer, outputBuffer: &super::super::storage::streams::IBuffer) -> Result>> { + #[inline] pub unsafe fn delete_entries_async(&mut self, callHistoryEntries: &super::super::foundation::collections::IIterable) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TrySendIOControlAsync)(self, ioControlCode as *const _ as *mut _, inputBuffer as *const _ as *mut _, outputBuffer as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).DeleteEntriesAsync)(self, callHistoryEntries as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } -} // Windows.Devices.Custom -pub mod printers { // Windows.Devices.Printers -use ::prelude::*; - RT_STRUCT! { struct PrintersContract { - - }} - DEFINE_IID!(IID_IPrint3DDeviceStatics, 4259537418, 26573, 16823, 163, 68, 81, 80, 161, 253, 117, 181); - RT_INTERFACE!{static interface IPrint3DDeviceStatics(IPrint3DDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DDeviceStatics] { - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IPrint3DDeviceStatics { - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn mark_entry_as_seen_async(&mut self, callHistoryEntry: &PhoneCallHistoryEntry) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).MarkEntryAsSeenAsync)(self, callHistoryEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + #[inline] pub unsafe fn mark_entries_as_seen_async(&mut self, callHistoryEntries: &super::super::foundation::collections::IIterable) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).MarkEntriesAsSeenAsync)(self, callHistoryEntries as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_unseen_count_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetUnseenCountAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn mark_all_as_seen_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MarkAllAsSeenAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sources_unseen_count_async(&mut self, sourceIds: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSourcesUnseenCountAsync)(self, sourceIds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn mark_sources_as_seen_async(&mut self, sourceIds: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MarkSourcesAsSeenAsync)(self, sourceIds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class Print3DDevice: IPrint3DDevice} - RT_ACTIVATABLE!{IPrint3DDeviceStatics [CLSID_Print3DDevice]} - DEFINE_CLSID!(CLSID_Print3DDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,114,105,110,116,101,114,115,46,80,114,105,110,116,51,68,68,101,118,105,99,101,0]); - DEFINE_IID!(IID_IPrint3DDevice, 68959513, 38675, 17058, 152, 19, 125, 195, 51, 116, 40, 211); - RT_INTERFACE!{interface IPrint3DDevice(IPrint3DDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DDevice] { - fn get_PrintSchema(&mut self, out: *mut *mut PrintSchema) -> HRESULT + RT_CLASS!{class PhoneCallHistoryEntryReader: IPhoneCallHistoryEntryReader} + RT_CLASS!{class PhoneCallHistoryEntryQueryOptions: IPhoneCallHistoryEntryQueryOptions} + DEFINE_IID!(IID_IPhoneCallHistoryManagerStatics, 4121352761, 45855, 20293, 172, 142, 27, 8, 137, 60, 27, 80); + RT_INTERFACE!{static interface IPhoneCallHistoryManagerStatics(IPhoneCallHistoryManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallHistoryManagerStatics] { + fn RequestStoreAsync(&mut self, accessType: PhoneCallHistoryStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IPrint3DDevice { - #[inline] pub unsafe fn get_print_schema(&mut self) -> Result> { + impl IPhoneCallHistoryManagerStatics { + #[inline] pub unsafe fn request_store_async(&mut self, accessType: PhoneCallHistoryStoreAccessType) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PrintSchema)(self, &mut out); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PrintSchema: IPrintSchema} - DEFINE_IID!(IID_IPrintSchema, 3266937622, 9912, 19451, 129, 56, 159, 150, 44, 34, 163, 91); - RT_INTERFACE!{interface IPrintSchema(IPrintSchemaVtbl): IInspectable(IInspectableVtbl) [IID_IPrintSchema] { - #[cfg(feature="windows.storage")] fn GetDefaultPrintTicketAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows.storage")] fn GetCapabilitiesAsync(&mut self, constrainTicket: *mut super::super::storage::streams::IRandomAccessStreamWithContentType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows.storage")] fn MergeAndValidateWithDefaultPrintTicketAsync(&mut self, deltaTicket: *mut super::super::storage::streams::IRandomAccessStreamWithContentType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class PhoneCallHistoryStore: IPhoneCallHistoryStore} + DEFINE_IID!(IID_IPhoneCallHistoryManagerStatics2, 4023678192, 41691, 16776, 158, 146, 188, 60, 250, 104, 19, 207); + RT_INTERFACE!{static interface IPhoneCallHistoryManagerStatics2(IPhoneCallHistoryManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallHistoryManagerStatics2] { + #[cfg(feature="windows.system")] fn GetForUser(&mut self, user: *mut super::super::system::User, out: *mut *mut PhoneCallHistoryManagerForUser) -> HRESULT }} - impl IPrintSchema { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_default_print_ticket_async(&mut self) -> Result>> { + impl IPhoneCallHistoryManagerStatics2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user(&mut self, user: &super::super::system::User) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultPrintTicketAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetForUser)(self, user as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_capabilities_async(&mut self, constrainTicket: &super::super::storage::streams::IRandomAccessStreamWithContentType) -> Result>> { + } + RT_CLASS!{class PhoneCallHistoryManagerForUser: IPhoneCallHistoryManagerForUser} + DEFINE_IID!(IID_IPhoneCallHistoryManagerForUser, 3643131171, 62815, 17235, 157, 180, 2, 5, 165, 38, 90, 85); + RT_INTERFACE!{interface IPhoneCallHistoryManagerForUser(IPhoneCallHistoryManagerForUserVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallHistoryManagerForUser] { + fn RequestStoreAsync(&mut self, accessType: PhoneCallHistoryStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT + }} + impl IPhoneCallHistoryManagerForUser { + #[inline] pub unsafe fn request_store_async(&mut self, accessType: PhoneCallHistoryStoreAccessType) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCapabilitiesAsync)(self, constrainTicket as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn merge_and_validate_with_default_print_ticket_async(&mut self, deltaTicket: &super::super::storage::streams::IRandomAccessStreamWithContentType) -> Result>> { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).MergeAndValidateWithDefaultPrintTicketAsync)(self, deltaTicket as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } -pub mod extensions { // Windows.Devices.Printers.Extensions -use ::prelude::*; - RT_ENUM! { enum Print3DWorkflowStatus: i32 { - Abandoned (Print3DWorkflowStatus_Abandoned) = 0, Canceled (Print3DWorkflowStatus_Canceled) = 1, Failed (Print3DWorkflowStatus_Failed) = 2, Slicing (Print3DWorkflowStatus_Slicing) = 3, Submitted (Print3DWorkflowStatus_Submitted) = 4, + RT_ACTIVATABLE!{IPhoneCallHistoryManagerStatics [CLSID_PhoneCallHistoryManager]} + RT_ACTIVATABLE!{IPhoneCallHistoryManagerStatics2 [CLSID_PhoneCallHistoryManager]} + DEFINE_CLSID!(CLSID_PhoneCallHistoryManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,97,108,108,115,46,80,104,111,110,101,67,97,108,108,72,105,115,116,111,114,121,77,97,110,97,103,101,114,0]); + RT_STRUCT! { struct LockScreenCallContract { + }} - RT_ENUM! { enum Print3DWorkflowDetail: i32 { - Unknown (Print3DWorkflowDetail_Unknown) = 0, ModelExceedsPrintBed (Print3DWorkflowDetail_ModelExceedsPrintBed) = 1, UploadFailed (Print3DWorkflowDetail_UploadFailed) = 2, InvalidMaterialSelection (Print3DWorkflowDetail_InvalidMaterialSelection) = 3, InvalidModel (Print3DWorkflowDetail_InvalidModel) = 4, ModelNotManifold (Print3DWorkflowDetail_ModelNotManifold) = 5, InvalidPrintTicket (Print3DWorkflowDetail_InvalidPrintTicket) = 6, + DEFINE_IID!(IID_ILockScreenCallEndCallDeferral, 769125645, 39149, 16449, 150, 50, 80, 255, 129, 43, 119, 63); + RT_INTERFACE!{interface ILockScreenCallEndCallDeferral(ILockScreenCallEndCallDeferralVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenCallEndCallDeferral] { + fn Complete(&mut self) -> HRESULT }} - DEFINE_IID!(IID_IPrint3DWorkflowPrintRequestedEventArgs, 435734616, 23240, 19285, 138, 95, 230, 21, 103, 218, 251, 77); - RT_INTERFACE!{interface IPrint3DWorkflowPrintRequestedEventArgs(IPrint3DWorkflowPrintRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DWorkflowPrintRequestedEventArgs] { - fn get_Status(&mut self, out: *mut Print3DWorkflowStatus) -> HRESULT, - fn SetExtendedStatus(&mut self, value: Print3DWorkflowDetail) -> HRESULT, - fn SetSource(&mut self, source: *mut IInspectable) -> HRESULT, - fn SetSourceChanged(&mut self, value: bool) -> HRESULT + impl ILockScreenCallEndCallDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILockScreenCallEndRequestedEventArgs, 2173739875, 28455, 18153, 174, 182, 192, 174, 131, 228, 125, 199); + RT_INTERFACE!{interface ILockScreenCallEndRequestedEventArgs(ILockScreenCallEndRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenCallEndRequestedEventArgs] { + fn GetDeferral(&mut self, out: *mut *mut LockScreenCallEndCallDeferral) -> HRESULT, + fn get_Deadline(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT }} - impl IPrint3DWorkflowPrintRequestedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result { + impl ILockScreenCallEndRequestedEventArgs { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deadline(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_extended_status(&mut self, value: Print3DWorkflowDetail) -> Result<()> { - let hr = ((*self.lpVtbl).SetExtendedStatus)(self, value); + } + RT_CLASS!{class LockScreenCallEndCallDeferral: ILockScreenCallEndCallDeferral} + DEFINE_IID!(IID_ILockScreenCallUI, 3315006861, 29641, 18964, 176, 33, 236, 28, 80, 163, 183, 39); + RT_INTERFACE!{interface ILockScreenCallUI(ILockScreenCallUIVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenCallUI] { + fn Dismiss(&mut self) -> HRESULT, + fn add_EndRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EndRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Closed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_CallTitle(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CallTitle(&mut self, value: HSTRING) -> HRESULT + }} + impl ILockScreenCallUI { + #[inline] pub unsafe fn dismiss(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Dismiss)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_source(&mut self, source: &IInspectable) -> Result<()> { - let hr = ((*self.lpVtbl).SetSource)(self, source as *const _ as *mut _); + #[inline] pub unsafe fn add_end_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EndRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_end_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EndRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_source_changed(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).SetSourceChanged)(self, value); + #[inline] pub unsafe fn add_closed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Closed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Closed)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IPrint3DWorkflowPrinterChangedEventArgs, 1159881730, 38396, 18503, 147, 179, 19, 77, 191, 92, 96, 247); - RT_INTERFACE!{interface IPrint3DWorkflowPrinterChangedEventArgs(IPrint3DWorkflowPrinterChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DWorkflowPrinterChangedEventArgs] { - fn get_NewDeviceId(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IPrint3DWorkflowPrinterChangedEventArgs { - #[inline] pub unsafe fn get_new_device_id(&mut self) -> Result { + #[inline] pub unsafe fn get_call_title(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_NewDeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_CallTitle)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn set_call_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CallTitle)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class Print3DWorkflowPrintRequestedEventArgs: IPrint3DWorkflowPrintRequestedEventArgs} - RT_CLASS!{class Print3DWorkflowPrinterChangedEventArgs: IPrint3DWorkflowPrinterChangedEventArgs} - DEFINE_IID!(IID_IPrint3DWorkflow, 3312415933, 13929, 19046, 171, 66, 200, 21, 25, 48, 205, 52); - RT_INTERFACE!{interface IPrint3DWorkflow(IPrint3DWorkflowVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DWorkflow] { - fn get_DeviceID(&mut self, out: *mut HSTRING) -> HRESULT, - fn GetPrintModelPackage(&mut self, out: *mut *mut IInspectable) -> HRESULT, - fn get_IsPrintReady(&mut self, out: *mut bool) -> HRESULT, - fn put_IsPrintReady(&mut self, value: bool) -> HRESULT, - fn add_PrintRequested(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PrintRequested(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class LockScreenCallUI: ILockScreenCallUI} + RT_CLASS!{class LockScreenCallEndRequestedEventArgs: ILockScreenCallEndRequestedEventArgs} +pub mod background { // Windows.ApplicationModel.Calls.Background +use ::prelude::*; + RT_STRUCT! { struct CallsBackgroundContract { + }} - impl IPrint3DWorkflow { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + RT_ENUM! { enum PhoneCallBlockedReason: i32 { + InCallBlockingList (PhoneCallBlockedReason_InCallBlockingList) = 0, PrivateNumber (PhoneCallBlockedReason_PrivateNumber) = 1, UnknownNumber (PhoneCallBlockedReason_UnknownNumber) = 2, + }} + RT_ENUM! { enum PhoneTriggerType: i32 { + NewVoicemailMessage (PhoneTriggerType_NewVoicemailMessage) = 0, CallHistoryChanged (PhoneTriggerType_CallHistoryChanged) = 1, LineChanged (PhoneTriggerType_LineChanged) = 2, AirplaneModeDisabledForEmergencyCall (PhoneTriggerType_AirplaneModeDisabledForEmergencyCall) = 3, CallOriginDataRequest (PhoneTriggerType_CallOriginDataRequest) = 4, CallBlocked (PhoneTriggerType_CallBlocked) = 5, + }} + RT_ENUM! { enum PhoneLineChangeKind: i32 { + Added (PhoneLineChangeKind_Added) = 0, Removed (PhoneLineChangeKind_Removed) = 1, PropertiesChanged (PhoneLineChangeKind_PropertiesChanged) = 2, + }} + RT_ENUM! { enum PhoneLineProperties: u32 { + None (PhoneLineProperties_None) = 0, BrandingOptions (PhoneLineProperties_BrandingOptions) = 1, CanDial (PhoneLineProperties_CanDial) = 2, CellularDetails (PhoneLineProperties_CellularDetails) = 4, DisplayColor (PhoneLineProperties_DisplayColor) = 8, DisplayName (PhoneLineProperties_DisplayName) = 16, NetworkName (PhoneLineProperties_NetworkName) = 32, NetworkState (PhoneLineProperties_NetworkState) = 64, Transport (PhoneLineProperties_Transport) = 128, Voicemail (PhoneLineProperties_Voicemail) = 256, + }} + DEFINE_IID!(IID_IPhoneCallBlockedTriggerDetails, 2762379426, 58561, 17023, 134, 78, 228, 112, 71, 125, 219, 103); + RT_INTERFACE!{interface IPhoneCallBlockedTriggerDetails(IPhoneCallBlockedTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallBlockedTriggerDetails] { + fn get_PhoneNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LineId(&mut self, out: *mut Guid) -> HRESULT, + fn get_CallBlockedReason(&mut self, out: *mut PhoneCallBlockedReason) -> HRESULT + }} + impl IPhoneCallBlockedTriggerDetails { + #[inline] pub unsafe fn get_phone_number(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceID)(self, &mut out); + let hr = ((*self.lpVtbl).get_PhoneNumber)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_print_model_package(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetPrintModelPackage)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_print_ready(&mut self) -> Result { + #[inline] pub unsafe fn get_line_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsPrintReady)(self, &mut out); + let hr = ((*self.lpVtbl).get_LineId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_is_print_ready(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsPrintReady)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_print_requested(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn get_call_blocked_reason(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_PrintRequested)(self, eventHandler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CallBlockedReason)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_print_requested(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_PrintRequested)(self, eventCookie); - if hr == S_OK { Ok(()) } else { err(hr) } - } } - RT_CLASS!{class Print3DWorkflow: IPrint3DWorkflow} - DEFINE_IID!(IID_IPrint3DWorkflow2, 2728838479, 35521, 18712, 151, 65, 227, 79, 48, 4, 35, 158); - RT_INTERFACE!{interface IPrint3DWorkflow2(IPrint3DWorkflow2Vtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DWorkflow2] { - fn add_PrinterChanged(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PrinterChanged(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_IPhoneCallOriginDataRequestTriggerDetails, 1855675199, 50507, 20098, 76, 201, 227, 41, 164, 24, 69, 146); + RT_INTERFACE!{interface IPhoneCallOriginDataRequestTriggerDetails(IPhoneCallOriginDataRequestTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallOriginDataRequestTriggerDetails] { + fn get_RequestId(&mut self, out: *mut Guid) -> HRESULT, + fn get_PhoneNumber(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IPrint3DWorkflow2 { - #[inline] pub unsafe fn add_printer_changed(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + impl IPhoneCallOriginDataRequestTriggerDetails { + #[inline] pub unsafe fn get_request_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_PrinterChanged)(self, eventHandler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_RequestId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_printer_changed(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_PrinterChanged)(self, eventCookie); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_phone_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhoneNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - RT_STRUCT! { struct ExtensionsContract { - - }} - DEFINE_IID!(IID_IPrintTaskConfigurationSaveRequestedDeferral, 3914978664, 63273, 17572, 135, 29, 189, 6, 40, 105, 106, 51); - RT_INTERFACE!{interface IPrintTaskConfigurationSaveRequestedDeferral(IPrintTaskConfigurationSaveRequestedDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskConfigurationSaveRequestedDeferral] { - fn Complete(&mut self) -> HRESULT + DEFINE_IID!(IID_IPhoneNewVoicemailMessageTriggerDetails, 329826331, 47153, 18643, 139, 169, 141, 34, 166, 88, 13, 207); + RT_INTERFACE!{interface IPhoneNewVoicemailMessageTriggerDetails(IPhoneNewVoicemailMessageTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneNewVoicemailMessageTriggerDetails] { + fn get_LineId(&mut self, out: *mut Guid) -> HRESULT, + fn get_VoicemailCount(&mut self, out: *mut i32) -> HRESULT, + fn get_OperatorMessage(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IPrintTaskConfigurationSaveRequestedDeferral { - #[inline] pub unsafe fn complete(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Complete)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IPhoneNewVoicemailMessageTriggerDetails { + #[inline] pub unsafe fn get_line_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_voicemail_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VoicemailCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_operator_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OperatorMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PrintTaskConfigurationSaveRequestedDeferral: IPrintTaskConfigurationSaveRequestedDeferral} - DEFINE_IID!(IID_IPrintTaskConfigurationSaveRequest, 4004458443, 25118, 19298, 172, 119, 178, 129, 204, 224, 141, 96); - RT_INTERFACE!{interface IPrintTaskConfigurationSaveRequest(IPrintTaskConfigurationSaveRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskConfigurationSaveRequest] { - fn Cancel(&mut self) -> HRESULT, - fn Save(&mut self, printerExtensionContext: *mut IInspectable) -> HRESULT, - fn GetDeferral(&mut self, out: *mut *mut PrintTaskConfigurationSaveRequestedDeferral) -> HRESULT, - fn get_Deadline(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + DEFINE_IID!(IID_IPhoneLineChangedTriggerDetails, 3335725543, 53533, 16600, 178, 183, 228, 10, 1, 214, 98, 73); + RT_INTERFACE!{interface IPhoneLineChangedTriggerDetails(IPhoneLineChangedTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneLineChangedTriggerDetails] { + fn get_LineId(&mut self, out: *mut Guid) -> HRESULT, + fn get_ChangeType(&mut self, out: *mut PhoneLineChangeKind) -> HRESULT, + fn HasLinePropertyChanged(&mut self, lineProperty: PhoneLineProperties, out: *mut bool) -> HRESULT }} - impl IPrintTaskConfigurationSaveRequest { - #[inline] pub unsafe fn cancel(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Cancel)(self); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn save(&mut self, printerExtensionContext: &IInspectable) -> Result<()> { - let hr = ((*self.lpVtbl).Save)(self, printerExtensionContext as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IPhoneLineChangedTriggerDetails { + #[inline] pub unsafe fn get_line_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_change_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ChangeType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_deadline(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + #[inline] pub unsafe fn has_line_property_changed(&mut self, lineProperty: PhoneLineProperties) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); + let hr = ((*self.lpVtbl).HasLinePropertyChanged)(self, lineProperty, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class PrintTaskConfigurationSaveRequest: IPrintTaskConfigurationSaveRequest} - DEFINE_IID!(IID_IPrintTaskConfigurationSaveRequestedEventArgs, 3765184633, 3425, 18744, 145, 208, 150, 164, 91, 238, 132, 121); - RT_INTERFACE!{interface IPrintTaskConfigurationSaveRequestedEventArgs(IPrintTaskConfigurationSaveRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskConfigurationSaveRequestedEventArgs] { - fn get_Request(&mut self, out: *mut *mut PrintTaskConfigurationSaveRequest) -> HRESULT + RT_CLASS!{class PhoneCallBlockedTriggerDetails: IPhoneCallBlockedTriggerDetails} + RT_CLASS!{class PhoneCallOriginDataRequestTriggerDetails: IPhoneCallOriginDataRequestTriggerDetails} + RT_CLASS!{class PhoneNewVoicemailMessageTriggerDetails: IPhoneNewVoicemailMessageTriggerDetails} + RT_CLASS!{class PhoneLineChangedTriggerDetails: IPhoneLineChangedTriggerDetails} +} // Windows.ApplicationModel.Calls.Background +} // Windows.ApplicationModel.Calls +pub mod search { // Windows.ApplicationModel.Search +use ::prelude::*; + DEFINE_IID!(IID_ISearchPaneQueryLinguisticDetails, 2197505550, 2368, 19309, 184, 208, 100, 43, 48, 152, 158, 21); + RT_INTERFACE!{interface ISearchPaneQueryLinguisticDetails(ISearchPaneQueryLinguisticDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPaneQueryLinguisticDetails] { + fn get_QueryTextAlternatives(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_QueryTextCompositionStart(&mut self, out: *mut u32) -> HRESULT, + fn get_QueryTextCompositionLength(&mut self, out: *mut u32) -> HRESULT }} - impl IPrintTaskConfigurationSaveRequestedEventArgs { - #[inline] pub unsafe fn get_request(&mut self) -> Result> { + impl ISearchPaneQueryLinguisticDetails { + #[inline] pub unsafe fn get_query_text_alternatives(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + let hr = ((*self.lpVtbl).get_QueryTextAlternatives)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn get_query_text_composition_start(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_QueryTextCompositionStart)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_query_text_composition_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_QueryTextCompositionLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } } - RT_CLASS!{class PrintTaskConfigurationSaveRequestedEventArgs: IPrintTaskConfigurationSaveRequestedEventArgs} - DEFINE_IID!(IID_IPrintTaskConfiguration, 3821151313, 15012, 18565, 146, 64, 49, 31, 95, 143, 190, 157); - RT_INTERFACE!{interface IPrintTaskConfiguration(IPrintTaskConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskConfiguration] { - fn get_PrinterExtensionContext(&mut self, out: *mut *mut IInspectable) -> HRESULT, - fn add_SaveRequested(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SaveRequested(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class SearchPaneQueryLinguisticDetails: ISearchPaneQueryLinguisticDetails} + DEFINE_IID!(IID_ISearchSuggestionCollection, 842697291, 64490, 17478, 171, 188, 61, 167, 145, 95, 221, 58); + RT_INTERFACE!{interface ISearchSuggestionCollection(ISearchSuggestionCollectionVtbl): IInspectable(IInspectableVtbl) [IID_ISearchSuggestionCollection] { + fn get_Size(&mut self, out: *mut u32) -> HRESULT, + fn AppendQuerySuggestion(&mut self, text: HSTRING) -> HRESULT, + fn AppendQuerySuggestions(&mut self, suggestions: *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn AppendResultSuggestion(&mut self, text: HSTRING, detailText: HSTRING, tag: HSTRING, image: *mut super::super::storage::streams::IRandomAccessStreamReference, imageAlternateText: HSTRING) -> HRESULT, + fn AppendSearchSeparator(&mut self, label: HSTRING) -> HRESULT }} - impl IPrintTaskConfiguration { - #[inline] pub unsafe fn get_printer_extension_context(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PrinterExtensionContext)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_save_requested(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + impl ISearchSuggestionCollection { + #[inline] pub unsafe fn get_size(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SaveRequested)(self, eventHandler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_save_requested(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SaveRequested)(self, eventCookie); + #[inline] pub unsafe fn append_query_suggestion(&mut self, text: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AppendQuerySuggestion)(self, text.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn append_query_suggestions(&mut self, suggestions: &super::super::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).AppendQuerySuggestions)(self, suggestions as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn append_result_suggestion(&mut self, text: &HStringArg, detailText: &HStringArg, tag: &HStringArg, image: &super::super::storage::streams::IRandomAccessStreamReference, imageAlternateText: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AppendResultSuggestion)(self, text.get(), detailText.get(), tag.get(), image as *const _ as *mut _, imageAlternateText.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn append_search_separator(&mut self, label: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AppendSearchSeparator)(self, label.get()); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class PrintTaskConfiguration: IPrintTaskConfiguration} - DEFINE_IID!(IID_IPrintNotificationEventDetails, 3759033482, 18472, 19873, 139, 184, 134, 114, 223, 133, 21, 231); - RT_INTERFACE!{interface IPrintNotificationEventDetails(IPrintNotificationEventDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintNotificationEventDetails] { - fn get_PrinterName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_EventData(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_EventData(&mut self, value: HSTRING) -> HRESULT + RT_CLASS!{class SearchSuggestionCollection: ISearchSuggestionCollection} + DEFINE_IID!(IID_ILocalContentSuggestionSettings, 4004425826, 29757, 17774, 132, 163, 35, 240, 111, 45, 21, 215); + RT_INTERFACE!{interface ILocalContentSuggestionSettings(ILocalContentSuggestionSettingsVtbl): IInspectable(IInspectableVtbl) [IID_ILocalContentSuggestionSettings] { + fn put_Enabled(&mut self, value: bool) -> HRESULT, + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Locations(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_AqsFilter(&mut self, value: HSTRING) -> HRESULT, + fn get_AqsFilter(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PropertiesToMatch(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT }} - impl IPrintNotificationEventDetails { - #[inline] pub unsafe fn get_printer_name(&mut self) -> Result { + impl ILocalContentSuggestionSettings { + #[inline] pub unsafe fn set_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Enabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_locations(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PrinterName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Locations)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_event_data(&mut self) -> Result { + #[inline] pub unsafe fn set_aqs_filter(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AqsFilter)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_aqs_filter(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_EventData)(self, &mut out); + let hr = ((*self.lpVtbl).get_AqsFilter)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_event_data(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_EventData)(self, value.get()); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_properties_to_match(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PropertiesToMatch)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PrintNotificationEventDetails: IPrintNotificationEventDetails} - DEFINE_IID!(IID_IPrintExtensionContextStatic, 3876429761, 65401, 19108, 140, 155, 12, 147, 174, 223, 222, 138); - RT_INTERFACE!{static interface IPrintExtensionContextStatic(IPrintExtensionContextStaticVtbl): IInspectable(IInspectableVtbl) [IID_IPrintExtensionContextStatic] { - fn FromDeviceId(&mut self, deviceId: HSTRING, out: *mut *mut IInspectable) -> HRESULT + RT_CLASS!{class LocalContentSuggestionSettings: ILocalContentSuggestionSettings} + DEFINE_IID!(IID_ISearchQueryLinguisticDetailsFactory, 3402023864, 15460, 19965, 173, 159, 71, 158, 77, 64, 101, 164); + RT_INTERFACE!{static interface ISearchQueryLinguisticDetailsFactory(ISearchQueryLinguisticDetailsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISearchQueryLinguisticDetailsFactory] { + fn CreateInstance(&mut self, queryTextAlternatives: *mut super::super::foundation::collections::IIterable, queryTextCompositionStart: u32, queryTextCompositionLength: u32, out: *mut *mut SearchQueryLinguisticDetails) -> HRESULT }} - impl IPrintExtensionContextStatic { - #[inline] pub unsafe fn from_device_id(&mut self, deviceId: &HStringArg) -> Result> { + impl ISearchQueryLinguisticDetailsFactory { + #[inline] pub unsafe fn create_instance(&mut self, queryTextAlternatives: &super::super::foundation::collections::IIterable, queryTextCompositionStart: u32, queryTextCompositionLength: u32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromDeviceId)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).CreateInstance)(self, queryTextAlternatives as *const _ as *mut _, queryTextCompositionStart, queryTextCompositionLength, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_ACTIVATABLE!{IPrintExtensionContextStatic [CLSID_PrintExtensionContext]} - DEFINE_CLSID!(CLSID_PrintExtensionContext = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,114,105,110,116,101,114,115,46,69,120,116,101,110,115,105,111,110,115,46,80,114,105,110,116,69,120,116,101,110,115,105,111,110,67,111,110,116,101,120,116,0]); -} // Windows.Devices.Printers.Extensions -} // Windows.Devices.Printers -pub mod power { // Windows.Devices.Power -use ::prelude::*; - DEFINE_IID!(IID_IBattery, 3163115462, 114, 18376, 139, 93, 97, 74, 170, 122, 67, 126); - RT_INTERFACE!{interface IBattery(IBatteryVtbl): IInspectable(IInspectableVtbl) [IID_IBattery] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn GetReport(&mut self, out: *mut *mut BatteryReport) -> HRESULT, - fn add_ReportUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReportUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class SearchQueryLinguisticDetails: ISearchQueryLinguisticDetails [ISearchQueryLinguisticDetailsFactory] [CLSID_SearchQueryLinguisticDetails]} + DEFINE_CLSID!(CLSID_SearchQueryLinguisticDetails = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,83,101,97,114,99,104,46,83,101,97,114,99,104,81,117,101,114,121,76,105,110,103,117,105,115,116,105,99,68,101,116,97,105,108,115,0]); + DEFINE_IID!(IID_ISearchQueryLinguisticDetails, 1184964699, 27081, 18245, 183, 47, 168, 164, 252, 143, 36, 174); + RT_INTERFACE!{interface ISearchQueryLinguisticDetails(ISearchQueryLinguisticDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchQueryLinguisticDetails] { + fn get_QueryTextAlternatives(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_QueryTextCompositionStart(&mut self, out: *mut u32) -> HRESULT, + fn get_QueryTextCompositionLength(&mut self, out: *mut u32) -> HRESULT }} - impl IBattery { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_report(&mut self) -> Result> { + impl ISearchQueryLinguisticDetails { + #[inline] pub unsafe fn get_query_text_alternatives(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetReport)(self, &mut out); + let hr = ((*self.lpVtbl).get_QueryTextAlternatives)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_report_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_query_text_composition_start(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReportUpdated)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_QueryTextCompositionStart)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_report_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReportUpdated)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_query_text_composition_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_QueryTextCompositionLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class BatteryReport: IBatteryReport} - RT_CLASS!{class Battery: IBattery} - RT_ACTIVATABLE!{IBatteryStatics [CLSID_Battery]} - DEFINE_CLSID!(CLSID_Battery = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,119,101,114,46,66,97,116,116,101,114,121,0]); - DEFINE_IID!(IID_IBatteryReport, 3380972602, 19987, 16906, 168, 208, 36, 241, 143, 57, 84, 1); - RT_INTERFACE!{interface IBatteryReport(IBatteryReportVtbl): IInspectable(IInspectableVtbl) [IID_IBatteryReport] { - fn get_ChargeRateInMilliwatts(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_DesignCapacityInMilliwattHours(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_FullChargeCapacityInMilliwattHours(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_RemainingCapacityInMilliwattHours(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - #[cfg(feature="windows.system")] fn get_Status(&mut self, out: *mut super::super::system::power::BatteryStatus) -> HRESULT + DEFINE_IID!(IID_ISearchSuggestionsRequestDeferral, 3071645865, 49253, 17773, 168, 69, 30, 204, 236, 93, 194, 139); + RT_INTERFACE!{interface ISearchSuggestionsRequestDeferral(ISearchSuggestionsRequestDeferralVtbl): IInspectable(IInspectableVtbl) [IID_ISearchSuggestionsRequestDeferral] { + fn Complete(&mut self) -> HRESULT }} - impl IBatteryReport { - #[inline] pub unsafe fn get_charge_rate_in_milliwatts(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ChargeRateInMilliwatts)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + impl ISearchSuggestionsRequestDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_design_capacity_in_milliwatt_hours(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DesignCapacityInMilliwattHours)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + DEFINE_IID!(IID_ISearchSuggestionsRequest, 1313744551, 17637, 16441, 144, 153, 96, 0, 234, 209, 240, 198); + RT_INTERFACE!{interface ISearchSuggestionsRequest(ISearchSuggestionsRequestVtbl): IInspectable(IInspectableVtbl) [IID_ISearchSuggestionsRequest] { + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT, + fn get_SearchSuggestionCollection(&mut self, out: *mut *mut SearchSuggestionCollection) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut SearchSuggestionsRequestDeferral) -> HRESULT + }} + impl ISearchSuggestionsRequest { + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_full_charge_capacity_in_milliwatt_hours(&mut self) -> Result>> { + #[inline] pub unsafe fn get_search_suggestion_collection(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FullChargeCapacityInMilliwattHours)(self, &mut out); + let hr = ((*self.lpVtbl).get_SearchSuggestionCollection)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_remaining_capacity_in_milliwatt_hours(&mut self) -> Result>> { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RemainingCapacityInMilliwattHours)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_status(&mut self) -> Result { + } + RT_CLASS!{class SearchSuggestionsRequestDeferral: ISearchSuggestionsRequestDeferral} + RT_CLASS!{class SearchSuggestionsRequest: ISearchSuggestionsRequest} + RT_STRUCT! { struct SearchContract { + + }} + DEFINE_IID!(IID_ISearchPaneVisibilityChangedEventArgs, 1011691590, 44107, 18930, 151, 214, 2, 14, 97, 130, 203, 156); + RT_INTERFACE!{interface ISearchPaneVisibilityChangedEventArgs(ISearchPaneVisibilityChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPaneVisibilityChangedEventArgs] { + fn get_Visible(&mut self, out: *mut bool) -> HRESULT + }} + impl ISearchPaneVisibilityChangedEventArgs { + #[inline] pub unsafe fn get_visible(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_Visible)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IBatteryStatics, 2043507382, 40542, 17490, 190, 166, 223, 205, 84, 30, 89, 127); - RT_INTERFACE!{static interface IBatteryStatics(IBatteryStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBatteryStatics] { - fn get_AggregateBattery(&mut self, out: *mut *mut Battery) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class SearchPaneVisibilityChangedEventArgs: ISearchPaneVisibilityChangedEventArgs} + DEFINE_IID!(IID_ISearchPaneQueryChangedEventArgs, 1007046633, 9041, 16968, 165, 41, 113, 16, 244, 100, 167, 133); + RT_INTERFACE!{interface ISearchPaneQueryChangedEventArgs(ISearchPaneQueryChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPaneQueryChangedEventArgs] { + fn get_QueryText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LinguisticDetails(&mut self, out: *mut *mut SearchPaneQueryLinguisticDetails) -> HRESULT }} - impl IBatteryStatics { - #[inline] pub unsafe fn get_aggregate_battery(&mut self) -> Result> { + impl ISearchPaneQueryChangedEventArgs { + #[inline] pub unsafe fn get_query_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AggregateBattery)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_QueryText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn get_language(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_linguistic_details(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LinguisticDetails)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + } + RT_CLASS!{class SearchPaneQueryChangedEventArgs: ISearchPaneQueryChangedEventArgs} + DEFINE_IID!(IID_ISearchPaneQuerySubmittedEventArgs, 339453180, 59845, 18230, 145, 178, 232, 235, 156, 184, 131, 86); + RT_INTERFACE!{interface ISearchPaneQuerySubmittedEventArgs(ISearchPaneQuerySubmittedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPaneQuerySubmittedEventArgs] { + fn get_QueryText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISearchPaneQuerySubmittedEventArgs { + #[inline] pub unsafe fn get_query_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + let hr = ((*self.lpVtbl).get_QueryText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } -} // Windows.Devices.Power -pub mod sms { // Windows.Devices.Sms -use ::prelude::*; - RT_ENUM! { enum SmsMessageClass: i32 { - None (SmsMessageClass_None) = 0, Class0 (SmsMessageClass_Class0) = 1, Class1 (SmsMessageClass_Class1) = 2, Class2 (SmsMessageClass_Class2) = 3, Class3 (SmsMessageClass_Class3) = 4, + DEFINE_IID!(IID_ISearchPaneQuerySubmittedEventArgsWithLinguisticDetails, 1175229157, 19506, 17720, 164, 212, 182, 180, 64, 13, 20, 15); + RT_INTERFACE!{interface ISearchPaneQuerySubmittedEventArgsWithLinguisticDetails(ISearchPaneQuerySubmittedEventArgsWithLinguisticDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPaneQuerySubmittedEventArgsWithLinguisticDetails] { + fn get_LinguisticDetails(&mut self, out: *mut *mut SearchPaneQueryLinguisticDetails) -> HRESULT }} - RT_ENUM! { enum SmsMessageType: i32 { - Binary (SmsMessageType_Binary) = 0, Text (SmsMessageType_Text) = 1, Wap (SmsMessageType_Wap) = 2, App (SmsMessageType_App) = 3, Broadcast (SmsMessageType_Broadcast) = 4, Voicemail (SmsMessageType_Voicemail) = 5, Status (SmsMessageType_Status) = 6, + impl ISearchPaneQuerySubmittedEventArgsWithLinguisticDetails { + #[inline] pub unsafe fn get_linguistic_details(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LinguisticDetails)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SearchPaneQuerySubmittedEventArgs: ISearchPaneQuerySubmittedEventArgs} + DEFINE_IID!(IID_ISearchPaneResultSuggestionChosenEventArgs, 3358682304, 44754, 16864, 188, 224, 194, 108, 167, 79, 133, 236); + RT_INTERFACE!{interface ISearchPaneResultSuggestionChosenEventArgs(ISearchPaneResultSuggestionChosenEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPaneResultSuggestionChosenEventArgs] { + fn get_Tag(&mut self, out: *mut HSTRING) -> HRESULT }} - RT_ENUM! { enum CellularClass: i32 { - None (CellularClass_None) = 0, Gsm (CellularClass_Gsm) = 1, Cdma (CellularClass_Cdma) = 2, + impl ISearchPaneResultSuggestionChosenEventArgs { + #[inline] pub unsafe fn get_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SearchPaneResultSuggestionChosenEventArgs: ISearchPaneResultSuggestionChosenEventArgs} + DEFINE_IID!(IID_ISearchPaneSuggestionsRequestDeferral, 2697988599, 34632, 20194, 173, 68, 175, 166, 190, 153, 124, 81); + RT_INTERFACE!{interface ISearchPaneSuggestionsRequestDeferral(ISearchPaneSuggestionsRequestDeferralVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPaneSuggestionsRequestDeferral] { + fn Complete(&mut self) -> HRESULT }} - DEFINE_IID!(IID_ISmsMessageBase, 753991216, 65104, 20422, 170, 136, 76, 207, 226, 122, 41, 234); - RT_INTERFACE!{interface ISmsMessageBase(ISmsMessageBaseVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageBase] { - fn get_MessageType(&mut self, out: *mut SmsMessageType) -> HRESULT, - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_CellularClass(&mut self, out: *mut CellularClass) -> HRESULT, - fn get_MessageClass(&mut self, out: *mut SmsMessageClass) -> HRESULT, - fn get_SimIccId(&mut self, out: *mut HSTRING) -> HRESULT + impl ISearchPaneSuggestionsRequestDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISearchPaneSuggestionsRequest, 2175863580, 58721, 16531, 155, 77, 42, 212, 130, 121, 74, 83); + RT_INTERFACE!{interface ISearchPaneSuggestionsRequest(ISearchPaneSuggestionsRequestVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPaneSuggestionsRequest] { + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT, + fn get_SearchSuggestionCollection(&mut self, out: *mut *mut SearchSuggestionCollection) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut SearchPaneSuggestionsRequestDeferral) -> HRESULT }} - impl ISmsMessageBase { - #[inline] pub unsafe fn get_message_type(&mut self) -> Result { + impl ISearchPaneSuggestionsRequest { + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MessageType)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn get_search_suggestion_collection(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cellular_class(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CellularClass)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + let hr = ((*self.lpVtbl).get_SearchSuggestionCollection)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_message_class(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MessageClass)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sim_icc_id(&mut self) -> Result { + } + RT_CLASS!{class SearchPaneSuggestionsRequestDeferral: ISearchPaneSuggestionsRequestDeferral} + RT_CLASS!{class SearchPaneSuggestionsRequest: ISearchPaneSuggestionsRequest} + DEFINE_IID!(IID_ISearchPaneSuggestionsRequestedEventArgs, 3365636655, 44118, 17504, 141, 47, 128, 2, 59, 236, 79, 197); + RT_INTERFACE!{interface ISearchPaneSuggestionsRequestedEventArgs(ISearchPaneSuggestionsRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPaneSuggestionsRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut SearchPaneSuggestionsRequest) -> HRESULT + }} + impl ISearchPaneSuggestionsRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SimIccId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_ENUM! { enum SmsDataFormat: i32 { - Unknown (SmsDataFormat_Unknown) = 0, CdmaSubmit (SmsDataFormat_CdmaSubmit) = 1, GsmSubmit (SmsDataFormat_GsmSubmit) = 2, CdmaDeliver (SmsDataFormat_CdmaDeliver) = 3, GsmDeliver (SmsDataFormat_GsmDeliver) = 4, + RT_CLASS!{class SearchPaneSuggestionsRequestedEventArgs: ISearchPaneSuggestionsRequestedEventArgs} + DEFINE_IID!(IID_ISearchPaneStatics, 2507320817, 36637, 18463, 161, 91, 198, 22, 85, 241, 106, 14); + RT_INTERFACE!{static interface ISearchPaneStatics(ISearchPaneStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPaneStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut SearchPane) -> HRESULT }} - RT_ENUM! { enum SmsEncoding: i32 { - Unknown (SmsEncoding_Unknown) = 0, Optimal (SmsEncoding_Optimal) = 1, SevenBitAscii (SmsEncoding_SevenBitAscii) = 2, Unicode (SmsEncoding_Unicode) = 3, GsmSevenBit (SmsEncoding_GsmSevenBit) = 4, EightBit (SmsEncoding_EightBit) = 5, Latin (SmsEncoding_Latin) = 6, Korean (SmsEncoding_Korean) = 7, IA5 (SmsEncoding_IA5) = 8, ShiftJis (SmsEncoding_ShiftJis) = 9, LatinHebrew (SmsEncoding_LatinHebrew) = 10, + impl ISearchPaneStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SearchPane: ISearchPane} + RT_ACTIVATABLE!{ISearchPaneStatics [CLSID_SearchPane]} + RT_ACTIVATABLE!{ISearchPaneStaticsWithHideThisApplication [CLSID_SearchPane]} + DEFINE_CLSID!(CLSID_SearchPane = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,83,101,97,114,99,104,46,83,101,97,114,99,104,80,97,110,101,0]); + DEFINE_IID!(IID_ISearchPaneStaticsWithHideThisApplication, 7546928, 20721, 19715, 153, 172, 198, 100, 76, 142, 216, 181); + RT_INTERFACE!{static interface ISearchPaneStaticsWithHideThisApplication(ISearchPaneStaticsWithHideThisApplicationVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPaneStaticsWithHideThisApplication] { + fn HideThisApplication(&mut self) -> HRESULT }} - DEFINE_IID!(IID_ISmsTextMessage2, 580966547, 17749, 18261, 181, 161, 231, 253, 132, 149, 95, 141); - RT_INTERFACE!{interface ISmsTextMessage2(ISmsTextMessage2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmsTextMessage2] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_To(&mut self, value: HSTRING) -> HRESULT, - fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_Body(&mut self, value: HSTRING) -> HRESULT, - fn get_Encoding(&mut self, out: *mut SmsEncoding) -> HRESULT, - fn put_Encoding(&mut self, value: SmsEncoding) -> HRESULT, - fn get_CallbackNumber(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_CallbackNumber(&mut self, value: HSTRING) -> HRESULT, - fn get_IsDeliveryNotificationEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_IsDeliveryNotificationEnabled(&mut self, value: bool) -> HRESULT, - fn get_RetryAttemptCount(&mut self, out: *mut i32) -> HRESULT, - fn put_RetryAttemptCount(&mut self, value: i32) -> HRESULT, - fn get_TeleserviceId(&mut self, out: *mut i32) -> HRESULT, - fn get_ProtocolId(&mut self, out: *mut i32) -> HRESULT + impl ISearchPaneStaticsWithHideThisApplication { + #[inline] pub unsafe fn hide_this_application(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).HideThisApplication)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISearchPane, 4255968312, 14080, 19827, 145, 161, 47, 153, 134, 116, 35, 138); + RT_INTERFACE!{interface ISearchPane(ISearchPaneVtbl): IInspectable(IInspectableVtbl) [IID_ISearchPane] { + fn put_SearchHistoryEnabled(&mut self, value: bool) -> HRESULT, + fn get_SearchHistoryEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_SearchHistoryContext(&mut self, value: HSTRING) -> HRESULT, + fn get_SearchHistoryContext(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PlaceholderText(&mut self, value: HSTRING) -> HRESULT, + fn get_PlaceholderText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_QueryText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Visible(&mut self, out: *mut bool) -> HRESULT, + fn add_VisibilityChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisibilityChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_QueryChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_QueryChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SuggestionsRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SuggestionsRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_QuerySubmitted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_QuerySubmitted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ResultSuggestionChosen(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ResultSuggestionChosen(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn SetLocalContentSuggestionSettings(&mut self, settings: *mut LocalContentSuggestionSettings) -> HRESULT, + fn ShowOverloadDefault(&mut self) -> HRESULT, + fn ShowOverloadWithQuery(&mut self, query: HSTRING) -> HRESULT, + fn put_ShowOnKeyboardInput(&mut self, value: bool) -> HRESULT, + fn get_ShowOnKeyboardInput(&mut self, out: *mut bool) -> HRESULT, + fn TrySetQueryText(&mut self, query: HSTRING, out: *mut bool) -> HRESULT }} - impl ISmsTextMessage2 { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + impl ISearchPane { + #[inline] pub unsafe fn set_search_history_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SearchHistoryEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_search_history_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_SearchHistoryEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_to(&mut self) -> Result { + #[inline] pub unsafe fn set_search_history_context(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SearchHistoryContext)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_search_history_context(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_To)(self, &mut out); + let hr = ((*self.lpVtbl).get_SearchHistoryContext)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_to(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_To)(self, value.get()); + #[inline] pub unsafe fn set_placeholder_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlaceholderText)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_from(&mut self) -> Result { + #[inline] pub unsafe fn get_placeholder_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_From)(self, &mut out); + let hr = ((*self.lpVtbl).get_PlaceholderText)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_body(&mut self) -> Result { + #[inline] pub unsafe fn get_query_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + let hr = ((*self.lpVtbl).get_QueryText)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_body(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_Body)(self, value.get()); + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Visible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_visibility_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VisibilityChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_visibility_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VisibilityChanged)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_encoding(&mut self) -> Result { + #[inline] pub unsafe fn add_query_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Encoding)(self, &mut out); + let hr = ((*self.lpVtbl).add_QueryChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_encoding(&mut self, value: SmsEncoding) -> Result<()> { - let hr = ((*self.lpVtbl).put_Encoding)(self, value); + #[inline] pub unsafe fn remove_query_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_QueryChanged)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_callback_number(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CallbackNumber)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn add_suggestions_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SuggestionsRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_callback_number(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_CallbackNumber)(self, value.get()); + #[inline] pub unsafe fn remove_suggestions_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SuggestionsRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_delivery_notification_enabled(&mut self) -> Result { + #[inline] pub unsafe fn add_query_submitted(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDeliveryNotificationEnabled)(self, &mut out); + let hr = ((*self.lpVtbl).add_QuerySubmitted)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_is_delivery_notification_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsDeliveryNotificationEnabled)(self, value); + #[inline] pub unsafe fn remove_query_submitted(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_QuerySubmitted)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_retry_attempt_count(&mut self) -> Result { + #[inline] pub unsafe fn add_result_suggestion_chosen(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RetryAttemptCount)(self, &mut out); + let hr = ((*self.lpVtbl).add_ResultSuggestionChosen)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_retry_attempt_count(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_RetryAttemptCount)(self, value); + #[inline] pub unsafe fn remove_result_suggestion_chosen(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ResultSuggestionChosen)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_teleservice_id(&mut self) -> Result { + #[inline] pub unsafe fn set_local_content_suggestion_settings(&mut self, settings: &LocalContentSuggestionSettings) -> Result<()> { + let hr = ((*self.lpVtbl).SetLocalContentSuggestionSettings)(self, settings as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show_overload_default(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ShowOverloadDefault)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show_overload_with_query(&mut self, query: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ShowOverloadWithQuery)(self, query.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_show_on_keyboard_input(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShowOnKeyboardInput)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_show_on_keyboard_input(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TeleserviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_ShowOnKeyboardInput)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_protocol_id(&mut self) -> Result { + #[inline] pub unsafe fn try_set_query_text(&mut self, query: &HStringArg) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ProtocolId)(self, &mut out); + let hr = ((*self.lpVtbl).TrySetQueryText)(self, query.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class SmsTextMessage2: ISmsTextMessage2} - DEFINE_IID!(IID_ISmsWapMessage, 3448993603, 31317, 19771, 144, 33, 242, 46, 2, 45, 9, 197); - RT_INTERFACE!{interface ISmsWapMessage(ISmsWapMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsWapMessage] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ApplicationId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ContentType(&mut self, out: *mut HSTRING) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_BinaryBody(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn get_Headers(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT +pub mod core { // Windows.ApplicationModel.Search.Core +use ::prelude::*; + RT_STRUCT! { struct SearchCoreContract { + }} - impl ISmsWapMessage { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + RT_ENUM! { enum SearchSuggestionKind: i32 { + Query (SearchSuggestionKind_Query) = 0, Result (SearchSuggestionKind_Result) = 1, Separator (SearchSuggestionKind_Separator) = 2, + }} + DEFINE_IID!(IID_ISearchSuggestion, 1532318896, 5415, 17275, 149, 197, 141, 24, 210, 184, 175, 85); + RT_INTERFACE!{interface ISearchSuggestion(ISearchSuggestionVtbl): IInspectable(IInspectableVtbl) [IID_ISearchSuggestion] { + fn get_Kind(&mut self, out: *mut SearchSuggestionKind) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Tag(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DetailText(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Image(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_ImageAlternateText(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISearchSuggestion { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_to(&mut self) -> Result { + #[inline] pub unsafe fn get_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_To)(self, &mut out); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_from(&mut self) -> Result { + #[inline] pub unsafe fn get_tag(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_From)(self, &mut out); + let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_application_id(&mut self) -> Result { + #[inline] pub unsafe fn get_detail_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ApplicationId)(self, &mut out); + let hr = ((*self.lpVtbl).get_DetailText)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_content_type(&mut self) -> Result { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_image(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ContentType)(self, &mut out); + let hr = ((*self.lpVtbl).get_Image)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_image_alternate_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ImageAlternateText)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_binary_body(&mut self) -> Result> { + } + RT_CLASS!{class SearchSuggestion: ISearchSuggestion} + DEFINE_IID!(IID_ISearchSuggestionsRequestedEventArgs, 1876236773, 40574, 19124, 139, 227, 199, 107, 27, 212, 52, 74); + RT_INTERFACE!{interface ISearchSuggestionsRequestedEventArgs(ISearchSuggestionsRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchSuggestionsRequestedEventArgs] { + fn get_QueryText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LinguisticDetails(&mut self, out: *mut *mut super::SearchQueryLinguisticDetails) -> HRESULT, + fn get_Request(&mut self, out: *mut *mut super::SearchSuggestionsRequest) -> HRESULT + }} + impl ISearchSuggestionsRequestedEventArgs { + #[inline] pub unsafe fn get_query_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BinaryBody)(self, &mut out); + let hr = ((*self.lpVtbl).get_QueryText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_linguistic_details(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LinguisticDetails)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_headers(&mut self) -> Result>> { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Headers)(self, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class SmsWapMessage: ISmsWapMessage} - DEFINE_IID!(IID_ISmsAppMessage, 3904603284, 54176, 18954, 134, 215, 41, 16, 51, 168, 207, 84); - RT_INTERFACE!{interface ISmsAppMessage(ISmsAppMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsAppMessage] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_To(&mut self, value: HSTRING) -> HRESULT, - fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_Body(&mut self, value: HSTRING) -> HRESULT, - fn get_CallbackNumber(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_CallbackNumber(&mut self, value: HSTRING) -> HRESULT, - fn get_IsDeliveryNotificationEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_IsDeliveryNotificationEnabled(&mut self, value: bool) -> HRESULT, - fn get_RetryAttemptCount(&mut self, out: *mut i32) -> HRESULT, - fn put_RetryAttemptCount(&mut self, value: i32) -> HRESULT, - fn get_Encoding(&mut self, out: *mut SmsEncoding) -> HRESULT, - fn put_Encoding(&mut self, value: SmsEncoding) -> HRESULT, - fn get_PortNumber(&mut self, out: *mut i32) -> HRESULT, - fn put_PortNumber(&mut self, value: i32) -> HRESULT, - fn get_TeleserviceId(&mut self, out: *mut i32) -> HRESULT, - fn put_TeleserviceId(&mut self, value: i32) -> HRESULT, - fn get_ProtocolId(&mut self, out: *mut i32) -> HRESULT, - fn put_ProtocolId(&mut self, value: i32) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_BinaryBody(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - #[cfg(feature="windows.storage")] fn put_BinaryBody(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT + DEFINE_IID!(IID_IRequestingFocusOnKeyboardInputEventArgs, 2702794535, 45479, 16802, 135, 157, 106, 104, 104, 126, 89, 133); + RT_INTERFACE!{interface IRequestingFocusOnKeyboardInputEventArgs(IRequestingFocusOnKeyboardInputEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRequestingFocusOnKeyboardInputEventArgs] { + }} - impl ISmsAppMessage { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + DEFINE_IID!(IID_ISearchSuggestionManager, 1057771681, 52125, 18811, 181, 0, 60, 4, 172, 149, 154, 210); + RT_INTERFACE!{interface ISearchSuggestionManager(ISearchSuggestionManagerVtbl): IInspectable(IInspectableVtbl) [IID_ISearchSuggestionManager] { + fn get_SearchHistoryEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_SearchHistoryEnabled(&mut self, value: bool) -> HRESULT, + fn get_SearchHistoryContext(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SearchHistoryContext(&mut self, value: HSTRING) -> HRESULT, + fn SetLocalContentSuggestionSettings(&mut self, settings: *mut super::LocalContentSuggestionSettings) -> HRESULT, + fn SetQuery(&mut self, queryText: HSTRING) -> HRESULT, + fn SetQueryWithLanguage(&mut self, queryText: HSTRING, language: HSTRING) -> HRESULT, + fn SetQueryWithSearchQueryLinguisticDetails(&mut self, queryText: HSTRING, language: HSTRING, linguisticDetails: *mut super::SearchQueryLinguisticDetails) -> HRESULT, + fn get_Suggestions(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IObservableVector) -> HRESULT, + fn AddToHistory(&mut self, queryText: HSTRING) -> HRESULT, + fn AddToHistoryWithLanguage(&mut self, queryText: HSTRING, language: HSTRING) -> HRESULT, + fn ClearHistory(&mut self) -> HRESULT, + fn add_SuggestionsRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SuggestionsRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_RequestingFocusOnKeyboardInput(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RequestingFocusOnKeyboardInput(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISearchSuggestionManager { + #[inline] pub unsafe fn get_search_history_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_SearchHistoryEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_to(&mut self) -> Result { + #[inline] pub unsafe fn set_search_history_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SearchHistoryEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_search_history_context(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_To)(self, &mut out); + let hr = ((*self.lpVtbl).get_SearchHistoryContext)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_to(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_To)(self, value.get()); + #[inline] pub unsafe fn set_search_history_context(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SearchHistoryContext)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_from(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_From)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_local_content_suggestion_settings(&mut self, settings: &super::LocalContentSuggestionSettings) -> Result<()> { + let hr = ((*self.lpVtbl).SetLocalContentSuggestionSettings)(self, settings as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_body(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Body)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_query(&mut self, queryText: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetQuery)(self, queryText.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_body(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_Body)(self, value.get()); + #[inline] pub unsafe fn set_query_with_language(&mut self, queryText: &HStringArg, language: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetQueryWithLanguage)(self, queryText.get(), language.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_callback_number(&mut self) -> Result { + #[inline] pub unsafe fn set_query_with_search_query_linguistic_details(&mut self, queryText: &HStringArg, language: &HStringArg, linguisticDetails: &super::SearchQueryLinguisticDetails) -> Result<()> { + let hr = ((*self.lpVtbl).SetQueryWithSearchQueryLinguisticDetails)(self, queryText.get(), language.get(), linguisticDetails as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_suggestions(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CallbackNumber)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Suggestions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_callback_number(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_CallbackNumber)(self, value.get()); + #[inline] pub unsafe fn add_to_history(&mut self, queryText: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AddToHistory)(self, queryText.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_delivery_notification_enabled(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDeliveryNotificationEnabled)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn add_to_history_with_language(&mut self, queryText: &HStringArg, language: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AddToHistoryWithLanguage)(self, queryText.get(), language.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_is_delivery_notification_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsDeliveryNotificationEnabled)(self, value); + #[inline] pub unsafe fn clear_history(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ClearHistory)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_retry_attempt_count(&mut self) -> Result { + #[inline] pub unsafe fn add_suggestions_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RetryAttemptCount)(self, &mut out); + let hr = ((*self.lpVtbl).add_SuggestionsRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_retry_attempt_count(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_RetryAttemptCount)(self, value); + #[inline] pub unsafe fn remove_suggestions_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SuggestionsRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_encoding(&mut self) -> Result { + #[inline] pub unsafe fn add_requesting_focus_on_keyboard_input(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Encoding)(self, &mut out); + let hr = ((*self.lpVtbl).add_RequestingFocusOnKeyboardInput)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_encoding(&mut self, value: SmsEncoding) -> Result<()> { - let hr = ((*self.lpVtbl).put_Encoding)(self, value); + #[inline] pub unsafe fn remove_requesting_focus_on_keyboard_input(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RequestingFocusOnKeyboardInput)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_port_number(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PortNumber)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_port_number(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_PortNumber)(self, value); + } + RT_CLASS!{class SearchSuggestionManager: ISearchSuggestionManager} + RT_CLASS!{class SearchSuggestionsRequestedEventArgs: ISearchSuggestionsRequestedEventArgs} + RT_CLASS!{class RequestingFocusOnKeyboardInputEventArgs: IRequestingFocusOnKeyboardInputEventArgs} +} // Windows.ApplicationModel.Search.Core +} // Windows.ApplicationModel.Search +pub mod appservice { // Windows.ApplicationModel.AppService +use ::prelude::*; + RT_ENUM! { enum AppServiceClosedStatus: i32 { + Completed (AppServiceClosedStatus_Completed) = 0, Canceled (AppServiceClosedStatus_Canceled) = 1, ResourceLimitsExceeded (AppServiceClosedStatus_ResourceLimitsExceeded) = 2, Unknown (AppServiceClosedStatus_Unknown) = 3, + }} + RT_ENUM! { enum AppServiceConnectionStatus: i32 { + Success (AppServiceConnectionStatus_Success) = 0, AppNotInstalled (AppServiceConnectionStatus_AppNotInstalled) = 1, AppUnavailable (AppServiceConnectionStatus_AppUnavailable) = 2, AppServiceUnavailable (AppServiceConnectionStatus_AppServiceUnavailable) = 3, Unknown (AppServiceConnectionStatus_Unknown) = 4, RemoteSystemUnavailable (AppServiceConnectionStatus_RemoteSystemUnavailable) = 5, RemoteSystemNotSupportedByApp (AppServiceConnectionStatus_RemoteSystemNotSupportedByApp) = 6, NotAuthorized (AppServiceConnectionStatus_NotAuthorized) = 7, + }} + RT_ENUM! { enum AppServiceResponseStatus: i32 { + Success (AppServiceResponseStatus_Success) = 0, Failure (AppServiceResponseStatus_Failure) = 1, ResourceLimitsExceeded (AppServiceResponseStatus_ResourceLimitsExceeded) = 2, Unknown (AppServiceResponseStatus_Unknown) = 3, RemoteSystemUnavailable (AppServiceResponseStatus_RemoteSystemUnavailable) = 4, MessageSizeTooLarge (AppServiceResponseStatus_MessageSizeTooLarge) = 5, + }} + DEFINE_IID!(IID_IAppServiceDeferral, 2115719970, 60080, 16968, 174, 4, 253, 249, 56, 56, 228, 114); + RT_INTERFACE!{interface IAppServiceDeferral(IAppServiceDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IAppServiceDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IAppServiceDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_teleservice_id(&mut self) -> Result { + } + DEFINE_IID!(IID_IAppServiceClosedEventArgs, 3730839286, 51971, 19765, 172, 141, 204, 99, 3, 35, 151, 49); + RT_INTERFACE!{interface IAppServiceClosedEventArgs(IAppServiceClosedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppServiceClosedEventArgs] { + fn get_Status(&mut self, out: *mut AppServiceClosedStatus) -> HRESULT + }} + impl IAppServiceClosedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TeleserviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_teleservice_id(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_TeleserviceId)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IAppServiceRequestReceivedEventArgs, 1846682464, 65381, 17582, 158, 69, 133, 127, 228, 24, 6, 129); + RT_INTERFACE!{interface IAppServiceRequestReceivedEventArgs(IAppServiceRequestReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppServiceRequestReceivedEventArgs] { + fn get_Request(&mut self, out: *mut *mut AppServiceRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut AppServiceDeferral) -> HRESULT + }} + impl IAppServiceRequestReceivedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_protocol_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ProtocolId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_protocol_id(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ProtocolId)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + } + RT_CLASS!{class AppServiceRequest: IAppServiceRequest} + RT_CLASS!{class AppServiceDeferral: IAppServiceDeferral} + RT_CLASS!{class AppServiceResponse: IAppServiceResponse} + RT_CLASS!{class AppServiceConnection: IAppServiceConnection} + RT_CLASS!{class AppServiceRequestReceivedEventArgs: IAppServiceRequestReceivedEventArgs} + RT_CLASS!{class AppServiceClosedEventArgs: IAppServiceClosedEventArgs} + DEFINE_IID!(IID_IAppServiceConnection2, 2346700127, 8962, 20413, 128, 97, 82, 81, 28, 47, 139, 249); + RT_INTERFACE!{interface IAppServiceConnection2(IAppServiceConnection2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppServiceConnection2] { + #[cfg(feature="windows.system")] fn OpenRemoteAsync(&mut self, remoteSystemConnectionRequest: *mut super::super::system::remotesystems::RemoteSystemConnectionRequest, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT, + #[cfg(feature="windows.system")] fn put_User(&mut self, value: *mut super::super::system::User) -> HRESULT + }} + impl IAppServiceConnection2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn open_remote_async(&mut self, remoteSystemConnectionRequest: &super::super::system::remotesystems::RemoteSystemConnectionRequest) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenRemoteAsync)(self, remoteSystemConnectionRequest as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_binary_body(&mut self) -> Result> { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BinaryBody)(self, &mut out); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_binary_body(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_BinaryBody)(self, value as *const _ as *mut _); + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_user(&mut self, value: &super::super::system::User) -> Result<()> { + let hr = ((*self.lpVtbl).put_User)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class SmsAppMessage: ISmsAppMessage} - RT_ENUM! { enum SmsGeographicalScope: i32 { - None (SmsGeographicalScope_None) = 0, CellWithImmediateDisplay (SmsGeographicalScope_CellWithImmediateDisplay) = 1, LocationArea (SmsGeographicalScope_LocationArea) = 2, Plmn (SmsGeographicalScope_Plmn) = 3, Cell (SmsGeographicalScope_Cell) = 4, - }} - RT_ENUM! { enum SmsBroadcastType: i32 { - Other (SmsBroadcastType_Other) = 0, CmasPresidential (SmsBroadcastType_CmasPresidential) = 1, CmasExtreme (SmsBroadcastType_CmasExtreme) = 2, CmasSevere (SmsBroadcastType_CmasSevere) = 3, CmasAmber (SmsBroadcastType_CmasAmber) = 4, CmasTest (SmsBroadcastType_CmasTest) = 5, EUAlert1 (SmsBroadcastType_EUAlert1) = 6, EUAlert2 (SmsBroadcastType_EUAlert2) = 7, EUAlert3 (SmsBroadcastType_EUAlert3) = 8, EUAlertAmber (SmsBroadcastType_EUAlertAmber) = 9, EUAlertInfo (SmsBroadcastType_EUAlertInfo) = 10, EtwsEarthquake (SmsBroadcastType_EtwsEarthquake) = 11, EtwsTsunami (SmsBroadcastType_EtwsTsunami) = 12, EtwsTsunamiAndEarthquake (SmsBroadcastType_EtwsTsunamiAndEarthquake) = 13, LatAlertLocal (SmsBroadcastType_LatAlertLocal) = 14, - }} - DEFINE_IID!(IID_ISmsBroadcastMessage, 1974385649, 58551, 18548, 160, 156, 41, 86, 229, 146, 249, 87); - RT_INTERFACE!{interface ISmsBroadcastMessage(ISmsBroadcastMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsBroadcastMessage] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Channel(&mut self, out: *mut i32) -> HRESULT, - fn get_GeographicalScope(&mut self, out: *mut SmsGeographicalScope) -> HRESULT, - fn get_MessageCode(&mut self, out: *mut i32) -> HRESULT, - fn get_UpdateNumber(&mut self, out: *mut i32) -> HRESULT, - fn get_BroadcastType(&mut self, out: *mut SmsBroadcastType) -> HRESULT, - fn get_IsEmergencyAlert(&mut self, out: *mut bool) -> HRESULT, - fn get_IsUserPopupRequested(&mut self, out: *mut bool) -> HRESULT + DEFINE_IID!(IID_IAppServiceTriggerDetails, 2292374700, 44328, 16824, 128, 187, 189, 241, 178, 22, 158, 25); + RT_INTERFACE!{interface IAppServiceTriggerDetails(IAppServiceTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IAppServiceTriggerDetails] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CallerPackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppServiceConnection(&mut self, out: *mut *mut AppServiceConnection) -> HRESULT }} - impl ISmsBroadcastMessage { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_to(&mut self) -> Result { + impl IAppServiceTriggerDetails { + #[inline] pub unsafe fn get_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_To)(self, &mut out); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_body(&mut self) -> Result { + #[inline] pub unsafe fn get_caller_package_family_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + let hr = ((*self.lpVtbl).get_CallerPackageFamilyName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_channel(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_geographical_scope(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GeographicalScope)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_app_service_connection(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppServiceConnection)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_message_code(&mut self) -> Result { + } + DEFINE_IID!(IID_IAppServiceTriggerDetails2, 3896333490, 10444, 17394, 180, 101, 192, 72, 46, 89, 226, 220); + RT_INTERFACE!{interface IAppServiceTriggerDetails2(IAppServiceTriggerDetails2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppServiceTriggerDetails2] { + fn get_IsRemoteSystemConnection(&mut self, out: *mut bool) -> HRESULT + }} + impl IAppServiceTriggerDetails2 { + #[inline] pub unsafe fn get_is_remote_system_connection(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MessageCode)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsRemoteSystemConnection)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_update_number(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UpdateNumber)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IAppServiceRequest, 551914909, 6366, 19201, 128, 186, 144, 167, 98, 4, 227, 200); + RT_INTERFACE!{interface IAppServiceRequest(IAppServiceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IAppServiceRequest] { + fn get_Message(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn SendResponseAsync(&mut self, message: *mut super::super::foundation::collections::ValueSet, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IAppServiceRequest { + #[inline] pub unsafe fn get_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_broadcast_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BroadcastType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn send_response_async(&mut self, message: &super::super::foundation::collections::ValueSet) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendResponseAsync)(self, message as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_emergency_alert(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsEmergencyAlert)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IAppServiceResponse, 2370845932, 39587, 20072, 149, 89, 157, 230, 62, 55, 44, 228); + RT_INTERFACE!{interface IAppServiceResponse(IAppServiceResponseVtbl): IInspectable(IInspectableVtbl) [IID_IAppServiceResponse] { + fn get_Message(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn get_Status(&mut self, out: *mut AppServiceResponseStatus) -> HRESULT + }} + impl IAppServiceResponse { + #[inline] pub unsafe fn get_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_user_popup_requested(&mut self) -> Result { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsUserPopupRequested)(self, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class SmsBroadcastMessage: ISmsBroadcastMessage} - DEFINE_IID!(IID_ISmsVoicemailMessage, 656056486, 38321, 17663, 188, 184, 184, 253, 215, 224, 139, 195); - RT_INTERFACE!{interface ISmsVoicemailMessage(ISmsVoicemailMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsVoicemailMessage] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_MessageCount(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + DEFINE_IID!(IID_IAppServiceCatalogStatics, 4010616071, 53554, 19589, 131, 149, 60, 49, 213, 161, 233, 65); + RT_INTERFACE!{static interface IAppServiceCatalogStatics(IAppServiceCatalogStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppServiceCatalogStatics] { + fn FindAppServiceProvidersAsync(&mut self, appServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT }} - impl ISmsVoicemailMessage { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IAppServiceCatalogStatics { + #[inline] pub unsafe fn find_app_service_providers_async(&mut self, appServiceName: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAppServiceProvidersAsync)(self, appServiceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_to(&mut self) -> Result { + } + RT_CLASS!{class AppServiceTriggerDetails: IAppServiceTriggerDetails} + RT_ACTIVATABLE!{IAppServiceCatalogStatics [CLSID_AppServiceCatalog]} + DEFINE_CLSID!(CLSID_AppServiceCatalog = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,65,112,112,83,101,114,118,105,99,101,46,65,112,112,83,101,114,118,105,99,101,67,97,116,97,108,111,103,0]); + DEFINE_IID!(IID_IAppServiceConnection, 2647946402, 34591, 19794, 137, 169, 158, 9, 5, 49, 189, 39); + RT_INTERFACE!{interface IAppServiceConnection(IAppServiceConnectionVtbl): IInspectable(IInspectableVtbl) [IID_IAppServiceConnection] { + fn get_AppServiceName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AppServiceName(&mut self, value: HSTRING) -> HRESULT, + fn get_PackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PackageFamilyName(&mut self, value: HSTRING) -> HRESULT, + fn OpenAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SendMessageAsync(&mut self, message: *mut super::super::foundation::collections::ValueSet, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_RequestReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RequestReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ServiceClosed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServiceClosed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAppServiceConnection { + #[inline] pub unsafe fn get_app_service_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_To)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppServiceName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_body(&mut self) -> Result { + #[inline] pub unsafe fn set_app_service_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppServiceName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_package_family_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + let hr = ((*self.lpVtbl).get_PackageFamilyName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_message_count(&mut self) -> Result>> { + #[inline] pub unsafe fn set_package_family_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PackageFamilyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn open_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_MessageCount)(self, &mut out); + let hr = ((*self.lpVtbl).OpenAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn send_message_async(&mut self, message: &super::super::foundation::collections::ValueSet) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendMessageAsync)(self, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn add_request_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RequestReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_request_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RequestReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_service_closed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ServiceClosed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_service_closed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ServiceClosed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class SmsVoicemailMessage: ISmsVoicemailMessage} - DEFINE_IID!(IID_ISmsStatusMessage, 3872555842, 46859, 18039, 147, 121, 201, 120, 63, 223, 248, 244); - RT_INTERFACE!{interface ISmsStatusMessage(ISmsStatusMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsStatusMessage] { - fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Status(&mut self, out: *mut i32) -> HRESULT, - fn get_MessageReferenceNumber(&mut self, out: *mut i32) -> HRESULT, - fn get_ServiceCenterTimestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_DischargeTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT +} // Windows.ApplicationModel.AppService +pub mod core { // Windows.ApplicationModel.Core +use ::prelude::*; + DEFINE_IID!(IID_IAppListEntry, 4009816191, 8456, 18698, 135, 122, 138, 159, 23, 194, 95, 173); + RT_INTERFACE!{interface IAppListEntry(IAppListEntryVtbl): IInspectable(IInspectableVtbl) [IID_IAppListEntry] { + fn get_DisplayInfo(&mut self, out: *mut *mut super::AppDisplayInfo) -> HRESULT, + fn LaunchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl ISmsStatusMessage { - #[inline] pub unsafe fn get_to(&mut self) -> Result { + impl IAppListEntry { + #[inline] pub unsafe fn get_display_info(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_To)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DisplayInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_from(&mut self) -> Result { + #[inline] pub unsafe fn launch_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_From)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).LaunchAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_body(&mut self) -> Result { + } + RT_CLASS!{class AppListEntry: IAppListEntry} + RT_ACTIVATABLE!{ICoreApplication2 [CLSID_CoreApplication]} + RT_ACTIVATABLE!{ICoreApplicationExit [CLSID_CoreApplication]} + RT_ACTIVATABLE!{ICoreImmersiveApplication [CLSID_CoreApplication]} + RT_ACTIVATABLE!{ICoreApplicationUnhandledError [CLSID_CoreApplication]} + RT_ACTIVATABLE!{ICoreApplication [CLSID_CoreApplication]} + RT_ACTIVATABLE!{ICoreApplicationUseCount [CLSID_CoreApplication]} + RT_ACTIVATABLE!{ICoreImmersiveApplication2 [CLSID_CoreApplication]} + RT_ACTIVATABLE!{ICoreImmersiveApplication3 [CLSID_CoreApplication]} + DEFINE_CLSID!(CLSID_CoreApplication = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,111,114,101,46,67,111,114,101,65,112,112,108,105,99,97,116,105,111,110,0]); + RT_CLASS!{class CoreApplicationView: ICoreApplicationView} + RT_CLASS!{class CoreApplicationViewTitleBar: ICoreApplicationViewTitleBar} + DEFINE_IID!(IID_IFrameworkView, 4205534416, 35108, 17836, 173, 15, 160, 143, 174, 93, 3, 36); + RT_INTERFACE!{interface IFrameworkView(IFrameworkViewVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkView] { + fn Initialize(&mut self, applicationView: *mut CoreApplicationView) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.ui")] fn SetWindow(&mut self, window: *mut super::super::ui::core::CoreWindow) -> HRESULT, + fn Load(&mut self, entryPoint: HSTRING) -> HRESULT, + fn Run(&mut self) -> HRESULT, + fn Uninitialize(&mut self) -> HRESULT + }} + impl IFrameworkView { + #[inline] pub unsafe fn initialize(&mut self, applicationView: &CoreApplicationView) -> Result<()> { + let hr = ((*self.lpVtbl).Initialize)(self, applicationView as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_window(&mut self, window: &super::super::ui::core::CoreWindow) -> Result<()> { + let hr = ((*self.lpVtbl).SetWindow)(self, window as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn load(&mut self, entryPoint: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).Load)(self, entryPoint.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn run(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Run)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn uninitialize(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Uninitialize)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameworkViewSource, 3447129620, 26052, 17004, 148, 148, 52, 252, 67, 85, 72, 98); + RT_INTERFACE!{interface IFrameworkViewSource(IFrameworkViewSourceVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkViewSource] { + fn CreateView(&mut self, out: *mut *mut IFrameworkView) -> HRESULT + }} + impl IFrameworkViewSource { + #[inline] pub unsafe fn create_view(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + let hr = ((*self.lpVtbl).CreateView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreApplication, 179107748, 24093, 18911, 128, 52, 251, 106, 104, 188, 94, 209); + RT_INTERFACE!{static interface ICoreApplication(ICoreApplicationVtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplication] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn add_Suspending(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Suspending(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Resuming(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Resuming(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn GetCurrentView(&mut self, out: *mut *mut CoreApplicationView) -> HRESULT, + fn Run(&mut self, viewSource: *mut IFrameworkViewSource) -> HRESULT, + fn RunWithActivationFactories(&mut self, activationFactoryCallback: *mut super::super::foundation::IGetActivationFactory) -> HRESULT + }} + impl ICoreApplication { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result { + #[inline] pub unsafe fn add_suspending(&mut self, handler: &super::super::foundation::EventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).add_Suspending)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_message_reference_number(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MessageReferenceNumber)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_suspending(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Suspending)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_service_center_timestamp(&mut self) -> Result { + #[inline] pub unsafe fn add_resuming(&mut self, handler: &super::super::foundation::EventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceCenterTimestamp)(self, &mut out); + let hr = ((*self.lpVtbl).add_Resuming)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_discharge_time(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DischargeTime)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_resuming(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Resuming)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn run(&mut self, viewSource: &IFrameworkViewSource) -> Result<()> { + let hr = ((*self.lpVtbl).Run)(self, viewSource as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn run_with_activation_factories(&mut self, activationFactoryCallback: &super::super::foundation::IGetActivationFactory) -> Result<()> { + let hr = ((*self.lpVtbl).RunWithActivationFactories)(self, activationFactoryCallback as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class SmsStatusMessage: ISmsStatusMessage} - RT_STRUCT! { struct SmsEncodedLength { - SegmentCount: u32, CharacterCountLastSegment: u32, CharactersPerSegment: u32, ByteCountLastSegment: u32, BytesPerSegment: u32, - }} - RT_ENUM! { enum SmsDeviceStatus: i32 { - Off (SmsDeviceStatus_Off) = 0, Ready (SmsDeviceStatus_Ready) = 1, SimNotInserted (SmsDeviceStatus_SimNotInserted) = 2, BadSim (SmsDeviceStatus_BadSim) = 3, DeviceFailure (SmsDeviceStatus_DeviceFailure) = 4, SubscriptionNotActivated (SmsDeviceStatus_SubscriptionNotActivated) = 5, DeviceLocked (SmsDeviceStatus_DeviceLocked) = 6, DeviceBlocked (SmsDeviceStatus_DeviceBlocked) = 7, - }} - RT_ENUM! { enum SmsModemErrorCode: i32 { - Other (SmsModemErrorCode_Other) = 0, MessagingNetworkError (SmsModemErrorCode_MessagingNetworkError) = 1, SmsOperationNotSupportedByDevice (SmsModemErrorCode_SmsOperationNotSupportedByDevice) = 2, SmsServiceNotSupportedByNetwork (SmsModemErrorCode_SmsServiceNotSupportedByNetwork) = 3, DeviceFailure (SmsModemErrorCode_DeviceFailure) = 4, MessageNotEncodedProperly (SmsModemErrorCode_MessageNotEncodedProperly) = 5, MessageTooLarge (SmsModemErrorCode_MessageTooLarge) = 6, DeviceNotReady (SmsModemErrorCode_DeviceNotReady) = 7, NetworkNotReady (SmsModemErrorCode_NetworkNotReady) = 8, InvalidSmscAddress (SmsModemErrorCode_InvalidSmscAddress) = 9, NetworkFailure (SmsModemErrorCode_NetworkFailure) = 10, FixedDialingNumberRestricted (SmsModemErrorCode_FixedDialingNumberRestricted) = 11, + DEFINE_IID!(IID_ICoreApplicationUseCount, 1368245256, 49271, 18267, 128, 158, 11, 192, 197, 126, 75, 116); + RT_INTERFACE!{static interface ICoreApplicationUseCount(ICoreApplicationUseCountVtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplicationUseCount] { + fn IncrementApplicationUseCount(&mut self) -> HRESULT, + fn DecrementApplicationUseCount(&mut self) -> HRESULT }} - DEFINE_IID!(IID_ISmsSendMessageResult, 3675495154, 30921, 20459, 150, 34, 69, 35, 40, 8, 141, 98); - RT_INTERFACE!{interface ISmsSendMessageResult(ISmsSendMessageResultVtbl): IInspectable(IInspectableVtbl) [IID_ISmsSendMessageResult] { - fn get_IsSuccessful(&mut self, out: *mut bool) -> HRESULT, - fn get_MessageReferenceNumbers(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_CellularClass(&mut self, out: *mut CellularClass) -> HRESULT, - fn get_ModemErrorCode(&mut self, out: *mut SmsModemErrorCode) -> HRESULT, - fn get_IsErrorTransient(&mut self, out: *mut bool) -> HRESULT, - fn get_NetworkCauseCode(&mut self, out: *mut i32) -> HRESULT, - fn get_TransportFailureCause(&mut self, out: *mut i32) -> HRESULT + impl ICoreApplicationUseCount { + #[inline] pub unsafe fn increment_application_use_count(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).IncrementApplicationUseCount)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn decrement_application_use_count(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DecrementApplicationUseCount)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreApplicationExit, 3481683485, 9758, 19314, 154, 205, 68, 237, 42, 206, 106, 41); + RT_INTERFACE!{static interface ICoreApplicationExit(ICoreApplicationExitVtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplicationExit] { + fn Exit(&mut self) -> HRESULT, + fn add_Exiting(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Exiting(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT }} - impl ISmsSendMessageResult { - #[inline] pub unsafe fn get_is_successful(&mut self) -> Result { + impl ICoreApplicationExit { + #[inline] pub unsafe fn exit(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Exit)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_exiting(&mut self, handler: &super::super::foundation::EventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsSuccessful)(self, &mut out); + let hr = ((*self.lpVtbl).add_Exiting)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_message_reference_numbers(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_MessageReferenceNumbers)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_exiting(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Exiting)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_cellular_class(&mut self) -> Result { + } + DEFINE_IID!(IID_ICoreApplication2, 2575729147, 6838, 19327, 190, 74, 154, 6, 69, 34, 76, 4); + RT_INTERFACE!{static interface ICoreApplication2(ICoreApplication2Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplication2] { + fn add_BackgroundActivated(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BackgroundActivated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_LeavingBackground(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LeavingBackground(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnteredBackground(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnteredBackground(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn EnablePrelaunch(&mut self, value: bool) -> HRESULT + }} + impl ICoreApplication2 { + #[inline] pub unsafe fn add_background_activated(&mut self, handler: &super::super::foundation::EventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CellularClass)(self, &mut out); + let hr = ((*self.lpVtbl).add_BackgroundActivated)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_modem_error_code(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ModemErrorCode)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_background_activated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BackgroundActivated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_error_transient(&mut self) -> Result { + #[inline] pub unsafe fn add_leaving_background(&mut self, handler: &super::super::foundation::EventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsErrorTransient)(self, &mut out); + let hr = ((*self.lpVtbl).add_LeavingBackground)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_network_cause_code(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_NetworkCauseCode)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_leaving_background(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LeavingBackground)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_transport_failure_cause(&mut self) -> Result { + #[inline] pub unsafe fn add_entered_background(&mut self, handler: &super::super::foundation::EventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TransportFailureCause)(self, &mut out); + let hr = ((*self.lpVtbl).add_EnteredBackground)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn remove_entered_background(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnteredBackground)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn enable_prelaunch(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).EnablePrelaunch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class SmsSendMessageResult: ISmsSendMessageResult} - DEFINE_IID!(IID_ISmsDevice2Statics, 1707574053, 4145, 18718, 143, 182, 239, 153, 145, 175, 227, 99); - RT_INTERFACE!{static interface ISmsDevice2Statics(ISmsDevice2StaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsDevice2Statics] { - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn FromId(&mut self, deviceId: HSTRING, out: *mut *mut SmsDevice2) -> HRESULT, - fn GetDefault(&mut self, out: *mut *mut SmsDevice2) -> HRESULT, - fn FromParentId(&mut self, parentDeviceId: HSTRING, out: *mut *mut SmsDevice2) -> HRESULT + DEFINE_IID!(IID_ICoreImmersiveApplication, 450498110, 58530, 16675, 180, 81, 220, 150, 191, 128, 4, 25); + RT_INTERFACE!{static interface ICoreImmersiveApplication(ICoreImmersiveApplicationVtbl): IInspectable(IInspectableVtbl) [IID_ICoreImmersiveApplication] { + fn get_Views(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn CreateNewView(&mut self, runtimeType: HSTRING, entryPoint: HSTRING, out: *mut *mut CoreApplicationView) -> HRESULT, + fn get_MainView(&mut self, out: *mut *mut CoreApplicationView) -> HRESULT }} - impl ISmsDevice2Statics { - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + impl ICoreImmersiveApplication { + #[inline] pub unsafe fn get_views(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Views)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id(&mut self, deviceId: &HStringArg) -> Result> { + #[inline] pub unsafe fn create_new_view(&mut self, runtimeType: &HStringArg, entryPoint: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromId)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).CreateNewView)(self, runtimeType.get(), entryPoint.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + #[inline] pub unsafe fn get_main_view(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).get_MainView)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_parent_id(&mut self, parentDeviceId: &HStringArg) -> Result> { + } + DEFINE_IID!(IID_ICoreImmersiveApplication2, 2190351926, 59875, 19708, 155, 102, 72, 183, 142, 169, 187, 44); + RT_INTERFACE!{static interface ICoreImmersiveApplication2(ICoreImmersiveApplication2Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreImmersiveApplication2] { + fn CreateNewViewFromMainView(&mut self, out: *mut *mut CoreApplicationView) -> HRESULT + }} + impl ICoreImmersiveApplication2 { + #[inline] pub unsafe fn create_new_view_from_main_view(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromParentId)(self, parentDeviceId.get(), &mut out); + let hr = ((*self.lpVtbl).CreateNewViewFromMainView)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class SmsDevice2: ISmsDevice2} - RT_ACTIVATABLE!{ISmsDevice2Statics [CLSID_SmsDevice2]} - DEFINE_CLSID!(CLSID_SmsDevice2 = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,68,101,118,105,99,101,50,0]); - DEFINE_IID!(IID_ISmsDevice2, 3179961363, 58658, 18123, 184, 213, 158, 173, 48, 251, 108, 71); - RT_INTERFACE!{interface ISmsDevice2(ISmsDevice2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmsDevice2] { - fn get_SmscAddress(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_SmscAddress(&mut self, value: HSTRING) -> HRESULT, - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ParentDeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_AccountPhoneNumber(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_CellularClass(&mut self, out: *mut CellularClass) -> HRESULT, - fn get_DeviceStatus(&mut self, out: *mut SmsDeviceStatus) -> HRESULT, - fn CalculateLength(&mut self, message: *mut ISmsMessageBase, out: *mut SmsEncodedLength) -> HRESULT, - fn SendMessageAndGetResultAsync(&mut self, message: *mut ISmsMessageBase, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_DeviceStatusChanged(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DeviceStatusChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_ICoreImmersiveApplication3, 882924335, 60941, 16869, 131, 20, 207, 16, 201, 27, 240, 175); + RT_INTERFACE!{static interface ICoreImmersiveApplication3(ICoreImmersiveApplication3Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreImmersiveApplication3] { + fn CreateNewViewWithViewSource(&mut self, viewSource: *mut IFrameworkViewSource, out: *mut *mut CoreApplicationView) -> HRESULT }} - impl ISmsDevice2 { - #[inline] pub unsafe fn get_smsc_address(&mut self) -> Result { + impl ICoreImmersiveApplication3 { + #[inline] pub unsafe fn create_new_view_with_view_source(&mut self, viewSource: &IFrameworkViewSource) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SmscAddress)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).CreateNewViewWithViewSource)(self, viewSource as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_smsc_address(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_SmscAddress)(self, value.get()); + } + DEFINE_IID!(IID_ICoreApplicationUnhandledError, 4041362096, 56585, 17121, 176, 188, 224, 225, 49, 247, 141, 126); + RT_INTERFACE!{interface ICoreApplicationUnhandledError(ICoreApplicationUnhandledErrorVtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplicationUnhandledError] { + fn add_UnhandledErrorDetected(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UnhandledErrorDetected(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICoreApplicationUnhandledError { + #[inline] pub unsafe fn add_unhandled_error_detected(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UnhandledErrorDetected)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_unhandled_error_detected(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UnhandledErrorDetected)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + } + RT_CLASS!{class UnhandledErrorDetectedEventArgs: IUnhandledErrorDetectedEventArgs} + DEFINE_IID!(IID_ICoreApplicationView, 1670099675, 17693, 18017, 176, 153, 65, 79, 52, 255, 185, 241); + RT_INTERFACE!{interface ICoreApplicationView(ICoreApplicationViewVtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplicationView] { + #[cfg(not(feature="windows.ui"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_CoreWindow(&mut self, out: *mut *mut super::super::ui::core::CoreWindow) -> HRESULT, + fn add_Activated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Activated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_IsMain(&mut self, out: *mut bool) -> HRESULT, + fn get_IsHosted(&mut self, out: *mut bool) -> HRESULT + }} + impl ICoreApplicationView { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_core_window(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_CoreWindow)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_parent_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ParentDeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn add_activated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Activated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_account_phone_number(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AccountPhoneNumber)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_activated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Activated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_cellular_class(&mut self) -> Result { + #[inline] pub unsafe fn get_is_main(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CellularClass)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsMain)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_status(&mut self) -> Result { + #[inline] pub unsafe fn get_is_hosted(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DeviceStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsHosted)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn calculate_length(&mut self, message: &ISmsMessageBase) -> Result { + } + DEFINE_IID!(IID_ICoreApplicationView2, 1760262879, 37247, 18667, 154, 235, 125, 229, 62, 8, 106, 177); + RT_INTERFACE!{interface ICoreApplicationView2(ICoreApplicationView2Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplicationView2] { + #[cfg(feature="windows.ui")] fn get_Dispatcher(&mut self, out: *mut *mut super::super::ui::core::CoreDispatcher) -> HRESULT + }} + impl ICoreApplicationView2 { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_dispatcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Dispatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreApplicationView3, 132899251, 42191, 17744, 171, 112, 176, 126, 133, 51, 11, 200); + RT_INTERFACE!{interface ICoreApplicationView3(ICoreApplicationView3Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplicationView3] { + fn get_IsComponent(&mut self, out: *mut bool) -> HRESULT, + fn get_TitleBar(&mut self, out: *mut *mut CoreApplicationViewTitleBar) -> HRESULT, + fn add_HostedViewClosing(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_HostedViewClosing(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICoreApplicationView3 { + #[inline] pub unsafe fn get_is_component(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).CalculateLength)(self, message as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IsComponent)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn send_message_and_get_result_async(&mut self, message: &ISmsMessageBase) -> Result>> { + #[inline] pub unsafe fn get_title_bar(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SendMessageAndGetResultAsync)(self, message as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_TitleBar)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_device_status_changed(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn add_hosted_view_closing(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_DeviceStatusChanged)(self, eventHandler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).add_HostedViewClosing)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_device_status_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_DeviceStatusChanged)(self, eventCookie); + #[inline] pub unsafe fn remove_hosted_view_closing(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_HostedViewClosing)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_ISmsMessageReceivedTriggerDetails, 735038420, 9815, 16680, 173, 95, 227, 135, 113, 50, 189, 177); - RT_INTERFACE!{interface ISmsMessageReceivedTriggerDetails(ISmsMessageReceivedTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageReceivedTriggerDetails] { - fn get_MessageType(&mut self, out: *mut SmsMessageType) -> HRESULT, - fn get_TextMessage(&mut self, out: *mut *mut SmsTextMessage2) -> HRESULT, - fn get_WapMessage(&mut self, out: *mut *mut SmsWapMessage) -> HRESULT, - fn get_AppMessage(&mut self, out: *mut *mut SmsAppMessage) -> HRESULT, - fn get_BroadcastMessage(&mut self, out: *mut *mut SmsBroadcastMessage) -> HRESULT, - fn get_VoicemailMessage(&mut self, out: *mut *mut SmsVoicemailMessage) -> HRESULT, - fn get_StatusMessage(&mut self, out: *mut *mut SmsStatusMessage) -> HRESULT, - fn Drop(&mut self) -> HRESULT, - fn Accept(&mut self) -> HRESULT + RT_CLASS!{class HostedViewClosingEventArgs: IHostedViewClosingEventArgs} + DEFINE_IID!(IID_IHostedViewClosingEventArgs, 3526923324, 45646, 18320, 172, 181, 62, 66, 67, 196, 255, 135); + RT_INTERFACE!{interface IHostedViewClosingEventArgs(IHostedViewClosingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IHostedViewClosingEventArgs] { + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT }} - impl ISmsMessageReceivedTriggerDetails { - #[inline] pub unsafe fn get_message_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MessageType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_message(&mut self) -> Result> { + impl IHostedViewClosingEventArgs { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_TextMessage)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_wap_message(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_WapMessage)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + DEFINE_IID!(IID_ICoreApplicationViewTitleBar, 7157219, 57841, 17179, 149, 8, 41, 185, 105, 38, 172, 83); + RT_INTERFACE!{interface ICoreApplicationViewTitleBar(ICoreApplicationViewTitleBarVtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplicationViewTitleBar] { + fn put_ExtendViewIntoTitleBar(&mut self, value: bool) -> HRESULT, + fn get_ExtendViewIntoTitleBar(&mut self, out: *mut bool) -> HRESULT, + fn get_SystemOverlayLeftInset(&mut self, out: *mut f64) -> HRESULT, + fn get_SystemOverlayRightInset(&mut self, out: *mut f64) -> HRESULT, + fn get_Height(&mut self, out: *mut f64) -> HRESULT, + fn add_LayoutMetricsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LayoutMetricsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_IsVisible(&mut self, out: *mut bool) -> HRESULT, + fn add_IsVisibleChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsVisibleChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICoreApplicationViewTitleBar { + #[inline] pub unsafe fn set_extend_view_into_title_bar(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExtendViewIntoTitleBar)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_app_message(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AppMessage)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_extend_view_into_title_bar(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendViewIntoTitleBar)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_broadcast_message(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BroadcastMessage)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_system_overlay_left_inset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SystemOverlayLeftInset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_voicemail_message(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VoicemailMessage)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_system_overlay_right_inset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SystemOverlayRightInset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_status_message(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_StatusMessage)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn drop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Drop)(self); + #[inline] pub unsafe fn add_layout_metrics_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LayoutMetricsChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_layout_metrics_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LayoutMetricsChanged)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn accept(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Accept)(self); + #[inline] pub unsafe fn get_is_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_is_visible_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_IsVisibleChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_is_visible_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_IsVisibleChanged)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class SmsMessageReceivedTriggerDetails: ISmsMessageReceivedTriggerDetails} - RT_ENUM! { enum SmsFilterActionType: i32 { - AcceptImmediately (SmsFilterActionType_AcceptImmediately) = 0, Drop (SmsFilterActionType_Drop) = 1, Peek (SmsFilterActionType_Peek) = 2, Accept (SmsFilterActionType_Accept) = 3, + DEFINE_IID!(IID_IUnhandledErrorDetectedEventArgs, 1738192779, 45878, 18466, 172, 64, 13, 117, 15, 11, 122, 43); + RT_INTERFACE!{interface IUnhandledErrorDetectedEventArgs(IUnhandledErrorDetectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUnhandledErrorDetectedEventArgs] { + fn get_UnhandledError(&mut self, out: *mut *mut UnhandledError) -> HRESULT }} - DEFINE_IID!(IID_ISmsFilterRule, 1088630702, 45129, 20412, 175, 233, 226, 166, 16, 239, 245, 92); - RT_INTERFACE!{interface ISmsFilterRule(ISmsFilterRuleVtbl): IInspectable(IInspectableVtbl) [IID_ISmsFilterRule] { - fn get_MessageType(&mut self, out: *mut SmsMessageType) -> HRESULT, - fn get_ImsiPrefixes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_DeviceIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_SenderNumbers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_TextMessagePrefixes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_PortNumbers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_CellularClass(&mut self, out: *mut CellularClass) -> HRESULT, - fn put_CellularClass(&mut self, value: CellularClass) -> HRESULT, - fn get_ProtocolIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_TeleserviceIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_WapApplicationIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_WapContentTypes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_BroadcastTypes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_BroadcastChannels(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + impl IUnhandledErrorDetectedEventArgs { + #[inline] pub unsafe fn get_unhandled_error(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UnhandledError)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UnhandledError: IUnhandledError} + DEFINE_IID!(IID_IUnhandledError, 2488907558, 21429, 18054, 158, 175, 250, 129, 98, 220, 57, 128); + RT_INTERFACE!{interface IUnhandledError(IUnhandledErrorVtbl): IInspectable(IInspectableVtbl) [IID_IUnhandledError] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn Propagate(&mut self) -> HRESULT }} - impl ISmsFilterRule { - #[inline] pub unsafe fn get_message_type(&mut self) -> Result { + impl IUnhandledError { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MessageType)(self, &mut out); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_imsi_prefixes(&mut self) -> Result>> { + #[inline] pub unsafe fn propagate(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Propagate)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.ApplicationModel.Core +pub mod appointments { // Windows.ApplicationModel.Appointments +use ::prelude::*; + DEFINE_IID!(IID_IAppointmentManagerStatics, 976288257, 23616, 18845, 179, 63, 164, 48, 80, 247, 79, 196); + RT_INTERFACE!{static interface IAppointmentManagerStatics(IAppointmentManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentManagerStatics] { + fn ShowAddAppointmentAsync(&mut self, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowAddAppointmentWithPlacementAsync(&mut self, appointment: *mut Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowReplaceAppointmentAsync(&mut self, appointmentId: HSTRING, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowReplaceAppointmentWithPlacementAsync(&mut self, appointmentId: HSTRING, appointment: *mut Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowReplaceAppointmentWithPlacementAndDateAsync(&mut self, appointmentId: HSTRING, appointment: *mut Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowRemoveAppointmentAsync(&mut self, appointmentId: HSTRING, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowRemoveAppointmentWithPlacementAsync(&mut self, appointmentId: HSTRING, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowRemoveAppointmentWithPlacementAndDateAsync(&mut self, appointmentId: HSTRING, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowTimeFrameAsync(&mut self, timeToShow: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IAppointmentManagerStatics { + #[inline] pub unsafe fn show_add_appointment_async(&mut self, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ImsiPrefixes)(self, &mut out); + let hr = ((*self.lpVtbl).ShowAddAppointmentAsync)(self, appointment as *const _ as *mut _, selection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_ids(&mut self) -> Result>> { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_add_appointment_with_placement_async(&mut self, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceIds)(self, &mut out); + let hr = ((*self.lpVtbl).ShowAddAppointmentWithPlacementAsync)(self, appointment as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sender_numbers(&mut self) -> Result>> { + #[inline] pub unsafe fn show_replace_appointment_async(&mut self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SenderNumbers)(self, &mut out); + let hr = ((*self.lpVtbl).ShowReplaceAppointmentAsync)(self, appointmentId.get(), appointment as *const _ as *mut _, selection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_text_message_prefixes(&mut self) -> Result>> { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_replace_appointment_with_placement_async(&mut self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_TextMessagePrefixes)(self, &mut out); + let hr = ((*self.lpVtbl).ShowReplaceAppointmentWithPlacementAsync)(self, appointmentId.get(), appointment as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_port_numbers(&mut self) -> Result>> { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_replace_appointment_with_placement_and_date_async(&mut self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PortNumbers)(self, &mut out); + let hr = ((*self.lpVtbl).ShowReplaceAppointmentWithPlacementAndDateAsync)(self, appointmentId.get(), appointment as *const _ as *mut _, selection, preferredPlacement, instanceStartDate, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_cellular_class(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CellularClass)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn show_remove_appointment_async(&mut self, appointmentId: &HStringArg, selection: super::super::foundation::Rect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowRemoveAppointmentAsync)(self, appointmentId.get(), selection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_cellular_class(&mut self, value: CellularClass) -> Result<()> { - let hr = ((*self.lpVtbl).put_CellularClass)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_remove_appointment_with_placement_async(&mut self, appointmentId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowRemoveAppointmentWithPlacementAsync)(self, appointmentId.get(), selection, preferredPlacement, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_protocol_ids(&mut self) -> Result>> { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_remove_appointment_with_placement_and_date_async(&mut self, appointmentId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ProtocolIds)(self, &mut out); + let hr = ((*self.lpVtbl).ShowRemoveAppointmentWithPlacementAndDateAsync)(self, appointmentId.get(), selection, preferredPlacement, instanceStartDate, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_teleservice_ids(&mut self) -> Result>> { + #[inline] pub unsafe fn show_time_frame_async(&mut self, timeToShow: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_TeleserviceIds)(self, &mut out); + let hr = ((*self.lpVtbl).ShowTimeFrameAsync)(self, timeToShow, duration, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_wap_application_ids(&mut self) -> Result>> { + } + RT_CLASS!{class Appointment: IAppointment} + RT_ENUM! { enum AppointmentStoreAccessType: i32 { + AppCalendarsReadWrite (AppointmentStoreAccessType_AppCalendarsReadWrite) = 0, AllCalendarsReadOnly (AppointmentStoreAccessType_AllCalendarsReadOnly) = 1, AllCalendarsReadWrite (AppointmentStoreAccessType_AllCalendarsReadWrite) = 2, + }} + DEFINE_IID!(IID_IAppointmentManagerStatics2, 176289293, 53327, 16436, 175, 114, 163, 101, 115, 180, 95, 240); + RT_INTERFACE!{static interface IAppointmentManagerStatics2(IAppointmentManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentManagerStatics2] { + fn ShowAppointmentDetailsAsync(&mut self, appointmentId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowAppointmentDetailsWithDateAsync(&mut self, appointmentId: HSTRING, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowEditNewAppointmentAsync(&mut self, appointment: *mut Appointment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestStoreAsync(&mut self, options: AppointmentStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IAppointmentManagerStatics2 { + #[inline] pub unsafe fn show_appointment_details_async(&mut self, appointmentId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_WapApplicationIds)(self, &mut out); + let hr = ((*self.lpVtbl).ShowAppointmentDetailsAsync)(self, appointmentId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_wap_content_types(&mut self) -> Result>> { + #[inline] pub unsafe fn show_appointment_details_with_date_async(&mut self, appointmentId: &HStringArg, instanceStartDate: super::super::foundation::DateTime) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_WapContentTypes)(self, &mut out); + let hr = ((*self.lpVtbl).ShowAppointmentDetailsWithDateAsync)(self, appointmentId.get(), instanceStartDate, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_broadcast_types(&mut self) -> Result>> { + #[inline] pub unsafe fn show_edit_new_appointment_async(&mut self, appointment: &Appointment) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BroadcastTypes)(self, &mut out); + let hr = ((*self.lpVtbl).ShowEditNewAppointmentAsync)(self, appointment as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_broadcast_channels(&mut self) -> Result>> { + #[inline] pub unsafe fn request_store_async(&mut self, options: AppointmentStoreAccessType) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BroadcastChannels)(self, &mut out); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, options, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ISmsFilterRuleFactory, 12805384, 25238, 20265, 154, 173, 137, 32, 206, 186, 60, 232); - RT_INTERFACE!{static interface ISmsFilterRuleFactory(ISmsFilterRuleFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISmsFilterRuleFactory] { - fn CreateFilterRule(&mut self, messageType: SmsMessageType, out: *mut *mut SmsFilterRule) -> HRESULT + RT_CLASS!{class AppointmentStore: IAppointmentStore} + DEFINE_IID!(IID_IAppointmentManagerStatics3, 798679196, 45900, 19911, 163, 93, 202, 253, 136, 174, 62, 198); + RT_INTERFACE!{static interface IAppointmentManagerStatics3(IAppointmentManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentManagerStatics3] { + #[cfg(feature="windows.system")] fn GetForUser(&mut self, user: *mut super::super::system::User, out: *mut *mut AppointmentManagerForUser) -> HRESULT }} - impl ISmsFilterRuleFactory { - #[inline] pub unsafe fn create_filter_rule(&mut self, messageType: SmsMessageType) -> Result> { + impl IAppointmentManagerStatics3 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user(&mut self, user: &super::super::system::User) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFilterRule)(self, messageType, &mut out); + let hr = ((*self.lpVtbl).GetForUser)(self, user as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class SmsFilterRule: ISmsFilterRule [ISmsFilterRuleFactory] [CLSID_SmsFilterRule]} - DEFINE_CLSID!(CLSID_SmsFilterRule = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,70,105,108,116,101,114,82,117,108,101,0]); - DEFINE_IID!(IID_ISmsFilterRules, 1313336059, 31181, 18561, 152, 148, 85, 164, 19, 91, 35, 250); - RT_INTERFACE!{interface ISmsFilterRules(ISmsFilterRulesVtbl): IInspectable(IInspectableVtbl) [IID_ISmsFilterRules] { - fn get_ActionType(&mut self, out: *mut SmsFilterActionType) -> HRESULT, - fn get_Rules(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + RT_CLASS!{class AppointmentManagerForUser: IAppointmentManagerForUser} + DEFINE_IID!(IID_IAppointmentManagerForUser, 1881543715, 29644, 18016, 179, 24, 176, 19, 101, 48, 42, 3); + RT_INTERFACE!{interface IAppointmentManagerForUser(IAppointmentManagerForUserVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentManagerForUser] { + fn ShowAddAppointmentAsync(&mut self, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowAddAppointmentWithPlacementAsync(&mut self, appointment: *mut Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowReplaceAppointmentAsync(&mut self, appointmentId: HSTRING, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowReplaceAppointmentWithPlacementAsync(&mut self, appointmentId: HSTRING, appointment: *mut Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowReplaceAppointmentWithPlacementAndDateAsync(&mut self, appointmentId: HSTRING, appointment: *mut Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowRemoveAppointmentAsync(&mut self, appointmentId: HSTRING, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowRemoveAppointmentWithPlacementAsync(&mut self, appointmentId: HSTRING, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowRemoveAppointmentWithPlacementAndDateAsync(&mut self, appointmentId: HSTRING, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowTimeFrameAsync(&mut self, timeToShow: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowAppointmentDetailsAsync(&mut self, appointmentId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowAppointmentDetailsWithDateAsync(&mut self, appointmentId: HSTRING, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowEditNewAppointmentAsync(&mut self, appointment: *mut Appointment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestStoreAsync(&mut self, options: AppointmentStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT }} - impl ISmsFilterRules { - #[inline] pub unsafe fn get_action_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ActionType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IAppointmentManagerForUser { + #[inline] pub unsafe fn show_add_appointment_async(&mut self, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAddAppointmentAsync)(self, appointment as *const _ as *mut _, selection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_rules(&mut self) -> Result>> { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_add_appointment_with_placement_async(&mut self, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Rules)(self, &mut out); + let hr = ((*self.lpVtbl).ShowAddAppointmentWithPlacementAsync)(self, appointment as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_ISmsFilterRulesFactory, 2694391021, 28206, 17712, 159, 222, 70, 93, 2, 238, 208, 14); - RT_INTERFACE!{static interface ISmsFilterRulesFactory(ISmsFilterRulesFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISmsFilterRulesFactory] { - fn CreateFilterRules(&mut self, actionType: SmsFilterActionType, out: *mut *mut SmsFilterRules) -> HRESULT - }} - impl ISmsFilterRulesFactory { - #[inline] pub unsafe fn create_filter_rules(&mut self, actionType: SmsFilterActionType) -> Result> { + #[inline] pub unsafe fn show_replace_appointment_async(&mut self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFilterRules)(self, actionType, &mut out); + let hr = ((*self.lpVtbl).ShowReplaceAppointmentAsync)(self, appointmentId.get(), appointment as *const _ as *mut _, selection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class SmsFilterRules: ISmsFilterRules [ISmsFilterRulesFactory] [CLSID_SmsFilterRules]} - DEFINE_CLSID!(CLSID_SmsFilterRules = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,70,105,108,116,101,114,82,117,108,101,115,0]); - DEFINE_IID!(IID_ISmsMessageRegistrationStatics, 1671451748, 10392, 18296, 160, 60, 111, 153, 73, 7, 214, 58); - RT_INTERFACE!{static interface ISmsMessageRegistrationStatics(ISmsMessageRegistrationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageRegistrationStatics] { - fn get_AllRegistrations(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn Register(&mut self, id: HSTRING, filterRules: *mut SmsFilterRules, out: *mut *mut SmsMessageRegistration) -> HRESULT - }} - impl ISmsMessageRegistrationStatics { - #[inline] pub unsafe fn get_all_registrations(&mut self) -> Result>> { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_replace_appointment_with_placement_async(&mut self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AllRegistrations)(self, &mut out); + let hr = ((*self.lpVtbl).ShowReplaceAppointmentWithPlacementAsync)(self, appointmentId.get(), appointment as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn register(&mut self, id: &HStringArg, filterRules: &SmsFilterRules) -> Result> { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_replace_appointment_with_placement_and_date_async(&mut self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Register)(self, id.get(), filterRules as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).ShowReplaceAppointmentWithPlacementAndDateAsync)(self, appointmentId.get(), appointment as *const _ as *mut _, selection, preferredPlacement, instanceStartDate, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_remove_appointment_async(&mut self, appointmentId: &HStringArg, selection: super::super::foundation::Rect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowRemoveAppointmentAsync)(self, appointmentId.get(), selection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_remove_appointment_with_placement_async(&mut self, appointmentId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowRemoveAppointmentWithPlacementAsync)(self, appointmentId.get(), selection, preferredPlacement, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_remove_appointment_with_placement_and_date_async(&mut self, appointmentId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowRemoveAppointmentWithPlacementAndDateAsync)(self, appointmentId.get(), selection, preferredPlacement, instanceStartDate, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_time_frame_async(&mut self, timeToShow: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowTimeFrameAsync)(self, timeToShow, duration, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_appointment_details_async(&mut self, appointmentId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAppointmentDetailsAsync)(self, appointmentId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_appointment_details_with_date_async(&mut self, appointmentId: &HStringArg, instanceStartDate: super::super::foundation::DateTime) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAppointmentDetailsWithDateAsync)(self, appointmentId.get(), instanceStartDate, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_edit_new_appointment_async(&mut self, appointment: &Appointment) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowEditNewAppointmentAsync)(self, appointment as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_store_async(&mut self, options: AppointmentStoreAccessType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class SmsMessageRegistration: ISmsMessageRegistration} - RT_ACTIVATABLE!{ISmsMessageRegistrationStatics [CLSID_SmsMessageRegistration]} - DEFINE_CLSID!(CLSID_SmsMessageRegistration = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,77,101,115,115,97,103,101,82,101,103,105,115,116,114,97,116,105,111,110,0]); - DEFINE_IID!(IID_ISmsMessageRegistration, 387993662, 62287, 17515, 131, 179, 15, 241, 153, 35, 180, 9); - RT_INTERFACE!{interface ISmsMessageRegistration(ISmsMessageRegistrationVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageRegistration] { - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, - fn Unregister(&mut self) -> HRESULT, - fn add_MessageReceived(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MessageReceived(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_ENUM! { enum AppointmentSensitivity: i32 { + Public (AppointmentSensitivity_Public) = 0, Private (AppointmentSensitivity_Private) = 1, }} - impl ISmsMessageRegistration { - #[inline] pub unsafe fn get_id(&mut self) -> Result { + RT_ENUM! { enum AppointmentBusyStatus: i32 { + Busy (AppointmentBusyStatus_Busy) = 0, Tentative (AppointmentBusyStatus_Tentative) = 1, Free (AppointmentBusyStatus_Free) = 2, OutOfOffice (AppointmentBusyStatus_OutOfOffice) = 3, WorkingElsewhere (AppointmentBusyStatus_WorkingElsewhere) = 4, + }} + RT_ENUM! { enum AppointmentParticipantResponse: i32 { + None (AppointmentParticipantResponse_None) = 0, Tentative (AppointmentParticipantResponse_Tentative) = 1, Accepted (AppointmentParticipantResponse_Accepted) = 2, Declined (AppointmentParticipantResponse_Declined) = 3, Unknown (AppointmentParticipantResponse_Unknown) = 4, + }} + RT_ENUM! { enum AppointmentParticipantRole: i32 { + RequiredAttendee (AppointmentParticipantRole_RequiredAttendee) = 0, OptionalAttendee (AppointmentParticipantRole_OptionalAttendee) = 1, Resource (AppointmentParticipantRole_Resource) = 2, + }} + DEFINE_IID!(IID_IAppointmentParticipant, 1633560834, 38680, 18043, 131, 251, 178, 147, 161, 145, 33, 222); + RT_INTERFACE!{interface IAppointmentParticipant(IAppointmentParticipantVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentParticipant] { + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_Address(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Address(&mut self, value: HSTRING) -> HRESULT + }} + impl IAppointmentParticipant { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn unregister(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Unregister)(self); + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_message_received(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_MessageReceived)(self, eventHandler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Address)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_message_received(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_MessageReceived)(self, eventCookie); + #[inline] pub unsafe fn set_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Address)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_STRUCT! { struct LegacySmsApiContract { - - }} - DEFINE_IID!(IID_ISmsMessage, 3980156456, 27012, 19207, 129, 29, 141, 89, 6, 237, 60, 234); - RT_INTERFACE!{interface ISmsMessage(ISmsMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessage] { - fn get_Id(&mut self, out: *mut u32) -> HRESULT, - fn get_MessageClass(&mut self, out: *mut SmsMessageClass) -> HRESULT + RT_CLASS!{class AppointmentOrganizer: IAppointmentParticipant} + DEFINE_IID!(IID_IAppointmentInvitee, 331286422, 38978, 18779, 176, 231, 239, 143, 121, 192, 112, 29); + RT_INTERFACE!{interface IAppointmentInvitee(IAppointmentInviteeVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentInvitee] { + fn get_Role(&mut self, out: *mut AppointmentParticipantRole) -> HRESULT, + fn put_Role(&mut self, value: AppointmentParticipantRole) -> HRESULT, + fn get_Response(&mut self, out: *mut AppointmentParticipantResponse) -> HRESULT, + fn put_Response(&mut self, value: AppointmentParticipantResponse) -> HRESULT }} - impl ISmsMessage { - #[inline] pub unsafe fn get_id(&mut self) -> Result { + impl IAppointmentInvitee { + #[inline] pub unsafe fn get_role(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_Role)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_message_class(&mut self) -> Result { + #[inline] pub unsafe fn set_role(&mut self, value: AppointmentParticipantRole) -> Result<()> { + let hr = ((*self.lpVtbl).put_Role)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_response(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MessageClass)(self, &mut out); + let hr = ((*self.lpVtbl).get_Response)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn set_response(&mut self, value: AppointmentParticipantResponse) -> Result<()> { + let hr = ((*self.lpVtbl).put_Response)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - DEFINE_IID!(IID_ISmsBinaryMessage, 1542776851, 15187, 19566, 182, 26, 216, 106, 99, 117, 86, 80); - RT_INTERFACE!{interface ISmsBinaryMessage(ISmsBinaryMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsBinaryMessage] { - fn get_Format(&mut self, out: *mut SmsDataFormat) -> HRESULT, - fn put_Format(&mut self, value: SmsDataFormat) -> HRESULT, - fn GetData(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, - fn SetData(&mut self, valueSize: u32, value: *mut u8) -> HRESULT + RT_CLASS!{class AppointmentInvitee: IAppointmentInvitee} + RT_ENUM! { enum AppointmentRecurrenceUnit: i32 { + Daily (AppointmentRecurrenceUnit_Daily) = 0, Weekly (AppointmentRecurrenceUnit_Weekly) = 1, Monthly (AppointmentRecurrenceUnit_Monthly) = 2, MonthlyOnDay (AppointmentRecurrenceUnit_MonthlyOnDay) = 3, Yearly (AppointmentRecurrenceUnit_Yearly) = 4, YearlyOnDay (AppointmentRecurrenceUnit_YearlyOnDay) = 5, }} - impl ISmsBinaryMessage { - #[inline] pub unsafe fn get_format(&mut self) -> Result { + RT_ENUM! { enum AppointmentDaysOfWeek: u32 { + None (AppointmentDaysOfWeek_None) = 0, Sunday (AppointmentDaysOfWeek_Sunday) = 1, Monday (AppointmentDaysOfWeek_Monday) = 2, Tuesday (AppointmentDaysOfWeek_Tuesday) = 4, Wednesday (AppointmentDaysOfWeek_Wednesday) = 8, Thursday (AppointmentDaysOfWeek_Thursday) = 16, Friday (AppointmentDaysOfWeek_Friday) = 32, Saturday (AppointmentDaysOfWeek_Saturday) = 64, + }} + RT_ENUM! { enum AppointmentWeekOfMonth: i32 { + First (AppointmentWeekOfMonth_First) = 0, Second (AppointmentWeekOfMonth_Second) = 1, Third (AppointmentWeekOfMonth_Third) = 2, Fourth (AppointmentWeekOfMonth_Fourth) = 3, Last (AppointmentWeekOfMonth_Last) = 4, + }} + RT_ENUM! { enum AppointmentCalendarSyncStatus: i32 { + Idle (AppointmentCalendarSyncStatus_Idle) = 0, Syncing (AppointmentCalendarSyncStatus_Syncing) = 1, UpToDate (AppointmentCalendarSyncStatus_UpToDate) = 2, AuthenticationError (AppointmentCalendarSyncStatus_AuthenticationError) = 3, PolicyError (AppointmentCalendarSyncStatus_PolicyError) = 4, UnknownError (AppointmentCalendarSyncStatus_UnknownError) = 5, ManualAccountRemovalRequired (AppointmentCalendarSyncStatus_ManualAccountRemovalRequired) = 6, + }} + DEFINE_IID!(IID_IAppointmentRecurrence, 3631955587, 5542, 18555, 185, 89, 12, 54, 30, 96, 233, 84); + RT_INTERFACE!{interface IAppointmentRecurrence(IAppointmentRecurrenceVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentRecurrence] { + fn get_Unit(&mut self, out: *mut AppointmentRecurrenceUnit) -> HRESULT, + fn put_Unit(&mut self, value: AppointmentRecurrenceUnit) -> HRESULT, + fn get_Occurrences(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Occurrences(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Until(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Until(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Interval(&mut self, out: *mut u32) -> HRESULT, + fn put_Interval(&mut self, value: u32) -> HRESULT, + fn get_DaysOfWeek(&mut self, out: *mut AppointmentDaysOfWeek) -> HRESULT, + fn put_DaysOfWeek(&mut self, value: AppointmentDaysOfWeek) -> HRESULT, + fn get_WeekOfMonth(&mut self, out: *mut AppointmentWeekOfMonth) -> HRESULT, + fn put_WeekOfMonth(&mut self, value: AppointmentWeekOfMonth) -> HRESULT, + fn get_Month(&mut self, out: *mut u32) -> HRESULT, + fn put_Month(&mut self, value: u32) -> HRESULT, + fn get_Day(&mut self, out: *mut u32) -> HRESULT, + fn put_Day(&mut self, value: u32) -> HRESULT + }} + impl IAppointmentRecurrence { + #[inline] pub unsafe fn get_unit(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Format)(self, &mut out); + let hr = ((*self.lpVtbl).get_Unit)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_format(&mut self, value: SmsDataFormat) -> Result<()> { - let hr = ((*self.lpVtbl).put_Format)(self, value); + #[inline] pub unsafe fn set_unit(&mut self, value: AppointmentRecurrenceUnit) -> Result<()> { + let hr = ((*self.lpVtbl).put_Unit)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_data(&mut self) -> Result> { - let mut outSize = 0; let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetData)(self, &mut outSize, &mut out); - if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + #[inline] pub unsafe fn get_occurrences(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Occurrences)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_data(&mut self, value: &[u8]) -> Result<()> { - let hr = ((*self.lpVtbl).SetData)(self, value.len() as u32, value.as_ptr() as *mut _); + #[inline] pub unsafe fn set_occurrences(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Occurrences)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class SmsBinaryMessage: ISmsBinaryMessage} - DEFINE_IID!(IID_ISmsTextMessage, 3592196172, 42133, 18559, 154, 111, 151, 21, 72, 197, 188, 159); - RT_INTERFACE!{interface ISmsTextMessage(ISmsTextMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsTextMessage] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_PartReferenceId(&mut self, out: *mut u32) -> HRESULT, - fn get_PartNumber(&mut self, out: *mut u32) -> HRESULT, - fn get_PartCount(&mut self, out: *mut u32) -> HRESULT, - fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_To(&mut self, value: HSTRING) -> HRESULT, - fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_From(&mut self, value: HSTRING) -> HRESULT, - fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_Body(&mut self, value: HSTRING) -> HRESULT, - fn get_Encoding(&mut self, out: *mut SmsEncoding) -> HRESULT, - fn put_Encoding(&mut self, value: SmsEncoding) -> HRESULT, - fn ToBinaryMessages(&mut self, format: SmsDataFormat, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT - }} - impl ISmsTextMessage { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + #[inline] pub unsafe fn get_until(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Until)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_until(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Until)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_interval(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_Interval)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_part_reference_id(&mut self) -> Result { + #[inline] pub unsafe fn set_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Interval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_days_of_week(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PartReferenceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_DaysOfWeek)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_part_number(&mut self) -> Result { + #[inline] pub unsafe fn set_days_of_week(&mut self, value: AppointmentDaysOfWeek) -> Result<()> { + let hr = ((*self.lpVtbl).put_DaysOfWeek)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_week_of_month(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PartNumber)(self, &mut out); + let hr = ((*self.lpVtbl).get_WeekOfMonth)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_part_count(&mut self) -> Result { + #[inline] pub unsafe fn set_week_of_month(&mut self, value: AppointmentWeekOfMonth) -> Result<()> { + let hr = ((*self.lpVtbl).put_WeekOfMonth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_month(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PartCount)(self, &mut out); + let hr = ((*self.lpVtbl).get_Month)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_to(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_To)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_month(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Month)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_to(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_To)(self, value.get()); + #[inline] pub unsafe fn get_day(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Day)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_day(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Day)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_from(&mut self) -> Result { + } + RT_ENUM! { enum RecurrenceType: i32 { + Master (RecurrenceType_Master) = 0, Instance (RecurrenceType_Instance) = 1, ExceptionInstance (RecurrenceType_ExceptionInstance) = 2, + }} + DEFINE_IID!(IID_IAppointmentRecurrence2, 1039377120, 1447, 20304, 159, 134, 176, 63, 148, 54, 37, 77); + RT_INTERFACE!{interface IAppointmentRecurrence2(IAppointmentRecurrence2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentRecurrence2] { + fn get_RecurrenceType(&mut self, out: *mut RecurrenceType) -> HRESULT, + fn get_TimeZone(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_TimeZone(&mut self, value: HSTRING) -> HRESULT + }} + impl IAppointmentRecurrence2 { + #[inline] pub unsafe fn get_recurrence_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RecurrenceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_zone(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_From)(self, &mut out); + let hr = ((*self.lpVtbl).get_TimeZone)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_from(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_From)(self, value.get()); + #[inline] pub unsafe fn set_time_zone(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TimeZone)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_body(&mut self) -> Result { + } + DEFINE_IID!(IID_IAppointmentRecurrence3, 2315228889, 55885, 18967, 141, 210, 28, 235, 194, 181, 255, 157); + RT_INTERFACE!{interface IAppointmentRecurrence3(IAppointmentRecurrence3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentRecurrence3] { + fn get_CalendarIdentifier(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAppointmentRecurrence3 { + #[inline] pub unsafe fn get_calendar_identifier(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + let hr = ((*self.lpVtbl).get_CalendarIdentifier)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_body(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_Body)(self, value.get()); + } + RT_CLASS!{class AppointmentRecurrence: IAppointmentRecurrence} + DEFINE_IID!(IID_IAppointment, 3707776815, 11229, 16502, 144, 163, 34, 194, 117, 49, 41, 101); + RT_INTERFACE!{interface IAppointment(IAppointmentVtbl): IInspectable(IInspectableVtbl) [IID_IAppointment] { + fn get_StartTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_StartTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Duration(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_Location(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Location(&mut self, value: HSTRING) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Subject(&mut self, value: HSTRING) -> HRESULT, + fn get_Details(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Details(&mut self, value: HSTRING) -> HRESULT, + fn get_Reminder(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Reminder(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Organizer(&mut self, out: *mut *mut AppointmentOrganizer) -> HRESULT, + fn put_Organizer(&mut self, value: *mut AppointmentOrganizer) -> HRESULT, + fn get_Invitees(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Recurrence(&mut self, out: *mut *mut AppointmentRecurrence) -> HRESULT, + fn put_Recurrence(&mut self, value: *mut AppointmentRecurrence) -> HRESULT, + fn get_BusyStatus(&mut self, out: *mut AppointmentBusyStatus) -> HRESULT, + fn put_BusyStatus(&mut self, value: AppointmentBusyStatus) -> HRESULT, + fn get_AllDay(&mut self, out: *mut bool) -> HRESULT, + fn put_AllDay(&mut self, value: bool) -> HRESULT, + fn get_Sensitivity(&mut self, out: *mut AppointmentSensitivity) -> HRESULT, + fn put_Sensitivity(&mut self, value: AppointmentSensitivity) -> HRESULT, + fn get_Uri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_Uri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT + }} + impl IAppointment { + #[inline] pub unsafe fn get_start_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_start_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_StartTime)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_encoding(&mut self) -> Result { + #[inline] pub unsafe fn get_duration(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Encoding)(self, &mut out); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_encoding(&mut self, value: SmsEncoding) -> Result<()> { - let hr = ((*self.lpVtbl).put_Encoding)(self, value); + #[inline] pub unsafe fn set_duration(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Duration)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn to_binary_messages(&mut self, format: SmsDataFormat) -> Result>> { + #[inline] pub unsafe fn get_location(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ToBinaryMessages)(self, format, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Location)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_ISmsTextMessageStatics, 2137572845, 15564, 18339, 140, 85, 56, 13, 59, 1, 8, 146); - RT_INTERFACE!{static interface ISmsTextMessageStatics(ISmsTextMessageStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsTextMessageStatics] { - fn FromBinaryMessage(&mut self, binaryMessage: *mut SmsBinaryMessage, out: *mut *mut SmsTextMessage) -> HRESULT, - fn FromBinaryData(&mut self, format: SmsDataFormat, valueSize: u32, value: *mut u8, out: *mut *mut SmsTextMessage) -> HRESULT - }} - impl ISmsTextMessageStatics { - #[inline] pub unsafe fn from_binary_message(&mut self, binaryMessage: &SmsBinaryMessage) -> Result> { + #[inline] pub unsafe fn set_location(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Location)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_subject(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromBinaryMessage)(self, binaryMessage as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_binary_data(&mut self, format: SmsDataFormat, value: &[u8]) -> Result> { + #[inline] pub unsafe fn set_subject(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Subject)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_details(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromBinaryData)(self, format, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Details)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class SmsTextMessage: ISmsTextMessage} - RT_ACTIVATABLE!{ISmsTextMessageStatics [CLSID_SmsTextMessage]} - DEFINE_CLSID!(CLSID_SmsTextMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,84,101,120,116,77,101,115,115,97,103,101,0]); - RT_ENUM! { enum SmsMessageFilter: i32 { - All (SmsMessageFilter_All) = 0, Unread (SmsMessageFilter_Unread) = 1, Read (SmsMessageFilter_Read) = 2, Sent (SmsMessageFilter_Sent) = 3, Draft (SmsMessageFilter_Draft) = 4, - }} - RT_CLASS!{class DeleteSmsMessageOperation: super::super::foundation::IAsyncAction} - RT_CLASS!{class DeleteSmsMessagesOperation: super::super::foundation::IAsyncAction} - RT_CLASS!{class GetSmsMessageOperation: super::super::foundation::IAsyncOperation} - RT_CLASS!{class GetSmsMessagesOperation: super::super::foundation::IAsyncOperationWithProgress, i32>} - DEFINE_IID!(IID_ISmsDeviceMessageStore, 2559177299, 61832, 17447, 141, 84, 206, 12, 36, 35, 197, 193); - RT_INTERFACE!{interface ISmsDeviceMessageStore(ISmsDeviceMessageStoreVtbl): IInspectable(IInspectableVtbl) [IID_ISmsDeviceMessageStore] { - fn DeleteMessageAsync(&mut self, messageId: u32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteMessagesAsync(&mut self, messageFilter: SmsMessageFilter, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetMessageAsync(&mut self, messageId: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetMessagesAsync(&mut self, messageFilter: SmsMessageFilter, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress, i32>) -> HRESULT, - fn get_MaxMessages(&mut self, out: *mut u32) -> HRESULT - }} - impl ISmsDeviceMessageStore { - #[inline] pub unsafe fn delete_message_async(&mut self, messageId: u32) -> Result> { + #[inline] pub unsafe fn set_details(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Details)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_reminder(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).DeleteMessageAsync)(self, messageId, &mut out); + let hr = ((*self.lpVtbl).get_Reminder)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn delete_messages_async(&mut self, messageFilter: SmsMessageFilter) -> Result> { + #[inline] pub unsafe fn set_reminder(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Reminder)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_organizer(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).DeleteMessagesAsync)(self, messageFilter, &mut out); + let hr = ((*self.lpVtbl).get_Organizer)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_message_async(&mut self, messageId: u32) -> Result>> { + #[inline] pub unsafe fn set_organizer(&mut self, value: &AppointmentOrganizer) -> Result<()> { + let hr = ((*self.lpVtbl).put_Organizer)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_invitees(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetMessageAsync)(self, messageId, &mut out); + let hr = ((*self.lpVtbl).get_Invitees)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_messages_async(&mut self, messageFilter: SmsMessageFilter) -> Result, i32>>> { + #[inline] pub unsafe fn get_recurrence(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetMessagesAsync)(self, messageFilter, &mut out); + let hr = ((*self.lpVtbl).get_Recurrence)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_max_messages(&mut self) -> Result { + #[inline] pub unsafe fn set_recurrence(&mut self, value: &AppointmentRecurrence) -> Result<()> { + let hr = ((*self.lpVtbl).put_Recurrence)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_busy_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxMessages)(self, &mut out); + let hr = ((*self.lpVtbl).get_BusyStatus)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class SmsDeviceMessageStore: ISmsDeviceMessageStore} - RT_CLASS!{class SendSmsMessageOperation: super::super::foundation::IAsyncAction} - DEFINE_IID!(IID_ISmsMessageReceivedEventArgs, 149424792, 47333, 16833, 163, 216, 211, 171, 250, 226, 38, 117); - RT_INTERFACE!{interface ISmsMessageReceivedEventArgs(ISmsMessageReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageReceivedEventArgs] { - fn get_TextMessage(&mut self, out: *mut *mut SmsTextMessage) -> HRESULT, - fn get_BinaryMessage(&mut self, out: *mut *mut SmsBinaryMessage) -> HRESULT - }} - impl ISmsMessageReceivedEventArgs { - #[inline] pub unsafe fn get_text_message(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_TextMessage)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_busy_status(&mut self, value: AppointmentBusyStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_BusyStatus)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_binary_message(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BinaryMessage)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_all_day(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllDay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class SmsMessageReceivedEventArgs: ISmsMessageReceivedEventArgs} - DEFINE_IID!(IID_SmsMessageReceivedEventHandler, 192599049, 60461, 18382, 162, 83, 115, 43, 238, 235, 202, 205); - RT_DELEGATE!{delegate SmsMessageReceivedEventHandler(SmsMessageReceivedEventHandlerVtbl, SmsMessageReceivedEventHandlerImpl) [IID_SmsMessageReceivedEventHandler] { - fn Invoke(&mut self, sender: *mut SmsDevice, e: *mut SmsMessageReceivedEventArgs) -> HRESULT - }} - impl SmsMessageReceivedEventHandler { - #[inline] pub unsafe fn invoke(&mut self, sender: &SmsDevice, e: &SmsMessageReceivedEventArgs) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + #[inline] pub unsafe fn set_all_day(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllDay)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class SmsDevice: ISmsDevice} - RT_ACTIVATABLE!{ISmsDeviceStatics [CLSID_SmsDevice]} - RT_ACTIVATABLE!{ISmsDeviceStatics2 [CLSID_SmsDevice]} - DEFINE_CLSID!(CLSID_SmsDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,68,101,118,105,99,101,0]); - DEFINE_IID!(IID_SmsDeviceStatusChangedEventHandler, 2552959330, 15831, 17944, 175, 137, 12, 39, 45, 93, 6, 216); - RT_DELEGATE!{delegate SmsDeviceStatusChangedEventHandler(SmsDeviceStatusChangedEventHandlerVtbl, SmsDeviceStatusChangedEventHandlerImpl) [IID_SmsDeviceStatusChangedEventHandler] { - fn Invoke(&mut self, sender: *mut SmsDevice) -> HRESULT - }} - impl SmsDeviceStatusChangedEventHandler { - #[inline] pub unsafe fn invoke(&mut self, sender: &SmsDevice) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); + #[inline] pub unsafe fn get_sensitivity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Sensitivity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_sensitivity(&mut self, value: AppointmentSensitivity) -> Result<()> { + let hr = ((*self.lpVtbl).put_Sensitivity)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Uri)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class GetSmsDeviceOperation: super::super::foundation::IAsyncOperation} - DEFINE_IID!(IID_ISmsDeviceStatics, 4169992170, 55317, 19921, 162, 52, 69, 32, 206, 70, 4, 164); - RT_INTERFACE!{static interface ISmsDeviceStatics(ISmsDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsDeviceStatics] { - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + DEFINE_IID!(IID_IAppointment2, 1585813564, 21519, 13394, 155, 92, 13, 215, 173, 76, 101, 162); + RT_INTERFACE!{interface IAppointment2(IAppointment2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointment2] { + fn get_LocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CalendarId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RoamingId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RoamingId(&mut self, value: HSTRING) -> HRESULT, + fn get_OriginalStartTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_IsResponseRequested(&mut self, out: *mut bool) -> HRESULT, + fn put_IsResponseRequested(&mut self, value: bool) -> HRESULT, + fn get_AllowNewTimeProposal(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowNewTimeProposal(&mut self, value: bool) -> HRESULT, + fn get_OnlineMeetingLink(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_OnlineMeetingLink(&mut self, value: HSTRING) -> HRESULT, + fn get_ReplyTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ReplyTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_UserResponse(&mut self, out: *mut AppointmentParticipantResponse) -> HRESULT, + fn put_UserResponse(&mut self, value: AppointmentParticipantResponse) -> HRESULT, + fn get_HasInvitees(&mut self, out: *mut bool) -> HRESULT, + fn get_IsCanceledMeeting(&mut self, out: *mut bool) -> HRESULT, + fn put_IsCanceledMeeting(&mut self, value: bool) -> HRESULT, + fn get_IsOrganizedByUser(&mut self, out: *mut bool) -> HRESULT, + fn put_IsOrganizedByUser(&mut self, value: bool) -> HRESULT }} - impl ISmsDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + impl IAppointment2 { + #[inline] pub unsafe fn get_local_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + let hr = ((*self.lpVtbl).get_LocalId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn get_calendar_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_CalendarId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_roaming_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_RoamingId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_ISmsDeviceStatics2, 748756103, 2163, 19631, 138, 125, 189, 71, 30, 133, 134, 209); - RT_INTERFACE!{static interface ISmsDeviceStatics2(ISmsDeviceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmsDeviceStatics2] { - fn FromNetworkAccountIdAsync(&mut self, networkAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl ISmsDeviceStatics2 { - #[inline] pub unsafe fn from_network_account_id_async(&mut self, networkAccountId: &HStringArg) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromNetworkAccountIdAsync)(self, networkAccountId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_roaming_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RoamingId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_ISmsDevice, 152539629, 34603, 20204, 156, 114, 171, 17, 98, 123, 52, 236); - RT_INTERFACE!{interface ISmsDevice(ISmsDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ISmsDevice] { - fn SendMessageAsync(&mut self, message: *mut ISmsMessage, out: *mut *mut SendSmsMessageOperation) -> HRESULT, - fn CalculateLength(&mut self, message: *mut SmsTextMessage, out: *mut SmsEncodedLength) -> HRESULT, - fn get_AccountPhoneNumber(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_CellularClass(&mut self, out: *mut CellularClass) -> HRESULT, - fn get_MessageStore(&mut self, out: *mut *mut SmsDeviceMessageStore) -> HRESULT, - fn get_DeviceStatus(&mut self, out: *mut SmsDeviceStatus) -> HRESULT, - fn add_SmsMessageReceived(&mut self, eventHandler: *mut SmsMessageReceivedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SmsMessageReceived(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SmsDeviceStatusChanged(&mut self, eventHandler: *mut SmsDeviceStatusChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SmsDeviceStatusChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl ISmsDevice { - #[inline] pub unsafe fn send_message_async(&mut self, message: &ISmsMessage) -> Result> { + #[inline] pub unsafe fn get_original_start_time(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SendMessageAsync)(self, message as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_OriginalStartTime)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn calculate_length(&mut self, message: &SmsTextMessage) -> Result { + #[inline] pub unsafe fn get_is_response_requested(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).CalculateLength)(self, message as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IsResponseRequested)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_account_phone_number(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AccountPhoneNumber)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_is_response_requested(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsResponseRequested)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_cellular_class(&mut self) -> Result { + #[inline] pub unsafe fn get_allow_new_time_proposal(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CellularClass)(self, &mut out); + let hr = ((*self.lpVtbl).get_AllowNewTimeProposal)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_message_store(&mut self) -> Result> { + #[inline] pub unsafe fn set_allow_new_time_proposal(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowNewTimeProposal)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_online_meeting_link(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_MessageStore)(self, &mut out); + let hr = ((*self.lpVtbl).get_OnlineMeetingLink)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_online_meeting_link(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_OnlineMeetingLink)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_reply_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ReplyTime)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_status(&mut self) -> Result { + #[inline] pub unsafe fn set_reply_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReplyTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_response(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DeviceStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_UserResponse)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn add_sms_message_received(&mut self, eventHandler: &SmsMessageReceivedEventHandler) -> Result { + #[inline] pub unsafe fn set_user_response(&mut self, value: AppointmentParticipantResponse) -> Result<()> { + let hr = ((*self.lpVtbl).put_UserResponse)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_invitees(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SmsMessageReceived)(self, eventHandler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_HasInvitees)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_sms_message_received(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SmsMessageReceived)(self, eventCookie); + #[inline] pub unsafe fn get_is_canceled_meeting(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceledMeeting)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_canceled_meeting(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsCanceledMeeting)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_sms_device_status_changed(&mut self, eventHandler: &SmsDeviceStatusChangedEventHandler) -> Result { + #[inline] pub unsafe fn get_is_organized_by_user(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SmsDeviceStatusChanged)(self, eventHandler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IsOrganizedByUser)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_sms_device_status_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SmsDeviceStatusChanged)(self, eventCookie); + #[inline] pub unsafe fn set_is_organized_by_user(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsOrganizedByUser)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_ISmsReceivedEventDetails, 1538592533, 58477, 19586, 132, 125, 90, 3, 4, 193, 213, 61); - RT_INTERFACE!{interface ISmsReceivedEventDetails(ISmsReceivedEventDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsReceivedEventDetails] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_MessageIndex(&mut self, out: *mut u32) -> HRESULT + RT_ENUM! { enum AppointmentDetailsKind: i32 { + PlainText (AppointmentDetailsKind_PlainText) = 0, Html (AppointmentDetailsKind_Html) = 1, }} - impl ISmsReceivedEventDetails { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + DEFINE_IID!(IID_IAppointment3, 3217835433, 35169, 18833, 147, 75, 196, 135, 104, 229, 169, 108); + RT_INTERFACE!{interface IAppointment3(IAppointment3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointment3] { + fn get_ChangeNumber(&mut self, out: *mut u64) -> HRESULT, + fn get_RemoteChangeNumber(&mut self, out: *mut u64) -> HRESULT, + fn put_RemoteChangeNumber(&mut self, value: u64) -> HRESULT, + fn get_DetailsKind(&mut self, out: *mut AppointmentDetailsKind) -> HRESULT, + fn put_DetailsKind(&mut self, value: AppointmentDetailsKind) -> HRESULT + }} + impl IAppointment3 { + #[inline] pub unsafe fn get_change_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ChangeNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_message_index(&mut self) -> Result { + #[inline] pub unsafe fn get_remote_change_number(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MessageIndex)(self, &mut out); + let hr = ((*self.lpVtbl).get_RemoteChangeNumber)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_ISmsReceivedEventDetails2, 1088445574, 42932, 18289, 154, 231, 11, 95, 251, 18, 192, 58); - RT_INTERFACE!{interface ISmsReceivedEventDetails2(ISmsReceivedEventDetails2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmsReceivedEventDetails2] { - fn get_MessageClass(&mut self, out: *mut SmsMessageClass) -> HRESULT, - fn get_BinaryMessage(&mut self, out: *mut *mut SmsBinaryMessage) -> HRESULT - }} - impl ISmsReceivedEventDetails2 { - #[inline] pub unsafe fn get_message_class(&mut self) -> Result { + #[inline] pub unsafe fn set_remote_change_number(&mut self, value: u64) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteChangeNumber)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_details_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MessageClass)(self, &mut out); + let hr = ((*self.lpVtbl).get_DetailsKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_binary_message(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BinaryMessage)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_details_kind(&mut self, value: AppointmentDetailsKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_DetailsKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class SmsReceivedEventDetails: ISmsReceivedEventDetails} -} // Windows.Devices.Sms -pub mod alljoyn { // Windows.Devices.AllJoyn -use ::prelude::*; - RT_ENUM! { enum AllJoynAuthenticationMechanism: i32 { - None (AllJoynAuthenticationMechanism_None) = 0, SrpAnonymous (AllJoynAuthenticationMechanism_SrpAnonymous) = 1, SrpLogon (AllJoynAuthenticationMechanism_SrpLogon) = 2, EcdheNull (AllJoynAuthenticationMechanism_EcdheNull) = 3, EcdhePsk (AllJoynAuthenticationMechanism_EcdhePsk) = 4, EcdheEcdsa (AllJoynAuthenticationMechanism_EcdheEcdsa) = 5, EcdheSpeke (AllJoynAuthenticationMechanism_EcdheSpeke) = 6, + RT_ACTIVATABLE!{IAppointmentManagerStatics3 [CLSID_AppointmentManager]} + RT_ACTIVATABLE!{IAppointmentManagerStatics2 [CLSID_AppointmentManager]} + RT_ACTIVATABLE!{IAppointmentManagerStatics [CLSID_AppointmentManager]} + DEFINE_CLSID!(CLSID_AppointmentManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,65,112,112,111,105,110,116,109,101,110,116,115,46,65,112,112,111,105,110,116,109,101,110,116,77,97,110,97,103,101,114,0]); + RT_ENUM! { enum FindAppointmentCalendarsOptions: u32 { + None (FindAppointmentCalendarsOptions_None) = 0, IncludeHidden (FindAppointmentCalendarsOptions_IncludeHidden) = 1, }} - DEFINE_IID!(IID_IAllJoynStatusStatics, 3501695358, 3369, 19881, 138, 198, 84, 197, 84, 190, 219, 197); - RT_INTERFACE!{static interface IAllJoynStatusStatics(IAllJoynStatusStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynStatusStatics] { - fn get_Ok(&mut self, out: *mut i32) -> HRESULT, - fn get_Fail(&mut self, out: *mut i32) -> HRESULT, - fn get_OperationTimedOut(&mut self, out: *mut i32) -> HRESULT, - fn get_OtherEndClosed(&mut self, out: *mut i32) -> HRESULT, - fn get_ConnectionRefused(&mut self, out: *mut i32) -> HRESULT, - fn get_AuthenticationFailed(&mut self, out: *mut i32) -> HRESULT, - fn get_AuthenticationRejectedByUser(&mut self, out: *mut i32) -> HRESULT, - fn get_SslConnectFailed(&mut self, out: *mut i32) -> HRESULT, - fn get_SslIdentityVerificationFailed(&mut self, out: *mut i32) -> HRESULT, - fn get_InsufficientSecurity(&mut self, out: *mut i32) -> HRESULT, - fn get_InvalidArgument1(&mut self, out: *mut i32) -> HRESULT, - fn get_InvalidArgument2(&mut self, out: *mut i32) -> HRESULT, - fn get_InvalidArgument3(&mut self, out: *mut i32) -> HRESULT, - fn get_InvalidArgument4(&mut self, out: *mut i32) -> HRESULT, - fn get_InvalidArgument5(&mut self, out: *mut i32) -> HRESULT, - fn get_InvalidArgument6(&mut self, out: *mut i32) -> HRESULT, - fn get_InvalidArgument7(&mut self, out: *mut i32) -> HRESULT, - fn get_InvalidArgument8(&mut self, out: *mut i32) -> HRESULT + DEFINE_IID!(IID_IFindAppointmentsOptions, 1442307157, 39234, 12422, 130, 181, 44, 178, 159, 100, 213, 245); + RT_INTERFACE!{interface IFindAppointmentsOptions(IFindAppointmentsOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IFindAppointmentsOptions] { + fn get_CalendarIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_FetchProperties(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_IncludeHidden(&mut self, out: *mut bool) -> HRESULT, + fn put_IncludeHidden(&mut self, value: bool) -> HRESULT, + fn get_MaxCount(&mut self, out: *mut u32) -> HRESULT, + fn put_MaxCount(&mut self, value: u32) -> HRESULT }} - impl IAllJoynStatusStatics { - #[inline] pub unsafe fn get_ok(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ok)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IFindAppointmentsOptions { + #[inline] pub unsafe fn get_calendar_ids(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CalendarIds)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_fail(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Fail)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_fetch_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FetchProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_operation_timed_out(&mut self) -> Result { + #[inline] pub unsafe fn get_include_hidden(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_OperationTimedOut)(self, &mut out); + let hr = ((*self.lpVtbl).get_IncludeHidden)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_other_end_closed(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_OtherEndClosed)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_include_hidden(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IncludeHidden)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_connection_refused(&mut self) -> Result { + #[inline] pub unsafe fn get_max_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ConnectionRefused)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_authentication_failed(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AuthenticationFailed)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_max_count(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxCount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_authentication_rejected_by_user(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AuthenticationRejectedByUser)(self, &mut out); + } + RT_ENUM! { enum AppointmentSummaryCardView: i32 { + System (AppointmentSummaryCardView_System) = 0, App (AppointmentSummaryCardView_App) = 1, + }} + RT_ENUM! { enum AppointmentCalendarOtherAppReadAccess: i32 { + SystemOnly (AppointmentCalendarOtherAppReadAccess_SystemOnly) = 0, Limited (AppointmentCalendarOtherAppReadAccess_Limited) = 1, Full (AppointmentCalendarOtherAppReadAccess_Full) = 2, None (AppointmentCalendarOtherAppReadAccess_None) = 3, + }} + RT_ENUM! { enum AppointmentCalendarOtherAppWriteAccess: i32 { + None (AppointmentCalendarOtherAppWriteAccess_None) = 0, SystemOnly (AppointmentCalendarOtherAppWriteAccess_SystemOnly) = 1, Limited (AppointmentCalendarOtherAppWriteAccess_Limited) = 2, + }} + DEFINE_IID!(IID_IAppointmentCalendar, 1383301533, 33593, 15695, 160, 47, 100, 8, 68, 82, 187, 93); + RT_INTERFACE!{interface IAppointmentCalendar(IAppointmentCalendarVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendar] { + #[cfg(not(feature="windows.ui"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_DisplayColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_LocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsHidden(&mut self, out: *mut bool) -> HRESULT, + fn get_OtherAppReadAccess(&mut self, out: *mut AppointmentCalendarOtherAppReadAccess) -> HRESULT, + fn put_OtherAppReadAccess(&mut self, value: AppointmentCalendarOtherAppReadAccess) -> HRESULT, + fn get_OtherAppWriteAccess(&mut self, out: *mut AppointmentCalendarOtherAppWriteAccess) -> HRESULT, + fn put_OtherAppWriteAccess(&mut self, value: AppointmentCalendarOtherAppWriteAccess) -> HRESULT, + fn get_SourceDisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SummaryCardView(&mut self, out: *mut AppointmentSummaryCardView) -> HRESULT, + fn put_SummaryCardView(&mut self, value: AppointmentSummaryCardView) -> HRESULT, + fn FindAppointmentsAsync(&mut self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAppointmentsAsyncWithOptions(&mut self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, options: *mut FindAppointmentsOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindExceptionsFromMasterAsync(&mut self, masterLocalId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAllInstancesAsync(&mut self, masterLocalId: HSTRING, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAllInstancesAsyncWithOptions(&mut self, masterLocalId: HSTRING, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, pOptions: *mut FindAppointmentsOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetAppointmentAsync(&mut self, localId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAppointmentInstanceAsync(&mut self, localId: HSTRING, instanceStartTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindUnexpandedAppointmentsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindUnexpandedAppointmentsAsyncWithOptions(&mut self, options: *mut FindAppointmentsOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn DeleteAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SaveAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteAppointmentAsync(&mut self, localId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteAppointmentInstanceAsync(&mut self, localId: HSTRING, instanceStartTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SaveAppointmentAsync(&mut self, pAppointment: *mut Appointment, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IAppointmentCalendar { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_display_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DisplayColor)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ssl_connect_failed(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SslConnectFailed)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ssl_identity_verification_failed(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SslIdentityVerificationFailed)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_insufficient_security(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InsufficientSecurity)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_local_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_invalid_argument1(&mut self) -> Result { + #[inline] pub unsafe fn get_is_hidden(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InvalidArgument1)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsHidden)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_invalid_argument2(&mut self) -> Result { + #[inline] pub unsafe fn get_other_app_read_access(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InvalidArgument2)(self, &mut out); + let hr = ((*self.lpVtbl).get_OtherAppReadAccess)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_invalid_argument3(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InvalidArgument3)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_other_app_read_access(&mut self, value: AppointmentCalendarOtherAppReadAccess) -> Result<()> { + let hr = ((*self.lpVtbl).put_OtherAppReadAccess)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_invalid_argument4(&mut self) -> Result { + #[inline] pub unsafe fn get_other_app_write_access(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InvalidArgument4)(self, &mut out); + let hr = ((*self.lpVtbl).get_OtherAppWriteAccess)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_invalid_argument5(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InvalidArgument5)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_other_app_write_access(&mut self, value: AppointmentCalendarOtherAppWriteAccess) -> Result<()> { + let hr = ((*self.lpVtbl).put_OtherAppWriteAccess)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_invalid_argument6(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InvalidArgument6)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_source_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceDisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_invalid_argument7(&mut self) -> Result { + #[inline] pub unsafe fn get_summary_card_view(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InvalidArgument7)(self, &mut out); + let hr = ((*self.lpVtbl).get_SummaryCardView)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_invalid_argument8(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InvalidArgument8)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_summary_card_view(&mut self, value: AppointmentSummaryCardView) -> Result<()> { + let hr = ((*self.lpVtbl).put_SummaryCardView)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_ACTIVATABLE!{IAllJoynStatusStatics [CLSID_AllJoynStatus]} - DEFINE_CLSID!(CLSID_AllJoynStatus = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,116,97,116,117,115,0]); - RT_ENUM! { enum AllJoynBusAttachmentState: i32 { - Disconnected (AllJoynBusAttachmentState_Disconnected) = 0, Connecting (AllJoynBusAttachmentState_Connecting) = 1, Connected (AllJoynBusAttachmentState_Connected) = 2, Disconnecting (AllJoynBusAttachmentState_Disconnecting) = 3, - }} - DEFINE_IID!(IID_IAllJoynBusAttachment, 4077515091, 7917, 17091, 162, 14, 67, 109, 65, 254, 98, 246); - RT_INTERFACE!{interface IAllJoynBusAttachment(IAllJoynBusAttachmentVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusAttachment] { - fn get_AboutData(&mut self, out: *mut *mut AllJoynAboutData) -> HRESULT, - fn get_ConnectionSpecification(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_State(&mut self, out: *mut AllJoynBusAttachmentState) -> HRESULT, - fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT, - fn PingAsync(&mut self, uniqueName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn Connect(&mut self) -> HRESULT, - fn Disconnect(&mut self) -> HRESULT, - fn add_StateChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_AuthenticationMechanisms(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn add_CredentialsRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CredentialsRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CredentialsVerificationRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CredentialsVerificationRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AuthenticationComplete(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AuthenticationComplete(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IAllJoynBusAttachment { - #[inline] pub unsafe fn get_about_data(&mut self) -> Result> { + #[inline] pub unsafe fn find_appointments_async(&mut self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AboutData)(self, &mut out); + let hr = ((*self.lpVtbl).FindAppointmentsAsync)(self, rangeStart, rangeLength, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_connection_specification(&mut self) -> Result { + #[inline] pub unsafe fn find_appointments_async_with_options(&mut self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, options: &FindAppointmentsOptions) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ConnectionSpecification)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).FindAppointmentsAsyncWithOptions)(self, rangeStart, rangeLength, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_state(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_State)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn find_exceptions_from_master_async(&mut self, masterLocalId: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindExceptionsFromMasterAsync)(self, masterLocalId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { + #[inline] pub unsafe fn find_all_instances_async(&mut self, masterLocalId: &HStringArg, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).FindAllInstancesAsync)(self, masterLocalId.get(), rangeStart, rangeLength, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn ping_async(&mut self, uniqueName: &HStringArg) -> Result>> { + #[inline] pub unsafe fn find_all_instances_async_with_options(&mut self, masterLocalId: &HStringArg, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, pOptions: &FindAppointmentsOptions) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).PingAsync)(self, uniqueName.get(), &mut out); + let hr = ((*self.lpVtbl).FindAllInstancesAsyncWithOptions)(self, masterLocalId.get(), rangeStart, rangeLength, pOptions as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn connect(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Connect)(self); + #[inline] pub unsafe fn get_appointment_async(&mut self, localId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAppointmentAsync)(self, localId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_appointment_instance_async(&mut self, localId: &HStringArg, instanceStartTime: super::super::foundation::DateTime) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAppointmentInstanceAsync)(self, localId.get(), instanceStartTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_unexpanded_appointments_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindUnexpandedAppointmentsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_unexpanded_appointments_async_with_options(&mut self, options: &FindAppointmentsOptions) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindUnexpandedAppointmentsAsyncWithOptions)(self, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn save_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_appointment_async(&mut self, localId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAppointmentAsync)(self, localId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_appointment_instance_async(&mut self, localId: &HStringArg, instanceStartTime: super::super::foundation::DateTime) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAppointmentInstanceAsync)(self, localId.get(), instanceStartTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn save_appointment_async(&mut self, pAppointment: &Appointment) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAppointmentAsync)(self, pAppointment as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FindAppointmentsOptions: IFindAppointmentsOptions} + RT_CLASS!{class AppointmentException: IAppointmentException} + DEFINE_IID!(IID_IAppointmentCalendar2, 417850402, 9319, 19996, 164, 89, 216, 162, 147, 3, 208, 146); + RT_INTERFACE!{interface IAppointmentCalendar2(IAppointmentCalendar2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendar2] { + fn get_SyncManager(&mut self, out: *mut *mut AppointmentCalendarSyncManager) -> HRESULT, + fn get_RemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RemoteId(&mut self, value: HSTRING) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_DisplayColor(&mut self, value: super::super::ui::Color) -> HRESULT, + fn put_IsHidden(&mut self, value: bool) -> HRESULT, + fn get_UserDataAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CanCreateOrUpdateAppointments(&mut self, out: *mut bool) -> HRESULT, + fn put_CanCreateOrUpdateAppointments(&mut self, value: bool) -> HRESULT, + fn get_CanCancelMeetings(&mut self, out: *mut bool) -> HRESULT, + fn put_CanCancelMeetings(&mut self, value: bool) -> HRESULT, + fn get_CanForwardMeetings(&mut self, out: *mut bool) -> HRESULT, + fn put_CanForwardMeetings(&mut self, value: bool) -> HRESULT, + fn get_CanProposeNewTimeForMeetings(&mut self, out: *mut bool) -> HRESULT, + fn put_CanProposeNewTimeForMeetings(&mut self, value: bool) -> HRESULT, + fn get_CanUpdateMeetingResponses(&mut self, out: *mut bool) -> HRESULT, + fn put_CanUpdateMeetingResponses(&mut self, value: bool) -> HRESULT, + fn get_CanNotifyInvitees(&mut self, out: *mut bool) -> HRESULT, + fn put_CanNotifyInvitees(&mut self, value: bool) -> HRESULT, + fn get_MustNofityInvitees(&mut self, out: *mut bool) -> HRESULT, + fn put_MustNofityInvitees(&mut self, value: bool) -> HRESULT, + fn TryCreateOrUpdateAppointmentAsync(&mut self, appointment: *mut Appointment, notifyInvitees: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryCancelMeetingAsync(&mut self, meeting: *mut Appointment, subject: HSTRING, comment: HSTRING, notifyInvitees: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryForwardMeetingAsync(&mut self, meeting: *mut Appointment, invitees: *mut super::super::foundation::collections::IIterable, subject: HSTRING, forwardHeader: HSTRING, comment: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryProposeNewTimeForMeetingAsync(&mut self, meeting: *mut Appointment, newStartTime: super::super::foundation::DateTime, newDuration: super::super::foundation::TimeSpan, subject: HSTRING, comment: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryUpdateMeetingResponseAsync(&mut self, meeting: *mut Appointment, response: AppointmentParticipantResponse, subject: HSTRING, comment: HSTRING, sendUpdate: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IAppointmentCalendar2 { + #[inline] pub unsafe fn get_sync_manager(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SyncManager)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_remote_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteId)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn disconnect(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Disconnect)(self); + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_display_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayColor)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_state_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn set_is_hidden(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsHidden)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_data_account_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserDataAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_create_or_update_appointments(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_StateChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanCreateOrUpdateAppointments)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_state_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_StateChanged)(self, token); + #[inline] pub unsafe fn set_can_create_or_update_appointments(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanCreateOrUpdateAppointments)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_authentication_mechanisms(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AuthenticationMechanisms)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_credentials_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_cancel_meetings(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_CredentialsRequested)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanCancelMeetings)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_credentials_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_CredentialsRequested)(self, token); + #[inline] pub unsafe fn set_can_cancel_meetings(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanCancelMeetings)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_credentials_verification_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_forward_meetings(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_CredentialsVerificationRequested)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanForwardMeetings)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_credentials_verification_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_CredentialsVerificationRequested)(self, token); + #[inline] pub unsafe fn set_can_forward_meetings(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanForwardMeetings)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_authentication_complete(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_propose_new_time_for_meetings(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AuthenticationComplete)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanProposeNewTimeForMeetings)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_authentication_complete(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AuthenticationComplete)(self, token); + #[inline] pub unsafe fn set_can_propose_new_time_for_meetings(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanProposeNewTimeForMeetings)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class AllJoynAboutData: IAllJoynAboutData} - RT_CLASS!{class AllJoynBusAttachment: IAllJoynBusAttachment [IAllJoynBusAttachmentFactory] [CLSID_AllJoynBusAttachment]} - RT_ACTIVATABLE!{IAllJoynBusAttachmentStatics [CLSID_AllJoynBusAttachment]} - DEFINE_CLSID!(CLSID_AllJoynBusAttachment = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,66,117,115,65,116,116,97,99,104,109,101,110,116,0]); - RT_CLASS!{class AllJoynBusAttachmentStateChangedEventArgs: IAllJoynBusAttachmentStateChangedEventArgs} - RT_CLASS!{class AllJoynCredentialsRequestedEventArgs: IAllJoynCredentialsRequestedEventArgs} - RT_CLASS!{class AllJoynCredentialsVerificationRequestedEventArgs: IAllJoynCredentialsVerificationRequestedEventArgs} - RT_CLASS!{class AllJoynAuthenticationCompleteEventArgs: IAllJoynAuthenticationCompleteEventArgs} - DEFINE_IID!(IID_IAllJoynBusAttachment2, 880069406, 9064, 17330, 180, 62, 106, 58, 193, 39, 141, 152); - RT_INTERFACE!{interface IAllJoynBusAttachment2(IAllJoynBusAttachment2Vtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusAttachment2] { - fn GetAboutDataAsync(&mut self, serviceInfo: *mut AllJoynServiceInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.globalization"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.globalization")] fn GetAboutDataWithLanguageAsync(&mut self, serviceInfo: *mut AllJoynServiceInfo, language: *mut super::super::globalization::Language, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_AcceptSessionJoinerRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AcceptSessionJoinerRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SessionJoined(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SessionJoined(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IAllJoynBusAttachment2 { - #[inline] pub unsafe fn get_about_data_async(&mut self, serviceInfo: &AllJoynServiceInfo) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetAboutDataAsync)(self, serviceInfo as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_can_update_meeting_responses(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanUpdateMeetingResponses)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_about_data_with_language_async(&mut self, serviceInfo: &AllJoynServiceInfo, language: &super::super::globalization::Language) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetAboutDataWithLanguageAsync)(self, serviceInfo as *const _ as *mut _, language as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_can_update_meeting_responses(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanUpdateMeetingResponses)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_accept_session_joiner_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_notify_invitees(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AcceptSessionJoinerRequested)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanNotifyInvitees)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_accept_session_joiner_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AcceptSessionJoinerRequested)(self, token); + #[inline] pub unsafe fn set_can_notify_invitees(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanNotifyInvitees)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_session_joined(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_must_nofity_invitees(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SessionJoined)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_MustNofityInvitees)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_session_joined(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SessionJoined)(self, token); + #[inline] pub unsafe fn set_must_nofity_invitees(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_MustNofityInvitees)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class AllJoynServiceInfo: IAllJoynServiceInfo [IAllJoynServiceInfoFactory] [CLSID_AllJoynServiceInfo]} - RT_ACTIVATABLE!{IAllJoynServiceInfoStatics [CLSID_AllJoynServiceInfo]} - DEFINE_CLSID!(CLSID_AllJoynServiceInfo = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,114,118,105,99,101,73,110,102,111,0]); - RT_CLASS!{class AllJoynAboutDataView: IAllJoynAboutDataView} - RT_ACTIVATABLE!{IAllJoynAboutDataViewStatics [CLSID_AllJoynAboutDataView]} - DEFINE_CLSID!(CLSID_AllJoynAboutDataView = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,65,98,111,117,116,68,97,116,97,86,105,101,119,0]); - RT_CLASS!{class AllJoynAcceptSessionJoinerEventArgs: IAllJoynAcceptSessionJoinerEventArgs [IAllJoynAcceptSessionJoinerEventArgsFactory] [CLSID_AllJoynAcceptSessionJoinerEventArgs]} - DEFINE_CLSID!(CLSID_AllJoynAcceptSessionJoinerEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,65,99,99,101,112,116,83,101,115,115,105,111,110,74,111,105,110,101,114,69,118,101,110,116,65,114,103,115,0]); - RT_CLASS!{class AllJoynSessionJoinedEventArgs: IAllJoynSessionJoinedEventArgs [IAllJoynSessionJoinedEventArgsFactory] [CLSID_AllJoynSessionJoinedEventArgs]} - DEFINE_CLSID!(CLSID_AllJoynSessionJoinedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,115,115,105,111,110,74,111,105,110,101,100,69,118,101,110,116,65,114,103,115,0]); - DEFINE_IID!(IID_IAllJoynBusAttachmentStatics, 2208124221, 4177, 16599, 135, 42, 141, 1, 65, 17, 91, 31); - RT_INTERFACE!{static interface IAllJoynBusAttachmentStatics(IAllJoynBusAttachmentStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusAttachmentStatics] { - fn GetDefault(&mut self, out: *mut *mut AllJoynBusAttachment) -> HRESULT, - fn GetWatcher(&mut self, requiredInterfaces: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::enumeration::DeviceWatcher) -> HRESULT - }} - impl IAllJoynBusAttachmentStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + #[inline] pub unsafe fn try_create_or_update_appointment_async(&mut self, appointment: &Appointment, notifyInvitees: bool) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).TryCreateOrUpdateAppointmentAsync)(self, appointment as *const _ as *mut _, notifyInvitees, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_watcher(&mut self, requiredInterfaces: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub unsafe fn try_cancel_meeting_async(&mut self, meeting: &Appointment, subject: &HStringArg, comment: &HStringArg, notifyInvitees: bool) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetWatcher)(self, requiredInterfaces as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).TryCancelMeetingAsync)(self, meeting as *const _ as *mut _, subject.get(), comment.get(), notifyInvitees, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_forward_meeting_async(&mut self, meeting: &Appointment, invitees: &super::super::foundation::collections::IIterable, subject: &HStringArg, forwardHeader: &HStringArg, comment: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryForwardMeetingAsync)(self, meeting as *const _ as *mut _, invitees as *const _ as *mut _, subject.get(), forwardHeader.get(), comment.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_propose_new_time_for_meeting_async(&mut self, meeting: &Appointment, newStartTime: super::super::foundation::DateTime, newDuration: super::super::foundation::TimeSpan, subject: &HStringArg, comment: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryProposeNewTimeForMeetingAsync)(self, meeting as *const _ as *mut _, newStartTime, newDuration, subject.get(), comment.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_update_meeting_response_async(&mut self, meeting: &Appointment, response: AppointmentParticipantResponse, subject: &HStringArg, comment: &HStringArg, sendUpdate: bool) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryUpdateMeetingResponseAsync)(self, meeting as *const _ as *mut _, response, subject.get(), comment.get(), sendUpdate, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IAllJoynBusAttachmentStateChangedEventArgs, 3626923508, 49194, 16876, 168, 213, 234, 177, 85, 137, 83, 170); - RT_INTERFACE!{interface IAllJoynBusAttachmentStateChangedEventArgs(IAllJoynBusAttachmentStateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusAttachmentStateChangedEventArgs] { - fn get_State(&mut self, out: *mut AllJoynBusAttachmentState) -> HRESULT, - fn get_Status(&mut self, out: *mut i32) -> HRESULT + RT_CLASS!{class AppointmentCalendarSyncManager: IAppointmentCalendarSyncManager} + DEFINE_IID!(IID_IAppointmentCalendar3, 3944993323, 42629, 17070, 132, 149, 179, 17, 154, 219, 65, 103); + RT_INTERFACE!{interface IAppointmentCalendar3(IAppointmentCalendar3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendar3] { + fn RegisterSyncManagerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT }} - impl IAllJoynBusAttachmentStateChangedEventArgs { - #[inline] pub unsafe fn get_state(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_State)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IAppointmentCalendar3 { + #[inline] pub unsafe fn register_sync_manager_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RegisterSyncManagerAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result { + } + DEFINE_IID!(IID_IAppointmentCalendarSyncManager, 723628960, 19199, 17298, 188, 95, 86, 69, 255, 207, 251, 23); + RT_INTERFACE!{interface IAppointmentCalendarSyncManager(IAppointmentCalendarSyncManagerVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarSyncManager] { + fn get_Status(&mut self, out: *mut AppointmentCalendarSyncStatus) -> HRESULT, + fn get_LastSuccessfulSyncTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_LastAttemptedSyncTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn SyncAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_SyncStatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAppointmentCalendarSyncManager { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynCredentials, 2185646322, 41360, 16561, 171, 171, 52, 158, 194, 68, 223, 170); - RT_INTERFACE!{interface IAllJoynCredentials(IAllJoynCredentialsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynCredentials] { - fn get_AuthenticationMechanism(&mut self, out: *mut AllJoynAuthenticationMechanism) -> HRESULT, - #[cfg(not(feature="windows.security"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.security")] fn get_Certificate(&mut self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, - #[cfg(not(feature="windows.security"))] fn __Dummy2(&mut self) -> (), - #[cfg(feature="windows.security")] fn put_Certificate(&mut self, value: *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, - #[cfg(not(feature="windows.security"))] fn __Dummy3(&mut self) -> (), - #[cfg(feature="windows.security")] fn get_PasswordCredential(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, - #[cfg(not(feature="windows.security"))] fn __Dummy4(&mut self) -> (), - #[cfg(feature="windows.security")] fn put_PasswordCredential(&mut self, value: *mut super::super::security::credentials::PasswordCredential) -> HRESULT, - fn get_Timeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Timeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT - }} - impl IAllJoynCredentials { - #[inline] pub unsafe fn get_authentication_mechanism(&mut self) -> Result { + #[inline] pub unsafe fn get_last_successful_sync_time(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AuthenticationMechanism)(self, &mut out); + let hr = ((*self.lpVtbl).get_LastSuccessfulSyncTime)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_certificate(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Certificate)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_certificate(&mut self, value: &super::super::security::cryptography::certificates::Certificate) -> Result<()> { - let hr = ((*self.lpVtbl).put_Certificate)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_last_attempted_sync_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastAttemptedSyncTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_password_credential(&mut self) -> Result> { + #[inline] pub unsafe fn sync_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PasswordCredential)(self, &mut out); + let hr = ((*self.lpVtbl).SyncAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_password_credential(&mut self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { - let hr = ((*self.lpVtbl).put_PasswordCredential)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_timeout(&mut self) -> Result { + #[inline] pub unsafe fn add_sync_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timeout)(self, &mut out); + let hr = ((*self.lpVtbl).add_SyncStatusChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { - let hr = ((*self.lpVtbl).put_Timeout)(self, value); + #[inline] pub unsafe fn remove_sync_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SyncStatusChanged)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class AllJoynCredentials: IAllJoynCredentials} - DEFINE_IID!(IID_IAllJoynCredentialsRequestedEventArgs, 1787290446, 45161, 19328, 158, 26, 65, 188, 131, 124, 101, 210); - RT_INTERFACE!{interface IAllJoynCredentialsRequestedEventArgs(IAllJoynCredentialsRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynCredentialsRequestedEventArgs] { - fn get_AttemptCount(&mut self, out: *mut u16) -> HRESULT, - fn get_Credentials(&mut self, out: *mut *mut AllJoynCredentials) -> HRESULT, - fn get_PeerUniqueName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_RequestedUserName(&mut self, out: *mut HSTRING) -> HRESULT, - fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + DEFINE_IID!(IID_IAppointmentCalendarSyncManager2, 1685399725, 3369, 19580, 170, 167, 191, 153, 104, 5, 83, 124); + RT_INTERFACE!{interface IAppointmentCalendarSyncManager2(IAppointmentCalendarSyncManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarSyncManager2] { + fn put_Status(&mut self, value: AppointmentCalendarSyncStatus) -> HRESULT, + fn put_LastSuccessfulSyncTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn put_LastAttemptedSyncTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT }} - impl IAllJoynCredentialsRequestedEventArgs { - #[inline] pub unsafe fn get_attempt_count(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AttemptCount)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IAppointmentCalendarSyncManager2 { + #[inline] pub unsafe fn set_status(&mut self, value: AppointmentCalendarSyncStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_Status)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_credentials(&mut self) -> Result> { + #[inline] pub unsafe fn set_last_successful_sync_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_LastSuccessfulSyncTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_last_attempted_sync_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_LastAttemptedSyncTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAppointmentPropertiesStatics, 622075881, 26798, 15022, 133, 95, 188, 68, 65, 202, 162, 52); + RT_INTERFACE!{static interface IAppointmentPropertiesStatics(IAppointmentPropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentPropertiesStatics] { + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Location(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_StartTime(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Duration(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Reminder(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BusyStatus(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sensitivity(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_OriginalStartTime(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsResponseRequested(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AllowNewTimeProposal(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AllDay(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Details(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_OnlineMeetingLink(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ReplyTime(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Organizer(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UserResponse(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HasInvitees(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsCanceledMeeting(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsOrganizedByUser(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Recurrence(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Uri(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Invitees(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DefaultProperties(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IAppointmentPropertiesStatics { + #[inline] pub unsafe fn get_subject(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_location(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Credentials)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Location)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_peer_unique_name(&mut self) -> Result { + #[inline] pub unsafe fn get_start_time(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PeerUniqueName)(self, &mut out); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_requested_user_name(&mut self) -> Result { + #[inline] pub unsafe fn get_duration(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RequestedUserName)(self, &mut out); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + #[inline] pub unsafe fn get_reminder(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Reminder)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynCredentialsVerificationRequestedEventArgs, 2148169234, 47109, 17583, 162, 225, 121, 42, 182, 85, 162, 208); - RT_INTERFACE!{interface IAllJoynCredentialsVerificationRequestedEventArgs(IAllJoynCredentialsVerificationRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynCredentialsVerificationRequestedEventArgs] { - fn get_AuthenticationMechanism(&mut self, out: *mut AllJoynAuthenticationMechanism) -> HRESULT, - fn get_PeerUniqueName(&mut self, out: *mut HSTRING) -> HRESULT, - #[cfg(not(feature="windows.security"))] fn __Dummy2(&mut self) -> (), - #[cfg(feature="windows.security")] fn get_PeerCertificate(&mut self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, - #[cfg(not(feature="windows.networking"))] fn __Dummy3(&mut self) -> (), - #[cfg(feature="windows.networking")] fn get_PeerCertificateErrorSeverity(&mut self, out: *mut super::super::networking::sockets::SocketSslErrorSeverity) -> HRESULT, - #[cfg(not(feature="windows.security"))] fn __Dummy4(&mut self) -> (), - #[cfg(feature="windows.security")] fn get_PeerCertificateErrors(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - #[cfg(not(feature="windows.security"))] fn __Dummy5(&mut self) -> (), - #[cfg(feature="windows.security")] fn get_PeerIntermediateCertificates(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn Accept(&mut self) -> HRESULT, - fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT - }} - impl IAllJoynCredentialsVerificationRequestedEventArgs { - #[inline] pub unsafe fn get_authentication_mechanism(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AuthenticationMechanism)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_busy_status(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BusyStatus)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_peer_unique_name(&mut self) -> Result { + #[inline] pub unsafe fn get_sensitivity(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PeerUniqueName)(self, &mut out); + let hr = ((*self.lpVtbl).get_Sensitivity)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_peer_certificate(&mut self) -> Result> { + #[inline] pub unsafe fn get_original_start_time(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PeerCertificate)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_OriginalStartTime)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_peer_certificate_error_severity(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PeerCertificateErrorSeverity)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_is_response_requested(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsResponseRequested)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_peer_certificate_errors(&mut self) -> Result>> { + #[inline] pub unsafe fn get_allow_new_time_proposal(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PeerCertificateErrors)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AllowNewTimeProposal)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_peer_intermediate_certificates(&mut self) -> Result>> { + #[inline] pub unsafe fn get_all_day(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PeerIntermediateCertificates)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AllDay)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn accept(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Accept)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_details(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Details)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + #[inline] pub unsafe fn get_online_meeting_link(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + let hr = ((*self.lpVtbl).get_OnlineMeetingLink)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_reply_time(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ReplyTime)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_organizer(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Organizer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_response(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserResponse)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_invitees(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HasInvitees)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_canceled_meeting(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsCanceledMeeting)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_organized_by_user(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsOrganizedByUser)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_recurrence(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Recurrence)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uri(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_invitees(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Invitees)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DefaultProperties)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IAllJoynAuthenticationCompleteEventArgs, 2545184796, 5596, 19283, 182, 164, 125, 19, 67, 0, 215, 191); - RT_INTERFACE!{interface IAllJoynAuthenticationCompleteEventArgs(IAllJoynAuthenticationCompleteEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAuthenticationCompleteEventArgs] { - fn get_AuthenticationMechanism(&mut self, out: *mut AllJoynAuthenticationMechanism) -> HRESULT, - fn get_PeerUniqueName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Succeeded(&mut self, out: *mut bool) -> HRESULT + DEFINE_IID!(IID_IAppointmentPropertiesStatics2, 3757851467, 45079, 17885, 138, 245, 209, 99, 209, 8, 1, 187); + RT_INTERFACE!{static interface IAppointmentPropertiesStatics2(IAppointmentPropertiesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentPropertiesStatics2] { + fn get_ChangeNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RemoteChangeNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DetailsKind(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IAllJoynAuthenticationCompleteEventArgs { - #[inline] pub unsafe fn get_authentication_mechanism(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AuthenticationMechanism)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IAppointmentPropertiesStatics2 { + #[inline] pub unsafe fn get_change_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChangeNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_peer_unique_name(&mut self) -> Result { + #[inline] pub unsafe fn get_remote_change_number(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PeerUniqueName)(self, &mut out); + let hr = ((*self.lpVtbl).get_RemoteChangeNumber)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_succeeded(&mut self) -> Result { + #[inline] pub unsafe fn get_details_kind(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DetailsKind)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum AppointmentConflictType: i32 { + None (AppointmentConflictType_None) = 0, Adjacent (AppointmentConflictType_Adjacent) = 1, Overlap (AppointmentConflictType_Overlap) = 2, + }} + DEFINE_IID!(IID_IAppointmentConflictResult, 3587043518, 12079, 15229, 175, 10, 167, 226, 15, 58, 70, 227); + RT_INTERFACE!{interface IAppointmentConflictResult(IAppointmentConflictResultVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentConflictResult] { + fn get_Type(&mut self, out: *mut AppointmentConflictType) -> HRESULT, + fn get_Date(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT + }} + impl IAppointmentConflictResult { + #[inline] pub unsafe fn get_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Succeeded)(self, &mut out); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Date)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IAllJoynBusAttachmentFactory, 1680798116, 44421, 19935, 144, 174, 96, 68, 82, 178, 34, 136); - RT_INTERFACE!{static interface IAllJoynBusAttachmentFactory(IAllJoynBusAttachmentFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusAttachmentFactory] { - fn Create(&mut self, connectionSpecification: HSTRING, out: *mut *mut AllJoynBusAttachment) -> HRESULT + RT_ENUM! { enum AppointmentStoreChangeType: i32 { + AppointmentCreated (AppointmentStoreChangeType_AppointmentCreated) = 0, AppointmentModified (AppointmentStoreChangeType_AppointmentModified) = 1, AppointmentDeleted (AppointmentStoreChangeType_AppointmentDeleted) = 2, ChangeTrackingLost (AppointmentStoreChangeType_ChangeTrackingLost) = 3, CalendarCreated (AppointmentStoreChangeType_CalendarCreated) = 4, CalendarModified (AppointmentStoreChangeType_CalendarModified) = 5, CalendarDeleted (AppointmentStoreChangeType_CalendarDeleted) = 6, }} - impl IAllJoynBusAttachmentFactory { - #[inline] pub unsafe fn create(&mut self, connectionSpecification: &HStringArg) -> Result> { + DEFINE_IID!(IID_IAppointmentStoreChange, 2779177013, 2611, 13908, 132, 99, 181, 67, 233, 12, 59, 121); + RT_INTERFACE!{interface IAppointmentStoreChange(IAppointmentStoreChangeVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentStoreChange] { + fn get_Appointment(&mut self, out: *mut *mut Appointment) -> HRESULT, + fn get_ChangeType(&mut self, out: *mut AppointmentStoreChangeType) -> HRESULT + }} + impl IAppointmentStoreChange { + #[inline] pub unsafe fn get_appointment(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, connectionSpecification.get(), &mut out); + let hr = ((*self.lpVtbl).get_Appointment)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynSession, 3906018060, 49364, 16492, 136, 169, 169, 62, 250, 133, 212, 177); - RT_INTERFACE!{interface IAllJoynSession(IAllJoynSessionVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSession] { - fn get_Id(&mut self, out: *mut i32) -> HRESULT, - fn get_Status(&mut self, out: *mut i32) -> HRESULT, - fn RemoveMemberAsync(&mut self, uniqueName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_MemberAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MemberAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_MemberRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MemberRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Lost(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Lost(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IAllJoynSession { - #[inline] pub unsafe fn get_id(&mut self) -> Result { + #[inline] pub unsafe fn get_change_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChangeType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IAppointmentStoreChange2, 3011317198, 21009, 17410, 166, 8, 169, 111, 231, 11, 142, 226); + RT_INTERFACE!{interface IAppointmentStoreChange2(IAppointmentStoreChange2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentStoreChange2] { + fn get_AppointmentCalendar(&mut self, out: *mut *mut AppointmentCalendar) -> HRESULT + }} + impl IAppointmentStoreChange2 { + #[inline] pub unsafe fn get_appointment_calendar(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppointmentCalendar)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_member_async(&mut self, uniqueName: &HStringArg) -> Result>> { + } + RT_CLASS!{class AppointmentCalendar: IAppointmentCalendar} + DEFINE_IID!(IID_IAppointmentStoreChangeReader, 2334394865, 26099, 17056, 150, 29, 76, 32, 155, 243, 3, 112); + RT_INTERFACE!{interface IAppointmentStoreChangeReader(IAppointmentStoreChangeReaderVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentStoreChangeReader] { + fn ReadBatchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn AcceptChanges(&mut self) -> HRESULT, + fn AcceptChangesThrough(&mut self, lastChangeToAccept: *mut AppointmentStoreChange) -> HRESULT + }} + impl IAppointmentStoreChangeReader { + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RemoveMemberAsync)(self, uniqueName.get(), &mut out); + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_member_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_MemberAdded)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn accept_changes(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).AcceptChanges)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn remove_member_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_MemberAdded)(self, token); + #[inline] pub unsafe fn accept_changes_through(&mut self, lastChangeToAccept: &AppointmentStoreChange) -> Result<()> { + let hr = ((*self.lpVtbl).AcceptChangesThrough)(self, lastChangeToAccept as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_member_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_MemberRemoved)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class AppointmentStoreChange: IAppointmentStoreChange} + DEFINE_IID!(IID_IAppointmentStoreChangeTracker, 455472305, 36558, 20247, 147, 200, 230, 65, 36, 88, 253, 92); + RT_INTERFACE!{interface IAppointmentStoreChangeTracker(IAppointmentStoreChangeTrackerVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentStoreChangeTracker] { + fn GetChangeReader(&mut self, out: *mut *mut AppointmentStoreChangeReader) -> HRESULT, + fn Enable(&mut self) -> HRESULT, + fn Reset(&mut self) -> HRESULT + }} + impl IAppointmentStoreChangeTracker { + #[inline] pub unsafe fn get_change_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetChangeReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_member_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_MemberRemoved)(self, token); + #[inline] pub unsafe fn enable(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Enable)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_lost(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Lost)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_lost(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Lost)(self, token); + #[inline] pub unsafe fn reset(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Reset)(self); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class AllJoynSession: IAllJoynSession} - RT_ACTIVATABLE!{IAllJoynSessionStatics [CLSID_AllJoynSession]} - DEFINE_CLSID!(CLSID_AllJoynSession = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,115,115,105,111,110,0]); - RT_CLASS!{class AllJoynSessionMemberAddedEventArgs: IAllJoynSessionMemberAddedEventArgs [IAllJoynSessionMemberAddedEventArgsFactory] [CLSID_AllJoynSessionMemberAddedEventArgs]} - DEFINE_CLSID!(CLSID_AllJoynSessionMemberAddedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,115,115,105,111,110,77,101,109,98,101,114,65,100,100,101,100,69,118,101,110,116,65,114,103,115,0]); - RT_CLASS!{class AllJoynSessionMemberRemovedEventArgs: IAllJoynSessionMemberRemovedEventArgs [IAllJoynSessionMemberRemovedEventArgsFactory] [CLSID_AllJoynSessionMemberRemovedEventArgs]} - DEFINE_CLSID!(CLSID_AllJoynSessionMemberRemovedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,115,115,105,111,110,77,101,109,98,101,114,82,101,109,111,118,101,100,69,118,101,110,116,65,114,103,115,0]); - RT_CLASS!{class AllJoynSessionLostEventArgs: IAllJoynSessionLostEventArgs [IAllJoynSessionLostEventArgsFactory] [CLSID_AllJoynSessionLostEventArgs]} - DEFINE_CLSID!(CLSID_AllJoynSessionLostEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,115,115,105,111,110,76,111,115,116,69,118,101,110,116,65,114,103,115,0]); - DEFINE_IID!(IID_IAllJoynSessionStatics, 2651182596, 41068, 18132, 180, 108, 11, 11, 84, 16, 91, 68); - RT_INTERFACE!{static interface IAllJoynSessionStatics(IAllJoynSessionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionStatics] { - fn GetFromServiceInfoAsync(&mut self, serviceInfo: *mut AllJoynServiceInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFromServiceInfoAndBusAttachmentAsync(&mut self, serviceInfo: *mut AllJoynServiceInfo, busAttachment: *mut AllJoynBusAttachment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class AppointmentStoreChangeReader: IAppointmentStoreChangeReader} + DEFINE_IID!(IID_IAppointmentStoreChangedEventArgs, 579205305, 1937, 16766, 191, 234, 204, 109, 65, 99, 108, 140); + RT_INTERFACE!{interface IAppointmentStoreChangedEventArgs(IAppointmentStoreChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentStoreChangedEventArgs] { + fn GetDeferral(&mut self, out: *mut *mut AppointmentStoreChangedDeferral) -> HRESULT }} - impl IAllJoynSessionStatics { - #[inline] pub unsafe fn get_from_service_info_async(&mut self, serviceInfo: &AllJoynServiceInfo) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetFromServiceInfoAsync)(self, serviceInfo as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_from_service_info_and_bus_attachment_async(&mut self, serviceInfo: &AllJoynServiceInfo, busAttachment: &AllJoynBusAttachment) -> Result>> { + impl IAppointmentStoreChangedEventArgs { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetFromServiceInfoAndBusAttachmentAsync)(self, serviceInfo as *const _ as *mut _, busAttachment as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IAllJoynProducer, 2634565241, 18075, 18778, 167, 16, 172, 80, 241, 35, 6, 159); - RT_INTERFACE!{interface IAllJoynProducer(IAllJoynProducerVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynProducer] { - fn SetBusObject(&mut self, busObject: *mut AllJoynBusObject) -> HRESULT + RT_CLASS!{class AppointmentStoreChangedDeferral: IAppointmentStoreChangedDeferral} + DEFINE_IID!(IID_IAppointmentStoreChangedDeferral, 1287135270, 65243, 19395, 150, 98, 149, 169, 190, 253, 244, 223); + RT_INTERFACE!{interface IAppointmentStoreChangedDeferral(IAppointmentStoreChangedDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentStoreChangedDeferral] { + fn Complete(&mut self) -> HRESULT }} - impl IAllJoynProducer { - #[inline] pub unsafe fn set_bus_object(&mut self, busObject: &AllJoynBusObject) -> Result<()> { - let hr = ((*self.lpVtbl).SetBusObject)(self, busObject as *const _ as *mut _); + impl IAppointmentStoreChangedDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class AllJoynBusObject: IAllJoynBusObject [IAllJoynBusObjectFactory] [CLSID_AllJoynBusObject]} - DEFINE_CLSID!(CLSID_AllJoynBusObject = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,66,117,115,79,98,106,101,99,116,0]); - DEFINE_IID!(IID_IAllJoynBusObject, 3908928094, 63290, 18700, 136, 4, 4, 224, 38, 100, 48, 71); - RT_INTERFACE!{interface IAllJoynBusObject(IAllJoynBusObjectVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusObject] { - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT, - fn AddProducer(&mut self, producer: *mut IAllJoynProducer) -> HRESULT, - fn get_BusAttachment(&mut self, out: *mut *mut AllJoynBusAttachment) -> HRESULT, - fn get_Session(&mut self, out: *mut *mut AllJoynSession) -> HRESULT, - fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_IAppointmentStoreNotificationTriggerDetails, 2603862801, 49921, 16926, 175, 239, 4, 126, 207, 167, 106, 219); + RT_INTERFACE!{interface IAppointmentStoreNotificationTriggerDetails(IAppointmentStoreNotificationTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentStoreNotificationTriggerDetails] { + }} - impl IAllJoynBusObject { - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_producer(&mut self, producer: &IAllJoynProducer) -> Result<()> { - let hr = ((*self.lpVtbl).AddProducer)(self, producer as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bus_attachment(&mut self) -> Result> { + DEFINE_IID!(IID_IAppointmentStore, 2757857676, 31303, 19862, 150, 201, 21, 205, 138, 5, 167, 53); + RT_INTERFACE!{interface IAppointmentStore(IAppointmentStoreVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentStore] { + fn get_ChangeTracker(&mut self, out: *mut *mut AppointmentStoreChangeTracker) -> HRESULT, + fn CreateAppointmentCalendarAsync(&mut self, name: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAppointmentCalendarAsync(&mut self, calendarId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAppointmentAsync(&mut self, localId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAppointmentInstanceAsync(&mut self, localId: HSTRING, instanceStartTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindAppointmentCalendarsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAppointmentCalendarsAsyncWithOptions(&mut self, options: FindAppointmentCalendarsOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAppointmentsAsync(&mut self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAppointmentsAsyncWithOptions(&mut self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, options: *mut FindAppointmentsOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindConflictAsync(&mut self, appointment: *mut Appointment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindConflictAsyncWithInstanceStart(&mut self, appointment: *mut Appointment, instanceStartTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn MoveAppointmentAsync(&mut self, appointment: *mut Appointment, destinationCalendar: *mut AppointmentCalendar, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowAddAppointmentAsync(&mut self, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowReplaceAppointmentAsync(&mut self, localId: HSTRING, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy14(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowReplaceAppointmentWithPlacementAndDateAsync(&mut self, localId: HSTRING, appointment: *mut Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowRemoveAppointmentAsync(&mut self, localId: HSTRING, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy16(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowRemoveAppointmentWithPlacementAndDateAsync(&mut self, localId: HSTRING, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowAppointmentDetailsAsync(&mut self, localId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowAppointmentDetailsWithDateAsync(&mut self, localId: HSTRING, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowEditNewAppointmentAsync(&mut self, appointment: *mut Appointment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindLocalIdsFromRoamingIdAsync(&mut self, roamingId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IAppointmentStore { + #[inline] pub unsafe fn get_change_tracker(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BusAttachment)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChangeTracker)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_session(&mut self) -> Result> { + #[inline] pub unsafe fn create_appointment_calendar_async(&mut self, name: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Session)(self, &mut out); + let hr = ((*self.lpVtbl).CreateAppointmentCalendarAsync)(self, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Stopped)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_appointment_calendar_async(&mut self, calendarId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAppointmentCalendarAsync)(self, calendarId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class AllJoynBusObjectStoppedEventArgs: IAllJoynBusObjectStoppedEventArgs [IAllJoynBusObjectStoppedEventArgsFactory] [CLSID_AllJoynBusObjectStoppedEventArgs]} - DEFINE_CLSID!(CLSID_AllJoynBusObjectStoppedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,66,117,115,79,98,106,101,99,116,83,116,111,112,112,101,100,69,118,101,110,116,65,114,103,115,0]); - DEFINE_IID!(IID_IAllJoynBusObjectFactory, 741318411, 36354, 20380, 172, 39, 234, 109, 173, 93, 59, 80); - RT_INTERFACE!{static interface IAllJoynBusObjectFactory(IAllJoynBusObjectFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusObjectFactory] { - fn Create(&mut self, objectPath: HSTRING, out: *mut *mut AllJoynBusObject) -> HRESULT, - fn CreateWithBusAttachment(&mut self, objectPath: HSTRING, busAttachment: *mut AllJoynBusAttachment, out: *mut *mut AllJoynBusObject) -> HRESULT - }} - impl IAllJoynBusObjectFactory { - #[inline] pub unsafe fn create(&mut self, objectPath: &HStringArg) -> Result> { + #[inline] pub unsafe fn get_appointment_async(&mut self, localId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, objectPath.get(), &mut out); + let hr = ((*self.lpVtbl).GetAppointmentAsync)(self, localId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_bus_attachment(&mut self, objectPath: &HStringArg, busAttachment: &AllJoynBusAttachment) -> Result> { + #[inline] pub unsafe fn get_appointment_instance_async(&mut self, localId: &HStringArg, instanceStartTime: super::super::foundation::DateTime) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithBusAttachment)(self, objectPath.get(), busAttachment as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).GetAppointmentInstanceAsync)(self, localId.get(), instanceStartTime, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynServiceInfo, 1287553545, 47422, 16770, 153, 155, 221, 208, 0, 249, 197, 117); - RT_INTERFACE!{interface IAllJoynServiceInfo(IAllJoynServiceInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynServiceInfo] { - fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ObjectPath(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_SessionPort(&mut self, out: *mut u16) -> HRESULT - }} - impl IAllJoynServiceInfo { - #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { + #[inline] pub unsafe fn find_appointment_calendars_async(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).FindAppointmentCalendarsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_object_path(&mut self) -> Result { + #[inline] pub unsafe fn find_appointment_calendars_async_with_options(&mut self, options: FindAppointmentCalendarsOptions) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ObjectPath)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).FindAppointmentCalendarsAsyncWithOptions)(self, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_session_port(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SessionPort)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn find_appointments_async(&mut self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAppointmentsAsync)(self, rangeStart, rangeLength, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynServiceInfoStatics, 1450727178, 24634, 18940, 183, 80, 14, 241, 54, 9, 33, 60); - RT_INTERFACE!{static interface IAllJoynServiceInfoStatics(IAllJoynServiceInfoStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynServiceInfoStatics] { - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl IAllJoynServiceInfoStatics { - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn find_appointments_async_with_options(&mut self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, options: &FindAppointmentsOptions) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).FindAppointmentsAsyncWithOptions)(self, rangeStart, rangeLength, options as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynServiceInfoFactory, 1971444413, 65027, 20299, 148, 164, 240, 47, 220, 189, 17, 184); - RT_INTERFACE!{static interface IAllJoynServiceInfoFactory(IAllJoynServiceInfoFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynServiceInfoFactory] { - fn Create(&mut self, uniqueName: HSTRING, objectPath: HSTRING, sessionPort: u16, out: *mut *mut AllJoynServiceInfo) -> HRESULT - }} - impl IAllJoynServiceInfoFactory { - #[inline] pub unsafe fn create(&mut self, uniqueName: &HStringArg, objectPath: &HStringArg, sessionPort: u16) -> Result> { + #[inline] pub unsafe fn find_conflict_async(&mut self, appointment: &Appointment) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, uniqueName.get(), objectPath.get(), sessionPort, &mut out); + let hr = ((*self.lpVtbl).FindConflictAsync)(self, appointment as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynAboutDataViewStatics, 1475196552, 3166, 16750, 136, 181, 57, 179, 45, 37, 196, 125); - RT_INTERFACE!{static interface IAllJoynAboutDataViewStatics(IAllJoynAboutDataViewStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAboutDataViewStatics] { - fn GetDataBySessionPortAsync(&mut self, uniqueName: HSTRING, busAttachment: *mut AllJoynBusAttachment, sessionPort: u16, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows.globalization")] fn GetDataBySessionPortWithLanguageAsync(&mut self, uniqueName: HSTRING, busAttachment: *mut AllJoynBusAttachment, sessionPort: u16, language: *mut super::super::globalization::Language, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl IAllJoynAboutDataViewStatics { - #[inline] pub unsafe fn get_data_by_session_port_async(&mut self, uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16) -> Result>> { + #[inline] pub unsafe fn find_conflict_async_with_instance_start(&mut self, appointment: &Appointment, instanceStartTime: super::super::foundation::DateTime) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDataBySessionPortAsync)(self, uniqueName.get(), busAttachment as *const _ as *mut _, sessionPort, &mut out); + let hr = ((*self.lpVtbl).FindConflictAsyncWithInstanceStart)(self, appointment as *const _ as *mut _, instanceStartTime, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_data_by_session_port_with_language_async(&mut self, uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16, language: &super::super::globalization::Language) -> Result>> { + #[inline] pub unsafe fn move_appointment_async(&mut self, appointment: &Appointment, destinationCalendar: &AppointmentCalendar) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDataBySessionPortWithLanguageAsync)(self, uniqueName.get(), busAttachment as *const _ as *mut _, sessionPort, language as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).MoveAppointmentAsync)(self, appointment as *const _ as *mut _, destinationCalendar as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynAboutDataView, 1747128607, 25106, 18740, 156, 72, 225, 156, 164, 152, 66, 136); - RT_INTERFACE!{interface IAllJoynAboutDataView(IAllJoynAboutDataViewVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAboutDataView] { - fn get_Status(&mut self, out: *mut i32) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn get_AJSoftwareVersion(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_AppId(&mut self, out: *mut Guid) -> HRESULT, - fn get_DateOfManufacture(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - #[cfg(not(feature="windows.globalization"))] fn __Dummy5(&mut self) -> (), - #[cfg(feature="windows.globalization")] fn get_DefaultLanguage(&mut self, out: *mut *mut super::super::globalization::Language) -> HRESULT, - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_HardwareVersion(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ModelNumber(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_SoftwareVersion(&mut self, out: *mut HSTRING) -> HRESULT, - #[cfg(not(feature="windows.globalization"))] fn __Dummy10(&mut self) -> (), - #[cfg(feature="windows.globalization")] fn get_SupportedLanguages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportUrl(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn get_AppName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_DeviceName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Manufacturer(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IAllJoynAboutDataView { - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn show_add_appointment_async(&mut self, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAddAppointmentAsync)(self, appointment as *const _ as *mut _, selection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + #[inline] pub unsafe fn show_replace_appointment_async(&mut self, localId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + let hr = ((*self.lpVtbl).ShowReplaceAppointmentAsync)(self, localId.get(), appointment as *const _ as *mut _, selection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ajsoftware_version(&mut self) -> Result { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_replace_appointment_with_placement_and_date_async(&mut self, localId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AJSoftwareVersion)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ShowReplaceAppointmentWithPlacementAndDateAsync)(self, localId.get(), appointment as *const _ as *mut _, selection, preferredPlacement, instanceStartDate, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_app_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AppId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn show_remove_appointment_async(&mut self, localId: &HStringArg, selection: super::super::foundation::Rect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowRemoveAppointmentAsync)(self, localId.get(), selection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_date_of_manufacture(&mut self) -> Result>> { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_remove_appointment_with_placement_and_date_async(&mut self, localId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DateOfManufacture)(self, &mut out); + let hr = ((*self.lpVtbl).ShowRemoveAppointmentWithPlacementAndDateAsync)(self, localId.get(), selection, preferredPlacement, instanceStartDate, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_default_language(&mut self) -> Result> { + #[inline] pub unsafe fn show_appointment_details_async(&mut self, localId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DefaultLanguage)(self, &mut out); + let hr = ((*self.lpVtbl).ShowAppointmentDetailsAsync)(self, localId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn show_appointment_details_with_date_async(&mut self, localId: &HStringArg, instanceStartDate: super::super::foundation::DateTime) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ShowAppointmentDetailsWithDateAsync)(self, localId.get(), instanceStartDate, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_hardware_version(&mut self) -> Result { + #[inline] pub unsafe fn show_edit_new_appointment_async(&mut self, appointment: &Appointment) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_HardwareVersion)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ShowEditNewAppointmentAsync)(self, appointment as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_model_number(&mut self) -> Result { + #[inline] pub unsafe fn find_local_ids_from_roaming_id_async(&mut self, roamingId: &HStringArg) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ModelNumber)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).FindLocalIdsFromRoamingIdAsync)(self, roamingId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_software_version(&mut self) -> Result { + } + RT_CLASS!{class AppointmentStoreChangeTracker: IAppointmentStoreChangeTracker} + RT_CLASS!{class AppointmentConflictResult: IAppointmentConflictResult} + DEFINE_IID!(IID_IAppointmentStore2, 633637920, 7233, 16975, 128, 132, 103, 193, 207, 224, 168, 84); + RT_INTERFACE!{interface IAppointmentStore2(IAppointmentStore2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentStore2] { + fn add_StoreChanged(&mut self, pHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StoreChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn CreateAppointmentCalendarInAccountAsync(&mut self, name: HSTRING, userDataAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IAppointmentStore2 { + #[inline] pub unsafe fn add_store_changed(&mut self, pHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StoreChanged)(self, pHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_store_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StoreChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn create_appointment_calendar_in_account_async(&mut self, name: &HStringArg, userDataAccountId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SoftwareVersion)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).CreateAppointmentCalendarInAccountAsync)(self, name.get(), userDataAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_supported_languages(&mut self) -> Result>> { + } + RT_CLASS!{class AppointmentStoreChangedEventArgs: IAppointmentStoreChangedEventArgs} + DEFINE_IID!(IID_IAppointmentException, 2718394215, 5878, 19406, 159, 90, 134, 0, 184, 1, 159, 203); + RT_INTERFACE!{interface IAppointmentException(IAppointmentExceptionVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentException] { + fn get_Appointment(&mut self, out: *mut *mut Appointment) -> HRESULT, + fn get_ExceptionProperties(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_IsDeleted(&mut self, out: *mut bool) -> HRESULT + }} + impl IAppointmentException { + #[inline] pub unsafe fn get_appointment(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedLanguages)(self, &mut out); + let hr = ((*self.lpVtbl).get_Appointment)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_support_url(&mut self) -> Result> { + #[inline] pub unsafe fn get_exception_properties(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportUrl)(self, &mut out); + let hr = ((*self.lpVtbl).get_ExceptionProperties)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_app_name(&mut self) -> Result { + #[inline] pub unsafe fn get_is_deleted(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDeleted)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IAppointmentPropertiesStatics [CLSID_AppointmentProperties]} + RT_ACTIVATABLE!{IAppointmentPropertiesStatics2 [CLSID_AppointmentProperties]} + DEFINE_CLSID!(CLSID_AppointmentProperties = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,65,112,112,111,105,110,116,109,101,110,116,115,46,65,112,112,111,105,110,116,109,101,110,116,80,114,111,112,101,114,116,105,101,115,0]); + RT_CLASS!{class AppointmentStoreNotificationTriggerDetails: IAppointmentStoreNotificationTriggerDetails} +pub mod appointmentsprovider { // Windows.ApplicationModel.Appointments.AppointmentsProvider +use ::prelude::*; + DEFINE_IID!(IID_IAppointmentsProviderLaunchActionVerbsStatics, 920369704, 40494, 18886, 142, 247, 58, 183, 165, 220, 200, 184); + RT_INTERFACE!{static interface IAppointmentsProviderLaunchActionVerbsStatics(IAppointmentsProviderLaunchActionVerbsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentsProviderLaunchActionVerbsStatics] { + fn get_AddAppointment(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ReplaceAppointment(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RemoveAppointment(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ShowTimeFrame(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAppointmentsProviderLaunchActionVerbsStatics { + #[inline] pub unsafe fn get_add_appointment(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AppName)(self, &mut out); + let hr = ((*self.lpVtbl).get_AddAppointment)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_description(&mut self) -> Result { + #[inline] pub unsafe fn get_replace_appointment(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + let hr = ((*self.lpVtbl).get_ReplaceAppointment)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_name(&mut self) -> Result { + #[inline] pub unsafe fn get_remove_appointment(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceName)(self, &mut out); + let hr = ((*self.lpVtbl).get_RemoveAppointment)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_manufacturer(&mut self) -> Result { + #[inline] pub unsafe fn get_show_time_frame(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Manufacturer)(self, &mut out); + let hr = ((*self.lpVtbl).get_ShowTimeFrame)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IAllJoynAboutData, 3853106944, 8098, 18489, 147, 239, 249, 223, 64, 72, 144, 247); - RT_INTERFACE!{interface IAllJoynAboutData(IAllJoynAboutDataVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAboutData] { - fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_IsEnabled(&mut self, value: bool) -> HRESULT, - fn get_DefaultAppName(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_DefaultAppName(&mut self, value: HSTRING) -> HRESULT, - fn get_AppNames(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, - fn get_DateOfManufacture(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_DateOfManufacture(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_DefaultDescription(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_DefaultDescription(&mut self, value: HSTRING) -> HRESULT, - fn get_Descriptions(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, - fn get_DefaultManufacturer(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_DefaultManufacturer(&mut self, value: HSTRING) -> HRESULT, - fn get_Manufacturers(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, - fn get_ModelNumber(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_ModelNumber(&mut self, value: HSTRING) -> HRESULT, - fn get_SoftwareVersion(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_SoftwareVersion(&mut self, value: HSTRING) -> HRESULT, - fn get_SupportUrl(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_SupportUrl(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_AppId(&mut self, out: *mut Guid) -> HRESULT, - fn put_AppId(&mut self, value: Guid) -> HRESULT + DEFINE_IID!(IID_IAppointmentsProviderLaunchActionVerbsStatics2, 4019210660, 44833, 18236, 136, 220, 118, 205, 137, 246, 12, 165); + RT_INTERFACE!{static interface IAppointmentsProviderLaunchActionVerbsStatics2(IAppointmentsProviderLaunchActionVerbsStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentsProviderLaunchActionVerbsStatics2] { + fn get_ShowAppointmentDetails(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IAllJoynAboutData { - #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IAppointmentsProviderLaunchActionVerbsStatics2 { + #[inline] pub unsafe fn get_show_appointment_details(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ShowAppointmentDetails)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IAddAppointmentOperation, 3964312307, 25101, 19561, 173, 215, 151, 148, 233, 24, 8, 31); + RT_INTERFACE!{interface IAddAppointmentOperation(IAddAppointmentOperationVtbl): IInspectable(IInspectableVtbl) [IID_IAddAppointmentOperation] { + fn get_AppointmentInformation(&mut self, out: *mut *mut super::Appointment) -> HRESULT, + fn get_SourcePackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompleted(&mut self, itemId: HSTRING) -> HRESULT, + fn ReportCanceled(&mut self) -> HRESULT, + fn ReportError(&mut self, value: HSTRING) -> HRESULT, + fn DismissUI(&mut self) -> HRESULT + }} + impl IAddAppointmentOperation { + #[inline] pub unsafe fn get_appointment_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppointmentInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_app_name(&mut self) -> Result { + #[inline] pub unsafe fn get_source_package_family_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DefaultAppName)(self, &mut out); + let hr = ((*self.lpVtbl).get_SourcePackageFamilyName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_default_app_name(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_DefaultAppName)(self, value.get()); + #[inline] pub unsafe fn report_completed(&mut self, itemId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompleted)(self, itemId.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_app_names(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AppNames)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn report_canceled(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCanceled)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_date_of_manufacture(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DateOfManufacture)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn report_error(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ReportError)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_date_of_manufacture(&mut self, value: &super::super::foundation::IReference) -> Result<()> { - let hr = ((*self.lpVtbl).put_DateOfManufacture)(self, value as *const _ as *mut _); + #[inline] pub unsafe fn dismiss_ui(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DismissUI)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_default_description(&mut self) -> Result { + } + DEFINE_IID!(IID_IReplaceAppointmentOperation, 4103093659, 40545, 19938, 167, 50, 38, 135, 192, 125, 29, 232); + RT_INTERFACE!{interface IReplaceAppointmentOperation(IReplaceAppointmentOperationVtbl): IInspectable(IInspectableVtbl) [IID_IReplaceAppointmentOperation] { + fn get_AppointmentId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppointmentInformation(&mut self, out: *mut *mut super::Appointment) -> HRESULT, + fn get_InstanceStartDate(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_SourcePackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompleted(&mut self, itemId: HSTRING) -> HRESULT, + fn ReportCanceled(&mut self) -> HRESULT, + fn ReportError(&mut self, value: HSTRING) -> HRESULT, + fn DismissUI(&mut self) -> HRESULT + }} + impl IReplaceAppointmentOperation { + #[inline] pub unsafe fn get_appointment_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DefaultDescription)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppointmentId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_default_description(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_DefaultDescription)(self, value.get()); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_appointment_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppointmentInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_descriptions(&mut self) -> Result>> { + #[inline] pub unsafe fn get_instance_start_date(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Descriptions)(self, &mut out); + let hr = ((*self.lpVtbl).get_InstanceStartDate)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_manufacturer(&mut self) -> Result { + #[inline] pub unsafe fn get_source_package_family_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DefaultManufacturer)(self, &mut out); + let hr = ((*self.lpVtbl).get_SourcePackageFamilyName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_default_manufacturer(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_DefaultManufacturer)(self, value.get()); + #[inline] pub unsafe fn report_completed(&mut self, itemId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompleted)(self, itemId.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_manufacturers(&mut self) -> Result>> { + #[inline] pub unsafe fn report_canceled(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCanceled)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn report_error(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ReportError)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn dismiss_ui(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DismissUI)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRemoveAppointmentOperation, 146172602, 65075, 18125, 165, 12, 168, 255, 179, 38, 5, 55); + RT_INTERFACE!{interface IRemoveAppointmentOperation(IRemoveAppointmentOperationVtbl): IInspectable(IInspectableVtbl) [IID_IRemoveAppointmentOperation] { + fn get_AppointmentId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_InstanceStartDate(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_SourcePackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompleted(&mut self) -> HRESULT, + fn ReportCanceled(&mut self) -> HRESULT, + fn ReportError(&mut self, value: HSTRING) -> HRESULT, + fn DismissUI(&mut self) -> HRESULT + }} + impl IRemoveAppointmentOperation { + #[inline] pub unsafe fn get_appointment_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Manufacturers)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppointmentId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_instance_start_date(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InstanceStartDate)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_model_number(&mut self) -> Result { + #[inline] pub unsafe fn get_source_package_family_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ModelNumber)(self, &mut out); + let hr = ((*self.lpVtbl).get_SourcePackageFamilyName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_model_number(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_ModelNumber)(self, value.get()); + #[inline] pub unsafe fn report_completed(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompleted)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_software_version(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SoftwareVersion)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn report_canceled(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCanceled)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_software_version(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_SoftwareVersion)(self, value.get()); + #[inline] pub unsafe fn report_error(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ReportError)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_support_url(&mut self) -> Result> { + #[inline] pub unsafe fn dismiss_ui(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DismissUI)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IAppointmentsProviderLaunchActionVerbsStatics2 [CLSID_AppointmentsProviderLaunchActionVerbs]} + RT_ACTIVATABLE!{IAppointmentsProviderLaunchActionVerbsStatics [CLSID_AppointmentsProviderLaunchActionVerbs]} + DEFINE_CLSID!(CLSID_AppointmentsProviderLaunchActionVerbs = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,65,112,112,111,105,110,116,109,101,110,116,115,46,65,112,112,111,105,110,116,109,101,110,116,115,80,114,111,118,105,100,101,114,46,65,112,112,111,105,110,116,109,101,110,116,115,80,114,111,118,105,100,101,114,76,97,117,110,99,104,65,99,116,105,111,110,86,101,114,98,115,0]); + RT_CLASS!{class AddAppointmentOperation: IAddAppointmentOperation} + RT_CLASS!{class ReplaceAppointmentOperation: IReplaceAppointmentOperation} + RT_CLASS!{class RemoveAppointmentOperation: IRemoveAppointmentOperation} +} // Windows.ApplicationModel.Appointments.AppointmentsProvider +pub mod dataprovider { // Windows.ApplicationModel.Appointments.DataProvider +use ::prelude::*; + DEFINE_IID!(IID_IAppointmentDataProviderTriggerDetails, 3005758465, 32274, 20062, 177, 239, 116, 251, 104, 172, 111, 42); + RT_INTERFACE!{interface IAppointmentDataProviderTriggerDetails(IAppointmentDataProviderTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentDataProviderTriggerDetails] { + fn get_Connection(&mut self, out: *mut *mut AppointmentDataProviderConnection) -> HRESULT + }} + impl IAppointmentDataProviderTriggerDetails { + #[inline] pub unsafe fn get_connection(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportUrl)(self, &mut out); + let hr = ((*self.lpVtbl).get_Connection)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_support_url(&mut self, value: &super::super::foundation::Uri) -> Result<()> { - let hr = ((*self.lpVtbl).put_SupportUrl)(self, value as *const _ as *mut _); + } + RT_CLASS!{class AppointmentDataProviderConnection: IAppointmentDataProviderConnection} + DEFINE_IID!(IID_IAppointmentDataProviderConnection, 4091387267, 12884, 18015, 171, 219, 146, 128, 70, 85, 44, 244); + RT_INTERFACE!{interface IAppointmentDataProviderConnection(IAppointmentDataProviderConnectionVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentDataProviderConnection] { + fn add_SyncRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_CreateOrUpdateAppointmentRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CreateOrUpdateAppointmentRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_CancelMeetingRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CancelMeetingRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ForwardMeetingRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ForwardMeetingRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ProposeNewTimeForMeetingRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProposeNewTimeForMeetingRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_UpdateMeetingResponseRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UpdateMeetingResponseRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn Start(&mut self) -> HRESULT + }} + impl IAppointmentDataProviderConnection { + #[inline] pub unsafe fn add_sync_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SyncRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_sync_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SyncRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_app_id(&mut self) -> Result { + #[inline] pub unsafe fn add_create_or_update_appointment_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AppId)(self, &mut out); + let hr = ((*self.lpVtbl).add_CreateOrUpdateAppointmentRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_app_id(&mut self, value: Guid) -> Result<()> { - let hr = ((*self.lpVtbl).put_AppId)(self, value); + #[inline] pub unsafe fn remove_create_or_update_appointment_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CreateOrUpdateAppointmentRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_ENUM! { enum AllJoynTrafficType: i32 { - Unknown (AllJoynTrafficType_Unknown) = 0, Messages (AllJoynTrafficType_Messages) = 1, RawUnreliable (AllJoynTrafficType_RawUnreliable) = 2, RawReliable (AllJoynTrafficType_RawReliable) = 4, - }} - DEFINE_IID!(IID_IAllJoynAcceptSessionJoinerEventArgs, 1325093733, 16010, 16983, 143, 16, 83, 156, 224, 213, 108, 15); - RT_INTERFACE!{interface IAllJoynAcceptSessionJoinerEventArgs(IAllJoynAcceptSessionJoinerEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAcceptSessionJoinerEventArgs] { - fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_SessionPort(&mut self, out: *mut u16) -> HRESULT, - fn get_TrafficType(&mut self, out: *mut AllJoynTrafficType) -> HRESULT, - fn get_SamePhysicalNode(&mut self, out: *mut bool) -> HRESULT, - fn get_SameNetwork(&mut self, out: *mut bool) -> HRESULT, - fn Accept(&mut self) -> HRESULT - }} - impl IAllJoynAcceptSessionJoinerEventArgs { - #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_port(&mut self) -> Result { + #[inline] pub unsafe fn add_cancel_meeting_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SessionPort)(self, &mut out); + let hr = ((*self.lpVtbl).add_CancelMeetingRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_traffic_type(&mut self) -> Result { + #[inline] pub unsafe fn remove_cancel_meeting_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CancelMeetingRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_forward_meeting_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TrafficType)(self, &mut out); + let hr = ((*self.lpVtbl).add_ForwardMeetingRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_same_physical_node(&mut self) -> Result { + #[inline] pub unsafe fn remove_forward_meeting_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ForwardMeetingRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_propose_new_time_for_meeting_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SamePhysicalNode)(self, &mut out); + let hr = ((*self.lpVtbl).add_ProposeNewTimeForMeetingRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_same_network(&mut self) -> Result { + #[inline] pub unsafe fn remove_propose_new_time_for_meeting_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ProposeNewTimeForMeetingRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_update_meeting_response_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SameNetwork)(self, &mut out); + let hr = ((*self.lpVtbl).add_UpdateMeetingResponseRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn accept(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Accept)(self); + #[inline] pub unsafe fn remove_update_meeting_response_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UpdateMeetingResponseRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynAcceptSessionJoiner, 1302861778, 52509, 16419, 167, 196, 22, 222, 248, 156, 40, 223); - RT_INTERFACE!{interface IAllJoynAcceptSessionJoiner(IAllJoynAcceptSessionJoinerVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAcceptSessionJoiner] { - fn Accept(&mut self) -> HRESULT - }} - impl IAllJoynAcceptSessionJoiner { - #[inline] pub unsafe fn accept(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Accept)(self); + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IAllJoynAcceptSessionJoinerEventArgsFactory, 3024313280, 24901, 17054, 132, 219, 213, 191, 231, 114, 177, 79); - RT_INTERFACE!{static interface IAllJoynAcceptSessionJoinerEventArgsFactory(IAllJoynAcceptSessionJoinerEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAcceptSessionJoinerEventArgsFactory] { - fn Create(&mut self, uniqueName: HSTRING, sessionPort: u16, trafficType: AllJoynTrafficType, proximity: u8, acceptSessionJoiner: *mut IAllJoynAcceptSessionJoiner, out: *mut *mut AllJoynAcceptSessionJoinerEventArgs) -> HRESULT + RT_CLASS!{class AppointmentCalendarSyncManagerSyncRequestEventArgs: IAppointmentCalendarSyncManagerSyncRequestEventArgs} + RT_CLASS!{class AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs: IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs} + RT_CLASS!{class AppointmentCalendarCancelMeetingRequestEventArgs: IAppointmentCalendarCancelMeetingRequestEventArgs} + RT_CLASS!{class AppointmentCalendarForwardMeetingRequestEventArgs: IAppointmentCalendarForwardMeetingRequestEventArgs} + RT_CLASS!{class AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs: IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs} + RT_CLASS!{class AppointmentCalendarUpdateMeetingResponseRequestEventArgs: IAppointmentCalendarUpdateMeetingResponseRequestEventArgs} + DEFINE_IID!(IID_IAppointmentCalendarSyncManagerSyncRequest, 313210923, 29027, 19030, 154, 78, 114, 35, 168, 74, 223, 70); + RT_INTERFACE!{interface IAppointmentCalendarSyncManagerSyncRequest(IAppointmentCalendarSyncManagerSyncRequestVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarSyncManagerSyncRequest] { + fn get_AppointmentCalendarLocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IAllJoynAcceptSessionJoinerEventArgsFactory { - #[inline] pub unsafe fn create(&mut self, uniqueName: &HStringArg, sessionPort: u16, trafficType: AllJoynTrafficType, proximity: u8, acceptSessionJoiner: &IAllJoynAcceptSessionJoiner) -> Result> { + impl IAppointmentCalendarSyncManagerSyncRequest { + #[inline] pub unsafe fn get_appointment_calendar_local_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, uniqueName.get(), sessionPort, trafficType, proximity, acceptSessionJoiner as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynSessionMemberAddedEventArgs, 1235384714, 3537, 18113, 156, 214, 39, 25, 14, 80, 58, 94); - RT_INTERFACE!{interface IAllJoynSessionMemberAddedEventArgs(IAllJoynSessionMemberAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionMemberAddedEventArgs] { - fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IAllJoynSessionMemberAddedEventArgs { - #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynSessionMemberAddedEventArgsFactory, 874373970, 7475, 16545, 161, 211, 229, 119, 112, 32, 225, 241); - RT_INTERFACE!{static interface IAllJoynSessionMemberAddedEventArgsFactory(IAllJoynSessionMemberAddedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionMemberAddedEventArgsFactory] { - fn Create(&mut self, uniqueName: HSTRING, out: *mut *mut AllJoynSessionMemberAddedEventArgs) -> HRESULT - }} - impl IAllJoynSessionMemberAddedEventArgsFactory { - #[inline] pub unsafe fn create(&mut self, uniqueName: &HStringArg) -> Result> { + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, uniqueName.get(), &mut out); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IAllJoynSessionMemberRemovedEventArgs, 1083842975, 43594, 18579, 180, 48, 186, 161, 182, 60, 98, 25); - RT_INTERFACE!{interface IAllJoynSessionMemberRemovedEventArgs(IAllJoynSessionMemberRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionMemberRemovedEventArgs] { - fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IAppointmentCalendarCreateOrUpdateAppointmentRequest, 778236594, 51862, 18604, 145, 36, 64, 107, 25, 254, 250, 112); + RT_INTERFACE!{interface IAppointmentCalendarCreateOrUpdateAppointmentRequest(IAppointmentCalendarCreateOrUpdateAppointmentRequestVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarCreateOrUpdateAppointmentRequest] { + fn get_AppointmentCalendarLocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Appointment(&mut self, out: *mut *mut super::Appointment) -> HRESULT, + fn get_NotifyInvitees(&mut self, out: *mut bool) -> HRESULT, + fn get_ChangedProperties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn ReportCompletedAsync(&mut self, createdOrUpdatedAppointment: *mut super::Appointment, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IAllJoynSessionMemberRemovedEventArgs { - #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { + impl IAppointmentCalendarCreateOrUpdateAppointmentRequest { + #[inline] pub unsafe fn get_appointment_calendar_local_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynSessionMemberRemovedEventArgsFactory, 3302184424, 17080, 19303, 183, 87, 208, 207, 202, 213, 146, 128); - RT_INTERFACE!{static interface IAllJoynSessionMemberRemovedEventArgsFactory(IAllJoynSessionMemberRemovedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionMemberRemovedEventArgsFactory] { - fn Create(&mut self, uniqueName: HSTRING, out: *mut *mut AllJoynSessionMemberRemovedEventArgs) -> HRESULT - }} - impl IAllJoynSessionMemberRemovedEventArgsFactory { - #[inline] pub unsafe fn create(&mut self, uniqueName: &HStringArg) -> Result> { + #[inline] pub unsafe fn get_appointment(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, uniqueName.get(), &mut out); + let hr = ((*self.lpVtbl).get_Appointment)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_ENUM! { enum AllJoynSessionLostReason: i32 { - None (AllJoynSessionLostReason_None) = 0, ProducerLeftSession (AllJoynSessionLostReason_ProducerLeftSession) = 1, ProducerClosedAbruptly (AllJoynSessionLostReason_ProducerClosedAbruptly) = 2, RemovedByProducer (AllJoynSessionLostReason_RemovedByProducer) = 3, LinkTimeout (AllJoynSessionLostReason_LinkTimeout) = 4, Other (AllJoynSessionLostReason_Other) = 5, - }} - DEFINE_IID!(IID_IAllJoynSessionJoinedEventArgs, 2661243856, 46551, 18373, 141, 171, 176, 64, 204, 25, 40, 113); - RT_INTERFACE!{interface IAllJoynSessionJoinedEventArgs(IAllJoynSessionJoinedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionJoinedEventArgs] { - fn get_Session(&mut self, out: *mut *mut AllJoynSession) -> HRESULT - }} - impl IAllJoynSessionJoinedEventArgs { - #[inline] pub unsafe fn get_session(&mut self) -> Result> { + #[inline] pub unsafe fn get_notify_invitees(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NotifyInvitees)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_changed_properties(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Session)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChangedProperties)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynSessionJoinedEventArgsFactory, 1747244681, 54987, 19870, 160, 158, 53, 128, 104, 112, 177, 127); - RT_INTERFACE!{static interface IAllJoynSessionJoinedEventArgsFactory(IAllJoynSessionJoinedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionJoinedEventArgsFactory] { - fn Create(&mut self, session: *mut AllJoynSession, out: *mut *mut AllJoynSessionJoinedEventArgs) -> HRESULT - }} - impl IAllJoynSessionJoinedEventArgsFactory { - #[inline] pub unsafe fn create(&mut self, session: &AllJoynSession) -> Result> { + #[inline] pub unsafe fn report_completed_async(&mut self, createdOrUpdatedAppointment: &super::Appointment) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, session as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, createdOrUpdatedAppointment as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynSessionLostEventArgs, 3882263690, 35768, 18772, 174, 103, 210, 250, 67, 209, 249, 107); - RT_INTERFACE!{interface IAllJoynSessionLostEventArgs(IAllJoynSessionLostEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionLostEventArgs] { - fn get_Reason(&mut self, out: *mut AllJoynSessionLostReason) -> HRESULT - }} - impl IAllJoynSessionLostEventArgs { - #[inline] pub unsafe fn get_reason(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - } - DEFINE_IID!(IID_IAllJoynSessionLostEventArgsFactory, 331087154, 54004, 18889, 152, 14, 40, 5, 225, 53, 134, 177); - RT_INTERFACE!{static interface IAllJoynSessionLostEventArgsFactory(IAllJoynSessionLostEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionLostEventArgsFactory] { - fn Create(&mut self, reason: AllJoynSessionLostReason, out: *mut *mut AllJoynSessionLostEventArgs) -> HRESULT - }} - impl IAllJoynSessionLostEventArgsFactory { - #[inline] pub unsafe fn create(&mut self, reason: AllJoynSessionLostReason) -> Result> { + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, reason, &mut out); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IAllJoynProducerStoppedEventArgs, 1362138992, 18743, 18733, 128, 128, 35, 100, 57, 152, 124, 235); - RT_INTERFACE!{interface IAllJoynProducerStoppedEventArgs(IAllJoynProducerStoppedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynProducerStoppedEventArgs] { - fn get_Status(&mut self, out: *mut i32) -> HRESULT + DEFINE_IID!(IID_IAppointmentCalendarCancelMeetingRequest, 1229328269, 25652, 16599, 173, 70, 98, 151, 65, 147, 20, 209); + RT_INTERFACE!{interface IAppointmentCalendarCancelMeetingRequest(IAppointmentCalendarCancelMeetingRequestVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarCancelMeetingRequest] { + fn get_AppointmentCalendarLocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppointmentLocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppointmentOriginalStartTime(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Comment(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NotifyInvitees(&mut self, out: *mut bool) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IAllJoynProducerStoppedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IAppointmentCalendarCancelMeetingRequest { + #[inline] pub unsafe fn get_appointment_calendar_local_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynProducerStoppedEventArgsFactory, 1448253793, 45593, 19822, 159, 120, 250, 63, 153, 250, 143, 229); - RT_INTERFACE!{static interface IAllJoynProducerStoppedEventArgsFactory(IAllJoynProducerStoppedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynProducerStoppedEventArgsFactory] { - fn Create(&mut self, status: i32, out: *mut *mut AllJoynProducerStoppedEventArgs) -> HRESULT - }} - impl IAllJoynProducerStoppedEventArgsFactory { - #[inline] pub unsafe fn create(&mut self, status: i32) -> Result> { + #[inline] pub unsafe fn get_appointment_local_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, status, &mut out); + let hr = ((*self.lpVtbl).get_AppointmentLocalId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_appointment_original_start_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppointmentOriginalStartTime)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class AllJoynProducerStoppedEventArgs: IAllJoynProducerStoppedEventArgs [IAllJoynProducerStoppedEventArgsFactory] [CLSID_AllJoynProducerStoppedEventArgs]} - DEFINE_CLSID!(CLSID_AllJoynProducerStoppedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,80,114,111,100,117,99,101,114,83,116,111,112,112,101,100,69,118,101,110,116,65,114,103,115,0]); - DEFINE_IID!(IID_IAllJoynBusObjectStoppedEventArgs, 3725598997, 61326, 19778, 185, 59, 162, 174, 116, 81, 151, 102); - RT_INTERFACE!{interface IAllJoynBusObjectStoppedEventArgs(IAllJoynBusObjectStoppedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusObjectStoppedEventArgs] { - fn get_Status(&mut self, out: *mut i32) -> HRESULT - }} - impl IAllJoynBusObjectStoppedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_subject(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynBusObjectStoppedEventArgsFactory, 1797455176, 53411, 16981, 149, 58, 71, 114, 180, 2, 128, 115); - RT_INTERFACE!{static interface IAllJoynBusObjectStoppedEventArgsFactory(IAllJoynBusObjectStoppedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusObjectStoppedEventArgsFactory] { - fn Create(&mut self, status: i32, out: *mut *mut AllJoynBusObjectStoppedEventArgs) -> HRESULT - }} - impl IAllJoynBusObjectStoppedEventArgsFactory { - #[inline] pub unsafe fn create(&mut self, status: i32) -> Result> { + #[inline] pub unsafe fn get_comment(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, status, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Comment)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynWatcherStoppedEventArgs, 3388776507, 28701, 19112, 151, 221, 162, 187, 10, 143, 95, 163); - RT_INTERFACE!{interface IAllJoynWatcherStoppedEventArgs(IAllJoynWatcherStoppedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynWatcherStoppedEventArgs] { - fn get_Status(&mut self, out: *mut i32) -> HRESULT - }} - impl IAllJoynWatcherStoppedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result { + #[inline] pub unsafe fn get_notify_invitees(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_NotifyInvitees)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynWatcherStoppedEventArgsFactory, 2274338216, 11600, 18401, 144, 74, 32, 191, 13, 72, 199, 130); - RT_INTERFACE!{static interface IAllJoynWatcherStoppedEventArgsFactory(IAllJoynWatcherStoppedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynWatcherStoppedEventArgsFactory] { - fn Create(&mut self, status: i32, out: *mut *mut AllJoynWatcherStoppedEventArgs) -> HRESULT - }} - impl IAllJoynWatcherStoppedEventArgsFactory { - #[inline] pub unsafe fn create(&mut self, status: i32) -> Result> { + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, status, &mut out); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class AllJoynWatcherStoppedEventArgs: IAllJoynWatcherStoppedEventArgs [IAllJoynWatcherStoppedEventArgsFactory] [CLSID_AllJoynWatcherStoppedEventArgs]} - DEFINE_CLSID!(CLSID_AllJoynWatcherStoppedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,87,97,116,99,104,101,114,83,116,111,112,112,101,100,69,118,101,110,116,65,114,103,115,0]); - DEFINE_IID!(IID_IAllJoynServiceInfoRemovedEventArgs, 811051359, 7487, 16883, 137, 105, 227, 39, 146, 98, 115, 150); - RT_INTERFACE!{interface IAllJoynServiceInfoRemovedEventArgs(IAllJoynServiceInfoRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynServiceInfoRemovedEventArgs] { - fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IAllJoynServiceInfoRemovedEventArgs { - #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IAllJoynServiceInfoRemovedEventArgsFactory, 230655527, 39679, 18773, 146, 39, 105, 83, 186, 244, 21, 105); - RT_INTERFACE!{static interface IAllJoynServiceInfoRemovedEventArgsFactory(IAllJoynServiceInfoRemovedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynServiceInfoRemovedEventArgsFactory] { - fn Create(&mut self, uniqueName: HSTRING, out: *mut *mut AllJoynServiceInfoRemovedEventArgs) -> HRESULT + DEFINE_IID!(IID_IAppointmentCalendarForwardMeetingRequest, 2196106838, 9910, 16979, 138, 143, 108, 245, 242, 255, 120, 132); + RT_INTERFACE!{interface IAppointmentCalendarForwardMeetingRequest(IAppointmentCalendarForwardMeetingRequestVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarForwardMeetingRequest] { + fn get_AppointmentCalendarLocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppointmentLocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppointmentOriginalStartTime(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_Invitees(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ForwardHeader(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Comment(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IAllJoynServiceInfoRemovedEventArgsFactory { - #[inline] pub unsafe fn create(&mut self, uniqueName: &HStringArg) -> Result> { + impl IAppointmentCalendarForwardMeetingRequest { + #[inline] pub unsafe fn get_appointment_calendar_local_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, uniqueName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class AllJoynServiceInfoRemovedEventArgs: IAllJoynServiceInfoRemovedEventArgs [IAllJoynServiceInfoRemovedEventArgsFactory] [CLSID_AllJoynServiceInfoRemovedEventArgs]} - DEFINE_CLSID!(CLSID_AllJoynServiceInfoRemovedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,114,118,105,99,101,73,110,102,111,82,101,109,111,118,101,100,69,118,101,110,116,65,114,103,115,0]); - DEFINE_IID!(IID_IAllJoynMessageInfo, 4281008423, 11282, 18521, 170, 58, 199, 68, 97, 238, 129, 76); - RT_INTERFACE!{interface IAllJoynMessageInfo(IAllJoynMessageInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynMessageInfo] { - fn get_SenderUniqueName(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IAllJoynMessageInfo { - #[inline] pub unsafe fn get_sender_unique_name(&mut self) -> Result { + #[inline] pub unsafe fn get_appointment_local_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SenderUniqueName)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppointmentLocalId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAllJoynMessageInfoFactory, 879119402, 33417, 17364, 180, 168, 63, 77, 227, 89, 240, 67); - RT_INTERFACE!{static interface IAllJoynMessageInfoFactory(IAllJoynMessageInfoFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynMessageInfoFactory] { - fn Create(&mut self, senderUniqueName: HSTRING, out: *mut *mut AllJoynMessageInfo) -> HRESULT - }} - impl IAllJoynMessageInfoFactory { - #[inline] pub unsafe fn create(&mut self, senderUniqueName: &HStringArg) -> Result> { + #[inline] pub unsafe fn get_appointment_original_start_time(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, senderUniqueName.get(), &mut out); + let hr = ((*self.lpVtbl).get_AppointmentOriginalStartTime)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class AllJoynMessageInfo: IAllJoynMessageInfo [IAllJoynMessageInfoFactory] [CLSID_AllJoynMessageInfo]} - DEFINE_CLSID!(CLSID_AllJoynMessageInfo = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,77,101,115,115,97,103,101,73,110,102,111,0]); -} // Windows.Devices.AllJoyn -pub mod background { // Windows.Devices.Background -use ::prelude::*; - DEFINE_IID!(IID_IDeviceUseDetails, 2102808897, 21886, 16724, 185, 148, 228, 247, 161, 31, 179, 35); - RT_INTERFACE!{interface IDeviceUseDetails(IDeviceUseDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceUseDetails] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Arguments(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IDeviceUseDetails { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn get_invitees(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Invitees)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_arguments(&mut self) -> Result { + #[inline] pub unsafe fn get_subject(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Arguments)(self, &mut out); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class DeviceUseDetails: IDeviceUseDetails} - DEFINE_IID!(IID_IDeviceServicingDetails, 1252781609, 9028, 19140, 133, 39, 74, 142, 246, 144, 86, 69); - RT_INTERFACE!{interface IDeviceServicingDetails(IDeviceServicingDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceServicingDetails] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Arguments(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ExpectedDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT - }} - impl IDeviceServicingDetails { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn get_forward_header(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_ForwardHeader)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_arguments(&mut self) -> Result { + #[inline] pub unsafe fn get_comment(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Arguments)(self, &mut out); + let hr = ((*self.lpVtbl).get_Comment)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_expected_duration(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ExpectedDuration)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - } - RT_CLASS!{class DeviceServicingDetails: IDeviceServicingDetails} -} // Windows.Devices.Background -pub mod bluetooth { // Windows.Devices.Bluetooth -use ::prelude::*; - RT_ENUM! { enum BluetoothCacheMode: i32 { - Cached (BluetoothCacheMode_Cached) = 0, Uncached (BluetoothCacheMode_Uncached) = 1, - }} - RT_ENUM! { enum BluetoothMajorClass: i32 { - Miscellaneous (BluetoothMajorClass_Miscellaneous) = 0, Computer (BluetoothMajorClass_Computer) = 1, Phone (BluetoothMajorClass_Phone) = 2, NetworkAccessPoint (BluetoothMajorClass_NetworkAccessPoint) = 3, AudioVideo (BluetoothMajorClass_AudioVideo) = 4, Peripheral (BluetoothMajorClass_Peripheral) = 5, Imaging (BluetoothMajorClass_Imaging) = 6, Wearable (BluetoothMajorClass_Wearable) = 7, Toy (BluetoothMajorClass_Toy) = 8, Health (BluetoothMajorClass_Health) = 9, - }} - RT_ENUM! { enum BluetoothMinorClass: i32 { - Uncategorized (BluetoothMinorClass_Uncategorized) = 0, ComputerDesktop (BluetoothMinorClass_ComputerDesktop) = 1, ComputerServer (BluetoothMinorClass_ComputerServer) = 2, ComputerLaptop (BluetoothMinorClass_ComputerLaptop) = 3, ComputerHandheld (BluetoothMinorClass_ComputerHandheld) = 4, ComputerPalmSize (BluetoothMinorClass_ComputerPalmSize) = 5, ComputerWearable (BluetoothMinorClass_ComputerWearable) = 6, ComputerTablet (BluetoothMinorClass_ComputerTablet) = 7, PhoneCellular (BluetoothMinorClass_PhoneCellular) = 1, PhoneCordless (BluetoothMinorClass_PhoneCordless) = 2, PhoneSmartPhone (BluetoothMinorClass_PhoneSmartPhone) = 3, PhoneWired (BluetoothMinorClass_PhoneWired) = 4, PhoneIsdn (BluetoothMinorClass_PhoneIsdn) = 5, NetworkFullyAvailable (BluetoothMinorClass_NetworkFullyAvailable) = 0, NetworkUsed01To17Percent (BluetoothMinorClass_NetworkUsed01To17Percent) = 8, NetworkUsed17To33Percent (BluetoothMinorClass_NetworkUsed17To33Percent) = 16, NetworkUsed33To50Percent (BluetoothMinorClass_NetworkUsed33To50Percent) = 24, NetworkUsed50To67Percent (BluetoothMinorClass_NetworkUsed50To67Percent) = 32, NetworkUsed67To83Percent (BluetoothMinorClass_NetworkUsed67To83Percent) = 40, NetworkUsed83To99Percent (BluetoothMinorClass_NetworkUsed83To99Percent) = 48, NetworkNoServiceAvailable (BluetoothMinorClass_NetworkNoServiceAvailable) = 56, AudioVideoWearableHeadset (BluetoothMinorClass_AudioVideoWearableHeadset) = 1, AudioVideoHandsFree (BluetoothMinorClass_AudioVideoHandsFree) = 2, AudioVideoMicrophone (BluetoothMinorClass_AudioVideoMicrophone) = 4, AudioVideoLoudspeaker (BluetoothMinorClass_AudioVideoLoudspeaker) = 5, AudioVideoHeadphones (BluetoothMinorClass_AudioVideoHeadphones) = 6, AudioVideoPortableAudio (BluetoothMinorClass_AudioVideoPortableAudio) = 7, AudioVideoCarAudio (BluetoothMinorClass_AudioVideoCarAudio) = 8, AudioVideoSetTopBox (BluetoothMinorClass_AudioVideoSetTopBox) = 9, AudioVideoHifiAudioDevice (BluetoothMinorClass_AudioVideoHifiAudioDevice) = 10, AudioVideoVcr (BluetoothMinorClass_AudioVideoVcr) = 11, AudioVideoVideoCamera (BluetoothMinorClass_AudioVideoVideoCamera) = 12, AudioVideoCamcorder (BluetoothMinorClass_AudioVideoCamcorder) = 13, AudioVideoVideoMonitor (BluetoothMinorClass_AudioVideoVideoMonitor) = 14, AudioVideoVideoDisplayAndLoudspeaker (BluetoothMinorClass_AudioVideoVideoDisplayAndLoudspeaker) = 15, AudioVideoVideoConferencing (BluetoothMinorClass_AudioVideoVideoConferencing) = 16, AudioVideoGamingOrToy (BluetoothMinorClass_AudioVideoGamingOrToy) = 18, PeripheralJoystick (BluetoothMinorClass_PeripheralJoystick) = 1, PeripheralGamepad (BluetoothMinorClass_PeripheralGamepad) = 2, PeripheralRemoteControl (BluetoothMinorClass_PeripheralRemoteControl) = 3, PeripheralSensing (BluetoothMinorClass_PeripheralSensing) = 4, PeripheralDigitizerTablet (BluetoothMinorClass_PeripheralDigitizerTablet) = 5, PeripheralCardReader (BluetoothMinorClass_PeripheralCardReader) = 6, PeripheralDigitalPen (BluetoothMinorClass_PeripheralDigitalPen) = 7, PeripheralHandheldScanner (BluetoothMinorClass_PeripheralHandheldScanner) = 8, PeripheralHandheldGesture (BluetoothMinorClass_PeripheralHandheldGesture) = 9, WearableWristwatch (BluetoothMinorClass_WearableWristwatch) = 1, WearablePager (BluetoothMinorClass_WearablePager) = 2, WearableJacket (BluetoothMinorClass_WearableJacket) = 3, WearableHelmet (BluetoothMinorClass_WearableHelmet) = 4, WearableGlasses (BluetoothMinorClass_WearableGlasses) = 5, ToyRobot (BluetoothMinorClass_ToyRobot) = 1, ToyVehicle (BluetoothMinorClass_ToyVehicle) = 2, ToyDoll (BluetoothMinorClass_ToyDoll) = 3, ToyController (BluetoothMinorClass_ToyController) = 4, ToyGame (BluetoothMinorClass_ToyGame) = 5, HealthBloodPressureMonitor (BluetoothMinorClass_HealthBloodPressureMonitor) = 1, HealthThermometer (BluetoothMinorClass_HealthThermometer) = 2, HealthWeighingScale (BluetoothMinorClass_HealthWeighingScale) = 3, HealthGlucoseMeter (BluetoothMinorClass_HealthGlucoseMeter) = 4, HealthPulseOximeter (BluetoothMinorClass_HealthPulseOximeter) = 5, HealthHeartRateMonitor (BluetoothMinorClass_HealthHeartRateMonitor) = 6, HealthHealthDataDisplay (BluetoothMinorClass_HealthHealthDataDisplay) = 7, HealthStepCounter (BluetoothMinorClass_HealthStepCounter) = 8, HealthBodyCompositionAnalyzer (BluetoothMinorClass_HealthBodyCompositionAnalyzer) = 9, HealthPeakFlowMonitor (BluetoothMinorClass_HealthPeakFlowMonitor) = 10, HealthMedicationMonitor (BluetoothMinorClass_HealthMedicationMonitor) = 11, HealthKneeProsthesis (BluetoothMinorClass_HealthKneeProsthesis) = 12, HealthAnkleProsthesis (BluetoothMinorClass_HealthAnkleProsthesis) = 13, HealthGenericHealthManager (BluetoothMinorClass_HealthGenericHealthManager) = 14, HealthPersonalMobilityDevice (BluetoothMinorClass_HealthPersonalMobilityDevice) = 15, - }} - RT_ENUM! { enum BluetoothServiceCapabilities: u32 { - None (BluetoothServiceCapabilities_None) = 0, LimitedDiscoverableMode (BluetoothServiceCapabilities_LimitedDiscoverableMode) = 1, PositioningService (BluetoothServiceCapabilities_PositioningService) = 8, NetworkingService (BluetoothServiceCapabilities_NetworkingService) = 16, RenderingService (BluetoothServiceCapabilities_RenderingService) = 32, CapturingService (BluetoothServiceCapabilities_CapturingService) = 64, ObjectTransferService (BluetoothServiceCapabilities_ObjectTransferService) = 128, AudioService (BluetoothServiceCapabilities_AudioService) = 256, TelephoneService (BluetoothServiceCapabilities_TelephoneService) = 512, InformationService (BluetoothServiceCapabilities_InformationService) = 1024, - }} - RT_ENUM! { enum BluetoothConnectionStatus: i32 { - Disconnected (BluetoothConnectionStatus_Disconnected) = 0, Connected (BluetoothConnectionStatus_Connected) = 1, - }} - RT_ENUM! { enum BluetoothError: i32 { - Success (BluetoothError_Success) = 0, RadioNotAvailable (BluetoothError_RadioNotAvailable) = 1, ResourceInUse (BluetoothError_ResourceInUse) = 2, DeviceNotConnected (BluetoothError_DeviceNotConnected) = 3, OtherError (BluetoothError_OtherError) = 4, DisabledByPolicy (BluetoothError_DisabledByPolicy) = 5, NotSupported (BluetoothError_NotSupported) = 6, DisabledByUser (BluetoothError_DisabledByUser) = 7, ConsentRequired (BluetoothError_ConsentRequired) = 8, - }} - RT_ENUM! { enum BluetoothAddressType: i32 { - Public (BluetoothAddressType_Public) = 0, Random (BluetoothAddressType_Random) = 1, - }} - DEFINE_IID!(IID_IBluetoothDeviceStatics, 160554833, 22491, 18213, 187, 215, 132, 246, 67, 39, 236, 44); - RT_INTERFACE!{static interface IBluetoothDeviceStatics(IBluetoothDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDeviceStatics] { - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.networking"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.networking")] fn FromHostNameAsync(&mut self, hostName: *mut super::super::networking::HostName, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromBluetoothAddressAsync(&mut self, address: u64, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IBluetoothDeviceStatics { - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn from_host_name_async(&mut self, hostName: &super::super::networking::HostName) -> Result>> { + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromHostNameAsync)(self, hostName as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_bluetooth_address_async(&mut self, address: u64) -> Result>> { + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromBluetoothAddressAsync)(self, address, &mut out); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } } - RT_CLASS!{class BluetoothDevice: IBluetoothDevice} - RT_ACTIVATABLE!{IBluetoothDeviceStatics [CLSID_BluetoothDevice]} - RT_ACTIVATABLE!{IBluetoothDeviceStatics2 [CLSID_BluetoothDevice]} - DEFINE_CLSID!(CLSID_BluetoothDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,68,101,118,105,99,101,0]); - DEFINE_IID!(IID_IBluetoothDeviceStatics2, 3265170991, 19988, 17527, 170, 27, 184, 180, 126, 91, 126, 206); - RT_INTERFACE!{static interface IBluetoothDeviceStatics2(IBluetoothDeviceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDeviceStatics2] { - fn GetDeviceSelectorFromPairingState(&mut self, pairingState: bool, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromConnectionStatus(&mut self, connectionStatus: BluetoothConnectionStatus, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromDeviceName(&mut self, deviceName: HSTRING, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromBluetoothAddress(&mut self, bluetoothAddress: u64, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromClassOfDevice(&mut self, classOfDevice: *mut BluetoothClassOfDevice, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IAppointmentCalendarProposeNewTimeForMeetingRequest, 3457967093, 60918, 17347, 130, 183, 190, 107, 54, 140, 105, 0); + RT_INTERFACE!{interface IAppointmentCalendarProposeNewTimeForMeetingRequest(IAppointmentCalendarProposeNewTimeForMeetingRequestVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarProposeNewTimeForMeetingRequest] { + fn get_AppointmentCalendarLocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppointmentLocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppointmentOriginalStartTime(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_NewStartTime(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_NewDuration(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Comment(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IBluetoothDeviceStatics2 { - #[inline] pub unsafe fn get_device_selector_from_pairing_state(&mut self, pairingState: bool) -> Result { + impl IAppointmentCalendarProposeNewTimeForMeetingRequest { + #[inline] pub unsafe fn get_appointment_calendar_local_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromPairingState)(self, pairingState, &mut out); + let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_connection_status(&mut self, connectionStatus: BluetoothConnectionStatus) -> Result { + #[inline] pub unsafe fn get_appointment_local_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromConnectionStatus)(self, connectionStatus, &mut out); + let hr = ((*self.lpVtbl).get_AppointmentLocalId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_device_name(&mut self, deviceName: &HStringArg) -> Result { + #[inline] pub unsafe fn get_appointment_original_start_time(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromDeviceName)(self, deviceName.get(), &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AppointmentOriginalStartTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_bluetooth_address(&mut self, bluetoothAddress: u64) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromBluetoothAddress)(self, bluetoothAddress, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_new_start_time(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewStartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_class_of_device(&mut self, classOfDevice: &BluetoothClassOfDevice) -> Result { + #[inline] pub unsafe fn get_new_duration(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_subject(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromClassOfDevice)(self, classOfDevice as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class BluetoothClassOfDevice: IBluetoothClassOfDevice} - RT_ACTIVATABLE!{IBluetoothClassOfDeviceStatics [CLSID_BluetoothClassOfDevice]} - DEFINE_CLSID!(CLSID_BluetoothClassOfDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,67,108,97,115,115,79,102,68,101,118,105,99,101,0]); - DEFINE_IID!(IID_IBluetoothDevice, 590721366, 37074, 18948, 174, 245, 14, 32, 185, 230, 183, 7); - RT_INTERFACE!{interface IBluetoothDevice(IBluetoothDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDevice] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - #[cfg(not(feature="windows.networking"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.networking")] fn get_HostName(&mut self, out: *mut *mut super::super::networking::HostName) -> HRESULT, - fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ClassOfDevice(&mut self, out: *mut *mut BluetoothClassOfDevice) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_SdpRecords(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_RfcommServices(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ConnectionStatus(&mut self, out: *mut BluetoothConnectionStatus) -> HRESULT, - fn get_BluetoothAddress(&mut self, out: *mut u64) -> HRESULT, - fn add_NameChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NameChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SdpRecordsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SdpRecordsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ConnectionStatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ConnectionStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IBluetoothDevice { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn get_comment(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_Comment)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_host_name(&mut self) -> Result> { + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_HostName)(self, &mut out); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_name(&mut self) -> Result { + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Name)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_class_of_device(&mut self) -> Result> { + } + DEFINE_IID!(IID_IAppointmentCalendarUpdateMeetingResponseRequest, 2741854348, 49821, 19348, 176, 134, 126, 159, 247, 189, 132, 160); + RT_INTERFACE!{interface IAppointmentCalendarUpdateMeetingResponseRequest(IAppointmentCalendarUpdateMeetingResponseRequestVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarUpdateMeetingResponseRequest] { + fn get_AppointmentCalendarLocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppointmentLocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppointmentOriginalStartTime(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_Response(&mut self, out: *mut super::AppointmentParticipantResponse) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Comment(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SendUpdate(&mut self, out: *mut bool) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IAppointmentCalendarUpdateMeetingResponseRequest { + #[inline] pub unsafe fn get_appointment_calendar_local_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ClassOfDevice)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_sdp_records(&mut self) -> Result>> { + #[inline] pub unsafe fn get_appointment_local_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SdpRecords)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AppointmentLocalId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_rfcomm_services(&mut self) -> Result>> { + #[inline] pub unsafe fn get_appointment_original_start_time(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RfcommServices)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppointmentOriginalStartTime)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_connection_status(&mut self) -> Result { + #[inline] pub unsafe fn get_response(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ConnectionStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_Response)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_bluetooth_address(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BluetoothAddress)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_subject(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_name_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_comment(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Comment)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_send_update(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_NameChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_SendUpdate)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_name_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_NameChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_sdp_records_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SdpRecordsChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_sdp_records_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SdpRecordsChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + } + RT_CLASS!{class AppointmentDataProviderTriggerDetails: IAppointmentDataProviderTriggerDetails} + DEFINE_IID!(IID_IAppointmentCalendarSyncManagerSyncRequestEventArgs, 3390555895, 644, 20189, 135, 186, 77, 143, 105, 220, 245, 192); + RT_INTERFACE!{interface IAppointmentCalendarSyncManagerSyncRequestEventArgs(IAppointmentCalendarSyncManagerSyncRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarSyncManagerSyncRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut AppointmentCalendarSyncManagerSyncRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl IAppointmentCalendarSyncManagerSyncRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_connection_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ConnectionStatusChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_connection_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ConnectionStatusChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + } + RT_CLASS!{class AppointmentCalendarSyncManagerSyncRequest: IAppointmentCalendarSyncManagerSyncRequest} + DEFINE_IID!(IID_IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs, 3482185000, 46, 19447, 142, 157, 94, 32, 212, 154, 163, 186); + RT_INTERFACE!{interface IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs(IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut AppointmentCalendarCreateOrUpdateAppointmentRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IBluetoothDevice2, 20183380, 45398, 19920, 177, 245, 193, 27, 195, 26, 81, 99); - RT_INTERFACE!{interface IBluetoothDevice2(IBluetoothDevice2Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDevice2] { - fn get_DeviceInformation(&mut self, out: *mut *mut super::enumeration::DeviceInformation) -> HRESULT + RT_CLASS!{class AppointmentCalendarCreateOrUpdateAppointmentRequest: IAppointmentCalendarCreateOrUpdateAppointmentRequest} + DEFINE_IID!(IID_IAppointmentCalendarCancelMeetingRequestEventArgs, 444186134, 32560, 20021, 190, 239, 157, 44, 123, 109, 202, 225); + RT_INTERFACE!{interface IAppointmentCalendarCancelMeetingRequestEventArgs(IAppointmentCalendarCancelMeetingRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarCancelMeetingRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut AppointmentCalendarCancelMeetingRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - impl IBluetoothDevice2 { - #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + impl IAppointmentCalendarCancelMeetingRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IBluetoothDevice3, 1476392843, 25882, 17492, 185, 15, 235, 33, 239, 11, 13, 113); - RT_INTERFACE!{interface IBluetoothDevice3(IBluetoothDevice3Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDevice3] { - fn get_DeviceAccessInformation(&mut self, out: *mut *mut super::enumeration::DeviceAccessInformation) -> HRESULT, - fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetRfcommServicesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetRfcommServicesWithCacheModeAsync(&mut self, cacheMode: BluetoothCacheMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetRfcommServicesForIdAsync(&mut self, serviceId: *mut rfcomm::RfcommServiceId, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetRfcommServicesForIdWithCacheModeAsync(&mut self, serviceId: *mut rfcomm::RfcommServiceId, cacheMode: BluetoothCacheMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class AppointmentCalendarCancelMeetingRequest: IAppointmentCalendarCancelMeetingRequest} + DEFINE_IID!(IID_IAppointmentCalendarForwardMeetingRequestEventArgs, 822678810, 9122, 17149, 156, 130, 201, 166, 13, 89, 248, 168); + RT_INTERFACE!{interface IAppointmentCalendarForwardMeetingRequestEventArgs(IAppointmentCalendarForwardMeetingRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarForwardMeetingRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut AppointmentCalendarForwardMeetingRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - impl IBluetoothDevice3 { - #[inline] pub unsafe fn get_device_access_information(&mut self) -> Result> { + impl IAppointmentCalendarForwardMeetingRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceAccessInformation)(self, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_rfcomm_services_async(&mut self) -> Result>> { + } + RT_CLASS!{class AppointmentCalendarForwardMeetingRequest: IAppointmentCalendarForwardMeetingRequest} + DEFINE_IID!(IID_IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs, 3537336280, 65233, 17024, 163, 186, 46, 31, 71, 96, 154, 162); + RT_INTERFACE!{interface IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs(IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut AppointmentCalendarProposeNewTimeForMeetingRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetRfcommServicesAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_rfcomm_services_with_cache_mode_async(&mut self, cacheMode: BluetoothCacheMode) -> Result>> { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetRfcommServicesWithCacheModeAsync)(self, cacheMode, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_rfcomm_services_for_id_async(&mut self, serviceId: &rfcomm::RfcommServiceId) -> Result>> { + } + RT_CLASS!{class AppointmentCalendarProposeNewTimeForMeetingRequest: IAppointmentCalendarProposeNewTimeForMeetingRequest} + DEFINE_IID!(IID_IAppointmentCalendarUpdateMeetingResponseRequestEventArgs, 2289408131, 38847, 18333, 174, 213, 11, 232, 206, 86, 125, 30); + RT_INTERFACE!{interface IAppointmentCalendarUpdateMeetingResponseRequestEventArgs(IAppointmentCalendarUpdateMeetingResponseRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarUpdateMeetingResponseRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut AppointmentCalendarUpdateMeetingResponseRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl IAppointmentCalendarUpdateMeetingResponseRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetRfcommServicesForIdAsync)(self, serviceId as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_rfcomm_services_for_id_with_cache_mode_async(&mut self, serviceId: &rfcomm::RfcommServiceId, cacheMode: BluetoothCacheMode) -> Result>> { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetRfcommServicesForIdWithCacheModeAsync)(self, serviceId as *const _ as *mut _, cacheMode, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IBluetoothLEAppearanceCategoriesStatics, 1833784574, 1130, 16773, 170, 182, 130, 76, 240, 97, 8, 97); - RT_INTERFACE!{static interface IBluetoothLEAppearanceCategoriesStatics(IBluetoothLEAppearanceCategoriesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAppearanceCategoriesStatics] { - fn get_Uncategorized(&mut self, out: *mut u16) -> HRESULT, - fn get_Phone(&mut self, out: *mut u16) -> HRESULT, - fn get_Computer(&mut self, out: *mut u16) -> HRESULT, - fn get_Watch(&mut self, out: *mut u16) -> HRESULT, - fn get_Clock(&mut self, out: *mut u16) -> HRESULT, - fn get_Display(&mut self, out: *mut u16) -> HRESULT, - fn get_RemoteControl(&mut self, out: *mut u16) -> HRESULT, - fn get_EyeGlasses(&mut self, out: *mut u16) -> HRESULT, - fn get_Tag(&mut self, out: *mut u16) -> HRESULT, - fn get_Keyring(&mut self, out: *mut u16) -> HRESULT, - fn get_MediaPlayer(&mut self, out: *mut u16) -> HRESULT, - fn get_BarcodeScanner(&mut self, out: *mut u16) -> HRESULT, - fn get_Thermometer(&mut self, out: *mut u16) -> HRESULT, - fn get_HeartRate(&mut self, out: *mut u16) -> HRESULT, - fn get_BloodPressure(&mut self, out: *mut u16) -> HRESULT, - fn get_HumanInterfaceDevice(&mut self, out: *mut u16) -> HRESULT, - fn get_GlucoseMeter(&mut self, out: *mut u16) -> HRESULT, - fn get_RunningWalking(&mut self, out: *mut u16) -> HRESULT, - fn get_Cycling(&mut self, out: *mut u16) -> HRESULT, - fn get_PulseOximeter(&mut self, out: *mut u16) -> HRESULT, - fn get_WeightScale(&mut self, out: *mut u16) -> HRESULT, - fn get_OutdoorSportActivity(&mut self, out: *mut u16) -> HRESULT + RT_CLASS!{class AppointmentCalendarUpdateMeetingResponseRequest: IAppointmentCalendarUpdateMeetingResponseRequest} +} // Windows.ApplicationModel.Appointments.DataProvider +} // Windows.ApplicationModel.Appointments +pub mod background { // Windows.ApplicationModel.Background +use ::prelude::*; + RT_CLASS!{class AppointmentStoreNotificationTrigger: IBackgroundTrigger} + RT_ENUM! { enum ApplicationTriggerResult: i32 { + Allowed (ApplicationTriggerResult_Allowed) = 0, CurrentlyRunning (ApplicationTriggerResult_CurrentlyRunning) = 1, DisabledByPolicy (ApplicationTriggerResult_DisabledByPolicy) = 2, UnknownError (ApplicationTriggerResult_UnknownError) = 3, }} - impl IBluetoothLEAppearanceCategoriesStatics { - #[inline] pub unsafe fn get_uncategorized(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Uncategorized)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + RT_CLASS!{class ApplicationTrigger: IApplicationTrigger} + DEFINE_IID!(IID_IApplicationTriggerDetails, 2547804850, 8729, 19102, 156, 94, 65, 208, 71, 247, 110, 130); + RT_INTERFACE!{interface IApplicationTriggerDetails(IApplicationTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationTriggerDetails] { + fn get_Arguments(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + }} + impl IApplicationTriggerDetails { + #[inline] pub unsafe fn get_arguments(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Arguments)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_phone(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Phone)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class ApplicationTriggerDetails: IApplicationTriggerDetails} + RT_ENUM! { enum BackgroundAccessStatus: i32 { + Unspecified (BackgroundAccessStatus_Unspecified) = 0, AllowedWithAlwaysOnRealTimeConnectivity (BackgroundAccessStatus_AllowedWithAlwaysOnRealTimeConnectivity) = 1, AllowedMayUseActiveRealTimeConnectivity (BackgroundAccessStatus_AllowedMayUseActiveRealTimeConnectivity) = 2, Denied (BackgroundAccessStatus_Denied) = 3, AlwaysAllowed (BackgroundAccessStatus_AlwaysAllowed) = 4, AllowedSubjectToSystemPolicy (BackgroundAccessStatus_AllowedSubjectToSystemPolicy) = 5, DeniedBySystemPolicy (BackgroundAccessStatus_DeniedBySystemPolicy) = 6, DeniedByUser (BackgroundAccessStatus_DeniedByUser) = 7, + }} + DEFINE_IID!(IID_IBackgroundExecutionManagerStatics, 3894864472, 26281, 19777, 131, 212, 180, 193, 140, 135, 184, 70); + RT_INTERFACE!{static interface IBackgroundExecutionManagerStatics(IBackgroundExecutionManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundExecutionManagerStatics] { + fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessForApplicationAsync(&mut self, applicationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RemoveAccess(&mut self) -> HRESULT, + fn RemoveAccessForApplication(&mut self, applicationId: HSTRING) -> HRESULT, + fn GetAccessStatus(&mut self, out: *mut BackgroundAccessStatus) -> HRESULT, + fn GetAccessStatusForApplication(&mut self, applicationId: HSTRING, out: *mut BackgroundAccessStatus) -> HRESULT + }} + impl IBackgroundExecutionManagerStatics { + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_computer(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Computer)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn request_access_for_application_async(&mut self, applicationId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessForApplicationAsync)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_watch(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Watch)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_access(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveAccess)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_clock(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Clock)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_access_for_application(&mut self, applicationId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveAccessForApplication)(self, applicationId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_display(&mut self) -> Result { + #[inline] pub unsafe fn get_access_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Display)(self, &mut out); + let hr = ((*self.lpVtbl).GetAccessStatus)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_remote_control(&mut self) -> Result { + #[inline] pub unsafe fn get_access_status_for_application(&mut self, applicationId: &HStringArg) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RemoteControl)(self, &mut out); + let hr = ((*self.lpVtbl).GetAccessStatusForApplication)(self, applicationId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_eye_glasses(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_EyeGlasses)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_ACTIVATABLE!{IBackgroundExecutionManagerStatics [CLSID_BackgroundExecutionManager]} + DEFINE_CLSID!(CLSID_BackgroundExecutionManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,66,97,99,107,103,114,111,117,110,100,69,120,101,99,117,116,105,111,110,77,97,110,97,103,101,114,0]); + RT_ENUM! { enum MediaProcessingTriggerResult: i32 { + Allowed (MediaProcessingTriggerResult_Allowed) = 0, CurrentlyRunning (MediaProcessingTriggerResult_CurrentlyRunning) = 1, DisabledByPolicy (MediaProcessingTriggerResult_DisabledByPolicy) = 2, UnknownError (MediaProcessingTriggerResult_UnknownError) = 3, + }} + RT_CLASS!{class MediaProcessingTrigger: IMediaProcessingTrigger} + RT_ENUM! { enum BackgroundWorkCostValue: i32 { + Low (BackgroundWorkCostValue_Low) = 0, Medium (BackgroundWorkCostValue_Medium) = 1, High (BackgroundWorkCostValue_High) = 2, + }} + RT_ENUM! { enum BackgroundTaskCancellationReason: i32 { + Abort (BackgroundTaskCancellationReason_Abort) = 0, Terminating (BackgroundTaskCancellationReason_Terminating) = 1, LoggingOff (BackgroundTaskCancellationReason_LoggingOff) = 2, ServicingUpdate (BackgroundTaskCancellationReason_ServicingUpdate) = 3, IdleTask (BackgroundTaskCancellationReason_IdleTask) = 4, Uninstall (BackgroundTaskCancellationReason_Uninstall) = 5, ConditionLoss (BackgroundTaskCancellationReason_ConditionLoss) = 6, SystemPolicy (BackgroundTaskCancellationReason_SystemPolicy) = 7, QuietHoursEntered (BackgroundTaskCancellationReason_QuietHoursEntered) = 8, ExecutionTimeExceeded (BackgroundTaskCancellationReason_ExecutionTimeExceeded) = 9, ResourceRevocation (BackgroundTaskCancellationReason_ResourceRevocation) = 10, EnergySaver (BackgroundTaskCancellationReason_EnergySaver) = 11, + }} + RT_ENUM! { enum BackgroundTaskThrottleCounter: i32 { + All (BackgroundTaskThrottleCounter_All) = 0, Cpu (BackgroundTaskThrottleCounter_Cpu) = 1, Network (BackgroundTaskThrottleCounter_Network) = 2, + }} + DEFINE_IID!(IID_BackgroundTaskCanceledEventHandler, 2797910720, 20984, 19543, 172, 63, 21, 109, 209, 104, 12, 79); + RT_DELEGATE!{delegate BackgroundTaskCanceledEventHandler(BackgroundTaskCanceledEventHandlerVtbl, BackgroundTaskCanceledEventHandlerImpl) [IID_BackgroundTaskCanceledEventHandler] { + fn Invoke(&mut self, sender: *mut IBackgroundTaskInstance, reason: BackgroundTaskCancellationReason) -> HRESULT + }} + impl BackgroundTaskCanceledEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IBackgroundTaskInstance, reason: BackgroundTaskCancellationReason) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, reason); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_tag(&mut self) -> Result { + } + DEFINE_IID!(IID_IBackgroundTaskInstance, 2254166650, 8664, 17779, 143, 50, 146, 138, 27, 6, 65, 246); + RT_INTERFACE!{interface IBackgroundTaskInstance(IBackgroundTaskInstanceVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskInstance] { + fn get_InstanceId(&mut self, out: *mut Guid) -> HRESULT, + fn get_Task(&mut self, out: *mut *mut BackgroundTaskRegistration) -> HRESULT, + fn get_Progress(&mut self, out: *mut u32) -> HRESULT, + fn put_Progress(&mut self, value: u32) -> HRESULT, + fn get_TriggerDetails(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn add_Canceled(&mut self, cancelHandler: *mut BackgroundTaskCanceledEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Canceled(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_SuspendedCount(&mut self, out: *mut u32) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut BackgroundTaskDeferral) -> HRESULT + }} + impl IBackgroundTaskInstance { + #[inline] pub unsafe fn get_instance_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); + let hr = ((*self.lpVtbl).get_InstanceId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_keyring(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Keyring)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_task(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Task)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_media_player(&mut self) -> Result { + #[inline] pub unsafe fn get_progress(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MediaPlayer)(self, &mut out); + let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_barcode_scanner(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BarcodeScanner)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_progress(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Progress)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_thermometer(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Thermometer)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_trigger_details(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TriggerDetails)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_heart_rate(&mut self) -> Result { + #[inline] pub unsafe fn add_canceled(&mut self, cancelHandler: &BackgroundTaskCanceledEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HeartRate)(self, &mut out); + let hr = ((*self.lpVtbl).add_Canceled)(self, cancelHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_blood_pressure(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BloodPressure)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_canceled(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Canceled)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_human_interface_device(&mut self) -> Result { + #[inline] pub unsafe fn get_suspended_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HumanInterfaceDevice)(self, &mut out); + let hr = ((*self.lpVtbl).get_SuspendedCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_glucose_meter(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GlucoseMeter)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_running_walking(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RunningWalking)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class BackgroundTaskRegistration: IBackgroundTaskRegistration} + RT_ACTIVATABLE!{IBackgroundTaskRegistrationStatics [CLSID_BackgroundTaskRegistration]} + DEFINE_CLSID!(CLSID_BackgroundTaskRegistration = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,66,97,99,107,103,114,111,117,110,100,84,97,115,107,82,101,103,105,115,116,114,97,116,105,111,110,0]); + RT_CLASS!{class BackgroundTaskDeferral: IBackgroundTaskDeferral} + DEFINE_IID!(IID_BackgroundTaskProgressEventHandler, 1189111868, 35464, 19609, 128, 76, 118, 137, 127, 98, 119, 166); + RT_DELEGATE!{delegate BackgroundTaskProgressEventHandler(BackgroundTaskProgressEventHandlerVtbl, BackgroundTaskProgressEventHandlerImpl) [IID_BackgroundTaskProgressEventHandler] { + fn Invoke(&mut self, sender: *mut BackgroundTaskRegistration, args: *mut BackgroundTaskProgressEventArgs) -> HRESULT + }} + impl BackgroundTaskProgressEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &BackgroundTaskRegistration, args: &BackgroundTaskProgressEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Cycling)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class BackgroundTaskProgressEventArgs: IBackgroundTaskProgressEventArgs} + DEFINE_IID!(IID_BackgroundTaskCompletedEventHandler, 1530456361, 41094, 18087, 166, 120, 67, 145, 53, 130, 43, 207); + RT_DELEGATE!{delegate BackgroundTaskCompletedEventHandler(BackgroundTaskCompletedEventHandlerVtbl, BackgroundTaskCompletedEventHandlerImpl) [IID_BackgroundTaskCompletedEventHandler] { + fn Invoke(&mut self, sender: *mut BackgroundTaskRegistration, args: *mut BackgroundTaskCompletedEventArgs) -> HRESULT + }} + impl BackgroundTaskCompletedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &BackgroundTaskRegistration, args: &BackgroundTaskCompletedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_pulse_oximeter(&mut self) -> Result { + } + RT_CLASS!{class BackgroundTaskCompletedEventArgs: IBackgroundTaskCompletedEventArgs} + DEFINE_IID!(IID_IBackgroundWorkCostStatics, 3342902882, 49936, 19330, 179, 227, 59, 207, 185, 228, 199, 125); + RT_INTERFACE!{static interface IBackgroundWorkCostStatics(IBackgroundWorkCostStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundWorkCostStatics] { + fn get_CurrentBackgroundWorkCost(&mut self, out: *mut BackgroundWorkCostValue) -> HRESULT + }} + impl IBackgroundWorkCostStatics { + #[inline] pub unsafe fn get_current_background_work_cost(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PulseOximeter)(self, &mut out); + let hr = ((*self.lpVtbl).get_CurrentBackgroundWorkCost)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_weight_scale(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_WeightScale)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IBackgroundTaskDeferral, 2479625581, 44839, 19923, 132, 110, 36, 238, 64, 202, 221, 37); + RT_INTERFACE!{interface IBackgroundTaskDeferral(IBackgroundTaskDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IBackgroundTaskDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_outdoor_sport_activity(&mut self) -> Result { + } + DEFINE_IID!(IID_IBackgroundTaskInstance2, 1333592438, 3190, 20404, 137, 109, 93, 225, 134, 65, 34, 246); + RT_INTERFACE!{interface IBackgroundTaskInstance2(IBackgroundTaskInstance2Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskInstance2] { + fn GetThrottleCount(&mut self, counter: BackgroundTaskThrottleCounter, out: *mut u32) -> HRESULT + }} + impl IBackgroundTaskInstance2 { + #[inline] pub unsafe fn get_throttle_count(&mut self, counter: BackgroundTaskThrottleCounter) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_OutdoorSportActivity)(self, &mut out); + let hr = ((*self.lpVtbl).GetThrottleCount)(self, counter, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_ACTIVATABLE!{IBluetoothLEAppearanceCategoriesStatics [CLSID_BluetoothLEAppearanceCategories]} - DEFINE_CLSID!(CLSID_BluetoothLEAppearanceCategories = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,76,69,65,112,112,101,97,114,97,110,99,101,67,97,116,101,103,111,114,105,101,115,0]); - DEFINE_IID!(IID_IBluetoothLEAppearanceSubcategoriesStatics, 3850085894, 8516, 16730, 131, 18, 113, 204, 242, 145, 248, 209); - RT_INTERFACE!{static interface IBluetoothLEAppearanceSubcategoriesStatics(IBluetoothLEAppearanceSubcategoriesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAppearanceSubcategoriesStatics] { - fn get_Generic(&mut self, out: *mut u16) -> HRESULT, - fn get_SportsWatch(&mut self, out: *mut u16) -> HRESULT, - fn get_ThermometerEar(&mut self, out: *mut u16) -> HRESULT, - fn get_HeartRateBelt(&mut self, out: *mut u16) -> HRESULT, - fn get_BloodPressureArm(&mut self, out: *mut u16) -> HRESULT, - fn get_BloodPressureWrist(&mut self, out: *mut u16) -> HRESULT, - fn get_Keyboard(&mut self, out: *mut u16) -> HRESULT, - fn get_Mouse(&mut self, out: *mut u16) -> HRESULT, - fn get_Joystick(&mut self, out: *mut u16) -> HRESULT, - fn get_Gamepad(&mut self, out: *mut u16) -> HRESULT, - fn get_DigitizerTablet(&mut self, out: *mut u16) -> HRESULT, - fn get_CardReader(&mut self, out: *mut u16) -> HRESULT, - fn get_DigitalPen(&mut self, out: *mut u16) -> HRESULT, - fn get_BarcodeScanner(&mut self, out: *mut u16) -> HRESULT, - fn get_RunningWalkingInShoe(&mut self, out: *mut u16) -> HRESULT, - fn get_RunningWalkingOnShoe(&mut self, out: *mut u16) -> HRESULT, - fn get_RunningWalkingOnHip(&mut self, out: *mut u16) -> HRESULT, - fn get_CyclingComputer(&mut self, out: *mut u16) -> HRESULT, - fn get_CyclingSpeedSensor(&mut self, out: *mut u16) -> HRESULT, - fn get_CyclingCadenceSensor(&mut self, out: *mut u16) -> HRESULT, - fn get_CyclingPowerSensor(&mut self, out: *mut u16) -> HRESULT, - fn get_CyclingSpeedCadenceSensor(&mut self, out: *mut u16) -> HRESULT, - fn get_OximeterFingertip(&mut self, out: *mut u16) -> HRESULT, - fn get_OximeterWristWorn(&mut self, out: *mut u16) -> HRESULT, - fn get_LocationDisplay(&mut self, out: *mut u16) -> HRESULT, - fn get_LocationNavigationDisplay(&mut self, out: *mut u16) -> HRESULT, - fn get_LocationPod(&mut self, out: *mut u16) -> HRESULT, - fn get_LocationNavigationPod(&mut self, out: *mut u16) -> HRESULT + DEFINE_IID!(IID_IBackgroundTaskInstance4, 2133455420, 43524, 19208, 151, 176, 6, 216, 116, 205, 171, 245); + RT_INTERFACE!{interface IBackgroundTaskInstance4(IBackgroundTaskInstance4Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskInstance4] { + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT }} - impl IBluetoothLEAppearanceSubcategoriesStatics { - #[inline] pub unsafe fn get_generic(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Generic)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IBackgroundTaskInstance4 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sports_watch(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SportsWatch)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IBackgroundTask, 2098451764, 64786, 17358, 140, 34, 234, 31, 241, 60, 6, 223); + RT_INTERFACE!{interface IBackgroundTask(IBackgroundTaskVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTask] { + fn Run(&mut self, taskInstance: *mut IBackgroundTaskInstance) -> HRESULT + }} + impl IBackgroundTask { + #[inline] pub unsafe fn run(&mut self, taskInstance: &IBackgroundTaskInstance) -> Result<()> { + let hr = ((*self.lpVtbl).Run)(self, taskInstance as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_thermometer_ear(&mut self) -> Result { + } + DEFINE_IID!(IID_IBackgroundTaskRegistration, 275074242, 41582, 17343, 140, 18, 31, 180, 13, 191, 191, 160); + RT_INTERFACE!{interface IBackgroundTaskRegistration(IBackgroundTaskRegistrationVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskRegistration] { + fn get_TaskId(&mut self, out: *mut Guid) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn add_Progress(&mut self, handler: *mut BackgroundTaskProgressEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Progress(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Completed(&mut self, handler: *mut BackgroundTaskCompletedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn Unregister(&mut self, cancelTask: bool) -> HRESULT + }} + impl IBackgroundTaskRegistration { + #[inline] pub unsafe fn get_task_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ThermometerEar)(self, &mut out); + let hr = ((*self.lpVtbl).get_TaskId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_heart_rate_belt(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HeartRateBelt)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_blood_pressure_arm(&mut self) -> Result { + #[inline] pub unsafe fn add_progress(&mut self, handler: &BackgroundTaskProgressEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BloodPressureArm)(self, &mut out); + let hr = ((*self.lpVtbl).add_Progress)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_blood_pressure_wrist(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BloodPressureWrist)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_progress(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Progress)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_keyboard(&mut self) -> Result { + #[inline] pub unsafe fn add_completed(&mut self, handler: &BackgroundTaskCompletedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Keyboard)(self, &mut out); + let hr = ((*self.lpVtbl).add_Completed)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_mouse(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Mouse)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_completed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Completed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_joystick(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Joystick)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn unregister(&mut self, cancelTask: bool) -> Result<()> { + let hr = ((*self.lpVtbl).Unregister)(self, cancelTask); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_gamepad(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Gamepad)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IBackgroundTaskRegistration2, 1631110915, 48006, 16658, 175, 195, 127, 147, 155, 22, 110, 59); + RT_INTERFACE!{interface IBackgroundTaskRegistration2(IBackgroundTaskRegistration2Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskRegistration2] { + fn get_Trigger(&mut self, out: *mut *mut IBackgroundTrigger) -> HRESULT + }} + impl IBackgroundTaskRegistration2 { + #[inline] pub unsafe fn get_trigger(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Trigger)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_digitizer_tablet(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DigitizerTablet)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IBackgroundTrigger, 2226364504, 24615, 19335, 151, 144, 189, 243, 247, 87, 219, 215); + RT_INTERFACE!{interface IBackgroundTrigger(IBackgroundTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTrigger] { + + }} + DEFINE_IID!(IID_IAppointmentStoreNotificationTrigger, 1691616268, 49665, 17069, 170, 42, 226, 27, 163, 66, 91, 109); + RT_INTERFACE!{interface IAppointmentStoreNotificationTrigger(IAppointmentStoreNotificationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentStoreNotificationTrigger] { + + }} + DEFINE_IID!(IID_IApplicationTrigger, 189171248, 38260, 18732, 158, 147, 26, 58, 230, 51, 95, 233); + RT_INTERFACE!{interface IApplicationTrigger(IApplicationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationTrigger] { + fn RequestAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAsyncWithArguments(&mut self, arguments: *mut super::super::foundation::collections::ValueSet, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IApplicationTrigger { + #[inline] pub unsafe fn request_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_card_reader(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CardReader)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn request_async_with_arguments(&mut self, arguments: &super::super::foundation::collections::ValueSet) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAsyncWithArguments)(self, arguments as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_digital_pen(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DigitalPen)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IMediaProcessingTrigger, 2593504869, 35410, 19248, 144, 17, 207, 56, 4, 14, 168, 176); + RT_INTERFACE!{interface IMediaProcessingTrigger(IMediaProcessingTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaProcessingTrigger] { + fn RequestAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAsyncWithArguments(&mut self, arguments: *mut super::super::foundation::collections::ValueSet, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMediaProcessingTrigger { + #[inline] pub unsafe fn request_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_barcode_scanner(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BarcodeScanner)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn request_async_with_arguments(&mut self, arguments: &super::super::foundation::collections::ValueSet) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAsyncWithArguments)(self, arguments as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_running_walking_in_shoe(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RunningWalkingInShoe)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IBackgroundTaskRegistrationStatics, 1280585577, 45056, 17082, 160, 147, 106, 86, 60, 101, 227, 248); + RT_INTERFACE!{static interface IBackgroundTaskRegistrationStatics(IBackgroundTaskRegistrationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskRegistrationStatics] { + fn get_AllTasks(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + }} + impl IBackgroundTaskRegistrationStatics { + #[inline] pub unsafe fn get_all_tasks(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AllTasks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_running_walking_on_shoe(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RunningWalkingOnShoe)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IBackgroundTaskBuilder, 55661838, 15972, 17778, 169, 58, 132, 7, 90, 55, 201, 23); + RT_INTERFACE!{interface IBackgroundTaskBuilder(IBackgroundTaskBuilderVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskBuilder] { + fn put_TaskEntryPoint(&mut self, value: HSTRING) -> HRESULT, + fn get_TaskEntryPoint(&mut self, out: *mut HSTRING) -> HRESULT, + fn SetTrigger(&mut self, trigger: *mut IBackgroundTrigger) -> HRESULT, + fn AddCondition(&mut self, condition: *mut IBackgroundCondition) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn Register(&mut self, out: *mut *mut BackgroundTaskRegistration) -> HRESULT + }} + impl IBackgroundTaskBuilder { + #[inline] pub unsafe fn set_task_entry_point(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TaskEntryPoint)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_running_walking_on_hip(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RunningWalkingOnHip)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_task_entry_point(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TaskEntryPoint)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling_computer(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CyclingComputer)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_trigger(&mut self, trigger: &IBackgroundTrigger) -> Result<()> { + let hr = ((*self.lpVtbl).SetTrigger)(self, trigger as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling_speed_sensor(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CyclingSpeedSensor)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn add_condition(&mut self, condition: &IBackgroundCondition) -> Result<()> { + let hr = ((*self.lpVtbl).AddCondition)(self, condition as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling_cadence_sensor(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CyclingCadenceSensor)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling_power_sensor(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CyclingPowerSensor)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling_speed_cadence_sensor(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CyclingSpeedCadenceSensor)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn register(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Register)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_oximeter_fingertip(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_OximeterFingertip)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IBackgroundCondition, 2923995630, 35153, 16394, 131, 2, 156, 156, 154, 42, 58, 59); + RT_INTERFACE!{interface IBackgroundCondition(IBackgroundConditionVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundCondition] { + + }} + DEFINE_IID!(IID_IBackgroundTaskBuilder2, 1793576881, 4175, 16493, 141, 182, 132, 74, 87, 15, 66, 187); + RT_INTERFACE!{interface IBackgroundTaskBuilder2(IBackgroundTaskBuilder2Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskBuilder2] { + fn put_CancelOnConditionLoss(&mut self, value: bool) -> HRESULT, + fn get_CancelOnConditionLoss(&mut self, out: *mut bool) -> HRESULT + }} + impl IBackgroundTaskBuilder2 { + #[inline] pub unsafe fn set_cancel_on_condition_loss(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CancelOnConditionLoss)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_oximeter_wrist_worn(&mut self) -> Result { + #[inline] pub unsafe fn get_cancel_on_condition_loss(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_OximeterWristWorn)(self, &mut out); + let hr = ((*self.lpVtbl).get_CancelOnConditionLoss)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_location_display(&mut self) -> Result { + } + DEFINE_IID!(IID_IBackgroundTaskBuilder3, 684150602, 35753, 19465, 162, 79, 25, 104, 62, 44, 146, 76); + RT_INTERFACE!{interface IBackgroundTaskBuilder3(IBackgroundTaskBuilder3Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskBuilder3] { + fn put_IsNetworkRequested(&mut self, value: bool) -> HRESULT, + fn get_IsNetworkRequested(&mut self, out: *mut bool) -> HRESULT + }} + impl IBackgroundTaskBuilder3 { + #[inline] pub unsafe fn set_is_network_requested(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsNetworkRequested)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_network_requested(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LocationDisplay)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsNetworkRequested)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_location_navigation_display(&mut self) -> Result { + } + DEFINE_IID!(IID_IBackgroundTaskCompletedEventArgs, 1448945103, 61961, 18676, 153, 103, 43, 24, 79, 123, 251, 240); + RT_INTERFACE!{interface IBackgroundTaskCompletedEventArgs(IBackgroundTaskCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskCompletedEventArgs] { + fn get_InstanceId(&mut self, out: *mut Guid) -> HRESULT, + fn CheckResult(&mut self) -> HRESULT + }} + impl IBackgroundTaskCompletedEventArgs { + #[inline] pub unsafe fn get_instance_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LocationNavigationDisplay)(self, &mut out); + let hr = ((*self.lpVtbl).get_InstanceId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_location_pod(&mut self) -> Result { + #[inline] pub unsafe fn check_result(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).CheckResult)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundTaskProgressEventArgs, 4212418732, 33586, 19722, 149, 50, 3, 234, 230, 132, 218, 49); + RT_INTERFACE!{interface IBackgroundTaskProgressEventArgs(IBackgroundTaskProgressEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskProgressEventArgs] { + fn get_InstanceId(&mut self, out: *mut Guid) -> HRESULT, + fn get_Progress(&mut self, out: *mut u32) -> HRESULT + }} + impl IBackgroundTaskProgressEventArgs { + #[inline] pub unsafe fn get_instance_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LocationPod)(self, &mut out); + let hr = ((*self.lpVtbl).get_InstanceId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_location_navigation_pod(&mut self) -> Result { + #[inline] pub unsafe fn get_progress(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LocationNavigationPod)(self, &mut out); + let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_ACTIVATABLE!{IBluetoothLEAppearanceSubcategoriesStatics [CLSID_BluetoothLEAppearanceSubcategories]} - DEFINE_CLSID!(CLSID_BluetoothLEAppearanceSubcategories = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,76,69,65,112,112,101,97,114,97,110,99,101,83,117,98,99,97,116,101,103,111,114,105,101,115,0]); - DEFINE_IID!(IID_IBluetoothLEAppearance, 1562409458, 26280, 16984, 152, 94, 2, 180, 217, 80, 159, 24); - RT_INTERFACE!{interface IBluetoothLEAppearance(IBluetoothLEAppearanceVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAppearance] { - fn get_RawValue(&mut self, out: *mut u16) -> HRESULT, - fn get_Category(&mut self, out: *mut u16) -> HRESULT, - fn get_SubCategory(&mut self, out: *mut u16) -> HRESULT + RT_CLASS!{class BackgroundTaskBuilder: IBackgroundTaskBuilder} + RT_ACTIVATABLE!{IBackgroundWorkCostStatics [CLSID_BackgroundWorkCost]} + DEFINE_CLSID!(CLSID_BackgroundWorkCost = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,66,97,99,107,103,114,111,117,110,100,87,111,114,107,67,111,115,116,0]); + DEFINE_IID!(IID_IChatMessageNotificationTrigger, 1362838463, 7488, 23645, 120, 245, 201, 35, 254, 227, 115, 158); + RT_INTERFACE!{interface IChatMessageNotificationTrigger(IChatMessageNotificationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageNotificationTrigger] { + }} - impl IBluetoothLEAppearance { - #[inline] pub unsafe fn get_raw_value(&mut self) -> Result { + DEFINE_IID!(IID_IChatMessageReceivedNotificationTrigger, 1050899982, 47861, 16503, 136, 233, 6, 12, 246, 240, 198, 213); + RT_INTERFACE!{interface IChatMessageReceivedNotificationTrigger(IChatMessageReceivedNotificationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageReceivedNotificationTrigger] { + + }} + DEFINE_IID!(IID_IRcsEndUserMessageAvailableTrigger, 2557283690, 45814, 18047, 169, 120, 164, 64, 145, 193, 26, 102); + RT_INTERFACE!{interface IRcsEndUserMessageAvailableTrigger(IRcsEndUserMessageAvailableTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IRcsEndUserMessageAvailableTrigger] { + + }} + RT_CLASS!{class ChatMessageNotificationTrigger: IBackgroundTrigger} + RT_CLASS!{class ChatMessageReceivedNotificationTrigger: IBackgroundTrigger} + RT_CLASS!{class RcsEndUserMessageAvailableTrigger: IBackgroundTrigger} + DEFINE_IID!(IID_IContactStoreNotificationTrigger, 3358802331, 18181, 17777, 154, 22, 6, 185, 151, 191, 156, 150); + RT_INTERFACE!{interface IContactStoreNotificationTrigger(IContactStoreNotificationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IContactStoreNotificationTrigger] { + + }} + RT_CLASS!{class ContactStoreNotificationTrigger: IBackgroundTrigger} + DEFINE_IID!(IID_IContentPrefetchTrigger, 1896228846, 1274, 17419, 128, 192, 23, 50, 2, 25, 158, 93); + RT_INTERFACE!{interface IContentPrefetchTrigger(IContentPrefetchTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IContentPrefetchTrigger] { + fn get_WaitInterval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IContentPrefetchTrigger { + #[inline] pub unsafe fn get_wait_interval(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RawValue)(self, &mut out); + let hr = ((*self.lpVtbl).get_WaitInterval)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_category(&mut self) -> Result { + } + DEFINE_IID!(IID_IContentPrefetchTriggerFactory, 3261349594, 35331, 16542, 184, 196, 136, 129, 76, 40, 204, 182); + RT_INTERFACE!{static interface IContentPrefetchTriggerFactory(IContentPrefetchTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IContentPrefetchTriggerFactory] { + fn Create(&mut self, waitInterval: super::super::foundation::TimeSpan, out: *mut *mut ContentPrefetchTrigger) -> HRESULT + }} + impl IContentPrefetchTriggerFactory { + #[inline] pub unsafe fn create(&mut self, waitInterval: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, waitInterval, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ContentPrefetchTrigger: IContentPrefetchTrigger [IContentPrefetchTriggerFactory] [CLSID_ContentPrefetchTrigger]} + DEFINE_CLSID!(CLSID_ContentPrefetchTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,67,111,110,116,101,110,116,80,114,101,102,101,116,99,104,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IEmailStoreNotificationTrigger, 2557282010, 18411, 17000, 164, 242, 243, 247, 113, 136, 56, 138); + RT_INTERFACE!{interface IEmailStoreNotificationTrigger(IEmailStoreNotificationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IEmailStoreNotificationTrigger] { + + }} + RT_CLASS!{class EmailStoreNotificationTrigger: IBackgroundTrigger} + RT_CLASS!{class MobileBroadbandRegistrationStateChangeTrigger: IBackgroundTrigger} + RT_CLASS!{class MobileBroadbandRadioStateChangeTrigger: IBackgroundTrigger} + RT_CLASS!{class MobileBroadbandPinLockStateChangeTrigger: IBackgroundTrigger} + RT_CLASS!{class MobileBroadbandDeviceServiceNotificationTrigger: IBackgroundTrigger} + DEFINE_IID!(IID_ISecondaryAuthenticationFactorAuthenticationTrigger, 4063752999, 20865, 20260, 150, 167, 112, 10, 78, 95, 172, 98); + RT_INTERFACE!{interface ISecondaryAuthenticationFactorAuthenticationTrigger(ISecondaryAuthenticationFactorAuthenticationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorAuthenticationTrigger] { + + }} + RT_CLASS!{class SecondaryAuthenticationFactorAuthenticationTrigger: ISecondaryAuthenticationFactorAuthenticationTrigger} + DEFINE_IID!(IID_ISmsMessageReceivedTriggerFactory, 3929725128, 27556, 19122, 141, 33, 188, 107, 9, 199, 117, 100); + RT_INTERFACE!{static interface ISmsMessageReceivedTriggerFactory(ISmsMessageReceivedTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageReceivedTriggerFactory] { + #[cfg(feature="windows.devices")] fn Create(&mut self, filterRules: *mut super::super::devices::sms::SmsFilterRules, out: *mut *mut SmsMessageReceivedTrigger) -> HRESULT + }} + impl ISmsMessageReceivedTriggerFactory { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn create(&mut self, filterRules: &super::super::devices::sms::SmsFilterRules) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, filterRules as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SmsMessageReceivedTrigger: IBackgroundTrigger [ISmsMessageReceivedTriggerFactory] [CLSID_SmsMessageReceivedTrigger]} + DEFINE_CLSID!(CLSID_SmsMessageReceivedTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,83,109,115,77,101,115,115,97,103,101,82,101,99,101,105,118,101,100,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IStorageLibraryContentChangedTrigger, 372760743, 33436, 17852, 146, 155, 161, 231, 234, 120, 216, 155); + RT_INTERFACE!{interface IStorageLibraryContentChangedTrigger(IStorageLibraryContentChangedTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibraryContentChangedTrigger] { + + }} + DEFINE_IID!(IID_IStorageLibraryContentChangedTriggerStatics, 2141133625, 24464, 19986, 145, 78, 167, 216, 224, 187, 251, 24); + RT_INTERFACE!{static interface IStorageLibraryContentChangedTriggerStatics(IStorageLibraryContentChangedTriggerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibraryContentChangedTriggerStatics] { + #[cfg(feature="windows.storage")] fn Create(&mut self, storageLibrary: *mut super::super::storage::StorageLibrary, out: *mut *mut StorageLibraryContentChangedTrigger) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateFromLibraries(&mut self, storageLibraries: *mut super::super::foundation::collections::IIterable, out: *mut *mut StorageLibraryContentChangedTrigger) -> HRESULT + }} + impl IStorageLibraryContentChangedTriggerStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create(&mut self, storageLibrary: &super::super::storage::StorageLibrary) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, storageLibrary as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_libraries(&mut self, storageLibraries: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromLibraries)(self, storageLibraries as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StorageLibraryContentChangedTrigger: IStorageLibraryContentChangedTrigger} + RT_ACTIVATABLE!{IStorageLibraryContentChangedTriggerStatics [CLSID_StorageLibraryContentChangedTrigger]} + DEFINE_CLSID!(CLSID_StorageLibraryContentChangedTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,83,116,111,114,97,103,101,76,105,98,114,97,114,121,67,111,110,116,101,110,116,67,104,97,110,103,101,100,84,114,105,103,103,101,114,0]); + RT_ENUM! { enum SystemTriggerType: i32 { + Invalid (SystemTriggerType_Invalid) = 0, SmsReceived (SystemTriggerType_SmsReceived) = 1, UserPresent (SystemTriggerType_UserPresent) = 2, UserAway (SystemTriggerType_UserAway) = 3, NetworkStateChange (SystemTriggerType_NetworkStateChange) = 4, ControlChannelReset (SystemTriggerType_ControlChannelReset) = 5, InternetAvailable (SystemTriggerType_InternetAvailable) = 6, SessionConnected (SystemTriggerType_SessionConnected) = 7, ServicingComplete (SystemTriggerType_ServicingComplete) = 8, LockScreenApplicationAdded (SystemTriggerType_LockScreenApplicationAdded) = 9, LockScreenApplicationRemoved (SystemTriggerType_LockScreenApplicationRemoved) = 10, TimeZoneChange (SystemTriggerType_TimeZoneChange) = 11, OnlineIdConnectedStateChange (SystemTriggerType_OnlineIdConnectedStateChange) = 12, BackgroundWorkCostChange (SystemTriggerType_BackgroundWorkCostChange) = 13, PowerStateChange (SystemTriggerType_PowerStateChange) = 14, DefaultSignInAccountChange (SystemTriggerType_DefaultSignInAccountChange) = 15, + }} + RT_ENUM! { enum SystemConditionType: i32 { + Invalid (SystemConditionType_Invalid) = 0, UserPresent (SystemConditionType_UserPresent) = 1, UserNotPresent (SystemConditionType_UserNotPresent) = 2, InternetAvailable (SystemConditionType_InternetAvailable) = 3, InternetNotAvailable (SystemConditionType_InternetNotAvailable) = 4, SessionConnected (SystemConditionType_SessionConnected) = 5, SessionDisconnected (SystemConditionType_SessionDisconnected) = 6, FreeNetworkAvailable (SystemConditionType_FreeNetworkAvailable) = 7, BackgroundWorkCostNotHigh (SystemConditionType_BackgroundWorkCostNotHigh) = 8, + }} + DEFINE_IID!(IID_ISystemTrigger, 494978934, 14152, 17507, 141, 126, 39, 109, 193, 57, 172, 28); + RT_INTERFACE!{interface ISystemTrigger(ISystemTriggerVtbl): IInspectable(IInspectableVtbl) [IID_ISystemTrigger] { + fn get_OneShot(&mut self, out: *mut bool) -> HRESULT, + fn get_TriggerType(&mut self, out: *mut SystemTriggerType) -> HRESULT + }} + impl ISystemTrigger { + #[inline] pub unsafe fn get_one_shot(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Category)(self, &mut out); + let hr = ((*self.lpVtbl).get_OneShot)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_sub_category(&mut self) -> Result { + #[inline] pub unsafe fn get_trigger_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SubCategory)(self, &mut out); + let hr = ((*self.lpVtbl).get_TriggerType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IBluetoothLEAppearanceStatics, 2710814919, 17668, 20298, 155, 165, 205, 16, 84, 229, 224, 101); - RT_INTERFACE!{static interface IBluetoothLEAppearanceStatics(IBluetoothLEAppearanceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAppearanceStatics] { - fn FromRawValue(&mut self, rawValue: u16, out: *mut *mut BluetoothLEAppearance) -> HRESULT, - fn FromParts(&mut self, appearanceCategory: u16, appearanceSubCategory: u16, out: *mut *mut BluetoothLEAppearance) -> HRESULT + DEFINE_IID!(IID_ISystemTriggerFactory, 3892585428, 34705, 17785, 129, 38, 135, 236, 138, 170, 64, 122); + RT_INTERFACE!{static interface ISystemTriggerFactory(ISystemTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISystemTriggerFactory] { + fn Create(&mut self, triggerType: SystemTriggerType, oneShot: bool, out: *mut *mut SystemTrigger) -> HRESULT }} - impl IBluetoothLEAppearanceStatics { - #[inline] pub unsafe fn from_raw_value(&mut self, rawValue: u16) -> Result> { + impl ISystemTriggerFactory { + #[inline] pub unsafe fn create(&mut self, triggerType: SystemTriggerType, oneShot: bool) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromRawValue)(self, rawValue, &mut out); + let hr = ((*self.lpVtbl).Create)(self, triggerType, oneShot, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_parts(&mut self, appearanceCategory: u16, appearanceSubCategory: u16) -> Result> { + } + RT_CLASS!{class SystemTrigger: ISystemTrigger [ISystemTriggerFactory] [CLSID_SystemTrigger]} + DEFINE_CLSID!(CLSID_SystemTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,83,121,115,116,101,109,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_ISystemCondition, 3244274806, 35269, 16907, 171, 211, 251, 48, 48, 71, 33, 40); + RT_INTERFACE!{interface ISystemCondition(ISystemConditionVtbl): IInspectable(IInspectableVtbl) [IID_ISystemCondition] { + fn get_ConditionType(&mut self, out: *mut SystemConditionType) -> HRESULT + }} + impl ISystemCondition { + #[inline] pub unsafe fn get_condition_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConditionType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISystemConditionFactory, 3530150385, 1447, 18862, 135, 215, 22, 178, 184, 185, 165, 83); + RT_INTERFACE!{static interface ISystemConditionFactory(ISystemConditionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISystemConditionFactory] { + fn Create(&mut self, conditionType: SystemConditionType, out: *mut *mut SystemCondition) -> HRESULT + }} + impl ISystemConditionFactory { + #[inline] pub unsafe fn create(&mut self, conditionType: SystemConditionType) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromParts)(self, appearanceCategory, appearanceSubCategory, &mut out); + let hr = ((*self.lpVtbl).Create)(self, conditionType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class BluetoothLEAppearance: IBluetoothLEAppearance} - RT_ACTIVATABLE!{IBluetoothLEAppearanceStatics [CLSID_BluetoothLEAppearance]} - DEFINE_CLSID!(CLSID_BluetoothLEAppearance = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,76,69,65,112,112,101,97,114,97,110,99,101,0]); - DEFINE_IID!(IID_IBluetoothLEDevice, 3052285819, 19160, 17986, 172, 72, 128, 160, 181, 0, 232, 135); - RT_INTERFACE!{interface IBluetoothLEDevice(IBluetoothLEDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEDevice] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_GattServices(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ConnectionStatus(&mut self, out: *mut BluetoothConnectionStatus) -> HRESULT, - fn get_BluetoothAddress(&mut self, out: *mut u64) -> HRESULT, - fn GetGattService(&mut self, serviceUuid: Guid, out: *mut *mut genericattributeprofile::GattDeviceService) -> HRESULT, - fn add_NameChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NameChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_GattServicesChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GattServicesChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ConnectionStatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ConnectionStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class SystemCondition: ISystemCondition [ISystemConditionFactory] [CLSID_SystemCondition]} + DEFINE_CLSID!(CLSID_SystemCondition = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,83,121,115,116,101,109,67,111,110,100,105,116,105,111,110,0]); + DEFINE_IID!(IID_INetworkOperatorNotificationTrigger, 2416483526, 25549, 18444, 149, 209, 110, 106, 239, 128, 30, 74); + RT_INTERFACE!{interface INetworkOperatorNotificationTrigger(INetworkOperatorNotificationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorNotificationTrigger] { + fn get_NetworkAccountId(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IBluetoothLEDevice { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl INetworkOperatorNotificationTrigger { + #[inline] pub unsafe fn get_network_account_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_NetworkAccountId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_name(&mut self) -> Result { + } + DEFINE_IID!(IID_INetworkOperatorNotificationTriggerFactory, 170016256, 10199, 17235, 173, 185, 146, 101, 170, 234, 87, 157); + RT_INTERFACE!{static interface INetworkOperatorNotificationTriggerFactory(INetworkOperatorNotificationTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorNotificationTriggerFactory] { + fn Create(&mut self, networkAccountId: HSTRING, out: *mut *mut NetworkOperatorNotificationTrigger) -> HRESULT + }} + impl INetworkOperatorNotificationTriggerFactory { + #[inline] pub unsafe fn create(&mut self, networkAccountId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Name)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).Create)(self, networkAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_gatt_services(&mut self) -> Result>> { + } + RT_CLASS!{class NetworkOperatorNotificationTrigger: INetworkOperatorNotificationTrigger [INetworkOperatorNotificationTriggerFactory] [CLSID_NetworkOperatorNotificationTrigger]} + DEFINE_CLSID!(CLSID_NetworkOperatorNotificationTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,78,111,116,105,102,105,99,97,116,105,111,110,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IDeviceManufacturerNotificationTrigger, 2166852277, 16811, 5850, 134, 194, 127, 123, 240, 145, 47, 91); + RT_INTERFACE!{interface IDeviceManufacturerNotificationTrigger(IDeviceManufacturerNotificationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceManufacturerNotificationTrigger] { + fn get_TriggerQualifier(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_OneShot(&mut self, out: *mut bool) -> HRESULT + }} + impl IDeviceManufacturerNotificationTrigger { + #[inline] pub unsafe fn get_trigger_qualifier(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_GattServices)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_TriggerQualifier)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_connection_status(&mut self) -> Result { + #[inline] pub unsafe fn get_one_shot(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ConnectionStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_OneShot)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_bluetooth_address(&mut self) -> Result { + } + DEFINE_IID!(IID_IDeviceManufacturerNotificationTriggerFactory, 2035670645, 9659, 16723, 161, 162, 48, 41, 252, 171, 182, 82); + RT_INTERFACE!{static interface IDeviceManufacturerNotificationTriggerFactory(IDeviceManufacturerNotificationTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceManufacturerNotificationTriggerFactory] { + fn Create(&mut self, triggerQualifier: HSTRING, oneShot: bool, out: *mut *mut DeviceManufacturerNotificationTrigger) -> HRESULT + }} + impl IDeviceManufacturerNotificationTriggerFactory { + #[inline] pub unsafe fn create(&mut self, triggerQualifier: &HStringArg, oneShot: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, triggerQualifier.get(), oneShot, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DeviceManufacturerNotificationTrigger: IDeviceManufacturerNotificationTrigger [IDeviceManufacturerNotificationTriggerFactory] [CLSID_DeviceManufacturerNotificationTrigger]} + DEFINE_CLSID!(CLSID_DeviceManufacturerNotificationTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,68,101,118,105,99,101,77,97,110,117,102,97,99,116,117,114,101,114,78,111,116,105,102,105,99,97,116,105,111,110,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_ICachedFileUpdaterTriggerDetails, 1904446483, 4884, 18356, 149, 151, 220, 126, 36, 140, 23, 204); + RT_INTERFACE!{interface ICachedFileUpdaterTriggerDetails(ICachedFileUpdaterTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ICachedFileUpdaterTriggerDetails] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_UpdateTarget(&mut self, out: *mut super::super::storage::provider::CachedFileTarget) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_UpdateRequest(&mut self, out: *mut *mut super::super::storage::provider::FileUpdateRequest) -> HRESULT, + fn get_CanRequestUserInput(&mut self, out: *mut bool) -> HRESULT + }} + impl ICachedFileUpdaterTriggerDetails { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_update_target(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BluetoothAddress)(self, &mut out); + let hr = ((*self.lpVtbl).get_UpdateTarget)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_gatt_service(&mut self, serviceUuid: Guid) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_update_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetGattService)(self, serviceUuid, &mut out); + let hr = ((*self.lpVtbl).get_UpdateRequest)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_name_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_request_user_input(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_NameChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanRequestUserInput)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_name_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_NameChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_gatt_services_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + } + RT_CLASS!{class CachedFileUpdaterTriggerDetails: ICachedFileUpdaterTriggerDetails} + DEFINE_IID!(IID_ICachedFileUpdaterTrigger, 3793530603, 13042, 19761, 181, 83, 185, 224, 27, 222, 55, 224); + RT_INTERFACE!{interface ICachedFileUpdaterTrigger(ICachedFileUpdaterTriggerVtbl): IInspectable(IInspectableVtbl) [IID_ICachedFileUpdaterTrigger] { + + }} + RT_CLASS!{class CachedFileUpdaterTrigger: ICachedFileUpdaterTrigger} + DEFINE_IID!(IID_ITimeTrigger, 1701729622, 2858, 17271, 186, 112, 59, 69, 169, 53, 84, 127); + RT_INTERFACE!{interface ITimeTrigger(ITimeTriggerVtbl): IInspectable(IInspectableVtbl) [IID_ITimeTrigger] { + fn get_FreshnessTime(&mut self, out: *mut u32) -> HRESULT, + fn get_OneShot(&mut self, out: *mut bool) -> HRESULT + }} + impl ITimeTrigger { + #[inline] pub unsafe fn get_freshness_time(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_GattServicesChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_FreshnessTime)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_gatt_services_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_GattServicesChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_connection_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_one_shot(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ConnectionStatusChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_OneShot)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_connection_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ConnectionStatusChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } } - RT_CLASS!{class BluetoothLEDevice: IBluetoothLEDevice} - RT_ACTIVATABLE!{IBluetoothLEDeviceStatics2 [CLSID_BluetoothLEDevice]} - RT_ACTIVATABLE!{IBluetoothLEDeviceStatics [CLSID_BluetoothLEDevice]} - DEFINE_CLSID!(CLSID_BluetoothLEDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,76,69,68,101,118,105,99,101,0]); - DEFINE_IID!(IID_IBluetoothLEDevice2, 653288115, 31470, 19761, 186, 186, 177, 185, 119, 95, 89, 22); - RT_INTERFACE!{interface IBluetoothLEDevice2(IBluetoothLEDevice2Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEDevice2] { - fn get_DeviceInformation(&mut self, out: *mut *mut super::enumeration::DeviceInformation) -> HRESULT, - fn get_Appearance(&mut self, out: *mut *mut BluetoothLEAppearance) -> HRESULT, - fn get_BluetoothAddressType(&mut self, out: *mut BluetoothAddressType) -> HRESULT + DEFINE_IID!(IID_ITimeTriggerFactory, 952533758, 39764, 17894, 178, 243, 38, 155, 135, 166, 247, 52); + RT_INTERFACE!{static interface ITimeTriggerFactory(ITimeTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITimeTriggerFactory] { + fn Create(&mut self, freshnessTime: u32, oneShot: bool, out: *mut *mut TimeTrigger) -> HRESULT }} - impl IBluetoothLEDevice2 { - #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + impl ITimeTriggerFactory { + #[inline] pub unsafe fn create(&mut self, freshnessTime: u32, oneShot: bool) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, freshnessTime, oneShot, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_appearance(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Appearance)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + RT_CLASS!{class TimeTrigger: ITimeTrigger [ITimeTriggerFactory] [CLSID_TimeTrigger]} + DEFINE_CLSID!(CLSID_TimeTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,84,105,109,101,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IMaintenanceTrigger, 1746422915, 64546, 19685, 132, 26, 114, 57, 169, 129, 0, 71); + RT_INTERFACE!{interface IMaintenanceTrigger(IMaintenanceTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IMaintenanceTrigger] { + fn get_FreshnessTime(&mut self, out: *mut u32) -> HRESULT, + fn get_OneShot(&mut self, out: *mut bool) -> HRESULT + }} + impl IMaintenanceTrigger { + #[inline] pub unsafe fn get_freshness_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FreshnessTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_bluetooth_address_type(&mut self) -> Result { + #[inline] pub unsafe fn get_one_shot(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BluetoothAddressType)(self, &mut out); + let hr = ((*self.lpVtbl).get_OneShot)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IBluetoothLEDeviceStatics, 3369015833, 61622, 19440, 134, 137, 65, 48, 61, 226, 217, 244); - RT_INTERFACE!{static interface IBluetoothLEDeviceStatics(IBluetoothLEDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEDeviceStatics] { - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromBluetoothAddressAsync(&mut self, bluetoothAddress: u64, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IMaintenanceTriggerFactory, 1262345006, 38877, 17961, 136, 176, 176, 108, 249, 72, 42, 229); + RT_INTERFACE!{static interface IMaintenanceTriggerFactory(IMaintenanceTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMaintenanceTriggerFactory] { + fn Create(&mut self, freshnessTime: u32, oneShot: bool, out: *mut *mut MaintenanceTrigger) -> HRESULT }} - impl IBluetoothLEDeviceStatics { - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + impl IMaintenanceTriggerFactory { + #[inline] pub unsafe fn create(&mut self, freshnessTime: u32, oneShot: bool) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).Create)(self, freshnessTime, oneShot, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_bluetooth_address_async(&mut self, bluetoothAddress: u64) -> Result>> { + } + RT_CLASS!{class MaintenanceTrigger: IMaintenanceTrigger [IMaintenanceTriggerFactory] [CLSID_MaintenanceTrigger]} + DEFINE_CLSID!(CLSID_MaintenanceTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,77,97,105,110,116,101,110,97,110,99,101,84,114,105,103,103,101,114,0]); + RT_ENUM! { enum DeviceTriggerResult: i32 { + Allowed (DeviceTriggerResult_Allowed) = 0, DeniedByUser (DeviceTriggerResult_DeniedByUser) = 1, DeniedBySystem (DeviceTriggerResult_DeniedBySystem) = 2, LowBattery (DeviceTriggerResult_LowBattery) = 3, + }} + DEFINE_IID!(IID_IDeviceUseTrigger, 229015569, 13135, 19799, 182, 236, 109, 202, 100, 180, 18, 228); + RT_INTERFACE!{interface IDeviceUseTrigger(IDeviceUseTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceUseTrigger] { + fn RequestAsyncSimple(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAsyncWithArguments(&mut self, deviceId: HSTRING, arguments: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IDeviceUseTrigger { + #[inline] pub unsafe fn request_async_simple(&mut self, deviceId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromBluetoothAddressAsync)(self, bluetoothAddress, &mut out); + let hr = ((*self.lpVtbl).RequestAsyncSimple)(self, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + #[inline] pub unsafe fn request_async_with_arguments(&mut self, deviceId: &HStringArg, arguments: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).RequestAsyncWithArguments)(self, deviceId.get(), arguments.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IBluetoothLEDeviceStatics2, 1595064427, 15276, 17384, 173, 22, 86, 50, 113, 189, 65, 194); - RT_INTERFACE!{static interface IBluetoothLEDeviceStatics2(IBluetoothLEDeviceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEDeviceStatics2] { - fn GetDeviceSelectorFromPairingState(&mut self, pairingState: bool, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromConnectionStatus(&mut self, connectionStatus: BluetoothConnectionStatus, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromDeviceName(&mut self, deviceName: HSTRING, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromBluetoothAddress(&mut self, bluetoothAddress: u64, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromBluetoothAddressWithBluetoothAddressType(&mut self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromAppearance(&mut self, appearance: *mut BluetoothLEAppearance, out: *mut HSTRING) -> HRESULT, - fn FromBluetoothAddressWithBluetoothAddressTypeAsync(&mut self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + DEFINE_IID!(IID_IDeviceServicingTrigger, 447879085, 28212, 18899, 158, 111, 23, 241, 182, 223, 168, 129); + RT_INTERFACE!{interface IDeviceServicingTrigger(IDeviceServicingTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceServicingTrigger] { + fn RequestAsyncSimple(&mut self, deviceId: HSTRING, expectedDuration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAsyncWithArguments(&mut self, deviceId: HSTRING, expectedDuration: super::super::foundation::TimeSpan, arguments: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IBluetoothLEDeviceStatics2 { - #[inline] pub unsafe fn get_device_selector_from_pairing_state(&mut self, pairingState: bool) -> Result { + impl IDeviceServicingTrigger { + #[inline] pub unsafe fn request_async_simple(&mut self, deviceId: &HStringArg, expectedDuration: super::super::foundation::TimeSpan) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromPairingState)(self, pairingState, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).RequestAsyncSimple)(self, deviceId.get(), expectedDuration, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_connection_status(&mut self, connectionStatus: BluetoothConnectionStatus) -> Result { + #[inline] pub unsafe fn request_async_with_arguments(&mut self, deviceId: &HStringArg, expectedDuration: super::super::foundation::TimeSpan, arguments: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromConnectionStatus)(self, connectionStatus, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).RequestAsyncWithArguments)(self, deviceId.get(), expectedDuration, arguments.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_device_name(&mut self, deviceName: &HStringArg) -> Result { + } + RT_CLASS!{class DeviceUseTrigger: IDeviceUseTrigger} + RT_CLASS!{class DeviceServicingTrigger: IDeviceServicingTrigger} + DEFINE_IID!(IID_IRfcommConnectionTrigger, 3905211106, 2899, 17508, 147, 148, 253, 135, 86, 84, 222, 100); + RT_INTERFACE!{interface IRfcommConnectionTrigger(IRfcommConnectionTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommConnectionTrigger] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_InboundConnection(&mut self, out: *mut *mut super::super::devices::bluetooth::background::RfcommInboundConnectionInformation) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_OutboundConnection(&mut self, out: *mut *mut super::super::devices::bluetooth::background::RfcommOutboundConnectionInformation) -> HRESULT, + fn get_AllowMultipleConnections(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowMultipleConnections(&mut self, value: bool) -> HRESULT, + #[cfg(feature="windows.networking")] fn get_ProtectionLevel(&mut self, out: *mut super::super::networking::sockets::SocketProtectionLevel) -> HRESULT, + #[cfg(feature="windows.networking")] fn put_ProtectionLevel(&mut self, value: super::super::networking::sockets::SocketProtectionLevel) -> HRESULT, + #[cfg(feature="windows.networking")] fn get_RemoteHostName(&mut self, out: *mut *mut super::super::networking::HostName) -> HRESULT, + #[cfg(feature="windows.networking")] fn put_RemoteHostName(&mut self, value: *mut super::super::networking::HostName) -> HRESULT + }} + impl IRfcommConnectionTrigger { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_inbound_connection(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromDeviceName)(self, deviceName.get(), &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_InboundConnection)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_bluetooth_address(&mut self, bluetoothAddress: u64) -> Result { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_outbound_connection(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromBluetoothAddress)(self, bluetoothAddress, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_OutboundConnection)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_bluetooth_address_with_bluetooth_address_type(&mut self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromBluetoothAddressWithBluetoothAddressType)(self, bluetoothAddress, bluetoothAddressType, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_allow_multiple_connections(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowMultipleConnections)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_appearance(&mut self, appearance: &BluetoothLEAppearance) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromAppearance)(self, appearance as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_allow_multiple_connections(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowMultipleConnections)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn from_bluetooth_address_with_bluetooth_address_type_async(&mut self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result>> { + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_protection_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtectionLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn set_protection_level(&mut self, value: super::super::networking::sockets::SocketProtectionLevel) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProtectionLevel)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_remote_host_name(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromBluetoothAddressWithBluetoothAddressTypeAsync)(self, bluetoothAddress, bluetoothAddressType, &mut out); + let hr = ((*self.lpVtbl).get_RemoteHostName)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn set_remote_host_name(&mut self, value: &super::super::networking::HostName) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteHostName)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - DEFINE_IID!(IID_IBluetoothClassOfDevice, 3594527358, 55255, 18017, 148, 84, 101, 3, 156, 161, 122, 43); - RT_INTERFACE!{interface IBluetoothClassOfDevice(IBluetoothClassOfDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothClassOfDevice] { - fn get_RawValue(&mut self, out: *mut u32) -> HRESULT, - fn get_MajorClass(&mut self, out: *mut BluetoothMajorClass) -> HRESULT, - fn get_MinorClass(&mut self, out: *mut BluetoothMinorClass) -> HRESULT, - fn get_ServiceCapabilities(&mut self, out: *mut BluetoothServiceCapabilities) -> HRESULT + RT_CLASS!{class RfcommConnectionTrigger: IRfcommConnectionTrigger} + DEFINE_IID!(IID_IDeviceConnectionChangeTrigger, 2424790628, 15581, 20219, 171, 28, 91, 59, 106, 96, 206, 52); + RT_INTERFACE!{interface IDeviceConnectionChangeTrigger(IDeviceConnectionChangeTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceConnectionChangeTrigger] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CanMaintainConnection(&mut self, out: *mut bool) -> HRESULT, + fn get_MaintainConnection(&mut self, out: *mut bool) -> HRESULT, + fn put_MaintainConnection(&mut self, value: bool) -> HRESULT }} - impl IBluetoothClassOfDevice { - #[inline] pub unsafe fn get_raw_value(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RawValue)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IDeviceConnectionChangeTrigger { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_major_class(&mut self) -> Result { + #[inline] pub unsafe fn get_can_maintain_connection(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MajorClass)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanMaintainConnection)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_minor_class(&mut self) -> Result { + #[inline] pub unsafe fn get_maintain_connection(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinorClass)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaintainConnection)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_service_capabilities(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceCapabilities)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_maintain_connection(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaintainConnection)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IBluetoothClassOfDeviceStatics, 3831575997, 4002, 16748, 145, 180, 193, 228, 140, 160, 97, 193); - RT_INTERFACE!{static interface IBluetoothClassOfDeviceStatics(IBluetoothClassOfDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothClassOfDeviceStatics] { - fn FromRawValue(&mut self, rawValue: u32, out: *mut *mut BluetoothClassOfDevice) -> HRESULT, - fn FromParts(&mut self, majorClass: BluetoothMajorClass, minorClass: BluetoothMinorClass, serviceCapabilities: BluetoothServiceCapabilities, out: *mut *mut BluetoothClassOfDevice) -> HRESULT + DEFINE_IID!(IID_IDeviceConnectionChangeTriggerStatics, 3286901866, 20221, 17560, 170, 96, 164, 228, 227, 177, 122, 185); + RT_INTERFACE!{static interface IDeviceConnectionChangeTriggerStatics(IDeviceConnectionChangeTriggerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceConnectionChangeTriggerStatics] { + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IBluetoothClassOfDeviceStatics { - #[inline] pub unsafe fn from_raw_value(&mut self, rawValue: u32) -> Result> { + impl IDeviceConnectionChangeTriggerStatics { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromRawValue)(self, rawValue, &mut out); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_parts(&mut self, majorClass: BluetoothMajorClass, minorClass: BluetoothMinorClass, serviceCapabilities: BluetoothServiceCapabilities) -> Result> { + } + RT_CLASS!{class DeviceConnectionChangeTrigger: IDeviceConnectionChangeTrigger} + RT_ACTIVATABLE!{IDeviceConnectionChangeTriggerStatics [CLSID_DeviceConnectionChangeTrigger]} + DEFINE_CLSID!(CLSID_DeviceConnectionChangeTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,68,101,118,105,99,101,67,111,110,110,101,99,116,105,111,110,67,104,97,110,103,101,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IGattCharacteristicNotificationTrigger, 3797913544, 1686, 18255, 167, 50, 242, 146, 176, 206, 188, 93); + RT_INTERFACE!{interface IGattCharacteristicNotificationTrigger(IGattCharacteristicNotificationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicNotificationTrigger] { + #[cfg(feature="windows.devices")] fn get_Characteristic(&mut self, out: *mut *mut super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic) -> HRESULT + }} + impl IGattCharacteristicNotificationTrigger { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_characteristic(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromParts)(self, majorClass, minorClass, serviceCapabilities, &mut out); + let hr = ((*self.lpVtbl).get_Characteristic)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IBluetoothSignalStrengthFilter, 3749409681, 27573, 19710, 144, 177, 93, 115, 36, 237, 207, 127); - RT_INTERFACE!{interface IBluetoothSignalStrengthFilter(IBluetoothSignalStrengthFilterVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothSignalStrengthFilter] { - fn get_InRangeThresholdInDBm(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_InRangeThresholdInDBm(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_OutOfRangeThresholdInDBm(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_OutOfRangeThresholdInDBm(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_OutOfRangeTimeout(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_OutOfRangeTimeout(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_SamplingInterval(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_SamplingInterval(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT + DEFINE_IID!(IID_IGattCharacteristicNotificationTriggerFactory, 1471814037, 45379, 17781, 159, 107, 253, 89, 217, 58, 206, 26); + RT_INTERFACE!{static interface IGattCharacteristicNotificationTriggerFactory(IGattCharacteristicNotificationTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicNotificationTriggerFactory] { + #[cfg(feature="windows.devices")] fn Create(&mut self, characteristic: *mut super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic, out: *mut *mut GattCharacteristicNotificationTrigger) -> HRESULT }} - impl IBluetoothSignalStrengthFilter { - #[inline] pub unsafe fn get_in_range_threshold_in_dbm(&mut self) -> Result>> { + impl IGattCharacteristicNotificationTriggerFactory { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn create(&mut self, characteristic: &super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InRangeThresholdInDBm)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, characteristic as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_in_range_threshold_in_dbm(&mut self, value: &super::super::foundation::IReference) -> Result<()> { - let hr = ((*self.lpVtbl).put_InRangeThresholdInDBm)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + } + RT_CLASS!{class GattCharacteristicNotificationTrigger: IGattCharacteristicNotificationTrigger [IGattCharacteristicNotificationTriggerFactory] [CLSID_GattCharacteristicNotificationTrigger]} + DEFINE_CLSID!(CLSID_GattCharacteristicNotificationTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,71,97,116,116,67,104,97,114,97,99,116,101,114,105,115,116,105,99,78,111,116,105,102,105,99,97,116,105,111,110,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IBluetoothLEAdvertisementWatcherTrigger, 447420441, 48353, 18667, 168, 39, 89, 251, 124, 238, 82, 166); + RT_INTERFACE!{interface IBluetoothLEAdvertisementWatcherTrigger(IBluetoothLEAdvertisementWatcherTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementWatcherTrigger] { + fn get_MinSamplingInterval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_MaxSamplingInterval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_MinOutOfRangeTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_MaxOutOfRangeTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + #[cfg(feature="windows.devices")] fn get_SignalStrengthFilter(&mut self, out: *mut *mut super::super::devices::bluetooth::BluetoothSignalStrengthFilter) -> HRESULT, + #[cfg(feature="windows.devices")] fn put_SignalStrengthFilter(&mut self, value: *mut super::super::devices::bluetooth::BluetoothSignalStrengthFilter) -> HRESULT, + #[cfg(feature="windows.devices")] fn get_AdvertisementFilter(&mut self, out: *mut *mut super::super::devices::bluetooth::advertisement::BluetoothLEAdvertisementFilter) -> HRESULT, + #[cfg(feature="windows.devices")] fn put_AdvertisementFilter(&mut self, value: *mut super::super::devices::bluetooth::advertisement::BluetoothLEAdvertisementFilter) -> HRESULT + }} + impl IBluetoothLEAdvertisementWatcherTrigger { + #[inline] pub unsafe fn get_min_sampling_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinSamplingInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_out_of_range_threshold_in_dbm(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_OutOfRangeThresholdInDBm)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_max_sampling_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxSamplingInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_out_of_range_threshold_in_dbm(&mut self, value: &super::super::foundation::IReference) -> Result<()> { - let hr = ((*self.lpVtbl).put_OutOfRangeThresholdInDBm)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_min_out_of_range_timeout(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinOutOfRangeTimeout)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_out_of_range_timeout(&mut self) -> Result>> { + #[inline] pub unsafe fn get_max_out_of_range_timeout(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxOutOfRangeTimeout)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_signal_strength_filter(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_OutOfRangeTimeout)(self, &mut out); + let hr = ((*self.lpVtbl).get_SignalStrengthFilter)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_out_of_range_timeout(&mut self, value: &super::super::foundation::IReference) -> Result<()> { - let hr = ((*self.lpVtbl).put_OutOfRangeTimeout)(self, value as *const _ as *mut _); + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn set_signal_strength_filter(&mut self, value: &super::super::devices::bluetooth::BluetoothSignalStrengthFilter) -> Result<()> { + let hr = ((*self.lpVtbl).put_SignalStrengthFilter)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_sampling_interval(&mut self) -> Result>> { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_advertisement_filter(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SamplingInterval)(self, &mut out); + let hr = ((*self.lpVtbl).get_AdvertisementFilter)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_sampling_interval(&mut self, value: &super::super::foundation::IReference) -> Result<()> { - let hr = ((*self.lpVtbl).put_SamplingInterval)(self, value as *const _ as *mut _); + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn set_advertisement_filter(&mut self, value: &super::super::devices::bluetooth::advertisement::BluetoothLEAdvertisementFilter) -> Result<()> { + let hr = ((*self.lpVtbl).put_AdvertisementFilter)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class BluetoothSignalStrengthFilter: IBluetoothSignalStrengthFilter} -pub mod rfcomm { // Windows.Devices.Bluetooth.Rfcomm -use ::prelude::*; - RT_CLASS!{class RfcommDeviceService: IRfcommDeviceService} - RT_ACTIVATABLE!{IRfcommDeviceServiceStatics [CLSID_RfcommDeviceService]} - RT_ACTIVATABLE!{IRfcommDeviceServiceStatics2 [CLSID_RfcommDeviceService]} - DEFINE_CLSID!(CLSID_RfcommDeviceService = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,82,102,99,111,109,109,46,82,102,99,111,109,109,68,101,118,105,99,101,83,101,114,118,105,99,101,0]); - RT_CLASS!{class RfcommDeviceServicesResult: IRfcommDeviceServicesResult} - RT_CLASS!{class RfcommServiceId: IRfcommServiceId} - RT_ACTIVATABLE!{IRfcommServiceIdStatics [CLSID_RfcommServiceId]} - DEFINE_CLSID!(CLSID_RfcommServiceId = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,82,102,99,111,109,109,46,82,102,99,111,109,109,83,101,114,118,105,99,101,73,100,0]); - DEFINE_IID!(IID_IRfcommServiceIdStatics, 706191034, 43381, 18147, 181, 107, 8, 255, 215, 131, 165, 254); - RT_INTERFACE!{static interface IRfcommServiceIdStatics(IRfcommServiceIdStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommServiceIdStatics] { - fn FromUuid(&mut self, uuid: Guid, out: *mut *mut RfcommServiceId) -> HRESULT, - fn FromShortId(&mut self, shortId: u32, out: *mut *mut RfcommServiceId) -> HRESULT, - fn get_SerialPort(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, - fn get_ObexObjectPush(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, - fn get_ObexFileTransfer(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, - fn get_PhoneBookAccessPce(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, - fn get_PhoneBookAccessPse(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, - fn get_GenericFileTransfer(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT + RT_CLASS!{class BluetoothLEAdvertisementWatcherTrigger: IBluetoothLEAdvertisementWatcherTrigger} + DEFINE_IID!(IID_IBluetoothLEAdvertisementPublisherTrigger, 2872976914, 9683, 18606, 135, 36, 216, 24, 119, 174, 97, 41); + RT_INTERFACE!{interface IBluetoothLEAdvertisementPublisherTrigger(IBluetoothLEAdvertisementPublisherTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementPublisherTrigger] { + #[cfg(feature="windows.devices")] fn get_Advertisement(&mut self, out: *mut *mut super::super::devices::bluetooth::advertisement::BluetoothLEAdvertisement) -> HRESULT }} - impl IRfcommServiceIdStatics { - #[inline] pub unsafe fn from_uuid(&mut self, uuid: Guid) -> Result> { + impl IBluetoothLEAdvertisementPublisherTrigger { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_advertisement(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromUuid)(self, uuid, &mut out); + let hr = ((*self.lpVtbl).get_Advertisement)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_short_id(&mut self, shortId: u32) -> Result> { + } + RT_CLASS!{class BluetoothLEAdvertisementPublisherTrigger: IBluetoothLEAdvertisementPublisherTrigger} + DEFINE_IID!(IID_IDeviceWatcherTrigger, 2757853149, 34163, 16992, 190, 252, 91, 236, 137, 203, 105, 61); + RT_INTERFACE!{interface IDeviceWatcherTrigger(IDeviceWatcherTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceWatcherTrigger] { + + }} + RT_CLASS!{class DeviceWatcherTrigger: IDeviceWatcherTrigger} + RT_ENUM! { enum LocationTriggerType: i32 { + Geofence (LocationTriggerType_Geofence) = 0, + }} + DEFINE_IID!(IID_ILocationTrigger, 1197894172, 26743, 18462, 128, 38, 255, 126, 20, 168, 17, 160); + RT_INTERFACE!{interface ILocationTrigger(ILocationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_ILocationTrigger] { + fn get_TriggerType(&mut self, out: *mut LocationTriggerType) -> HRESULT + }} + impl ILocationTrigger { + #[inline] pub unsafe fn get_trigger_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TriggerType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILocationTriggerFactory, 285653767, 65385, 19977, 170, 139, 19, 132, 234, 71, 94, 152); + RT_INTERFACE!{static interface ILocationTriggerFactory(ILocationTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ILocationTriggerFactory] { + fn Create(&mut self, triggerType: LocationTriggerType, out: *mut *mut LocationTrigger) -> HRESULT + }} + impl ILocationTriggerFactory { + #[inline] pub unsafe fn create(&mut self, triggerType: LocationTriggerType) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromShortId)(self, shortId, &mut out); + let hr = ((*self.lpVtbl).Create)(self, triggerType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_serial_port(&mut self) -> Result> { + } + RT_CLASS!{class LocationTrigger: ILocationTrigger [ILocationTriggerFactory] [CLSID_LocationTrigger]} + DEFINE_CLSID!(CLSID_LocationTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,76,111,99,97,116,105,111,110,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IActivitySensorTrigger, 3504161602, 58235, 18467, 165, 254, 107, 49, 223, 239, 222, 176); + RT_INTERFACE!{interface IActivitySensorTrigger(IActivitySensorTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorTrigger] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_SubscribedActivities(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_SupportedActivities(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT + }} + impl IActivitySensorTrigger { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_subscribed_activities(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SerialPort)(self, &mut out); + let hr = ((*self.lpVtbl).get_SubscribedActivities)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_obex_object_push(&mut self) -> Result> { + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_supported_activities(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ObexObjectPush)(self, &mut out); + let hr = ((*self.lpVtbl).get_SupportedActivities)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_obex_file_transfer(&mut self) -> Result> { + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IActivitySensorTriggerFactory, 2804322755, 14391, 17655, 131, 27, 1, 50, 204, 135, 43, 195); + RT_INTERFACE!{static interface IActivitySensorTriggerFactory(IActivitySensorTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorTriggerFactory] { + fn Create(&mut self, reportIntervalInMilliseconds: u32, out: *mut *mut ActivitySensorTrigger) -> HRESULT + }} + impl IActivitySensorTriggerFactory { + #[inline] pub unsafe fn create(&mut self, reportIntervalInMilliseconds: u32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ObexFileTransfer)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, reportIntervalInMilliseconds, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_phone_book_access_pce(&mut self) -> Result> { + } + RT_CLASS!{class ActivitySensorTrigger: IActivitySensorTrigger [IActivitySensorTriggerFactory] [CLSID_ActivitySensorTrigger]} + DEFINE_CLSID!(CLSID_ActivitySensorTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,65,99,116,105,118,105,116,121,83,101,110,115,111,114,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_ISensorDataThresholdTrigger, 1539371890, 54411, 19327, 171, 236, 21, 249, 186, 204, 18, 226); + RT_INTERFACE!{interface ISensorDataThresholdTrigger(ISensorDataThresholdTriggerVtbl): IInspectable(IInspectableVtbl) [IID_ISensorDataThresholdTrigger] { + + }} + DEFINE_IID!(IID_ISensorDataThresholdTriggerFactory, 2451564149, 32240, 19875, 151, 179, 229, 68, 238, 133, 127, 230); + RT_INTERFACE!{static interface ISensorDataThresholdTriggerFactory(ISensorDataThresholdTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISensorDataThresholdTriggerFactory] { + #[cfg(feature="windows.devices")] fn Create(&mut self, threshold: *mut super::super::devices::sensors::ISensorDataThreshold, out: *mut *mut SensorDataThresholdTrigger) -> HRESULT + }} + impl ISensorDataThresholdTriggerFactory { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn create(&mut self, threshold: &super::super::devices::sensors::ISensorDataThreshold) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PhoneBookAccessPce)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, threshold as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_phone_book_access_pse(&mut self) -> Result> { + } + RT_CLASS!{class SensorDataThresholdTrigger: ISensorDataThresholdTrigger [ISensorDataThresholdTriggerFactory] [CLSID_SensorDataThresholdTrigger]} + DEFINE_CLSID!(CLSID_SensorDataThresholdTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,83,101,110,115,111,114,68,97,116,97,84,104,114,101,115,104,111,108,100,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_INetworkOperatorHotspotAuthenticationTrigger, 3881224081, 12289, 19941, 131, 199, 222, 97, 216, 136, 49, 208); + RT_INTERFACE!{interface INetworkOperatorHotspotAuthenticationTrigger(INetworkOperatorHotspotAuthenticationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorHotspotAuthenticationTrigger] { + + }} + RT_CLASS!{class NetworkOperatorHotspotAuthenticationTrigger: INetworkOperatorHotspotAuthenticationTrigger} + DEFINE_IID!(IID_ISocketActivityTrigger, 2847668240, 40414, 20362, 131, 227, 176, 224, 231, 165, 13, 112); + RT_INTERFACE!{interface ISocketActivityTrigger(ISocketActivityTriggerVtbl): IInspectable(IInspectableVtbl) [IID_ISocketActivityTrigger] { + fn get_IsWakeFromLowPowerSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl ISocketActivityTrigger { + #[inline] pub unsafe fn get_is_wake_from_low_power_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsWakeFromLowPowerSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SocketActivityTrigger: IBackgroundTrigger} + DEFINE_IID!(IID_IPushNotificationTriggerFactory, 1842933019, 17806, 20418, 188, 46, 213, 102, 79, 119, 237, 25); + RT_INTERFACE!{static interface IPushNotificationTriggerFactory(IPushNotificationTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPushNotificationTriggerFactory] { + fn Create(&mut self, applicationId: HSTRING, out: *mut *mut PushNotificationTrigger) -> HRESULT + }} + impl IPushNotificationTriggerFactory { + #[inline] pub unsafe fn create(&mut self, applicationId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PhoneBookAccessPse)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, applicationId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_generic_file_transfer(&mut self) -> Result> { + } + RT_CLASS!{class PushNotificationTrigger: IBackgroundTrigger [IPushNotificationTriggerFactory] [CLSID_PushNotificationTrigger]} + DEFINE_CLSID!(CLSID_PushNotificationTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,80,117,115,104,78,111,116,105,102,105,99,97,116,105,111,110,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IToastNotificationHistoryChangedTriggerFactory, 2177301165, 34711, 18309, 129, 180, 176, 204, 203, 115, 209, 217); + RT_INTERFACE!{static interface IToastNotificationHistoryChangedTriggerFactory(IToastNotificationHistoryChangedTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationHistoryChangedTriggerFactory] { + fn Create(&mut self, applicationId: HSTRING, out: *mut *mut ToastNotificationHistoryChangedTrigger) -> HRESULT + }} + impl IToastNotificationHistoryChangedTriggerFactory { + #[inline] pub unsafe fn create(&mut self, applicationId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_GenericFileTransfer)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, applicationId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IRfcommServiceId, 576885252, 32258, 16407, 129, 54, 218, 27, 106, 27, 155, 191); - RT_INTERFACE!{interface IRfcommServiceId(IRfcommServiceIdVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommServiceId] { - fn get_Uuid(&mut self, out: *mut Guid) -> HRESULT, - fn AsShortId(&mut self, out: *mut u32) -> HRESULT, - fn AsString(&mut self, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class ToastNotificationHistoryChangedTrigger: IBackgroundTrigger [IToastNotificationHistoryChangedTriggerFactory] [CLSID_ToastNotificationHistoryChangedTrigger]} + DEFINE_CLSID!(CLSID_ToastNotificationHistoryChangedTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,84,111,97,115,116,78,111,116,105,102,105,99,97,116,105,111,110,72,105,115,116,111,114,121,67,104,97,110,103,101,100,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IToastNotificationActionTriggerFactory, 2963143719, 25728, 17225, 129, 37, 151, 179, 239, 170, 10, 58); + RT_INTERFACE!{static interface IToastNotificationActionTriggerFactory(IToastNotificationActionTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationActionTriggerFactory] { + fn Create(&mut self, applicationId: HSTRING, out: *mut *mut ToastNotificationActionTrigger) -> HRESULT }} - impl IRfcommServiceId { - #[inline] pub unsafe fn get_uuid(&mut self) -> Result { + impl IToastNotificationActionTriggerFactory { + #[inline] pub unsafe fn create(&mut self, applicationId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ToastNotificationActionTrigger: IBackgroundTrigger [IToastNotificationActionTriggerFactory] [CLSID_ToastNotificationActionTrigger]} + DEFINE_CLSID!(CLSID_ToastNotificationActionTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,84,111,97,115,116,78,111,116,105,102,105,99,97,116,105,111,110,65,99,116,105,111,110,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IUserNotificationChangedTriggerFactory, 3402908524, 27051, 19992, 164, 138, 94, 210, 172, 67, 89, 87); + RT_INTERFACE!{static interface IUserNotificationChangedTriggerFactory(IUserNotificationChangedTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IUserNotificationChangedTriggerFactory] { + #[cfg(feature="windows.ui")] fn Create(&mut self, notificationKinds: super::super::ui::notifications::NotificationKinds, out: *mut *mut UserNotificationChangedTrigger) -> HRESULT + }} + impl IUserNotificationChangedTriggerFactory { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn create(&mut self, notificationKinds: super::super::ui::notifications::NotificationKinds) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, notificationKinds, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UserNotificationChangedTrigger: IBackgroundTrigger [IUserNotificationChangedTriggerFactory] [CLSID_UserNotificationChangedTrigger]} + DEFINE_CLSID!(CLSID_UserNotificationChangedTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,85,115,101,114,78,111,116,105,102,105,99,97,116,105,111,110,67,104,97,110,103,101,100,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IPhoneTrigger, 2379213211, 54469, 18929, 183, 211, 130, 232, 122, 14, 157, 222); + RT_INTERFACE!{interface IPhoneTrigger(IPhoneTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneTrigger] { + fn get_OneShot(&mut self, out: *mut bool) -> HRESULT, + fn get_TriggerType(&mut self, out: *mut super::calls::background::PhoneTriggerType) -> HRESULT + }} + impl IPhoneTrigger { + #[inline] pub unsafe fn get_one_shot(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Uuid)(self, &mut out); + let hr = ((*self.lpVtbl).get_OneShot)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn as_short_id(&mut self) -> Result { + #[inline] pub unsafe fn get_trigger_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).AsShortId)(self, &mut out); + let hr = ((*self.lpVtbl).get_TriggerType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn as_string(&mut self) -> Result { + } + DEFINE_IID!(IID_IPhoneTriggerFactory, 2698591450, 24513, 18683, 165, 70, 50, 38, 32, 64, 21, 123); + RT_INTERFACE!{static interface IPhoneTriggerFactory(IPhoneTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneTriggerFactory] { + fn Create(&mut self, type_: super::calls::background::PhoneTriggerType, oneShot: bool, out: *mut *mut PhoneTrigger) -> HRESULT + }} + impl IPhoneTriggerFactory { + #[inline] pub unsafe fn create(&mut self, type_: super::calls::background::PhoneTriggerType, oneShot: bool) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).AsString)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).Create)(self, type_, oneShot, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IRfcommDeviceServicesResult, 994588812, 31951, 18574, 150, 37, 210, 89, 165, 115, 45, 85); - RT_INTERFACE!{interface IRfcommDeviceServicesResult(IRfcommDeviceServicesResultVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceServicesResult] { - fn get_Error(&mut self, out: *mut super::BluetoothError) -> HRESULT, - fn get_Services(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + RT_CLASS!{class PhoneTrigger: IPhoneTrigger [IPhoneTriggerFactory] [CLSID_PhoneTrigger]} + DEFINE_CLSID!(CLSID_PhoneTrigger = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,80,104,111,110,101,84,114,105,103,103,101,114,0]); + RT_STRUCT! { struct BackgroundAlarmApplicationContract { + }} - impl IRfcommDeviceServicesResult { - #[inline] pub unsafe fn get_error(&mut self) -> Result { + RT_ENUM! { enum AlarmAccessStatus: i32 { + Unspecified (AlarmAccessStatus_Unspecified) = 0, AllowedWithWakeupCapability (AlarmAccessStatus_AllowedWithWakeupCapability) = 1, AllowedWithoutWakeupCapability (AlarmAccessStatus_AllowedWithoutWakeupCapability) = 2, Denied (AlarmAccessStatus_Denied) = 3, + }} + DEFINE_IID!(IID_IAlarmApplicationManagerStatics, 3389258299, 52454, 19938, 176, 155, 150, 40, 189, 51, 187, 190); + RT_INTERFACE!{static interface IAlarmApplicationManagerStatics(IAlarmApplicationManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAlarmApplicationManagerStatics] { + fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAccessStatus(&mut self, out: *mut AlarmAccessStatus) -> HRESULT + }} + impl IAlarmApplicationManagerStatics { + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_access_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + let hr = ((*self.lpVtbl).GetAccessStatus)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_services(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Services)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + RT_ACTIVATABLE!{IAlarmApplicationManagerStatics [CLSID_AlarmApplicationManager]} + DEFINE_CLSID!(CLSID_AlarmApplicationManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,66,97,99,107,103,114,111,117,110,100,46,65,108,97,114,109,65,112,112,108,105,99,97,116,105,111,110,77,97,110,97,103,101,114,0]); +} // Windows.ApplicationModel.Background +pub mod activation { // Windows.ApplicationModel.Activation +use ::prelude::*; + RT_CLASS!{class AppointmentsProviderAddAppointmentActivatedEventArgs: IAppointmentsProviderAddAppointmentActivatedEventArgs} + RT_CLASS!{class AppointmentsProviderReplaceAppointmentActivatedEventArgs: IAppointmentsProviderReplaceAppointmentActivatedEventArgs} + RT_CLASS!{class AppointmentsProviderRemoveAppointmentActivatedEventArgs: IAppointmentsProviderRemoveAppointmentActivatedEventArgs} + RT_CLASS!{class AppointmentsProviderShowAppointmentDetailsActivatedEventArgs: IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs} + RT_CLASS!{class AppointmentsProviderShowTimeFrameActivatedEventArgs: IAppointmentsProviderShowTimeFrameActivatedEventArgs} + RT_CLASS!{class UserDataAccountProviderActivatedEventArgs: IUserDataAccountProviderActivatedEventArgs} + DEFINE_IID!(IID_ISplashScreen, 3394082652, 54486, 17392, 151, 192, 8, 51, 198, 57, 28, 36); + RT_INTERFACE!{interface ISplashScreen(ISplashScreenVtbl): IInspectable(IInspectableVtbl) [IID_ISplashScreen] { + fn get_ImageLocation(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn add_Dismissed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Dismissed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISplashScreen { + #[inline] pub unsafe fn get_image_location(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ImageLocation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_dismissed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Dismissed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_dismissed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Dismissed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IRfcommDeviceServiceStatics, 2762033647, 25197, 16812, 178, 83, 135, 172, 92, 39, 226, 138); - RT_INTERFACE!{static interface IRfcommDeviceServiceStatics(IRfcommDeviceServiceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceServiceStatics] { - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, serviceId: *mut RfcommServiceId, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class SplashScreen: ISplashScreen} + RT_ENUM! { enum ApplicationExecutionState: i32 { + NotRunning (ApplicationExecutionState_NotRunning) = 0, Running (ApplicationExecutionState_Running) = 1, Suspended (ApplicationExecutionState_Suspended) = 2, Terminated (ApplicationExecutionState_Terminated) = 3, ClosedByUser (ApplicationExecutionState_ClosedByUser) = 4, }} - impl IRfcommDeviceServiceStatics { - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + RT_ENUM! { enum ActivationKind: i32 { + Launch (ActivationKind_Launch) = 0, Search (ActivationKind_Search) = 1, ShareTarget (ActivationKind_ShareTarget) = 2, File (ActivationKind_File) = 3, Protocol (ActivationKind_Protocol) = 4, FileOpenPicker (ActivationKind_FileOpenPicker) = 5, FileSavePicker (ActivationKind_FileSavePicker) = 6, CachedFileUpdater (ActivationKind_CachedFileUpdater) = 7, ContactPicker (ActivationKind_ContactPicker) = 8, Device (ActivationKind_Device) = 9, PrintTaskSettings (ActivationKind_PrintTaskSettings) = 10, CameraSettings (ActivationKind_CameraSettings) = 11, RestrictedLaunch (ActivationKind_RestrictedLaunch) = 12, AppointmentsProvider (ActivationKind_AppointmentsProvider) = 13, Contact (ActivationKind_Contact) = 14, LockScreenCall (ActivationKind_LockScreenCall) = 15, VoiceCommand (ActivationKind_VoiceCommand) = 16, LockScreen (ActivationKind_LockScreen) = 17, PickerReturned (ActivationKind_PickerReturned) = 1000, WalletAction (ActivationKind_WalletAction) = 1001, PickFileContinuation (ActivationKind_PickFileContinuation) = 1002, PickSaveFileContinuation (ActivationKind_PickSaveFileContinuation) = 1003, PickFolderContinuation (ActivationKind_PickFolderContinuation) = 1004, WebAuthenticationBrokerContinuation (ActivationKind_WebAuthenticationBrokerContinuation) = 1005, WebAccountProvider (ActivationKind_WebAccountProvider) = 1006, ComponentUI (ActivationKind_ComponentUI) = 1007, ProtocolForResults (ActivationKind_ProtocolForResults) = 1009, ToastNotification (ActivationKind_ToastNotification) = 1010, Print3DWorkflow (ActivationKind_Print3DWorkflow) = 1011, DialReceiver (ActivationKind_DialReceiver) = 1012, DevicePairing (ActivationKind_DevicePairing) = 1013, UserDataAccountsProvider (ActivationKind_UserDataAccountsProvider) = 1014, FilePickerExperience (ActivationKind_FilePickerExperience) = 1015, + }} + DEFINE_IID!(IID_IActivatedEventArgs, 3479508755, 52488, 20440, 182, 151, 162, 129, 182, 84, 78, 46); + RT_INTERFACE!{interface IActivatedEventArgs(IActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IActivatedEventArgs] { + fn get_Kind(&mut self, out: *mut ActivationKind) -> HRESULT, + fn get_PreviousExecutionState(&mut self, out: *mut ApplicationExecutionState) -> HRESULT, + fn get_SplashScreen(&mut self, out: *mut *mut SplashScreen) -> HRESULT + }} + impl IActivatedEventArgs { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self, serviceId: &RfcommServiceId) -> Result { + #[inline] pub unsafe fn get_previous_execution_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreviousExecutionState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_splash_screen(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, serviceId as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_SplashScreen)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IRfcommDeviceServiceStatics2, 2861347273, 59277, 19428, 128, 118, 10, 61, 135, 160, 160, 95); - RT_INTERFACE!{static interface IRfcommDeviceServiceStatics2(IRfcommDeviceServiceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceServiceStatics2] { - fn GetDeviceSelectorForBluetoothDevice(&mut self, bluetoothDevice: *mut super::BluetoothDevice, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorForBluetoothDeviceWithCacheMode(&mut self, bluetoothDevice: *mut super::BluetoothDevice, cacheMode: super::BluetoothCacheMode, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorForBluetoothDeviceAndServiceId(&mut self, bluetoothDevice: *mut super::BluetoothDevice, serviceId: *mut RfcommServiceId, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode(&mut self, bluetoothDevice: *mut super::BluetoothDevice, serviceId: *mut RfcommServiceId, cacheMode: super::BluetoothCacheMode, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IAppointmentsProviderActivatedEventArgs, 862241797, 37692, 20093, 160, 52, 80, 15, 184, 220, 217, 243); + RT_INTERFACE!{interface IAppointmentsProviderActivatedEventArgs(IAppointmentsProviderActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentsProviderActivatedEventArgs] { + fn get_Verb(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IRfcommDeviceServiceStatics2 { - #[inline] pub unsafe fn get_device_selector_for_bluetooth_device(&mut self, bluetoothDevice: &super::BluetoothDevice) -> Result { + impl IAppointmentsProviderActivatedEventArgs { + #[inline] pub unsafe fn get_verb(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDevice)(self, bluetoothDevice as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Verb)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_for_bluetooth_device_with_cache_mode(&mut self, bluetoothDevice: &super::BluetoothDevice, cacheMode: super::BluetoothCacheMode) -> Result { + } + DEFINE_IID!(IID_IAppointmentsProviderAddAppointmentActivatedEventArgs, 2726695783, 52965, 20045, 158, 215, 65, 195, 78, 193, 139, 2); + RT_INTERFACE!{interface IAppointmentsProviderAddAppointmentActivatedEventArgs(IAppointmentsProviderAddAppointmentActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentsProviderAddAppointmentActivatedEventArgs] { + fn get_AddAppointmentOperation(&mut self, out: *mut *mut super::appointments::appointmentsprovider::AddAppointmentOperation) -> HRESULT + }} + impl IAppointmentsProviderAddAppointmentActivatedEventArgs { + #[inline] pub unsafe fn get_add_appointment_operation(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceWithCacheMode)(self, bluetoothDevice as *const _ as *mut _, cacheMode, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AddAppointmentOperation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_for_bluetooth_device_and_service_id(&mut self, bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId) -> Result { + } + DEFINE_IID!(IID_IAppointmentsProviderReplaceAppointmentActivatedEventArgs, 357677012, 43393, 16487, 138, 98, 5, 36, 228, 173, 225, 33); + RT_INTERFACE!{interface IAppointmentsProviderReplaceAppointmentActivatedEventArgs(IAppointmentsProviderReplaceAppointmentActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentsProviderReplaceAppointmentActivatedEventArgs] { + fn get_ReplaceAppointmentOperation(&mut self, out: *mut *mut super::appointments::appointmentsprovider::ReplaceAppointmentOperation) -> HRESULT + }} + impl IAppointmentsProviderReplaceAppointmentActivatedEventArgs { + #[inline] pub unsafe fn get_replace_appointment_operation(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceAndServiceId)(self, bluetoothDevice as *const _ as *mut _, serviceId as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ReplaceAppointmentOperation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_for_bluetooth_device_and_service_id_with_cache_mode(&mut self, bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId, cacheMode: super::BluetoothCacheMode) -> Result { + } + DEFINE_IID!(IID_IAppointmentsProviderRemoveAppointmentActivatedEventArgs, 1964980920, 2958, 17692, 159, 21, 150, 110, 105, 155, 172, 37); + RT_INTERFACE!{interface IAppointmentsProviderRemoveAppointmentActivatedEventArgs(IAppointmentsProviderRemoveAppointmentActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentsProviderRemoveAppointmentActivatedEventArgs] { + fn get_RemoveAppointmentOperation(&mut self, out: *mut *mut super::appointments::appointmentsprovider::RemoveAppointmentOperation) -> HRESULT + }} + impl IAppointmentsProviderRemoveAppointmentActivatedEventArgs { + #[inline] pub unsafe fn get_remove_appointment_operation(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode)(self, bluetoothDevice as *const _ as *mut _, serviceId as *const _ as *mut _, cacheMode, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_RemoveAppointmentOperation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IRfcommDeviceService, 2927755039, 50593, 19520, 140, 40, 243, 239, 214, 144, 98, 243); - RT_INTERFACE!{interface IRfcommDeviceService(IRfcommDeviceServiceVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceService] { - #[cfg(not(feature="windows.networking"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.networking")] fn get_ConnectionHostName(&mut self, out: *mut *mut ::rt::gen::windows::networking::HostName) -> HRESULT, - fn get_ConnectionServiceName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ServiceId(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, - #[cfg(not(feature="windows.networking"))] fn __Dummy3(&mut self) -> (), - #[cfg(feature="windows.networking")] fn get_ProtectionLevel(&mut self, out: *mut ::rt::gen::windows::networking::sockets::SocketProtectionLevel) -> HRESULT, - #[cfg(not(feature="windows.networking"))] fn __Dummy4(&mut self) -> (), - #[cfg(feature="windows.networking")] fn get_MaxProtectionLevel(&mut self, out: *mut ::rt::gen::windows::networking::sockets::SocketProtectionLevel) -> HRESULT, - #[cfg(feature="windows.storage")] fn GetSdpRawAttributesAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IMapView>) -> HRESULT, - #[cfg(feature="windows.storage")] fn GetSdpRawAttributesWithCacheModeAsync(&mut self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IMapView>) -> HRESULT + DEFINE_IID!(IID_IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs, 962130021, 38977, 19621, 153, 155, 136, 81, 152, 185, 239, 42); + RT_INTERFACE!{interface IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs(IAppointmentsProviderShowAppointmentDetailsActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs] { + fn get_InstanceStartDate(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_LocalId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RoamingId(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IRfcommDeviceService { - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_connection_host_name(&mut self) -> Result> { + impl IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs { + #[inline] pub unsafe fn get_instance_start_date(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ConnectionHostName)(self, &mut out); + let hr = ((*self.lpVtbl).get_InstanceStartDate)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_connection_service_name(&mut self) -> Result { + #[inline] pub unsafe fn get_local_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ConnectionServiceName)(self, &mut out); + let hr = ((*self.lpVtbl).get_LocalId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_service_id(&mut self) -> Result> { + #[inline] pub unsafe fn get_roaming_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ServiceId)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_RoamingId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_protection_level(&mut self) -> Result<::rt::gen::windows::networking::sockets::SocketProtectionLevel> { + } + DEFINE_IID!(IID_IAppointmentsProviderShowTimeFrameActivatedEventArgs, 2611915686, 3595, 18858, 186, 188, 18, 177, 220, 119, 73, 134); + RT_INTERFACE!{interface IAppointmentsProviderShowTimeFrameActivatedEventArgs(IAppointmentsProviderShowTimeFrameActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentsProviderShowTimeFrameActivatedEventArgs] { + fn get_TimeToShow(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IAppointmentsProviderShowTimeFrameActivatedEventArgs { + #[inline] pub unsafe fn get_time_to_show(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ProtectionLevel)(self, &mut out); + let hr = ((*self.lpVtbl).get_TimeToShow)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_max_protection_level(&mut self) -> Result<::rt::gen::windows::networking::sockets::SocketProtectionLevel> { + #[inline] pub unsafe fn get_duration(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxProtectionLevel)(self, &mut out); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_sdp_raw_attributes_async(&mut self) -> Result>>> { + } + DEFINE_IID!(IID_IUserDataAccountProviderActivatedEventArgs, 466220835, 36593, 19025, 166, 58, 254, 113, 30, 234, 182, 7); + RT_INTERFACE!{interface IUserDataAccountProviderActivatedEventArgs(IUserDataAccountProviderActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountProviderActivatedEventArgs] { + fn get_Operation(&mut self, out: *mut *mut super::userdataaccounts::provider::IUserDataAccountProviderOperation) -> HRESULT + }} + impl IUserDataAccountProviderActivatedEventArgs { + #[inline] pub unsafe fn get_operation(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSdpRawAttributesAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_Operation)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_sdp_raw_attributes_with_cache_mode_async(&mut self, cacheMode: super::BluetoothCacheMode) -> Result>>> { + } + DEFINE_IID!(IID_IActivatedEventArgsWithUser, 485530526, 39266, 18742, 128, 255, 175, 200, 232, 174, 92, 140); + RT_INTERFACE!{interface IActivatedEventArgsWithUser(IActivatedEventArgsWithUserVtbl): IInspectable(IInspectableVtbl) [IID_IActivatedEventArgsWithUser] { + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT + }} + impl IActivatedEventArgsWithUser { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSdpRawAttributesWithCacheModeAsync)(self, cacheMode, &mut out); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IRfcommDeviceService2, 1399647508, 60365, 18942, 191, 159, 64, 239, 198, 137, 178, 13); - RT_INTERFACE!{interface IRfcommDeviceService2(IRfcommDeviceService2Vtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceService2] { - fn get_Device(&mut self, out: *mut *mut super::BluetoothDevice) -> HRESULT + DEFINE_IID!(IID_IApplicationViewActivatedEventArgs, 2467098443, 47145, 16636, 136, 244, 133, 19, 232, 166, 71, 56); + RT_INTERFACE!{interface IApplicationViewActivatedEventArgs(IApplicationViewActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewActivatedEventArgs] { + fn get_CurrentlyShownApplicationViewId(&mut self, out: *mut i32) -> HRESULT }} - impl IRfcommDeviceService2 { - #[inline] pub unsafe fn get_device(&mut self) -> Result> { + impl IApplicationViewActivatedEventArgs { + #[inline] pub unsafe fn get_currently_shown_application_view_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentlyShownApplicationViewId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IViewSwitcherProvider, 871532710, 23596, 19751, 186, 199, 117, 54, 8, 143, 18, 25); + RT_INTERFACE!{interface IViewSwitcherProvider(IViewSwitcherProviderVtbl): IInspectable(IInspectableVtbl) [IID_IViewSwitcherProvider] { + #[cfg(feature="windows.ui")] fn get_ViewSwitcher(&mut self, out: *mut *mut super::super::ui::viewmanagement::ActivationViewSwitcher) -> HRESULT + }} + impl IViewSwitcherProvider { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_view_switcher(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Device)(self, &mut out); + let hr = ((*self.lpVtbl).get_ViewSwitcher)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IRfcommDeviceService3, 472034534, 56644, 19747, 134, 109, 143, 52, 134, 238, 100, 144); - RT_INTERFACE!{interface IRfcommDeviceService3(IRfcommDeviceService3Vtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceService3] { - fn get_DeviceAccessInformation(&mut self, out: *mut *mut super::super::enumeration::DeviceAccessInformation) -> HRESULT, - fn RequestAccessAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + DEFINE_IID!(IID_IPrelaunchActivatedEventArgs, 205812091, 6647, 18646, 176, 70, 207, 34, 130, 110, 170, 116); + RT_INTERFACE!{interface IPrelaunchActivatedEventArgs(IPrelaunchActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrelaunchActivatedEventArgs] { + fn get_PrelaunchActivated(&mut self, out: *mut bool) -> HRESULT }} - impl IRfcommDeviceService3 { - #[inline] pub unsafe fn get_device_access_information(&mut self) -> Result> { + impl IPrelaunchActivatedEventArgs { + #[inline] pub unsafe fn get_prelaunch_activated(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrelaunchActivated)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILaunchActivatedEventArgs, 4224269862, 41290, 19279, 130, 176, 51, 190, 217, 32, 175, 82); + RT_INTERFACE!{interface ILaunchActivatedEventArgs(ILaunchActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ILaunchActivatedEventArgs] { + fn get_Arguments(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TileId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ILaunchActivatedEventArgs { + #[inline] pub unsafe fn get_arguments(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceAccessInformation)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Arguments)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_tile_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_TileId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILaunchActivatedEventArgs2, 265518780, 40393, 18101, 154, 206, 189, 149, 212, 86, 83, 69); + RT_INTERFACE!{interface ILaunchActivatedEventArgs2(ILaunchActivatedEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_ILaunchActivatedEventArgs2] { + fn get_TileActivatedInfo(&mut self, out: *mut *mut TileActivatedInfo) -> HRESULT + }} + impl ILaunchActivatedEventArgs2 { + #[inline] pub unsafe fn get_tile_activated_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TileActivatedInfo)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IRfcommServiceProviderStatics, 2559083267, 27082, 16698, 132, 247, 67, 68, 199, 41, 41, 151); - RT_INTERFACE!{static interface IRfcommServiceProviderStatics(IRfcommServiceProviderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommServiceProviderStatics] { - fn CreateAsync(&mut self, serviceId: *mut RfcommServiceId, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class TileActivatedInfo: ITileActivatedInfo} + RT_CLASS!{class LaunchActivatedEventArgs: ILaunchActivatedEventArgs} + DEFINE_IID!(IID_ISearchActivatedEventArgs, 2360568145, 22728, 17379, 148, 188, 65, 211, 63, 139, 99, 14); + RT_INTERFACE!{interface ISearchActivatedEventArgs(ISearchActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchActivatedEventArgs] { + fn get_QueryText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IRfcommServiceProviderStatics { - #[inline] pub unsafe fn create_async(&mut self, serviceId: &RfcommServiceId) -> Result>> { + impl ISearchActivatedEventArgs { + #[inline] pub unsafe fn get_query_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateAsync)(self, serviceId as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_QueryText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISearchActivatedEventArgsWithLinguisticDetails, 3231658970, 2219, 18737, 155, 124, 69, 16, 37, 242, 31, 129); + RT_INTERFACE!{interface ISearchActivatedEventArgsWithLinguisticDetails(ISearchActivatedEventArgsWithLinguisticDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ISearchActivatedEventArgsWithLinguisticDetails] { + fn get_LinguisticDetails(&mut self, out: *mut *mut super::search::SearchPaneQueryLinguisticDetails) -> HRESULT + }} + impl ISearchActivatedEventArgsWithLinguisticDetails { + #[inline] pub unsafe fn get_linguistic_details(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LinguisticDetails)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class RfcommServiceProvider: IRfcommServiceProvider} - RT_ACTIVATABLE!{IRfcommServiceProviderStatics [CLSID_RfcommServiceProvider]} - DEFINE_CLSID!(CLSID_RfcommServiceProvider = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,82,102,99,111,109,109,46,82,102,99,111,109,109,83,101,114,118,105,99,101,80,114,111,118,105,100,101,114,0]); - DEFINE_IID!(IID_IRfcommServiceProvider, 3940285892, 45558, 17663, 159, 124, 231, 168, 42, 184, 104, 33); - RT_INTERFACE!{interface IRfcommServiceProvider(IRfcommServiceProviderVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommServiceProvider] { - fn get_ServiceId(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_SdpRawAttributes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT, - #[cfg(not(feature="windows.networking"))] fn __Dummy2(&mut self) -> (), - #[cfg(feature="windows.networking")] fn StartAdvertising(&mut self, listener: *mut ::rt::gen::windows::networking::sockets::StreamSocketListener) -> HRESULT, - fn StopAdvertising(&mut self) -> HRESULT + RT_CLASS!{class SearchActivatedEventArgs: ISearchActivatedEventArgs} + DEFINE_IID!(IID_IShareTargetActivatedEventArgs, 1272641992, 52658, 19147, 191, 195, 102, 72, 86, 51, 120, 236); + RT_INTERFACE!{interface IShareTargetActivatedEventArgs(IShareTargetActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IShareTargetActivatedEventArgs] { + fn get_ShareOperation(&mut self, out: *mut *mut super::datatransfer::sharetarget::ShareOperation) -> HRESULT }} - impl IRfcommServiceProvider { - #[inline] pub unsafe fn get_service_id(&mut self) -> Result> { + impl IShareTargetActivatedEventArgs { + #[inline] pub unsafe fn get_share_operation(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ServiceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_ShareOperation)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_sdp_raw_attributes(&mut self) -> Result>> { + } + RT_CLASS!{class ShareTargetActivatedEventArgs: IShareTargetActivatedEventArgs} + DEFINE_IID!(IID_IFileActivatedEventArgs, 3140156467, 37809, 17133, 139, 38, 35, 109, 217, 199, 132, 150); + RT_INTERFACE!{interface IFileActivatedEventArgs(IFileActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IFileActivatedEventArgs] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Files(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Verb(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IFileActivatedEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_files(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SdpRawAttributes)(self, &mut out); + let hr = ((*self.lpVtbl).get_Files)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn start_advertising(&mut self, listener: &::rt::gen::windows::networking::sockets::StreamSocketListener) -> Result<()> { - let hr = ((*self.lpVtbl).StartAdvertising)(self, listener as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_verb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Verb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn stop_advertising(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).StopAdvertising)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IFileActivatedEventArgsWithNeighboringFiles, 1127981476, 57826, 18685, 183, 252, 181, 214, 238, 230, 80, 51); + RT_INTERFACE!{interface IFileActivatedEventArgsWithNeighboringFiles(IFileActivatedEventArgsWithNeighboringFilesVtbl): IInspectable(IInspectableVtbl) [IID_IFileActivatedEventArgsWithNeighboringFiles] { + #[cfg(feature="windows.storage")] fn get_NeighboringFilesQuery(&mut self, out: *mut *mut super::super::storage::search::StorageFileQueryResult) -> HRESULT + }} + impl IFileActivatedEventArgsWithNeighboringFiles { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_neighboring_files_query(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NeighboringFilesQuery)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IRfcommServiceProvider2, 1936449478, 15489, 19742, 186, 242, 221, 187, 129, 40, 69, 18); - RT_INTERFACE!{interface IRfcommServiceProvider2(IRfcommServiceProvider2Vtbl): IInspectable(IInspectableVtbl) [IID_IRfcommServiceProvider2] { - #[cfg(feature="windows.networking")] fn StartAdvertisingWithRadioDiscoverability(&mut self, listener: *mut ::rt::gen::windows::networking::sockets::StreamSocketListener, radioDiscoverable: bool) -> HRESULT + DEFINE_IID!(IID_IFileActivatedEventArgsWithCallerPackageFamilyName, 761327723, 53855, 19749, 134, 83, 225, 197, 225, 16, 131, 9); + RT_INTERFACE!{interface IFileActivatedEventArgsWithCallerPackageFamilyName(IFileActivatedEventArgsWithCallerPackageFamilyNameVtbl): IInspectable(IInspectableVtbl) [IID_IFileActivatedEventArgsWithCallerPackageFamilyName] { + fn get_CallerPackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IRfcommServiceProvider2 { - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn start_advertising_with_radio_discoverability(&mut self, listener: &::rt::gen::windows::networking::sockets::StreamSocketListener, radioDiscoverable: bool) -> Result<()> { - let hr = ((*self.lpVtbl).StartAdvertisingWithRadioDiscoverability)(self, listener as *const _ as *mut _, radioDiscoverable); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IFileActivatedEventArgsWithCallerPackageFamilyName { + #[inline] pub unsafe fn get_caller_package_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CallerPackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } -} // Windows.Devices.Bluetooth.Rfcomm -pub mod genericattributeprofile { // Windows.Devices.Bluetooth.GenericAttributeProfile -use ::prelude::*; - RT_CLASS!{class GattDeviceService: IGattDeviceService} - RT_ACTIVATABLE!{IGattDeviceServiceStatics [CLSID_GattDeviceService]} - DEFINE_CLSID!(CLSID_GattDeviceService = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,68,101,118,105,99,101,83,101,114,118,105,99,101,0]); - RT_ENUM! { enum GattCharacteristicProperties: u32 { - None (GattCharacteristicProperties_None) = 0, Broadcast (GattCharacteristicProperties_Broadcast) = 1, Read (GattCharacteristicProperties_Read) = 2, WriteWithoutResponse (GattCharacteristicProperties_WriteWithoutResponse) = 4, Write (GattCharacteristicProperties_Write) = 8, Notify (GattCharacteristicProperties_Notify) = 16, Indicate (GattCharacteristicProperties_Indicate) = 32, AuthenticatedSignedWrites (GattCharacteristicProperties_AuthenticatedSignedWrites) = 64, ExtendedProperties (GattCharacteristicProperties_ExtendedProperties) = 128, ReliableWrites (GattCharacteristicProperties_ReliableWrites) = 256, WritableAuxiliaries (GattCharacteristicProperties_WritableAuxiliaries) = 512, + RT_CLASS!{class FileActivatedEventArgs: IFileActivatedEventArgs} + DEFINE_IID!(IID_IProtocolActivatedEventArgs, 1620440285, 47040, 18091, 129, 254, 217, 15, 54, 208, 13, 36); + RT_INTERFACE!{interface IProtocolActivatedEventArgs(IProtocolActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IProtocolActivatedEventArgs] { + fn get_Uri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT }} - RT_ENUM! { enum GattClientCharacteristicConfigurationDescriptorValue: i32 { - None (GattClientCharacteristicConfigurationDescriptorValue_None) = 0, Notify (GattClientCharacteristicConfigurationDescriptorValue_Notify) = 1, Indicate (GattClientCharacteristicConfigurationDescriptorValue_Indicate) = 2, + impl IProtocolActivatedEventArgs { + #[inline] pub unsafe fn get_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData, 3628731410, 23695, 17292, 131, 203, 194, 143, 204, 11, 47, 219); + RT_INTERFACE!{interface IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData(IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndDataVtbl): IInspectable(IInspectableVtbl) [IID_IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData] { + fn get_CallerPackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Data(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT }} - RT_ENUM! { enum GattProtectionLevel: i32 { - Plain (GattProtectionLevel_Plain) = 0, AuthenticationRequired (GattProtectionLevel_AuthenticationRequired) = 1, EncryptionRequired (GattProtectionLevel_EncryptionRequired) = 2, EncryptionAndAuthenticationRequired (GattProtectionLevel_EncryptionAndAuthenticationRequired) = 3, + impl IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData { + #[inline] pub unsafe fn get_caller_package_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CallerPackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProtocolActivatedEventArgs: IProtocolActivatedEventArgs} + DEFINE_IID!(IID_IProtocolForResultsActivatedEventArgs, 3880858306, 31463, 17687, 128, 172, 219, 232, 215, 204, 91, 156); + RT_INTERFACE!{interface IProtocolForResultsActivatedEventArgs(IProtocolForResultsActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IProtocolForResultsActivatedEventArgs] { + #[cfg(feature="windows.system")] fn get_ProtocolForResultsOperation(&mut self, out: *mut *mut super::super::system::ProtocolForResultsOperation) -> HRESULT }} - RT_ENUM! { enum GattWriteOption: i32 { - WriteWithResponse (GattWriteOption_WriteWithResponse) = 0, WriteWithoutResponse (GattWriteOption_WriteWithoutResponse) = 1, + impl IProtocolForResultsActivatedEventArgs { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_protocol_for_results_operation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProtocolForResultsOperation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProtocolForResultsActivatedEventArgs: IProtocolForResultsActivatedEventArgs} + DEFINE_IID!(IID_IFileOpenPickerActivatedEventArgs, 1921151106, 21797, 19442, 188, 9, 31, 80, 149, 212, 150, 77); + RT_INTERFACE!{interface IFileOpenPickerActivatedEventArgs(IFileOpenPickerActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IFileOpenPickerActivatedEventArgs] { + #[cfg(feature="windows.storage")] fn get_FileOpenPickerUI(&mut self, out: *mut *mut super::super::storage::pickers::provider::FileOpenPickerUI) -> HRESULT }} - RT_ENUM! { enum GattCommunicationStatus: i32 { - Success (GattCommunicationStatus_Success) = 0, Unreachable (GattCommunicationStatus_Unreachable) = 1, + impl IFileOpenPickerActivatedEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_file_open_picker_ui(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FileOpenPickerUI)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileOpenPickerActivatedEventArgs2, 1584602982, 36127, 17915, 175, 29, 115, 32, 92, 143, 199, 161); + RT_INTERFACE!{interface IFileOpenPickerActivatedEventArgs2(IFileOpenPickerActivatedEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IFileOpenPickerActivatedEventArgs2] { + fn get_CallerPackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT }} - DEFINE_IID!(IID_IGattDeviceServiceStatics, 426573858, 64173, 17884, 174, 91, 42, 195, 24, 78, 132, 219); - RT_INTERFACE!{static interface IGattDeviceServiceStatics(IGattDeviceServiceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattDeviceServiceStatics] { - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelectorFromUuid(&mut self, serviceUuid: Guid, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromShortId(&mut self, serviceShortId: u16, out: *mut HSTRING) -> HRESULT, - fn ConvertShortIdToUuid(&mut self, shortId: u16, out: *mut Guid) -> HRESULT + impl IFileOpenPickerActivatedEventArgs2 { + #[inline] pub unsafe fn get_caller_package_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CallerPackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FileOpenPickerActivatedEventArgs: IFileOpenPickerActivatedEventArgs} + DEFINE_IID!(IID_IFileSavePickerActivatedEventArgs, 2176949489, 29926, 17287, 130, 235, 187, 143, 214, 75, 67, 70); + RT_INTERFACE!{interface IFileSavePickerActivatedEventArgs(IFileSavePickerActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IFileSavePickerActivatedEventArgs] { + #[cfg(feature="windows.storage")] fn get_FileSavePickerUI(&mut self, out: *mut *mut super::super::storage::pickers::provider::FileSavePickerUI) -> HRESULT }} - impl IGattDeviceServiceStatics { - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + impl IFileSavePickerActivatedEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_file_save_picker_ui(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).get_FileSavePickerUI)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_uuid(&mut self, serviceUuid: Guid) -> Result { + } + DEFINE_IID!(IID_IFileSavePickerActivatedEventArgs2, 1802763795, 11506, 19784, 140, 188, 175, 103, 210, 63, 28, 231); + RT_INTERFACE!{interface IFileSavePickerActivatedEventArgs2(IFileSavePickerActivatedEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IFileSavePickerActivatedEventArgs2] { + fn get_CallerPackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EnterpriseId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IFileSavePickerActivatedEventArgs2 { + #[inline] pub unsafe fn get_caller_package_family_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromUuid)(self, serviceUuid, &mut out); + let hr = ((*self.lpVtbl).get_CallerPackageFamilyName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_short_id(&mut self, serviceShortId: u16) -> Result { + #[inline] pub unsafe fn get_enterprise_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromShortId)(self, serviceShortId, &mut out); + let hr = ((*self.lpVtbl).get_EnterpriseId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn convert_short_id_to_uuid(&mut self, shortId: u16) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).ConvertShortIdToUuid)(self, shortId, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } } - RT_CLASS!{class GattCharacteristic: IGattCharacteristic} - RT_ACTIVATABLE!{IGattCharacteristicStatics [CLSID_GattCharacteristic]} - DEFINE_CLSID!(CLSID_GattCharacteristic = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,67,104,97,114,97,99,116,101,114,105,115,116,105,99,0]); - DEFINE_IID!(IID_IGattCharacteristicStatics, 1506496707, 22836, 20328, 161, 152, 235, 134, 79, 164, 78, 107); - RT_INTERFACE!{static interface IGattCharacteristicStatics(IGattCharacteristicStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicStatics] { - fn ConvertShortIdToUuid(&mut self, shortId: u16, out: *mut Guid) -> HRESULT + RT_CLASS!{class FileSavePickerActivatedEventArgs: IFileSavePickerActivatedEventArgs} + DEFINE_IID!(IID_ICachedFileUpdaterActivatedEventArgs, 3496915399, 14341, 20171, 183, 87, 108, 241, 94, 38, 254, 243); + RT_INTERFACE!{interface ICachedFileUpdaterActivatedEventArgs(ICachedFileUpdaterActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICachedFileUpdaterActivatedEventArgs] { + #[cfg(feature="windows.storage")] fn get_CachedFileUpdaterUI(&mut self, out: *mut *mut super::super::storage::provider::CachedFileUpdaterUI) -> HRESULT }} - impl IGattCharacteristicStatics { - #[inline] pub unsafe fn convert_short_id_to_uuid(&mut self, shortId: u16) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).ConvertShortIdToUuid)(self, shortId, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl ICachedFileUpdaterActivatedEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_cached_file_updater_ui(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CachedFileUpdaterUI)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGattCharacteristic, 1506496705, 22836, 20328, 161, 152, 235, 134, 79, 164, 78, 107); - RT_INTERFACE!{interface IGattCharacteristic(IGattCharacteristicVtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristic] { - fn GetDescriptors(&mut self, descriptorUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_CharacteristicProperties(&mut self, out: *mut GattCharacteristicProperties) -> HRESULT, - fn get_ProtectionLevel(&mut self, out: *mut GattProtectionLevel) -> HRESULT, - fn put_ProtectionLevel(&mut self, value: GattProtectionLevel) -> HRESULT, - fn get_UserDescription(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Uuid(&mut self, out: *mut Guid) -> HRESULT, - fn get_AttributeHandle(&mut self, out: *mut u16) -> HRESULT, - fn get_PresentationFormats(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn ReadValueAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ReadValueWithCacheModeAsync(&mut self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy10(&mut self) -> (), - #[cfg(feature="windows.storage")] fn WriteValueAsync(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy11(&mut self) -> (), - #[cfg(feature="windows.storage")] fn WriteValueWithOptionAsync(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ReadClientCharacteristicConfigurationDescriptorAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn WriteClientCharacteristicConfigurationDescriptorAsync(&mut self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn add_ValueChanged(&mut self, valueChangedHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ValueChanged(&mut self, valueChangedEventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class CachedFileUpdaterActivatedEventArgs: ICachedFileUpdaterActivatedEventArgs} + DEFINE_IID!(IID_IDeviceActivatedEventArgs, 3444619689, 52752, 17618, 130, 52, 195, 85, 160, 115, 239, 51); + RT_INTERFACE!{interface IDeviceActivatedEventArgs(IDeviceActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceActivatedEventArgs] { + fn get_DeviceInformationId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Verb(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IGattCharacteristic { - #[inline] pub unsafe fn get_descriptors(&mut self, descriptorUuid: Guid) -> Result>> { + impl IDeviceActivatedEventArgs { + #[inline] pub unsafe fn get_device_information_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDescriptors)(self, descriptorUuid, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristic_properties(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CharacteristicProperties)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protection_level(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ProtectionLevel)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_protection_level(&mut self, value: GattProtectionLevel) -> Result<()> { - let hr = ((*self.lpVtbl).put_ProtectionLevel)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DeviceInformationId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_user_description(&mut self) -> Result { + #[inline] pub unsafe fn get_verb(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_UserDescription)(self, &mut out); + let hr = ((*self.lpVtbl).get_Verb)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uuid(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Uuid)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class DeviceActivatedEventArgs: IDeviceActivatedEventArgs} + DEFINE_IID!(IID_IPickerReturnedActivatedEventArgs, 906883001, 43475, 18820, 164, 237, 158, 199, 52, 96, 73, 33); + RT_INTERFACE!{interface IPickerReturnedActivatedEventArgs(IPickerReturnedActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPickerReturnedActivatedEventArgs] { + fn get_PickerOperationId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPickerReturnedActivatedEventArgs { + #[inline] pub unsafe fn get_picker_operation_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PickerOperationId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_attribute_handle(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AttributeHandle)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class PickerReturnedActivatedEventArgs: IPickerReturnedActivatedEventArgs} + DEFINE_IID!(IID_IRestrictedLaunchActivatedEventArgs, 3770133633, 49091, 17220, 165, 218, 25, 253, 90, 39, 186, 174); + RT_INTERFACE!{interface IRestrictedLaunchActivatedEventArgs(IRestrictedLaunchActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRestrictedLaunchActivatedEventArgs] { + fn get_SharedContext(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IRestrictedLaunchActivatedEventArgs { + #[inline] pub unsafe fn get_shared_context(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SharedContext)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_presentation_formats(&mut self) -> Result>> { + } + RT_CLASS!{class RestrictedLaunchActivatedEventArgs: IRestrictedLaunchActivatedEventArgs} + DEFINE_IID!(IID_ILockScreenActivatedEventArgs, 1017608550, 24840, 19009, 130, 32, 238, 125, 19, 60, 133, 50); + RT_INTERFACE!{interface ILockScreenActivatedEventArgs(ILockScreenActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenActivatedEventArgs] { + fn get_Info(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl ILockScreenActivatedEventArgs { + #[inline] pub unsafe fn get_info(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PresentationFormats)(self, &mut out); + let hr = ((*self.lpVtbl).get_Info)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn read_value_async(&mut self) -> Result>> { + } + RT_CLASS!{class LockScreenActivatedEventArgs: ILockScreenActivatedEventArgs} + DEFINE_IID!(IID_IContinuationActivatedEventArgs, 3850438325, 5471, 19092, 167, 66, 199, 224, 143, 78, 24, 140); + RT_INTERFACE!{interface IContinuationActivatedEventArgs(IContinuationActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContinuationActivatedEventArgs] { + fn get_ContinuationData(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + }} + impl IContinuationActivatedEventArgs { + #[inline] pub unsafe fn get_continuation_data(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ReadValueAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_ContinuationData)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn read_value_with_cache_mode_async(&mut self, cacheMode: super::BluetoothCacheMode) -> Result>> { + } + DEFINE_IID!(IID_IFileOpenPickerContinuationEventArgs, 4042932026, 54504, 19155, 156, 52, 35, 8, 243, 47, 206, 201); + RT_INTERFACE!{interface IFileOpenPickerContinuationEventArgs(IFileOpenPickerContinuationEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IFileOpenPickerContinuationEventArgs] { + #[cfg(feature="windows.storage")] fn get_Files(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IFileOpenPickerContinuationEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_files(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ReadValueWithCacheModeAsync)(self, cacheMode, &mut out); + let hr = ((*self.lpVtbl).get_Files)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn write_value_async(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + } + RT_CLASS!{class FileOpenPickerContinuationEventArgs: IFileOpenPickerContinuationEventArgs} + DEFINE_IID!(IID_IFileSavePickerContinuationEventArgs, 746876897, 15277, 20275, 140, 139, 228, 111, 174, 130, 75, 75); + RT_INTERFACE!{interface IFileSavePickerContinuationEventArgs(IFileSavePickerContinuationEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IFileSavePickerContinuationEventArgs] { + #[cfg(feature="windows.storage")] fn get_File(&mut self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT + }} + impl IFileSavePickerContinuationEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_file(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).WriteValueAsync)(self, value as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_File)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn write_value_with_option_async(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption) -> Result>> { + } + RT_CLASS!{class FileSavePickerContinuationEventArgs: IFileSavePickerContinuationEventArgs} + DEFINE_IID!(IID_IFolderPickerContinuationEventArgs, 1367876454, 40779, 18831, 190, 176, 66, 104, 79, 110, 28, 41); + RT_INTERFACE!{interface IFolderPickerContinuationEventArgs(IFolderPickerContinuationEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IFolderPickerContinuationEventArgs] { + #[cfg(feature="windows.storage")] fn get_Folder(&mut self, out: *mut *mut super::super::storage::StorageFolder) -> HRESULT + }} + impl IFolderPickerContinuationEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_folder(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).WriteValueWithOptionAsync)(self, value as *const _ as *mut _, writeOption, &mut out); + let hr = ((*self.lpVtbl).get_Folder)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn read_client_characteristic_configuration_descriptor_async(&mut self) -> Result>> { + } + RT_CLASS!{class FolderPickerContinuationEventArgs: IFolderPickerContinuationEventArgs} + DEFINE_IID!(IID_IWebAuthenticationBrokerContinuationEventArgs, 1977459668, 30484, 17725, 183, 255, 185, 94, 58, 23, 9, 218); + RT_INTERFACE!{interface IWebAuthenticationBrokerContinuationEventArgs(IWebAuthenticationBrokerContinuationEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWebAuthenticationBrokerContinuationEventArgs] { + #[cfg(feature="windows.security")] fn get_WebAuthenticationResult(&mut self, out: *mut *mut super::super::security::authentication::web::WebAuthenticationResult) -> HRESULT + }} + impl IWebAuthenticationBrokerContinuationEventArgs { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_web_authentication_result(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ReadClientCharacteristicConfigurationDescriptorAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_WebAuthenticationResult)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn write_client_characteristic_configuration_descriptor_async(&mut self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue) -> Result>> { + } + RT_CLASS!{class WebAuthenticationBrokerContinuationEventArgs: IWebAuthenticationBrokerContinuationEventArgs} + DEFINE_IID!(IID_IWebAccountProviderActivatedEventArgs, 1924601716, 39146, 19663, 151, 82, 70, 217, 5, 16, 4, 241); + RT_INTERFACE!{interface IWebAccountProviderActivatedEventArgs(IWebAccountProviderActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderActivatedEventArgs] { + #[cfg(feature="windows.security")] fn get_Operation(&mut self, out: *mut *mut super::super::security::authentication::web::provider::IWebAccountProviderOperation) -> HRESULT + }} + impl IWebAccountProviderActivatedEventArgs { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_operation(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).WriteClientCharacteristicConfigurationDescriptorAsync)(self, clientCharacteristicConfigurationDescriptorValue, &mut out); + let hr = ((*self.lpVtbl).get_Operation)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_value_changed(&mut self, valueChangedHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ValueChanged)(self, valueChangedHandler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class WebAccountProviderActivatedEventArgs: IWebAccountProviderActivatedEventArgs} + DEFINE_IID!(IID_IToastNotificationActivatedEventArgs, 2460512130, 21136, 17181, 190, 133, 196, 170, 238, 184, 104, 95); + RT_INTERFACE!{interface IToastNotificationActivatedEventArgs(IToastNotificationActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationActivatedEventArgs] { + fn get_Argument(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UserInput(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + }} + impl IToastNotificationActivatedEventArgs { + #[inline] pub unsafe fn get_argument(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Argument)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_value_changed(&mut self, valueChangedEventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ValueChanged)(self, valueChangedEventCookie); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_user_input(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserInput)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class GattDescriptor: IGattDescriptor} - RT_ACTIVATABLE!{IGattDescriptorStatics [CLSID_GattDescriptor]} - DEFINE_CLSID!(CLSID_GattDescriptor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,68,101,115,99,114,105,112,116,111,114,0]); - RT_CLASS!{class GattPresentationFormat: IGattPresentationFormat} - RT_ACTIVATABLE!{IGattPresentationFormatStatics [CLSID_GattPresentationFormat]} - DEFINE_CLSID!(CLSID_GattPresentationFormat = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,80,114,101,115,101,110,116,97,116,105,111,110,70,111,114,109,97,116,0]); - RT_CLASS!{class GattReadResult: IGattReadResult} - RT_CLASS!{class GattReadClientCharacteristicConfigurationDescriptorResult: IGattReadClientCharacteristicConfigurationDescriptorResult} - RT_CLASS!{class GattValueChangedEventArgs: IGattValueChangedEventArgs} - DEFINE_IID!(IID_IGattCharacteristic2, 2920985976, 60422, 18276, 183, 128, 152, 53, 161, 211, 93, 110); - RT_INTERFACE!{interface IGattCharacteristic2(IGattCharacteristic2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristic2] { - fn get_Service(&mut self, out: *mut *mut GattDeviceService) -> HRESULT, - fn GetAllDescriptors(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + RT_CLASS!{class ToastNotificationActivatedEventArgs: IToastNotificationActivatedEventArgs} + DEFINE_IID!(IID_IDialReceiverActivatedEventArgs, 4218912471, 34286, 17774, 164, 77, 133, 215, 48, 231, 10, 237); + RT_INTERFACE!{interface IDialReceiverActivatedEventArgs(IDialReceiverActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDialReceiverActivatedEventArgs] { + fn get_AppName(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IGattCharacteristic2 { - #[inline] pub unsafe fn get_service(&mut self) -> Result> { + impl IDialReceiverActivatedEventArgs { + #[inline] pub unsafe fn get_app_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Service)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DialReceiverActivatedEventArgs: IDialReceiverActivatedEventArgs} + DEFINE_IID!(IID_ITileActivatedInfo, 2162467761, 14720, 20247, 183, 56, 137, 25, 78, 11, 143, 101); + RT_INTERFACE!{interface ITileActivatedInfo(ITileActivatedInfoVtbl): IInspectable(IInspectableVtbl) [IID_ITileActivatedInfo] { + #[cfg(feature="windows.ui")] fn get_RecentlyShownNotifications(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl ITileActivatedInfo { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_recently_shown_notifications(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RecentlyShownNotifications)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_all_descriptors(&mut self) -> Result>> { + } + DEFINE_IID!(IID_IBackgroundActivatedEventArgs, 2870263520, 59232, 17422, 169, 28, 68, 121, 109, 227, 169, 45); + RT_INTERFACE!{interface IBackgroundActivatedEventArgs(IBackgroundActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundActivatedEventArgs] { + fn get_TaskInstance(&mut self, out: *mut *mut super::background::IBackgroundTaskInstance) -> HRESULT + }} + impl IBackgroundActivatedEventArgs { + #[inline] pub unsafe fn get_task_instance(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetAllDescriptors)(self, &mut out); + let hr = ((*self.lpVtbl).get_TaskInstance)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGattDescriptorStatics, 2449825581, 32900, 17220, 180, 194, 40, 77, 225, 154, 133, 6); - RT_INTERFACE!{static interface IGattDescriptorStatics(IGattDescriptorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattDescriptorStatics] { - fn ConvertShortIdToUuid(&mut self, shortId: u16, out: *mut Guid) -> HRESULT + RT_CLASS!{class BackgroundActivatedEventArgs: IBackgroundActivatedEventArgs} + DEFINE_IID!(IID_IDevicePairingActivatedEventArgs, 3953185252, 60614, 16712, 148, 237, 244, 179, 126, 192, 91, 62); + RT_INTERFACE!{interface IDevicePairingActivatedEventArgs(IDevicePairingActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePairingActivatedEventArgs] { + #[cfg(feature="windows.devices")] fn get_DeviceInformation(&mut self, out: *mut *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT }} - impl IGattDescriptorStatics { - #[inline] pub unsafe fn convert_short_id_to_uuid(&mut self, shortId: u16) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).ConvertShortIdToUuid)(self, shortId, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IDevicePairingActivatedEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGattDescriptor, 2449825579, 32900, 17220, 180, 194, 40, 77, 225, 154, 133, 6); - RT_INTERFACE!{interface IGattDescriptor(IGattDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IGattDescriptor] { - fn get_ProtectionLevel(&mut self, out: *mut GattProtectionLevel) -> HRESULT, - fn put_ProtectionLevel(&mut self, value: GattProtectionLevel) -> HRESULT, - fn get_Uuid(&mut self, out: *mut Guid) -> HRESULT, - fn get_AttributeHandle(&mut self, out: *mut u16) -> HRESULT, - fn ReadValueAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ReadValueWithCacheModeAsync(&mut self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows.storage")] fn WriteValueAsync(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class DevicePairingActivatedEventArgs: IDevicePairingActivatedEventArgs} + DEFINE_IID!(IID_IVoiceCommandActivatedEventArgs, 2878528765, 36163, 19942, 151, 117, 32, 112, 75, 88, 27, 0); + RT_INTERFACE!{interface IVoiceCommandActivatedEventArgs(IVoiceCommandActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandActivatedEventArgs] { + #[cfg(feature="windows.media")] fn get_Result(&mut self, out: *mut *mut super::super::media::speechrecognition::SpeechRecognitionResult) -> HRESULT }} - impl IGattDescriptor { - #[inline] pub unsafe fn get_protection_level(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ProtectionLevel)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IVoiceCommandActivatedEventArgs { + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_result(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Result)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_protection_level(&mut self, value: GattProtectionLevel) -> Result<()> { - let hr = ((*self.lpVtbl).put_ProtectionLevel)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + } + RT_CLASS!{class VoiceCommandActivatedEventArgs: IVoiceCommandActivatedEventArgs} + RT_STRUCT! { struct ActivatedEventsContract { + + }} + DEFINE_IID!(IID_IPrintTaskSettingsActivatedEventArgs, 3996164297, 52822, 18533, 186, 142, 137, 84, 172, 39, 17, 7); + RT_INTERFACE!{interface IPrintTaskSettingsActivatedEventArgs(IPrintTaskSettingsActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskSettingsActivatedEventArgs] { + #[cfg(feature="windows.devices")] fn get_Configuration(&mut self, out: *mut *mut super::super::devices::printers::extensions::PrintTaskConfiguration) -> HRESULT + }} + impl IPrintTaskSettingsActivatedEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_configuration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Configuration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uuid(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Uuid)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class PrintTaskSettingsActivatedEventArgs: IPrintTaskSettingsActivatedEventArgs} + DEFINE_IID!(IID_IPrint3DWorkflowActivatedEventArgs, 1062725515, 62124, 17945, 131, 2, 239, 133, 94, 28, 155, 144); + RT_INTERFACE!{interface IPrint3DWorkflowActivatedEventArgs(IPrint3DWorkflowActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DWorkflowActivatedEventArgs] { + #[cfg(feature="windows.devices")] fn get_Workflow(&mut self, out: *mut *mut super::super::devices::printers::extensions::Print3DWorkflow) -> HRESULT + }} + impl IPrint3DWorkflowActivatedEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_workflow(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Workflow)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_attribute_handle(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AttributeHandle)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class Print3DWorkflowActivatedEventArgs: IPrint3DWorkflowActivatedEventArgs} + DEFINE_IID!(IID_ILockScreenCallActivatedEventArgs, 116621246, 46578, 17547, 177, 62, 227, 40, 172, 28, 81, 106); + RT_INTERFACE!{interface ILockScreenCallActivatedEventArgs(ILockScreenCallActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenCallActivatedEventArgs] { + fn get_CallUI(&mut self, out: *mut *mut super::calls::LockScreenCallUI) -> HRESULT + }} + impl ILockScreenCallActivatedEventArgs { + #[inline] pub unsafe fn get_call_ui(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CallUI)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn read_value_async(&mut self) -> Result>> { + } + RT_CLASS!{class LockScreenCallActivatedEventArgs: ILockScreenCallActivatedEventArgs} + RT_STRUCT! { struct ActivationCameraSettingsContract { + + }} + DEFINE_IID!(IID_ICameraSettingsActivatedEventArgs, 4217873672, 11693, 18698, 145, 112, 220, 160, 54, 235, 17, 75); + RT_INTERFACE!{interface ICameraSettingsActivatedEventArgs(ICameraSettingsActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICameraSettingsActivatedEventArgs] { + fn get_VideoDeviceController(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_VideoDeviceExtension(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl ICameraSettingsActivatedEventArgs { + #[inline] pub unsafe fn get_video_device_controller(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ReadValueAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_VideoDeviceController)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn read_value_with_cache_mode_async(&mut self, cacheMode: super::BluetoothCacheMode) -> Result>> { + #[inline] pub unsafe fn get_video_device_extension(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ReadValueWithCacheModeAsync)(self, cacheMode, &mut out); + let hr = ((*self.lpVtbl).get_VideoDeviceExtension)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn write_value_async(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + } + RT_CLASS!{class CameraSettingsActivatedEventArgs: ICameraSettingsActivatedEventArgs} + RT_STRUCT! { struct ContactActivatedEventsContract { + + }} + RT_CLASS!{class ContactPickerActivatedEventArgs: IContactPickerActivatedEventArgs} + RT_CLASS!{class ContactCallActivatedEventArgs: IContactCallActivatedEventArgs} + RT_CLASS!{class ContactMessageActivatedEventArgs: IContactMessageActivatedEventArgs} + RT_CLASS!{class ContactMapActivatedEventArgs: IContactMapActivatedEventArgs} + RT_CLASS!{class ContactPostActivatedEventArgs: IContactPostActivatedEventArgs} + RT_CLASS!{class ContactVideoCallActivatedEventArgs: IContactVideoCallActivatedEventArgs} + DEFINE_IID!(IID_IContactPickerActivatedEventArgs, 3461851879, 25673, 17831, 151, 31, 209, 19, 190, 122, 137, 54); + RT_INTERFACE!{interface IContactPickerActivatedEventArgs(IContactPickerActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactPickerActivatedEventArgs] { + fn get_ContactPickerUI(&mut self, out: *mut *mut super::contacts::provider::ContactPickerUI) -> HRESULT + }} + impl IContactPickerActivatedEventArgs { + #[inline] pub unsafe fn get_contact_picker_ui(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).WriteValueAsync)(self, value as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_ContactPickerUI)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGattPresentationFormatStatics, 426573856, 64173, 17884, 174, 91, 42, 195, 24, 78, 132, 219); - RT_INTERFACE!{static interface IGattPresentationFormatStatics(IGattPresentationFormatStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattPresentationFormatStatics] { - fn get_BluetoothSigAssignedNumbers(&mut self, out: *mut u8) -> HRESULT + DEFINE_IID!(IID_IContactActivatedEventArgs, 3592921540, 49189, 19521, 157, 239, 241, 234, 250, 208, 117, 231); + RT_INTERFACE!{interface IContactActivatedEventArgs(IContactActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactActivatedEventArgs] { + fn get_Verb(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IGattPresentationFormatStatics { - #[inline] pub unsafe fn get_bluetooth_sig_assigned_numbers(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BluetoothSigAssignedNumbers)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IContactActivatedEventArgs { + #[inline] pub unsafe fn get_verb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Verb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGattPresentationFormatTypesStatics, 4210145802, 12474, 16540, 190, 247, 207, 251, 109, 3, 184, 251); - RT_INTERFACE!{static interface IGattPresentationFormatTypesStatics(IGattPresentationFormatTypesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattPresentationFormatTypesStatics] { - fn get_Boolean(&mut self, out: *mut u8) -> HRESULT, - fn get_Bit2(&mut self, out: *mut u8) -> HRESULT, - fn get_Nibble(&mut self, out: *mut u8) -> HRESULT, - fn get_UInt8(&mut self, out: *mut u8) -> HRESULT, - fn get_UInt12(&mut self, out: *mut u8) -> HRESULT, - fn get_UInt16(&mut self, out: *mut u8) -> HRESULT, - fn get_UInt24(&mut self, out: *mut u8) -> HRESULT, - fn get_UInt32(&mut self, out: *mut u8) -> HRESULT, - fn get_UInt48(&mut self, out: *mut u8) -> HRESULT, - fn get_UInt64(&mut self, out: *mut u8) -> HRESULT, - fn get_UInt128(&mut self, out: *mut u8) -> HRESULT, - fn get_SInt8(&mut self, out: *mut u8) -> HRESULT, - fn get_SInt12(&mut self, out: *mut u8) -> HRESULT, - fn get_SInt16(&mut self, out: *mut u8) -> HRESULT, - fn get_SInt24(&mut self, out: *mut u8) -> HRESULT, - fn get_SInt32(&mut self, out: *mut u8) -> HRESULT, - fn get_SInt48(&mut self, out: *mut u8) -> HRESULT, - fn get_SInt64(&mut self, out: *mut u8) -> HRESULT, - fn get_SInt128(&mut self, out: *mut u8) -> HRESULT, - fn get_Float32(&mut self, out: *mut u8) -> HRESULT, - fn get_Float64(&mut self, out: *mut u8) -> HRESULT, - fn get_SFloat(&mut self, out: *mut u8) -> HRESULT, - fn get_Float(&mut self, out: *mut u8) -> HRESULT, - fn get_DUInt16(&mut self, out: *mut u8) -> HRESULT, - fn get_Utf8(&mut self, out: *mut u8) -> HRESULT, - fn get_Utf16(&mut self, out: *mut u8) -> HRESULT, - fn get_Struct(&mut self, out: *mut u8) -> HRESULT + DEFINE_IID!(IID_IContactCallActivatedEventArgs, 3269399751, 12523, 16838, 179, 188, 91, 22, 148, 249, 218, 179); + RT_INTERFACE!{interface IContactCallActivatedEventArgs(IContactCallActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactCallActivatedEventArgs] { + fn get_ServiceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ServiceUserId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Contact(&mut self, out: *mut *mut super::contacts::Contact) -> HRESULT }} - impl IGattPresentationFormatTypesStatics { - #[inline] pub unsafe fn get_boolean(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Boolean)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IContactCallActivatedEventArgs { + #[inline] pub unsafe fn get_service_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_bit2(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Bit2)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_service_user_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceUserId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_nibble(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Nibble)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uint8(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UInt8)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IContactMessageActivatedEventArgs, 3730410930, 3587, 17328, 191, 86, 188, 196, 11, 49, 98, 223); + RT_INTERFACE!{interface IContactMessageActivatedEventArgs(IContactMessageActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactMessageActivatedEventArgs] { + fn get_ServiceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ServiceUserId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Contact(&mut self, out: *mut *mut super::contacts::Contact) -> HRESULT + }} + impl IContactMessageActivatedEventArgs { + #[inline] pub unsafe fn get_service_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uint12(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UInt12)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_service_user_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceUserId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uint16(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UInt16)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uint24(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UInt24)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IContactMapActivatedEventArgs, 3006003312, 61159, 19154, 170, 241, 168, 126, 255, 207, 0, 164); + RT_INTERFACE!{interface IContactMapActivatedEventArgs(IContactMapActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactMapActivatedEventArgs] { + fn get_Address(&mut self, out: *mut *mut super::contacts::ContactAddress) -> HRESULT, + fn get_Contact(&mut self, out: *mut *mut super::contacts::Contact) -> HRESULT + }} + impl IContactMapActivatedEventArgs { + #[inline] pub unsafe fn get_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Address)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uint32(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UInt32)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uint48(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UInt48)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IContactPostActivatedEventArgs, 3009035367, 61927, 18005, 173, 110, 72, 87, 88, 143, 85, 47); + RT_INTERFACE!{interface IContactPostActivatedEventArgs(IContactPostActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactPostActivatedEventArgs] { + fn get_ServiceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ServiceUserId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Contact(&mut self, out: *mut *mut super::contacts::Contact) -> HRESULT + }} + impl IContactPostActivatedEventArgs { + #[inline] pub unsafe fn get_service_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uint64(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UInt64)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_service_user_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceUserId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uint128(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UInt128)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sint8(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SInt8)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IContactVideoCallActivatedEventArgs, 1627889080, 58343, 19279, 133, 141, 92, 99, 169, 110, 246, 132); + RT_INTERFACE!{interface IContactVideoCallActivatedEventArgs(IContactVideoCallActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactVideoCallActivatedEventArgs] { + fn get_ServiceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ServiceUserId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Contact(&mut self, out: *mut *mut super::contacts::Contact) -> HRESULT + }} + impl IContactVideoCallActivatedEventArgs { + #[inline] pub unsafe fn get_service_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sint12(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SInt12)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_service_user_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceUserId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sint16(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SInt16)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sint24(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SInt24)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IContactsProviderActivatedEventArgs, 1166073000, 22352, 18710, 170, 82, 192, 130, 149, 33, 235, 148); + RT_INTERFACE!{interface IContactsProviderActivatedEventArgs(IContactsProviderActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactsProviderActivatedEventArgs] { + fn get_Verb(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IContactsProviderActivatedEventArgs { + #[inline] pub unsafe fn get_verb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Verb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sint32(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SInt32)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_STRUCT! { struct WebUISearchActivatedEventsContract { + + }} + DEFINE_IID!(IID_IWalletActionActivatedEventArgs, 4244374139, 6682, 19746, 146, 63, 174, 111, 69, 250, 82, 217); + RT_INTERFACE!{interface IWalletActionActivatedEventArgs(IWalletActionActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWalletActionActivatedEventArgs] { + fn get_ItemId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ActionKind(&mut self, out: *mut super::wallet::WalletActionKind) -> HRESULT, + fn get_ActionId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IWalletActionActivatedEventArgs { + #[inline] pub unsafe fn get_item_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sint48(&mut self) -> Result { + #[inline] pub unsafe fn get_action_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SInt48)(self, &mut out); + let hr = ((*self.lpVtbl).get_ActionKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_sint64(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SInt64)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_action_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActionId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sint128(&mut self) -> Result { + } + RT_CLASS!{class WalletActionActivatedEventArgs: IWalletActionActivatedEventArgs} +} // Windows.ApplicationModel.Activation +pub mod chat { // Windows.ApplicationModel.Chat +use ::prelude::*; + RT_ENUM! { enum ChatMessageStatus: i32 { + Draft (ChatMessageStatus_Draft) = 0, Sending (ChatMessageStatus_Sending) = 1, Sent (ChatMessageStatus_Sent) = 2, SendRetryNeeded (ChatMessageStatus_SendRetryNeeded) = 3, SendFailed (ChatMessageStatus_SendFailed) = 4, Received (ChatMessageStatus_Received) = 5, ReceiveDownloadNeeded (ChatMessageStatus_ReceiveDownloadNeeded) = 6, ReceiveDownloadFailed (ChatMessageStatus_ReceiveDownloadFailed) = 7, ReceiveDownloading (ChatMessageStatus_ReceiveDownloading) = 8, Deleted (ChatMessageStatus_Deleted) = 9, Declined (ChatMessageStatus_Declined) = 10, Cancelled (ChatMessageStatus_Cancelled) = 11, Recalled (ChatMessageStatus_Recalled) = 12, ReceiveRetryNeeded (ChatMessageStatus_ReceiveRetryNeeded) = 13, + }} + RT_ENUM! { enum ChatMessageKind: i32 { + Standard (ChatMessageKind_Standard) = 0, FileTransferRequest (ChatMessageKind_FileTransferRequest) = 1, TransportCustom (ChatMessageKind_TransportCustom) = 2, JoinedConversation (ChatMessageKind_JoinedConversation) = 3, LeftConversation (ChatMessageKind_LeftConversation) = 4, OtherParticipantJoinedConversation (ChatMessageKind_OtherParticipantJoinedConversation) = 5, OtherParticipantLeftConversation (ChatMessageKind_OtherParticipantLeftConversation) = 6, + }} + RT_ENUM! { enum ChatMessageOperatorKind: i32 { + Unspecified (ChatMessageOperatorKind_Unspecified) = 0, Sms (ChatMessageOperatorKind_Sms) = 1, Mms (ChatMessageOperatorKind_Mms) = 2, Rcs (ChatMessageOperatorKind_Rcs) = 3, + }} + RT_ENUM! { enum ChatMessageChangeType: i32 { + MessageCreated (ChatMessageChangeType_MessageCreated) = 0, MessageModified (ChatMessageChangeType_MessageModified) = 1, MessageDeleted (ChatMessageChangeType_MessageDeleted) = 2, ChangeTrackingLost (ChatMessageChangeType_ChangeTrackingLost) = 3, + }} + RT_ENUM! { enum ChatMessageValidationStatus: i32 { + Valid (ChatMessageValidationStatus_Valid) = 0, NoRecipients (ChatMessageValidationStatus_NoRecipients) = 1, InvalidData (ChatMessageValidationStatus_InvalidData) = 2, MessageTooLarge (ChatMessageValidationStatus_MessageTooLarge) = 3, TooManyRecipients (ChatMessageValidationStatus_TooManyRecipients) = 4, TransportInactive (ChatMessageValidationStatus_TransportInactive) = 5, TransportNotFound (ChatMessageValidationStatus_TransportNotFound) = 6, TooManyAttachments (ChatMessageValidationStatus_TooManyAttachments) = 7, InvalidRecipients (ChatMessageValidationStatus_InvalidRecipients) = 8, InvalidBody (ChatMessageValidationStatus_InvalidBody) = 9, InvalidOther (ChatMessageValidationStatus_InvalidOther) = 10, ValidWithLargeMessage (ChatMessageValidationStatus_ValidWithLargeMessage) = 11, VoiceRoamingRestriction (ChatMessageValidationStatus_VoiceRoamingRestriction) = 12, DataRoamingRestriction (ChatMessageValidationStatus_DataRoamingRestriction) = 13, + }} + RT_ENUM! { enum ChatConversationThreadingKind: i32 { + Participants (ChatConversationThreadingKind_Participants) = 0, ContactId (ChatConversationThreadingKind_ContactId) = 1, ConversationId (ChatConversationThreadingKind_ConversationId) = 2, Custom (ChatConversationThreadingKind_Custom) = 3, + }} + RT_ENUM! { enum ChatStoreChangedEventKind: i32 { + NotificationsMissed (ChatStoreChangedEventKind_NotificationsMissed) = 0, StoreModified (ChatStoreChangedEventKind_StoreModified) = 1, MessageCreated (ChatStoreChangedEventKind_MessageCreated) = 2, MessageModified (ChatStoreChangedEventKind_MessageModified) = 3, MessageDeleted (ChatStoreChangedEventKind_MessageDeleted) = 4, ConversationModified (ChatStoreChangedEventKind_ConversationModified) = 5, ConversationDeleted (ChatStoreChangedEventKind_ConversationDeleted) = 6, ConversationTransportDeleted (ChatStoreChangedEventKind_ConversationTransportDeleted) = 7, + }} + RT_ENUM! { enum ChatTransportErrorCodeCategory: i32 { + None (ChatTransportErrorCodeCategory_None) = 0, Http (ChatTransportErrorCodeCategory_Http) = 1, Network (ChatTransportErrorCodeCategory_Network) = 2, MmsServer (ChatTransportErrorCodeCategory_MmsServer) = 3, + }} + RT_ENUM! { enum ChatTransportInterpretedErrorCode: i32 { + None (ChatTransportInterpretedErrorCode_None) = 0, Unknown (ChatTransportInterpretedErrorCode_Unknown) = 1, InvalidRecipientAddress (ChatTransportInterpretedErrorCode_InvalidRecipientAddress) = 2, NetworkConnectivity (ChatTransportInterpretedErrorCode_NetworkConnectivity) = 3, ServiceDenied (ChatTransportInterpretedErrorCode_ServiceDenied) = 4, Timeout (ChatTransportInterpretedErrorCode_Timeout) = 5, + }} + RT_ENUM! { enum ChatMessageTransportKind: i32 { + Text (ChatMessageTransportKind_Text) = 0, Untriaged (ChatMessageTransportKind_Untriaged) = 1, Blocked (ChatMessageTransportKind_Blocked) = 2, Custom (ChatMessageTransportKind_Custom) = 3, + }} + RT_ENUM! { enum RcsServiceKind: i32 { + Chat (RcsServiceKind_Chat) = 0, GroupChat (RcsServiceKind_GroupChat) = 1, FileTransfer (RcsServiceKind_FileTransfer) = 2, Capability (RcsServiceKind_Capability) = 3, + }} + RT_ENUM! { enum ChatItemKind: i32 { + Message (ChatItemKind_Message) = 0, Conversation (ChatItemKind_Conversation) = 1, + }} + RT_ENUM! { enum ChatRestoreHistorySpan: i32 { + LastMonth (ChatRestoreHistorySpan_LastMonth) = 0, LastYear (ChatRestoreHistorySpan_LastYear) = 1, AnyTime (ChatRestoreHistorySpan_AnyTime) = 2, + }} + DEFINE_IID!(IID_IChatMessageTransport, 1672076280, 59059, 23706, 95, 133, 212, 121, 37, 185, 189, 24); + RT_INTERFACE!{interface IChatMessageTransport(IChatMessageTransportVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageTransport] { + fn get_IsAppSetAsNotificationProvider(&mut self, out: *mut bool) -> HRESULT, + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn get_TransportFriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TransportId(&mut self, out: *mut HSTRING) -> HRESULT, + fn RequestSetAsNotificationProviderAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IChatMessageTransport { + #[inline] pub unsafe fn get_is_app_set_as_notification_provider(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SInt128)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsAppSetAsNotificationProvider)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_float32(&mut self) -> Result { + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Float32)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_float64(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Float64)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_transport_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransportFriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sfloat(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SFloat)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_transport_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransportId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_float(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Float)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn request_set_as_notification_provider_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestSetAsNotificationProviderAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_duint16(&mut self) -> Result { + } + DEFINE_IID!(IID_IChatMessageTransport2, 2426885666, 55370, 19490, 169, 77, 84, 68, 68, 237, 200, 161); + RT_INTERFACE!{interface IChatMessageTransport2(IChatMessageTransport2Vtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageTransport2] { + fn get_Configuration(&mut self, out: *mut *mut ChatMessageTransportConfiguration) -> HRESULT, + fn get_TransportKind(&mut self, out: *mut ChatMessageTransportKind) -> HRESULT + }} + impl IChatMessageTransport2 { + #[inline] pub unsafe fn get_configuration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Configuration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transport_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DUInt16)(self, &mut out); + let hr = ((*self.lpVtbl).get_TransportKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_utf8(&mut self) -> Result { + } + RT_CLASS!{class ChatMessageTransportConfiguration: IChatMessageTransportConfiguration} + DEFINE_IID!(IID_IChatMessageTransportConfiguration, 2275407653, 6664, 19146, 160, 117, 51, 85, 18, 99, 18, 230); + RT_INTERFACE!{interface IChatMessageTransportConfiguration(IChatMessageTransportConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageTransportConfiguration] { + fn get_MaxAttachmentCount(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxMessageSizeInKilobytes(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxRecipientCount(&mut self, out: *mut i32) -> HRESULT, + #[cfg(not(feature="windows.media"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.media")] fn get_SupportedVideoFormat(&mut self, out: *mut *mut super::super::media::mediaproperties::MediaEncodingProfile) -> HRESULT, + fn get_ExtendedProperties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + }} + impl IChatMessageTransportConfiguration { + #[inline] pub unsafe fn get_max_attachment_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Utf8)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxAttachmentCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_utf16(&mut self) -> Result { + #[inline] pub unsafe fn get_max_message_size_in_kilobytes(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Utf16)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxMessageSizeInKilobytes)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_struct(&mut self) -> Result { + #[inline] pub unsafe fn get_max_recipient_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Struct)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxRecipientCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_supported_video_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedVideoFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } } - DEFINE_IID!(IID_IGattPresentationFormat, 426573857, 64173, 17884, 174, 91, 42, 195, 24, 78, 132, 219); - RT_INTERFACE!{interface IGattPresentationFormat(IGattPresentationFormatVtbl): IInspectable(IInspectableVtbl) [IID_IGattPresentationFormat] { - fn get_FormatType(&mut self, out: *mut u8) -> HRESULT, - fn get_Exponent(&mut self, out: *mut i32) -> HRESULT, - fn get_Unit(&mut self, out: *mut u16) -> HRESULT, - fn get_Namespace(&mut self, out: *mut u8) -> HRESULT, - fn get_Description(&mut self, out: *mut u16) -> HRESULT + DEFINE_IID!(IID_IChatMessageChange, 471384917, 16926, 21688, 109, 56, 107, 58, 108, 130, 252, 204); + RT_INTERFACE!{interface IChatMessageChange(IChatMessageChangeVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageChange] { + fn get_ChangeType(&mut self, out: *mut ChatMessageChangeType) -> HRESULT, + fn get_Message(&mut self, out: *mut *mut ChatMessage) -> HRESULT }} - impl IGattPresentationFormat { - #[inline] pub unsafe fn get_format_type(&mut self) -> Result { + impl IChatMessageChange { + #[inline] pub unsafe fn get_change_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_FormatType)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChangeType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_exponent(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Exponent)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_unit(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Unit)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class ChatMessage: IChatMessage} + DEFINE_IID!(IID_IChatMessageChangeReader, 338063392, 10446, 24358, 123, 5, 154, 92, 124, 206, 135, 202); + RT_INTERFACE!{interface IChatMessageChangeReader(IChatMessageChangeReaderVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageChangeReader] { + fn AcceptChanges(&mut self) -> HRESULT, + fn AcceptChangesThrough(&mut self, lastChangeToAcknowledge: *mut ChatMessageChange) -> HRESULT, + fn ReadBatchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IChatMessageChangeReader { + #[inline] pub unsafe fn accept_changes(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).AcceptChanges)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_namespace(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Namespace)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn accept_changes_through(&mut self, lastChangeToAcknowledge: &ChatMessageChange) -> Result<()> { + let hr = ((*self.lpVtbl).AcceptChangesThrough)(self, lastChangeToAcknowledge as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_description(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Description)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGattValueChangedEventArgs, 3525040980, 1763, 20184, 162, 99, 172, 250, 200, 186, 115, 19); - RT_INTERFACE!{interface IGattValueChangedEventArgs(IGattValueChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGattValueChangedEventArgs] { - #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_CharacteristicValue(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - fn get_Timestamp(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + RT_CLASS!{class ChatMessageChange: IChatMessageChange} + DEFINE_IID!(IID_IChatMessageChangeTracker, 1622667366, 28832, 21028, 80, 140, 36, 46, 247, 193, 208, 111); + RT_INTERFACE!{interface IChatMessageChangeTracker(IChatMessageChangeTrackerVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageChangeTracker] { + fn Enable(&mut self) -> HRESULT, + fn GetChangeReader(&mut self, out: *mut *mut ChatMessageChangeReader) -> HRESULT, + fn Reset(&mut self) -> HRESULT }} - impl IGattValueChangedEventArgs { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_characteristic_value(&mut self) -> Result> { + impl IChatMessageChangeTracker { + #[inline] pub unsafe fn enable(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Enable)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_change_reader(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CharacteristicValue)(self, &mut out); + let hr = ((*self.lpVtbl).GetChangeReader)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn reset(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Reset)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IGattServiceUuidsStatics, 1841655896, 39610, 17431, 184, 242, 220, 224, 22, 211, 78, 226); - RT_INTERFACE!{static interface IGattServiceUuidsStatics(IGattServiceUuidsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattServiceUuidsStatics] { - fn get_Battery(&mut self, out: *mut Guid) -> HRESULT, - fn get_BloodPressure(&mut self, out: *mut Guid) -> HRESULT, - fn get_CyclingSpeedAndCadence(&mut self, out: *mut Guid) -> HRESULT, - fn get_GenericAccess(&mut self, out: *mut Guid) -> HRESULT, - fn get_GenericAttribute(&mut self, out: *mut Guid) -> HRESULT, - fn get_Glucose(&mut self, out: *mut Guid) -> HRESULT, - fn get_HealthThermometer(&mut self, out: *mut Guid) -> HRESULT, - fn get_HeartRate(&mut self, out: *mut Guid) -> HRESULT, - fn get_RunningSpeedAndCadence(&mut self, out: *mut Guid) -> HRESULT + RT_CLASS!{class ChatMessageChangeReader: IChatMessageChangeReader} + DEFINE_IID!(IID_IChatMessageValidationResult, 636041731, 10476, 22665, 86, 155, 126, 72, 107, 18, 111, 24); + RT_INTERFACE!{interface IChatMessageValidationResult(IChatMessageValidationResultVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageValidationResult] { + fn get_MaxPartCount(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_PartCount(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_RemainingCharacterCountInPart(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Status(&mut self, out: *mut ChatMessageValidationStatus) -> HRESULT }} - impl IGattServiceUuidsStatics { - #[inline] pub unsafe fn get_battery(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Battery)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IChatMessageValidationResult { + #[inline] pub unsafe fn get_max_part_count(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxPartCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_blood_pressure(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BloodPressure)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_part_count(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PartCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling_speed_and_cadence(&mut self) -> Result { + #[inline] pub unsafe fn get_remaining_character_count_in_part(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemainingCharacterCountInPart)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CyclingSpeedAndCadence)(self, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_generic_access(&mut self) -> Result { + } + DEFINE_IID!(IID_IChatMessage, 1262028074, 4418, 20617, 118, 218, 242, 219, 61, 23, 205, 5); + RT_INTERFACE!{interface IChatMessage(IChatMessageVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessage] { + fn get_Attachments(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Body(&mut self, value: HSTRING) -> HRESULT, + fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsForwardingDisabled(&mut self, out: *mut bool) -> HRESULT, + fn get_IsIncoming(&mut self, out: *mut bool) -> HRESULT, + fn get_IsRead(&mut self, out: *mut bool) -> HRESULT, + fn get_LocalTimestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_NetworkTimestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Recipients(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_RecipientSendStatuses(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_Status(&mut self, out: *mut ChatMessageStatus) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TransportFriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TransportId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_TransportId(&mut self, value: HSTRING) -> HRESULT + }} + impl IChatMessage { + #[inline] pub unsafe fn get_attachments(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Attachments)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_body(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_body(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Body)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_from(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_From)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_forwarding_disabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GenericAccess)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsForwardingDisabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_generic_attribute(&mut self) -> Result { + #[inline] pub unsafe fn get_is_incoming(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GenericAttribute)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsIncoming)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_glucose(&mut self) -> Result { + #[inline] pub unsafe fn get_is_read(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Glucose)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsRead)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_health_thermometer(&mut self) -> Result { + #[inline] pub unsafe fn get_local_timestamp(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HealthThermometer)(self, &mut out); + let hr = ((*self.lpVtbl).get_LocalTimestamp)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_heart_rate(&mut self) -> Result { + #[inline] pub unsafe fn get_network_timestamp(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HeartRate)(self, &mut out); + let hr = ((*self.lpVtbl).get_NetworkTimestamp)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_running_speed_and_cadence(&mut self) -> Result { + #[inline] pub unsafe fn get_recipients(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Recipients)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_recipient_send_statuses(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RecipientSendStatuses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RunningSpeedAndCadence)(self, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn get_subject(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transport_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransportFriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transport_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransportId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_transport_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransportId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - DEFINE_IID!(IID_IGattServiceUuidsStatics2, 3534656757, 15637, 20345, 156, 12, 234, 175, 166, 117, 21, 92); - RT_INTERFACE!{static interface IGattServiceUuidsStatics2(IGattServiceUuidsStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattServiceUuidsStatics2] { - fn get_AlertNotification(&mut self, out: *mut Guid) -> HRESULT, - fn get_CurrentTime(&mut self, out: *mut Guid) -> HRESULT, - fn get_CyclingPower(&mut self, out: *mut Guid) -> HRESULT, - fn get_DeviceInformation(&mut self, out: *mut Guid) -> HRESULT, - fn get_HumanInterfaceDevice(&mut self, out: *mut Guid) -> HRESULT, - fn get_ImmediateAlert(&mut self, out: *mut Guid) -> HRESULT, - fn get_LinkLoss(&mut self, out: *mut Guid) -> HRESULT, - fn get_LocationAndNavigation(&mut self, out: *mut Guid) -> HRESULT, - fn get_NextDstChange(&mut self, out: *mut Guid) -> HRESULT, - fn get_PhoneAlertStatus(&mut self, out: *mut Guid) -> HRESULT, - fn get_ReferenceTimeUpdate(&mut self, out: *mut Guid) -> HRESULT, - fn get_ScanParameters(&mut self, out: *mut Guid) -> HRESULT, - fn get_TxPower(&mut self, out: *mut Guid) -> HRESULT + RT_CLASS!{class ChatMessageAttachment: IChatMessageAttachment [IChatMessageAttachmentFactory] [CLSID_ChatMessageAttachment]} + DEFINE_CLSID!(CLSID_ChatMessageAttachment = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,104,97,116,46,67,104,97,116,77,101,115,115,97,103,101,65,116,116,97,99,104,109,101,110,116,0]); + RT_CLASS!{class ChatConversationThreadingInfo: IChatConversationThreadingInfo} + RT_CLASS!{class ChatRecipientDeliveryInfo: IChatRecipientDeliveryInfo} + DEFINE_IID!(IID_IChatMessage3, 1961570224, 15271, 17823, 142, 11, 232, 175, 15, 235, 217, 173); + RT_INTERFACE!{interface IChatMessage3(IChatMessage3Vtbl): IInspectable(IInspectableVtbl) [IID_IChatMessage3] { + fn get_RemoteId(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IGattServiceUuidsStatics2 { - #[inline] pub unsafe fn get_alert_notification(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AlertNotification)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IChatMessage3 { + #[inline] pub unsafe fn get_remote_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_current_time(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CurrentTime)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IChatMessage2, 2254865202, 21567, 18933, 172, 113, 108, 42, 252, 101, 101, 253); + RT_INTERFACE!{interface IChatMessage2(IChatMessage2Vtbl): IInspectable(IInspectableVtbl) [IID_IChatMessage2] { + fn get_EstimatedDownloadSize(&mut self, out: *mut u64) -> HRESULT, + fn put_EstimatedDownloadSize(&mut self, value: u64) -> HRESULT, + fn put_From(&mut self, value: HSTRING) -> HRESULT, + fn get_IsAutoReply(&mut self, out: *mut bool) -> HRESULT, + fn put_IsAutoReply(&mut self, value: bool) -> HRESULT, + fn put_IsForwardingDisabled(&mut self, value: bool) -> HRESULT, + fn get_IsReplyDisabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsIncoming(&mut self, value: bool) -> HRESULT, + fn put_IsRead(&mut self, value: bool) -> HRESULT, + fn get_IsSeen(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSeen(&mut self, value: bool) -> HRESULT, + fn get_IsSimMessage(&mut self, out: *mut bool) -> HRESULT, + fn put_LocalTimestamp(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_MessageKind(&mut self, out: *mut ChatMessageKind) -> HRESULT, + fn put_MessageKind(&mut self, value: ChatMessageKind) -> HRESULT, + fn get_MessageOperatorKind(&mut self, out: *mut ChatMessageOperatorKind) -> HRESULT, + fn put_MessageOperatorKind(&mut self, value: ChatMessageOperatorKind) -> HRESULT, + fn put_NetworkTimestamp(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_IsReceivedDuringQuietHours(&mut self, out: *mut bool) -> HRESULT, + fn put_IsReceivedDuringQuietHours(&mut self, value: bool) -> HRESULT, + fn put_RemoteId(&mut self, value: HSTRING) -> HRESULT, + fn put_Status(&mut self, value: ChatMessageStatus) -> HRESULT, + fn put_Subject(&mut self, value: HSTRING) -> HRESULT, + fn get_ShouldSuppressNotification(&mut self, out: *mut bool) -> HRESULT, + fn put_ShouldSuppressNotification(&mut self, value: bool) -> HRESULT, + fn get_ThreadingInfo(&mut self, out: *mut *mut ChatConversationThreadingInfo) -> HRESULT, + fn put_ThreadingInfo(&mut self, value: *mut ChatConversationThreadingInfo) -> HRESULT, + fn get_RecipientsDeliveryInfos(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IChatMessage2 { + #[inline] pub unsafe fn get_estimated_download_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EstimatedDownloadSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_estimated_download_size(&mut self, value: u64) -> Result<()> { + let hr = ((*self.lpVtbl).put_EstimatedDownloadSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling_power(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CyclingPower)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_from(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_From)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_device_information(&mut self) -> Result { + #[inline] pub unsafe fn get_is_auto_reply(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsAutoReply)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_human_interface_device(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HumanInterfaceDevice)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_is_auto_reply(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsAutoReply)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_immediate_alert(&mut self) -> Result { + #[inline] pub unsafe fn set_is_forwarding_disabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsForwardingDisabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_reply_disabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ImmediateAlert)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsReplyDisabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_link_loss(&mut self) -> Result { + #[inline] pub unsafe fn set_is_incoming(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsIncoming)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_read(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsRead)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_seen(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LinkLoss)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsSeen)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_location_and_navigation(&mut self) -> Result { + #[inline] pub unsafe fn set_is_seen(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSeen)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_sim_message(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LocationAndNavigation)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsSimMessage)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_next_dst_change(&mut self) -> Result { + #[inline] pub unsafe fn set_local_timestamp(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_LocalTimestamp)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_message_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_NextDstChange)(self, &mut out); + let hr = ((*self.lpVtbl).get_MessageKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_phone_alert_status(&mut self) -> Result { + #[inline] pub unsafe fn set_message_kind(&mut self, value: ChatMessageKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_MessageKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_message_operator_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PhoneAlertStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_MessageOperatorKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_reference_time_update(&mut self) -> Result { + #[inline] pub unsafe fn set_message_operator_kind(&mut self, value: ChatMessageOperatorKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_MessageOperatorKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_network_timestamp(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_NetworkTimestamp)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_received_during_quiet_hours(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReferenceTimeUpdate)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsReceivedDuringQuietHours)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_scan_parameters(&mut self) -> Result { + #[inline] pub unsafe fn set_is_received_during_quiet_hours(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsReceivedDuringQuietHours)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_remote_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_status(&mut self, value: ChatMessageStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_Status)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_subject(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Subject)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_should_suppress_notification(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ScanParameters)(self, &mut out); + let hr = ((*self.lpVtbl).get_ShouldSuppressNotification)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_tx_power(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TxPower)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_should_suppress_notification(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShouldSuppressNotification)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_threading_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ThreadingInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_threading_info(&mut self, value: &ChatConversationThreadingInfo) -> Result<()> { + let hr = ((*self.lpVtbl).put_ThreadingInfo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_recipients_delivery_infos(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RecipientsDeliveryInfos)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGattCharacteristicUuidsStatics, 1492796806, 45534, 18188, 183, 222, 13, 17, 255, 68, 244, 183); - RT_INTERFACE!{static interface IGattCharacteristicUuidsStatics(IGattCharacteristicUuidsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicUuidsStatics] { - fn get_BatteryLevel(&mut self, out: *mut Guid) -> HRESULT, - fn get_BloodPressureFeature(&mut self, out: *mut Guid) -> HRESULT, - fn get_BloodPressureMeasurement(&mut self, out: *mut Guid) -> HRESULT, - fn get_BodySensorLocation(&mut self, out: *mut Guid) -> HRESULT, - fn get_CscFeature(&mut self, out: *mut Guid) -> HRESULT, - fn get_CscMeasurement(&mut self, out: *mut Guid) -> HRESULT, - fn get_GlucoseFeature(&mut self, out: *mut Guid) -> HRESULT, - fn get_GlucoseMeasurement(&mut self, out: *mut Guid) -> HRESULT, - fn get_GlucoseMeasurementContext(&mut self, out: *mut Guid) -> HRESULT, - fn get_HeartRateControlPoint(&mut self, out: *mut Guid) -> HRESULT, - fn get_HeartRateMeasurement(&mut self, out: *mut Guid) -> HRESULT, - fn get_IntermediateCuffPressure(&mut self, out: *mut Guid) -> HRESULT, - fn get_IntermediateTemperature(&mut self, out: *mut Guid) -> HRESULT, - fn get_MeasurementInterval(&mut self, out: *mut Guid) -> HRESULT, - fn get_RecordAccessControlPoint(&mut self, out: *mut Guid) -> HRESULT, - fn get_RscFeature(&mut self, out: *mut Guid) -> HRESULT, - fn get_RscMeasurement(&mut self, out: *mut Guid) -> HRESULT, - fn get_SCControlPoint(&mut self, out: *mut Guid) -> HRESULT, - fn get_SensorLocation(&mut self, out: *mut Guid) -> HRESULT, - fn get_TemperatureMeasurement(&mut self, out: *mut Guid) -> HRESULT, - fn get_TemperatureType(&mut self, out: *mut Guid) -> HRESULT + DEFINE_IID!(IID_IChatMessage4, 756304655, 53951, 17932, 170, 104, 109, 63, 132, 131, 201, 191); + RT_INTERFACE!{interface IChatMessage4(IChatMessage4Vtbl): IInspectable(IInspectableVtbl) [IID_IChatMessage4] { + fn get_SyncId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SyncId(&mut self, value: HSTRING) -> HRESULT }} - impl IGattCharacteristicUuidsStatics { - #[inline] pub unsafe fn get_battery_level(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BatteryLevel)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IChatMessage4 { + #[inline] pub unsafe fn get_sync_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SyncId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_blood_pressure_feature(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BloodPressureFeature)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_sync_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SyncId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_blood_pressure_measurement(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BloodPressureMeasurement)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IChatQueryOptions, 802383014, 48950, 17143, 183, 231, 146, 60, 10, 171, 254, 22); + RT_INTERFACE!{interface IChatQueryOptions(IChatQueryOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IChatQueryOptions] { + fn get_SearchString(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SearchString(&mut self, value: HSTRING) -> HRESULT + }} + impl IChatQueryOptions { + #[inline] pub unsafe fn get_search_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SearchString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_body_sensor_location(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BodySensorLocation)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_search_string(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SearchString)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_csc_feature(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CscFeature)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IChatMessageStore, 838008065, 52470, 22539, 73, 118, 10, 7, 221, 93, 59, 71); + RT_INTERFACE!{interface IChatMessageStore(IChatMessageStoreVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageStore] { + fn get_ChangeTracker(&mut self, out: *mut *mut ChatMessageChangeTracker) -> HRESULT, + fn DeleteMessageAsync(&mut self, localMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DownloadMessageAsync(&mut self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetMessageAsync(&mut self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetMessageReader1(&mut self, out: *mut *mut ChatMessageReader) -> HRESULT, + fn GetMessageReader2(&mut self, recentTimeLimit: super::super::foundation::TimeSpan, out: *mut *mut ChatMessageReader) -> HRESULT, + fn MarkMessageReadAsync(&mut self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RetrySendMessageAsync(&mut self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SendMessageAsync(&mut self, chatMessage: *mut ChatMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ValidateMessage(&mut self, chatMessage: *mut ChatMessage, out: *mut *mut ChatMessageValidationResult) -> HRESULT, + fn add_MessageChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageChanged(&mut self, value: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IChatMessageStore { + #[inline] pub unsafe fn get_change_tracker(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChangeTracker)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_csc_measurement(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CscMeasurement)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn delete_message_async(&mut self, localMessageId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteMessageAsync)(self, localMessageId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_glucose_feature(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GlucoseFeature)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn download_message_async(&mut self, localChatMessageId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DownloadMessageAsync)(self, localChatMessageId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_glucose_measurement(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GlucoseMeasurement)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_message_async(&mut self, localChatMessageId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageAsync)(self, localChatMessageId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_glucose_measurement_context(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GlucoseMeasurementContext)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_message_reader1(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageReader1)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_heart_rate_control_point(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HeartRateControlPoint)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_message_reader2(&mut self, recentTimeLimit: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageReader2)(self, recentTimeLimit, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_heart_rate_measurement(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HeartRateMeasurement)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn mark_message_read_async(&mut self, localChatMessageId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MarkMessageReadAsync)(self, localChatMessageId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_intermediate_cuff_pressure(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IntermediateCuffPressure)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn retry_send_message_async(&mut self, localChatMessageId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RetrySendMessageAsync)(self, localChatMessageId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_intermediate_temperature(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IntermediateTemperature)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn send_message_async(&mut self, chatMessage: &ChatMessage) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendMessageAsync)(self, chatMessage as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_measurement_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MeasurementInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn validate_message(&mut self, chatMessage: &ChatMessage) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ValidateMessage)(self, chatMessage as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_record_access_control_point(&mut self) -> Result { + #[inline] pub unsafe fn add_message_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RecordAccessControlPoint)(self, &mut out); + let hr = ((*self.lpVtbl).add_MessageChanged)(self, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_rsc_feature(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RscFeature)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_message_changed(&mut self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MessageChanged)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_rsc_measurement(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RscMeasurement)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class ChatMessageChangeTracker: IChatMessageChangeTracker} + RT_CLASS!{class ChatMessageReader: IChatMessageReader} + RT_CLASS!{class ChatMessageValidationResult: IChatMessageValidationResult} + RT_CLASS!{class ChatMessageStore: IChatMessageStore} + RT_CLASS!{class ChatMessageChangedEventArgs: IChatMessageChangedEventArgs} + DEFINE_IID!(IID_IChatMessageStore2, 2907555054, 15060, 18715, 179, 17, 171, 223, 155, 178, 39, 104); + RT_INTERFACE!{interface IChatMessageStore2(IChatMessageStore2Vtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageStore2] { + fn ForwardMessageAsync(&mut self, localChatMessageId: HSTRING, addresses: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetConversationAsync(&mut self, conversationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetConversationForTransportsAsync(&mut self, conversationId: HSTRING, transportIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetConversationFromThreadingInfoAsync(&mut self, threadingInfo: *mut ChatConversationThreadingInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetConversationReader(&mut self, out: *mut *mut ChatConversationReader) -> HRESULT, + fn GetConversationForTransportsReader(&mut self, transportIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut ChatConversationReader) -> HRESULT, + fn GetMessageByRemoteIdAsync(&mut self, transportId: HSTRING, remoteId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetUnseenCountAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetUnseenCountForTransportsReaderAsync(&mut self, transportIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn MarkAsSeenAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn MarkAsSeenForTransportsAsync(&mut self, transportIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetSearchReader(&mut self, value: *mut ChatQueryOptions, out: *mut *mut ChatSearchReader) -> HRESULT, + fn SaveMessageAsync(&mut self, chatMessage: *mut ChatMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn TryCancelDownloadMessageAsync(&mut self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryCancelSendMessageAsync(&mut self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_StoreChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StoreChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IChatMessageStore2 { + #[inline] pub unsafe fn forward_message_async(&mut self, localChatMessageId: &HStringArg, addresses: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ForwardMessageAsync)(self, localChatMessageId.get(), addresses as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sccontrol_point(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SCControlPoint)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_conversation_async(&mut self, conversationId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConversationAsync)(self, conversationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sensor_location(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SensorLocation)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_conversation_for_transports_async(&mut self, conversationId: &HStringArg, transportIds: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConversationForTransportsAsync)(self, conversationId.get(), transportIds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_temperature_measurement(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TemperatureMeasurement)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_conversation_from_threading_info_async(&mut self, threadingInfo: &ChatConversationThreadingInfo) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConversationFromThreadingInfoAsync)(self, threadingInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_temperature_type(&mut self) -> Result { + #[inline] pub unsafe fn get_conversation_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConversationReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_conversation_for_transports_reader(&mut self, transportIds: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConversationForTransportsReader)(self, transportIds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_message_by_remote_id_async(&mut self, transportId: &HStringArg, remoteId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageByRemoteIdAsync)(self, transportId.get(), remoteId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_unseen_count_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetUnseenCountAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_unseen_count_for_transports_reader_async(&mut self, transportIds: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetUnseenCountForTransportsReaderAsync)(self, transportIds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn mark_as_seen_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MarkAsSeenAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn mark_as_seen_for_transports_async(&mut self, transportIds: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MarkAsSeenForTransportsAsync)(self, transportIds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_search_reader(&mut self, value: &ChatQueryOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSearchReader)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn save_message_async(&mut self, chatMessage: &ChatMessage) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveMessageAsync)(self, chatMessage as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_cancel_download_message_async(&mut self, localChatMessageId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryCancelDownloadMessageAsync)(self, localChatMessageId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_cancel_send_message_async(&mut self, localChatMessageId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryCancelSendMessageAsync)(self, localChatMessageId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_store_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TemperatureType)(self, &mut out); + let hr = ((*self.lpVtbl).add_StoreChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn remove_store_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StoreChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - DEFINE_IID!(IID_IGattCharacteristicUuidsStatics2, 408269861, 54382, 18988, 156, 63, 237, 109, 234, 41, 231, 190); - RT_INTERFACE!{static interface IGattCharacteristicUuidsStatics2(IGattCharacteristicUuidsStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicUuidsStatics2] { - fn get_AlertCategoryId(&mut self, out: *mut Guid) -> HRESULT, - fn get_AlertCategoryIdBitMask(&mut self, out: *mut Guid) -> HRESULT, - fn get_AlertLevel(&mut self, out: *mut Guid) -> HRESULT, - fn get_AlertNotificationControlPoint(&mut self, out: *mut Guid) -> HRESULT, - fn get_AlertStatus(&mut self, out: *mut Guid) -> HRESULT, - fn get_GapAppearance(&mut self, out: *mut Guid) -> HRESULT, - fn get_BootKeyboardInputReport(&mut self, out: *mut Guid) -> HRESULT, - fn get_BootKeyboardOutputReport(&mut self, out: *mut Guid) -> HRESULT, - fn get_BootMouseInputReport(&mut self, out: *mut Guid) -> HRESULT, - fn get_CurrentTime(&mut self, out: *mut Guid) -> HRESULT, - fn get_CyclingPowerControlPoint(&mut self, out: *mut Guid) -> HRESULT, - fn get_CyclingPowerFeature(&mut self, out: *mut Guid) -> HRESULT, - fn get_CyclingPowerMeasurement(&mut self, out: *mut Guid) -> HRESULT, - fn get_CyclingPowerVector(&mut self, out: *mut Guid) -> HRESULT, - fn get_DateTime(&mut self, out: *mut Guid) -> HRESULT, - fn get_DayDateTime(&mut self, out: *mut Guid) -> HRESULT, - fn get_DayOfWeek(&mut self, out: *mut Guid) -> HRESULT, - fn get_GapDeviceName(&mut self, out: *mut Guid) -> HRESULT, - fn get_DstOffset(&mut self, out: *mut Guid) -> HRESULT, - fn get_ExactTime256(&mut self, out: *mut Guid) -> HRESULT, - fn get_FirmwareRevisionString(&mut self, out: *mut Guid) -> HRESULT, - fn get_HardwareRevisionString(&mut self, out: *mut Guid) -> HRESULT, - fn get_HidControlPoint(&mut self, out: *mut Guid) -> HRESULT, - fn get_HidInformation(&mut self, out: *mut Guid) -> HRESULT, - fn get_Ieee1107320601RegulatoryCertificationDataList(&mut self, out: *mut Guid) -> HRESULT, - fn get_LnControlPoint(&mut self, out: *mut Guid) -> HRESULT, - fn get_LnFeature(&mut self, out: *mut Guid) -> HRESULT, - fn get_LocalTimeInformation(&mut self, out: *mut Guid) -> HRESULT, - fn get_LocationAndSpeed(&mut self, out: *mut Guid) -> HRESULT, - fn get_ManufacturerNameString(&mut self, out: *mut Guid) -> HRESULT, - fn get_ModelNumberString(&mut self, out: *mut Guid) -> HRESULT, - fn get_Navigation(&mut self, out: *mut Guid) -> HRESULT, - fn get_NewAlert(&mut self, out: *mut Guid) -> HRESULT, - fn get_GapPeripheralPreferredConnectionParameters(&mut self, out: *mut Guid) -> HRESULT, - fn get_GapPeripheralPrivacyFlag(&mut self, out: *mut Guid) -> HRESULT, - fn get_PnpId(&mut self, out: *mut Guid) -> HRESULT, - fn get_PositionQuality(&mut self, out: *mut Guid) -> HRESULT, - fn get_ProtocolMode(&mut self, out: *mut Guid) -> HRESULT, - fn get_GapReconnectionAddress(&mut self, out: *mut Guid) -> HRESULT, - fn get_ReferenceTimeInformation(&mut self, out: *mut Guid) -> HRESULT, - fn get_Report(&mut self, out: *mut Guid) -> HRESULT, - fn get_ReportMap(&mut self, out: *mut Guid) -> HRESULT, - fn get_RingerControlPoint(&mut self, out: *mut Guid) -> HRESULT, - fn get_RingerSetting(&mut self, out: *mut Guid) -> HRESULT, - fn get_ScanIntervalWindow(&mut self, out: *mut Guid) -> HRESULT, - fn get_ScanRefresh(&mut self, out: *mut Guid) -> HRESULT, - fn get_SerialNumberString(&mut self, out: *mut Guid) -> HRESULT, - fn get_GattServiceChanged(&mut self, out: *mut Guid) -> HRESULT, - fn get_SoftwareRevisionString(&mut self, out: *mut Guid) -> HRESULT, - fn get_SupportedNewAlertCategory(&mut self, out: *mut Guid) -> HRESULT, - fn get_SupportUnreadAlertCategory(&mut self, out: *mut Guid) -> HRESULT, - fn get_SystemId(&mut self, out: *mut Guid) -> HRESULT, - fn get_TimeAccuracy(&mut self, out: *mut Guid) -> HRESULT, - fn get_TimeSource(&mut self, out: *mut Guid) -> HRESULT, - fn get_TimeUpdateControlPoint(&mut self, out: *mut Guid) -> HRESULT, - fn get_TimeUpdateState(&mut self, out: *mut Guid) -> HRESULT, - fn get_TimeWithDst(&mut self, out: *mut Guid) -> HRESULT, - fn get_TimeZone(&mut self, out: *mut Guid) -> HRESULT, - fn get_TxPowerLevel(&mut self, out: *mut Guid) -> HRESULT, - fn get_UnreadAlertStatus(&mut self, out: *mut Guid) -> HRESULT + RT_CLASS!{class ChatConversation: IChatConversation} + RT_CLASS!{class ChatConversationReader: IChatConversationReader} + RT_CLASS!{class ChatQueryOptions: IChatQueryOptions} + RT_CLASS!{class ChatSearchReader: IChatSearchReader} + RT_CLASS!{class ChatMessageStoreChangedEventArgs: IChatMessageStoreChangedEventArgs} + DEFINE_IID!(IID_IChatMessageStore3, 2598091529, 17221, 20161, 139, 116, 183, 51, 130, 67, 113, 156); + RT_INTERFACE!{interface IChatMessageStore3(IChatMessageStore3Vtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageStore3] { + fn GetMessageBySyncIdAsync(&mut self, syncId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IGattCharacteristicUuidsStatics2 { - #[inline] pub unsafe fn get_alert_category_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AlertCategoryId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IChatMessageStore3 { + #[inline] pub unsafe fn get_message_by_sync_id_async(&mut self, syncId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageBySyncIdAsync)(self, syncId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_alert_category_id_bit_mask(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AlertCategoryIdBitMask)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IChatMessageStoreChangedEventArgs, 1707503532, 65164, 18132, 145, 25, 87, 184, 65, 3, 17, 213); + RT_INTERFACE!{interface IChatMessageStoreChangedEventArgs(IChatMessageStoreChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageStoreChangedEventArgs] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Kind(&mut self, out: *mut ChatStoreChangedEventKind) -> HRESULT + }} + impl IChatMessageStoreChangedEventArgs { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_alert_level(&mut self) -> Result { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AlertLevel)(self, &mut out); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_alert_notification_control_point(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AlertNotificationControlPoint)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IChatMessageChangedEventArgs, 3065462317, 26908, 20191, 134, 96, 110, 185, 137, 104, 146, 227); + RT_INTERFACE!{interface IChatMessageChangedEventArgs(IChatMessageChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageChangedEventArgs] { + fn GetDeferral(&mut self, out: *mut *mut ChatMessageChangedDeferral) -> HRESULT + }} + impl IChatMessageChangedEventArgs { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_alert_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AlertStatus)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class ChatMessageChangedDeferral: IChatMessageChangedDeferral} + DEFINE_IID!(IID_IChatMessageChangedDeferral, 4224103180, 30860, 19916, 172, 231, 98, 130, 56, 41, 104, 207); + RT_INTERFACE!{interface IChatMessageChangedDeferral(IChatMessageChangedDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageChangedDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IChatMessageChangedDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_gap_appearance(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GapAppearance)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IChatMessageBlockingStatic, 4139361152, 52714, 4580, 136, 48, 8, 0, 32, 12, 154, 102); + RT_INTERFACE!{static interface IChatMessageBlockingStatic(IChatMessageBlockingStaticVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageBlockingStatic] { + fn MarkMessageAsBlockedAsync(&mut self, localChatMessageId: HSTRING, blocked: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IChatMessageBlockingStatic { + #[inline] pub unsafe fn mark_message_as_blocked_async(&mut self, localChatMessageId: &HStringArg, blocked: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MarkMessageAsBlockedAsync)(self, localChatMessageId.get(), blocked, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_boot_keyboard_input_report(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BootKeyboardInputReport)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IChatMessageManagerStatic, 4049363191, 54760, 24210, 85, 109, 224, 59, 96, 37, 49, 4); + RT_INTERFACE!{static interface IChatMessageManagerStatic(IChatMessageManagerStaticVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageManagerStatic] { + fn GetTransportsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn RequestStoreAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowComposeSmsMessageAsync(&mut self, message: *mut ChatMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowSmsSettings(&mut self) -> HRESULT + }} + impl IChatMessageManagerStatic { + #[inline] pub unsafe fn get_transports_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTransportsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_boot_keyboard_output_report(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BootKeyboardOutputReport)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn request_store_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_boot_mouse_input_report(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BootMouseInputReport)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn show_compose_sms_message_async(&mut self, message: &ChatMessage) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowComposeSmsMessageAsync)(self, message as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_current_time(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CurrentTime)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn show_sms_settings(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ShowSmsSettings)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling_power_control_point(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CyclingPowerControlPoint)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class ChatMessageTransport: IChatMessageTransport} + DEFINE_IID!(IID_IChatMessageManager2Statics, 491075855, 40783, 20021, 150, 78, 27, 156, 166, 26, 192, 68); + RT_INTERFACE!{static interface IChatMessageManager2Statics(IChatMessageManager2StaticsVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageManager2Statics] { + fn RegisterTransportAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetTransportAsync(&mut self, transportId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IChatMessageManager2Statics { + #[inline] pub unsafe fn register_transport_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RegisterTransportAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling_power_feature(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CyclingPowerFeature)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_transport_async(&mut self, transportId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTransportAsync)(self, transportId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling_power_measurement(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CyclingPowerMeasurement)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IChatMessageManagerStatics3, 546013965, 26453, 18636, 154, 179, 253, 3, 196, 99, 252, 146); + RT_INTERFACE!{static interface IChatMessageManagerStatics3(IChatMessageManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageManagerStatics3] { + fn RequestSyncManagerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IChatMessageManagerStatics3 { + #[inline] pub unsafe fn request_sync_manager_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestSyncManagerAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_cycling_power_vector(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CyclingPowerVector)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class ChatSyncManager: IChatSyncManager} + DEFINE_IID!(IID_IChatMessageReader, 3068819662, 17545, 22265, 118, 170, 226, 4, 104, 37, 20, 207); + RT_INTERFACE!{interface IChatMessageReader(IChatMessageReaderVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageReader] { + fn ReadBatchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IChatMessageReader { + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_date_time(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DateTime)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IChatMessageReader2, 2305046147, 25787, 18189, 157, 244, 13, 232, 190, 26, 5, 191); + RT_INTERFACE!{interface IChatMessageReader2(IChatMessageReader2Vtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageReader2] { + fn ReadBatchWithCountAsync(&mut self, count: i32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IChatMessageReader2 { + #[inline] pub unsafe fn read_batch_with_count_async(&mut self, count: i32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBatchWithCountAsync)(self, count, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_day_date_time(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DayDateTime)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IChatSearchReader, 1181089353, 36896, 18258, 152, 13, 57, 97, 35, 37, 245, 137); + RT_INTERFACE!{interface IChatSearchReader(IChatSearchReaderVtbl): IInspectable(IInspectableVtbl) [IID_IChatSearchReader] { + fn ReadBatchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn ReadBatchWithCountAsync(&mut self, count: i32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IChatSearchReader { + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_day_of_week(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DayOfWeek)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn read_batch_with_count_async(&mut self, count: i32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBatchWithCountAsync)(self, count, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_gap_device_name(&mut self) -> Result { + } + DEFINE_IID!(IID_IChatItem, 2270285824, 52913, 16963, 184, 3, 21, 212, 90, 29, 212, 40); + RT_INTERFACE!{interface IChatItem(IChatItemVtbl): IInspectable(IInspectableVtbl) [IID_IChatItem] { + fn get_ItemKind(&mut self, out: *mut ChatItemKind) -> HRESULT + }} + impl IChatItem { + #[inline] pub unsafe fn get_item_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GapDeviceName)(self, &mut out); + let hr = ((*self.lpVtbl).get_ItemKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_dst_offset(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DstOffset)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IChatMessageAttachment, 3351575924, 48995, 22763, 80, 140, 139, 134, 63, 241, 107, 103); + RT_INTERFACE!{interface IChatMessageAttachment(IChatMessageAttachmentVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageAttachment] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_DataStreamReference(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_DataStreamReference(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_GroupId(&mut self, out: *mut u32) -> HRESULT, + fn put_GroupId(&mut self, value: u32) -> HRESULT, + fn get_MimeType(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_MimeType(&mut self, value: HSTRING) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Text(&mut self, value: HSTRING) -> HRESULT + }} + impl IChatMessageAttachment { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data_stream_reference(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataStreamReference)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_exact_time256(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ExactTime256)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data_stream_reference(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataStreamReference)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_firmware_revision_string(&mut self) -> Result { + #[inline] pub unsafe fn get_group_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_FirmwareRevisionString)(self, &mut out); + let hr = ((*self.lpVtbl).get_GroupId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_hardware_revision_string(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HardwareRevisionString)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_group_id(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_GroupId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_hid_control_point(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HidControlPoint)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_mime_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MimeType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_hid_information(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HidInformation)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_mime_type(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_MimeType)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_ieee1107320601_regulatory_certification_data_list(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ieee1107320601RegulatoryCertificationDataList)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ln_control_point(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LnControlPoint)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Text)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_ln_feature(&mut self) -> Result { + } + DEFINE_IID!(IID_IChatMessageAttachment2, 1591317104, 32209, 19079, 168, 206, 172, 221, 135, 216, 13, 200); + RT_INTERFACE!{interface IChatMessageAttachment2(IChatMessageAttachment2Vtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageAttachment2] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Thumbnail(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_TransferProgress(&mut self, out: *mut f64) -> HRESULT, + fn put_TransferProgress(&mut self, value: f64) -> HRESULT, + fn get_OriginalFileName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_OriginalFileName(&mut self, value: HSTRING) -> HRESULT + }} + impl IChatMessageAttachment2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_thumbnail(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbnail)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_transfer_progress(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LnFeature)(self, &mut out); + let hr = ((*self.lpVtbl).get_TransferProgress)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_local_time_information(&mut self) -> Result { + #[inline] pub unsafe fn set_transfer_progress(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransferProgress)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_original_file_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OriginalFileName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_original_file_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_OriginalFileName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IChatMessageAttachmentFactory, 542659234, 41814, 23409, 108, 169, 102, 201, 133, 183, 208, 213); + RT_INTERFACE!{static interface IChatMessageAttachmentFactory(IChatMessageAttachmentFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageAttachmentFactory] { + #[cfg(feature="windows.storage")] fn CreateChatMessageAttachment(&mut self, mimeType: HSTRING, dataStreamReference: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut ChatMessageAttachment) -> HRESULT + }} + impl IChatMessageAttachmentFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_chat_message_attachment(&mut self, mimeType: &HStringArg, dataStreamReference: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateChatMessageAttachment)(self, mimeType.get(), dataStreamReference as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IChatMessageNotificationTriggerDetails, 4248063483, 12387, 19991, 133, 134, 198, 192, 130, 98, 230, 192); + RT_INTERFACE!{interface IChatMessageNotificationTriggerDetails(IChatMessageNotificationTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageNotificationTriggerDetails] { + fn get_ChatMessage(&mut self, out: *mut *mut ChatMessage) -> HRESULT + }} + impl IChatMessageNotificationTriggerDetails { + #[inline] pub unsafe fn get_chat_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChatMessage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IChatMessageNotificationTriggerDetails2, 1807033056, 43527, 20433, 148, 113, 119, 147, 79, 183, 94, 230); + RT_INTERFACE!{interface IChatMessageNotificationTriggerDetails2(IChatMessageNotificationTriggerDetails2Vtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageNotificationTriggerDetails2] { + fn get_ShouldDisplayToast(&mut self, out: *mut bool) -> HRESULT, + fn get_ShouldUpdateDetailText(&mut self, out: *mut bool) -> HRESULT, + fn get_ShouldUpdateBadge(&mut self, out: *mut bool) -> HRESULT, + fn get_ShouldUpdateActionCenter(&mut self, out: *mut bool) -> HRESULT + }} + impl IChatMessageNotificationTriggerDetails2 { + #[inline] pub unsafe fn get_should_display_toast(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LocalTimeInformation)(self, &mut out); + let hr = ((*self.lpVtbl).get_ShouldDisplayToast)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_location_and_speed(&mut self) -> Result { + #[inline] pub unsafe fn get_should_update_detail_text(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LocationAndSpeed)(self, &mut out); + let hr = ((*self.lpVtbl).get_ShouldUpdateDetailText)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_manufacturer_name_string(&mut self) -> Result { + #[inline] pub unsafe fn get_should_update_badge(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ManufacturerNameString)(self, &mut out); + let hr = ((*self.lpVtbl).get_ShouldUpdateBadge)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_model_number_string(&mut self) -> Result { + #[inline] pub unsafe fn get_should_update_action_center(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ModelNumberString)(self, &mut out); + let hr = ((*self.lpVtbl).get_ShouldUpdateActionCenter)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_navigation(&mut self) -> Result { + } + DEFINE_IID!(IID_IChatCapabilities, 989820860, 14793, 19921, 173, 45, 57, 100, 221, 157, 64, 63); + RT_INTERFACE!{interface IChatCapabilities(IChatCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IChatCapabilities] { + fn get_IsOnline(&mut self, out: *mut bool) -> HRESULT, + fn get_IsChatCapable(&mut self, out: *mut bool) -> HRESULT, + fn get_IsFileTransferCapable(&mut self, out: *mut bool) -> HRESULT, + fn get_IsGeoLocationPushCapable(&mut self, out: *mut bool) -> HRESULT, + fn get_IsIntegratedMessagingCapable(&mut self, out: *mut bool) -> HRESULT + }} + impl IChatCapabilities { + #[inline] pub unsafe fn get_is_online(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Navigation)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsOnline)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_new_alert(&mut self) -> Result { + #[inline] pub unsafe fn get_is_chat_capable(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_NewAlert)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsChatCapable)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_gap_peripheral_preferred_connection_parameters(&mut self) -> Result { + #[inline] pub unsafe fn get_is_file_transfer_capable(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GapPeripheralPreferredConnectionParameters)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsFileTransferCapable)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_gap_peripheral_privacy_flag(&mut self) -> Result { + #[inline] pub unsafe fn get_is_geo_location_push_capable(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GapPeripheralPrivacyFlag)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsGeoLocationPushCapable)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_pnp_id(&mut self) -> Result { + #[inline] pub unsafe fn get_is_integrated_messaging_capable(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PnpId)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsIntegratedMessagingCapable)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_position_quality(&mut self) -> Result { + } + DEFINE_IID!(IID_IChatCapabilitiesManagerStatics, 3044683568, 28737, 17806, 176, 207, 124, 13, 159, 234, 51, 58); + RT_INTERFACE!{static interface IChatCapabilitiesManagerStatics(IChatCapabilitiesManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IChatCapabilitiesManagerStatics] { + fn GetCachedCapabilitiesAsync(&mut self, address: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetCapabilitiesFromNetworkAsync(&mut self, address: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IChatCapabilitiesManagerStatics { + #[inline] pub unsafe fn get_cached_capabilities_async(&mut self, address: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCachedCapabilitiesAsync)(self, address.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capabilities_from_network_async(&mut self, address: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCapabilitiesFromNetworkAsync)(self, address.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ChatCapabilities: IChatCapabilities} + DEFINE_IID!(IID_IChatRecipientDeliveryInfo, 4291277474, 10300, 19466, 138, 14, 140, 51, 189, 191, 5, 69); + RT_INTERFACE!{interface IChatRecipientDeliveryInfo(IChatRecipientDeliveryInfoVtbl): IInspectable(IInspectableVtbl) [IID_IChatRecipientDeliveryInfo] { + fn get_TransportAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_TransportAddress(&mut self, value: HSTRING) -> HRESULT, + fn get_DeliveryTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_DeliveryTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ReadTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ReadTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_TransportErrorCodeCategory(&mut self, out: *mut ChatTransportErrorCodeCategory) -> HRESULT, + fn get_TransportInterpretedErrorCode(&mut self, out: *mut ChatTransportInterpretedErrorCode) -> HRESULT, + fn get_TransportErrorCode(&mut self, out: *mut i32) -> HRESULT, + fn get_IsErrorPermanent(&mut self, out: *mut bool) -> HRESULT, + fn get_Status(&mut self, out: *mut ChatMessageStatus) -> HRESULT + }} + impl IChatRecipientDeliveryInfo { + #[inline] pub unsafe fn get_transport_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransportAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_transport_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransportAddress)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_delivery_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeliveryTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_delivery_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_DeliveryTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_read_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ReadTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_read_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReadTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_transport_error_code_category(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PositionQuality)(self, &mut out); + let hr = ((*self.lpVtbl).get_TransportErrorCodeCategory)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_protocol_mode(&mut self) -> Result { + #[inline] pub unsafe fn get_transport_interpreted_error_code(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ProtocolMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_TransportInterpretedErrorCode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_gap_reconnection_address(&mut self) -> Result { + #[inline] pub unsafe fn get_transport_error_code(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GapReconnectionAddress)(self, &mut out); + let hr = ((*self.lpVtbl).get_TransportErrorCode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_reference_time_information(&mut self) -> Result { + #[inline] pub unsafe fn get_is_error_permanent(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReferenceTimeInformation)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsErrorPermanent)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_report(&mut self) -> Result { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_report_map(&mut self) -> Result { + } + DEFINE_IID!(IID_IChatConversationThreadingInfo, 857481692, 31239, 17442, 163, 44, 36, 190, 124, 109, 171, 36); + RT_INTERFACE!{interface IChatConversationThreadingInfo(IChatConversationThreadingInfoVtbl): IInspectable(IInspectableVtbl) [IID_IChatConversationThreadingInfo] { + fn get_ContactId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ContactId(&mut self, value: HSTRING) -> HRESULT, + fn get_Custom(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Custom(&mut self, value: HSTRING) -> HRESULT, + fn get_ConversationId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ConversationId(&mut self, value: HSTRING) -> HRESULT, + fn get_Participants(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Kind(&mut self, out: *mut ChatConversationThreadingKind) -> HRESULT, + fn put_Kind(&mut self, value: ChatConversationThreadingKind) -> HRESULT + }} + impl IChatConversationThreadingInfo { + #[inline] pub unsafe fn get_contact_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContactId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_contact_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContactId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Custom)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_custom(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Custom)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_conversation_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConversationId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_conversation_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ConversationId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_participants(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Participants)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportMap)(self, &mut out); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ringer_control_point(&mut self) -> Result { + #[inline] pub unsafe fn set_kind(&mut self, value: ChatConversationThreadingKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_Kind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IChatConversationReader, 89208530, 56882, 19015, 169, 58, 179, 220, 8, 51, 133, 43); + RT_INTERFACE!{interface IChatConversationReader(IChatConversationReaderVtbl): IInspectable(IInspectableVtbl) [IID_IChatConversationReader] { + fn ReadBatchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn ReadBatchWithCountAsync(&mut self, count: i32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IChatConversationReader { + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_batch_with_count_async(&mut self, count: i32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBatchWithCountAsync)(self, count, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IChatConversation, 2777417741, 6767, 18140, 143, 61, 245, 2, 134, 96, 182, 238); + RT_INTERFACE!{interface IChatConversation(IChatConversationVtbl): IInspectable(IInspectableVtbl) [IID_IChatConversation] { + fn get_HasUnreadMessages(&mut self, out: *mut bool) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Subject(&mut self, value: HSTRING) -> HRESULT, + fn get_IsConversationMuted(&mut self, out: *mut bool) -> HRESULT, + fn put_IsConversationMuted(&mut self, value: bool) -> HRESULT, + fn get_MostRecentMessageId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Participants(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ThreadingInfo(&mut self, out: *mut *mut ChatConversationThreadingInfo) -> HRESULT, + fn DeleteAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetMessageReader(&mut self, out: *mut *mut ChatMessageReader) -> HRESULT, + fn MarkAllMessagesAsReadAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn MarkMessagesAsReadAsync(&mut self, value: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SaveAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn NotifyLocalParticipantComposing(&mut self, transportId: HSTRING, participantAddress: HSTRING, isComposing: bool) -> HRESULT, + fn NotifyRemoteParticipantComposing(&mut self, transportId: HSTRING, participantAddress: HSTRING, isComposing: bool) -> HRESULT, + fn add_RemoteParticipantComposingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemoteParticipantComposingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IChatConversation { + #[inline] pub unsafe fn get_has_unread_messages(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasUnreadMessages)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subject(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_subject(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Subject)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_conversation_muted(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RingerControlPoint)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsConversationMuted)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ringer_setting(&mut self) -> Result { + #[inline] pub unsafe fn set_is_conversation_muted(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsConversationMuted)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_most_recent_message_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MostRecentMessageId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_participants(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Participants)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_threading_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ThreadingInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_message_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn mark_all_messages_as_read_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MarkAllMessagesAsReadAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn mark_messages_as_read_async(&mut self, value: super::super::foundation::DateTime) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MarkMessagesAsReadAsync)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn save_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn notify_local_participant_composing(&mut self, transportId: &HStringArg, participantAddress: &HStringArg, isComposing: bool) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyLocalParticipantComposing)(self, transportId.get(), participantAddress.get(), isComposing); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_remote_participant_composing(&mut self, transportId: &HStringArg, participantAddress: &HStringArg, isComposing: bool) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyRemoteParticipantComposing)(self, transportId.get(), participantAddress.get(), isComposing); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_remote_participant_composing_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RingerSetting)(self, &mut out); + let hr = ((*self.lpVtbl).add_RemoteParticipantComposingChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_scan_interval_window(&mut self) -> Result { + #[inline] pub unsafe fn remove_remote_participant_composing_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RemoteParticipantComposingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class RemoteParticipantComposingChangedEventArgs: IRemoteParticipantComposingChangedEventArgs} + DEFINE_IID!(IID_IChatConversation2, 167972049, 38970, 18346, 154, 144, 238, 72, 238, 153, 123, 89); + RT_INTERFACE!{interface IChatConversation2(IChatConversation2Vtbl): IInspectable(IInspectableVtbl) [IID_IChatConversation2] { + fn get_CanModifyParticipants(&mut self, out: *mut bool) -> HRESULT, + fn put_CanModifyParticipants(&mut self, value: bool) -> HRESULT + }} + impl IChatConversation2 { + #[inline] pub unsafe fn get_can_modify_participants(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ScanIntervalWindow)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanModifyParticipants)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_scan_refresh(&mut self) -> Result { + #[inline] pub unsafe fn set_can_modify_participants(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanModifyParticipants)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRemoteParticipantComposingChangedEventArgs, 515917223, 53193, 17865, 152, 118, 68, 159, 43, 193, 128, 245); + RT_INTERFACE!{interface IRemoteParticipantComposingChangedEventArgs(IRemoteParticipantComposingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteParticipantComposingChangedEventArgs] { + fn get_TransportId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ParticipantAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsComposing(&mut self, out: *mut bool) -> HRESULT + }} + impl IRemoteParticipantComposingChangedEventArgs { + #[inline] pub unsafe fn get_transport_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransportId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_participant_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ParticipantAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_composing(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ScanRefresh)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsComposing)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_serial_number_string(&mut self) -> Result { + } + DEFINE_IID!(IID_IChatSyncManager, 2074422371, 9808, 18543, 180, 180, 107, 217, 211, 214, 60, 132); + RT_INTERFACE!{interface IChatSyncManager(IChatSyncManagerVtbl): IInspectable(IInspectableVtbl) [IID_IChatSyncManager] { + fn get_Configuration(&mut self, out: *mut *mut ChatSyncConfiguration) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.security")] fn AssociateAccountAsync(&mut self, webAccount: *mut super::super::security::credentials::WebAccount, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn UnassociateAccountAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.security")] fn IsAccountAssociated(&mut self, webAccount: *mut super::super::security::credentials::WebAccount, out: *mut bool) -> HRESULT, + fn StartSync(&mut self) -> HRESULT, + fn SetConfigurationAsync(&mut self, configuration: *mut ChatSyncConfiguration, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IChatSyncManager { + #[inline] pub unsafe fn get_configuration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Configuration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn associate_account_async(&mut self, webAccount: &super::super::security::credentials::WebAccount) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AssociateAccountAsync)(self, webAccount as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn unassociate_account_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnassociateAccountAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn is_account_associated(&mut self, webAccount: &super::super::security::credentials::WebAccount) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SerialNumberString)(self, &mut out); + let hr = ((*self.lpVtbl).IsAccountAssociated)(self, webAccount as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_gatt_service_changed(&mut self) -> Result { + #[inline] pub unsafe fn start_sync(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).StartSync)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_configuration_async(&mut self, configuration: &ChatSyncConfiguration) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetConfigurationAsync)(self, configuration as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ChatSyncConfiguration: IChatSyncConfiguration} + DEFINE_IID!(IID_IChatSyncConfiguration, 167274930, 27124, 19199, 130, 182, 6, 153, 47, 244, 2, 210); + RT_INTERFACE!{interface IChatSyncConfiguration(IChatSyncConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IChatSyncConfiguration] { + fn get_IsSyncEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSyncEnabled(&mut self, value: bool) -> HRESULT, + fn get_RestoreHistorySpan(&mut self, out: *mut ChatRestoreHistorySpan) -> HRESULT, + fn put_RestoreHistorySpan(&mut self, value: ChatRestoreHistorySpan) -> HRESULT + }} + impl IChatSyncConfiguration { + #[inline] pub unsafe fn get_is_sync_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GattServiceChanged)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsSyncEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_software_revision_string(&mut self) -> Result { + #[inline] pub unsafe fn set_is_sync_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSyncEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_restore_history_span(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SoftwareRevisionString)(self, &mut out); + let hr = ((*self.lpVtbl).get_RestoreHistorySpan)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_new_alert_category(&mut self) -> Result { + #[inline] pub unsafe fn set_restore_history_span(&mut self, value: ChatRestoreHistorySpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_RestoreHistorySpan)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRcsServiceKindSupportedChangedEventArgs, 4101939780, 59267, 18534, 179, 167, 78, 92, 207, 2, 48, 112); + RT_INTERFACE!{interface IRcsServiceKindSupportedChangedEventArgs(IRcsServiceKindSupportedChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRcsServiceKindSupportedChangedEventArgs] { + fn get_ServiceKind(&mut self, out: *mut RcsServiceKind) -> HRESULT + }} + impl IRcsServiceKindSupportedChangedEventArgs { + #[inline] pub unsafe fn get_service_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SupportedNewAlertCategory)(self, &mut out); + let hr = ((*self.lpVtbl).get_ServiceKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_support_unread_alert_category(&mut self) -> Result { + } + DEFINE_IID!(IID_IRcsManagerStatics, 2099710661, 2749, 20273, 155, 153, 165, 158, 113, 167, 183, 49); + RT_INTERFACE!{static interface IRcsManagerStatics(IRcsManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRcsManagerStatics] { + fn GetEndUserMessageManager(&mut self, out: *mut *mut RcsEndUserMessageManager) -> HRESULT, + fn GetTransportsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetTransportAsync(&mut self, transportId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn LeaveConversationAsync(&mut self, conversation: *mut ChatConversation, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IRcsManagerStatics { + #[inline] pub unsafe fn get_end_user_message_manager(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetEndUserMessageManager)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transports_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTransportsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transport_async(&mut self, transportId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTransportAsync)(self, transportId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn leave_conversation_async(&mut self, conversation: &ChatConversation) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LeaveConversationAsync)(self, conversation as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RcsEndUserMessageManager: IRcsEndUserMessageManager} + RT_CLASS!{class RcsTransport: IRcsTransport} + DEFINE_IID!(IID_IRcsTransport, 4272113497, 62332, 17177, 133, 70, 236, 132, 210, 29, 48, 255); + RT_INTERFACE!{interface IRcsTransport(IRcsTransportVtbl): IInspectable(IInspectableVtbl) [IID_IRcsTransport] { + fn get_ExtendedProperties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn get_TransportFriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TransportId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Configuration(&mut self, out: *mut *mut RcsTransportConfiguration) -> HRESULT, + fn IsStoreAndForwardEnabled(&mut self, serviceKind: RcsServiceKind, out: *mut bool) -> HRESULT, + fn IsServiceKindSupported(&mut self, serviceKind: RcsServiceKind, out: *mut bool) -> HRESULT, + fn add_ServiceKindSupportedChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServiceKindSupportedChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IRcsTransport { + #[inline] pub unsafe fn get_extended_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SupportUnreadAlertCategory)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_system_id(&mut self) -> Result { + #[inline] pub unsafe fn get_transport_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransportFriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transport_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransportId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_configuration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Configuration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_store_and_forward_enabled(&mut self, serviceKind: RcsServiceKind) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SystemId)(self, &mut out); + let hr = ((*self.lpVtbl).IsStoreAndForwardEnabled)(self, serviceKind, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_time_accuracy(&mut self) -> Result { + #[inline] pub unsafe fn is_service_kind_supported(&mut self, serviceKind: RcsServiceKind) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TimeAccuracy)(self, &mut out); + let hr = ((*self.lpVtbl).IsServiceKindSupported)(self, serviceKind, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_time_source(&mut self) -> Result { + #[inline] pub unsafe fn add_service_kind_supported_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TimeSource)(self, &mut out); + let hr = ((*self.lpVtbl).add_ServiceKindSupportedChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_time_update_control_point(&mut self) -> Result { + #[inline] pub unsafe fn remove_service_kind_supported_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ServiceKindSupportedChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class RcsTransportConfiguration: IRcsTransportConfiguration} + RT_CLASS!{class RcsServiceKindSupportedChangedEventArgs: IRcsServiceKindSupportedChangedEventArgs} + DEFINE_IID!(IID_IRcsTransportConfiguration, 533508354, 9330, 19385, 153, 136, 193, 33, 28, 131, 232, 169); + RT_INTERFACE!{interface IRcsTransportConfiguration(IRcsTransportConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IRcsTransportConfiguration] { + fn get_MaxAttachmentCount(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxMessageSizeInKilobytes(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxGroupMessageSizeInKilobytes(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxRecipientCount(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxFileSizeInKilobytes(&mut self, out: *mut i32) -> HRESULT, + fn get_WarningFileSizeInKilobytes(&mut self, out: *mut i32) -> HRESULT + }} + impl IRcsTransportConfiguration { + #[inline] pub unsafe fn get_max_attachment_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TimeUpdateControlPoint)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxAttachmentCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_time_update_state(&mut self) -> Result { + #[inline] pub unsafe fn get_max_message_size_in_kilobytes(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TimeUpdateState)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxMessageSizeInKilobytes)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_time_with_dst(&mut self) -> Result { + #[inline] pub unsafe fn get_max_group_message_size_in_kilobytes(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TimeWithDst)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxGroupMessageSizeInKilobytes)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_time_zone(&mut self) -> Result { + #[inline] pub unsafe fn get_max_recipient_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TimeZone)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxRecipientCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_tx_power_level(&mut self) -> Result { + #[inline] pub unsafe fn get_max_file_size_in_kilobytes(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TxPowerLevel)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxFileSizeInKilobytes)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_unread_alert_status(&mut self) -> Result { + #[inline] pub unsafe fn get_warning_file_size_in_kilobytes(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UnreadAlertStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_WarningFileSizeInKilobytes)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IGattDescriptorUuidsStatics, 2801296078, 40188, 17137, 145, 133, 255, 55, 183, 81, 129, 211); - RT_INTERFACE!{static interface IGattDescriptorUuidsStatics(IGattDescriptorUuidsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattDescriptorUuidsStatics] { - fn get_CharacteristicAggregateFormat(&mut self, out: *mut Guid) -> HRESULT, - fn get_CharacteristicExtendedProperties(&mut self, out: *mut Guid) -> HRESULT, - fn get_CharacteristicPresentationFormat(&mut self, out: *mut Guid) -> HRESULT, - fn get_CharacteristicUserDescription(&mut self, out: *mut Guid) -> HRESULT, - fn get_ClientCharacteristicConfiguration(&mut self, out: *mut Guid) -> HRESULT, - fn get_ServerCharacteristicConfiguration(&mut self, out: *mut Guid) -> HRESULT + DEFINE_IID!(IID_IRcsEndUserMessageManager, 810856026, 19743, 19289, 148, 51, 18, 108, 115, 78, 134, 166); + RT_INTERFACE!{interface IRcsEndUserMessageManager(IRcsEndUserMessageManagerVtbl): IInspectable(IInspectableVtbl) [IID_IRcsEndUserMessageManager] { + fn add_MessageAvailableChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageAvailableChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT }} - impl IGattDescriptorUuidsStatics { - #[inline] pub unsafe fn get_characteristic_aggregate_format(&mut self) -> Result { + impl IRcsEndUserMessageManager { + #[inline] pub unsafe fn add_message_available_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CharacteristicAggregateFormat)(self, &mut out); + let hr = ((*self.lpVtbl).add_MessageAvailableChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_characteristic_extended_properties(&mut self) -> Result { + #[inline] pub unsafe fn remove_message_available_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MessageAvailableChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class RcsEndUserMessageAvailableEventArgs: IRcsEndUserMessageAvailableEventArgs} + DEFINE_IID!(IID_IRcsEndUserMessageAction, 2453112631, 39746, 18131, 157, 94, 60, 27, 45, 174, 124, 184); + RT_INTERFACE!{interface IRcsEndUserMessageAction(IRcsEndUserMessageActionVtbl): IInspectable(IInspectableVtbl) [IID_IRcsEndUserMessageAction] { + fn get_Label(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IRcsEndUserMessageAction { + #[inline] pub unsafe fn get_label(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Label)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRcsEndUserMessage, 3620578795, 52183, 20283, 133, 38, 181, 6, 222, 195, 92, 83); + RT_INTERFACE!{interface IRcsEndUserMessage(IRcsEndUserMessageVtbl): IInspectable(IInspectableVtbl) [IID_IRcsEndUserMessage] { + fn get_TransportId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsPinRequired(&mut self, out: *mut bool) -> HRESULT, + fn get_Actions(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn SendResponseAsync(&mut self, action: *mut RcsEndUserMessageAction, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SendResponseWithPinAsync(&mut self, action: *mut RcsEndUserMessageAction, pin: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IRcsEndUserMessage { + #[inline] pub unsafe fn get_transport_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransportId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_pin_required(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CharacteristicExtendedProperties)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsPinRequired)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_characteristic_presentation_format(&mut self) -> Result { + #[inline] pub unsafe fn get_actions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Actions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn send_response_async(&mut self, action: &RcsEndUserMessageAction) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendResponseAsync)(self, action as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn send_response_with_pin_async(&mut self, action: &RcsEndUserMessageAction, pin: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendResponseWithPinAsync)(self, action as *const _ as *mut _, pin.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RcsEndUserMessageAction: IRcsEndUserMessageAction} + DEFINE_IID!(IID_IRcsEndUserMessageAvailableEventArgs, 759541249, 16265, 16874, 151, 2, 158, 158, 212, 17, 170, 152); + RT_INTERFACE!{interface IRcsEndUserMessageAvailableEventArgs(IRcsEndUserMessageAvailableEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRcsEndUserMessageAvailableEventArgs] { + fn get_IsMessageAvailable(&mut self, out: *mut bool) -> HRESULT, + fn get_Message(&mut self, out: *mut *mut RcsEndUserMessage) -> HRESULT + }} + impl IRcsEndUserMessageAvailableEventArgs { + #[inline] pub unsafe fn get_is_message_available(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CharacteristicPresentationFormat)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsMessageAvailable)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_characteristic_user_description(&mut self) -> Result { + #[inline] pub unsafe fn get_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RcsEndUserMessage: IRcsEndUserMessage} + DEFINE_IID!(IID_IRcsEndUserMessageAvailableTriggerDetails, 1536652333, 13599, 18066, 180, 30, 27, 3, 93, 193, 137, 134); + RT_INTERFACE!{interface IRcsEndUserMessageAvailableTriggerDetails(IRcsEndUserMessageAvailableTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IRcsEndUserMessageAvailableTriggerDetails] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IRcsEndUserMessageAvailableTriggerDetails { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IChatMessageManagerStatics3 [CLSID_ChatMessageManager]} + RT_ACTIVATABLE!{IChatMessageManager2Statics [CLSID_ChatMessageManager]} + RT_ACTIVATABLE!{IChatMessageManagerStatic [CLSID_ChatMessageManager]} + DEFINE_CLSID!(CLSID_ChatMessageManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,104,97,116,46,67,104,97,116,77,101,115,115,97,103,101,77,97,110,97,103,101,114,0]); + RT_CLASS!{class ChatMessageNotificationTriggerDetails: IChatMessageNotificationTriggerDetails} + RT_ACTIVATABLE!{IChatMessageBlockingStatic [CLSID_ChatMessageBlocking]} + DEFINE_CLSID!(CLSID_ChatMessageBlocking = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,104,97,116,46,67,104,97,116,77,101,115,115,97,103,101,66,108,111,99,107,105,110,103,0]); + RT_ACTIVATABLE!{IChatCapabilitiesManagerStatics [CLSID_ChatCapabilitiesManager]} + DEFINE_CLSID!(CLSID_ChatCapabilitiesManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,104,97,116,46,67,104,97,116,67,97,112,97,98,105,108,105,116,105,101,115,77,97,110,97,103,101,114,0]); + RT_ACTIVATABLE!{IRcsManagerStatics [CLSID_RcsManager]} + DEFINE_CLSID!(CLSID_RcsManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,104,97,116,46,82,99,115,77,97,110,97,103,101,114,0]); + RT_CLASS!{class RcsEndUserMessageAvailableTriggerDetails: IRcsEndUserMessageAvailableTriggerDetails} +} // Windows.ApplicationModel.Chat +pub mod contacts { // Windows.ApplicationModel.Contacts +use ::prelude::*; + RT_ENUM! { enum ContactFieldType: i32 { + Email (ContactFieldType_Email) = 0, PhoneNumber (ContactFieldType_PhoneNumber) = 1, Location (ContactFieldType_Location) = 2, InstantMessage (ContactFieldType_InstantMessage) = 3, Custom (ContactFieldType_Custom) = 4, ConnectedServiceAccount (ContactFieldType_ConnectedServiceAccount) = 5, ImportantDate (ContactFieldType_ImportantDate) = 6, Address (ContactFieldType_Address) = 7, SignificantOther (ContactFieldType_SignificantOther) = 8, Notes (ContactFieldType_Notes) = 9, Website (ContactFieldType_Website) = 10, JobInfo (ContactFieldType_JobInfo) = 11, + }} + RT_ENUM! { enum ContactSelectionMode: i32 { + Contacts (ContactSelectionMode_Contacts) = 0, Fields (ContactSelectionMode_Fields) = 1, + }} + RT_ENUM! { enum ContactEmailKind: i32 { + Personal (ContactEmailKind_Personal) = 0, Work (ContactEmailKind_Work) = 1, Other (ContactEmailKind_Other) = 2, + }} + RT_ENUM! { enum ContactPhoneKind: i32 { + Home (ContactPhoneKind_Home) = 0, Mobile (ContactPhoneKind_Mobile) = 1, Work (ContactPhoneKind_Work) = 2, Other (ContactPhoneKind_Other) = 3, Pager (ContactPhoneKind_Pager) = 4, BusinessFax (ContactPhoneKind_BusinessFax) = 5, HomeFax (ContactPhoneKind_HomeFax) = 6, Company (ContactPhoneKind_Company) = 7, Assistant (ContactPhoneKind_Assistant) = 8, Radio (ContactPhoneKind_Radio) = 9, + }} + RT_ENUM! { enum ContactAddressKind: i32 { + Home (ContactAddressKind_Home) = 0, Work (ContactAddressKind_Work) = 1, Other (ContactAddressKind_Other) = 2, + }} + RT_ENUM! { enum ContactDateKind: i32 { + Birthday (ContactDateKind_Birthday) = 0, Anniversary (ContactDateKind_Anniversary) = 1, Other (ContactDateKind_Other) = 2, + }} + RT_ENUM! { enum ContactChangeType: i32 { + Created (ContactChangeType_Created) = 0, Modified (ContactChangeType_Modified) = 1, Deleted (ContactChangeType_Deleted) = 2, ChangeTrackingLost (ContactChangeType_ChangeTrackingLost) = 3, + }} + RT_ENUM! { enum ContactRelationship: i32 { + Other (ContactRelationship_Other) = 0, Spouse (ContactRelationship_Spouse) = 1, Partner (ContactRelationship_Partner) = 2, Sibling (ContactRelationship_Sibling) = 3, Parent (ContactRelationship_Parent) = 4, Child (ContactRelationship_Child) = 5, + }} + RT_ENUM! { enum ContactQueryDesiredFields: u32 { + None (ContactQueryDesiredFields_None) = 0, PhoneNumber (ContactQueryDesiredFields_PhoneNumber) = 1, EmailAddress (ContactQueryDesiredFields_EmailAddress) = 2, PostalAddress (ContactQueryDesiredFields_PostalAddress) = 4, + }} + RT_ENUM! { enum ContactQuerySearchFields: u32 { + None (ContactQuerySearchFields_None) = 0, Name (ContactQuerySearchFields_Name) = 1, Email (ContactQuerySearchFields_Email) = 2, Phone (ContactQuerySearchFields_Phone) = 4, All (ContactQuerySearchFields_All) = 4294967295, + }} + RT_ENUM! { enum ContactQuerySearchScope: i32 { + Local (ContactQuerySearchScope_Local) = 0, Server (ContactQuerySearchScope_Server) = 1, + }} + RT_ENUM! { enum ContactStoreAccessType: i32 { + AppContactsReadWrite (ContactStoreAccessType_AppContactsReadWrite) = 0, AllContactsReadOnly (ContactStoreAccessType_AllContactsReadOnly) = 1, AllContactsReadWrite (ContactStoreAccessType_AllContactsReadWrite) = 2, + }} + RT_ENUM! { enum ContactAnnotationStoreAccessType: i32 { + AppAnnotationsReadWrite (ContactAnnotationStoreAccessType_AppAnnotationsReadWrite) = 0, AllAnnotationsReadWrite (ContactAnnotationStoreAccessType_AllAnnotationsReadWrite) = 1, + }} + RT_ENUM! { enum ContactListOtherAppReadAccess: i32 { + SystemOnly (ContactListOtherAppReadAccess_SystemOnly) = 0, Limited (ContactListOtherAppReadAccess_Limited) = 1, Full (ContactListOtherAppReadAccess_Full) = 2, None (ContactListOtherAppReadAccess_None) = 3, + }} + RT_ENUM! { enum ContactListOtherAppWriteAccess: i32 { + None (ContactListOtherAppWriteAccess_None) = 0, SystemOnly (ContactListOtherAppWriteAccess_SystemOnly) = 1, + }} + RT_ENUM! { enum ContactMatchReasonKind: i32 { + Name (ContactMatchReasonKind_Name) = 0, EmailAddress (ContactMatchReasonKind_EmailAddress) = 1, PhoneNumber (ContactMatchReasonKind_PhoneNumber) = 2, JobInfo (ContactMatchReasonKind_JobInfo) = 3, YomiName (ContactMatchReasonKind_YomiName) = 4, Other (ContactMatchReasonKind_Other) = 5, + }} + RT_ENUM! { enum ContactBatchStatus: i32 { + Success (ContactBatchStatus_Success) = 0, ServerSearchSyncManagerError (ContactBatchStatus_ServerSearchSyncManagerError) = 1, ServerSearchUnknownError (ContactBatchStatus_ServerSearchUnknownError) = 2, + }} + RT_ENUM! { enum ContactAnnotationOperations: u32 { + None (ContactAnnotationOperations_None) = 0, ContactProfile (ContactAnnotationOperations_ContactProfile) = 1, Message (ContactAnnotationOperations_Message) = 2, AudioCall (ContactAnnotationOperations_AudioCall) = 4, VideoCall (ContactAnnotationOperations_VideoCall) = 8, SocialFeeds (ContactAnnotationOperations_SocialFeeds) = 16, + }} + RT_ENUM! { enum ContactNameOrder: i32 { + FirstNameLastName (ContactNameOrder_FirstNameLastName) = 0, LastNameFirstName (ContactNameOrder_LastNameFirstName) = 1, + }} + RT_ENUM! { enum ContactListSyncStatus: i32 { + Idle (ContactListSyncStatus_Idle) = 0, Syncing (ContactListSyncStatus_Syncing) = 1, UpToDate (ContactListSyncStatus_UpToDate) = 2, AuthenticationError (ContactListSyncStatus_AuthenticationError) = 3, PolicyError (ContactListSyncStatus_PolicyError) = 4, UnknownError (ContactListSyncStatus_UnknownError) = 5, ManualAccountRemovalRequired (ContactListSyncStatus_ManualAccountRemovalRequired) = 6, + }} + RT_ENUM! { enum ContactCardHeaderKind: i32 { + Default (ContactCardHeaderKind_Default) = 0, Basic (ContactCardHeaderKind_Basic) = 1, Enterprise (ContactCardHeaderKind_Enterprise) = 2, + }} + RT_ENUM! { enum ContactCardTabKind: i32 { + Default (ContactCardTabKind_Default) = 0, Email (ContactCardTabKind_Email) = 1, Messaging (ContactCardTabKind_Messaging) = 2, Phone (ContactCardTabKind_Phone) = 3, Video (ContactCardTabKind_Video) = 4, OrganizationalHierarchy (ContactCardTabKind_OrganizationalHierarchy) = 5, + }} + DEFINE_IID!(IID_IContactCardOptions, 2349485950, 27318, 20287, 190, 114, 129, 114, 54, 238, 234, 91); + RT_INTERFACE!{interface IContactCardOptions(IContactCardOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IContactCardOptions] { + fn get_HeaderKind(&mut self, out: *mut ContactCardHeaderKind) -> HRESULT, + fn put_HeaderKind(&mut self, value: ContactCardHeaderKind) -> HRESULT, + fn get_InitialTabKind(&mut self, out: *mut ContactCardTabKind) -> HRESULT, + fn put_InitialTabKind(&mut self, value: ContactCardTabKind) -> HRESULT + }} + impl IContactCardOptions { + #[inline] pub unsafe fn get_header_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CharacteristicUserDescription)(self, &mut out); + let hr = ((*self.lpVtbl).get_HeaderKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_client_characteristic_configuration(&mut self) -> Result { + #[inline] pub unsafe fn set_header_kind(&mut self, value: ContactCardHeaderKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_initial_tab_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ClientCharacteristicConfiguration)(self, &mut out); + let hr = ((*self.lpVtbl).get_InitialTabKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_server_characteristic_configuration(&mut self) -> Result { + #[inline] pub unsafe fn set_initial_tab_kind(&mut self, value: ContactCardTabKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_InitialTabKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContactCardOptions2, 2401704864, 55115, 19654, 159, 83, 27, 14, 181, 209, 39, 60); + RT_INTERFACE!{interface IContactCardOptions2(IContactCardOptions2Vtbl): IInspectable(IInspectableVtbl) [IID_IContactCardOptions2] { + fn get_ServerSearchContactListIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IContactCardOptions2 { + #[inline] pub unsafe fn get_server_search_contact_list_ids(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerSearchContactListIds)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFullContactCardOptions, 2269397868, 23801, 18051, 189, 202, 161, 253, 235, 248, 219, 206); + RT_INTERFACE!{interface IFullContactCardOptions(IFullContactCardOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IFullContactCardOptions] { + #[cfg(feature="windows.ui")] fn get_DesiredRemainingView(&mut self, out: *mut super::super::ui::viewmanagement::ViewSizePreference) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_DesiredRemainingView(&mut self, value: super::super::ui::viewmanagement::ViewSizePreference) -> HRESULT + }} + impl IFullContactCardOptions { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_desired_remaining_view(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServerCharacteristicConfiguration)(self, &mut out); + let hr = ((*self.lpVtbl).get_DesiredRemainingView)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_desired_remaining_view(&mut self, value: super::super::ui::viewmanagement::ViewSizePreference) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredRemainingView)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - DEFINE_IID!(IID_IGattReliableWriteTransaction, 1671851783, 6890, 19532, 165, 15, 151, 186, 228, 116, 179, 72); - RT_INTERFACE!{interface IGattReliableWriteTransaction(IGattReliableWriteTransactionVtbl): IInspectable(IInspectableVtbl) [IID_IGattReliableWriteTransaction] { - #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.storage")] fn WriteValue(&mut self, characteristic: *mut GattCharacteristic, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - fn CommitAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class Contact: IContact} + DEFINE_IID!(IID_IContactManagerStatics, 2180127424, 63073, 18184, 186, 79, 211, 134, 189, 13, 98, 46); + RT_INTERFACE!{static interface IContactManagerStatics(IContactManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IContactManagerStatics] { + fn ShowContactCard(&mut self, contact: *mut Contact, selection: super::super::foundation::Rect) -> HRESULT, + #[cfg(feature="windows.ui")] fn ShowContactCardWithPlacement(&mut self, contact: *mut Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> HRESULT, + #[cfg(feature="windows.ui")] fn ShowDelayLoadedContactCard(&mut self, contact: *mut Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut ContactCardDelayedDataLoader) -> HRESULT }} - impl IGattReliableWriteTransaction { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn write_value(&mut self, characteristic: &GattCharacteristic, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).WriteValue)(self, characteristic as *const _ as *mut _, value as *const _ as *mut _); + impl IContactManagerStatics { + #[inline] pub unsafe fn show_contact_card(&mut self, contact: &Contact, selection: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).ShowContactCard)(self, contact as *const _ as *mut _, selection); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn commit_async(&mut self) -> Result>> { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_contact_card_with_placement(&mut self, contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { + let hr = ((*self.lpVtbl).ShowContactCardWithPlacement)(self, contact as *const _ as *mut _, selection, preferredPlacement); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_delay_loaded_contact_card(&mut self, contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CommitAsync)(self, &mut out); + let hr = ((*self.lpVtbl).ShowDelayLoadedContactCard)(self, contact as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGattReadResult, 1671851784, 6890, 19532, 165, 15, 151, 186, 228, 116, 179, 72); - RT_INTERFACE!{interface IGattReadResult(IGattReadResultVtbl): IInspectable(IInspectableVtbl) [IID_IGattReadResult] { - fn get_Status(&mut self, out: *mut GattCommunicationStatus) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_Value(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + RT_CLASS!{class ContactCardDelayedDataLoader: IContactCardDelayedDataLoader} + DEFINE_IID!(IID_IContactManagerStatics2, 2709055008, 18392, 18636, 150, 60, 149, 146, 182, 229, 16, 198); + RT_INTERFACE!{static interface IContactManagerStatics2(IContactManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IContactManagerStatics2] { + fn RequestStoreAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IGattReadResult { - #[inline] pub unsafe fn get_status(&mut self) -> Result { + impl IContactManagerStatics2 { + #[inline] pub unsafe fn request_store_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ContactStore: IContactStore} + DEFINE_IID!(IID_IContactManagerStatics3, 3301719362, 30086, 18730, 147, 11, 123, 193, 56, 252, 33, 57); + RT_INTERFACE!{static interface IContactManagerStatics3(IContactManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IContactManagerStatics3] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn ConvertContactToVCardAsync(&mut self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn ConvertContactToVCardAsyncWithMaxBytes(&mut self, contact: *mut Contact, maxBytes: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn ConvertVCardToContactAsync(&mut self, vCard: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestStoreAsyncWithAccessType(&mut self, accessType: ContactStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAnnotationStoreAsync(&mut self, accessType: ContactAnnotationStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn IsShowContactCardSupported(&mut self, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowContactCardWithOptions(&mut self, contact: *mut Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: *mut ContactCardOptions) -> HRESULT, + fn IsShowDelayLoadedContactCardSupported(&mut self, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowDelayLoadedContactCardWithOptions(&mut self, contact: *mut Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: *mut ContactCardOptions, out: *mut *mut ContactCardDelayedDataLoader) -> HRESULT, + fn ShowFullContactCard(&mut self, contact: *mut Contact, fullContactCardOptions: *mut FullContactCardOptions) -> HRESULT, + fn get_SystemDisplayNameOrder(&mut self, out: *mut ContactNameOrder) -> HRESULT, + fn put_SystemDisplayNameOrder(&mut self, value: ContactNameOrder) -> HRESULT, + fn get_SystemSortOrder(&mut self, out: *mut ContactNameOrder) -> HRESULT, + fn put_SystemSortOrder(&mut self, value: ContactNameOrder) -> HRESULT + }} + impl IContactManagerStatics3 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn convert_contact_to_vcard_async(&mut self, contact: &Contact) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConvertContactToVCardAsync)(self, contact as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn convert_contact_to_vcard_async_with_max_bytes(&mut self, contact: &Contact, maxBytes: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConvertContactToVCardAsyncWithMaxBytes)(self, contact as *const _ as *mut _, maxBytes, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn convert_vcard_to_contact_async(&mut self, vCard: &super::super::storage::streams::IRandomAccessStreamReference) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConvertVCardToContactAsync)(self, vCard as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_store_async_with_access_type(&mut self, accessType: ContactStoreAccessType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStoreAsyncWithAccessType)(self, accessType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_annotation_store_async(&mut self, accessType: ContactAnnotationStoreAccessType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAnnotationStoreAsync)(self, accessType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_show_contact_card_supported(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).IsShowContactCardSupported)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_value(&mut self) -> Result> { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_contact_card_with_options(&mut self, contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: &ContactCardOptions) -> Result<()> { + let hr = ((*self.lpVtbl).ShowContactCardWithOptions)(self, contact as *const _ as *mut _, selection, preferredPlacement, contactCardOptions as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn is_show_delay_loaded_contact_card_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsShowDelayLoadedContactCardSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_delay_loaded_contact_card_with_options(&mut self, contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: &ContactCardOptions) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + let hr = ((*self.lpVtbl).ShowDelayLoadedContactCardWithOptions)(self, contact as *const _ as *mut _, selection, preferredPlacement, contactCardOptions as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IGattReadClientCharacteristicConfigurationDescriptorResult, 1671851785, 6890, 19532, 165, 15, 151, 186, 228, 116, 179, 72); - RT_INTERFACE!{interface IGattReadClientCharacteristicConfigurationDescriptorResult(IGattReadClientCharacteristicConfigurationDescriptorResultVtbl): IInspectable(IInspectableVtbl) [IID_IGattReadClientCharacteristicConfigurationDescriptorResult] { - fn get_Status(&mut self, out: *mut GattCommunicationStatus) -> HRESULT, - fn get_ClientCharacteristicConfigurationDescriptor(&mut self, out: *mut GattClientCharacteristicConfigurationDescriptorValue) -> HRESULT - }} - impl IGattReadClientCharacteristicConfigurationDescriptorResult { - #[inline] pub unsafe fn get_status(&mut self) -> Result { + #[inline] pub unsafe fn show_full_contact_card(&mut self, contact: &Contact, fullContactCardOptions: &FullContactCardOptions) -> Result<()> { + let hr = ((*self.lpVtbl).ShowFullContactCard)(self, contact as *const _ as *mut _, fullContactCardOptions as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_display_name_order(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_SystemDisplayNameOrder)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_client_characteristic_configuration_descriptor(&mut self) -> Result { + #[inline] pub unsafe fn set_system_display_name_order(&mut self, value: ContactNameOrder) -> Result<()> { + let hr = ((*self.lpVtbl).put_SystemDisplayNameOrder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_sort_order(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ClientCharacteristicConfigurationDescriptor)(self, &mut out); + let hr = ((*self.lpVtbl).get_SystemSortOrder)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn set_system_sort_order(&mut self, value: ContactNameOrder) -> Result<()> { + let hr = ((*self.lpVtbl).put_SystemSortOrder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_ACTIVATABLE!{IGattServiceUuidsStatics2 [CLSID_GattServiceUuids]} - RT_ACTIVATABLE!{IGattServiceUuidsStatics [CLSID_GattServiceUuids]} - DEFINE_CLSID!(CLSID_GattServiceUuids = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,83,101,114,118,105,99,101,85,117,105,100,115,0]); - RT_ACTIVATABLE!{IGattCharacteristicUuidsStatics2 [CLSID_GattCharacteristicUuids]} - RT_ACTIVATABLE!{IGattCharacteristicUuidsStatics [CLSID_GattCharacteristicUuids]} - DEFINE_CLSID!(CLSID_GattCharacteristicUuids = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,67,104,97,114,97,99,116,101,114,105,115,116,105,99,85,117,105,100,115,0]); - RT_ACTIVATABLE!{IGattDescriptorUuidsStatics [CLSID_GattDescriptorUuids]} - DEFINE_CLSID!(CLSID_GattDescriptorUuids = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,68,101,115,99,114,105,112,116,111,114,85,117,105,100,115,0]); - RT_CLASS!{class GattReliableWriteTransaction: IGattReliableWriteTransaction} - RT_ACTIVATABLE!{IGattPresentationFormatTypesStatics [CLSID_GattPresentationFormatTypes]} - DEFINE_CLSID!(CLSID_GattPresentationFormatTypes = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,80,114,101,115,101,110,116,97,116,105,111,110,70,111,114,109,97,116,84,121,112,101,115,0]); - DEFINE_IID!(IID_IGattDeviceService, 2893773829, 45884, 18383, 153, 15, 107, 143, 85, 119, 223, 113); - RT_INTERFACE!{interface IGattDeviceService(IGattDeviceServiceVtbl): IInspectable(IInspectableVtbl) [IID_IGattDeviceService] { - fn GetCharacteristics(&mut self, characteristicUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetIncludedServices(&mut self, serviceUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Uuid(&mut self, out: *mut Guid) -> HRESULT, - fn get_AttributeHandle(&mut self, out: *mut u16) -> HRESULT + RT_CLASS!{class ContactAnnotationStore: IContactAnnotationStore} + RT_CLASS!{class ContactCardOptions: IContactCardOptions} + RT_CLASS!{class FullContactCardOptions: IFullContactCardOptions} + DEFINE_IID!(IID_IContactManagerStatics4, 613950066, 13435, 18140, 141, 149, 81, 189, 65, 225, 90, 175); + RT_INTERFACE!{static interface IContactManagerStatics4(IContactManagerStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IContactManagerStatics4] { + #[cfg(feature="windows.system")] fn GetForUser(&mut self, user: *mut super::super::system::User, out: *mut *mut ContactManagerForUser) -> HRESULT }} - impl IGattDeviceService { - #[inline] pub unsafe fn get_characteristics(&mut self, characteristicUuid: Guid) -> Result>> { + impl IContactManagerStatics4 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user(&mut self, user: &super::super::system::User) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCharacteristics)(self, characteristicUuid, &mut out); + let hr = ((*self.lpVtbl).GetForUser)(self, user as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_included_services(&mut self, serviceUuid: Guid) -> Result>> { + } + RT_CLASS!{class ContactManagerForUser: IContactManagerForUser} + DEFINE_IID!(IID_IContactManagerForUser, 3075193431, 4214, 19439, 174, 243, 84, 104, 109, 24, 56, 125); + RT_INTERFACE!{interface IContactManagerForUser(IContactManagerForUserVtbl): IInspectable(IInspectableVtbl) [IID_IContactManagerForUser] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn ConvertContactToVCardAsync(&mut self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn ConvertContactToVCardAsyncWithMaxBytes(&mut self, contact: *mut Contact, maxBytes: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn ConvertVCardToContactAsync(&mut self, vCard: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestStoreAsync(&mut self, accessType: ContactStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAnnotationStoreAsync(&mut self, accessType: ContactAnnotationStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_SystemDisplayNameOrder(&mut self, out: *mut ContactNameOrder) -> HRESULT, + fn put_SystemDisplayNameOrder(&mut self, value: ContactNameOrder) -> HRESULT, + fn get_SystemSortOrder(&mut self, out: *mut ContactNameOrder) -> HRESULT, + fn put_SystemSortOrder(&mut self, value: ContactNameOrder) -> HRESULT, + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT + }} + impl IContactManagerForUser { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn convert_contact_to_vcard_async(&mut self, contact: &Contact) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetIncludedServices)(self, serviceUuid, &mut out); + let hr = ((*self.lpVtbl).ConvertContactToVCardAsync)(self, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn convert_contact_to_vcard_async_with_max_bytes(&mut self, contact: &Contact, maxBytes: u32) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ConvertContactToVCardAsyncWithMaxBytes)(self, contact as *const _ as *mut _, maxBytes, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uuid(&mut self) -> Result { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn convert_vcard_to_contact_async(&mut self, vCard: &super::super::storage::streams::IRandomAccessStreamReference) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConvertVCardToContactAsync)(self, vCard as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_store_async(&mut self, accessType: ContactStoreAccessType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, accessType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_annotation_store_async(&mut self, accessType: ContactAnnotationStoreAccessType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAnnotationStoreAsync)(self, accessType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_display_name_order(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Uuid)(self, &mut out); + let hr = ((*self.lpVtbl).get_SystemDisplayNameOrder)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_attribute_handle(&mut self) -> Result { + #[inline] pub unsafe fn set_system_display_name_order(&mut self, value: ContactNameOrder) -> Result<()> { + let hr = ((*self.lpVtbl).put_SystemDisplayNameOrder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_sort_order(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AttributeHandle)(self, &mut out); + let hr = ((*self.lpVtbl).get_SystemSortOrder)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn set_system_sort_order(&mut self, value: ContactNameOrder) -> Result<()> { + let hr = ((*self.lpVtbl).put_SystemSortOrder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } } - DEFINE_IID!(IID_IGattDeviceService2, 4233384459, 2829, 18184, 186, 224, 159, 253, 148, 137, 188, 89); - RT_INTERFACE!{interface IGattDeviceService2(IGattDeviceService2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattDeviceService2] { - fn get_Device(&mut self, out: *mut *mut super::BluetoothLEDevice) -> HRESULT, - fn get_ParentServices(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetAllCharacteristics(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetAllIncludedServices(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + DEFINE_IID!(IID_IAggregateContactManager, 58316253, 56154, 20435, 181, 78, 77, 241, 121, 23, 162, 18); + RT_INTERFACE!{interface IAggregateContactManager(IAggregateContactManagerVtbl): IInspectable(IInspectableVtbl) [IID_IAggregateContactManager] { + fn FindRawContactsAsync(&mut self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn TryLinkContactsAsync(&mut self, primaryContact: *mut Contact, secondaryContact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn UnlinkRawContactAsync(&mut self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn TrySetPreferredSourceForPictureAsync(&mut self, aggregateContact: *mut Contact, rawContact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IGattDeviceService2 { - #[inline] pub unsafe fn get_device(&mut self) -> Result> { + impl IAggregateContactManager { + #[inline] pub unsafe fn find_raw_contacts_async(&mut self, contact: &Contact) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Device)(self, &mut out); + let hr = ((*self.lpVtbl).FindRawContactsAsync)(self, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_parent_services(&mut self) -> Result>> { + #[inline] pub unsafe fn try_link_contacts_async(&mut self, primaryContact: &Contact, secondaryContact: &Contact) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ParentServices)(self, &mut out); + let hr = ((*self.lpVtbl).TryLinkContactsAsync)(self, primaryContact as *const _ as *mut _, secondaryContact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_all_characteristics(&mut self) -> Result>> { + #[inline] pub unsafe fn unlink_raw_contact_async(&mut self, contact: &Contact) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetAllCharacteristics)(self, &mut out); + let hr = ((*self.lpVtbl).UnlinkRawContactAsync)(self, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_all_included_services(&mut self) -> Result>> { + #[inline] pub unsafe fn try_set_preferred_source_for_picture_async(&mut self, aggregateContact: &Contact, rawContact: &Contact) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetAllIncludedServices)(self, &mut out); + let hr = ((*self.lpVtbl).TrySetPreferredSourceForPictureAsync)(self, aggregateContact as *const _ as *mut _, rawContact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } -} // Windows.Devices.Bluetooth.GenericAttributeProfile -pub mod advertisement { // Windows.Devices.Bluetooth.Advertisement -use ::prelude::*; - RT_ENUM! { enum BluetoothLEScanningMode: i32 { - Passive (BluetoothLEScanningMode_Passive) = 0, Active (BluetoothLEScanningMode_Active) = 1, - }} - RT_ENUM! { enum BluetoothLEAdvertisementFlags: u32 { - None (BluetoothLEAdvertisementFlags_None) = 0, LimitedDiscoverableMode (BluetoothLEAdvertisementFlags_LimitedDiscoverableMode) = 1, GeneralDiscoverableMode (BluetoothLEAdvertisementFlags_GeneralDiscoverableMode) = 2, ClassicNotSupported (BluetoothLEAdvertisementFlags_ClassicNotSupported) = 4, DualModeControllerCapable (BluetoothLEAdvertisementFlags_DualModeControllerCapable) = 8, DualModeHostCapable (BluetoothLEAdvertisementFlags_DualModeHostCapable) = 16, - }} - RT_ENUM! { enum BluetoothLEAdvertisementType: i32 { - ConnectableUndirected (BluetoothLEAdvertisementType_ConnectableUndirected) = 0, ConnectableDirected (BluetoothLEAdvertisementType_ConnectableDirected) = 1, ScannableUndirected (BluetoothLEAdvertisementType_ScannableUndirected) = 2, NonConnectableUndirected (BluetoothLEAdvertisementType_NonConnectableUndirected) = 3, ScanResponse (BluetoothLEAdvertisementType_ScanResponse) = 4, - }} - RT_ENUM! { enum BluetoothLEAdvertisementWatcherStatus: i32 { - Created (BluetoothLEAdvertisementWatcherStatus_Created) = 0, Started (BluetoothLEAdvertisementWatcherStatus_Started) = 1, Stopping (BluetoothLEAdvertisementWatcherStatus_Stopping) = 2, Stopped (BluetoothLEAdvertisementWatcherStatus_Stopped) = 3, Aborted (BluetoothLEAdvertisementWatcherStatus_Aborted) = 4, - }} - DEFINE_IID!(IID_IBluetoothLEAdvertisement, 107983543, 13265, 20093, 131, 103, 207, 129, 208, 247, 150, 83); - RT_INTERFACE!{interface IBluetoothLEAdvertisement(IBluetoothLEAdvertisementVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisement] { - fn get_Flags(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_Flags(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_LocalName(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_LocalName(&mut self, value: HSTRING) -> HRESULT, - fn get_ServiceUuids(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_ManufacturerData(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_DataSections(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn GetManufacturerDataByCompanyId(&mut self, companyId: u16, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetSectionsByType(&mut self, type_: u8, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + DEFINE_IID!(IID_IAggregateContactManager2, 1586283224, 43469, 17456, 156, 75, 1, 52, 141, 178, 202, 80); + RT_INTERFACE!{interface IAggregateContactManager2(IAggregateContactManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IAggregateContactManager2] { + fn SetRemoteIdentificationInformationAsync(&mut self, contactListId: HSTRING, remoteSourceId: HSTRING, accountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT }} - impl IBluetoothLEAdvertisement { - #[inline] pub unsafe fn get_flags(&mut self) -> Result>> { + impl IAggregateContactManager2 { + #[inline] pub unsafe fn set_remote_identification_information_async(&mut self, contactListId: &HStringArg, remoteSourceId: &HStringArg, accountId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Flags)(self, &mut out); + let hr = ((*self.lpVtbl).SetRemoteIdentificationInformationAsync)(self, contactListId.get(), remoteSourceId.get(), accountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_flags(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { - let hr = ((*self.lpVtbl).put_Flags)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_name(&mut self) -> Result { + } + DEFINE_IID!(IID_IContactAnnotationStore, 598537386, 31351, 17789, 130, 3, 152, 127, 75, 49, 175, 9); + RT_INTERFACE!{interface IContactAnnotationStore(IContactAnnotationStoreVtbl): IInspectable(IInspectableVtbl) [IID_IContactAnnotationStore] { + fn FindContactIdsByEmailAsync(&mut self, emailAddress: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindContactIdsByPhoneNumberAsync(&mut self, phoneNumber: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAnnotationsForContactAsync(&mut self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn DisableAnnotationAsync(&mut self, annotation: *mut ContactAnnotation, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn CreateAnnotationListAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateAnnotationListInAccountAsync(&mut self, userDataAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAnnotationListAsync(&mut self, annotationListId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindAnnotationListsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IContactAnnotationStore { + #[inline] pub unsafe fn find_contact_ids_by_email_async(&mut self, emailAddress: &HStringArg) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_LocalName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_local_name(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_LocalName)(self, value.get()); - if hr == S_OK { Ok(()) } else { err(hr) } + let hr = ((*self.lpVtbl).FindContactIdsByEmailAsync)(self, emailAddress.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_service_uuids(&mut self) -> Result>> { + #[inline] pub unsafe fn find_contact_ids_by_phone_number_async(&mut self, phoneNumber: &HStringArg) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ServiceUuids)(self, &mut out); + let hr = ((*self.lpVtbl).FindContactIdsByPhoneNumberAsync)(self, phoneNumber.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_manufacturer_data(&mut self) -> Result>> { + #[inline] pub unsafe fn find_annotations_for_contact_async(&mut self, contact: &Contact) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ManufacturerData)(self, &mut out); + let hr = ((*self.lpVtbl).FindAnnotationsForContactAsync)(self, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_data_sections(&mut self) -> Result>> { + #[inline] pub unsafe fn disable_annotation_async(&mut self, annotation: &ContactAnnotation) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DataSections)(self, &mut out); + let hr = ((*self.lpVtbl).DisableAnnotationAsync)(self, annotation as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_manufacturer_data_by_company_id(&mut self, companyId: u16) -> Result>> { + #[inline] pub unsafe fn create_annotation_list_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetManufacturerDataByCompanyId)(self, companyId, &mut out); + let hr = ((*self.lpVtbl).CreateAnnotationListAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sections_by_type(&mut self, type_: u8) -> Result>> { + #[inline] pub unsafe fn create_annotation_list_in_account_async(&mut self, userDataAccountId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSectionsByType)(self, type_, &mut out); + let hr = ((*self.lpVtbl).CreateAnnotationListInAccountAsync)(self, userDataAccountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class BluetoothLEManufacturerData: IBluetoothLEManufacturerData [IBluetoothLEManufacturerDataFactory] [CLSID_BluetoothLEManufacturerData]} - DEFINE_CLSID!(CLSID_BluetoothLEManufacturerData = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,77,97,110,117,102,97,99,116,117,114,101,114,68,97,116,97,0]); - RT_CLASS!{class BluetoothLEAdvertisementDataSection: IBluetoothLEAdvertisementDataSection [IBluetoothLEAdvertisementDataSectionFactory] [CLSID_BluetoothLEAdvertisementDataSection]} - DEFINE_CLSID!(CLSID_BluetoothLEAdvertisementDataSection = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,65,100,118,101,114,116,105,115,101,109,101,110,116,68,97,116,97,83,101,99,116,105,111,110,0]); - RT_CLASS!{class BluetoothLEAdvertisement: IBluetoothLEAdvertisement} - DEFINE_IID!(IID_IBluetoothLEAdvertisementFilter, 320778451, 53326, 18353, 131, 126, 73, 64, 91, 246, 248, 15); - RT_INTERFACE!{interface IBluetoothLEAdvertisementFilter(IBluetoothLEAdvertisementFilterVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementFilter] { - fn get_Advertisement(&mut self, out: *mut *mut BluetoothLEAdvertisement) -> HRESULT, - fn put_Advertisement(&mut self, value: *mut BluetoothLEAdvertisement) -> HRESULT, - fn get_BytePatterns(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT - }} - impl IBluetoothLEAdvertisementFilter { - #[inline] pub unsafe fn get_advertisement(&mut self) -> Result> { + #[inline] pub unsafe fn get_annotation_list_async(&mut self, annotationListId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Advertisement)(self, &mut out); + let hr = ((*self.lpVtbl).GetAnnotationListAsync)(self, annotationListId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_advertisement(&mut self, value: &BluetoothLEAdvertisement) -> Result<()> { - let hr = ((*self.lpVtbl).put_Advertisement)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_byte_patterns(&mut self) -> Result>> { + #[inline] pub unsafe fn find_annotation_lists_async(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BytePatterns)(self, &mut out); + let hr = ((*self.lpVtbl).FindAnnotationListsAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class BluetoothLEAdvertisementBytePattern: IBluetoothLEAdvertisementBytePattern [IBluetoothLEAdvertisementBytePatternFactory] [CLSID_BluetoothLEAdvertisementBytePattern]} - DEFINE_CLSID!(CLSID_BluetoothLEAdvertisementBytePattern = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,65,100,118,101,114,116,105,115,101,109,101,110,116,66,121,116,101,80,97,116,116,101,114,110,0]); - RT_CLASS!{class BluetoothLEAdvertisementFilter: IBluetoothLEAdvertisementFilter} - DEFINE_IID!(IID_IBluetoothLEAdvertisementWatcherStoppedEventArgs, 3712022605, 59321, 17379, 156, 4, 6, 133, 208, 133, 253, 140); - RT_INTERFACE!{interface IBluetoothLEAdvertisementWatcherStoppedEventArgs(IBluetoothLEAdvertisementWatcherStoppedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementWatcherStoppedEventArgs] { - fn get_Error(&mut self, out: *mut super::BluetoothError) -> HRESULT - }} - impl IBluetoothLEAdvertisementWatcherStoppedEventArgs { - #[inline] pub unsafe fn get_error(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Error)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - } - RT_CLASS!{class BluetoothLEAdvertisementWatcherStoppedEventArgs: IBluetoothLEAdvertisementWatcherStoppedEventArgs} - DEFINE_IID!(IID_IBluetoothLEAdvertisementWatcherFactory, 2595171670, 14764, 17726, 179, 42, 133, 198, 87, 224, 23, 241); - RT_INTERFACE!{static interface IBluetoothLEAdvertisementWatcherFactory(IBluetoothLEAdvertisementWatcherFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementWatcherFactory] { - fn Create(&mut self, advertisementFilter: *mut BluetoothLEAdvertisementFilter, out: *mut *mut BluetoothLEAdvertisementWatcher) -> HRESULT - }} - impl IBluetoothLEAdvertisementWatcherFactory { - #[inline] pub unsafe fn create(&mut self, advertisementFilter: &BluetoothLEAdvertisementFilter) -> Result> { + RT_CLASS!{class ContactAnnotation: IContactAnnotation} + RT_CLASS!{class ContactAnnotationList: IContactAnnotationList} + DEFINE_IID!(IID_IContactAnnotationList, 2460255914, 23688, 17849, 170, 208, 70, 24, 136, 230, 141, 138); + RT_INTERFACE!{interface IContactAnnotationList(IContactAnnotationListVtbl): IInspectable(IInspectableVtbl) [IID_IContactAnnotationList] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ProviderPackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UserDataAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn DeleteAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn TrySaveAnnotationAsync(&mut self, annotation: *mut ContactAnnotation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAnnotationAsync(&mut self, annotationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindAnnotationsByRemoteIdAsync(&mut self, remoteId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAnnotationsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn DeleteAnnotationAsync(&mut self, annotation: *mut ContactAnnotation, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IContactAnnotationList { + #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, advertisementFilter as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class BluetoothLEAdvertisementWatcher: IBluetoothLEAdvertisementWatcher [IBluetoothLEAdvertisementWatcherFactory] [CLSID_BluetoothLEAdvertisementWatcher]} - DEFINE_CLSID!(CLSID_BluetoothLEAdvertisementWatcher = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,65,100,118,101,114,116,105,115,101,109,101,110,116,87,97,116,99,104,101,114,0]); - DEFINE_IID!(IID_IBluetoothLEAdvertisementWatcher, 2796303215, 62419, 17047, 141, 108, 200, 30, 166, 98, 63, 64); - RT_INTERFACE!{interface IBluetoothLEAdvertisementWatcher(IBluetoothLEAdvertisementWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementWatcher] { - fn get_MinSamplingInterval(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_MaxSamplingInterval(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_MinOutOfRangeTimeout(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_MaxOutOfRangeTimeout(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_Status(&mut self, out: *mut BluetoothLEAdvertisementWatcherStatus) -> HRESULT, - fn get_ScanningMode(&mut self, out: *mut BluetoothLEScanningMode) -> HRESULT, - fn put_ScanningMode(&mut self, value: BluetoothLEScanningMode) -> HRESULT, - fn get_SignalStrengthFilter(&mut self, out: *mut *mut super::BluetoothSignalStrengthFilter) -> HRESULT, - fn put_SignalStrengthFilter(&mut self, value: *mut super::BluetoothSignalStrengthFilter) -> HRESULT, - fn get_AdvertisementFilter(&mut self, out: *mut *mut BluetoothLEAdvertisementFilter) -> HRESULT, - fn put_AdvertisementFilter(&mut self, value: *mut BluetoothLEAdvertisementFilter) -> HRESULT, - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT, - fn add_Received(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Received(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT - }} - impl IBluetoothLEAdvertisementWatcher { - #[inline] pub unsafe fn get_min_sampling_interval(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinSamplingInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_provider_package_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProviderPackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_max_sampling_interval(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxSamplingInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_user_data_account_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserDataAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_min_out_of_range_timeout(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinOutOfRangeTimeout)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn delete_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_max_out_of_range_timeout(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxOutOfRangeTimeout)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn try_save_annotation_async(&mut self, annotation: &ContactAnnotation) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TrySaveAnnotationAsync)(self, annotation as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_annotation_async(&mut self, annotationId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAnnotationAsync)(self, annotationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_scanning_mode(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ScanningMode)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn find_annotations_by_remote_id_async(&mut self, remoteId: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAnnotationsByRemoteIdAsync)(self, remoteId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_scanning_mode(&mut self, value: BluetoothLEScanningMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_ScanningMode)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn find_annotations_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAnnotationsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_signal_strength_filter(&mut self) -> Result> { + #[inline] pub unsafe fn delete_annotation_async(&mut self, annotation: &ContactAnnotation) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SignalStrengthFilter)(self, &mut out); + let hr = ((*self.lpVtbl).DeleteAnnotationAsync)(self, annotation as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_signal_strength_filter(&mut self, value: &super::BluetoothSignalStrengthFilter) -> Result<()> { - let hr = ((*self.lpVtbl).put_SignalStrengthFilter)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IContactAnnotation, 2183119599, 32065, 17570, 132, 195, 96, 162, 129, 221, 123, 134); + RT_INTERFACE!{interface IContactAnnotation(IContactAnnotationVtbl): IInspectable(IInspectableVtbl) [IID_IContactAnnotation] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AnnotationListId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ContactId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ContactId(&mut self, value: HSTRING) -> HRESULT, + fn get_RemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RemoteId(&mut self, value: HSTRING) -> HRESULT, + fn get_SupportedOperations(&mut self, out: *mut ContactAnnotationOperations) -> HRESULT, + fn put_SupportedOperations(&mut self, value: ContactAnnotationOperations) -> HRESULT, + fn get_IsDisabled(&mut self, out: *mut bool) -> HRESULT, + fn get_ProviderProperties(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + }} + impl IContactAnnotation { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_advertisement_filter(&mut self) -> Result> { + #[inline] pub unsafe fn get_annotation_list_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AdvertisementFilter)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AnnotationListId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_advertisement_filter(&mut self, value: &BluetoothLEAdvertisementFilter) -> Result<()> { - let hr = ((*self.lpVtbl).put_AdvertisementFilter)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_contact_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContactId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); + #[inline] pub unsafe fn set_contact_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContactId)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); + #[inline] pub unsafe fn get_remote_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_remote_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteId)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_received(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn get_supported_operations(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Received)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_SupportedOperations)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_received(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Received)(self, token); + #[inline] pub unsafe fn set_supported_operations(&mut self, value: ContactAnnotationOperations) -> Result<()> { + let hr = ((*self.lpVtbl).put_SupportedOperations)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_stopped(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn get_is_disabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IsDisabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Stopped)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_provider_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProviderProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class BluetoothLEAdvertisementReceivedEventArgs: IBluetoothLEAdvertisementReceivedEventArgs} - DEFINE_IID!(IID_IBluetoothLEAdvertisementReceivedEventArgs, 664305119, 58774, 16830, 141, 67, 158, 103, 49, 212, 169, 19); - RT_INTERFACE!{interface IBluetoothLEAdvertisementReceivedEventArgs(IBluetoothLEAdvertisementReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementReceivedEventArgs] { - fn get_RawSignalStrengthInDBm(&mut self, out: *mut i16) -> HRESULT, - fn get_BluetoothAddress(&mut self, out: *mut u64) -> HRESULT, - fn get_AdvertisementType(&mut self, out: *mut BluetoothLEAdvertisementType) -> HRESULT, - fn get_Timestamp(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_Advertisement(&mut self, out: *mut *mut BluetoothLEAdvertisement) -> HRESULT + DEFINE_IID!(IID_IContactStoreNotificationTriggerDetails, 2880608470, 34698, 20363, 169, 206, 70, 187, 125, 28, 132, 206); + RT_INTERFACE!{interface IContactStoreNotificationTriggerDetails(IContactStoreNotificationTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IContactStoreNotificationTriggerDetails] { + }} - impl IBluetoothLEAdvertisementReceivedEventArgs { - #[inline] pub unsafe fn get_raw_signal_strength_in_dbm(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RawSignalStrengthInDBm)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bluetooth_address(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BluetoothAddress)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_advertisement_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AdvertisementType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + DEFINE_IID!(IID_IContactStore, 740428560, 14956, 17043, 185, 188, 254, 152, 127, 110, 13, 82); + RT_INTERFACE!{interface IContactStore(IContactStoreVtbl): IInspectable(IInspectableVtbl) [IID_IContactStore] { + fn FindContactsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindContactsWithSearchTextAsync(&mut self, searchText: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetContactAsync(&mut self, contactId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IContactStore { + #[inline] pub unsafe fn find_contacts_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindContactsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn find_contacts_with_search_text_async(&mut self, searchText: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindContactsWithSearchTextAsync)(self, searchText.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_advertisement(&mut self) -> Result> { + #[inline] pub unsafe fn get_contact_async(&mut self, contactId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Advertisement)(self, &mut out); + let hr = ((*self.lpVtbl).GetContactAsync)(self, contactId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IBluetoothLEAdvertisementDataSectionFactory, 3886287170, 43077, 16453, 191, 126, 62, 153, 113, 219, 138, 107); - RT_INTERFACE!{static interface IBluetoothLEAdvertisementDataSectionFactory(IBluetoothLEAdvertisementDataSectionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementDataSectionFactory] { - #[cfg(feature="windows.storage")] fn Create(&mut self, dataType: u8, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut BluetoothLEAdvertisementDataSection) -> HRESULT + DEFINE_IID!(IID_IContactStore2, 416160802, 60373, 19451, 182, 144, 95, 79, 39, 196, 240, 232); + RT_INTERFACE!{interface IContactStore2(IContactStore2Vtbl): IInspectable(IInspectableVtbl) [IID_IContactStore2] { + fn get_ChangeTracker(&mut self, out: *mut *mut ContactChangeTracker) -> HRESULT, + fn add_ContactChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContactChanged(&mut self, value: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_AggregateContactManager(&mut self, out: *mut *mut AggregateContactManager) -> HRESULT, + fn FindContactListsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetContactListAsync(&mut self, contactListId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateContactListAsync(&mut self, displayName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetMeContactAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetContactReader(&mut self, out: *mut *mut ContactReader) -> HRESULT, + fn GetContactReaderWithOptions(&mut self, options: *mut ContactQueryOptions, out: *mut *mut ContactReader) -> HRESULT, + fn CreateContactListInAccountAsync(&mut self, displayName: HSTRING, userDataAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IBluetoothLEAdvertisementDataSectionFactory { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create(&mut self, dataType: u8, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + impl IContactStore2 { + #[inline] pub unsafe fn get_change_tracker(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, dataType, data as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_ChangeTracker)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IBluetoothLEAdvertisementDataSection, 3609277204, 14915, 16633, 182, 240, 146, 191, 239, 195, 74, 227); - RT_INTERFACE!{interface IBluetoothLEAdvertisementDataSection(IBluetoothLEAdvertisementDataSectionVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementDataSection] { - fn get_DataType(&mut self, out: *mut u8) -> HRESULT, - fn put_DataType(&mut self, value: u8) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT - }} - impl IBluetoothLEAdvertisementDataSection { - #[inline] pub unsafe fn get_data_type(&mut self) -> Result { + #[inline] pub unsafe fn add_contact_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DataType)(self, &mut out); + let hr = ((*self.lpVtbl).add_ContactChanged)(self, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_data_type(&mut self, value: u8) -> Result<()> { - let hr = ((*self.lpVtbl).put_DataType)(self, value); + #[inline] pub unsafe fn remove_contact_changed(&mut self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContactChanged)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + #[inline] pub unsafe fn get_aggregate_contact_manager(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + let hr = ((*self.lpVtbl).get_AggregateContactManager)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn find_contact_lists_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindContactListsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IBluetoothLEManufacturerDataFactory, 3231398392, 12698, 17438, 141, 229, 102, 168, 30, 135, 122, 108); - RT_INTERFACE!{static interface IBluetoothLEManufacturerDataFactory(IBluetoothLEManufacturerDataFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEManufacturerDataFactory] { - #[cfg(feature="windows.storage")] fn Create(&mut self, companyId: u16, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut BluetoothLEManufacturerData) -> HRESULT - }} - impl IBluetoothLEManufacturerDataFactory { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create(&mut self, companyId: u16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[inline] pub unsafe fn get_contact_list_async(&mut self, contactListId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, companyId, data as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).GetContactListAsync)(self, contactListId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IBluetoothLEManufacturerData, 2435693080, 26979, 17715, 176, 97, 70, 148, 218, 251, 52, 229); - RT_INTERFACE!{interface IBluetoothLEManufacturerData(IBluetoothLEManufacturerDataVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEManufacturerData] { - fn get_CompanyId(&mut self, out: *mut u16) -> HRESULT, - fn put_CompanyId(&mut self, value: u16) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT - }} - impl IBluetoothLEManufacturerData { - #[inline] pub unsafe fn get_company_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CompanyId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn create_contact_list_async(&mut self, displayName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateContactListAsync)(self, displayName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_company_id(&mut self, value: u16) -> Result<()> { - let hr = ((*self.lpVtbl).put_CompanyId)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_me_contact_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMeContactAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + #[inline] pub unsafe fn get_contact_reader(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + let hr = ((*self.lpVtbl).GetContactReader)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_contact_reader_with_options(&mut self, options: &ContactQueryOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetContactReaderWithOptions)(self, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IBluetoothLEAdvertisementBytePatternFactory, 3269610867, 64860, 20163, 190, 42, 156, 166, 250, 17, 183, 189); - RT_INTERFACE!{static interface IBluetoothLEAdvertisementBytePatternFactory(IBluetoothLEAdvertisementBytePatternFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementBytePatternFactory] { - #[cfg(feature="windows.storage")] fn Create(&mut self, dataType: u8, offset: i16, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut BluetoothLEAdvertisementBytePattern) -> HRESULT - }} - impl IBluetoothLEAdvertisementBytePatternFactory { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create(&mut self, dataType: u8, offset: i16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[inline] pub unsafe fn create_contact_list_in_account_async(&mut self, displayName: &HStringArg, userDataAccountId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, dataType, offset, data as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).CreateContactListInAccountAsync)(self, displayName.get(), userDataAccountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IBluetoothLEAdvertisementBytePattern, 4227520498, 47557, 18952, 188, 81, 80, 47, 142, 246, 138, 121); - RT_INTERFACE!{interface IBluetoothLEAdvertisementBytePattern(IBluetoothLEAdvertisementBytePatternVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementBytePattern] { - fn get_DataType(&mut self, out: *mut u8) -> HRESULT, - fn put_DataType(&mut self, value: u8) -> HRESULT, - fn get_Offset(&mut self, out: *mut i16) -> HRESULT, - fn put_Offset(&mut self, value: i16) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT - }} - impl IBluetoothLEAdvertisementBytePattern { - #[inline] pub unsafe fn get_data_type(&mut self) -> Result { + RT_CLASS!{class ContactChangeTracker: IContactChangeTracker} + RT_CLASS!{class ContactChangedEventArgs: IContactChangedEventArgs} + RT_CLASS!{class AggregateContactManager: IAggregateContactManager} + RT_CLASS!{class ContactList: IContactList} + RT_CLASS!{class ContactReader: IContactReader} + RT_CLASS!{class ContactQueryOptions: IContactQueryOptions [IContactQueryOptionsFactory] [CLSID_ContactQueryOptions]} + DEFINE_CLSID!(CLSID_ContactQueryOptions = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,111,110,116,97,99,116,115,46,67,111,110,116,97,99,116,81,117,101,114,121,79,112,116,105,111,110,115,0]); + DEFINE_IID!(IID_IContactList, 383642741, 14636, 18501, 157, 251, 81, 163, 231, 239, 62, 66); + RT_INTERFACE!{interface IContactList(IContactListVtbl): IInspectable(IInspectableVtbl) [IID_IContactList] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_SourceDisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsHidden(&mut self, out: *mut bool) -> HRESULT, + fn put_IsHidden(&mut self, value: bool) -> HRESULT, + fn get_OtherAppReadAccess(&mut self, out: *mut ContactListOtherAppReadAccess) -> HRESULT, + fn put_OtherAppReadAccess(&mut self, value: ContactListOtherAppReadAccess) -> HRESULT, + fn get_OtherAppWriteAccess(&mut self, out: *mut ContactListOtherAppWriteAccess) -> HRESULT, + fn put_OtherAppWriteAccess(&mut self, value: ContactListOtherAppWriteAccess) -> HRESULT, + fn get_ChangeTracker(&mut self, out: *mut *mut ContactChangeTracker) -> HRESULT, + fn get_SyncManager(&mut self, out: *mut *mut ContactListSyncManager) -> HRESULT, + fn get_SupportsServerSearch(&mut self, out: *mut bool) -> HRESULT, + fn get_UserDataAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn add_ContactChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContactChanged(&mut self, value: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn SaveAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetContactFromRemoteIdAsync(&mut self, remoteId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetMeContactAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetContactReader(&mut self, out: *mut *mut ContactReader) -> HRESULT, + fn GetContactReaderWithOptions(&mut self, options: *mut ContactQueryOptions, out: *mut *mut ContactReader) -> HRESULT, + fn SaveContactAsync(&mut self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteContactAsync(&mut self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetContactAsync(&mut self, contactId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IContactList { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceDisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_hidden(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DataType)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsHidden)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_data_type(&mut self, value: u8) -> Result<()> { - let hr = ((*self.lpVtbl).put_DataType)(self, value); + #[inline] pub unsafe fn set_is_hidden(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsHidden)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_offset(&mut self) -> Result { + #[inline] pub unsafe fn get_other_app_read_access(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Offset)(self, &mut out); + let hr = ((*self.lpVtbl).get_OtherAppReadAccess)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_offset(&mut self, value: i16) -> Result<()> { - let hr = ((*self.lpVtbl).put_Offset)(self, value); + #[inline] pub unsafe fn set_other_app_read_access(&mut self, value: ContactListOtherAppReadAccess) -> Result<()> { + let hr = ((*self.lpVtbl).put_OtherAppReadAccess)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + #[inline] pub unsafe fn get_other_app_write_access(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OtherAppWriteAccess)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_other_app_write_access(&mut self, value: ContactListOtherAppWriteAccess) -> Result<()> { + let hr = ((*self.lpVtbl).put_OtherAppWriteAccess)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_change_tracker(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChangeTracker)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_sync_manager(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SyncManager)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IBluetoothLEAdvertisementDataTypesStatics, 1001801519, 1542, 17227, 167, 110, 116, 21, 159, 6, 132, 211); - RT_INTERFACE!{static interface IBluetoothLEAdvertisementDataTypesStatics(IBluetoothLEAdvertisementDataTypesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementDataTypesStatics] { - fn get_Flags(&mut self, out: *mut u8) -> HRESULT, - fn get_IncompleteService16BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_CompleteService16BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_IncompleteService32BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_CompleteService32BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_IncompleteService128BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_CompleteService128BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_ShortenedLocalName(&mut self, out: *mut u8) -> HRESULT, - fn get_CompleteLocalName(&mut self, out: *mut u8) -> HRESULT, - fn get_TxPowerLevel(&mut self, out: *mut u8) -> HRESULT, - fn get_SlaveConnectionIntervalRange(&mut self, out: *mut u8) -> HRESULT, - fn get_ServiceSolicitation16BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_ServiceSolicitation32BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_ServiceSolicitation128BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_ServiceData16BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_ServiceData32BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_ServiceData128BitUuids(&mut self, out: *mut u8) -> HRESULT, - fn get_PublicTargetAddress(&mut self, out: *mut u8) -> HRESULT, - fn get_RandomTargetAddress(&mut self, out: *mut u8) -> HRESULT, - fn get_Appearance(&mut self, out: *mut u8) -> HRESULT, - fn get_AdvertisingInterval(&mut self, out: *mut u8) -> HRESULT, - fn get_ManufacturerSpecificData(&mut self, out: *mut u8) -> HRESULT - }} - impl IBluetoothLEAdvertisementDataTypesStatics { - #[inline] pub unsafe fn get_flags(&mut self) -> Result { + #[inline] pub unsafe fn get_supports_server_search(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Flags)(self, &mut out); + let hr = ((*self.lpVtbl).get_SupportsServerSearch)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_incomplete_service16_bit_uuids(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IncompleteService16BitUuids)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_user_data_account_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserDataAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_complete_service16_bit_uuids(&mut self) -> Result { + #[inline] pub unsafe fn add_contact_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CompleteService16BitUuids)(self, &mut out); + let hr = ((*self.lpVtbl).add_ContactChanged)(self, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_incomplete_service32_bit_uuids(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IncompleteService32BitUuids)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_contact_changed(&mut self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContactChanged)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_complete_service32_bit_uuids(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CompleteService32BitUuids)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn save_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_incomplete_service128_bit_uuids(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IncompleteService128BitUuids)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn delete_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_complete_service128_bit_uuids(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CompleteService128BitUuids)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_contact_from_remote_id_async(&mut self, remoteId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetContactFromRemoteIdAsync)(self, remoteId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_shortened_local_name(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ShortenedLocalName)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_me_contact_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMeContactAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_complete_local_name(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CompleteLocalName)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_contact_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetContactReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_tx_power_level(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TxPowerLevel)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_contact_reader_with_options(&mut self, options: &ContactQueryOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetContactReaderWithOptions)(self, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_slave_connection_interval_range(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SlaveConnectionIntervalRange)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn save_contact_async(&mut self, contact: &Contact) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveContactAsync)(self, contact as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_service_solicitation16_bit_uuids(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceSolicitation16BitUuids)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn delete_contact_async(&mut self, contact: &Contact) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteContactAsync)(self, contact as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_service_solicitation32_bit_uuids(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceSolicitation32BitUuids)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_contact_async(&mut self, contactId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetContactAsync)(self, contactId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_service_solicitation128_bit_uuids(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceSolicitation128BitUuids)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class ContactListSyncManager: IContactListSyncManager} + DEFINE_IID!(IID_IContactList2, 3409527732, 17744, 19915, 146, 41, 64, 255, 145, 251, 2, 3); + RT_INTERFACE!{interface IContactList2(IContactList2Vtbl): IInspectable(IInspectableVtbl) [IID_IContactList2] { + fn RegisterSyncManagerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn put_SupportsServerSearch(&mut self, value: bool) -> HRESULT, + fn get_SyncConstraints(&mut self, out: *mut *mut ContactListSyncConstraints) -> HRESULT + }} + impl IContactList2 { + #[inline] pub unsafe fn register_sync_manager_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RegisterSyncManagerAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_service_data16_bit_uuids(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceData16BitUuids)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_supports_server_search(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SupportsServerSearch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_service_data32_bit_uuids(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceData32BitUuids)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_sync_constraints(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SyncConstraints)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_service_data128_bit_uuids(&mut self) -> Result { + } + RT_CLASS!{class ContactListSyncConstraints: IContactListSyncConstraints} + DEFINE_IID!(IID_IContactListSyncManager, 342787006, 31013, 19148, 157, 229, 33, 221, 208, 111, 134, 116); + RT_INTERFACE!{interface IContactListSyncManager(IContactListSyncManagerVtbl): IInspectable(IInspectableVtbl) [IID_IContactListSyncManager] { + fn get_Status(&mut self, out: *mut ContactListSyncStatus) -> HRESULT, + fn get_LastSuccessfulSyncTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_LastAttemptedSyncTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn SyncAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_SyncStatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IContactListSyncManager { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceData128BitUuids)(self, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_public_target_address(&mut self) -> Result { + #[inline] pub unsafe fn get_last_successful_sync_time(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PublicTargetAddress)(self, &mut out); + let hr = ((*self.lpVtbl).get_LastSuccessfulSyncTime)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_random_target_address(&mut self) -> Result { + #[inline] pub unsafe fn get_last_attempted_sync_time(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RandomTargetAddress)(self, &mut out); + let hr = ((*self.lpVtbl).get_LastAttemptedSyncTime)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_appearance(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Appearance)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn sync_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SyncAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_advertising_interval(&mut self) -> Result { + #[inline] pub unsafe fn add_sync_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AdvertisingInterval)(self, &mut out); + let hr = ((*self.lpVtbl).add_SyncStatusChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_manufacturer_specific_data(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ManufacturerSpecificData)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_sync_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SyncStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_ACTIVATABLE!{IBluetoothLEAdvertisementDataTypesStatics [CLSID_BluetoothLEAdvertisementDataTypes]} - DEFINE_CLSID!(CLSID_BluetoothLEAdvertisementDataTypes = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,65,100,118,101,114,116,105,115,101,109,101,110,116,68,97,116,97,84,121,112,101,115,0]); - RT_ENUM! { enum BluetoothLEAdvertisementPublisherStatus: i32 { - Created (BluetoothLEAdvertisementPublisherStatus_Created) = 0, Waiting (BluetoothLEAdvertisementPublisherStatus_Waiting) = 1, Started (BluetoothLEAdvertisementPublisherStatus_Started) = 2, Stopping (BluetoothLEAdvertisementPublisherStatus_Stopping) = 3, Stopped (BluetoothLEAdvertisementPublisherStatus_Stopped) = 4, Aborted (BluetoothLEAdvertisementPublisherStatus_Aborted) = 5, - }} - DEFINE_IID!(IID_IBluetoothLEAdvertisementPublisherStatusChangedEventArgs, 163757471, 11775, 19235, 134, 238, 13, 20, 251, 148, 174, 174); - RT_INTERFACE!{interface IBluetoothLEAdvertisementPublisherStatusChangedEventArgs(IBluetoothLEAdvertisementPublisherStatusChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementPublisherStatusChangedEventArgs] { - fn get_Status(&mut self, out: *mut BluetoothLEAdvertisementPublisherStatus) -> HRESULT, - fn get_Error(&mut self, out: *mut super::BluetoothError) -> HRESULT + DEFINE_IID!(IID_IContactListSyncManager2, 2841186887, 47957, 20003, 129, 40, 55, 1, 52, 168, 93, 13); + RT_INTERFACE!{interface IContactListSyncManager2(IContactListSyncManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IContactListSyncManager2] { + fn put_Status(&mut self, value: ContactListSyncStatus) -> HRESULT, + fn put_LastSuccessfulSyncTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn put_LastAttemptedSyncTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT }} - impl IBluetoothLEAdvertisementPublisherStatusChangedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IContactListSyncManager2 { + #[inline] pub unsafe fn set_status(&mut self, value: ContactListSyncStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_Status)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_error(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Error)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_last_successful_sync_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_LastSuccessfulSyncTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class BluetoothLEAdvertisementPublisherStatusChangedEventArgs: IBluetoothLEAdvertisementPublisherStatusChangedEventArgs} - DEFINE_IID!(IID_IBluetoothLEAdvertisementPublisherFactory, 1549731422, 47203, 18817, 161, 175, 28, 84, 77, 139, 12, 13); - RT_INTERFACE!{static interface IBluetoothLEAdvertisementPublisherFactory(IBluetoothLEAdvertisementPublisherFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementPublisherFactory] { - fn Create(&mut self, advertisement: *mut BluetoothLEAdvertisement, out: *mut *mut BluetoothLEAdvertisementPublisher) -> HRESULT - }} - impl IBluetoothLEAdvertisementPublisherFactory { - #[inline] pub unsafe fn create(&mut self, advertisement: &BluetoothLEAdvertisement) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, advertisement as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_last_attempted_sync_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_LastAttemptedSyncTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class BluetoothLEAdvertisementPublisher: IBluetoothLEAdvertisementPublisher [IBluetoothLEAdvertisementPublisherFactory] [CLSID_BluetoothLEAdvertisementPublisher]} - DEFINE_CLSID!(CLSID_BluetoothLEAdvertisementPublisher = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,65,100,118,101,114,116,105,115,101,109,101,110,116,80,117,98,108,105,115,104,101,114,0]); - DEFINE_IID!(IID_IBluetoothLEAdvertisementPublisher, 3454542073, 55802, 17366, 162, 100, 221, 216, 183, 218, 139, 120); - RT_INTERFACE!{interface IBluetoothLEAdvertisementPublisher(IBluetoothLEAdvertisementPublisherVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementPublisher] { - fn get_Status(&mut self, out: *mut BluetoothLEAdvertisementPublisherStatus) -> HRESULT, - fn get_Advertisement(&mut self, out: *mut *mut BluetoothLEAdvertisement) -> HRESULT, - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT, - fn add_StatusChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_IContactListSyncConstraints, 2997927681, 12386, 20014, 150, 157, 1, 141, 25, 135, 243, 20); + RT_INTERFACE!{interface IContactListSyncConstraints(IContactListSyncConstraintsVtbl): IInspectable(IInspectableVtbl) [IID_IContactListSyncConstraints] { + fn get_CanSyncDescriptions(&mut self, out: *mut bool) -> HRESULT, + fn put_CanSyncDescriptions(&mut self, value: bool) -> HRESULT, + fn get_MaxHomePhoneNumbers(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxHomePhoneNumbers(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxMobilePhoneNumbers(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxMobilePhoneNumbers(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxWorkPhoneNumbers(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxWorkPhoneNumbers(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxOtherPhoneNumbers(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxOtherPhoneNumbers(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxPagerPhoneNumbers(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxPagerPhoneNumbers(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxBusinessFaxPhoneNumbers(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxBusinessFaxPhoneNumbers(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxHomeFaxPhoneNumbers(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxHomeFaxPhoneNumbers(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxCompanyPhoneNumbers(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxCompanyPhoneNumbers(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxAssistantPhoneNumbers(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxAssistantPhoneNumbers(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxRadioPhoneNumbers(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxRadioPhoneNumbers(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxPersonalEmailAddresses(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxPersonalEmailAddresses(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxWorkEmailAddresses(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxWorkEmailAddresses(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxOtherEmailAddresses(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxOtherEmailAddresses(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxHomeAddresses(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxHomeAddresses(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxWorkAddresses(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxWorkAddresses(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxOtherAddresses(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxOtherAddresses(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxBirthdayDates(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxBirthdayDates(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxAnniversaryDates(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxAnniversaryDates(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxOtherDates(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxOtherDates(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxOtherRelationships(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxOtherRelationships(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxSpouseRelationships(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxSpouseRelationships(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxPartnerRelationships(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxPartnerRelationships(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxSiblingRelationships(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxSiblingRelationships(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxParentRelationships(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxParentRelationships(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxChildRelationships(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxChildRelationships(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxJobInfo(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxJobInfo(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxWebsites(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxWebsites(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT }} - impl IBluetoothLEAdvertisementPublisher { - #[inline] pub unsafe fn get_status(&mut self) -> Result { + impl IContactListSyncConstraints { + #[inline] pub unsafe fn get_can_sync_descriptions(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanSyncDescriptions)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_advertisement(&mut self) -> Result> { + #[inline] pub unsafe fn set_can_sync_descriptions(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanSyncDescriptions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_home_phone_numbers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Advertisement)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxHomePhoneNumbers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); + #[inline] pub unsafe fn set_max_home_phone_numbers(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxHomePhoneNumbers)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_status_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_StatusChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_max_mobile_phone_numbers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxMobilePhoneNumbers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_status_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_StatusChanged)(self, token); + #[inline] pub unsafe fn set_max_mobile_phone_numbers(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxMobilePhoneNumbers)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - } -} // Windows.Devices.Bluetooth.Advertisement -pub mod background { // Windows.Devices.Bluetooth.Background -use ::prelude::*; - RT_CLASS!{class RfcommInboundConnectionInformation: IRfcommInboundConnectionInformation} - RT_CLASS!{class RfcommOutboundConnectionInformation: IRfcommOutboundConnectionInformation} - DEFINE_IID!(IID_IRfcommInboundConnectionInformation, 1832809896, 21545, 16473, 146, 227, 30, 139, 101, 82, 135, 7); - RT_INTERFACE!{interface IRfcommInboundConnectionInformation(IRfcommInboundConnectionInformationVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommInboundConnectionInformation] { - #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_SdpRecord(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.storage")] fn put_SdpRecord(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - fn get_LocalServiceId(&mut self, out: *mut *mut super::rfcomm::RfcommServiceId) -> HRESULT, - fn put_LocalServiceId(&mut self, value: *mut super::rfcomm::RfcommServiceId) -> HRESULT, - fn get_ServiceCapabilities(&mut self, out: *mut super::BluetoothServiceCapabilities) -> HRESULT, - fn put_ServiceCapabilities(&mut self, value: super::BluetoothServiceCapabilities) -> HRESULT - }} - impl IRfcommInboundConnectionInformation { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_sdp_record(&mut self) -> Result> { + #[inline] pub unsafe fn get_max_work_phone_numbers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SdpRecord)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxWorkPhoneNumbers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_sdp_record(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_SdpRecord)(self, value as *const _ as *mut _); + #[inline] pub unsafe fn set_max_work_phone_numbers(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxWorkPhoneNumbers)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_local_service_id(&mut self) -> Result> { + #[inline] pub unsafe fn get_max_other_phone_numbers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_LocalServiceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxOtherPhoneNumbers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_local_service_id(&mut self, value: &super::rfcomm::RfcommServiceId) -> Result<()> { - let hr = ((*self.lpVtbl).put_LocalServiceId)(self, value as *const _ as *mut _); + #[inline] pub unsafe fn set_max_other_phone_numbers(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxOtherPhoneNumbers)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_service_capabilities(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceCapabilities)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_max_pager_phone_numbers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxPagerPhoneNumbers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_service_capabilities(&mut self, value: super::BluetoothServiceCapabilities) -> Result<()> { - let hr = ((*self.lpVtbl).put_ServiceCapabilities)(self, value); + #[inline] pub unsafe fn set_max_pager_phone_numbers(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxPagerPhoneNumbers)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IRfcommOutboundConnectionInformation, 2962301563, 62516, 19632, 153, 177, 74, 184, 206, 218, 237, 215); - RT_INTERFACE!{interface IRfcommOutboundConnectionInformation(IRfcommOutboundConnectionInformationVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommOutboundConnectionInformation] { - fn get_RemoteServiceId(&mut self, out: *mut *mut super::rfcomm::RfcommServiceId) -> HRESULT, - fn put_RemoteServiceId(&mut self, value: *mut super::rfcomm::RfcommServiceId) -> HRESULT - }} - impl IRfcommOutboundConnectionInformation { - #[inline] pub unsafe fn get_remote_service_id(&mut self) -> Result> { + #[inline] pub unsafe fn get_max_business_fax_phone_numbers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RemoteServiceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxBusinessFaxPhoneNumbers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_remote_service_id(&mut self, value: &super::rfcomm::RfcommServiceId) -> Result<()> { - let hr = ((*self.lpVtbl).put_RemoteServiceId)(self, value as *const _ as *mut _); + #[inline] pub unsafe fn set_max_business_fax_phone_numbers(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxBusinessFaxPhoneNumbers)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IRfcommConnectionTriggerDetails, 4179784525, 11836, 20220, 171, 89, 252, 92, 249, 111, 151, 227); - RT_INTERFACE!{interface IRfcommConnectionTriggerDetails(IRfcommConnectionTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommConnectionTriggerDetails] { - #[cfg(not(feature="windows.networking"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.networking")] fn get_Socket(&mut self, out: *mut *mut ::rt::gen::windows::networking::sockets::StreamSocket) -> HRESULT, - fn get_Incoming(&mut self, out: *mut bool) -> HRESULT, - fn get_RemoteDevice(&mut self, out: *mut *mut super::BluetoothDevice) -> HRESULT - }} - impl IRfcommConnectionTriggerDetails { - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_socket(&mut self) -> Result> { + #[inline] pub unsafe fn get_max_home_fax_phone_numbers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Socket)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxHomeFaxPhoneNumbers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_incoming(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Incoming)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_max_home_fax_phone_numbers(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxHomeFaxPhoneNumbers)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_remote_device(&mut self) -> Result> { + #[inline] pub unsafe fn get_max_company_phone_numbers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RemoteDevice)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxCompanyPhoneNumbers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class RfcommConnectionTriggerDetails: IRfcommConnectionTriggerDetails} - DEFINE_IID!(IID_IGattCharacteristicNotificationTriggerDetails, 2610969368, 4076, 17258, 147, 177, 244, 108, 105, 117, 50, 162); - RT_INTERFACE!{interface IGattCharacteristicNotificationTriggerDetails(IGattCharacteristicNotificationTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicNotificationTriggerDetails] { - fn get_Characteristic(&mut self, out: *mut *mut super::genericattributeprofile::GattCharacteristic) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_Value(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT - }} - impl IGattCharacteristicNotificationTriggerDetails { - #[inline] pub unsafe fn get_characteristic(&mut self) -> Result> { + #[inline] pub unsafe fn set_max_company_phone_numbers(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxCompanyPhoneNumbers)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_assistant_phone_numbers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Characteristic)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxAssistantPhoneNumbers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_value(&mut self) -> Result> { + #[inline] pub unsafe fn set_max_assistant_phone_numbers(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxAssistantPhoneNumbers)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_radio_phone_numbers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxRadioPhoneNumbers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class GattCharacteristicNotificationTriggerDetails: IGattCharacteristicNotificationTriggerDetails} - DEFINE_IID!(IID_IBluetoothLEAdvertisementWatcherTriggerDetails, 2816170711, 8791, 20073, 151, 132, 254, 230, 69, 193, 220, 224); - RT_INTERFACE!{interface IBluetoothLEAdvertisementWatcherTriggerDetails(IBluetoothLEAdvertisementWatcherTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementWatcherTriggerDetails] { - fn get_Error(&mut self, out: *mut super::BluetoothError) -> HRESULT, - fn get_Advertisements(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_SignalStrengthFilter(&mut self, out: *mut *mut super::BluetoothSignalStrengthFilter) -> HRESULT - }} - impl IBluetoothLEAdvertisementWatcherTriggerDetails { - #[inline] pub unsafe fn get_error(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Error)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_max_radio_phone_numbers(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxRadioPhoneNumbers)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_advertisements(&mut self) -> Result>> { + #[inline] pub unsafe fn get_max_personal_email_addresses(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Advertisements)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxPersonalEmailAddresses)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_signal_strength_filter(&mut self) -> Result> { + #[inline] pub unsafe fn set_max_personal_email_addresses(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxPersonalEmailAddresses)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_work_email_addresses(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SignalStrengthFilter)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxWorkEmailAddresses)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class BluetoothLEAdvertisementWatcherTriggerDetails: IBluetoothLEAdvertisementWatcherTriggerDetails} - DEFINE_IID!(IID_IBluetoothLEAdvertisementPublisherTriggerDetails, 1628359302, 13440, 16841, 169, 24, 125, 218, 223, 32, 126, 0); - RT_INTERFACE!{interface IBluetoothLEAdvertisementPublisherTriggerDetails(IBluetoothLEAdvertisementPublisherTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementPublisherTriggerDetails] { - fn get_Status(&mut self, out: *mut super::advertisement::BluetoothLEAdvertisementPublisherStatus) -> HRESULT, - fn get_Error(&mut self, out: *mut super::BluetoothError) -> HRESULT - }} - impl IBluetoothLEAdvertisementPublisherTriggerDetails { - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Error)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_max_work_email_addresses(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxWorkEmailAddresses)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class BluetoothLEAdvertisementPublisherTriggerDetails: IBluetoothLEAdvertisementPublisherTriggerDetails} -} // Windows.Devices.Bluetooth.Background -} // Windows.Devices.Bluetooth -pub mod enumeration { // Windows.Devices.Enumeration -use ::prelude::*; - DEFINE_IID!(IID_IDeviceConnectionChangeTriggerDetails, 3092745228, 48065, 18507, 191, 250, 123, 49, 220, 194, 0, 178); - RT_INTERFACE!{interface IDeviceConnectionChangeTriggerDetails(IDeviceConnectionChangeTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceConnectionChangeTriggerDetails] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IDeviceConnectionChangeTriggerDetails { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn get_max_other_email_addresses(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_MaxOtherEmailAddresses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class DeviceConnectionChangeTriggerDetails: IDeviceConnectionChangeTriggerDetails} - RT_ENUM! { enum DevicePickerDisplayStatusOptions: u32 { - None (DevicePickerDisplayStatusOptions_None) = 0, ShowProgress (DevicePickerDisplayStatusOptions_ShowProgress) = 1, ShowDisconnectButton (DevicePickerDisplayStatusOptions_ShowDisconnectButton) = 2, ShowRetryButton (DevicePickerDisplayStatusOptions_ShowRetryButton) = 4, - }} - DEFINE_IID!(IID_IDevicePickerAppearance, 3868857030, 58919, 20184, 155, 108, 70, 10, 244, 69, 229, 109); - RT_INTERFACE!{interface IDevicePickerAppearance(IDevicePickerAppearanceVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePickerAppearance] { - fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_Title(&mut self, value: HSTRING) -> HRESULT, - #[cfg(feature="windows.ui")] fn get_ForegroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, - #[cfg(feature="windows.ui")] fn put_ForegroundColor(&mut self, value: super::super::ui::Color) -> HRESULT, - #[cfg(feature="windows.ui")] fn get_BackgroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, - #[cfg(feature="windows.ui")] fn put_BackgroundColor(&mut self, value: super::super::ui::Color) -> HRESULT, - #[cfg(feature="windows.ui")] fn get_AccentColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, - #[cfg(feature="windows.ui")] fn put_AccentColor(&mut self, value: super::super::ui::Color) -> HRESULT, - #[cfg(feature="windows.ui")] fn get_SelectedForegroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, - #[cfg(feature="windows.ui")] fn put_SelectedForegroundColor(&mut self, value: super::super::ui::Color) -> HRESULT, - #[cfg(feature="windows.ui")] fn get_SelectedBackgroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, - #[cfg(feature="windows.ui")] fn put_SelectedBackgroundColor(&mut self, value: super::super::ui::Color) -> HRESULT, - #[cfg(feature="windows.ui")] fn get_SelectedAccentColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, - #[cfg(feature="windows.ui")] fn put_SelectedAccentColor(&mut self, value: super::super::ui::Color) -> HRESULT - }} - impl IDevicePickerAppearance { - #[inline] pub unsafe fn get_title(&mut self) -> Result { + #[inline] pub unsafe fn set_max_other_email_addresses(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxOtherEmailAddresses)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_home_addresses(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Title)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_MaxHomeAddresses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + #[inline] pub unsafe fn set_max_home_addresses(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxHomeAddresses)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_foreground_color(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ForegroundColor)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_max_work_addresses(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxWorkAddresses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_foreground_color(&mut self, value: super::super::ui::Color) -> Result<()> { - let hr = ((*self.lpVtbl).put_ForegroundColor)(self, value); + #[inline] pub unsafe fn set_max_work_addresses(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxWorkAddresses)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_background_color(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BackgroundColor)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_max_other_addresses(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxOtherAddresses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_background_color(&mut self, value: super::super::ui::Color) -> Result<()> { - let hr = ((*self.lpVtbl).put_BackgroundColor)(self, value); + #[inline] pub unsafe fn set_max_other_addresses(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxOtherAddresses)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_accent_color(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AccentColor)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_max_birthday_dates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxBirthdayDates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_accent_color(&mut self, value: super::super::ui::Color) -> Result<()> { - let hr = ((*self.lpVtbl).put_AccentColor)(self, value); + #[inline] pub unsafe fn set_max_birthday_dates(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxBirthdayDates)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_selected_foreground_color(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SelectedForegroundColor)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_max_anniversary_dates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxAnniversaryDates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_selected_foreground_color(&mut self, value: super::super::ui::Color) -> Result<()> { - let hr = ((*self.lpVtbl).put_SelectedForegroundColor)(self, value); + #[inline] pub unsafe fn set_max_anniversary_dates(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxAnniversaryDates)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_selected_background_color(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SelectedBackgroundColor)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_max_other_dates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxOtherDates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_selected_background_color(&mut self, value: super::super::ui::Color) -> Result<()> { - let hr = ((*self.lpVtbl).put_SelectedBackgroundColor)(self, value); + #[inline] pub unsafe fn set_max_other_dates(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxOtherDates)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_selected_accent_color(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SelectedAccentColor)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_max_other_relationships(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxOtherRelationships)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_selected_accent_color(&mut self, value: super::super::ui::Color) -> Result<()> { - let hr = ((*self.lpVtbl).put_SelectedAccentColor)(self, value); + #[inline] pub unsafe fn set_max_other_relationships(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxOtherRelationships)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class DevicePickerAppearance: IDevicePickerAppearance} - DEFINE_IID!(IID_IDeviceSelectedEventArgs, 647944926, 7471, 18752, 132, 2, 65, 86, 184, 29, 60, 119); - RT_INTERFACE!{interface IDeviceSelectedEventArgs(IDeviceSelectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceSelectedEventArgs] { - fn get_SelectedDevice(&mut self, out: *mut *mut DeviceInformation) -> HRESULT - }} - impl IDeviceSelectedEventArgs { - #[inline] pub unsafe fn get_selected_device(&mut self) -> Result> { + #[inline] pub unsafe fn get_max_spouse_relationships(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SelectedDevice)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxSpouseRelationships)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class DeviceSelectedEventArgs: IDeviceSelectedEventArgs} - DEFINE_IID!(IID_IDeviceDisconnectButtonClickedEventArgs, 2386867565, 63746, 18944, 181, 54, 243, 121, 146, 230, 162, 167); - RT_INTERFACE!{interface IDeviceDisconnectButtonClickedEventArgs(IDeviceDisconnectButtonClickedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceDisconnectButtonClickedEventArgs] { - fn get_Device(&mut self, out: *mut *mut DeviceInformation) -> HRESULT - }} - impl IDeviceDisconnectButtonClickedEventArgs { - #[inline] pub unsafe fn get_device(&mut self) -> Result> { + #[inline] pub unsafe fn set_max_spouse_relationships(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxSpouseRelationships)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_partner_relationships(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Device)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxPartnerRelationships)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class DeviceDisconnectButtonClickedEventArgs: IDeviceDisconnectButtonClickedEventArgs} - DEFINE_IID!(IID_IDevicePickerFilter, 2447086242, 22475, 18673, 155, 89, 165, 155, 122, 31, 2, 162); - RT_INTERFACE!{interface IDevicePickerFilter(IDevicePickerFilterVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePickerFilter] { - fn get_SupportedDeviceClasses(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_SupportedDeviceSelectors(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT - }} - impl IDevicePickerFilter { - #[inline] pub unsafe fn get_supported_device_classes(&mut self) -> Result>> { + #[inline] pub unsafe fn set_max_partner_relationships(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxPartnerRelationships)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_sibling_relationships(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedDeviceClasses)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxSiblingRelationships)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_device_selectors(&mut self) -> Result>> { + #[inline] pub unsafe fn set_max_sibling_relationships(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxSiblingRelationships)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_parent_relationships(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedDeviceSelectors)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxParentRelationships)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class DevicePickerFilter: IDevicePickerFilter} - DEFINE_IID!(IID_IDevicePicker, 2224650914, 842, 17472, 136, 19, 125, 11, 212, 121, 191, 90); - RT_INTERFACE!{interface IDevicePicker(IDevicePickerVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePicker] { - fn get_Filter(&mut self, out: *mut *mut DevicePickerFilter) -> HRESULT, - fn get_Appearance(&mut self, out: *mut *mut DevicePickerAppearance) -> HRESULT, - fn get_RequestedProperties(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn add_DeviceSelected(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DeviceSelected(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DisconnectButtonClicked(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DisconnectButtonClicked(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DevicePickerDismissed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DevicePickerDismissed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn Show(&mut self, selection: super::super::foundation::Rect) -> HRESULT, - #[cfg(not(feature="windows.ui"))] fn __Dummy10(&mut self) -> (), - #[cfg(feature="windows.ui")] fn ShowWithPlacement(&mut self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement) -> HRESULT, - fn PickSingleDeviceAsync(&mut self, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.ui"))] fn __Dummy12(&mut self) -> (), - #[cfg(feature="windows.ui")] fn PickSingleDeviceAsyncWithPlacement(&mut self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn Hide(&mut self) -> HRESULT, - fn SetDisplayStatus(&mut self, device: *mut DeviceInformation, status: HSTRING, options: DevicePickerDisplayStatusOptions) -> HRESULT - }} - impl IDevicePicker { - #[inline] pub unsafe fn get_filter(&mut self) -> Result> { + #[inline] pub unsafe fn set_max_parent_relationships(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxParentRelationships)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_child_relationships(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Filter)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxChildRelationships)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_appearance(&mut self) -> Result> { + #[inline] pub unsafe fn set_max_child_relationships(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxChildRelationships)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_job_info(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Appearance)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxJobInfo)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_requested_properties(&mut self) -> Result>> { + #[inline] pub unsafe fn set_max_job_info(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxJobInfo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_websites(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RequestedProperties)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxWebsites)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_device_selected(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_DeviceSelected)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_max_websites(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxWebsites)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn remove_device_selected(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_DeviceSelected)(self, token); + } + DEFINE_IID!(IID_IContactConnectedServiceAccount, 4143461715, 43559, 18225, 142, 74, 61, 236, 92, 233, 238, 201); + RT_INTERFACE!{interface IContactConnectedServiceAccount(IContactConnectedServiceAccountVtbl): IInspectable(IInspectableVtbl) [IID_IContactConnectedServiceAccount] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Id(&mut self, value: HSTRING) -> HRESULT, + fn get_ServiceName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ServiceName(&mut self, value: HSTRING) -> HRESULT + }} + impl IContactConnectedServiceAccount { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Id)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_disconnect_button_clicked(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_DisconnectButtonClicked)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_service_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_disconnect_button_clicked(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_DisconnectButtonClicked)(self, token); + #[inline] pub unsafe fn set_service_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ServiceName)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_device_picker_dismissed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_DevicePickerDismissed)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IContactSignificantOther, 2289284523, 50683, 18136, 147, 254, 218, 63, 241, 147, 64, 84); + RT_INTERFACE!{interface IContactSignificantOther(IContactSignificantOtherVtbl): IInspectable(IInspectableVtbl) [IID_IContactSignificantOther] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT + }} + impl IContactSignificantOther { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_device_picker_dismissed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_DevicePickerDismissed)(self, token); + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn show(&mut self, selection: super::super::foundation::Rect) -> Result<()> { - let hr = ((*self.lpVtbl).Show)(self, selection); + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_with_placement(&mut self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement) -> Result<()> { - let hr = ((*self.lpVtbl).ShowWithPlacement)(self, selection, placement); + } + DEFINE_IID!(IID_IContactSignificantOther2, 2373702772, 16131, 17912, 186, 15, 196, 237, 55, 214, 66, 25); + RT_INTERFACE!{interface IContactSignificantOther2(IContactSignificantOther2Vtbl): IInspectable(IInspectableVtbl) [IID_IContactSignificantOther2] { + fn get_Relationship(&mut self, out: *mut ContactRelationship) -> HRESULT, + fn put_Relationship(&mut self, value: ContactRelationship) -> HRESULT + }} + impl IContactSignificantOther2 { + #[inline] pub unsafe fn get_relationship(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Relationship)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_relationship(&mut self, value: ContactRelationship) -> Result<()> { + let hr = ((*self.lpVtbl).put_Relationship)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn pick_single_device_async(&mut self, selection: super::super::foundation::Rect) -> Result>> { + } + DEFINE_IID!(IID_IContactWebsite, 2668822902, 56347, 16469, 173, 102, 101, 47, 57, 217, 144, 232); + RT_INTERFACE!{interface IContactWebsite(IContactWebsiteVtbl): IInspectable(IInspectableVtbl) [IID_IContactWebsite] { + fn get_Uri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_Uri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT + }} + impl IContactWebsite { + #[inline] pub unsafe fn get_uri(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).PickSingleDeviceAsync)(self, selection, &mut out); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn pick_single_device_async_with_placement(&mut self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement) -> Result>> { + #[inline] pub unsafe fn set_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Uri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).PickSingleDeviceAsyncWithPlacement)(self, selection, placement, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn hide(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Hide)(self); + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_display_status(&mut self, device: &DeviceInformation, status: &HStringArg, options: DevicePickerDisplayStatusOptions) -> Result<()> { - let hr = ((*self.lpVtbl).SetDisplayStatus)(self, device as *const _ as *mut _, status.get(), options); + } + DEFINE_IID!(IID_IContactWebsite2, 4169066782, 22087, 16488, 187, 94, 75, 111, 67, 124, 227, 8); + RT_INTERFACE!{interface IContactWebsite2(IContactWebsite2Vtbl): IInspectable(IInspectableVtbl) [IID_IContactWebsite2] { + fn get_RawValue(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RawValue(&mut self, value: HSTRING) -> HRESULT + }} + impl IContactWebsite2 { + #[inline] pub unsafe fn get_raw_value(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RawValue)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_raw_value(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RawValue)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class DevicePicker: IDevicePicker} - RT_ENUM! { enum DeviceClass: i32 { - All (DeviceClass_All) = 0, AudioCapture (DeviceClass_AudioCapture) = 1, AudioRender (DeviceClass_AudioRender) = 2, PortableStorageDevice (DeviceClass_PortableStorageDevice) = 3, VideoCapture (DeviceClass_VideoCapture) = 4, ImageScanner (DeviceClass_ImageScanner) = 5, Location (DeviceClass_Location) = 6, - }} - RT_ENUM! { enum DeviceWatcherStatus: i32 { - Created (DeviceWatcherStatus_Created) = 0, Started (DeviceWatcherStatus_Started) = 1, EnumerationCompleted (DeviceWatcherStatus_EnumerationCompleted) = 2, Stopping (DeviceWatcherStatus_Stopping) = 3, Stopped (DeviceWatcherStatus_Stopped) = 4, Aborted (DeviceWatcherStatus_Aborted) = 5, - }} - #[cfg(feature="windows.storage")] RT_CLASS!{class DeviceThumbnail: super::super::storage::streams::IRandomAccessStreamWithContentType} - #[cfg(not(feature="windows.storage"))] RT_CLASS!{class DeviceThumbnail: IInspectable} - RT_ENUM! { enum Panel: i32 { - Unknown (Panel_Unknown) = 0, Front (Panel_Front) = 1, Back (Panel_Back) = 2, Top (Panel_Top) = 3, Bottom (Panel_Bottom) = 4, Left (Panel_Left) = 5, Right (Panel_Right) = 6, - }} - DEFINE_IID!(IID_IEnclosureLocation, 1110706727, 22544, 17820, 170, 187, 198, 94, 31, 129, 62, 207); - RT_INTERFACE!{interface IEnclosureLocation(IEnclosureLocationVtbl): IInspectable(IInspectableVtbl) [IID_IEnclosureLocation] { - fn get_InDock(&mut self, out: *mut bool) -> HRESULT, - fn get_InLid(&mut self, out: *mut bool) -> HRESULT, - fn get_Panel(&mut self, out: *mut Panel) -> HRESULT + DEFINE_IID!(IID_IContactEmail, 2426542505, 58323, 19811, 153, 59, 5, 185, 165, 57, 58, 191); + RT_INTERFACE!{interface IContactEmail(IContactEmailVtbl): IInspectable(IInspectableVtbl) [IID_IContactEmail] { + fn get_Address(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Address(&mut self, value: HSTRING) -> HRESULT, + fn get_Kind(&mut self, out: *mut ContactEmailKind) -> HRESULT, + fn put_Kind(&mut self, value: ContactEmailKind) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT }} - impl IEnclosureLocation { - #[inline] pub unsafe fn get_in_dock(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InDock)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IContactEmail { + #[inline] pub unsafe fn get_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Address)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_in_lid(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InLid)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Address)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_panel(&mut self) -> Result { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Panel)(self, &mut out); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IEnclosureLocation2, 679844187, 57469, 18525, 138, 158, 189, 242, 154, 239, 79, 102); - RT_INTERFACE!{interface IEnclosureLocation2(IEnclosureLocation2Vtbl): IInspectable(IInspectableVtbl) [IID_IEnclosureLocation2] { - fn get_RotationAngleInDegreesClockwise(&mut self, out: *mut u32) -> HRESULT - }} - impl IEnclosureLocation2 { - #[inline] pub unsafe fn get_rotation_angle_in_degrees_clockwise(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RotationAngleInDegreesClockwise)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_kind(&mut self, value: ContactEmailKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_Kind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class EnclosureLocation: IEnclosureLocation} - RT_ENUM! { enum DeviceInformationKind: i32 { - Unknown (DeviceInformationKind_Unknown) = 0, DeviceInterface (DeviceInformationKind_DeviceInterface) = 1, DeviceContainer (DeviceInformationKind_DeviceContainer) = 2, Device (DeviceInformationKind_Device) = 3, DeviceInterfaceClass (DeviceInformationKind_DeviceInterfaceClass) = 4, AssociationEndpoint (DeviceInformationKind_AssociationEndpoint) = 5, AssociationEndpointContainer (DeviceInformationKind_AssociationEndpointContainer) = 6, AssociationEndpointService (DeviceInformationKind_AssociationEndpointService) = 7, - }} - DEFINE_IID!(IID_IDeviceInformationUpdate, 2402374405, 55666, 17591, 163, 126, 158, 130, 44, 120, 33, 59); - RT_INTERFACE!{interface IDeviceInformationUpdate(IDeviceInformationUpdateVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationUpdate] { - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT - }} - impl IDeviceInformationUpdate { - #[inline] pub unsafe fn get_id(&mut self) -> Result { + #[inline] pub unsafe fn get_description(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IDeviceInformationUpdate2, 1570575500, 43123, 18526, 186, 166, 170, 98, 7, 136, 227, 204); - RT_INTERFACE!{interface IDeviceInformationUpdate2(IDeviceInformationUpdate2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationUpdate2] { - fn get_Kind(&mut self, out: *mut DeviceInformationKind) -> HRESULT + DEFINE_IID!(IID_IContactPhone, 1182640997, 10002, 20306, 183, 131, 158, 168, 17, 28, 99, 205); + RT_INTERFACE!{interface IContactPhone(IContactPhoneVtbl): IInspectable(IInspectableVtbl) [IID_IContactPhone] { + fn get_Number(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Number(&mut self, value: HSTRING) -> HRESULT, + fn get_Kind(&mut self, out: *mut ContactPhoneKind) -> HRESULT, + fn put_Kind(&mut self, value: ContactPhoneKind) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT }} - impl IDeviceInformationUpdate2 { - #[inline] pub unsafe fn get_kind(&mut self) -> Result { + impl IContactPhone { + #[inline] pub unsafe fn get_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Number)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_number(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Number)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn set_kind(&mut self, value: ContactPhoneKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_Kind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class DeviceInformationUpdate: IDeviceInformationUpdate} - RT_CLASS!{class DeviceInformationCollection: super::super::foundation::collections::IVectorView} - DEFINE_IID!(IID_IDeviceWatcher, 3387603325, 36715, 20374, 169, 244, 171, 200, 20, 226, 34, 113); - RT_INTERFACE!{interface IDeviceWatcher(IDeviceWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceWatcher] { - fn add_Added(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Updated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Status(&mut self, out: *mut DeviceWatcherStatus) -> HRESULT, - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT + DEFINE_IID!(IID_IContactAddress, 2537149338, 17102, 18546, 141, 112, 48, 99, 170, 88, 75, 112); + RT_INTERFACE!{interface IContactAddress(IContactAddressVtbl): IInspectable(IInspectableVtbl) [IID_IContactAddress] { + fn get_StreetAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_StreetAddress(&mut self, value: HSTRING) -> HRESULT, + fn get_Locality(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Locality(&mut self, value: HSTRING) -> HRESULT, + fn get_Region(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Region(&mut self, value: HSTRING) -> HRESULT, + fn get_Country(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Country(&mut self, value: HSTRING) -> HRESULT, + fn get_PostalCode(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PostalCode(&mut self, value: HSTRING) -> HRESULT, + fn get_Kind(&mut self, out: *mut ContactAddressKind) -> HRESULT, + fn put_Kind(&mut self, value: ContactAddressKind) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT }} - impl IDeviceWatcher { - #[inline] pub unsafe fn add_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Added)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IContactAddress { + #[inline] pub unsafe fn get_street_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StreetAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Added)(self, token); + #[inline] pub unsafe fn set_street_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_StreetAddress)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Updated)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_locality(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Locality)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Updated)(self, token); + #[inline] pub unsafe fn set_locality(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Locality)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Removed)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_region(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Region)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Removed)(self, token); + #[inline] pub unsafe fn set_region(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Region)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_country(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Country)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); + #[inline] pub unsafe fn set_country(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Country)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_postal_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PostalCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + #[inline] pub unsafe fn set_postal_code(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PostalCode)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); + #[inline] pub unsafe fn set_kind(&mut self, value: ContactAddressKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_Kind)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class DeviceWatcher: IDeviceWatcher} - RT_CLASS!{class DeviceInformation: IDeviceInformation} - RT_ACTIVATABLE!{IDeviceInformationStatics [CLSID_DeviceInformation]} - RT_ACTIVATABLE!{IDeviceInformationStatics2 [CLSID_DeviceInformation]} - DEFINE_CLSID!(CLSID_DeviceInformation = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,69,110,117,109,101,114,97,116,105,111,110,46,68,101,118,105,99,101,73,110,102,111,114,109,97,116,105,111,110,0]); - RT_ENUM! { enum DeviceWatcherEventKind: i32 { - Add (DeviceWatcherEventKind_Add) = 0, Update (DeviceWatcherEventKind_Update) = 1, Remove (DeviceWatcherEventKind_Remove) = 2, - }} - DEFINE_IID!(IID_IDeviceWatcher2, 4278732142, 60692, 18921, 154, 105, 129, 23, 197, 74, 233, 113); - RT_INTERFACE!{interface IDeviceWatcher2(IDeviceWatcher2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceWatcher2] { - #[cfg(feature="windows.applicationmodel")] fn GetBackgroundTrigger(&mut self, requestedEventKinds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::applicationmodel::background::DeviceWatcherTrigger) -> HRESULT + DEFINE_IID!(IID_IContactDate, 4271418982, 45573, 18740, 145, 116, 15, 242, 176, 86, 87, 7); + RT_INTERFACE!{interface IContactDate(IContactDateVtbl): IInspectable(IInspectableVtbl) [IID_IContactDate] { + fn get_Day(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Day(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Month(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Month(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Year(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Year(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Kind(&mut self, out: *mut ContactDateKind) -> HRESULT, + fn put_Kind(&mut self, value: ContactDateKind) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT }} - impl IDeviceWatcher2 { - #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_background_trigger(&mut self, requestedEventKinds: &super::super::foundation::collections::IIterable) -> Result> { + impl IContactDate { + #[inline] pub unsafe fn get_day(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetBackgroundTrigger)(self, requestedEventKinds as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Day)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IDeviceInformationStatics, 3246329870, 14918, 19064, 128, 19, 118, 157, 201, 185, 115, 144); - RT_INTERFACE!{static interface IDeviceInformationStatics(IDeviceInformationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationStatics] { - fn CreateFromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateFromIdAsyncAdditionalProperties(&mut self, deviceId: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsyncDeviceClass(&mut self, deviceClass: DeviceClass, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsyncAqsFilter(&mut self, aqsFilter: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsyncAqsFilterAndAdditionalProperties(&mut self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateWatcher(&mut self, out: *mut *mut DeviceWatcher) -> HRESULT, - fn CreateWatcherDeviceClass(&mut self, deviceClass: DeviceClass, out: *mut *mut DeviceWatcher) -> HRESULT, - fn CreateWatcherAqsFilter(&mut self, aqsFilter: HSTRING, out: *mut *mut DeviceWatcher) -> HRESULT, - fn CreateWatcherAqsFilterAndAdditionalProperties(&mut self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut DeviceWatcher) -> HRESULT - }} - impl IDeviceInformationStatics { - #[inline] pub unsafe fn create_from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn set_day(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Day)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_month(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).get_Month)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_from_id_async_additional_properties(&mut self, deviceId: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub unsafe fn set_month(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Month)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_year(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFromIdAsyncAdditionalProperties)(self, deviceId.get(), additionalProperties as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Year)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn find_all_async(&mut self) -> Result>> { + #[inline] pub unsafe fn set_year(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Year)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_kind(&mut self, value: ContactDateKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_Kind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn find_all_async_device_class(&mut self, deviceClass: DeviceClass) -> Result>> { + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContactJobInfo, 1829862220, 52816, 19267, 158, 105, 177, 130, 88, 234, 83, 21); + RT_INTERFACE!{interface IContactJobInfo(IContactJobInfoVtbl): IInspectable(IInspectableVtbl) [IID_IContactJobInfo] { + fn get_CompanyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CompanyName(&mut self, value: HSTRING) -> HRESULT, + fn get_CompanyYomiName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CompanyYomiName(&mut self, value: HSTRING) -> HRESULT, + fn get_Department(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Department(&mut self, value: HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_Manager(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Manager(&mut self, value: HSTRING) -> HRESULT, + fn get_Office(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Office(&mut self, value: HSTRING) -> HRESULT, + fn get_CompanyAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CompanyAddress(&mut self, value: HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT + }} + impl IContactJobInfo { + #[inline] pub unsafe fn get_company_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllAsyncDeviceClass)(self, deviceClass, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_CompanyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn find_all_async_aqs_filter(&mut self, aqsFilter: &HStringArg) -> Result>> { + #[inline] pub unsafe fn set_company_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CompanyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_company_yomi_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllAsyncAqsFilter)(self, aqsFilter.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_CompanyYomiName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn find_all_async_aqs_filter_and_additional_properties(&mut self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub unsafe fn set_company_yomi_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CompanyYomiName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_department(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllAsyncAqsFilterAndAdditionalProperties)(self, aqsFilter.get(), additionalProperties as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Department)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_watcher(&mut self) -> Result> { + #[inline] pub unsafe fn set_department(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Department)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWatcher)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_watcher_device_class(&mut self, deviceClass: DeviceClass) -> Result> { + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_manager(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWatcherDeviceClass)(self, deviceClass, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Manager)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_watcher_aqs_filter(&mut self, aqsFilter: &HStringArg) -> Result> { + #[inline] pub unsafe fn set_manager(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Manager)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_office(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWatcherAqsFilter)(self, aqsFilter.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Office)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_watcher_aqs_filter_and_additional_properties(&mut self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub unsafe fn set_office(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Office)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_company_address(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWatcherAqsFilterAndAdditionalProperties)(self, aqsFilter.get(), additionalProperties as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_CompanyAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_company_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CompanyAddress)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IDeviceInformationStatics2, 1228623668, 43087, 17917, 145, 103, 21, 209, 203, 27, 209, 249); - RT_INTERFACE!{static interface IDeviceInformationStatics2(IDeviceInformationStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationStatics2] { - fn GetAqsFilterFromDeviceClass(&mut self, deviceClass: DeviceClass, out: *mut HSTRING) -> HRESULT, - fn CreateFromIdAsyncWithKindAndAdditionalProperties(&mut self, deviceId: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsyncWithKindAqsFilterAndAdditionalProperties(&mut self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateWatcherWithKindAqsFilterAndAdditionalProperties(&mut self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut DeviceWatcher) -> HRESULT + DEFINE_IID!(IID_IContact, 3959452403, 8472, 16457, 158, 188, 23, 240, 171, 105, 43, 100); + RT_INTERFACE!{interface IContact(IContactVtbl): IInspectable(IInspectableVtbl) [IID_IContact] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Thumbnail(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_Fields(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT }} - impl IDeviceInformationStatics2 { - #[inline] pub unsafe fn get_aqs_filter_from_device_class(&mut self, deviceClass: DeviceClass) -> Result { + impl IContact { + #[inline] pub unsafe fn get_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetAqsFilterFromDeviceClass)(self, deviceClass, &mut out); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_from_id_async_with_kind_and_additional_properties(&mut self, deviceId: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFromIdAsyncWithKindAndAdditionalProperties)(self, deviceId.get(), additionalProperties as *const _ as *mut _, kind, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn find_all_async_with_kind_aqs_filter_and_additional_properties(&mut self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllAsyncWithKindAqsFilterAndAdditionalProperties)(self, aqsFilter.get(), additionalProperties as *const _ as *mut _, kind, &mut out); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_watcher_with_kind_aqs_filter_and_additional_properties(&mut self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_thumbnail(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbnail)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_fields(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWatcherWithKindAqsFilterAndAdditionalProperties)(self, aqsFilter.get(), additionalProperties as *const _ as *mut _, kind, &mut out); + let hr = ((*self.lpVtbl).get_Fields)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IDeviceInformation, 2879454101, 17304, 18589, 142, 68, 230, 19, 9, 39, 1, 31); - RT_INTERFACE!{interface IDeviceInformation(IDeviceInformationVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformation] { - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + DEFINE_IID!(IID_IContactField, 2977319018, 53907, 18732, 160, 88, 219, 87, 91, 62, 60, 15); + RT_INTERFACE!{interface IContactField(IContactFieldVtbl): IInspectable(IInspectableVtbl) [IID_IContactField] { + fn get_Type(&mut self, out: *mut ContactFieldType) -> HRESULT, + fn get_Category(&mut self, out: *mut ContactFieldCategory) -> HRESULT, fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, - fn get_IsDefault(&mut self, out: *mut bool) -> HRESULT, - fn get_EnclosureLocation(&mut self, out: *mut *mut EnclosureLocation) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn Update(&mut self, updateInfo: *mut DeviceInformationUpdate) -> HRESULT, - fn GetThumbnailAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetGlyphThumbnailAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn get_Value(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IDeviceInformation { - #[inline] pub unsafe fn get_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + impl IContactField { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_category(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Category)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } #[inline] pub unsafe fn get_name(&mut self) -> Result { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_default(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDefault)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_ENUM! { enum ContactFieldCategory: i32 { + None (ContactFieldCategory_None) = 0, Home (ContactFieldCategory_Home) = 1, Work (ContactFieldCategory_Work) = 2, Mobile (ContactFieldCategory_Mobile) = 3, Other (ContactFieldCategory_Other) = 4, + }} + DEFINE_IID!(IID_IContactName, 4093962619, 36916, 17724, 142, 191, 20, 10, 56, 200, 111, 29); + RT_INTERFACE!{interface IContactName(IContactNameVtbl): IInspectable(IInspectableVtbl) [IID_IContactName] { + fn get_FirstName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_FirstName(&mut self, value: HSTRING) -> HRESULT, + fn get_LastName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_LastName(&mut self, value: HSTRING) -> HRESULT, + fn get_MiddleName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_MiddleName(&mut self, value: HSTRING) -> HRESULT, + fn get_YomiGivenName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_YomiGivenName(&mut self, value: HSTRING) -> HRESULT, + fn get_YomiFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_YomiFamilyName(&mut self, value: HSTRING) -> HRESULT, + fn get_HonorificNameSuffix(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_HonorificNameSuffix(&mut self, value: HSTRING) -> HRESULT, + fn get_HonorificNamePrefix(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_HonorificNamePrefix(&mut self, value: HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_YomiDisplayName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IContactName { + #[inline] pub unsafe fn get_first_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FirstName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_enclosure_location(&mut self) -> Result> { + #[inline] pub unsafe fn set_first_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_FirstName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_EnclosureLocation)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_LastName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + #[inline] pub unsafe fn set_last_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_LastName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_middle_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_MiddleName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn update(&mut self, updateInfo: &DeviceInformationUpdate) -> Result<()> { - let hr = ((*self.lpVtbl).Update)(self, updateInfo as *const _ as *mut _); + #[inline] pub unsafe fn set_middle_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_MiddleName)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_thumbnail_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_yomi_given_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetThumbnailAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_YomiGivenName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_glyph_thumbnail_async(&mut self) -> Result>> { + #[inline] pub unsafe fn set_yomi_given_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_YomiGivenName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_yomi_family_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetGlyphThumbnailAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_YomiFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_ENUM! { enum DevicePairingKinds: u32 { - None (DevicePairingKinds_None) = 0, ConfirmOnly (DevicePairingKinds_ConfirmOnly) = 1, DisplayPin (DevicePairingKinds_DisplayPin) = 2, ProvidePin (DevicePairingKinds_ProvidePin) = 4, ConfirmPinMatch (DevicePairingKinds_ConfirmPinMatch) = 8, - }} - RT_ENUM! { enum DevicePairingResultStatus: i32 { - Paired (DevicePairingResultStatus_Paired) = 0, NotReadyToPair (DevicePairingResultStatus_NotReadyToPair) = 1, NotPaired (DevicePairingResultStatus_NotPaired) = 2, AlreadyPaired (DevicePairingResultStatus_AlreadyPaired) = 3, ConnectionRejected (DevicePairingResultStatus_ConnectionRejected) = 4, TooManyConnections (DevicePairingResultStatus_TooManyConnections) = 5, HardwareFailure (DevicePairingResultStatus_HardwareFailure) = 6, AuthenticationTimeout (DevicePairingResultStatus_AuthenticationTimeout) = 7, AuthenticationNotAllowed (DevicePairingResultStatus_AuthenticationNotAllowed) = 8, AuthenticationFailure (DevicePairingResultStatus_AuthenticationFailure) = 9, NoSupportedProfiles (DevicePairingResultStatus_NoSupportedProfiles) = 10, ProtectionLevelCouldNotBeMet (DevicePairingResultStatus_ProtectionLevelCouldNotBeMet) = 11, AccessDenied (DevicePairingResultStatus_AccessDenied) = 12, InvalidCeremonyData (DevicePairingResultStatus_InvalidCeremonyData) = 13, PairingCanceled (DevicePairingResultStatus_PairingCanceled) = 14, OperationAlreadyInProgress (DevicePairingResultStatus_OperationAlreadyInProgress) = 15, RequiredHandlerNotRegistered (DevicePairingResultStatus_RequiredHandlerNotRegistered) = 16, RejectedByHandler (DevicePairingResultStatus_RejectedByHandler) = 17, RemoteDeviceHasAssociation (DevicePairingResultStatus_RemoteDeviceHasAssociation) = 18, Failed (DevicePairingResultStatus_Failed) = 19, - }} - RT_ENUM! { enum DeviceUnpairingResultStatus: i32 { - Unpaired (DeviceUnpairingResultStatus_Unpaired) = 0, AlreadyUnpaired (DeviceUnpairingResultStatus_AlreadyUnpaired) = 1, OperationAlreadyInProgress (DeviceUnpairingResultStatus_OperationAlreadyInProgress) = 2, AccessDenied (DeviceUnpairingResultStatus_AccessDenied) = 3, Failed (DeviceUnpairingResultStatus_Failed) = 4, - }} - RT_ENUM! { enum DevicePairingProtectionLevel: i32 { - Default (DevicePairingProtectionLevel_Default) = 0, None (DevicePairingProtectionLevel_None) = 1, Encryption (DevicePairingProtectionLevel_Encryption) = 2, EncryptionAndAuthentication (DevicePairingProtectionLevel_EncryptionAndAuthentication) = 3, - }} - DEFINE_IID!(IID_IDevicePairingResult, 120259263, 56725, 16421, 155, 55, 222, 81, 173, 186, 55, 183); - RT_INTERFACE!{interface IDevicePairingResult(IDevicePairingResultVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePairingResult] { - fn get_Status(&mut self, out: *mut DevicePairingResultStatus) -> HRESULT, - fn get_ProtectionLevelUsed(&mut self, out: *mut DevicePairingProtectionLevel) -> HRESULT - }} - impl IDevicePairingResult { - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_yomi_family_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_YomiFamilyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_protection_level_used(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ProtectionLevelUsed)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_honorific_name_suffix(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HonorificNameSuffix)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class DevicePairingResult: IDevicePairingResult} - DEFINE_IID!(IID_IDeviceUnpairingResult, 1727285971, 31193, 17483, 146, 207, 169, 46, 247, 37, 113, 199); - RT_INTERFACE!{interface IDeviceUnpairingResult(IDeviceUnpairingResultVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceUnpairingResult] { - fn get_Status(&mut self, out: *mut DeviceUnpairingResultStatus) -> HRESULT - }} - impl IDeviceUnpairingResult { - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_honorific_name_suffix(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_HonorificNameSuffix)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class DeviceUnpairingResult: IDeviceUnpairingResult} - DEFINE_IID!(IID_IDevicePairingSettings, 1210888828, 33723, 16910, 190, 81, 102, 2, 178, 34, 222, 84); - RT_INTERFACE!{interface IDevicePairingSettings(IDevicePairingSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePairingSettings] { - - }} - DEFINE_IID!(IID_IDevicePairingRequestedEventArgs, 4145544278, 56939, 18559, 131, 118, 1, 128, 172, 166, 153, 99); - RT_INTERFACE!{interface IDevicePairingRequestedEventArgs(IDevicePairingRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePairingRequestedEventArgs] { - fn get_DeviceInformation(&mut self, out: *mut *mut DeviceInformation) -> HRESULT, - fn get_PairingKind(&mut self, out: *mut DevicePairingKinds) -> HRESULT, - fn get_Pin(&mut self, out: *mut HSTRING) -> HRESULT, - fn Accept(&mut self) -> HRESULT, - fn AcceptWithPin(&mut self, pin: HSTRING) -> HRESULT, - fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT - }} - impl IDevicePairingRequestedEventArgs { - #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + #[inline] pub unsafe fn get_honorific_name_prefix(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_HonorificNamePrefix)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_pairing_kind(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PairingKind)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_honorific_name_prefix(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_HonorificNamePrefix)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_pin(&mut self) -> Result { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Pin)(self, &mut out); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn accept(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Accept)(self); + #[inline] pub unsafe fn get_yomi_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_YomiDisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContact2, 4078105445, 47991, 19604, 128, 45, 131, 40, 206, 228, 12, 8); + RT_INTERFACE!{interface IContact2(IContact2Vtbl): IInspectable(IInspectableVtbl) [IID_IContact2] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Id(&mut self, value: HSTRING) -> HRESULT, + fn get_Notes(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Notes(&mut self, value: HSTRING) -> HRESULT, + fn get_Phones(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Emails(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Addresses(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ConnectedServiceAccounts(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ImportantDates(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_DataSuppliers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_JobInfo(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_SignificantOthers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Websites(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ProviderProperties(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + }} + impl IContact2 { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Id)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn accept_with_pin(&mut self, pin: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).AcceptWithPin)(self, pin.get()); + #[inline] pub unsafe fn get_notes(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Notes)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_notes(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Notes)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + #[inline] pub unsafe fn get_phones(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + let hr = ((*self.lpVtbl).get_Phones)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class DevicePairingRequestedEventArgs: IDevicePairingRequestedEventArgs} - DEFINE_IID!(IID_IDeviceInformationCustomPairing, 2232650754, 20198, 18708, 131, 112, 16, 122, 57, 20, 76, 14); - RT_INTERFACE!{interface IDeviceInformationCustomPairing(IDeviceInformationCustomPairingVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationCustomPairing] { - fn PairAsync(&mut self, pairingKindsSupported: DevicePairingKinds, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PairWithProtectionLevelAsync(&mut self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PairWithProtectionLevelAndSettingsAsync(&mut self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: *mut IDevicePairingSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_PairingRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PairingRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IDeviceInformationCustomPairing { - #[inline] pub unsafe fn pair_async(&mut self, pairingKindsSupported: DevicePairingKinds) -> Result>> { + #[inline] pub unsafe fn get_emails(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).PairAsync)(self, pairingKindsSupported, &mut out); + let hr = ((*self.lpVtbl).get_Emails)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn pair_with_protection_level_async(&mut self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel) -> Result>> { + #[inline] pub unsafe fn get_addresses(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).PairWithProtectionLevelAsync)(self, pairingKindsSupported, minProtectionLevel, &mut out); + let hr = ((*self.lpVtbl).get_Addresses)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn pair_with_protection_level_and_settings_async(&mut self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: &IDevicePairingSettings) -> Result>> { + #[inline] pub unsafe fn get_connected_service_accounts(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).PairWithProtectionLevelAndSettingsAsync)(self, pairingKindsSupported, minProtectionLevel, devicePairingSettings as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_ConnectedServiceAccounts)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_pairing_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_PairingRequested)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_important_dates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ImportantDates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_pairing_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_PairingRequested)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_data_suppliers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataSuppliers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_job_info(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_JobInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_significant_others(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SignificantOthers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_websites(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Websites)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_provider_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProviderProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class DeviceInformationCustomPairing: IDeviceInformationCustomPairing} - DEFINE_IID!(IID_IDeviceInformationPairing, 742877685, 63108, 16597, 132, 105, 232, 219, 170, 183, 4, 133); - RT_INTERFACE!{interface IDeviceInformationPairing(IDeviceInformationPairingVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationPairing] { - fn get_IsPaired(&mut self, out: *mut bool) -> HRESULT, - fn get_CanPair(&mut self, out: *mut bool) -> HRESULT, - fn PairAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PairWithProtectionLevelAsync(&mut self, minProtectionLevel: DevicePairingProtectionLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl IDeviceInformationPairing { - #[inline] pub unsafe fn get_is_paired(&mut self) -> Result { + RT_CLASS!{class ContactPhone: IContactPhone} + RT_CLASS!{class ContactEmail: IContactEmail} + RT_CLASS!{class ContactAddress: IContactAddress} + RT_CLASS!{class ContactConnectedServiceAccount: IContactConnectedServiceAccount} + RT_CLASS!{class ContactDate: IContactDate} + RT_CLASS!{class ContactJobInfo: IContactJobInfo} + RT_CLASS!{class ContactSignificantOther: IContactSignificantOther} + RT_CLASS!{class ContactWebsite: IContactWebsite} + DEFINE_IID!(IID_IContact3, 1210064487, 57486, 17060, 181, 97, 65, 208, 140, 169, 87, 93); + RT_INTERFACE!{interface IContact3(IContact3Vtbl): IInspectable(IInspectableVtbl) [IID_IContact3] { + fn get_ContactListId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayPictureUserUpdateTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_DisplayPictureUserUpdateTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_IsMe(&mut self, out: *mut bool) -> HRESULT, + fn get_AggregateId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RemoteId(&mut self, value: HSTRING) -> HRESULT, + fn get_RingToneToken(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RingToneToken(&mut self, value: HSTRING) -> HRESULT, + fn get_IsDisplayPictureManuallySet(&mut self, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_LargeDisplayPicture(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy11(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_SmallDisplayPicture(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy12(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_SourceDisplayPicture(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy13(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_SourceDisplayPicture(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_TextToneToken(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_TextToneToken(&mut self, value: HSTRING) -> HRESULT, + fn get_IsAggregate(&mut self, out: *mut bool) -> HRESULT, + fn get_FullName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayNameOverride(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayNameOverride(&mut self, value: HSTRING) -> HRESULT, + fn get_Nickname(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Nickname(&mut self, value: HSTRING) -> HRESULT, + fn get_SortName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IContact3 { + #[inline] pub unsafe fn get_contact_list_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContactListId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_picture_user_update_time(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsPaired)(self, &mut out); + let hr = ((*self.lpVtbl).get_DisplayPictureUserUpdateTime)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_can_pair(&mut self) -> Result { + #[inline] pub unsafe fn set_display_picture_user_update_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayPictureUserUpdateTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_me(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CanPair)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsMe)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn pair_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_aggregate_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).PairAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AggregateId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn pair_with_protection_level_async(&mut self, minProtectionLevel: DevicePairingProtectionLevel) -> Result>> { + #[inline] pub unsafe fn get_remote_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).PairWithProtectionLevelAsync)(self, minProtectionLevel, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_RemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IDeviceInformationPairing2, 4135981821, 2798, 17192, 133, 204, 28, 116, 43, 177, 121, 13); - RT_INTERFACE!{interface IDeviceInformationPairing2(IDeviceInformationPairing2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationPairing2] { - fn get_ProtectionLevel(&mut self, out: *mut DevicePairingProtectionLevel) -> HRESULT, - fn get_Custom(&mut self, out: *mut *mut DeviceInformationCustomPairing) -> HRESULT, - fn PairWithProtectionLevelAndSettingsAsync(&mut self, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: *mut IDevicePairingSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UnpairAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl IDeviceInformationPairing2 { - #[inline] pub unsafe fn get_protection_level(&mut self) -> Result { + #[inline] pub unsafe fn set_remote_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ring_tone_token(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RingToneToken)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_ring_tone_token(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RingToneToken)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_display_picture_manually_set(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ProtectionLevel)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsDisplayPictureManuallySet)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_custom(&mut self) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_large_display_picture(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Custom)(self, &mut out); + let hr = ((*self.lpVtbl).get_LargeDisplayPicture)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn pair_with_protection_level_and_settings_async(&mut self, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: &IDevicePairingSettings) -> Result>> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_small_display_picture(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).PairWithProtectionLevelAndSettingsAsync)(self, minProtectionLevel, devicePairingSettings as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_SmallDisplayPicture)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn unpair_async(&mut self) -> Result>> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_source_display_picture(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).UnpairAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_SourceDisplayPicture)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IDeviceInformationPairingStatics, 3910517768, 14036, 18849, 191, 19, 81, 65, 115, 121, 155, 107); - RT_INTERFACE!{static interface IDeviceInformationPairingStatics(IDeviceInformationPairingStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationPairingStatics] { - fn TryRegisterForAllInboundPairingRequests(&mut self, pairingKindsSupported: DevicePairingKinds, out: *mut bool) -> HRESULT - }} - impl IDeviceInformationPairingStatics { - #[inline] pub unsafe fn try_register_for_all_inbound_pairing_requests(&mut self, pairingKindsSupported: DevicePairingKinds) -> Result { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_source_display_picture(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_SourceDisplayPicture)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_tone_token(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextToneToken)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_tone_token(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextToneToken)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_aggregate(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).TryRegisterForAllInboundPairingRequests)(self, pairingKindsSupported, &mut out); + let hr = ((*self.lpVtbl).get_IsAggregate)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn get_full_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FullName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name_override(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayNameOverride)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_name_override(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayNameOverride)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_nickname(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Nickname)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_nickname(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Nickname)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_sort_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SortName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } } - RT_CLASS!{class DeviceInformationPairing: IDeviceInformationPairing} - RT_ACTIVATABLE!{IDeviceInformationPairingStatics [CLSID_DeviceInformationPairing]} - DEFINE_CLSID!(CLSID_DeviceInformationPairing = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,69,110,117,109,101,114,97,116,105,111,110,46,68,101,118,105,99,101,73,110,102,111,114,109,97,116,105,111,110,80,97,105,114,105,110,103,0]); - DEFINE_IID!(IID_IDeviceInformation2, 4048987704, 31127, 18649, 161, 12, 38, 157, 70, 83, 63, 72); - RT_INTERFACE!{interface IDeviceInformation2(IDeviceInformation2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformation2] { - fn get_Kind(&mut self, out: *mut DeviceInformationKind) -> HRESULT, - fn get_Pairing(&mut self, out: *mut *mut DeviceInformationPairing) -> HRESULT + DEFINE_IID!(IID_IContactChange, 2501724944, 27225, 18208, 164, 225, 54, 61, 152, 193, 53, 213); + RT_INTERFACE!{interface IContactChange(IContactChangeVtbl): IInspectable(IInspectableVtbl) [IID_IContactChange] { + fn get_ChangeType(&mut self, out: *mut ContactChangeType) -> HRESULT, + fn get_Contact(&mut self, out: *mut *mut Contact) -> HRESULT }} - impl IDeviceInformation2 { - #[inline] pub unsafe fn get_kind(&mut self) -> Result { + impl IContactChange { + #[inline] pub unsafe fn get_change_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChangeType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_pairing(&mut self) -> Result> { + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Pairing)(self, &mut out); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_ENUM! { enum DeviceAccessStatus: i32 { - Unspecified (DeviceAccessStatus_Unspecified) = 0, Allowed (DeviceAccessStatus_Allowed) = 1, DeniedByUser (DeviceAccessStatus_DeniedByUser) = 2, DeniedBySystem (DeviceAccessStatus_DeniedBySystem) = 3, - }} - DEFINE_IID!(IID_IDeviceAccessChangedEventArgs, 3738831820, 20381, 20312, 157, 186, 169, 188, 128, 4, 8, 213); - RT_INTERFACE!{interface IDeviceAccessChangedEventArgs(IDeviceAccessChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceAccessChangedEventArgs] { - fn get_Status(&mut self, out: *mut DeviceAccessStatus) -> HRESULT + DEFINE_IID!(IID_IContactChangedDeferral, 3306437352, 6915, 18168, 182, 148, 165, 35, 232, 60, 252, 182); + RT_INTERFACE!{interface IContactChangedDeferral(IContactChangedDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IContactChangedDeferral] { + fn Complete(&mut self) -> HRESULT }} - impl IDeviceAccessChangedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IContactChangedDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IDeviceAccessChangedEventArgs2, 2186424930, 37707, 19248, 161, 120, 173, 195, 159, 47, 43, 227); - RT_INTERFACE!{interface IDeviceAccessChangedEventArgs2(IDeviceAccessChangedEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceAccessChangedEventArgs2] { - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IContactChangedEventArgs, 1381924817, 29683, 19325, 169, 24, 88, 11, 228, 54, 97, 33); + RT_INTERFACE!{interface IContactChangedEventArgs(IContactChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactChangedEventArgs] { + fn GetDeferral(&mut self, out: *mut *mut ContactChangedDeferral) -> HRESULT }} - impl IDeviceAccessChangedEventArgs2 { - #[inline] pub unsafe fn get_id(&mut self) -> Result { + impl IContactChangedEventArgs { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class DeviceAccessChangedEventArgs: IDeviceAccessChangedEventArgs} - DEFINE_IID!(IID_IDeviceAccessInformation, 195730035, 28133, 18709, 141, 221, 154, 5, 84, 166, 245, 69); - RT_INTERFACE!{interface IDeviceAccessInformation(IDeviceAccessInformationVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceAccessInformation] { - fn add_AccessChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AccessChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_CurrentStatus(&mut self, out: *mut DeviceAccessStatus) -> HRESULT + RT_CLASS!{class ContactChangedDeferral: IContactChangedDeferral} + DEFINE_IID!(IID_IContactChangeReader, 561191418, 11532, 17120, 169, 218, 62, 205, 86, 167, 138, 71); + RT_INTERFACE!{interface IContactChangeReader(IContactChangeReaderVtbl): IInspectable(IInspectableVtbl) [IID_IContactChangeReader] { + fn AcceptChanges(&mut self) -> HRESULT, + fn AcceptChangesThrough(&mut self, lastChangeToAccept: *mut ContactChange) -> HRESULT, + fn ReadBatchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT }} - impl IDeviceAccessInformation { - #[inline] pub unsafe fn add_access_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AccessChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IContactChangeReader { + #[inline] pub unsafe fn accept_changes(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).AcceptChanges)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn remove_access_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AccessChanged)(self, cookie); + #[inline] pub unsafe fn accept_changes_through(&mut self, lastChangeToAccept: &ContactChange) -> Result<()> { + let hr = ((*self.lpVtbl).AcceptChangesThrough)(self, lastChangeToAccept as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_current_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CurrentStatus)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class DeviceAccessInformation: IDeviceAccessInformation} - RT_ACTIVATABLE!{IDeviceAccessInformationStatics [CLSID_DeviceAccessInformation]} - DEFINE_CLSID!(CLSID_DeviceAccessInformation = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,69,110,117,109,101,114,97,116,105,111,110,46,68,101,118,105,99,101,65,99,99,101,115,115,73,110,102,111,114,109,97,116,105,111,110,0]); - DEFINE_IID!(IID_IDeviceAccessInformationStatics, 1464587219, 24368, 17869, 138, 148, 114, 79, 229, 151, 48, 132); - RT_INTERFACE!{static interface IDeviceAccessInformationStatics(IDeviceAccessInformationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceAccessInformationStatics] { - fn CreateFromId(&mut self, deviceId: HSTRING, out: *mut *mut DeviceAccessInformation) -> HRESULT, - fn CreateFromDeviceClassId(&mut self, deviceClassId: Guid, out: *mut *mut DeviceAccessInformation) -> HRESULT, - fn CreateFromDeviceClass(&mut self, deviceClass: DeviceClass, out: *mut *mut DeviceAccessInformation) -> HRESULT + RT_CLASS!{class ContactChange: IContactChange} + DEFINE_IID!(IID_IContactChangeTracker, 1855531346, 12443, 16461, 151, 18, 179, 123, 211, 2, 120, 170); + RT_INTERFACE!{interface IContactChangeTracker(IContactChangeTrackerVtbl): IInspectable(IInspectableVtbl) [IID_IContactChangeTracker] { + fn Enable(&mut self) -> HRESULT, + fn GetChangeReader(&mut self, out: *mut *mut ContactChangeReader) -> HRESULT, + fn Reset(&mut self) -> HRESULT }} - impl IDeviceAccessInformationStatics { - #[inline] pub unsafe fn create_from_id(&mut self, deviceId: &HStringArg) -> Result> { + impl IContactChangeTracker { + #[inline] pub unsafe fn enable(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Enable)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_change_reader(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFromId)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).GetChangeReader)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_from_device_class_id(&mut self, deviceClassId: Guid) -> Result> { + #[inline] pub unsafe fn reset(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Reset)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ContactChangeReader: IContactChangeReader} + DEFINE_IID!(IID_IContactReader, 3549946926, 5256, 17138, 191, 100, 37, 63, 72, 132, 191, 237); + RT_INTERFACE!{interface IContactReader(IContactReaderVtbl): IInspectable(IInspectableVtbl) [IID_IContactReader] { + fn ReadBatchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetMatchingPropertiesWithMatchReason(&mut self, contact: *mut Contact, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IContactReader { + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFromDeviceClassId)(self, deviceClassId, &mut out); + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_from_device_class(&mut self, deviceClass: DeviceClass) -> Result> { + #[inline] pub unsafe fn get_matching_properties_with_match_reason(&mut self, contact: &Contact) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFromDeviceClass)(self, deviceClass, &mut out); + let hr = ((*self.lpVtbl).GetMatchingPropertiesWithMatchReason)(self, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IDeviceWatcherEvent, 1957338123, 7613, 18429, 182, 53, 60, 197, 86, 208, 255, 139); - RT_INTERFACE!{interface IDeviceWatcherEvent(IDeviceWatcherEventVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceWatcherEvent] { - fn get_Kind(&mut self, out: *mut DeviceWatcherEventKind) -> HRESULT, - fn get_DeviceInformation(&mut self, out: *mut *mut DeviceInformation) -> HRESULT, - fn get_DeviceInformationUpdate(&mut self, out: *mut *mut DeviceInformationUpdate) -> HRESULT + RT_CLASS!{class ContactBatch: IContactBatch} + RT_CLASS!{class ContactMatchReason: IContactMatchReason} + DEFINE_IID!(IID_IContactQueryTextSearch, 4158912971, 43351, 17307, 160, 183, 28, 2, 161, 150, 63, 240); + RT_INTERFACE!{interface IContactQueryTextSearch(IContactQueryTextSearchVtbl): IInspectable(IInspectableVtbl) [IID_IContactQueryTextSearch] { + fn get_Fields(&mut self, out: *mut ContactQuerySearchFields) -> HRESULT, + fn put_Fields(&mut self, value: ContactQuerySearchFields) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Text(&mut self, value: HSTRING) -> HRESULT, + fn get_SearchScope(&mut self, out: *mut ContactQuerySearchScope) -> HRESULT, + fn put_SearchScope(&mut self, value: ContactQuerySearchScope) -> HRESULT }} - impl IDeviceWatcherEvent { - #[inline] pub unsafe fn get_kind(&mut self) -> Result { + impl IContactQueryTextSearch { + #[inline] pub unsafe fn get_fields(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + let hr = ((*self.lpVtbl).get_Fields)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + #[inline] pub unsafe fn set_fields(&mut self, value: ContactQuerySearchFields) -> Result<()> { + let hr = ((*self.lpVtbl).put_Fields)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Text)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_search_scope(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SearchScope)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_search_scope(&mut self, value: ContactQuerySearchScope) -> Result<()> { + let hr = ((*self.lpVtbl).put_SearchScope)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContactQueryOptionsFactory, 1413462599, 36071, 18123, 157, 172, 154, 164, 42, 27, 200, 226); + RT_INTERFACE!{static interface IContactQueryOptionsFactory(IContactQueryOptionsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IContactQueryOptionsFactory] { + fn CreateWithText(&mut self, text: HSTRING, out: *mut *mut ContactQueryOptions) -> HRESULT, + fn CreateWithTextAndFields(&mut self, text: HSTRING, fields: ContactQuerySearchFields, out: *mut *mut ContactQueryOptions) -> HRESULT + }} + impl IContactQueryOptionsFactory { + #[inline] pub unsafe fn create_with_text(&mut self, text: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithText)(self, text.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_information_update(&mut self) -> Result> { + #[inline] pub unsafe fn create_with_text_and_fields(&mut self, text: &HStringArg, fields: ContactQuerySearchFields) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceInformationUpdate)(self, &mut out); + let hr = ((*self.lpVtbl).CreateWithTextAndFields)(self, text.get(), fields, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class DeviceWatcherEvent: IDeviceWatcherEvent} - DEFINE_IID!(IID_IDeviceWatcherTriggerDetails, 947945753, 19639, 20055, 165, 109, 119, 109, 7, 203, 254, 249); - RT_INTERFACE!{interface IDeviceWatcherTriggerDetails(IDeviceWatcherTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceWatcherTriggerDetails] { - fn get_DeviceWatcherEvents(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + DEFINE_IID!(IID_IContactQueryOptions, 1141427358, 32124, 17136, 138, 199, 245, 7, 51, 236, 219, 193); + RT_INTERFACE!{interface IContactQueryOptions(IContactQueryOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IContactQueryOptions] { + fn get_TextSearch(&mut self, out: *mut *mut ContactQueryTextSearch) -> HRESULT, + fn get_ContactListIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_IncludeContactsFromHiddenLists(&mut self, out: *mut bool) -> HRESULT, + fn put_IncludeContactsFromHiddenLists(&mut self, value: bool) -> HRESULT, + fn get_DesiredFields(&mut self, out: *mut ContactQueryDesiredFields) -> HRESULT, + fn put_DesiredFields(&mut self, value: ContactQueryDesiredFields) -> HRESULT, + fn get_DesiredOperations(&mut self, out: *mut ContactAnnotationOperations) -> HRESULT, + fn put_DesiredOperations(&mut self, value: ContactAnnotationOperations) -> HRESULT, + fn get_AnnotationListIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT }} - impl IDeviceWatcherTriggerDetails { - #[inline] pub unsafe fn get_device_watcher_events(&mut self) -> Result>> { + impl IContactQueryOptions { + #[inline] pub unsafe fn get_text_search(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceWatcherEvents)(self, &mut out); + let hr = ((*self.lpVtbl).get_TextSearch)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class DeviceWatcherTriggerDetails: IDeviceWatcherTriggerDetails} -pub mod pnp { // Windows.Devices.Enumeration.Pnp -use ::prelude::*; - RT_ENUM! { enum PnpObjectType: i32 { - Unknown (PnpObjectType_Unknown) = 0, DeviceInterface (PnpObjectType_DeviceInterface) = 1, DeviceContainer (PnpObjectType_DeviceContainer) = 2, Device (PnpObjectType_Device) = 3, DeviceInterfaceClass (PnpObjectType_DeviceInterfaceClass) = 4, AssociationEndpoint (PnpObjectType_AssociationEndpoint) = 5, AssociationEndpointContainer (PnpObjectType_AssociationEndpointContainer) = 6, AssociationEndpointService (PnpObjectType_AssociationEndpointService) = 7, - }} - DEFINE_IID!(IID_IPnpObjectUpdate, 1868163090, 30, 18500, 188, 198, 67, 40, 134, 133, 106, 23); - RT_INTERFACE!{interface IPnpObjectUpdate(IPnpObjectUpdateVtbl): IInspectable(IInspectableVtbl) [IID_IPnpObjectUpdate] { - fn get_Type(&mut self, out: *mut PnpObjectType) -> HRESULT, - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT - }} - impl IPnpObjectUpdate { - #[inline] pub unsafe fn get_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Type)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + #[inline] pub unsafe fn get_contact_list_ids(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + let hr = ((*self.lpVtbl).get_ContactListIds)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class PnpObjectUpdate: IPnpObjectUpdate} - RT_CLASS!{class PnpObjectCollection: ::rt::gen::windows::foundation::collections::IVectorView} - DEFINE_IID!(IID_IPnpObjectWatcher, 2211011752, 18290, 19066, 172, 168, 228, 140, 66, 168, 156, 68); - RT_INTERFACE!{interface IPnpObjectWatcher(IPnpObjectWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IPnpObjectWatcher] { - fn add_Added(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Updated(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Updated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn get_Status(&mut self, out: *mut super::DeviceWatcherStatus) -> HRESULT, - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT - }} - impl IPnpObjectWatcher { - #[inline] pub unsafe fn add_added(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn get_include_contacts_from_hidden_lists(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Added)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IncludeContactsFromHiddenLists)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_added(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Added)(self, token); + #[inline] pub unsafe fn set_include_contacts_from_hidden_lists(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IncludeContactsFromHiddenLists)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_updated(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn get_desired_fields(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Updated)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_DesiredFields)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_updated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Updated)(self, token); + #[inline] pub unsafe fn set_desired_fields(&mut self, value: ContactQueryDesiredFields) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredFields)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_removed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn get_desired_operations(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Removed)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_DesiredOperations)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_removed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Removed)(self, token); + #[inline] pub unsafe fn set_desired_operations(&mut self, value: ContactAnnotationOperations) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredOperations)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_annotation_list_ids(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AnnotationListIds)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + } + RT_CLASS!{class ContactQueryTextSearch: IContactQueryTextSearch} + DEFINE_IID!(IID_IContactBatch, 902928173, 49102, 18107, 147, 248, 165, 176, 110, 197, 226, 1); + RT_INTERFACE!{interface IContactBatch(IContactBatchVtbl): IInspectable(IInspectableVtbl) [IID_IContactBatch] { + fn get_Contacts(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Status(&mut self, out: *mut ContactBatchStatus) -> HRESULT + }} + impl IContactBatch { + #[inline] pub unsafe fn get_contacts(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contacts)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_stopped(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Stopped)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&mut self) -> Result { + } + DEFINE_IID!(IID_IContactMatchReason, 3163694340, 59352, 16702, 149, 244, 183, 92, 84, 199, 64, 119); + RT_INTERFACE!{interface IContactMatchReason(IContactMatchReasonVtbl): IInspectable(IInspectableVtbl) [IID_IContactMatchReason] { + fn get_Field(&mut self, out: *mut ContactMatchReasonKind) -> HRESULT, + #[cfg(not(feature="windows.data"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.data")] fn get_Segments(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IContactMatchReason { + #[inline] pub unsafe fn get_field(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_Field)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_segments(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Segments)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PnpObjectWatcher: IPnpObjectWatcher} - RT_CLASS!{class PnpObject: IPnpObject} - RT_ACTIVATABLE!{IPnpObjectStatics [CLSID_PnpObject]} - DEFINE_CLSID!(CLSID_PnpObject = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,69,110,117,109,101,114,97,116,105,111,110,46,80,110,112,46,80,110,112,79,98,106,101,99,116,0]); - DEFINE_IID!(IID_IPnpObjectStatics, 3015911997, 53608, 18016, 187, 243, 167, 51, 177, 75, 110, 1); - RT_INTERFACE!{static interface IPnpObjectStatics(IPnpObjectStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPnpObjectStatics] { - fn CreateFromIdAsync(&mut self, type_: PnpObjectType, id: HSTRING, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsync(&mut self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsyncAqsFilter(&mut self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, aqsFilter: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn CreateWatcher(&mut self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut PnpObjectWatcher) -> HRESULT, - fn CreateWatcherAqsFilter(&mut self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, aqsFilter: HSTRING, out: *mut *mut PnpObjectWatcher) -> HRESULT + DEFINE_IID!(IID_IContactLaunchActionVerbsStatics, 4212273878, 61043, 18151, 135, 97, 17, 205, 1, 87, 114, 143); + RT_INTERFACE!{static interface IContactLaunchActionVerbsStatics(IContactLaunchActionVerbsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IContactLaunchActionVerbsStatics] { + fn get_Call(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Message(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Map(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Post(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_VideoCall(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IPnpObjectStatics { - #[inline] pub unsafe fn create_from_id_async(&mut self, type_: PnpObjectType, id: &HStringArg, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + impl IContactLaunchActionVerbsStatics { + #[inline] pub unsafe fn get_call(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFromIdAsync)(self, type_, id.get(), requestedProperties as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Call)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn find_all_async(&mut self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + #[inline] pub unsafe fn get_message(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllAsync)(self, type_, requestedProperties as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn find_all_async_aqs_filter(&mut self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result>> { + #[inline] pub unsafe fn get_map(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllAsyncAqsFilter)(self, type_, requestedProperties as *const _ as *mut _, aqsFilter.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Map)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_watcher(&mut self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + #[inline] pub unsafe fn get_post(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWatcher)(self, type_, requestedProperties as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Post)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_watcher_aqs_filter(&mut self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result> { + #[inline] pub unsafe fn get_video_call(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWatcherAqsFilter)(self, type_, requestedProperties as *const _ as *mut _, aqsFilter.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_VideoCall)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPnpObject, 2512806488, 29499, 19087, 147, 163, 219, 7, 138, 200, 112, 193); - RT_INTERFACE!{interface IPnpObject(IPnpObjectVtbl): IInspectable(IInspectableVtbl) [IID_IPnpObject] { - fn get_Type(&mut self, out: *mut PnpObjectType) -> HRESULT, - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, - fn Update(&mut self, updateInfo: *mut PnpObjectUpdate) -> HRESULT + RT_CLASS!{class ContactStoreNotificationTriggerDetails: IContactStoreNotificationTriggerDetails} + RT_ACTIVATABLE!{IContactManagerStatics3 [CLSID_ContactManager]} + RT_ACTIVATABLE!{IContactManagerStatics2 [CLSID_ContactManager]} + RT_ACTIVATABLE!{IContactManagerStatics4 [CLSID_ContactManager]} + RT_ACTIVATABLE!{IContactManagerStatics [CLSID_ContactManager]} + DEFINE_CLSID!(CLSID_ContactManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,111,110,116,97,99,116,115,46,67,111,110,116,97,99,116,77,97,110,97,103,101,114,0]); + RT_ACTIVATABLE!{IContactLaunchActionVerbsStatics [CLSID_ContactLaunchActionVerbs]} + DEFINE_CLSID!(CLSID_ContactLaunchActionVerbs = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,111,110,116,97,99,116,115,46,67,111,110,116,97,99,116,76,97,117,110,99,104,65,99,116,105,111,110,86,101,114,98,115,0]); + RT_CLASS!{class ContactField: IContactField [IContactFieldFactory] [CLSID_ContactField]} + DEFINE_CLSID!(CLSID_ContactField = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,111,110,116,97,99,116,115,46,67,111,110,116,97,99,116,70,105,101,108,100,0]); + DEFINE_IID!(IID_IContactLocationField, 2663387010, 43886, 19254, 137, 227, 178, 59, 192, 161, 218, 204); + RT_INTERFACE!{interface IContactLocationField(IContactLocationFieldVtbl): IInspectable(IInspectableVtbl) [IID_IContactLocationField] { + fn get_UnstructuredAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Street(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_City(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Region(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Country(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PostalCode(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IPnpObject { - #[inline] pub unsafe fn get_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Type)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IContactLocationField { + #[inline] pub unsafe fn get_unstructured_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UnstructuredAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_id(&mut self) -> Result { + #[inline] pub unsafe fn get_street(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_Street)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + #[inline] pub unsafe fn get_city(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_City)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn update(&mut self, updateInfo: &PnpObjectUpdate) -> Result<()> { - let hr = ((*self.lpVtbl).Update)(self, updateInfo as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_region(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Region)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_country(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Country)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_postal_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PostalCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } -} // Windows.Devices.Enumeration.Pnp -} // Windows.Devices.Enumeration -pub mod geolocation { // Windows.Devices.Geolocation -use ::prelude::*; - RT_ENUM! { enum PositionAccuracy: i32 { - Default (PositionAccuracy_Default) = 0, High (PositionAccuracy_High) = 1, - }} - RT_ENUM! { enum PositionStatus: i32 { - Ready (PositionStatus_Ready) = 0, Initializing (PositionStatus_Initializing) = 1, NoData (PositionStatus_NoData) = 2, Disabled (PositionStatus_Disabled) = 3, NotInitialized (PositionStatus_NotInitialized) = 4, NotAvailable (PositionStatus_NotAvailable) = 5, - }} - RT_ENUM! { enum PositionSource: i32 { - Cellular (PositionSource_Cellular) = 0, Satellite (PositionSource_Satellite) = 1, WiFi (PositionSource_WiFi) = 2, IPAddress (PositionSource_IPAddress) = 3, Unknown (PositionSource_Unknown) = 4, Default (PositionSource_Default) = 5, Obfuscated (PositionSource_Obfuscated) = 6, - }} - RT_ENUM! { enum GeoshapeType: i32 { - Geopoint (GeoshapeType_Geopoint) = 0, Geocircle (GeoshapeType_Geocircle) = 1, Geopath (GeoshapeType_Geopath) = 2, GeoboundingBox (GeoshapeType_GeoboundingBox) = 3, - }} - RT_ENUM! { enum AltitudeReferenceSystem: i32 { - Unspecified (AltitudeReferenceSystem_Unspecified) = 0, Terrain (AltitudeReferenceSystem_Terrain) = 1, Ellipsoid (AltitudeReferenceSystem_Ellipsoid) = 2, Geoid (AltitudeReferenceSystem_Geoid) = 3, Surface (AltitudeReferenceSystem_Surface) = 4, - }} - RT_STRUCT! { struct BasicGeoposition { - Latitude: f64, Longitude: f64, Altitude: f64, - }} - RT_ENUM! { enum GeolocationAccessStatus: i32 { - Unspecified (GeolocationAccessStatus_Unspecified) = 0, Allowed (GeolocationAccessStatus_Allowed) = 1, Denied (GeolocationAccessStatus_Denied) = 2, - }} - DEFINE_IID!(IID_IGeoshape, 3382485679, 50985, 17345, 143, 171, 214, 222, 201, 20, 223, 126); - RT_INTERFACE!{interface IGeoshape(IGeoshapeVtbl): IInspectable(IInspectableVtbl) [IID_IGeoshape] { - fn get_GeoshapeType(&mut self, out: *mut GeoshapeType) -> HRESULT, - fn get_SpatialReferenceId(&mut self, out: *mut u32) -> HRESULT, - fn get_AltitudeReferenceSystem(&mut self, out: *mut AltitudeReferenceSystem) -> HRESULT + RT_CLASS!{class ContactLocationField: IContactLocationField [IContactLocationFieldFactory] [CLSID_ContactLocationField]} + DEFINE_CLSID!(CLSID_ContactLocationField = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,111,110,116,97,99,116,115,46,67,111,110,116,97,99,116,76,111,99,97,116,105,111,110,70,105,101,108,100,0]); + DEFINE_IID!(IID_IContactInstantMessageField, 3437443895, 3461, 16890, 180, 61, 218, 89, 156, 62, 176, 9); + RT_INTERFACE!{interface IContactInstantMessageField(IContactInstantMessageFieldVtbl): IInspectable(IInspectableVtbl) [IID_IContactInstantMessageField] { + fn get_UserName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Service(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LaunchUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT }} - impl IGeoshape { - #[inline] pub unsafe fn get_geoshape_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GeoshapeType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IContactInstantMessageField { + #[inline] pub unsafe fn get_user_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_spatial_reference_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SpatialReferenceId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_service(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Service)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_altitude_reference_system(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AltitudeReferenceSystem)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_display_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_launch_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LaunchUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGeopoint, 1811546347, 58734, 18875, 156, 175, 203, 170, 120, 168, 188, 239); - RT_INTERFACE!{interface IGeopoint(IGeopointVtbl): IInspectable(IInspectableVtbl) [IID_IGeopoint] { - fn get_Position(&mut self, out: *mut BasicGeoposition) -> HRESULT + RT_CLASS!{class ContactInstantMessageField: IContactInstantMessageField [IContactInstantMessageFieldFactory] [CLSID_ContactInstantMessageField]} + DEFINE_CLSID!(CLSID_ContactInstantMessageField = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,111,110,116,97,99,116,115,46,67,111,110,116,97,99,116,73,110,115,116,97,110,116,77,101,115,115,97,103,101,70,105,101,108,100,0]); + DEFINE_IID!(IID_IKnownContactFieldStatics, 772676370, 54823, 20426, 186, 212, 31, 175, 22, 140, 125, 20); + RT_INTERFACE!{static interface IKnownContactFieldStatics(IKnownContactFieldStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownContactFieldStatics] { + fn get_Email(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PhoneNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Location(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_InstantMessage(&mut self, out: *mut HSTRING) -> HRESULT, + fn ConvertNameToType(&mut self, name: HSTRING, out: *mut ContactFieldType) -> HRESULT, + fn ConvertTypeToName(&mut self, type_: ContactFieldType, out: *mut HSTRING) -> HRESULT }} - impl IGeopoint { - #[inline] pub unsafe fn get_position(&mut self) -> Result { + impl IKnownContactFieldStatics { + #[inline] pub unsafe fn get_email(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Email)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_phone_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhoneNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_location(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Location)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_instant_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InstantMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn convert_name_to_type(&mut self, name: &HStringArg) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + let hr = ((*self.lpVtbl).ConvertNameToType)(self, name.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn convert_type_to_name(&mut self, type_: ContactFieldType) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConvertTypeToName)(self, type_, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } } - DEFINE_IID!(IID_IGeopointFactory, 3681258803, 30397, 20016, 138, 247, 168, 68, 220, 55, 183, 160); - RT_INTERFACE!{static interface IGeopointFactory(IGeopointFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGeopointFactory] { - fn Create(&mut self, position: BasicGeoposition, out: *mut *mut Geopoint) -> HRESULT, - fn CreateWithAltitudeReferenceSystem(&mut self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, out: *mut *mut Geopoint) -> HRESULT, - fn CreateWithAltitudeReferenceSystemAndSpatialReferenceId(&mut self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut Geopoint) -> HRESULT - }} - impl IGeopointFactory { - #[inline] pub unsafe fn create(&mut self, position: BasicGeoposition) -> Result> { + RT_ACTIVATABLE!{IKnownContactFieldStatics [CLSID_KnownContactField]} + DEFINE_CLSID!(CLSID_KnownContactField = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,67,111,110,116,97,99,116,115,46,75,110,111,119,110,67,111,110,116,97,99,116,70,105,101,108,100,0]); + DEFINE_IID!(IID_IContactInformation, 660518612, 27182, 17016, 169, 20, 228, 96, 213, 240, 136, 246); + RT_INTERFACE!{interface IContactInformation(IContactInformationVtbl): IInspectable(IInspectableVtbl) [IID_IContactInformation] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetThumbnailAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_Emails(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_PhoneNumbers(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Locations(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_InstantMessages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_CustomFields(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn QueryCustomFields(&mut self, customName: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IContactInformation { + #[inline] pub unsafe fn get_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, position, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_altitude_reference_system(&mut self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystem)(self, position, altitudeReferenceSystem, &mut out); + let hr = ((*self.lpVtbl).GetThumbnailAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_altitude_reference_system_and_spatial_reference_id(&mut self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + #[inline] pub unsafe fn get_emails(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystemAndSpatialReferenceId)(self, position, altitudeReferenceSystem, spatialReferenceId, &mut out); + let hr = ((*self.lpVtbl).get_Emails)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class Geopoint: IGeopoint [IGeopointFactory] [CLSID_Geopoint]} - DEFINE_CLSID!(CLSID_Geopoint = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,112,111,105,110,116,0]); - DEFINE_IID!(IID_IGeopath, 3846166457, 11684, 18196, 166, 82, 222, 133, 147, 40, 152, 152); - RT_INTERFACE!{interface IGeopath(IGeopathVtbl): IInspectable(IInspectableVtbl) [IID_IGeopath] { - fn get_Positions(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT - }} - impl IGeopath { - #[inline] pub unsafe fn get_positions(&mut self) -> Result>> { + #[inline] pub unsafe fn get_phone_numbers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Positions)(self, &mut out); + let hr = ((*self.lpVtbl).get_PhoneNumbers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IGeopathFactory, 666806728, 51175, 17241, 155, 155, 252, 163, 224, 94, 245, 147); - RT_INTERFACE!{static interface IGeopathFactory(IGeopathFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGeopathFactory] { - fn Create(&mut self, positions: *mut super::super::foundation::collections::IIterable, out: *mut *mut Geopath) -> HRESULT, - fn CreateWithAltitudeReference(&mut self, positions: *mut super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, out: *mut *mut Geopath) -> HRESULT, - fn CreateWithAltitudeReferenceAndSpatialReference(&mut self, positions: *mut super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut Geopath) -> HRESULT - }} - impl IGeopathFactory { - #[inline] pub unsafe fn create(&mut self, positions: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub unsafe fn get_locations(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, positions as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Locations)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_altitude_reference(&mut self, positions: &super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + #[inline] pub unsafe fn get_instant_messages(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithAltitudeReference)(self, positions as *const _ as *mut _, altitudeReferenceSystem, &mut out); + let hr = ((*self.lpVtbl).get_InstantMessages)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_altitude_reference_and_spatial_reference(&mut self, positions: &super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + #[inline] pub unsafe fn get_custom_fields(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceAndSpatialReference)(self, positions as *const _ as *mut _, altitudeReferenceSystem, spatialReferenceId, &mut out); + let hr = ((*self.lpVtbl).get_CustomFields)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class Geopath: IGeopath [IGeopathFactory] [CLSID_Geopath]} - DEFINE_CLSID!(CLSID_Geopath = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,112,97,116,104,0]); - DEFINE_IID!(IID_IGeoboundingBox, 144099339, 10063, 17370, 154, 6, 203, 252, 218, 235, 78, 194); - RT_INTERFACE!{interface IGeoboundingBox(IGeoboundingBoxVtbl): IInspectable(IInspectableVtbl) [IID_IGeoboundingBox] { - fn get_NorthwestCorner(&mut self, out: *mut BasicGeoposition) -> HRESULT, - fn get_SoutheastCorner(&mut self, out: *mut BasicGeoposition) -> HRESULT, - fn get_Center(&mut self, out: *mut BasicGeoposition) -> HRESULT, - fn get_MinAltitude(&mut self, out: *mut f64) -> HRESULT, - fn get_MaxAltitude(&mut self, out: *mut f64) -> HRESULT - }} - impl IGeoboundingBox { - #[inline] pub unsafe fn get_northwest_corner(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_NorthwestCorner)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_southeast_corner(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SoutheastCorner)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_center(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Center)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_altitude(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinAltitude)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_altitude(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxAltitude)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn query_custom_fields(&mut self, customName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).QueryCustomFields)(self, customName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGeoboundingBoxFactory, 1308337545, 1041, 19132, 179, 181, 91, 188, 203, 87, 217, 140); - RT_INTERFACE!{static interface IGeoboundingBoxFactory(IGeoboundingBoxFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGeoboundingBoxFactory] { - fn Create(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, out: *mut *mut GeoboundingBox) -> HRESULT, - fn CreateWithAltitudeReference(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, out: *mut *mut GeoboundingBox) -> HRESULT, - fn CreateWithAltitudeReferenceAndSpatialReference(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut GeoboundingBox) -> HRESULT + RT_CLASS!{class ContactInformation: IContactInformation} + DEFINE_IID!(IID_IContactFieldFactory, 2246218047, 3658, 19006, 137, 148, 64, 106, 231, 237, 100, 110); + RT_INTERFACE!{static interface IContactFieldFactory(IContactFieldFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IContactFieldFactory] { + fn CreateField_Default(&mut self, value: HSTRING, type_: ContactFieldType, out: *mut *mut ContactField) -> HRESULT, + fn CreateField_Category(&mut self, value: HSTRING, type_: ContactFieldType, category: ContactFieldCategory, out: *mut *mut ContactField) -> HRESULT, + fn CreateField_Custom(&mut self, name: HSTRING, value: HSTRING, type_: ContactFieldType, category: ContactFieldCategory, out: *mut *mut ContactField) -> HRESULT }} - impl IGeoboundingBoxFactory { - #[inline] pub unsafe fn create(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition) -> Result> { + impl IContactFieldFactory { + #[inline] pub unsafe fn create_field_default(&mut self, value: &HStringArg, type_: ContactFieldType) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, northwestCorner, southeastCorner, &mut out); + let hr = ((*self.lpVtbl).CreateField_Default)(self, value.get(), type_, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_altitude_reference(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + #[inline] pub unsafe fn create_field_category(&mut self, value: &HStringArg, type_: ContactFieldType, category: ContactFieldCategory) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithAltitudeReference)(self, northwestCorner, southeastCorner, altitudeReferenceSystem, &mut out); + let hr = ((*self.lpVtbl).CreateField_Category)(self, value.get(), type_, category, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_altitude_reference_and_spatial_reference(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + #[inline] pub unsafe fn create_field_custom(&mut self, name: &HStringArg, value: &HStringArg, type_: ContactFieldType, category: ContactFieldCategory) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceAndSpatialReference)(self, northwestCorner, southeastCorner, altitudeReferenceSystem, spatialReferenceId, &mut out); + let hr = ((*self.lpVtbl).CreateField_Custom)(self, name.get(), value.get(), type_, category, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class GeoboundingBox: IGeoboundingBox [IGeoboundingBoxFactory] [CLSID_GeoboundingBox]} - RT_ACTIVATABLE!{IGeoboundingBoxStatics [CLSID_GeoboundingBox]} - DEFINE_CLSID!(CLSID_GeoboundingBox = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,98,111,117,110,100,105,110,103,66,111,120,0]); - DEFINE_IID!(IID_IGeoboundingBoxStatics, 1740113672, 58906, 19664, 132, 27, 147, 35, 55, 146, 181, 202); - RT_INTERFACE!{static interface IGeoboundingBoxStatics(IGeoboundingBoxStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGeoboundingBoxStatics] { - fn TryCompute(&mut self, positions: *mut super::super::foundation::collections::IIterable, out: *mut *mut GeoboundingBox) -> HRESULT, - fn TryComputeWithAltitudeReference(&mut self, positions: *mut super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, out: *mut *mut GeoboundingBox) -> HRESULT, - fn TryComputeWithAltitudeReferenceAndSpatialReference(&mut self, positions: *mut super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut GeoboundingBox) -> HRESULT + DEFINE_IID!(IID_IContactLocationFieldFactory, 4154012375, 12255, 17406, 143, 24, 65, 137, 115, 144, 188, 254); + RT_INTERFACE!{static interface IContactLocationFieldFactory(IContactLocationFieldFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IContactLocationFieldFactory] { + fn CreateLocation_Default(&mut self, unstructuredAddress: HSTRING, out: *mut *mut ContactLocationField) -> HRESULT, + fn CreateLocation_Category(&mut self, unstructuredAddress: HSTRING, category: ContactFieldCategory, out: *mut *mut ContactLocationField) -> HRESULT, + fn CreateLocation_All(&mut self, unstructuredAddress: HSTRING, category: ContactFieldCategory, street: HSTRING, city: HSTRING, region: HSTRING, country: HSTRING, postalCode: HSTRING, out: *mut *mut ContactLocationField) -> HRESULT }} - impl IGeoboundingBoxStatics { - #[inline] pub unsafe fn try_compute(&mut self, positions: &super::super::foundation::collections::IIterable) -> Result> { + impl IContactLocationFieldFactory { + #[inline] pub unsafe fn create_location_default(&mut self, unstructuredAddress: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryCompute)(self, positions as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).CreateLocation_Default)(self, unstructuredAddress.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn try_compute_with_altitude_reference(&mut self, positions: &super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem) -> Result> { + #[inline] pub unsafe fn create_location_category(&mut self, unstructuredAddress: &HStringArg, category: ContactFieldCategory) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryComputeWithAltitudeReference)(self, positions as *const _ as *mut _, altitudeRefSystem, &mut out); + let hr = ((*self.lpVtbl).CreateLocation_Category)(self, unstructuredAddress.get(), category, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn try_compute_with_altitude_reference_and_spatial_reference(&mut self, positions: &super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + #[inline] pub unsafe fn create_location_all(&mut self, unstructuredAddress: &HStringArg, category: ContactFieldCategory, street: &HStringArg, city: &HStringArg, region: &HStringArg, country: &HStringArg, postalCode: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryComputeWithAltitudeReferenceAndSpatialReference)(self, positions as *const _ as *mut _, altitudeRefSystem, spatialReferenceId, &mut out); + let hr = ((*self.lpVtbl).CreateLocation_All)(self, unstructuredAddress.get(), category, street.get(), city.get(), region.get(), country.get(), postalCode.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGeocoordinateSatelliteData, 3274339545, 9736, 18252, 145, 44, 6, 221, 73, 15, 74, 247); - RT_INTERFACE!{interface IGeocoordinateSatelliteData(IGeocoordinateSatelliteDataVtbl): IInspectable(IInspectableVtbl) [IID_IGeocoordinateSatelliteData] { - fn get_PositionDilutionOfPrecision(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_HorizontalDilutionOfPrecision(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_VerticalDilutionOfPrecision(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + DEFINE_IID!(IID_IContactInstantMessageFieldFactory, 3121309588, 37283, 19378, 177, 185, 105, 165, 223, 240, 186, 9); + RT_INTERFACE!{static interface IContactInstantMessageFieldFactory(IContactInstantMessageFieldFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IContactInstantMessageFieldFactory] { + fn CreateInstantMessage_Default(&mut self, userName: HSTRING, out: *mut *mut ContactInstantMessageField) -> HRESULT, + fn CreateInstantMessage_Category(&mut self, userName: HSTRING, category: ContactFieldCategory, out: *mut *mut ContactInstantMessageField) -> HRESULT, + fn CreateInstantMessage_All(&mut self, userName: HSTRING, category: ContactFieldCategory, service: HSTRING, displayText: HSTRING, verb: *mut super::super::foundation::Uri, out: *mut *mut ContactInstantMessageField) -> HRESULT }} - impl IGeocoordinateSatelliteData { - #[inline] pub unsafe fn get_position_dilution_of_precision(&mut self) -> Result>> { + impl IContactInstantMessageFieldFactory { + #[inline] pub unsafe fn create_instant_message_default(&mut self, userName: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PositionDilutionOfPrecision)(self, &mut out); + let hr = ((*self.lpVtbl).CreateInstantMessage_Default)(self, userName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_horizontal_dilution_of_precision(&mut self) -> Result>> { + #[inline] pub unsafe fn create_instant_message_category(&mut self, userName: &HStringArg, category: ContactFieldCategory) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_HorizontalDilutionOfPrecision)(self, &mut out); + let hr = ((*self.lpVtbl).CreateInstantMessage_Category)(self, userName.get(), category, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_vertical_dilution_of_precision(&mut self) -> Result>> { + #[inline] pub unsafe fn create_instant_message_all(&mut self, userName: &HStringArg, category: ContactFieldCategory, service: &HStringArg, displayText: &HStringArg, verb: &super::super::foundation::Uri) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VerticalDilutionOfPrecision)(self, &mut out); + let hr = ((*self.lpVtbl).CreateInstantMessage_All)(self, userName.get(), category, service.get(), displayText.get(), verb as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class GeocoordinateSatelliteData: IGeocoordinateSatelliteData} - DEFINE_IID!(IID_IVenueData, 1727238535, 24803, 19247, 181, 39, 79, 83, 241, 195, 198, 119); - RT_INTERFACE!{interface IVenueData(IVenueDataVtbl): IInspectable(IInspectableVtbl) [IID_IVenueData] { - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Level(&mut self, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class ContactFieldFactory: IContactFieldFactory} + DEFINE_IID!(IID_IContactPicker, 235535761, 17144, 16469, 144, 160, 137, 111, 150, 115, 137, 54); + RT_INTERFACE!{interface IContactPicker(IContactPickerVtbl): IInspectable(IInspectableVtbl) [IID_IContactPicker] { + fn get_CommitButtonText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CommitButtonText(&mut self, value: HSTRING) -> HRESULT, + fn get_SelectionMode(&mut self, out: *mut ContactSelectionMode) -> HRESULT, + fn put_SelectionMode(&mut self, value: ContactSelectionMode) -> HRESULT, + fn get_DesiredFields(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn PickSingleContactAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PickMultipleContactsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT }} - impl IVenueData { - #[inline] pub unsafe fn get_id(&mut self) -> Result { + impl IContactPicker { + #[inline] pub unsafe fn get_commit_button_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_CommitButtonText)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_level(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Level)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_commit_button_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CommitButtonText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class VenueData: IVenueData} - DEFINE_IID!(IID_IGeocoordinate, 3995181994, 38762, 19568, 128, 61, 8, 62, 165, 91, 203, 196); - RT_INTERFACE!{interface IGeocoordinate(IGeocoordinateVtbl): IInspectable(IInspectableVtbl) [IID_IGeocoordinate] { - fn get_Latitude(&mut self, out: *mut f64) -> HRESULT, - fn get_Longitude(&mut self, out: *mut f64) -> HRESULT, - fn get_Altitude(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Accuracy(&mut self, out: *mut f64) -> HRESULT, - fn get_AltitudeAccuracy(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Heading(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Speed(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT - }} - impl IGeocoordinate { - #[inline] pub unsafe fn get_latitude(&mut self) -> Result { + #[inline] pub unsafe fn get_selection_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Latitude)(self, &mut out); + let hr = ((*self.lpVtbl).get_SelectionMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_longitude(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Longitude)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_selection_mode(&mut self, value: ContactSelectionMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectionMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_altitude(&mut self) -> Result>> { + #[inline] pub unsafe fn get_desired_fields(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Altitude)(self, &mut out); + let hr = ((*self.lpVtbl).get_DesiredFields)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_accuracy(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Accuracy)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn pick_single_contact_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickSingleContactAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_altitude_accuracy(&mut self) -> Result>> { + #[inline] pub unsafe fn pick_multiple_contacts_async(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AltitudeAccuracy)(self, &mut out); + let hr = ((*self.lpVtbl).PickMultipleContactsAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_heading(&mut self) -> Result>> { + } + DEFINE_IID!(IID_IContactPicker2, 3008369103, 23791, 19748, 170, 12, 52, 12, 82, 8, 114, 93); + RT_INTERFACE!{interface IContactPicker2(IContactPicker2Vtbl): IInspectable(IInspectableVtbl) [IID_IContactPicker2] { + fn get_DesiredFieldsWithContactFieldType(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn PickContactAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PickContactsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IContactPicker2 { + #[inline] pub unsafe fn get_desired_fields_with_contact_field_type(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Heading)(self, &mut out); + let hr = ((*self.lpVtbl).get_DesiredFieldsWithContactFieldType)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_speed(&mut self) -> Result>> { + #[inline] pub unsafe fn pick_contact_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Speed)(self, &mut out); + let hr = ((*self.lpVtbl).PickContactAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn pick_contacts_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickContactsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGeocoordinateWithPositionData, 2514891966, 56278, 16556, 184, 242, 166, 92, 3, 64, 217, 166); - RT_INTERFACE!{interface IGeocoordinateWithPositionData(IGeocoordinateWithPositionDataVtbl): IInspectable(IInspectableVtbl) [IID_IGeocoordinateWithPositionData] { - fn get_PositionSource(&mut self, out: *mut PositionSource) -> HRESULT, - fn get_SatelliteData(&mut self, out: *mut *mut GeocoordinateSatelliteData) -> HRESULT + RT_CLASS!{class ContactPicker: IContactPicker} + DEFINE_IID!(IID_IContactCardDelayedDataLoader, 3054172418, 5446, 17229, 134, 156, 110, 53, 32, 118, 14, 243); + RT_INTERFACE!{interface IContactCardDelayedDataLoader(IContactCardDelayedDataLoaderVtbl): IInspectable(IInspectableVtbl) [IID_IContactCardDelayedDataLoader] { + fn SetData(&mut self, contact: *mut Contact) -> HRESULT }} - impl IGeocoordinateWithPositionData { - #[inline] pub unsafe fn get_position_source(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PositionSource)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_satellite_data(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SatelliteData)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + impl IContactCardDelayedDataLoader { + #[inline] pub unsafe fn set_data(&mut self, contact: &Contact) -> Result<()> { + let hr = ((*self.lpVtbl).SetData)(self, contact as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IGeocoordinateWithPoint, 4276749605, 53804, 19782, 181, 39, 11, 150, 6, 111, 199, 219); - RT_INTERFACE!{interface IGeocoordinateWithPoint(IGeocoordinateWithPointVtbl): IInspectable(IInspectableVtbl) [IID_IGeocoordinateWithPoint] { - fn get_Point(&mut self, out: *mut *mut Geopoint) -> HRESULT +pub mod dataprovider { // Windows.ApplicationModel.Contacts.DataProvider +use ::prelude::*; + DEFINE_IID!(IID_IContactDataProviderTriggerDetails, 1383138494, 15458, 17352, 154, 231, 219, 83, 22, 133, 205, 153); + RT_INTERFACE!{interface IContactDataProviderTriggerDetails(IContactDataProviderTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IContactDataProviderTriggerDetails] { + fn get_Connection(&mut self, out: *mut *mut ContactDataProviderConnection) -> HRESULT }} - impl IGeocoordinateWithPoint { - #[inline] pub unsafe fn get_point(&mut self) -> Result> { + impl IContactDataProviderTriggerDetails { + #[inline] pub unsafe fn get_connection(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Point)(self, &mut out); + let hr = ((*self.lpVtbl).get_Connection)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGeocoordinateWithPositionSourceTimestamp, 2235825154, 51697, 17936, 175, 224, 139, 195, 166, 168, 112, 54); - RT_INTERFACE!{interface IGeocoordinateWithPositionSourceTimestamp(IGeocoordinateWithPositionSourceTimestampVtbl): IInspectable(IInspectableVtbl) [IID_IGeocoordinateWithPositionSourceTimestamp] { - fn get_PositionSourceTimestamp(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + RT_CLASS!{class ContactDataProviderConnection: IContactDataProviderConnection} + DEFINE_IID!(IID_IContactDataProviderConnection, 439978578, 35997, 19823, 164, 224, 17, 30, 154, 18, 90, 48); + RT_INTERFACE!{interface IContactDataProviderConnection(IContactDataProviderConnectionVtbl): IInspectable(IInspectableVtbl) [IID_IContactDataProviderConnection] { + fn add_SyncRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ServerSearchReadBatchRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServerSearchReadBatchRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn Start(&mut self) -> HRESULT }} - impl IGeocoordinateWithPositionSourceTimestamp { - #[inline] pub unsafe fn get_position_source_timestamp(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PositionSourceTimestamp)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + impl IContactDataProviderConnection { + #[inline] pub unsafe fn add_sync_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SyncRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_sync_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SyncRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_server_search_read_batch_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ServerSearchReadBatchRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_server_search_read_batch_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ServerSearchReadBatchRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IGeoposition, 3247244372, 32065, 20471, 169, 87, 157, 255, 180, 239, 127, 91); - RT_INTERFACE!{interface IGeoposition(IGeopositionVtbl): IInspectable(IInspectableVtbl) [IID_IGeoposition] { - fn get_Coordinate(&mut self, out: *mut *mut Geocoordinate) -> HRESULT, - fn get_CivicAddress(&mut self, out: *mut *mut CivicAddress) -> HRESULT + RT_CLASS!{class ContactListSyncManagerSyncRequestEventArgs: IContactListSyncManagerSyncRequestEventArgs} + RT_CLASS!{class ContactListServerSearchReadBatchRequestEventArgs: IContactListServerSearchReadBatchRequestEventArgs} + DEFINE_IID!(IID_IContactListSyncManagerSyncRequest, 1007572900, 50407, 18800, 154, 143, 154, 102, 162, 187, 108, 26); + RT_INTERFACE!{interface IContactListSyncManagerSyncRequest(IContactListSyncManagerSyncRequestVtbl): IInspectable(IInspectableVtbl) [IID_IContactListSyncManagerSyncRequest] { + fn get_ContactListId(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IGeoposition { - #[inline] pub unsafe fn get_coordinate(&mut self) -> Result> { + impl IContactListSyncManagerSyncRequest { + #[inline] pub unsafe fn get_contact_list_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Coordinate)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ContactListId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_civic_address(&mut self) -> Result> { + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CivicAddress)(self, &mut out); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IGeoposition2, 2137192087, 34417, 19213, 134, 248, 71, 74, 132, 150, 24, 124); - RT_INTERFACE!{interface IGeoposition2(IGeoposition2Vtbl): IInspectable(IInspectableVtbl) [IID_IGeoposition2] { - fn get_VenueData(&mut self, out: *mut *mut VenueData) -> HRESULT - }} - impl IGeoposition2 { - #[inline] pub unsafe fn get_venue_data(&mut self) -> Result> { + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VenueData)(self, &mut out); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class Geocoordinate: IGeocoordinate} - RT_CLASS!{class CivicAddress: ICivicAddress} - DEFINE_IID!(IID_ICivicAddress, 2824239642, 25844, 19784, 188, 234, 246, 176, 8, 236, 163, 76); - RT_INTERFACE!{interface ICivicAddress(ICivicAddressVtbl): IInspectable(IInspectableVtbl) [IID_ICivicAddress] { - fn get_Country(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_State(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_City(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_PostalCode(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT + DEFINE_IID!(IID_IContactListServerSearchReadBatchRequest, 3128388247, 16432, 18725, 159, 180, 20, 59, 41, 94, 101, 59); + RT_INTERFACE!{interface IContactListServerSearchReadBatchRequest(IContactListServerSearchReadBatchRequestVtbl): IInspectable(IInspectableVtbl) [IID_IContactListServerSearchReadBatchRequest] { + fn get_SessionId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ContactListId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Options(&mut self, out: *mut *mut super::ContactQueryOptions) -> HRESULT, + fn get_SuggestedBatchSize(&mut self, out: *mut u32) -> HRESULT, + fn SaveContactAsync(&mut self, contact: *mut super::Contact, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, batchStatus: super::ContactBatchStatus, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl ICivicAddress { - #[inline] pub unsafe fn get_country(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Country)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&mut self) -> Result { + impl IContactListServerSearchReadBatchRequest { + #[inline] pub unsafe fn get_session_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_State)(self, &mut out); + let hr = ((*self.lpVtbl).get_SessionId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_city(&mut self) -> Result { + #[inline] pub unsafe fn get_contact_list_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_City)(self, &mut out); + let hr = ((*self.lpVtbl).get_ContactListId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_postal_code(&mut self) -> Result { + #[inline] pub unsafe fn get_options(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PostalCode)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Options)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + #[inline] pub unsafe fn get_suggested_batch_size(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_SuggestedBatchSize)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class Geoposition: IGeoposition} - DEFINE_IID!(IID_IPositionChangedEventArgs, 931503333, 40222, 18117, 191, 59, 106, 216, 202, 193, 160, 147); - RT_INTERFACE!{interface IPositionChangedEventArgs(IPositionChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPositionChangedEventArgs] { - fn get_Position(&mut self, out: *mut *mut Geoposition) -> HRESULT + #[inline] pub unsafe fn save_contact_async(&mut self, contact: &super::Contact) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveContactAsync)(self, contact as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_failed_async(&mut self, batchStatus: super::ContactBatchStatus) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, batchStatus, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ContactDataProviderTriggerDetails: IContactDataProviderTriggerDetails} + DEFINE_IID!(IID_IContactListSyncManagerSyncRequestEventArgs, 361647532, 17517, 20240, 175, 194, 2, 104, 62, 197, 51, 166); + RT_INTERFACE!{interface IContactListSyncManagerSyncRequestEventArgs(IContactListSyncManagerSyncRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactListSyncManagerSyncRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut ContactListSyncManagerSyncRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - impl IPositionChangedEventArgs { - #[inline] pub unsafe fn get_position(&mut self) -> Result> { + impl IContactListSyncManagerSyncRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PositionChangedEventArgs: IPositionChangedEventArgs} - DEFINE_IID!(IID_IStatusChangedEventArgs, 877908698, 35987, 16657, 162, 5, 154, 236, 252, 155, 229, 192); - RT_INTERFACE!{interface IStatusChangedEventArgs(IStatusChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IStatusChangedEventArgs] { - fn get_Status(&mut self, out: *mut PositionStatus) -> HRESULT + RT_CLASS!{class ContactListSyncManagerSyncRequest: IContactListSyncManagerSyncRequest} + DEFINE_IID!(IID_IContactListServerSearchReadBatchRequestEventArgs, 438823035, 27095, 20046, 128, 66, 134, 28, 186, 97, 71, 30); + RT_INTERFACE!{interface IContactListServerSearchReadBatchRequestEventArgs(IContactListServerSearchReadBatchRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactListServerSearchReadBatchRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut ContactListServerSearchReadBatchRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - impl IStatusChangedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IContactListServerSearchReadBatchRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class StatusChangedEventArgs: IStatusChangedEventArgs} - DEFINE_IID!(IID_IGeolocator, 2848178018, 17700, 18825, 138, 169, 222, 1, 157, 46, 85, 31); - RT_INTERFACE!{interface IGeolocator(IGeolocatorVtbl): IInspectable(IInspectableVtbl) [IID_IGeolocator] { - fn get_DesiredAccuracy(&mut self, out: *mut PositionAccuracy) -> HRESULT, - fn put_DesiredAccuracy(&mut self, value: PositionAccuracy) -> HRESULT, - fn get_MovementThreshold(&mut self, out: *mut f64) -> HRESULT, - fn put_MovementThreshold(&mut self, value: f64) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_LocationStatus(&mut self, out: *mut PositionStatus) -> HRESULT, - fn GetGeopositionAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetGeopositionAsyncWithAgeAndTimeout(&mut self, maximumAge: super::super::foundation::TimeSpan, timeout: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_PositionChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PositionChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_StatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class ContactListServerSearchReadBatchRequest: IContactListServerSearchReadBatchRequest} +} // Windows.ApplicationModel.Contacts.DataProvider +pub mod provider { // Windows.ApplicationModel.Contacts.Provider +use ::prelude::*; + DEFINE_IID!(IID_IContactRemovedEventArgs, 1865761592, 13058, 19731, 173, 141, 173, 204, 15, 249, 228, 124); + RT_INTERFACE!{interface IContactRemovedEventArgs(IContactRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactRemovedEventArgs] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IGeolocator { - #[inline] pub unsafe fn get_desired_accuracy(&mut self) -> Result { + impl IContactRemovedEventArgs { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ContactRemovedEventArgs: IContactRemovedEventArgs} + RT_ENUM! { enum AddContactResult: i32 { + Added (AddContactResult_Added) = 0, AlreadyAdded (AddContactResult_AlreadyAdded) = 1, Unavailable (AddContactResult_Unavailable) = 2, + }} + DEFINE_IID!(IID_IContactPickerUI, 3805025126, 53094, 17348, 169, 106, 165, 161, 18, 219, 71, 70); + RT_INTERFACE!{interface IContactPickerUI(IContactPickerUIVtbl): IInspectable(IInspectableVtbl) [IID_IContactPickerUI] { + fn AddContact(&mut self, id: HSTRING, contact: *mut super::Contact, out: *mut AddContactResult) -> HRESULT, + fn RemoveContact(&mut self, id: HSTRING) -> HRESULT, + fn ContainsContact(&mut self, id: HSTRING, out: *mut bool) -> HRESULT, + fn get_DesiredFields(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_SelectionMode(&mut self, out: *mut super::ContactSelectionMode) -> HRESULT, + fn add_ContactRemoved(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContactRemoved(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IContactPickerUI { + #[inline] pub unsafe fn add_contact(&mut self, id: &HStringArg, contact: &super::Contact) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DesiredAccuracy)(self, &mut out); + let hr = ((*self.lpVtbl).AddContact)(self, id.get(), contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_desired_accuracy(&mut self, value: PositionAccuracy) -> Result<()> { - let hr = ((*self.lpVtbl).put_DesiredAccuracy)(self, value); + #[inline] pub unsafe fn remove_contact(&mut self, id: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveContact)(self, id.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_movement_threshold(&mut self) -> Result { + #[inline] pub unsafe fn contains_contact(&mut self, id: &HStringArg) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MovementThreshold)(self, &mut out); + let hr = ((*self.lpVtbl).ContainsContact)(self, id.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_movement_threshold(&mut self, value: f64) -> Result<()> { - let hr = ((*self.lpVtbl).put_MovementThreshold)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_desired_fields(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesiredFields)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + #[inline] pub unsafe fn get_selection_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).get_SelectionMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + #[inline] pub unsafe fn add_contact_removed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ContactRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_contact_removed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContactRemoved)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_location_status(&mut self) -> Result { + } + RT_CLASS!{class ContactPickerUI: IContactPickerUI} + DEFINE_IID!(IID_IContactPickerUI2, 1849990696, 31525, 18841, 155, 11, 135, 84, 0, 161, 232, 200); + RT_INTERFACE!{interface IContactPickerUI2(IContactPickerUI2Vtbl): IInspectable(IInspectableVtbl) [IID_IContactPickerUI2] { + fn AddContact(&mut self, contact: *mut super::Contact, out: *mut AddContactResult) -> HRESULT, + fn get_DesiredFieldsWithContactFieldType(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + }} + impl IContactPickerUI2 { + #[inline] pub unsafe fn add_contact(&mut self, contact: &super::Contact) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LocationStatus)(self, &mut out); + let hr = ((*self.lpVtbl).AddContact)(self, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_geoposition_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_desired_fields_with_contact_field_type(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetGeopositionAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_DesiredFieldsWithContactFieldType)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_geoposition_async_with_age_and_timeout(&mut self, maximumAge: super::super::foundation::TimeSpan, timeout: super::super::foundation::TimeSpan) -> Result>> { + } +} // Windows.ApplicationModel.Contacts.Provider +} // Windows.ApplicationModel.Contacts +pub mod datatransfer { // Windows.ApplicationModel.DataTransfer +use ::prelude::*; + DEFINE_IID!(IID_IStandardDataFormatsStatics, 2127987105, 43136, 16585, 180, 237, 11, 238, 30, 21, 245, 73); + RT_INTERFACE!{static interface IStandardDataFormatsStatics(IStandardDataFormatsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStandardDataFormatsStatics] { + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Uri(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Html(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Rtf(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Bitmap(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_StorageItems(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStandardDataFormatsStatics { + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uri(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetGeopositionAsyncWithAgeAndTimeout)(self, maximumAge, timeout, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_position_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_PositionChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_html(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Html)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_position_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_PositionChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_rtf(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Rtf)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_StatusChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_bitmap(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Bitmap)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_StatusChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_storage_items(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StorageItems)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class Geolocator: IGeolocator} - RT_ACTIVATABLE!{IGeolocatorStatics [CLSID_Geolocator]} - RT_ACTIVATABLE!{IGeolocatorStatics2 [CLSID_Geolocator]} - DEFINE_CLSID!(CLSID_Geolocator = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,108,111,99,97,116,111,114,0]); - DEFINE_IID!(IID_IGeolocatorWithScalarAccuracy, 2532692929, 47119, 17930, 153, 77, 169, 108, 71, 165, 26, 164); - RT_INTERFACE!{interface IGeolocatorWithScalarAccuracy(IGeolocatorWithScalarAccuracyVtbl): IInspectable(IInspectableVtbl) [IID_IGeolocatorWithScalarAccuracy] { - fn get_DesiredAccuracyInMeters(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_DesiredAccuracyInMeters(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT + DEFINE_IID!(IID_IStandardDataFormatsStatics2, 1117934836, 40310, 17128, 134, 27, 71, 194, 93, 208, 207, 113); + RT_INTERFACE!{static interface IStandardDataFormatsStatics2(IStandardDataFormatsStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IStandardDataFormatsStatics2] { + fn get_WebLink(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ApplicationLink(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IGeolocatorWithScalarAccuracy { - #[inline] pub unsafe fn get_desired_accuracy_in_meters(&mut self) -> Result>> { + impl IStandardDataFormatsStatics2 { + #[inline] pub unsafe fn get_web_link(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DesiredAccuracyInMeters)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_WebLink)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_desired_accuracy_in_meters(&mut self, value: &super::super::foundation::IReference) -> Result<()> { - let hr = ((*self.lpVtbl).put_DesiredAccuracyInMeters)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_application_link(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ApplicationLink)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGeolocator2, 3518246509, 34961, 17332, 173, 54, 39, 198, 254, 154, 151, 177); - RT_INTERFACE!{interface IGeolocator2(IGeolocator2Vtbl): IInspectable(IInspectableVtbl) [IID_IGeolocator2] { - fn AllowFallbackToConsentlessPositions(&mut self) -> HRESULT + RT_ACTIVATABLE!{IStandardDataFormatsStatics2 [CLSID_StandardDataFormats]} + RT_ACTIVATABLE!{IStandardDataFormatsStatics [CLSID_StandardDataFormats]} + DEFINE_CLSID!(CLSID_StandardDataFormats = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,68,97,116,97,84,114,97,110,115,102,101,114,46,83,116,97,110,100,97,114,100,68,97,116,97,70,111,114,109,97,116,115,0]); + DEFINE_IID!(IID_IDataPackagePropertySetView, 3108826113, 3098, 19543, 190, 85, 117, 208, 18, 137, 115, 93); + RT_INTERFACE!{interface IDataPackagePropertySetView(IDataPackagePropertySetViewVtbl): IInspectable(IInspectableVtbl) [IID_IDataPackagePropertySetView] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut super::super::storage::streams::RandomAccessStreamReference) -> HRESULT, + fn get_FileTypes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ApplicationName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ApplicationListingUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT }} - impl IGeolocator2 { - #[inline] pub unsafe fn allow_fallback_to_consentless_positions(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).AllowFallbackToConsentlessPositions)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IDataPackagePropertySetView { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IGeolocatorStatics, 2593027441, 11765, 17809, 159, 135, 235, 95, 216, 148, 233, 183); - RT_INTERFACE!{static interface IGeolocatorStatics(IGeolocatorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGeolocatorStatics] { - fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetGeopositionHistoryAsync(&mut self, startTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetGeopositionHistoryWithDurationAsync(&mut self, startTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT - }} - impl IGeolocatorStatics { - #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_description(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_geoposition_history_async(&mut self, startTime: super::super::foundation::DateTime) -> Result>>> { + #[inline] pub unsafe fn get_file_types(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetGeopositionHistoryAsync)(self, startTime, &mut out); + let hr = ((*self.lpVtbl).get_FileTypes)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_geoposition_history_with_duration_async(&mut self, startTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { + #[inline] pub unsafe fn get_application_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetGeopositionHistoryWithDurationAsync)(self, startTime, duration, &mut out); + let hr = ((*self.lpVtbl).get_ApplicationName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_application_listing_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ApplicationListingUri)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IGeolocatorStatics2, 2570064290, 64028, 17969, 167, 29, 13, 190, 177, 37, 13, 156); - RT_INTERFACE!{static interface IGeolocatorStatics2(IGeolocatorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGeolocatorStatics2] { - fn get_IsDefaultGeopositionRecommended(&mut self, out: *mut bool) -> HRESULT, - fn put_DefaultGeoposition(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_DefaultGeoposition(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + DEFINE_IID!(IID_IDataPackagePropertySetView2, 1616138395, 36542, 20459, 156, 30, 117, 230, 157, 229, 75, 132); + RT_INTERFACE!{interface IDataPackagePropertySetView2(IDataPackagePropertySetView2Vtbl): IInspectable(IInspectableVtbl) [IID_IDataPackagePropertySetView2] { + fn get_PackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ContentSourceWebLink(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_ContentSourceApplicationLink(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Square30x30Logo(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_LogoBackgroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT }} - impl IGeolocatorStatics2 { - #[inline] pub unsafe fn get_is_default_geoposition_recommended(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDefaultGeopositionRecommended)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IDataPackagePropertySetView2 { + #[inline] pub unsafe fn get_package_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_default_geoposition(&mut self, value: &super::super::foundation::IReference) -> Result<()> { - let hr = ((*self.lpVtbl).put_DefaultGeoposition)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_content_source_web_link(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentSourceWebLink)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_geoposition(&mut self) -> Result>> { + #[inline] pub unsafe fn get_content_source_application_link(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DefaultGeoposition)(self, &mut out); + let hr = ((*self.lpVtbl).get_ContentSourceApplicationLink)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IGeocircle, 971266115, 43001, 20067, 146, 167, 186, 12, 40, 209, 36, 177); - RT_INTERFACE!{interface IGeocircle(IGeocircleVtbl): IInspectable(IInspectableVtbl) [IID_IGeocircle] { - fn get_Center(&mut self, out: *mut BasicGeoposition) -> HRESULT, - fn get_Radius(&mut self, out: *mut f64) -> HRESULT - }} - impl IGeocircle { - #[inline] pub unsafe fn get_center(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Center)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_square30x30_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Square30x30Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_radius(&mut self) -> Result { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_logo_background_color(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Radius)(self, &mut out); + let hr = ((*self.lpVtbl).get_LogoBackgroundColor)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IGeocircleFactory, 2950058783, 29361, 20349, 135, 204, 78, 212, 201, 132, 156, 5); - RT_INTERFACE!{static interface IGeocircleFactory(IGeocircleFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGeocircleFactory] { - fn Create(&mut self, position: BasicGeoposition, radius: f64, out: *mut *mut Geocircle) -> HRESULT, - fn CreateWithAltitudeReferenceSystem(&mut self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem, out: *mut *mut Geocircle) -> HRESULT, - fn CreateWithAltitudeReferenceSystemAndSpatialReferenceId(&mut self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut Geocircle) -> HRESULT + DEFINE_IID!(IID_IDataPackagePropertySetView3, 3681963237, 53620, 18780, 132, 252, 26, 81, 246, 171, 69, 215); + RT_INTERFACE!{interface IDataPackagePropertySetView3(IDataPackagePropertySetView3Vtbl): IInspectable(IInspectableVtbl) [IID_IDataPackagePropertySetView3] { + fn get_EnterpriseId(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IGeocircleFactory { - #[inline] pub unsafe fn create(&mut self, position: BasicGeoposition, radius: f64) -> Result> { + impl IDataPackagePropertySetView3 { + #[inline] pub unsafe fn get_enterprise_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, position, radius, &mut out); + let hr = ((*self.lpVtbl).get_EnterpriseId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataPackagePropertySet, 3441202155, 19532, 17466, 168, 211, 245, 194, 65, 233, 22, 137); + RT_INTERFACE!{interface IDataPackagePropertySet(IDataPackagePropertySetVtbl): IInspectable(IInspectableVtbl) [IID_IDataPackagePropertySet] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Thumbnail(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_FileTypes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ApplicationName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ApplicationName(&mut self, value: HSTRING) -> HRESULT, + fn get_ApplicationListingUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_ApplicationListingUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT + }} + impl IDataPackagePropertySet { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_altitude_reference_system(&mut self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_thumbnail(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbnail)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_types(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystem)(self, position, radius, altitudeReferenceSystem, &mut out); + let hr = ((*self.lpVtbl).get_FileTypes)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_altitude_reference_system_and_spatial_reference_id(&mut self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + #[inline] pub unsafe fn get_application_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystemAndSpatialReferenceId)(self, position, radius, altitudeReferenceSystem, spatialReferenceId, &mut out); + let hr = ((*self.lpVtbl).get_ApplicationName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_application_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ApplicationName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_application_listing_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ApplicationListingUri)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn set_application_listing_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_ApplicationListingUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class Geocircle: IGeocircle [IGeocircleFactory] [CLSID_Geocircle]} - DEFINE_CLSID!(CLSID_Geocircle = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,99,105,114,99,108,101,0]); -pub mod geofencing { // Windows.Devices.Geolocation.Geofencing -use ::prelude::*; - RT_ENUM! { enum MonitoredGeofenceStates: u32 { - None (MonitoredGeofenceStates_None) = 0, Entered (MonitoredGeofenceStates_Entered) = 1, Exited (MonitoredGeofenceStates_Exited) = 2, Removed (MonitoredGeofenceStates_Removed) = 4, - }} - RT_ENUM! { enum GeofenceState: u32 { - None (GeofenceState_None) = 0, Entered (GeofenceState_Entered) = 1, Exited (GeofenceState_Exited) = 2, Removed (GeofenceState_Removed) = 4, - }} - RT_ENUM! { enum GeofenceMonitorStatus: i32 { - Ready (GeofenceMonitorStatus_Ready) = 0, Initializing (GeofenceMonitorStatus_Initializing) = 1, NoData (GeofenceMonitorStatus_NoData) = 2, Disabled (GeofenceMonitorStatus_Disabled) = 3, NotInitialized (GeofenceMonitorStatus_NotInitialized) = 4, NotAvailable (GeofenceMonitorStatus_NotAvailable) = 5, - }} - RT_ENUM! { enum GeofenceRemovalReason: i32 { - Used (GeofenceRemovalReason_Used) = 0, Expired (GeofenceRemovalReason_Expired) = 1, - }} - DEFINE_IID!(IID_IGeofenceFactory, 2216649291, 12895, 19344, 188, 167, 43, 128, 34, 169, 55, 150); - RT_INTERFACE!{static interface IGeofenceFactory(IGeofenceFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGeofenceFactory] { - fn Create(&mut self, id: HSTRING, geoshape: *mut super::IGeoshape, out: *mut *mut Geofence) -> HRESULT, - fn CreateWithMonitorStates(&mut self, id: HSTRING, geoshape: *mut super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, out: *mut *mut Geofence) -> HRESULT, - fn CreateWithMonitorStatesAndDwellTime(&mut self, id: HSTRING, geoshape: *mut super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: ::rt::gen::windows::foundation::TimeSpan, out: *mut *mut Geofence) -> HRESULT, - fn CreateWithMonitorStatesDwellTimeStartTimeAndDuration(&mut self, id: HSTRING, geoshape: *mut super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: ::rt::gen::windows::foundation::TimeSpan, startTime: ::rt::gen::windows::foundation::DateTime, duration: ::rt::gen::windows::foundation::TimeSpan, out: *mut *mut Geofence) -> HRESULT + DEFINE_IID!(IID_IDataPackagePropertySet2, 3947912522, 38912, 18090, 177, 129, 123, 111, 15, 43, 145, 154); + RT_INTERFACE!{interface IDataPackagePropertySet2(IDataPackagePropertySet2Vtbl): IInspectable(IInspectableVtbl) [IID_IDataPackagePropertySet2] { + fn get_ContentSourceWebLink(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_ContentSourceWebLink(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_ContentSourceApplicationLink(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_ContentSourceApplicationLink(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_PackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PackageFamilyName(&mut self, value: HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Square30x30Logo(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Square30x30Logo(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_LogoBackgroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_LogoBackgroundColor(&mut self, value: super::super::ui::Color) -> HRESULT }} - impl IGeofenceFactory { - #[inline] pub unsafe fn create(&mut self, id: &HStringArg, geoshape: &super::IGeoshape) -> Result> { + impl IDataPackagePropertySet2 { + #[inline] pub unsafe fn get_content_source_web_link(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, id.get(), geoshape as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_ContentSourceWebLink)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_monitor_states(&mut self, id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool) -> Result> { + #[inline] pub unsafe fn set_content_source_web_link(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentSourceWebLink)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_source_application_link(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithMonitorStates)(self, id.get(), geoshape as *const _ as *mut _, monitoredStates, singleUse, &mut out); + let hr = ((*self.lpVtbl).get_ContentSourceApplicationLink)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_monitor_states_and_dwell_time(&mut self, id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: ::rt::gen::windows::foundation::TimeSpan) -> Result> { + #[inline] pub unsafe fn set_content_source_application_link(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentSourceApplicationLink)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_package_family_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithMonitorStatesAndDwellTime)(self, id.get(), geoshape as *const _ as *mut _, monitoredStates, singleUse, dwellTime, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_PackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_monitor_states_dwell_time_start_time_and_duration(&mut self, id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: ::rt::gen::windows::foundation::TimeSpan, startTime: ::rt::gen::windows::foundation::DateTime, duration: ::rt::gen::windows::foundation::TimeSpan) -> Result> { + #[inline] pub unsafe fn set_package_family_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PackageFamilyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_square30x30_logo(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithMonitorStatesDwellTimeStartTimeAndDuration)(self, id.get(), geoshape as *const _ as *mut _, monitoredStates, singleUse, dwellTime, startTime, duration, &mut out); + let hr = ((*self.lpVtbl).get_Square30x30Logo)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class Geofence: IGeofence [IGeofenceFactory] [CLSID_Geofence]} - DEFINE_CLSID!(CLSID_Geofence = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,102,101,110,99,105,110,103,46,71,101,111,102,101,110,99,101,0]); - DEFINE_IID!(IID_IGeofence, 2617837603, 60856, 18400, 130, 69, 91, 246, 29, 50, 31, 45); - RT_INTERFACE!{interface IGeofence(IGeofenceVtbl): IInspectable(IInspectableVtbl) [IID_IGeofence] { - fn get_StartTime(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_Duration(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_DwellTime(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_MonitoredStates(&mut self, out: *mut MonitoredGeofenceStates) -> HRESULT, - fn get_Geoshape(&mut self, out: *mut *mut super::IGeoshape) -> HRESULT, - fn get_SingleUse(&mut self, out: *mut bool) -> HRESULT - }} - impl IGeofence { - #[inline] pub unsafe fn get_start_time(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_square30x30_logo(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Square30x30Logo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_duration(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_logo_background_color(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + let hr = ((*self.lpVtbl).get_LogoBackgroundColor)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_dwell_time(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DwellTime)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_logo_background_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_LogoBackgroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_id(&mut self) -> Result { + } + DEFINE_IID!(IID_IDataPackagePropertySet3, 2659712411, 20997, 16411, 135, 74, 69, 86, 83, 189, 57, 232); + RT_INTERFACE!{interface IDataPackagePropertySet3(IDataPackagePropertySet3Vtbl): IInspectable(IInspectableVtbl) [IID_IDataPackagePropertySet3] { + fn get_EnterpriseId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_EnterpriseId(&mut self, value: HSTRING) -> HRESULT + }} + impl IDataPackagePropertySet3 { + #[inline] pub unsafe fn get_enterprise_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_EnterpriseId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_monitored_states(&mut self) -> Result { + #[inline] pub unsafe fn set_enterprise_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_EnterpriseId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DataPackagePropertySetView: IDataPackagePropertySetView} + RT_CLASS!{class DataPackagePropertySet: IDataPackagePropertySet} + DEFINE_IID!(IID_IDataProviderDeferral, 3268354931, 11558, 17369, 182, 157, 220, 184, 109, 3, 246, 218); + RT_INTERFACE!{interface IDataProviderDeferral(IDataProviderDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IDataProviderDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IDataProviderDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DataProviderDeferral: IDataProviderDeferral} + DEFINE_IID!(IID_IDataProviderRequest, 3954995543, 54216, 18394, 172, 222, 248, 35, 136, 213, 247, 22); + RT_INTERFACE!{interface IDataProviderRequest(IDataProviderRequestVtbl): IInspectable(IInspectableVtbl) [IID_IDataProviderRequest] { + fn get_FormatId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Deadline(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut DataProviderDeferral) -> HRESULT, + fn SetData(&mut self, value: *mut IInspectable) -> HRESULT + }} + impl IDataProviderRequest { + #[inline] pub unsafe fn get_format_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FormatId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deadline(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MonitoredStates)(self, &mut out); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_geoshape(&mut self) -> Result> { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Geoshape)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_single_use(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SingleUse)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_data(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetData)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IGeofenceStateChangeReport, 2586065944, 9316, 19593, 190, 5, 179, 255, 255, 91, 171, 197); - RT_INTERFACE!{interface IGeofenceStateChangeReport(IGeofenceStateChangeReportVtbl): IInspectable(IInspectableVtbl) [IID_IGeofenceStateChangeReport] { - fn get_NewState(&mut self, out: *mut GeofenceState) -> HRESULT, - fn get_Geofence(&mut self, out: *mut *mut Geofence) -> HRESULT, - fn get_Geoposition(&mut self, out: *mut *mut super::Geoposition) -> HRESULT, - fn get_RemovalReason(&mut self, out: *mut GeofenceRemovalReason) -> HRESULT + RT_CLASS!{class DataProviderRequest: IDataProviderRequest} + DEFINE_IID!(IID_DataProviderHandler, 3891058464, 62196, 18989, 146, 14, 23, 10, 47, 72, 42, 39); + RT_DELEGATE!{delegate DataProviderHandler(DataProviderHandlerVtbl, DataProviderHandlerImpl) [IID_DataProviderHandler] { + fn Invoke(&mut self, request: *mut DataProviderRequest) -> HRESULT }} - impl IGeofenceStateChangeReport { - #[inline] pub unsafe fn get_new_state(&mut self) -> Result { + impl DataProviderHandler { + #[inline] pub unsafe fn invoke(&mut self, request: &DataProviderRequest) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, request as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum DataPackageOperation: u32 { + None (DataPackageOperation_None) = 0, Copy (DataPackageOperation_Copy) = 1, Move (DataPackageOperation_Move) = 2, Link (DataPackageOperation_Link) = 4, + }} + DEFINE_IID!(IID_IOperationCompletedEventArgs, 3887018653, 1309, 20395, 177, 169, 71, 253, 119, 247, 10, 65); + RT_INTERFACE!{interface IOperationCompletedEventArgs(IOperationCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IOperationCompletedEventArgs] { + fn get_Operation(&mut self, out: *mut DataPackageOperation) -> HRESULT + }} + impl IOperationCompletedEventArgs { + #[inline] pub unsafe fn get_operation(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_NewState)(self, &mut out); + let hr = ((*self.lpVtbl).get_Operation)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_geofence(&mut self) -> Result> { + } + DEFINE_IID!(IID_IOperationCompletedEventArgs2, 2240782451, 7705, 16645, 178, 247, 200, 71, 136, 8, 213, 98); + RT_INTERFACE!{interface IOperationCompletedEventArgs2(IOperationCompletedEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IOperationCompletedEventArgs2] { + fn get_AcceptedFormatId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IOperationCompletedEventArgs2 { + #[inline] pub unsafe fn get_accepted_format_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Geofence)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AcceptedFormatId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_geoposition(&mut self) -> Result> { + } + RT_CLASS!{class OperationCompletedEventArgs: IOperationCompletedEventArgs} + DEFINE_IID!(IID_IDataPackageView, 2072249457, 22784, 19845, 169, 11, 16, 203, 133, 254, 53, 82); + RT_INTERFACE!{interface IDataPackageView(IDataPackageViewVtbl): IInspectable(IInspectableVtbl) [IID_IDataPackageView] { + fn get_Properties(&mut self, out: *mut *mut DataPackagePropertySetView) -> HRESULT, + fn get_RequestedOperation(&mut self, out: *mut DataPackageOperation) -> HRESULT, + fn ReportOperationCompleted(&mut self, value: DataPackageOperation) -> HRESULT, + fn get_AvailableFormats(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn Contains(&mut self, formatId: HSTRING, out: *mut bool) -> HRESULT, + fn GetDataAsync(&mut self, formatId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetTextAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetCustomTextAsync(&mut self, formatId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetUriAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetHtmlFormatAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetResourceMapAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetRtfAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetBitmapAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetStorageItemsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IDataPackageView { + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Geoposition)(self, &mut out); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_removal_reason(&mut self) -> Result { + #[inline] pub unsafe fn get_requested_operation(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RemovalReason)(self, &mut out); + let hr = ((*self.lpVtbl).get_RequestedOperation)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IGeofenceMonitorStatics, 768815055, 32373, 18585, 172, 227, 43, 208, 166, 92, 206, 6); - RT_INTERFACE!{static interface IGeofenceMonitorStatics(IGeofenceMonitorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGeofenceMonitorStatics] { - fn get_Current(&mut self, out: *mut *mut GeofenceMonitor) -> HRESULT - }} - impl IGeofenceMonitorStatics { - #[inline] pub unsafe fn get_current(&mut self) -> Result> { + #[inline] pub unsafe fn report_operation_completed(&mut self, value: DataPackageOperation) -> Result<()> { + let hr = ((*self.lpVtbl).ReportOperationCompleted)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_available_formats(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + let hr = ((*self.lpVtbl).get_AvailableFormats)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class GeofenceMonitor: IGeofenceMonitor} - RT_ACTIVATABLE!{IGeofenceMonitorStatics [CLSID_GeofenceMonitor]} - DEFINE_CLSID!(CLSID_GeofenceMonitor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,102,101,110,99,105,110,103,46,71,101,111,102,101,110,99,101,77,111,110,105,116,111,114,0]); - DEFINE_IID!(IID_IGeofenceMonitor, 1276075896, 7199, 17953, 187, 189, 131, 59, 146, 36, 114, 38); - RT_INTERFACE!{interface IGeofenceMonitor(IGeofenceMonitorVtbl): IInspectable(IInspectableVtbl) [IID_IGeofenceMonitor] { - fn get_Status(&mut self, out: *mut GeofenceMonitorStatus) -> HRESULT, - fn get_Geofences(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_LastKnownGeoposition(&mut self, out: *mut *mut super::Geoposition) -> HRESULT, - fn add_GeofenceStateChanged(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GeofenceStateChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn ReadReports(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn add_StatusChanged(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT - }} - impl IGeofenceMonitor { - #[inline] pub unsafe fn get_status(&mut self) -> Result { + #[inline] pub unsafe fn contains(&mut self, formatId: &HStringArg) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).Contains)(self, formatId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_geofences(&mut self) -> Result>> { + #[inline] pub unsafe fn get_data_async(&mut self, formatId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Geofences)(self, &mut out); + let hr = ((*self.lpVtbl).GetDataAsync)(self, formatId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_last_known_geoposition(&mut self) -> Result> { + #[inline] pub unsafe fn get_text_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_LastKnownGeoposition)(self, &mut out); + let hr = ((*self.lpVtbl).GetTextAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_geofence_state_changed(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_GeofenceStateChanged)(self, eventHandler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_custom_text_async(&mut self, formatId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCustomTextAsync)(self, formatId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_geofence_state_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_GeofenceStateChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_uri_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetUriAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn read_reports(&mut self) -> Result>> { + #[inline] pub unsafe fn get_html_format_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ReadReports)(self, &mut out); + let hr = ((*self.lpVtbl).GetHtmlFormatAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_status_changed(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_StatusChanged)(self, eventHandler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_resource_map_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetResourceMapAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_status_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_StatusChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_rtf_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRtfAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_bitmap_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBitmapAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_storage_items_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStorageItemsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class GeofenceStateChangeReport: IGeofenceStateChangeReport} -} // Windows.Devices.Geolocation.Geofencing -} // Windows.Devices.Geolocation -pub mod humaninterfacedevice { // Windows.Devices.HumanInterfaceDevice -use ::prelude::*; - RT_ENUM! { enum HidReportType: i32 { - Input (HidReportType_Input) = 0, Output (HidReportType_Output) = 1, Feature (HidReportType_Feature) = 2, - }} - RT_ENUM! { enum HidCollectionType: i32 { - Physical (HidCollectionType_Physical) = 0, Application (HidCollectionType_Application) = 1, Logical (HidCollectionType_Logical) = 2, Report (HidCollectionType_Report) = 3, NamedArray (HidCollectionType_NamedArray) = 4, UsageSwitch (HidCollectionType_UsageSwitch) = 5, UsageModifier (HidCollectionType_UsageModifier) = 6, Other (HidCollectionType_Other) = 7, - }} - DEFINE_IID!(IID_IHidDeviceStatics, 2656666084, 38998, 16780, 159, 115, 119, 222, 12, 216, 87, 84); - RT_INTERFACE!{static interface IHidDeviceStatics(IHidDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IHidDeviceStatics] { - fn GetDeviceSelector(&mut self, usagePage: u16, usageId: u16, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorVidPid(&mut self, usagePage: u16, usageId: u16, vendorId: u16, productId: u16, out: *mut HSTRING) -> HRESULT, - #[cfg(feature="windows.storage")] fn FromIdAsync(&mut self, deviceId: HSTRING, accessMode: super::super::storage::FileAccessMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + DEFINE_IID!(IID_IDataPackageView2, 1089256085, 9296, 19485, 182, 180, 237, 69, 70, 61, 238, 156); + RT_INTERFACE!{interface IDataPackageView2(IDataPackageView2Vtbl): IInspectable(IInspectableVtbl) [IID_IDataPackageView2] { + fn GetApplicationLinkAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetWebLinkAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IHidDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&mut self, usagePage: u16, usageId: u16) -> Result { + impl IDataPackageView2 { + #[inline] pub unsafe fn get_application_link_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, usagePage, usageId, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetApplicationLinkAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_vid_pid(&mut self, usagePage: u16, usageId: u16, vendorId: u16, productId: u16) -> Result { + #[inline] pub unsafe fn get_web_link_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorVidPid)(self, usagePage, usageId, vendorId, productId, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetWebLinkAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg, accessMode: super::super::storage::FileAccessMode) -> Result>> { + } + DEFINE_IID!(IID_IDataPackageView3, 3547820456, 56749, 17032, 132, 40, 209, 202, 227, 148, 18, 139); + RT_INTERFACE!{interface IDataPackageView3(IDataPackageView3Vtbl): IInspectable(IInspectableVtbl) [IID_IDataPackageView3] { + #[cfg(feature="windows.security")] fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.security")] fn RequestAccessWithEnterpriseIdAsync(&mut self, enterpriseId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.security")] fn UnlockAndAssumeEnterpriseIdentity(&mut self, out: *mut super::super::security::enterprisedata::ProtectionPolicyEvaluationResult) -> HRESULT + }} + impl IDataPackageView3 { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), accessMode, &mut out); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn request_access_with_enterprise_id_async(&mut self, enterpriseId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessWithEnterpriseIdAsync)(self, enterpriseId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn unlock_and_assume_enterprise_identity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).UnlockAndAssumeEnterpriseIdentity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } } - RT_CLASS!{class HidDevice: IHidDevice} - RT_ACTIVATABLE!{IHidDeviceStatics [CLSID_HidDevice]} - DEFINE_CLSID!(CLSID_HidDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,72,117,109,97,110,73,110,116,101,114,102,97,99,101,68,101,118,105,99,101,46,72,105,100,68,101,118,105,99,101,0]); - RT_CLASS!{class HidInputReport: IHidInputReport} - RT_CLASS!{class HidFeatureReport: IHidFeatureReport} - RT_CLASS!{class HidOutputReport: IHidOutputReport} - RT_CLASS!{class HidBooleanControlDescription: IHidBooleanControlDescription} - RT_CLASS!{class HidNumericControlDescription: IHidNumericControlDescription} - RT_CLASS!{class HidInputReportReceivedEventArgs: IHidInputReportReceivedEventArgs} - DEFINE_IID!(IID_IHidBooleanControlDescription, 1637279043, 10712, 18986, 134, 131, 132, 158, 32, 123, 190, 49); - RT_INTERFACE!{interface IHidBooleanControlDescription(IHidBooleanControlDescriptionVtbl): IInspectable(IInspectableVtbl) [IID_IHidBooleanControlDescription] { - fn get_Id(&mut self, out: *mut u32) -> HRESULT, - fn get_ReportId(&mut self, out: *mut u16) -> HRESULT, - fn get_ReportType(&mut self, out: *mut HidReportType) -> HRESULT, - fn get_UsagePage(&mut self, out: *mut u16) -> HRESULT, - fn get_UsageId(&mut self, out: *mut u16) -> HRESULT, - fn get_ParentCollections(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + DEFINE_IID!(IID_IDataPackageView4, 3756617503, 57410, 17459, 160, 159, 38, 214, 255, 218, 139, 133); + RT_INTERFACE!{interface IDataPackageView4(IDataPackageView4Vtbl): IInspectable(IInspectableVtbl) [IID_IDataPackageView4] { + fn SetAcceptedFormatId(&mut self, formatId: HSTRING) -> HRESULT }} - impl IHidBooleanControlDescription { - #[inline] pub unsafe fn get_id(&mut self) -> Result { + impl IDataPackageView4 { + #[inline] pub unsafe fn set_accepted_format_id(&mut self, formatId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetAcceptedFormatId)(self, formatId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataPackage, 1642853831, 61418, 17222, 149, 84, 152, 29, 126, 25, 143, 254); + RT_INTERFACE!{interface IDataPackage(IDataPackageVtbl): IInspectable(IInspectableVtbl) [IID_IDataPackage] { + fn GetView(&mut self, out: *mut *mut DataPackageView) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut DataPackagePropertySet) -> HRESULT, + fn get_RequestedOperation(&mut self, out: *mut DataPackageOperation) -> HRESULT, + fn put_RequestedOperation(&mut self, value: DataPackageOperation) -> HRESULT, + fn add_OperationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_OperationCompleted(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Destroyed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Destroyed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn SetData(&mut self, formatId: HSTRING, value: *mut IInspectable) -> HRESULT, + fn SetDataProvider(&mut self, formatId: HSTRING, delayRenderer: *mut DataProviderHandler) -> HRESULT, + fn SetText(&mut self, value: HSTRING) -> HRESULT, + fn SetUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn SetHtmlFormat(&mut self, value: HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_ResourceMap(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn SetRtf(&mut self, value: HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn SetBitmap(&mut self, value: *mut super::super::storage::streams::RandomAccessStreamReference) -> HRESULT, + #[cfg(feature="windows.storage")] fn SetStorageItemsReadOnly(&mut self, value: *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows.storage")] fn SetStorageItems(&mut self, value: *mut super::super::foundation::collections::IIterable, readOnly: bool) -> HRESULT + }} + impl IDataPackage { + #[inline] pub unsafe fn get_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_requested_operation(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_RequestedOperation)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_report_id(&mut self) -> Result { + #[inline] pub unsafe fn set_requested_operation(&mut self, value: DataPackageOperation) -> Result<()> { + let hr = ((*self.lpVtbl).put_RequestedOperation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_operation_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportId)(self, &mut out); + let hr = ((*self.lpVtbl).add_OperationCompleted)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_report_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_operation_completed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_OperationCompleted)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { + #[inline] pub unsafe fn add_destroyed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); + let hr = ((*self.lpVtbl).add_Destroyed)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_destroyed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Destroyed)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_parent_collections(&mut self) -> Result>> { + #[inline] pub unsafe fn set_data(&mut self, formatId: &HStringArg, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetData)(self, formatId.get(), value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_data_provider(&mut self, formatId: &HStringArg, delayRenderer: &DataProviderHandler) -> Result<()> { + let hr = ((*self.lpVtbl).SetDataProvider)(self, formatId.get(), delayRenderer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).SetUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_html_format(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetHtmlFormat)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_resource_map(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ParentCollections)(self, &mut out); + let hr = ((*self.lpVtbl).get_ResourceMap)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn set_rtf(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetRtf)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_bitmap(&mut self, value: &super::super::storage::streams::RandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).SetBitmap)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_storage_items_read_only(&mut self, value: &super::super::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).SetStorageItemsReadOnly)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_storage_items(&mut self, value: &super::super::foundation::collections::IIterable, readOnly: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStorageItems)(self, value as *const _ as *mut _, readOnly); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class HidCollection: IHidCollection} - DEFINE_IID!(IID_IHidBooleanControlDescription2, 3371094762, 35447, 19510, 170, 0, 95, 240, 68, 157, 62, 115); - RT_INTERFACE!{interface IHidBooleanControlDescription2(IHidBooleanControlDescription2Vtbl): IInspectable(IInspectableVtbl) [IID_IHidBooleanControlDescription2] { - fn get_IsAbsolute(&mut self, out: *mut bool) -> HRESULT + RT_CLASS!{class DataPackageView: IDataPackageView} + RT_CLASS!{class DataPackage: IDataPackage} + DEFINE_IID!(IID_IDataPackage2, 68952041, 9225, 17889, 165, 56, 76, 83, 238, 238, 4, 167); + RT_INTERFACE!{interface IDataPackage2(IDataPackage2Vtbl): IInspectable(IInspectableVtbl) [IID_IDataPackage2] { + fn SetApplicationLink(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn SetWebLink(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT }} - impl IHidBooleanControlDescription2 { - #[inline] pub unsafe fn get_is_absolute(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsAbsolute)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IDataPackage2 { + #[inline] pub unsafe fn set_application_link(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).SetApplicationLink)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_web_link(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).SetWebLink)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IHidNumericControlDescription, 1670209158, 7575, 19573, 146, 127, 95, 245, 139, 160, 94, 50); - RT_INTERFACE!{interface IHidNumericControlDescription(IHidNumericControlDescriptionVtbl): IInspectable(IInspectableVtbl) [IID_IHidNumericControlDescription] { - fn get_Id(&mut self, out: *mut u32) -> HRESULT, - fn get_ReportId(&mut self, out: *mut u16) -> HRESULT, - fn get_ReportType(&mut self, out: *mut HidReportType) -> HRESULT, - fn get_ReportSize(&mut self, out: *mut u32) -> HRESULT, - fn get_ReportCount(&mut self, out: *mut u32) -> HRESULT, - fn get_UsagePage(&mut self, out: *mut u16) -> HRESULT, - fn get_UsageId(&mut self, out: *mut u16) -> HRESULT, - fn get_LogicalMinimum(&mut self, out: *mut i32) -> HRESULT, - fn get_LogicalMaximum(&mut self, out: *mut i32) -> HRESULT, - fn get_PhysicalMinimum(&mut self, out: *mut i32) -> HRESULT, - fn get_PhysicalMaximum(&mut self, out: *mut i32) -> HRESULT, - fn get_UnitExponent(&mut self, out: *mut u32) -> HRESULT, - fn get_Unit(&mut self, out: *mut u32) -> HRESULT, - fn get_IsAbsolute(&mut self, out: *mut bool) -> HRESULT, - fn get_HasNull(&mut self, out: *mut bool) -> HRESULT, - fn get_ParentCollections(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + DEFINE_IID!(IID_IHtmlFormatHelperStatics, 3794696009, 56688, 17519, 174, 252, 97, 206, 229, 159, 101, 94); + RT_INTERFACE!{static interface IHtmlFormatHelperStatics(IHtmlFormatHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IHtmlFormatHelperStatics] { + fn GetStaticFragment(&mut self, htmlFormat: HSTRING, out: *mut HSTRING) -> HRESULT, + fn CreateHtmlFormat(&mut self, htmlFragment: HSTRING, out: *mut HSTRING) -> HRESULT }} - impl IHidNumericControlDescription { - #[inline] pub unsafe fn get_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IHtmlFormatHelperStatics { + #[inline] pub unsafe fn get_static_fragment(&mut self, htmlFormat: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStaticFragment)(self, htmlFormat.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_report_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn create_html_format(&mut self, htmlFragment: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateHtmlFormat)(self, htmlFragment.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_report_size(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportSize)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_ACTIVATABLE!{IHtmlFormatHelperStatics [CLSID_HtmlFormatHelper]} + DEFINE_CLSID!(CLSID_HtmlFormatHelper = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,68,97,116,97,84,114,97,110,115,102,101,114,46,72,116,109,108,70,111,114,109,97,116,72,101,108,112,101,114,0]); + DEFINE_IID!(IID_IClipboardStatics, 3324502673, 13538, 18787, 142, 237, 147, 203, 176, 234, 61, 112); + RT_INTERFACE!{static interface IClipboardStatics(IClipboardStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IClipboardStatics] { + fn GetContent(&mut self, out: *mut *mut DataPackageView) -> HRESULT, + fn SetContent(&mut self, content: *mut DataPackage) -> HRESULT, + fn Flush(&mut self) -> HRESULT, + fn Clear(&mut self) -> HRESULT, + fn add_ContentChanged(&mut self, changeHandler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContentChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IClipboardStatics { + #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetContent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_report_count(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportCount)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_content(&mut self, content: &DataPackage) -> Result<()> { + let hr = ((*self.lpVtbl).SetContent)(self, content as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn flush(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Flush)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_logical_minimum(&mut self) -> Result { + #[inline] pub unsafe fn add_content_changed(&mut self, changeHandler: &super::super::foundation::EventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LogicalMinimum)(self, &mut out); + let hr = ((*self.lpVtbl).add_ContentChanged)(self, changeHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_logical_maximum(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LogicalMaximum)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_content_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContentChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_physical_minimum(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PhysicalMinimum)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_ACTIVATABLE!{IClipboardStatics [CLSID_Clipboard]} + DEFINE_CLSID!(CLSID_Clipboard = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,68,97,116,97,84,114,97,110,115,102,101,114,46,67,108,105,112,98,111,97,114,100,0]); + DEFINE_IID!(IID_IDataRequestDeferral, 1841608863, 902, 16995, 135, 193, 237, 125, 206, 48, 137, 14); + RT_INTERFACE!{interface IDataRequestDeferral(IDataRequestDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IDataRequestDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IDataRequestDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_physical_maximum(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PhysicalMaximum)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class DataRequestDeferral: IDataRequestDeferral} + DEFINE_IID!(IID_IDataRequest, 1128377915, 64530, 20051, 140, 2, 172, 113, 76, 65, 90, 39); + RT_INTERFACE!{interface IDataRequest(IDataRequestVtbl): IInspectable(IInspectableVtbl) [IID_IDataRequest] { + fn get_Data(&mut self, out: *mut *mut DataPackage) -> HRESULT, + fn put_Data(&mut self, value: *mut DataPackage) -> HRESULT, + fn get_Deadline(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn FailWithDisplayText(&mut self, value: HSTRING) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut DataRequestDeferral) -> HRESULT + }} + impl IDataRequest { + #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_unit_exponent(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UnitExponent)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_data(&mut self, value: &DataPackage) -> Result<()> { + let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_unit(&mut self) -> Result { + #[inline] pub unsafe fn get_deadline(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Unit)(self, &mut out); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_absolute(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsAbsolute)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn fail_with_display_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).FailWithDisplayText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_has_null(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HasNull)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_parent_collections(&mut self) -> Result>> { + } + RT_CLASS!{class DataRequest: IDataRequest} + DEFINE_IID!(IID_IDataRequestedEventArgs, 3414927367, 27333, 17353, 138, 197, 155, 162, 50, 22, 49, 130); + RT_INTERFACE!{interface IDataRequestedEventArgs(IDataRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDataRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut DataRequest) -> HRESULT + }} + impl IDataRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ParentCollections)(self, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IHidCollection, 1904866723, 13041, 18147, 190, 253, 68, 210, 102, 59, 126, 106); - RT_INTERFACE!{interface IHidCollection(IHidCollectionVtbl): IInspectable(IInspectableVtbl) [IID_IHidCollection] { - fn get_Id(&mut self, out: *mut u32) -> HRESULT, - fn get_Type(&mut self, out: *mut HidCollectionType) -> HRESULT, - fn get_UsagePage(&mut self, out: *mut u32) -> HRESULT, - fn get_UsageId(&mut self, out: *mut u32) -> HRESULT + RT_CLASS!{class DataRequestedEventArgs: IDataRequestedEventArgs} + DEFINE_IID!(IID_ITargetApplicationChosenEventArgs, 3396319404, 10631, 20195, 156, 84, 216, 175, 188, 184, 108, 29); + RT_INTERFACE!{interface ITargetApplicationChosenEventArgs(ITargetApplicationChosenEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITargetApplicationChosenEventArgs] { + fn get_ApplicationName(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IHidCollection { - #[inline] pub unsafe fn get_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl ITargetApplicationChosenEventArgs { + #[inline] pub unsafe fn get_application_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ApplicationName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_type(&mut self) -> Result { + } + RT_CLASS!{class TargetApplicationChosenEventArgs: ITargetApplicationChosenEventArgs} + DEFINE_IID!(IID_IDataTransferManager, 2781539995, 34568, 18897, 141, 54, 103, 210, 90, 141, 160, 12); + RT_INTERFACE!{interface IDataTransferManager(IDataTransferManagerVtbl): IInspectable(IInspectableVtbl) [IID_IDataTransferManager] { + fn add_DataRequested(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataRequested(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_TargetApplicationChosen(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TargetApplicationChosen(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IDataTransferManager { + #[inline] pub unsafe fn add_data_requested(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + let hr = ((*self.lpVtbl).add_DataRequested)(self, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_data_requested(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DataRequested)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { + #[inline] pub unsafe fn add_target_application_chosen(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); + let hr = ((*self.lpVtbl).add_TargetApplicationChosen)(self, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn remove_target_application_chosen(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TargetApplicationChosen)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - DEFINE_IID!(IID_IHidInputReport, 3277655632, 63463, 20109, 178, 62, 202, 187, 229, 107, 144, 233); - RT_INTERFACE!{interface IHidInputReport(IHidInputReportVtbl): IInspectable(IInspectableVtbl) [IID_IHidInputReport] { - fn get_Id(&mut self, out: *mut u16) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn get_ActivatedBooleanControls(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_TransitionedBooleanControls(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn GetBooleanControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidBooleanControl) -> HRESULT, - fn GetBooleanControlByDescription(&mut self, controlDescription: *mut HidBooleanControlDescription, out: *mut *mut HidBooleanControl) -> HRESULT, - fn GetNumericControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidNumericControl) -> HRESULT, - fn GetNumericControlByDescription(&mut self, controlDescription: *mut HidNumericControlDescription, out: *mut *mut HidNumericControl) -> HRESULT + RT_CLASS!{class DataTransferManager: IDataTransferManager} + RT_ACTIVATABLE!{IDataTransferManagerStatics2 [CLSID_DataTransferManager]} + RT_ACTIVATABLE!{IDataTransferManagerStatics [CLSID_DataTransferManager]} + DEFINE_CLSID!(CLSID_DataTransferManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,68,97,116,97,84,114,97,110,115,102,101,114,46,68,97,116,97,84,114,97,110,115,102,101,114,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IDataTransferManagerStatics, 2849636778, 57358, 19710, 170, 68, 45, 217, 50, 220, 163, 216); + RT_INTERFACE!{static interface IDataTransferManagerStatics(IDataTransferManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDataTransferManagerStatics] { + fn ShowShareUI(&mut self) -> HRESULT, + fn GetForCurrentView(&mut self, out: *mut *mut DataTransferManager) -> HRESULT }} - impl IHidInputReport { - #[inline] pub unsafe fn get_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IDataTransferManagerStatics { + #[inline] pub unsafe fn show_share_ui(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ShowShareUI)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_activated_boolean_controls(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ActivatedBooleanControls)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + DEFINE_IID!(IID_IDataTransferManagerStatics2, 3310273260, 40855, 19811, 152, 104, 57, 94, 39, 26, 216, 245); + RT_INTERFACE!{static interface IDataTransferManagerStatics2(IDataTransferManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IDataTransferManagerStatics2] { + fn IsSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IDataTransferManagerStatics2 { + #[inline] pub unsafe fn is_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_transitioned_boolean_controls(&mut self) -> Result>> { + } + DEFINE_IID!(IID_ISharedStorageAccessManagerStatics, 3323144922, 13489, 18505, 189, 95, 208, 159, 238, 49, 88, 197); + RT_INTERFACE!{static interface ISharedStorageAccessManagerStatics(ISharedStorageAccessManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISharedStorageAccessManagerStatics] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn AddFile(&mut self, file: *mut super::super::storage::IStorageFile, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RedeemTokenForFileAsync(&mut self, token: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RemoveFile(&mut self, token: HSTRING) -> HRESULT + }} + impl ISharedStorageAccessManagerStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn add_file(&mut self, file: &super::super::storage::IStorageFile) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_TransitionedBooleanControls)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).AddFile)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_boolean_control(&mut self, usagePage: u16, usageId: u16) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn redeem_token_for_file_async(&mut self, token: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetBooleanControl)(self, usagePage, usageId, &mut out); + let hr = ((*self.lpVtbl).RedeemTokenForFileAsync)(self, token.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_boolean_control_by_description(&mut self, controlDescription: &HidBooleanControlDescription) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetBooleanControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_file(&mut self, token: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveFile)(self, token.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_numeric_control(&mut self, usagePage: u16, usageId: u16) -> Result> { + } + RT_ACTIVATABLE!{ISharedStorageAccessManagerStatics [CLSID_SharedStorageAccessManager]} + DEFINE_CLSID!(CLSID_SharedStorageAccessManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,68,97,116,97,84,114,97,110,115,102,101,114,46,83,104,97,114,101,100,83,116,111,114,97,103,101,65,99,99,101,115,115,77,97,110,97,103,101,114,0]); +pub mod dragdrop { // Windows.ApplicationModel.DataTransfer.DragDrop +use ::prelude::*; + RT_ENUM! { enum DragDropModifiers: u32 { + None (DragDropModifiers_None) = 0, Shift (DragDropModifiers_Shift) = 1, Control (DragDropModifiers_Control) = 2, Alt (DragDropModifiers_Alt) = 4, LeftButton (DragDropModifiers_LeftButton) = 8, MiddleButton (DragDropModifiers_MiddleButton) = 16, RightButton (DragDropModifiers_RightButton) = 32, + }} +pub mod core { // Windows.ApplicationModel.DataTransfer.DragDrop.Core +use ::prelude::*; + RT_ENUM! { enum CoreDragUIContentMode: u32 { + Auto (CoreDragUIContentMode_Auto) = 0, Deferred (CoreDragUIContentMode_Deferred) = 1, + }} + DEFINE_IID!(IID_ICoreDragInfo, 1211447947, 52048, 17998, 149, 117, 205, 78, 58, 122, 176, 40); + RT_INTERFACE!{interface ICoreDragInfo(ICoreDragInfoVtbl): IInspectable(IInspectableVtbl) [IID_ICoreDragInfo] { + fn get_Data(&mut self, out: *mut *mut super::super::DataPackageView) -> HRESULT, + fn get_Modifiers(&mut self, out: *mut super::DragDropModifiers) -> HRESULT, + fn get_Position(&mut self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT + }} + impl ICoreDragInfo { + #[inline] pub unsafe fn get_data(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetNumericControl)(self, usagePage, usageId, &mut out); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_numeric_control_by_description(&mut self, controlDescription: &HidNumericControlDescription) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetNumericControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_modifiers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Modifiers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class HidBooleanControl: IHidBooleanControl} - RT_CLASS!{class HidNumericControl: IHidNumericControl} - DEFINE_IID!(IID_IHidOutputReport, 1657480516, 51350, 17507, 147, 193, 223, 157, 176, 83, 196, 80); - RT_INTERFACE!{interface IHidOutputReport(IHidOutputReportVtbl): IInspectable(IInspectableVtbl) [IID_IHidOutputReport] { - fn get_Id(&mut self, out: *mut u16) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), - #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn GetBooleanControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidBooleanControl) -> HRESULT, - fn GetBooleanControlByDescription(&mut self, controlDescription: *mut HidBooleanControlDescription, out: *mut *mut HidBooleanControl) -> HRESULT, - fn GetNumericControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidNumericControl) -> HRESULT, - fn GetNumericControlByDescription(&mut self, controlDescription: *mut HidNumericControlDescription, out: *mut *mut HidNumericControl) -> HRESULT + DEFINE_IID!(IID_ICoreDragInfo2, 3309736421, 59131, 19828, 180, 177, 138, 60, 23, 242, 94, 158); + RT_INTERFACE!{interface ICoreDragInfo2(ICoreDragInfo2Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreDragInfo2] { + fn get_AllowedOperations(&mut self, out: *mut super::super::DataPackageOperation) -> HRESULT }} - impl IHidOutputReport { - #[inline] pub unsafe fn get_id(&mut self) -> Result { + impl ICoreDragInfo2 { + #[inline] pub unsafe fn get_allowed_operations(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_AllowedOperations)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Data)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + DEFINE_IID!(IID_ICoreDragUIOverride, 2309509220, 13193, 20303, 136, 151, 126, 138, 63, 251, 60, 147); + RT_INTERFACE!{interface ICoreDragUIOverride(ICoreDragUIOverrideVtbl): IInspectable(IInspectableVtbl) [IID_ICoreDragUIOverride] { + #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn SetContentFromSoftwareBitmap(&mut self, softwareBitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn SetContentFromSoftwareBitmapWithAnchorPoint(&mut self, softwareBitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: ::rt::gen::windows::foundation::Point) -> HRESULT, + fn get_IsContentVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsContentVisible(&mut self, value: bool) -> HRESULT, + fn get_Caption(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Caption(&mut self, value: HSTRING) -> HRESULT, + fn get_IsCaptionVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsCaptionVisible(&mut self, value: bool) -> HRESULT, + fn get_IsGlyphVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsGlyphVisible(&mut self, value: bool) -> HRESULT, + fn Clear(&mut self) -> HRESULT + }} + impl ICoreDragUIOverride { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_content_from_software_bitmap(&mut self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> Result<()> { + let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmap)(self, softwareBitmap as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_content_from_software_bitmap_with_anchor_point(&mut self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: ::rt::gen::windows::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmapWithAnchorPoint)(self, softwareBitmap as *const _ as *mut _, anchorPoint); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_boolean_control(&mut self, usagePage: u16, usageId: u16) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetBooleanControl)(self, usagePage, usageId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_is_content_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsContentVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_boolean_control_by_description(&mut self, controlDescription: &HidBooleanControlDescription) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetBooleanControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_is_content_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsContentVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_numeric_control(&mut self, usagePage: u16, usageId: u16) -> Result> { + #[inline] pub unsafe fn get_caption(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetNumericControl)(self, usagePage, usageId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Caption)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_numeric_control_by_description(&mut self, controlDescription: &HidNumericControlDescription) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetNumericControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_caption(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Caption)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IHidFeatureReport, 2216532857, 23269, 18147, 130, 239, 31, 236, 92, 137, 66, 244); - RT_INTERFACE!{interface IHidFeatureReport(IHidFeatureReportVtbl): IInspectable(IInspectableVtbl) [IID_IHidFeatureReport] { - fn get_Id(&mut self, out: *mut u16) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), - #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn GetBooleanControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidBooleanControl) -> HRESULT, - fn GetBooleanControlByDescription(&mut self, controlDescription: *mut HidBooleanControlDescription, out: *mut *mut HidBooleanControl) -> HRESULT, - fn GetNumericControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidNumericControl) -> HRESULT, - fn GetNumericControlByDescription(&mut self, controlDescription: *mut HidNumericControlDescription, out: *mut *mut HidNumericControl) -> HRESULT - }} - impl IHidFeatureReport { - #[inline] pub unsafe fn get_id(&mut self) -> Result { + #[inline] pub unsafe fn get_is_caption_visible(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsCaptionVisible)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Data)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_is_caption_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsCaptionVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); + #[inline] pub unsafe fn get_is_glyph_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsGlyphVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_glyph_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsGlyphVisible)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_boolean_control(&mut self, usagePage: u16, usageId: u16) -> Result> { + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreDropOperationTarget, 3641860502, 19547, 16765, 187, 55, 118, 56, 29, 239, 141, 180); + RT_INTERFACE!{interface ICoreDropOperationTarget(ICoreDropOperationTargetVtbl): IInspectable(IInspectableVtbl) [IID_ICoreDropOperationTarget] { + fn EnterAsync(&mut self, dragInfo: *mut CoreDragInfo, dragUIOverride: *mut CoreDragUIOverride, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn OverAsync(&mut self, dragInfo: *mut CoreDragInfo, dragUIOverride: *mut CoreDragUIOverride, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn LeaveAsync(&mut self, dragInfo: *mut CoreDragInfo, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn DropAsync(&mut self, dragInfo: *mut CoreDragInfo, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl ICoreDropOperationTarget { + #[inline] pub unsafe fn enter_async(&mut self, dragInfo: &CoreDragInfo, dragUIOverride: &CoreDragUIOverride) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetBooleanControl)(self, usagePage, usageId, &mut out); + let hr = ((*self.lpVtbl).EnterAsync)(self, dragInfo as *const _ as *mut _, dragUIOverride as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_boolean_control_by_description(&mut self, controlDescription: &HidBooleanControlDescription) -> Result> { + #[inline] pub unsafe fn over_async(&mut self, dragInfo: &CoreDragInfo, dragUIOverride: &CoreDragUIOverride) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetBooleanControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).OverAsync)(self, dragInfo as *const _ as *mut _, dragUIOverride as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_numeric_control(&mut self, usagePage: u16, usageId: u16) -> Result> { + #[inline] pub unsafe fn leave_async(&mut self, dragInfo: &CoreDragInfo) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetNumericControl)(self, usagePage, usageId, &mut out); + let hr = ((*self.lpVtbl).LeaveAsync)(self, dragInfo as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_numeric_control_by_description(&mut self, controlDescription: &HidNumericControlDescription) -> Result> { + #[inline] pub unsafe fn drop_async(&mut self, dragInfo: &CoreDragInfo) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetNumericControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).DropAsync)(self, dragInfo as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IHidInputReportReceivedEventArgs, 1884931531, 22962, 19906, 152, 92, 10, 220, 97, 54, 250, 45); - RT_INTERFACE!{interface IHidInputReportReceivedEventArgs(IHidInputReportReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IHidInputReportReceivedEventArgs] { - fn get_Report(&mut self, out: *mut *mut HidInputReport) -> HRESULT + RT_CLASS!{class CoreDragInfo: ICoreDragInfo} + RT_CLASS!{class CoreDragUIOverride: ICoreDragUIOverride} + DEFINE_IID!(IID_ICoreDragOperation, 3423002191, 28080, 20066, 171, 27, 167, 74, 2, 220, 109, 133); + RT_INTERFACE!{interface ICoreDragOperation(ICoreDragOperationVtbl): IInspectable(IInspectableVtbl) [IID_ICoreDragOperation] { + fn get_Data(&mut self, out: *mut *mut super::super::DataPackage) -> HRESULT, + fn SetPointerId(&mut self, pointerId: u32) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn SetDragUIContentFromSoftwareBitmap(&mut self, softwareBitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn SetDragUIContentFromSoftwareBitmapWithAnchorPoint(&mut self, softwareBitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: ::rt::gen::windows::foundation::Point) -> HRESULT, + fn get_DragUIContentMode(&mut self, out: *mut CoreDragUIContentMode) -> HRESULT, + fn put_DragUIContentMode(&mut self, value: CoreDragUIContentMode) -> HRESULT, + fn StartAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT }} - impl IHidInputReportReceivedEventArgs { - #[inline] pub unsafe fn get_report(&mut self) -> Result> { + impl ICoreDragOperation { + #[inline] pub unsafe fn get_data(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IHidBooleanControl, 1380840586, 13973, 16524, 187, 162, 226, 235, 90, 191, 188, 32); - RT_INTERFACE!{interface IHidBooleanControl(IHidBooleanControlVtbl): IInspectable(IInspectableVtbl) [IID_IHidBooleanControl] { - fn get_Id(&mut self, out: *mut u32) -> HRESULT, - fn get_UsagePage(&mut self, out: *mut u16) -> HRESULT, - fn get_UsageId(&mut self, out: *mut u16) -> HRESULT, - fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, - fn put_IsActive(&mut self, value: bool) -> HRESULT, - fn get_ControlDescription(&mut self, out: *mut *mut HidBooleanControlDescription) -> HRESULT - }} - impl IHidBooleanControl { - #[inline] pub unsafe fn get_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_pointer_id(&mut self, pointerId: u32) -> Result<()> { + let hr = ((*self.lpVtbl).SetPointerId)(self, pointerId); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_drag_uicontent_from_software_bitmap(&mut self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> Result<()> { + let hr = ((*self.lpVtbl).SetDragUIContentFromSoftwareBitmap)(self, softwareBitmap as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_drag_uicontent_from_software_bitmap_with_anchor_point(&mut self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: ::rt::gen::windows::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).SetDragUIContentFromSoftwareBitmapWithAnchorPoint)(self, softwareBitmap as *const _ as *mut _, anchorPoint); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_active(&mut self) -> Result { + #[inline] pub unsafe fn get_drag_uicontent_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); + let hr = ((*self.lpVtbl).get_DragUIContentMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_is_active(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsActive)(self, value); + #[inline] pub unsafe fn set_drag_uicontent_mode(&mut self, value: CoreDragUIContentMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_DragUIContentMode)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_control_description(&mut self) -> Result> { + #[inline] pub unsafe fn start_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ControlDescription)(self, &mut out); + let hr = ((*self.lpVtbl).StartAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IHidNumericControl, 3817476773, 13735, 19317, 137, 200, 251, 31, 40, 177, 8, 35); - RT_INTERFACE!{interface IHidNumericControl(IHidNumericControlVtbl): IInspectable(IInspectableVtbl) [IID_IHidNumericControl] { - fn get_Id(&mut self, out: *mut u32) -> HRESULT, - fn get_IsGrouped(&mut self, out: *mut bool) -> HRESULT, - fn get_UsagePage(&mut self, out: *mut u16) -> HRESULT, - fn get_UsageId(&mut self, out: *mut u16) -> HRESULT, - fn get_Value(&mut self, out: *mut i64) -> HRESULT, - fn put_Value(&mut self, value: i64) -> HRESULT, - fn get_ScaledValue(&mut self, out: *mut i64) -> HRESULT, - fn put_ScaledValue(&mut self, value: i64) -> HRESULT, - fn get_ControlDescription(&mut self, out: *mut *mut HidNumericControlDescription) -> HRESULT + DEFINE_IID!(IID_ICoreDragOperation2, 2185961004, 55706, 20419, 133, 7, 108, 24, 47, 51, 180, 106); + RT_INTERFACE!{interface ICoreDragOperation2(ICoreDragOperation2Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreDragOperation2] { + fn get_AllowedOperations(&mut self, out: *mut super::super::DataPackageOperation) -> HRESULT, + fn put_AllowedOperations(&mut self, value: super::super::DataPackageOperation) -> HRESULT }} - impl IHidNumericControl { - #[inline] pub unsafe fn get_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_grouped(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsGrouped)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Value)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&mut self, value: i64) -> Result<()> { - let hr = ((*self.lpVtbl).put_Value)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scaled_value(&mut self) -> Result { + impl ICoreDragOperation2 { + #[inline] pub unsafe fn get_allowed_operations(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ScaledValue)(self, &mut out); + let hr = ((*self.lpVtbl).get_AllowedOperations)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_scaled_value(&mut self, value: i64) -> Result<()> { - let hr = ((*self.lpVtbl).put_ScaledValue)(self, value); + #[inline] pub unsafe fn set_allowed_operations(&mut self, value: super::super::DataPackageOperation) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowedOperations)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_control_description(&mut self) -> Result> { + } + DEFINE_IID!(IID_ICoreDragDropManagerStatics, 2504195530, 55826, 19484, 141, 6, 4, 29, 178, 151, 51, 195); + RT_INTERFACE!{static interface ICoreDragDropManagerStatics(ICoreDragDropManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreDragDropManagerStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut CoreDragDropManager) -> HRESULT + }} + impl ICoreDragDropManagerStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ControlDescription)(self, &mut out); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IHidDevice, 1602884839, 8704, 17198, 149, 218, 208, 155, 135, 213, 116, 168); - RT_INTERFACE!{interface IHidDevice(IHidDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IHidDevice] { - fn get_VendorId(&mut self, out: *mut u16) -> HRESULT, - fn get_ProductId(&mut self, out: *mut u16) -> HRESULT, - fn get_Version(&mut self, out: *mut u16) -> HRESULT, - fn get_UsagePage(&mut self, out: *mut u16) -> HRESULT, - fn get_UsageId(&mut self, out: *mut u16) -> HRESULT, - fn GetInputReportAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetInputReportByIdAsync(&mut self, reportId: u16, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFeatureReportAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFeatureReportByIdAsync(&mut self, reportId: u16, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateOutputReport(&mut self, out: *mut *mut HidOutputReport) -> HRESULT, - fn CreateOutputReportById(&mut self, reportId: u16, out: *mut *mut HidOutputReport) -> HRESULT, - fn CreateFeatureReport(&mut self, out: *mut *mut HidFeatureReport) -> HRESULT, - fn CreateFeatureReportById(&mut self, reportId: u16, out: *mut *mut HidFeatureReport) -> HRESULT, - fn SendOutputReportAsync(&mut self, outputReport: *mut HidOutputReport, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SendFeatureReportAsync(&mut self, featureReport: *mut HidFeatureReport, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetBooleanControlDescriptions(&mut self, reportType: HidReportType, usagePage: u16, usageId: u16, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn GetNumericControlDescriptions(&mut self, reportType: HidReportType, usagePage: u16, usageId: u16, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn add_InputReportReceived(&mut self, reportHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_InputReportReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class CoreDragDropManager: ICoreDragDropManager} + RT_ACTIVATABLE!{ICoreDragDropManagerStatics [CLSID_CoreDragDropManager]} + DEFINE_CLSID!(CLSID_CoreDragDropManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,68,97,116,97,84,114,97,110,115,102,101,114,46,68,114,97,103,68,114,111,112,46,67,111,114,101,46,67,111,114,101,68,114,97,103,68,114,111,112,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_ICoreDragDropManager, 2102842180, 33892, 20399, 170, 73, 55, 234, 110, 45, 123, 209); + RT_INTERFACE!{interface ICoreDragDropManager(ICoreDragDropManagerVtbl): IInspectable(IInspectableVtbl) [IID_ICoreDragDropManager] { + fn add_TargetRequested(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TargetRequested(&mut self, value: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_AreConcurrentOperationsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_AreConcurrentOperationsEnabled(&mut self, value: bool) -> HRESULT }} - impl IHidDevice { - #[inline] pub unsafe fn get_vendor_id(&mut self) -> Result { + impl ICoreDragDropManager { + #[inline] pub unsafe fn add_target_requested(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_VendorId)(self, &mut out); + let hr = ((*self.lpVtbl).add_TargetRequested)(self, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_product_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ProductId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_target_requested(&mut self, value: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TargetRequested)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_version(&mut self) -> Result { + #[inline] pub unsafe fn get_are_concurrent_operations_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Version)(self, &mut out); + let hr = ((*self.lpVtbl).get_AreConcurrentOperationsEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_are_concurrent_operations_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AreConcurrentOperationsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class CoreDropOperationTargetRequestedEventArgs: ICoreDropOperationTargetRequestedEventArgs} + DEFINE_IID!(IID_ICoreDropOperationTargetRequestedEventArgs, 717918874, 24104, 20134, 130, 158, 41, 19, 78, 102, 93, 109); + RT_INTERFACE!{interface ICoreDropOperationTargetRequestedEventArgs(ICoreDropOperationTargetRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreDropOperationTargetRequestedEventArgs] { + fn SetTarget(&mut self, target: *mut ICoreDropOperationTarget) -> HRESULT + }} + impl ICoreDropOperationTargetRequestedEventArgs { + #[inline] pub unsafe fn set_target(&mut self, target: &ICoreDropOperationTarget) -> Result<()> { + let hr = ((*self.lpVtbl).SetTarget)(self, target as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_input_report_async(&mut self) -> Result>> { + } + RT_CLASS!{class CoreDragOperation: ICoreDragOperation} +} // Windows.ApplicationModel.DataTransfer.DragDrop.Core +} // Windows.ApplicationModel.DataTransfer.DragDrop +pub mod sharetarget { // Windows.ApplicationModel.DataTransfer.ShareTarget +use ::prelude::*; + DEFINE_IID!(IID_IQuickLink, 1614693128, 61630, 19164, 172, 201, 139, 39, 171, 156, 245, 86); + RT_INTERFACE!{interface IQuickLink(IQuickLinkVtbl): IInspectable(IInspectableVtbl) [IID_IQuickLink] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::RandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Thumbnail(&mut self, value: *mut ::rt::gen::windows::storage::streams::RandomAccessStreamReference) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Id(&mut self, value: HSTRING) -> HRESULT, + fn get_SupportedDataFormats(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_SupportedFileTypes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + }} + impl IQuickLink { + #[inline] pub unsafe fn get_title(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetInputReportAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_input_report_by_id_async(&mut self, reportId: u16) -> Result>> { + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetInputReportByIdAsync)(self, reportId, &mut out); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_feature_report_async(&mut self) -> Result>> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_thumbnail(&mut self, value: &::rt::gen::windows::storage::streams::RandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbnail)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetFeatureReportAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_feature_report_by_id_async(&mut self, reportId: u16) -> Result>> { + #[inline] pub unsafe fn set_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Id)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_data_formats(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetFeatureReportByIdAsync)(self, reportId, &mut out); + let hr = ((*self.lpVtbl).get_SupportedDataFormats)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_output_report(&mut self) -> Result> { + #[inline] pub unsafe fn get_supported_file_types(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateOutputReport)(self, &mut out); + let hr = ((*self.lpVtbl).get_SupportedFileTypes)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_output_report_by_id(&mut self, reportId: u16) -> Result> { + } + RT_CLASS!{class QuickLink: IQuickLink} + DEFINE_IID!(IID_IShareOperation, 575060664, 53496, 16833, 168, 42, 65, 55, 219, 101, 4, 251); + RT_INTERFACE!{interface IShareOperation(IShareOperationVtbl): IInspectable(IInspectableVtbl) [IID_IShareOperation] { + fn get_Data(&mut self, out: *mut *mut super::DataPackageView) -> HRESULT, + fn get_QuickLinkId(&mut self, out: *mut HSTRING) -> HRESULT, + fn RemoveThisQuickLink(&mut self) -> HRESULT, + fn ReportStarted(&mut self) -> HRESULT, + fn ReportDataRetrieved(&mut self) -> HRESULT, + fn ReportSubmittedBackgroundTask(&mut self) -> HRESULT, + fn ReportCompletedWithQuickLink(&mut self, quicklink: *mut QuickLink) -> HRESULT, + fn ReportCompleted(&mut self) -> HRESULT, + fn ReportError(&mut self, value: HSTRING) -> HRESULT + }} + impl IShareOperation { + #[inline] pub unsafe fn get_data(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateOutputReportById)(self, reportId, &mut out); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_feature_report(&mut self) -> Result> { + #[inline] pub unsafe fn get_quick_link_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFeatureReport)(self, &mut out); + let hr = ((*self.lpVtbl).get_QuickLinkId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn remove_this_quick_link(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveThisQuickLink)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn report_started(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportStarted)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn report_data_retrieved(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportDataRetrieved)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn report_submitted_background_task(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportSubmittedBackgroundTask)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed_with_quick_link(&mut self, quicklink: &QuickLink) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompletedWithQuickLink)(self, quicklink as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompleted)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn report_error(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ReportError)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IShareOperation2, 268146625, 38776, 18953, 142, 91, 203, 94, 72, 45, 5, 85); + RT_INTERFACE!{interface IShareOperation2(IShareOperation2Vtbl): IInspectable(IInspectableVtbl) [IID_IShareOperation2] { + fn DismissUI(&mut self) -> HRESULT + }} + impl IShareOperation2 { + #[inline] pub unsafe fn dismiss_ui(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DismissUI)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ShareOperation: IShareOperation} +} // Windows.ApplicationModel.DataTransfer.ShareTarget +} // Windows.ApplicationModel.DataTransfer +pub mod email { // Windows.ApplicationModel.Email +use ::prelude::*; + RT_ENUM! { enum EmailCertificateValidationStatus: i32 { + Success (EmailCertificateValidationStatus_Success) = 0, NoMatch (EmailCertificateValidationStatus_NoMatch) = 1, InvalidUsage (EmailCertificateValidationStatus_InvalidUsage) = 2, InvalidCertificate (EmailCertificateValidationStatus_InvalidCertificate) = 3, Revoked (EmailCertificateValidationStatus_Revoked) = 4, ChainRevoked (EmailCertificateValidationStatus_ChainRevoked) = 5, RevocationServerFailure (EmailCertificateValidationStatus_RevocationServerFailure) = 6, Expired (EmailCertificateValidationStatus_Expired) = 7, Untrusted (EmailCertificateValidationStatus_Untrusted) = 8, ServerError (EmailCertificateValidationStatus_ServerError) = 9, UnknownFailure (EmailCertificateValidationStatus_UnknownFailure) = 10, + }} + RT_ENUM! { enum EmailStoreAccessType: i32 { + AppMailboxesReadWrite (EmailStoreAccessType_AppMailboxesReadWrite) = 0, AllMailboxesLimitedReadWrite (EmailStoreAccessType_AllMailboxesLimitedReadWrite) = 1, + }} + RT_ENUM! { enum EmailMessageBodyKind: i32 { + Html (EmailMessageBodyKind_Html) = 0, PlainText (EmailMessageBodyKind_PlainText) = 1, + }} + RT_ENUM! { enum EmailAttachmentDownloadState: i32 { + NotDownloaded (EmailAttachmentDownloadState_NotDownloaded) = 0, Downloading (EmailAttachmentDownloadState_Downloading) = 1, Downloaded (EmailAttachmentDownloadState_Downloaded) = 2, Failed (EmailAttachmentDownloadState_Failed) = 3, + }} + RT_ENUM! { enum EmailMessageDownloadState: i32 { + PartiallyDownloaded (EmailMessageDownloadState_PartiallyDownloaded) = 0, Downloading (EmailMessageDownloadState_Downloading) = 1, Downloaded (EmailMessageDownloadState_Downloaded) = 2, Failed (EmailMessageDownloadState_Failed) = 3, + }} + RT_ENUM! { enum EmailSpecialFolderKind: i32 { + None (EmailSpecialFolderKind_None) = 0, Root (EmailSpecialFolderKind_Root) = 1, Inbox (EmailSpecialFolderKind_Inbox) = 2, Outbox (EmailSpecialFolderKind_Outbox) = 3, Drafts (EmailSpecialFolderKind_Drafts) = 4, DeletedItems (EmailSpecialFolderKind_DeletedItems) = 5, Sent (EmailSpecialFolderKind_Sent) = 6, + }} + RT_ENUM! { enum EmailQueryKind: i32 { + All (EmailQueryKind_All) = 0, Important (EmailQueryKind_Important) = 1, Flagged (EmailQueryKind_Flagged) = 2, Unread (EmailQueryKind_Unread) = 3, Read (EmailQueryKind_Read) = 4, Unseen (EmailQueryKind_Unseen) = 5, + }} + RT_ENUM! { enum EmailMailboxChangeType: i32 { + MessageCreated (EmailMailboxChangeType_MessageCreated) = 0, MessageModified (EmailMailboxChangeType_MessageModified) = 1, MessageDeleted (EmailMailboxChangeType_MessageDeleted) = 2, FolderCreated (EmailMailboxChangeType_FolderCreated) = 3, FolderModified (EmailMailboxChangeType_FolderModified) = 4, FolderDeleted (EmailMailboxChangeType_FolderDeleted) = 5, ChangeTrackingLost (EmailMailboxChangeType_ChangeTrackingLost) = 6, + }} + RT_ENUM! { enum EmailQuerySortDirection: i32 { + Descending (EmailQuerySortDirection_Descending) = 0, Ascending (EmailQuerySortDirection_Ascending) = 1, + }} + RT_ENUM! { enum EmailQuerySortProperty: i32 { + Date (EmailQuerySortProperty_Date) = 0, + }} + RT_ENUM! { enum EmailQuerySearchFields: u32 { + None (EmailQuerySearchFields_None) = 0, Subject (EmailQuerySearchFields_Subject) = 1, Sender (EmailQuerySearchFields_Sender) = 2, Preview (EmailQuerySearchFields_Preview) = 4, Recipients (EmailQuerySearchFields_Recipients) = 8, All (EmailQuerySearchFields_All) = 4294967295, + }} + RT_ENUM! { enum EmailBatchStatus: i32 { + Success (EmailBatchStatus_Success) = 0, ServerSearchSyncManagerError (EmailBatchStatus_ServerSearchSyncManagerError) = 1, ServerSearchUnknownError (EmailBatchStatus_ServerSearchUnknownError) = 2, + }} + RT_ENUM! { enum EmailMessageResponseKind: i32 { + None (EmailMessageResponseKind_None) = 0, Reply (EmailMessageResponseKind_Reply) = 1, ReplyAll (EmailMessageResponseKind_ReplyAll) = 2, Forward (EmailMessageResponseKind_Forward) = 3, + }} + RT_ENUM! { enum EmailMeetingResponseType: i32 { + Accept (EmailMeetingResponseType_Accept) = 0, Decline (EmailMeetingResponseType_Decline) = 1, Tentative (EmailMeetingResponseType_Tentative) = 2, + }} + RT_ENUM! { enum EmailMailboxActionKind: i32 { + MarkMessageAsSeen (EmailMailboxActionKind_MarkMessageAsSeen) = 0, MarkMessageRead (EmailMailboxActionKind_MarkMessageRead) = 1, ChangeMessageFlagState (EmailMailboxActionKind_ChangeMessageFlagState) = 2, MoveMessage (EmailMailboxActionKind_MoveMessage) = 3, SaveDraft (EmailMailboxActionKind_SaveDraft) = 4, SendMessage (EmailMailboxActionKind_SendMessage) = 5, CreateResponseReplyMessage (EmailMailboxActionKind_CreateResponseReplyMessage) = 6, CreateResponseReplyAllMessage (EmailMailboxActionKind_CreateResponseReplyAllMessage) = 7, CreateResponseForwardMessage (EmailMailboxActionKind_CreateResponseForwardMessage) = 8, MoveFolder (EmailMailboxActionKind_MoveFolder) = 9, MarkFolderForSyncEnabled (EmailMailboxActionKind_MarkFolderForSyncEnabled) = 10, + }} + RT_ENUM! { enum EmailImportance: i32 { + Normal (EmailImportance_Normal) = 0, High (EmailImportance_High) = 1, Low (EmailImportance_Low) = 2, + }} + RT_ENUM! { enum EmailFlagState: i32 { + Unflagged (EmailFlagState_Unflagged) = 0, Flagged (EmailFlagState_Flagged) = 1, Completed (EmailFlagState_Completed) = 2, Cleared (EmailFlagState_Cleared) = 3, + }} + RT_ENUM! { enum EmailMailboxSyncStatus: i32 { + Idle (EmailMailboxSyncStatus_Idle) = 0, Syncing (EmailMailboxSyncStatus_Syncing) = 1, UpToDate (EmailMailboxSyncStatus_UpToDate) = 2, AuthenticationError (EmailMailboxSyncStatus_AuthenticationError) = 3, PolicyError (EmailMailboxSyncStatus_PolicyError) = 4, UnknownError (EmailMailboxSyncStatus_UnknownError) = 5, ManualAccountRemovalRequired (EmailMailboxSyncStatus_ManualAccountRemovalRequired) = 6, + }} + RT_ENUM! { enum EmailMailboxOtherAppReadAccess: i32 { + SystemOnly (EmailMailboxOtherAppReadAccess_SystemOnly) = 0, Full (EmailMailboxOtherAppReadAccess_Full) = 1, None (EmailMailboxOtherAppReadAccess_None) = 2, + }} + RT_ENUM! { enum EmailMailboxOtherAppWriteAccess: i32 { + None (EmailMailboxOtherAppWriteAccess_None) = 0, Limited (EmailMailboxOtherAppWriteAccess_Limited) = 1, + }} + RT_ENUM! { enum EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation: i32 { + None (EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation_None) = 0, StrongAlgorithm (EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation_StrongAlgorithm) = 1, AnyAlgorithm (EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation_AnyAlgorithm) = 2, + }} + RT_ENUM! { enum EmailMailboxSmimeEncryptionAlgorithm: i32 { + Any (EmailMailboxSmimeEncryptionAlgorithm_Any) = 0, TripleDes (EmailMailboxSmimeEncryptionAlgorithm_TripleDes) = 1, Des (EmailMailboxSmimeEncryptionAlgorithm_Des) = 2, RC2128Bit (EmailMailboxSmimeEncryptionAlgorithm_RC2128Bit) = 3, RC264Bit (EmailMailboxSmimeEncryptionAlgorithm_RC264Bit) = 4, RC240Bit (EmailMailboxSmimeEncryptionAlgorithm_RC240Bit) = 5, + }} + RT_ENUM! { enum EmailMailboxSmimeSigningAlgorithm: i32 { + Any (EmailMailboxSmimeSigningAlgorithm_Any) = 0, Sha1 (EmailMailboxSmimeSigningAlgorithm_Sha1) = 1, MD5 (EmailMailboxSmimeSigningAlgorithm_MD5) = 2, + }} + RT_ENUM! { enum EmailMailboxAutoReplyMessageResponseKind: i32 { + Html (EmailMailboxAutoReplyMessageResponseKind_Html) = 0, PlainText (EmailMailboxAutoReplyMessageResponseKind_PlainText) = 1, + }} + RT_ENUM! { enum EmailQuerySearchScope: i32 { + Local (EmailQuerySearchScope_Local) = 0, Server (EmailQuerySearchScope_Server) = 1, + }} + RT_ENUM! { enum EmailRecipientResolutionStatus: i32 { + Success (EmailRecipientResolutionStatus_Success) = 0, RecipientNotFound (EmailRecipientResolutionStatus_RecipientNotFound) = 1, AmbiguousRecipient (EmailRecipientResolutionStatus_AmbiguousRecipient) = 2, NoCertificate (EmailRecipientResolutionStatus_NoCertificate) = 3, CertificateRequestLimitReached (EmailRecipientResolutionStatus_CertificateRequestLimitReached) = 4, CannotResolveDistributionList (EmailRecipientResolutionStatus_CannotResolveDistributionList) = 5, ServerError (EmailRecipientResolutionStatus_ServerError) = 6, UnknownFailure (EmailRecipientResolutionStatus_UnknownFailure) = 7, + }} + RT_ENUM! { enum EmailMessageSmimeKind: i32 { + None (EmailMessageSmimeKind_None) = 0, ClearSigned (EmailMessageSmimeKind_ClearSigned) = 1, OpaqueSigned (EmailMessageSmimeKind_OpaqueSigned) = 2, Encrypted (EmailMessageSmimeKind_Encrypted) = 3, + }} + RT_ENUM! { enum EmailMailboxEmptyFolderStatus: i32 { + Success (EmailMailboxEmptyFolderStatus_Success) = 0, NetworkError (EmailMailboxEmptyFolderStatus_NetworkError) = 1, PermissionsError (EmailMailboxEmptyFolderStatus_PermissionsError) = 2, ServerError (EmailMailboxEmptyFolderStatus_ServerError) = 3, UnknownFailure (EmailMailboxEmptyFolderStatus_UnknownFailure) = 4, CouldNotDeleteEverything (EmailMailboxEmptyFolderStatus_CouldNotDeleteEverything) = 5, + }} + RT_ENUM! { enum EmailMailboxCreateFolderStatus: i32 { + Success (EmailMailboxCreateFolderStatus_Success) = 0, NetworkError (EmailMailboxCreateFolderStatus_NetworkError) = 1, PermissionsError (EmailMailboxCreateFolderStatus_PermissionsError) = 2, ServerError (EmailMailboxCreateFolderStatus_ServerError) = 3, UnknownFailure (EmailMailboxCreateFolderStatus_UnknownFailure) = 4, NameCollision (EmailMailboxCreateFolderStatus_NameCollision) = 5, ServerRejected (EmailMailboxCreateFolderStatus_ServerRejected) = 6, + }} + RT_ENUM! { enum EmailMailboxDeleteFolderStatus: i32 { + Success (EmailMailboxDeleteFolderStatus_Success) = 0, NetworkError (EmailMailboxDeleteFolderStatus_NetworkError) = 1, PermissionsError (EmailMailboxDeleteFolderStatus_PermissionsError) = 2, ServerError (EmailMailboxDeleteFolderStatus_ServerError) = 3, UnknownFailure (EmailMailboxDeleteFolderStatus_UnknownFailure) = 4, CouldNotDeleteEverything (EmailMailboxDeleteFolderStatus_CouldNotDeleteEverything) = 5, + }} + DEFINE_IID!(IID_IEmailManagerStatics, 4111631956, 21957, 18576, 168, 36, 33, 108, 38, 24, 206, 127); + RT_INTERFACE!{static interface IEmailManagerStatics(IEmailManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailManagerStatics] { + fn ShowComposeNewEmailAsync(&mut self, message: *mut EmailMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IEmailManagerStatics { + #[inline] pub unsafe fn show_compose_new_email_async(&mut self, message: &EmailMessage) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowComposeNewEmailAsync)(self, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_feature_report_by_id(&mut self, reportId: u16) -> Result> { + } + RT_CLASS!{class EmailMessage: IEmailMessage} + DEFINE_IID!(IID_IEmailManagerStatics2, 2886020515, 45460, 16989, 182, 217, 208, 240, 65, 53, 237, 162); + RT_INTERFACE!{static interface IEmailManagerStatics2(IEmailManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailManagerStatics2] { + fn RequestStoreAsync(&mut self, accessType: EmailStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IEmailManagerStatics2 { + #[inline] pub unsafe fn request_store_async(&mut self, accessType: EmailStoreAccessType) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFeatureReportById)(self, reportId, &mut out); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn send_output_report_async(&mut self, outputReport: &HidOutputReport) -> Result>> { + } + RT_CLASS!{class EmailStore: IEmailStore} + DEFINE_IID!(IID_IEmailManagerStatics3, 1248994197, 33854, 18757, 179, 170, 52, 158, 7, 163, 98, 197); + RT_INTERFACE!{static interface IEmailManagerStatics3(IEmailManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailManagerStatics3] { + #[cfg(feature="windows.system")] fn GetForUser(&mut self, user: *mut super::super::system::User, out: *mut *mut EmailManagerForUser) -> HRESULT + }} + impl IEmailManagerStatics3 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user(&mut self, user: &super::super::system::User) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SendOutputReportAsync)(self, outputReport as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).GetForUser)(self, user as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn send_feature_report_async(&mut self, featureReport: &HidFeatureReport) -> Result>> { + } + RT_CLASS!{class EmailManagerForUser: IEmailManagerForUser} + DEFINE_IID!(IID_IEmailManagerForUser, 4151565983, 15525, 19215, 144, 193, 21, 110, 64, 23, 76, 229); + RT_INTERFACE!{interface IEmailManagerForUser(IEmailManagerForUserVtbl): IInspectable(IInspectableVtbl) [IID_IEmailManagerForUser] { + fn ShowComposeNewEmailAsync(&mut self, message: *mut EmailMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RequestStoreAsync(&mut self, accessType: EmailStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT + }} + impl IEmailManagerForUser { + #[inline] pub unsafe fn show_compose_new_email_async(&mut self, message: &EmailMessage) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SendFeatureReportAsync)(self, featureReport as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).ShowComposeNewEmailAsync)(self, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_boolean_control_descriptions(&mut self, reportType: HidReportType, usagePage: u16, usageId: u16) -> Result>> { + #[inline] pub unsafe fn request_store_async(&mut self, accessType: EmailStoreAccessType) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetBooleanControlDescriptions)(self, reportType, usagePage, usageId, &mut out); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_numeric_control_descriptions(&mut self, reportType: HidReportType, usagePage: u16, usageId: u16) -> Result>> { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetNumericControlDescriptions)(self, reportType, usagePage, usageId, &mut out); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_input_report_received(&mut self, reportHandler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_InputReportReceived)(self, reportHandler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IEmailStore, 4160954990, 37175, 20363, 164, 112, 39, 154, 195, 5, 142, 182); + RT_INTERFACE!{interface IEmailStore(IEmailStoreVtbl): IInspectable(IInspectableVtbl) [IID_IEmailStore] { + fn FindMailboxesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetConversationReader(&mut self, out: *mut *mut EmailConversationReader) -> HRESULT, + fn GetConversationReaderWithOptions(&mut self, options: *mut EmailQueryOptions, out: *mut *mut EmailConversationReader) -> HRESULT, + fn GetMessageReader(&mut self, out: *mut *mut EmailMessageReader) -> HRESULT, + fn GetMessageReaderWithOptions(&mut self, options: *mut EmailQueryOptions, out: *mut *mut EmailMessageReader) -> HRESULT, + fn GetMailboxAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetConversationAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetFolderAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetMessageAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateMailboxAsync(&mut self, accountName: HSTRING, accountAddress: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateMailboxInAccountAsync(&mut self, accountName: HSTRING, accountAddress: HSTRING, userDataAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IEmailStore { + #[inline] pub unsafe fn find_mailboxes_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindMailboxesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_input_report_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_InputReportReceived)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_conversation_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConversationReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_conversation_reader_with_options(&mut self, options: &EmailQueryOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConversationReaderWithOptions)(self, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_message_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_message_reader_with_options(&mut self, options: &EmailQueryOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageReaderWithOptions)(self, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mailbox_async(&mut self, id: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMailboxAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_conversation_async(&mut self, id: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConversationAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folder_async(&mut self, id: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFolderAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_message_async(&mut self, id: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_mailbox_async(&mut self, accountName: &HStringArg, accountAddress: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMailboxAsync)(self, accountName.get(), accountAddress.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_mailbox_in_account_async(&mut self, accountName: &HStringArg, accountAddress: &HStringArg, userDataAccountId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMailboxInAccountAsync)(self, accountName.get(), accountAddress.get(), userDataAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } -} // Windows.Devices.HumanInterfaceDevice -pub mod input { // Windows.Devices.Input -use ::prelude::*; - RT_ENUM! { enum PointerDeviceType: i32 { - Touch (PointerDeviceType_Touch) = 0, Pen (PointerDeviceType_Pen) = 1, Mouse (PointerDeviceType_Mouse) = 2, - }} - RT_STRUCT! { struct PointerDeviceUsage { - UsagePage: u32, Usage: u32, MinLogical: i32, MaxLogical: i32, MinPhysical: i32, MaxPhysical: i32, Unit: u32, PhysicalMultiplier: f32, + RT_CLASS!{class EmailMailbox: IEmailMailbox} + RT_CLASS!{class EmailConversationReader: IEmailConversationReader} + RT_CLASS!{class EmailQueryOptions: IEmailQueryOptions [IEmailQueryOptionsFactory] [CLSID_EmailQueryOptions]} + DEFINE_CLSID!(CLSID_EmailQueryOptions = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,69,109,97,105,108,46,69,109,97,105,108,81,117,101,114,121,79,112,116,105,111,110,115,0]); + RT_CLASS!{class EmailMessageReader: IEmailMessageReader} + RT_CLASS!{class EmailConversation: IEmailConversation} + RT_CLASS!{class EmailFolder: IEmailFolder} + DEFINE_IID!(IID_IEmailRecipient, 3404211635, 17528, 18452, 185, 0, 201, 2, 181, 225, 155, 83); + RT_INTERFACE!{interface IEmailRecipient(IEmailRecipientVtbl): IInspectable(IInspectableVtbl) [IID_IEmailRecipient] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_Address(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Address(&mut self, value: HSTRING) -> HRESULT }} - RT_STRUCT! { struct MouseDelta { - X: i32, Y: i32, + impl IEmailRecipient { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Address)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Address)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEmailRecipientFactory, 1426110541, 51098, 20216, 185, 9, 114, 46, 24, 227, 147, 93); + RT_INTERFACE!{static interface IEmailRecipientFactory(IEmailRecipientFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IEmailRecipientFactory] { + fn Create(&mut self, address: HSTRING, out: *mut *mut EmailRecipient) -> HRESULT, + fn CreateWithName(&mut self, address: HSTRING, name: HSTRING, out: *mut *mut EmailRecipient) -> HRESULT }} - DEFINE_IID!(IID_IMouseCapabilities, 3164987427, 32217, 19307, 154, 146, 85, 212, 60, 179, 143, 115); - RT_INTERFACE!{interface IMouseCapabilities(IMouseCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IMouseCapabilities] { - fn get_MousePresent(&mut self, out: *mut i32) -> HRESULT, - fn get_VerticalWheelPresent(&mut self, out: *mut i32) -> HRESULT, - fn get_HorizontalWheelPresent(&mut self, out: *mut i32) -> HRESULT, - fn get_SwapButtons(&mut self, out: *mut i32) -> HRESULT, - fn get_NumberOfButtons(&mut self, out: *mut u32) -> HRESULT + impl IEmailRecipientFactory { + #[inline] pub unsafe fn create(&mut self, address: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, address.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_name(&mut self, address: &HStringArg, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithName)(self, address.get(), name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailRecipient: IEmailRecipient [IEmailRecipientFactory] [CLSID_EmailRecipient]} + DEFINE_CLSID!(CLSID_EmailRecipient = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,69,109,97,105,108,46,69,109,97,105,108,82,101,99,105,112,105,101,110,116,0]); + DEFINE_IID!(IID_IEmailIrmTemplate, 4079449485, 21613, 19434, 169, 99, 84, 163, 139, 44, 192, 22); + RT_INTERFACE!{interface IEmailIrmTemplate(IEmailIrmTemplateVtbl): IInspectable(IInspectableVtbl) [IID_IEmailIrmTemplate] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Id(&mut self, value: HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT }} - impl IMouseCapabilities { - #[inline] pub unsafe fn get_mouse_present(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MousePresent)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IEmailIrmTemplate { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_vertical_wheel_present(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_VerticalWheelPresent)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Id)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_horizontal_wheel_present(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HorizontalWheelPresent)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_swap_buttons(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SwapButtons)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_number_of_buttons(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_NumberOfButtons)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IKeyboardCapabilities, 977247062, 26520, 19388, 131, 62, 15, 52, 177, 124, 101, 255); - RT_INTERFACE!{interface IKeyboardCapabilities(IKeyboardCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IKeyboardCapabilities] { - fn get_KeyboardPresent(&mut self, out: *mut i32) -> HRESULT + DEFINE_IID!(IID_IEmailIrmTemplateFactory, 1034098806, 34616, 17432, 185, 203, 71, 27, 147, 111, 231, 30); + RT_INTERFACE!{static interface IEmailIrmTemplateFactory(IEmailIrmTemplateFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IEmailIrmTemplateFactory] { + fn Create(&mut self, id: HSTRING, name: HSTRING, description: HSTRING, out: *mut *mut EmailIrmTemplate) -> HRESULT }} - impl IKeyboardCapabilities { - #[inline] pub unsafe fn get_keyboard_present(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_KeyboardPresent)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IEmailIrmTemplateFactory { + #[inline] pub unsafe fn create(&mut self, id: &HStringArg, name: &HStringArg, description: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, id.get(), name.get(), description.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ITouchCapabilities, 551376377, 5105, 18120, 146, 133, 44, 5, 250, 62, 218, 111); - RT_INTERFACE!{interface ITouchCapabilities(ITouchCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ITouchCapabilities] { - fn get_TouchPresent(&mut self, out: *mut i32) -> HRESULT, - fn get_Contacts(&mut self, out: *mut u32) -> HRESULT + RT_CLASS!{class EmailIrmTemplate: IEmailIrmTemplate [IEmailIrmTemplateFactory] [CLSID_EmailIrmTemplate]} + DEFINE_CLSID!(CLSID_EmailIrmTemplate = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,69,109,97,105,108,46,69,109,97,105,108,73,114,109,84,101,109,112,108,97,116,101,0]); + DEFINE_IID!(IID_IEmailIrmInfo, 2431984019, 45472, 20157, 166, 182, 221, 202, 85, 96, 110, 14); + RT_INTERFACE!{interface IEmailIrmInfo(IEmailIrmInfoVtbl): IInspectable(IInspectableVtbl) [IID_IEmailIrmInfo] { + fn get_CanEdit(&mut self, out: *mut bool) -> HRESULT, + fn put_CanEdit(&mut self, value: bool) -> HRESULT, + fn get_CanExtractData(&mut self, out: *mut bool) -> HRESULT, + fn put_CanExtractData(&mut self, value: bool) -> HRESULT, + fn get_CanForward(&mut self, out: *mut bool) -> HRESULT, + fn put_CanForward(&mut self, value: bool) -> HRESULT, + fn get_CanModifyRecipientsOnResponse(&mut self, out: *mut bool) -> HRESULT, + fn put_CanModifyRecipientsOnResponse(&mut self, value: bool) -> HRESULT, + fn get_CanPrintData(&mut self, out: *mut bool) -> HRESULT, + fn put_CanPrintData(&mut self, value: bool) -> HRESULT, + fn get_CanRemoveIrmOnResponse(&mut self, out: *mut bool) -> HRESULT, + fn put_CanRemoveIrmOnResponse(&mut self, value: bool) -> HRESULT, + fn get_CanReply(&mut self, out: *mut bool) -> HRESULT, + fn put_CanReply(&mut self, value: bool) -> HRESULT, + fn get_CanReplyAll(&mut self, out: *mut bool) -> HRESULT, + fn put_CanReplyAll(&mut self, value: bool) -> HRESULT, + fn get_ExpirationDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_ExpirationDate(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_IsIrmOriginator(&mut self, out: *mut bool) -> HRESULT, + fn put_IsIrmOriginator(&mut self, value: bool) -> HRESULT, + fn get_IsProgramaticAccessAllowed(&mut self, out: *mut bool) -> HRESULT, + fn put_IsProgramaticAccessAllowed(&mut self, value: bool) -> HRESULT, + fn get_Template(&mut self, out: *mut *mut EmailIrmTemplate) -> HRESULT, + fn put_Template(&mut self, value: *mut EmailIrmTemplate) -> HRESULT }} - impl ITouchCapabilities { - #[inline] pub unsafe fn get_touch_present(&mut self) -> Result { + impl IEmailIrmInfo { + #[inline] pub unsafe fn get_can_edit(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TouchPresent)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanEdit)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_contacts(&mut self) -> Result { + #[inline] pub unsafe fn set_can_edit(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanEdit)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_extract_data(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Contacts)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanExtractData)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IPointerDeviceStatics, 3635976865, 53702, 16750, 189, 141, 87, 144, 145, 77, 197, 99); - RT_INTERFACE!{static interface IPointerDeviceStatics(IPointerDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPointerDeviceStatics] { - fn GetPointerDevice(&mut self, pointerId: u32, out: *mut *mut PointerDevice) -> HRESULT, - fn GetPointerDevices(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT - }} - impl IPointerDeviceStatics { - #[inline] pub unsafe fn get_pointer_device(&mut self, pointerId: u32) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetPointerDevice)(self, pointerId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_can_extract_data(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanExtractData)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_pointer_devices(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetPointerDevices)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_can_forward(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanForward)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class PointerDevice: IPointerDevice} - RT_ACTIVATABLE!{IPointerDeviceStatics [CLSID_PointerDevice]} - DEFINE_CLSID!(CLSID_PointerDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,73,110,112,117,116,46,80,111,105,110,116,101,114,68,101,118,105,99,101,0]); - DEFINE_IID!(IID_IPointerDevice, 2479471356, 60363, 18046, 130, 198, 39, 111, 234, 227, 107, 90); - RT_INTERFACE!{interface IPointerDevice(IPointerDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IPointerDevice] { - fn get_PointerDeviceType(&mut self, out: *mut PointerDeviceType) -> HRESULT, - fn get_IsIntegrated(&mut self, out: *mut bool) -> HRESULT, - fn get_MaxContacts(&mut self, out: *mut u32) -> HRESULT, - fn get_PhysicalDeviceRect(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_ScreenRect(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_SupportedUsages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT - }} - impl IPointerDevice { - #[inline] pub unsafe fn get_pointer_device_type(&mut self) -> Result { + #[inline] pub unsafe fn set_can_forward(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanForward)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_modify_recipients_on_response(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PointerDeviceType)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanModifyRecipientsOnResponse)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_integrated(&mut self) -> Result { + #[inline] pub unsafe fn set_can_modify_recipients_on_response(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanModifyRecipientsOnResponse)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_print_data(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsIntegrated)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanPrintData)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_contacts(&mut self) -> Result { + #[inline] pub unsafe fn set_can_print_data(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanPrintData)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_remove_irm_on_response(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxContacts)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanRemoveIrmOnResponse)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_physical_device_rect(&mut self) -> Result { + #[inline] pub unsafe fn set_can_remove_irm_on_response(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanRemoveIrmOnResponse)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_reply(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PhysicalDeviceRect)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanReply)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_screen_rect(&mut self) -> Result { + #[inline] pub unsafe fn set_can_reply(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanReply)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_reply_all(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ScreenRect)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanReplyAll)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_usages(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedUsages)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_can_reply_all(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanReplyAll)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IPointerDevice2, 4171682464, 50308, 18591, 174, 62, 48, 210, 238, 31, 253, 62); - RT_INTERFACE!{interface IPointerDevice2(IPointerDevice2Vtbl): IInspectable(IInspectableVtbl) [IID_IPointerDevice2] { - fn get_MaxPointersWithZDistance(&mut self, out: *mut u32) -> HRESULT - }} - impl IPointerDevice2 { - #[inline] pub unsafe fn get_max_pointers_with_zdistance(&mut self) -> Result { + #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxPointersWithZDistance)(self, &mut out); + let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IMouseEventArgs, 4129663581, 9044, 19655, 146, 48, 150, 148, 28, 150, 159, 222); - RT_INTERFACE!{interface IMouseEventArgs(IMouseEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMouseEventArgs] { - fn get_MouseDelta(&mut self, out: *mut MouseDelta) -> HRESULT - }} - impl IMouseEventArgs { - #[inline] pub unsafe fn get_mouse_delta(&mut self) -> Result { + #[inline] pub unsafe fn set_expiration_date(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExpirationDate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_irm_originator(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MouseDelta)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsIrmOriginator)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IMouseDevice, 2297295960, 62152, 18932, 190, 31, 194, 86, 179, 136, 188, 17); - RT_INTERFACE!{interface IMouseDevice(IMouseDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IMouseDevice] { - fn add_MouseMoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MouseMoved(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IMouseDevice { - #[inline] pub unsafe fn add_mouse_moved(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn set_is_irm_originator(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsIrmOriginator)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_programatic_access_allowed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_MouseMoved)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IsProgramaticAccessAllowed)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_mouse_moved(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_MouseMoved)(self, cookie); + #[inline] pub unsafe fn set_is_programatic_access_allowed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsProgramaticAccessAllowed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Template)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_template(&mut self, value: &EmailIrmTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_Template)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class MouseDevice: IMouseDevice} - RT_ACTIVATABLE!{IMouseDeviceStatics [CLSID_MouseDevice]} - DEFINE_CLSID!(CLSID_MouseDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,73,110,112,117,116,46,77,111,117,115,101,68,101,118,105,99,101,0]); - RT_CLASS!{class MouseEventArgs: IMouseEventArgs} - DEFINE_IID!(IID_IMouseDeviceStatics, 1212846149, 28016, 18907, 142, 104, 70, 255, 189, 23, 211, 141); - RT_INTERFACE!{static interface IMouseDeviceStatics(IMouseDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMouseDeviceStatics] { - fn GetForCurrentView(&mut self, out: *mut *mut MouseDevice) -> HRESULT + DEFINE_IID!(IID_IEmailIrmInfoFactory, 827044236, 58342, 19835, 190, 141, 145, 169, 99, 17, 176, 27); + RT_INTERFACE!{static interface IEmailIrmInfoFactory(IEmailIrmInfoFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IEmailIrmInfoFactory] { + fn Create(&mut self, expiration: super::super::foundation::DateTime, irmTemplate: *mut EmailIrmTemplate, out: *mut *mut EmailIrmInfo) -> HRESULT }} - impl IMouseDeviceStatics { - #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + impl IEmailIrmInfoFactory { + #[inline] pub unsafe fn create(&mut self, expiration: super::super::foundation::DateTime, irmTemplate: &EmailIrmTemplate) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, expiration, irmTemplate as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class MouseCapabilities: IMouseCapabilities} - RT_CLASS!{class KeyboardCapabilities: IKeyboardCapabilities} - RT_CLASS!{class TouchCapabilities: ITouchCapabilities} -} // Windows.Devices.Input -pub mod lights { // Windows.Devices.Lights -use ::prelude::*; - DEFINE_IID!(IID_ILampStatics, 2820817260, 34949, 16414, 184, 33, 142, 139, 56, 168, 232, 236); - RT_INTERFACE!{static interface ILampStatics(ILampStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILampStatics] { - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class EmailIrmInfo: IEmailIrmInfo [IEmailIrmInfoFactory] [CLSID_EmailIrmInfo]} + DEFINE_CLSID!(CLSID_EmailIrmInfo = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,69,109,97,105,108,46,69,109,97,105,108,73,114,109,73,110,102,111,0]); + DEFINE_IID!(IID_IEmailMessage, 1819120781, 32949, 18680, 176, 177, 224, 78, 67, 15, 68, 229); + RT_INTERFACE!{interface IEmailMessage(IEmailMessageVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMessage] { + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Subject(&mut self, value: HSTRING) -> HRESULT, + fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Body(&mut self, value: HSTRING) -> HRESULT, + fn get_To(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_CC(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Bcc(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Attachments(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT }} - impl ILampStatics { - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + impl IEmailMessage { + #[inline] pub unsafe fn get_subject(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn set_subject(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Subject)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_body(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_body(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Body)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_to(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_To)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_cc(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_CC)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class Lamp: ILamp} - RT_ACTIVATABLE!{ILampStatics [CLSID_Lamp]} - DEFINE_CLSID!(CLSID_Lamp = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,76,105,103,104,116,115,46,76,97,109,112,0]); - RT_CLASS!{class LampAvailabilityChangedEventArgs: ILampAvailabilityChangedEventArgs} - DEFINE_IID!(IID_ILampAvailabilityChangedEventArgs, 1332624877, 1954, 18845, 146, 96, 103, 227, 4, 83, 43, 164); - RT_INTERFACE!{interface ILampAvailabilityChangedEventArgs(ILampAvailabilityChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ILampAvailabilityChangedEventArgs] { - fn get_IsAvailable(&mut self, out: *mut bool) -> HRESULT - }} - impl ILampAvailabilityChangedEventArgs { - #[inline] pub unsafe fn get_is_available(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsAvailable)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_bcc(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Bcc)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_attachments(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Attachments)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ILamp, 75324314, 59973, 19243, 177, 162, 20, 223, 240, 11, 222, 123); - RT_INTERFACE!{interface ILamp(ILampVtbl): IInspectable(IInspectableVtbl) [IID_ILamp] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_IsEnabled(&mut self, value: bool) -> HRESULT, - fn get_BrightnessLevel(&mut self, out: *mut f32) -> HRESULT, - fn put_BrightnessLevel(&mut self, value: f32) -> HRESULT, - fn get_IsColorSettable(&mut self, out: *mut bool) -> HRESULT, - #[cfg(not(feature="windows.ui"))] fn __Dummy6(&mut self) -> (), - #[cfg(feature="windows.ui")] fn get_Color(&mut self, out: *mut super::super::ui::Color) -> HRESULT, - #[cfg(not(feature="windows.ui"))] fn __Dummy7(&mut self) -> (), - #[cfg(feature="windows.ui")] fn put_Color(&mut self, value: super::super::ui::Color) -> HRESULT, - fn add_AvailabilityChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AvailabilityChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl ILamp { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + RT_CLASS!{class EmailAttachment: IEmailAttachment [IEmailAttachmentFactory2] [CLSID_EmailAttachment]} + DEFINE_CLSID!(CLSID_EmailAttachment = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,69,109,97,105,108,46,69,109,97,105,108,65,116,116,97,99,104,109,101,110,116,0]); + DEFINE_IID!(IID_IEmailMessage2, 4257752203, 40730, 17627, 189, 60, 101, 195, 132, 119, 15, 134); + RT_INTERFACE!{interface IEmailMessage2(IEmailMessage2Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMessage2] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RemoteId(&mut self, value: HSTRING) -> HRESULT, + fn get_MailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ConversationId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FolderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AllowInternetImages(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowInternetImages(&mut self, value: bool) -> HRESULT, + fn get_ChangeNumber(&mut self, out: *mut u64) -> HRESULT, + fn get_DownloadState(&mut self, out: *mut EmailMessageDownloadState) -> HRESULT, + fn put_DownloadState(&mut self, value: EmailMessageDownloadState) -> HRESULT, + fn get_EstimatedDownloadSizeInBytes(&mut self, out: *mut u32) -> HRESULT, + fn put_EstimatedDownloadSizeInBytes(&mut self, value: u32) -> HRESULT, + fn get_FlagState(&mut self, out: *mut EmailFlagState) -> HRESULT, + fn put_FlagState(&mut self, value: EmailFlagState) -> HRESULT, + fn get_HasPartialBodies(&mut self, out: *mut bool) -> HRESULT, + fn get_Importance(&mut self, out: *mut EmailImportance) -> HRESULT, + fn put_Importance(&mut self, value: EmailImportance) -> HRESULT, + fn get_InResponseToMessageId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IrmInfo(&mut self, out: *mut *mut EmailIrmInfo) -> HRESULT, + fn put_IrmInfo(&mut self, value: *mut EmailIrmInfo) -> HRESULT, + fn get_IsDraftMessage(&mut self, out: *mut bool) -> HRESULT, + fn get_IsRead(&mut self, out: *mut bool) -> HRESULT, + fn put_IsRead(&mut self, value: bool) -> HRESULT, + fn get_IsSeen(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSeen(&mut self, value: bool) -> HRESULT, + fn get_IsServerSearchMessage(&mut self, out: *mut bool) -> HRESULT, + fn get_IsSmartSendable(&mut self, out: *mut bool) -> HRESULT, + fn get_MessageClass(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_MessageClass(&mut self, value: HSTRING) -> HRESULT, + fn get_NormalizedSubject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_OriginalCodePage(&mut self, out: *mut i32) -> HRESULT, + fn put_OriginalCodePage(&mut self, value: i32) -> HRESULT, + fn get_Preview(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Preview(&mut self, value: HSTRING) -> HRESULT, + fn get_LastResponseKind(&mut self, out: *mut EmailMessageResponseKind) -> HRESULT, + fn put_LastResponseKind(&mut self, value: EmailMessageResponseKind) -> HRESULT, + fn get_Sender(&mut self, out: *mut *mut EmailRecipient) -> HRESULT, + fn put_Sender(&mut self, value: *mut EmailRecipient) -> HRESULT, + fn get_SentTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_SentTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MeetingInfo(&mut self, out: *mut *mut EmailMeetingInfo) -> HRESULT, + fn put_MeetingInfo(&mut self, value: *mut EmailMeetingInfo) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetBodyStream(&mut self, type_: EmailMessageBodyKind, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(feature="windows.storage")] fn SetBodyStream(&mut self, type_: EmailMessageBodyKind, stream: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT + }} + impl IEmailMessage2 { + #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_remote_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); + #[inline] pub unsafe fn set_remote_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteId)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_brightness_level(&mut self) -> Result { + #[inline] pub unsafe fn get_mailbox_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_conversation_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConversationId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folder_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FolderId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_allow_internet_images(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BrightnessLevel)(self, &mut out); + let hr = ((*self.lpVtbl).get_AllowInternetImages)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_brightness_level(&mut self, value: f32) -> Result<()> { - let hr = ((*self.lpVtbl).put_BrightnessLevel)(self, value); + #[inline] pub unsafe fn set_allow_internet_images(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowInternetImages)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_color_settable(&mut self) -> Result { + #[inline] pub unsafe fn get_change_number(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsColorSettable)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChangeNumber)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_color(&mut self) -> Result { + #[inline] pub unsafe fn get_download_state(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + let hr = ((*self.lpVtbl).get_DownloadState)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_color(&mut self, value: super::super::ui::Color) -> Result<()> { - let hr = ((*self.lpVtbl).put_Color)(self, value); + #[inline] pub unsafe fn set_download_state(&mut self, value: EmailMessageDownloadState) -> Result<()> { + let hr = ((*self.lpVtbl).put_DownloadState)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_availability_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_estimated_download_size_in_bytes(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AvailabilityChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_EstimatedDownloadSizeInBytes)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_availability_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AvailabilityChanged)(self, token); + #[inline] pub unsafe fn set_estimated_download_size_in_bytes(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_EstimatedDownloadSizeInBytes)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } -} // Windows.Devices.Lights -pub mod midi { // Windows.Devices.Midi -use ::prelude::*; - RT_ENUM! { enum MidiMessageType: i32 { - None (MidiMessageType_None) = 0, NoteOff (MidiMessageType_NoteOff) = 128, NoteOn (MidiMessageType_NoteOn) = 144, PolyphonicKeyPressure (MidiMessageType_PolyphonicKeyPressure) = 160, ControlChange (MidiMessageType_ControlChange) = 176, ProgramChange (MidiMessageType_ProgramChange) = 192, ChannelPressure (MidiMessageType_ChannelPressure) = 208, PitchBendChange (MidiMessageType_PitchBendChange) = 224, SystemExclusive (MidiMessageType_SystemExclusive) = 240, MidiTimeCode (MidiMessageType_MidiTimeCode) = 241, SongPositionPointer (MidiMessageType_SongPositionPointer) = 242, SongSelect (MidiMessageType_SongSelect) = 243, TuneRequest (MidiMessageType_TuneRequest) = 246, EndSystemExclusive (MidiMessageType_EndSystemExclusive) = 247, TimingClock (MidiMessageType_TimingClock) = 248, Start (MidiMessageType_Start) = 250, Continue (MidiMessageType_Continue) = 251, Stop (MidiMessageType_Stop) = 252, ActiveSensing (MidiMessageType_ActiveSensing) = 254, SystemReset (MidiMessageType_SystemReset) = 255, - }} - DEFINE_IID!(IID_IMidiMessage, 2037807429, 4244, 17027, 155, 224, 40, 159, 192, 238, 131, 52); - RT_INTERFACE!{interface IMidiMessage(IMidiMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiMessage] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_RawData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn get_Type(&mut self, out: *mut MidiMessageType) -> HRESULT - }} - impl IMidiMessage { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + #[inline] pub unsafe fn get_flag_state(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_FlagState)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_raw_data(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RawData)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_flag_state(&mut self, value: EmailFlagState) -> Result<()> { + let hr = ((*self.lpVtbl).put_FlagState)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_type(&mut self) -> Result { + #[inline] pub unsafe fn get_has_partial_bodies(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + let hr = ((*self.lpVtbl).get_HasPartialBodies)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IMidiNoteOffMessage, 385714932, 6542, 19855, 166, 84, 211, 5, 162, 147, 84, 143); - RT_INTERFACE!{interface IMidiNoteOffMessage(IMidiNoteOffMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiNoteOffMessage] { - fn get_Channel(&mut self, out: *mut u8) -> HRESULT, - fn get_Note(&mut self, out: *mut u8) -> HRESULT, - fn get_Velocity(&mut self, out: *mut u8) -> HRESULT - }} - impl IMidiNoteOffMessage { - #[inline] pub unsafe fn get_channel(&mut self) -> Result { + #[inline] pub unsafe fn get_importance(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); + let hr = ((*self.lpVtbl).get_Importance)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_note(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Note)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_importance(&mut self, value: EmailImportance) -> Result<()> { + let hr = ((*self.lpVtbl).put_Importance)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_velocity(&mut self) -> Result { + #[inline] pub unsafe fn get_in_response_to_message_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InResponseToMessageId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_irm_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IrmInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_irm_info(&mut self, value: &EmailIrmInfo) -> Result<()> { + let hr = ((*self.lpVtbl).put_IrmInfo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_draft_message(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Velocity)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsDraftMessage)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IMidiNoteOnMessage, 3760343797, 24961, 18141, 175, 162, 65, 0, 4, 192, 87, 170); - RT_INTERFACE!{interface IMidiNoteOnMessage(IMidiNoteOnMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiNoteOnMessage] { - fn get_Channel(&mut self, out: *mut u8) -> HRESULT, - fn get_Note(&mut self, out: *mut u8) -> HRESULT, - fn get_Velocity(&mut self, out: *mut u8) -> HRESULT - }} - impl IMidiNoteOnMessage { - #[inline] pub unsafe fn get_channel(&mut self) -> Result { + #[inline] pub unsafe fn get_is_read(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsRead)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_note(&mut self) -> Result { + #[inline] pub unsafe fn set_is_read(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsRead)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_seen(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Note)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsSeen)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_velocity(&mut self) -> Result { + #[inline] pub unsafe fn set_is_seen(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSeen)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_server_search_message(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Velocity)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsServerSearchMessage)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IMidiPolyphonicKeyPressureMessage, 527644670, 44264, 18592, 134, 142, 124, 219, 242, 15, 4, 214); - RT_INTERFACE!{interface IMidiPolyphonicKeyPressureMessage(IMidiPolyphonicKeyPressureMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiPolyphonicKeyPressureMessage] { - fn get_Channel(&mut self, out: *mut u8) -> HRESULT, - fn get_Note(&mut self, out: *mut u8) -> HRESULT, - fn get_Pressure(&mut self, out: *mut u8) -> HRESULT - }} - impl IMidiPolyphonicKeyPressureMessage { - #[inline] pub unsafe fn get_channel(&mut self) -> Result { + #[inline] pub unsafe fn get_is_smart_sendable(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsSmartSendable)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_note(&mut self) -> Result { + #[inline] pub unsafe fn get_message_class(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MessageClass)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_message_class(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_MessageClass)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_normalized_subject(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NormalizedSubject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_original_code_page(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Note)(self, &mut out); + let hr = ((*self.lpVtbl).get_OriginalCodePage)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_pressure(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Pressure)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_original_code_page(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_OriginalCodePage)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IMidiControlChangeMessage, 3085000579, 30733, 16479, 183, 129, 62, 21, 152, 201, 127, 64); - RT_INTERFACE!{interface IMidiControlChangeMessage(IMidiControlChangeMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiControlChangeMessage] { - fn get_Channel(&mut self, out: *mut u8) -> HRESULT, - fn get_Controller(&mut self, out: *mut u8) -> HRESULT, - fn get_ControlValue(&mut self, out: *mut u8) -> HRESULT - }} - impl IMidiControlChangeMessage { - #[inline] pub unsafe fn get_channel(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_preview(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Preview)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_controller(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Controller)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_preview(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Preview)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_control_value(&mut self) -> Result { + #[inline] pub unsafe fn get_last_response_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ControlValue)(self, &mut out); + let hr = ((*self.lpVtbl).get_LastResponseKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IMidiProgramChangeMessage, 2629516408, 31294, 17191, 170, 152, 32, 184, 228, 72, 90, 248); - RT_INTERFACE!{interface IMidiProgramChangeMessage(IMidiProgramChangeMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiProgramChangeMessage] { - fn get_Channel(&mut self, out: *mut u8) -> HRESULT, - fn get_Program(&mut self, out: *mut u8) -> HRESULT - }} - impl IMidiProgramChangeMessage { - #[inline] pub unsafe fn get_channel(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_last_response_kind(&mut self, value: EmailMessageResponseKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_LastResponseKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_program(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Program)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_sender(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sender)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IMidiChannelPressureMessage, 3189745760, 25268, 19794, 163, 126, 146, 229, 77, 53, 185, 9); - RT_INTERFACE!{interface IMidiChannelPressureMessage(IMidiChannelPressureMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiChannelPressureMessage] { - fn get_Channel(&mut self, out: *mut u8) -> HRESULT, - fn get_Pressure(&mut self, out: *mut u8) -> HRESULT - }} - impl IMidiChannelPressureMessage { - #[inline] pub unsafe fn get_channel(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_sender(&mut self, value: &EmailRecipient) -> Result<()> { + let hr = ((*self.lpVtbl).put_Sender)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_pressure(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Pressure)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_sent_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SentTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IMidiPitchBendChangeMessage, 702500017, 11935, 20399, 140, 43, 156, 184, 42, 144, 121, 202); - RT_INTERFACE!{interface IMidiPitchBendChangeMessage(IMidiPitchBendChangeMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiPitchBendChangeMessage] { - fn get_Channel(&mut self, out: *mut u8) -> HRESULT, - fn get_Bend(&mut self, out: *mut u16) -> HRESULT - }} - impl IMidiPitchBendChangeMessage { - #[inline] pub unsafe fn get_channel(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_sent_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_SentTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_bend(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Bend)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_meeting_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MeetingInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IMidiTimeCodeMessage, 200738941, 64099, 18972, 141, 235, 192, 232, 119, 150, 166, 215); - RT_INTERFACE!{interface IMidiTimeCodeMessage(IMidiTimeCodeMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiTimeCodeMessage] { - fn get_FrameType(&mut self, out: *mut u8) -> HRESULT, - fn get_Values(&mut self, out: *mut u8) -> HRESULT - }} - impl IMidiTimeCodeMessage { - #[inline] pub unsafe fn get_frame_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_FrameType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_meeting_info(&mut self, value: &EmailMeetingInfo) -> Result<()> { + let hr = ((*self.lpVtbl).put_MeetingInfo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_values(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Values)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_body_stream(&mut self, type_: EmailMessageBodyKind) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBodyStream)(self, type_, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IMidiSongPositionPointerMessage, 1285885014, 60510, 19172, 161, 21, 136, 220, 87, 204, 43, 121); - RT_INTERFACE!{interface IMidiSongPositionPointerMessage(IMidiSongPositionPointerMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSongPositionPointerMessage] { - fn get_Beats(&mut self, out: *mut u16) -> HRESULT - }} - impl IMidiSongPositionPointerMessage { - #[inline] pub unsafe fn get_beats(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Beats)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_body_stream(&mut self, type_: EmailMessageBodyKind, stream: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).SetBodyStream)(self, type_, stream as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IMidiSongSelectMessage, 1240527487, 28035, 18241, 165, 191, 70, 41, 246, 190, 151, 79); - RT_INTERFACE!{interface IMidiSongSelectMessage(IMidiSongSelectMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSongSelectMessage] { - fn get_Song(&mut self, out: *mut u8) -> HRESULT + RT_CLASS!{class EmailMeetingInfo: IEmailMeetingInfo} + DEFINE_IID!(IID_IEmailMessage3, 2716493660, 58776, 19753, 160, 24, 252, 123, 126, 236, 224, 161); + RT_INTERFACE!{interface IEmailMessage3(IEmailMessage3Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMessage3] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_SmimeData(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_SmimeData(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_SmimeKind(&mut self, out: *mut EmailMessageSmimeKind) -> HRESULT, + fn put_SmimeKind(&mut self, value: EmailMessageSmimeKind) -> HRESULT }} - impl IMidiSongSelectMessage { - #[inline] pub unsafe fn get_song(&mut self) -> Result { + impl IEmailMessage3 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_smime_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SmimeData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_smime_data(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_SmimeData)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_smime_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Song)(self, &mut out); + let hr = ((*self.lpVtbl).get_SmimeKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IMidiNoteOffMessageFactory, 2796699872, 42825, 16991, 138, 244, 164, 217, 121, 204, 21, 181); - RT_INTERFACE!{static interface IMidiNoteOffMessageFactory(IMidiNoteOffMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiNoteOffMessageFactory] { - fn CreateMidiNoteOffMessage(&mut self, channel: u8, note: u8, velocity: u8, out: *mut *mut MidiNoteOffMessage) -> HRESULT - }} - impl IMidiNoteOffMessageFactory { - #[inline] pub unsafe fn create_midi_note_off_message(&mut self, channel: u8, note: u8, velocity: u8) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateMidiNoteOffMessage)(self, channel, note, velocity, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_smime_kind(&mut self, value: EmailMessageSmimeKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_SmimeKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class MidiNoteOffMessage: IMidiNoteOffMessage [IMidiNoteOffMessageFactory] [CLSID_MidiNoteOffMessage]} - DEFINE_CLSID!(CLSID_MidiNoteOffMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,78,111,116,101,79,102,102,77,101,115,115,97,103,101,0]); - DEFINE_IID!(IID_IMidiNoteOnMessageFactory, 2604826784, 22977, 16910, 181, 23, 21, 161, 10, 169, 96, 107); - RT_INTERFACE!{static interface IMidiNoteOnMessageFactory(IMidiNoteOnMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiNoteOnMessageFactory] { - fn CreateMidiNoteOnMessage(&mut self, channel: u8, note: u8, velocity: u8, out: *mut *mut MidiNoteOnMessage) -> HRESULT + DEFINE_IID!(IID_IEmailAttachment, 4082354937, 22472, 19163, 185, 146, 96, 252, 235, 88, 79, 84); + RT_INTERFACE!{interface IEmailAttachment(IEmailAttachmentVtbl): IInspectable(IInspectableVtbl) [IID_IEmailAttachment] { + fn get_FileName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_FileName(&mut self, value: HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT }} - impl IMidiNoteOnMessageFactory { - #[inline] pub unsafe fn create_midi_note_on_message(&mut self, channel: u8, note: u8, velocity: u8) -> Result> { + impl IEmailAttachment { + #[inline] pub unsafe fn get_file_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateMidiNoteOnMessage)(self, channel, note, velocity, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_FileName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class MidiNoteOnMessage: IMidiNoteOnMessage [IMidiNoteOnMessageFactory] [CLSID_MidiNoteOnMessage]} - DEFINE_CLSID!(CLSID_MidiNoteOnMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,78,111,116,101,79,110,77,101,115,115,97,103,101,0]); - DEFINE_IID!(IID_IMidiPolyphonicKeyPressureMessageFactory, 3918481470, 50355, 19922, 145, 124, 227, 73, 129, 90, 27, 59); - RT_INTERFACE!{static interface IMidiPolyphonicKeyPressureMessageFactory(IMidiPolyphonicKeyPressureMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiPolyphonicKeyPressureMessageFactory] { - fn CreateMidiPolyphonicKeyPressureMessage(&mut self, channel: u8, note: u8, pressure: u8, out: *mut *mut MidiPolyphonicKeyPressureMessage) -> HRESULT - }} - impl IMidiPolyphonicKeyPressureMessageFactory { - #[inline] pub unsafe fn create_midi_polyphonic_key_pressure_message(&mut self, channel: u8, note: u8, pressure: u8) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateMidiPolyphonicKeyPressureMessage)(self, channel, note, pressure, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_file_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_FileName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class MidiPolyphonicKeyPressureMessage: IMidiPolyphonicKeyPressureMessage [IMidiPolyphonicKeyPressureMessageFactory] [CLSID_MidiPolyphonicKeyPressureMessage]} - DEFINE_CLSID!(CLSID_MidiPolyphonicKeyPressureMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,80,111,108,121,112,104,111,110,105,99,75,101,121,80,114,101,115,115,117,114,101,77,101,115,115,97,103,101,0]); - DEFINE_IID!(IID_IMidiControlChangeMessageFactory, 716260129, 38252, 18093, 151, 82, 248, 127, 85, 5, 47, 227); - RT_INTERFACE!{static interface IMidiControlChangeMessageFactory(IMidiControlChangeMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiControlChangeMessageFactory] { - fn CreateMidiControlChangeMessage(&mut self, channel: u8, controller: u8, controlValue: u8, out: *mut *mut MidiControlChangeMessage) -> HRESULT - }} - impl IMidiControlChangeMessageFactory { - #[inline] pub unsafe fn create_midi_control_change_message(&mut self, channel: u8, controller: u8, controlValue: u8) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateMidiControlChangeMessage)(self, channel, controller, controlValue, &mut out); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class MidiControlChangeMessage: IMidiControlChangeMessage [IMidiControlChangeMessageFactory] [CLSID_MidiControlChangeMessage]} - DEFINE_CLSID!(CLSID_MidiControlChangeMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,67,111,110,116,114,111,108,67,104,97,110,103,101,77,101,115,115,97,103,101,0]); - DEFINE_IID!(IID_IMidiProgramChangeMessageFactory, 3601875847, 21067, 16644, 156, 153, 101, 114, 191, 210, 226, 97); - RT_INTERFACE!{static interface IMidiProgramChangeMessageFactory(IMidiProgramChangeMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiProgramChangeMessageFactory] { - fn CreateMidiProgramChangeMessage(&mut self, channel: u8, program: u8, out: *mut *mut MidiProgramChangeMessage) -> HRESULT - }} - impl IMidiProgramChangeMessageFactory { - #[inline] pub unsafe fn create_midi_program_change_message(&mut self, channel: u8, program: u8) -> Result> { + DEFINE_IID!(IID_IEmailAttachment2, 576655472, 45311, 17777, 157, 84, 167, 6, 196, 141, 85, 198); + RT_INTERFACE!{interface IEmailAttachment2(IEmailAttachment2Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailAttachment2] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ContentId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ContentId(&mut self, value: HSTRING) -> HRESULT, + fn get_ContentLocation(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ContentLocation(&mut self, value: HSTRING) -> HRESULT, + fn get_DownloadState(&mut self, out: *mut EmailAttachmentDownloadState) -> HRESULT, + fn put_DownloadState(&mut self, value: EmailAttachmentDownloadState) -> HRESULT, + fn get_EstimatedDownloadSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn put_EstimatedDownloadSizeInBytes(&mut self, value: u64) -> HRESULT, + fn get_IsFromBaseMessage(&mut self, out: *mut bool) -> HRESULT, + fn get_IsInline(&mut self, out: *mut bool) -> HRESULT, + fn put_IsInline(&mut self, value: bool) -> HRESULT, + fn get_MimeType(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_MimeType(&mut self, value: HSTRING) -> HRESULT + }} + impl IEmailAttachment2 { + #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateMidiProgramChangeMessage)(self, channel, program, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class MidiProgramChangeMessage: IMidiProgramChangeMessage [IMidiProgramChangeMessageFactory] [CLSID_MidiProgramChangeMessage]} - DEFINE_CLSID!(CLSID_MidiProgramChangeMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,80,114,111,103,114,97,109,67,104,97,110,103,101,77,101,115,115,97,103,101,0]); - DEFINE_IID!(IID_IMidiChannelPressureMessageFactory, 1645800751, 8836, 16682, 148, 207, 16, 251, 4, 132, 44, 108); - RT_INTERFACE!{static interface IMidiChannelPressureMessageFactory(IMidiChannelPressureMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiChannelPressureMessageFactory] { - fn CreateMidiChannelPressureMessage(&mut self, channel: u8, pressure: u8, out: *mut *mut MidiChannelPressureMessage) -> HRESULT - }} - impl IMidiChannelPressureMessageFactory { - #[inline] pub unsafe fn create_midi_channel_pressure_message(&mut self, channel: u8, pressure: u8) -> Result> { + #[inline] pub unsafe fn get_content_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateMidiChannelPressureMessage)(self, channel, pressure, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ContentId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class MidiChannelPressureMessage: IMidiChannelPressureMessage [IMidiChannelPressureMessageFactory] [CLSID_MidiChannelPressureMessage]} - DEFINE_CLSID!(CLSID_MidiChannelPressureMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,67,104,97,110,110,101,108,80,114,101,115,115,117,114,101,77,101,115,115,97,103,101,0]); - DEFINE_IID!(IID_IMidiPitchBendChangeMessageFactory, 4126072661, 53192, 18726, 179, 14, 163, 98, 35, 147, 48, 108); - RT_INTERFACE!{static interface IMidiPitchBendChangeMessageFactory(IMidiPitchBendChangeMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiPitchBendChangeMessageFactory] { - fn CreateMidiPitchBendChangeMessage(&mut self, channel: u8, bend: u16, out: *mut *mut MidiPitchBendChangeMessage) -> HRESULT - }} - impl IMidiPitchBendChangeMessageFactory { - #[inline] pub unsafe fn create_midi_pitch_bend_change_message(&mut self, channel: u8, bend: u16) -> Result> { + #[inline] pub unsafe fn set_content_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_location(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateMidiPitchBendChangeMessage)(self, channel, bend, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ContentLocation)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class MidiPitchBendChangeMessage: IMidiPitchBendChangeMessage [IMidiPitchBendChangeMessageFactory] [CLSID_MidiPitchBendChangeMessage]} - DEFINE_CLSID!(CLSID_MidiPitchBendChangeMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,80,105,116,99,104,66,101,110,100,67,104,97,110,103,101,77,101,115,115,97,103,101,0]); - DEFINE_IID!(IID_IMidiSystemExclusiveMessageFactory, 138273314, 15220, 17184, 155, 66, 12, 168, 84, 95, 138, 36); - RT_INTERFACE!{static interface IMidiSystemExclusiveMessageFactory(IMidiSystemExclusiveMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSystemExclusiveMessageFactory] { - #[cfg(feature="windows.storage")] fn CreateMidiSystemExclusiveMessage(&mut self, rawData: *mut super::super::storage::streams::IBuffer, out: *mut *mut MidiSystemExclusiveMessage) -> HRESULT - }} - impl IMidiSystemExclusiveMessageFactory { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_midi_system_exclusive_message(&mut self, rawData: &super::super::storage::streams::IBuffer) -> Result> { + #[inline] pub unsafe fn set_content_location(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentLocation)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_download_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DownloadState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_download_state(&mut self, value: EmailAttachmentDownloadState) -> Result<()> { + let hr = ((*self.lpVtbl).put_DownloadState)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_estimated_download_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EstimatedDownloadSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_estimated_download_size_in_bytes(&mut self, value: u64) -> Result<()> { + let hr = ((*self.lpVtbl).put_EstimatedDownloadSizeInBytes)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_from_base_message(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFromBaseMessage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_inline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_inline(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsInline)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_mime_type(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateMidiSystemExclusiveMessage)(self, rawData as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_MimeType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_mime_type(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_MimeType)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class MidiSystemExclusiveMessage: IMidiMessage [IMidiSystemExclusiveMessageFactory] [CLSID_MidiSystemExclusiveMessage]} - DEFINE_CLSID!(CLSID_MidiSystemExclusiveMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,83,121,115,116,101,109,69,120,99,108,117,115,105,118,101,77,101,115,115,97,103,101,0]); - DEFINE_IID!(IID_IMidiTimeCodeMessageFactory, 3945830853, 30492, 16606, 185, 97, 23, 90, 116, 137, 168, 94); - RT_INTERFACE!{static interface IMidiTimeCodeMessageFactory(IMidiTimeCodeMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiTimeCodeMessageFactory] { - fn CreateMidiTimeCodeMessage(&mut self, frameType: u8, values: u8, out: *mut *mut MidiTimeCodeMessage) -> HRESULT + DEFINE_IID!(IID_IEmailAttachmentFactory, 2037296198, 60758, 18809, 135, 8, 171, 184, 188, 133, 75, 125); + RT_INTERFACE!{interface IEmailAttachmentFactory(IEmailAttachmentFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IEmailAttachmentFactory] { + #[cfg(feature="windows.storage")] fn Create(&mut self, fileName: HSTRING, data: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut EmailAttachment) -> HRESULT }} - impl IMidiTimeCodeMessageFactory { - #[inline] pub unsafe fn create_midi_time_code_message(&mut self, frameType: u8, values: u8) -> Result> { + impl IEmailAttachmentFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create(&mut self, fileName: &HStringArg, data: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateMidiTimeCodeMessage)(self, frameType, values, &mut out); + let hr = ((*self.lpVtbl).Create)(self, fileName.get(), data as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class MidiTimeCodeMessage: IMidiTimeCodeMessage [IMidiTimeCodeMessageFactory] [CLSID_MidiTimeCodeMessage]} - DEFINE_CLSID!(CLSID_MidiTimeCodeMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,84,105,109,101,67,111,100,101,77,101,115,115,97,103,101,0]); - DEFINE_IID!(IID_IMidiSongPositionPointerMessageFactory, 2617305494, 61707, 20458, 179, 149, 245, 214, 207, 128, 246, 78); - RT_INTERFACE!{static interface IMidiSongPositionPointerMessageFactory(IMidiSongPositionPointerMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSongPositionPointerMessageFactory] { - fn CreateMidiSongPositionPointerMessage(&mut self, beats: u16, out: *mut *mut MidiSongPositionPointerMessage) -> HRESULT + DEFINE_IID!(IID_IEmailAttachmentFactory2, 589665333, 20985, 17021, 173, 205, 36, 16, 35, 200, 207, 183); + RT_INTERFACE!{static interface IEmailAttachmentFactory2(IEmailAttachmentFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailAttachmentFactory2] { + #[cfg(feature="windows.storage")] fn Create(&mut self, fileName: HSTRING, data: *mut super::super::storage::streams::IRandomAccessStreamReference, mimeType: HSTRING, out: *mut *mut EmailAttachment) -> HRESULT }} - impl IMidiSongPositionPointerMessageFactory { - #[inline] pub unsafe fn create_midi_song_position_pointer_message(&mut self, beats: u16) -> Result> { + impl IEmailAttachmentFactory2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create(&mut self, fileName: &HStringArg, data: &super::super::storage::streams::IRandomAccessStreamReference, mimeType: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateMidiSongPositionPointerMessage)(self, beats, &mut out); + let hr = ((*self.lpVtbl).Create)(self, fileName.get(), data as *const _ as *mut _, mimeType.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class MidiSongPositionPointerMessage: IMidiSongPositionPointerMessage [IMidiSongPositionPointerMessageFactory] [CLSID_MidiSongPositionPointerMessage]} - DEFINE_CLSID!(CLSID_MidiSongPositionPointerMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,83,111,110,103,80,111,115,105,116,105,111,110,80,111,105,110,116,101,114,77,101,115,115,97,103,101,0]); - DEFINE_IID!(IID_IMidiSongSelectMessageFactory, 2223536356, 34632, 16681, 166, 108, 160, 84, 147, 247, 93, 170); - RT_INTERFACE!{static interface IMidiSongSelectMessageFactory(IMidiSongSelectMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSongSelectMessageFactory] { - fn CreateMidiSongSelectMessage(&mut self, song: u8, out: *mut *mut MidiSongSelectMessage) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxChangedEventArgs, 1023237998, 468, 20042, 164, 76, 178, 45, 212, 46, 194, 7); + RT_INTERFACE!{interface IEmailMailboxChangedEventArgs(IEmailMailboxChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxChangedEventArgs] { + fn GetDeferral(&mut self, out: *mut *mut EmailMailboxChangedDeferral) -> HRESULT }} - impl IMidiSongSelectMessageFactory { - #[inline] pub unsafe fn create_midi_song_select_message(&mut self, song: u8) -> Result> { + impl IEmailMailboxChangedEventArgs { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateMidiSongSelectMessage)(self, song, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class MidiSongSelectMessage: IMidiSongSelectMessage [IMidiSongSelectMessageFactory] [CLSID_MidiSongSelectMessage]} - DEFINE_CLSID!(CLSID_MidiSongSelectMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,83,111,110,103,83,101,108,101,99,116,77,101,115,115,97,103,101,0]); - RT_CLASS!{class MidiTuneRequestMessage: IMidiMessage} - RT_CLASS!{class MidiTimingClockMessage: IMidiMessage} - RT_CLASS!{class MidiStartMessage: IMidiMessage} - RT_CLASS!{class MidiContinueMessage: IMidiMessage} - RT_CLASS!{class MidiStopMessage: IMidiMessage} - RT_CLASS!{class MidiActiveSensingMessage: IMidiMessage} - RT_CLASS!{class MidiSystemResetMessage: IMidiMessage} - DEFINE_IID!(IID_IMidiMessageReceivedEventArgs, 1985375830, 62248, 19281, 144, 125, 179, 168, 206, 150, 191, 128); - RT_INTERFACE!{interface IMidiMessageReceivedEventArgs(IMidiMessageReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMidiMessageReceivedEventArgs] { - fn get_Message(&mut self, out: *mut *mut IMidiMessage) -> HRESULT + RT_CLASS!{class EmailMailboxChangedDeferral: IEmailMailboxChangedDeferral} + DEFINE_IID!(IID_IEmailMailboxChangedDeferral, 2006611137, 38853, 19284, 179, 13, 48, 98, 50, 98, 62, 109); + RT_INTERFACE!{interface IEmailMailboxChangedDeferral(IEmailMailboxChangedDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxChangedDeferral] { + fn Complete(&mut self) -> HRESULT }} - impl IMidiMessageReceivedEventArgs { - #[inline] pub unsafe fn get_message(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Message)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + impl IEmailMailboxChangedDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class MidiMessageReceivedEventArgs: IMidiMessageReceivedEventArgs} - DEFINE_IID!(IID_IMidiInPortStatics, 1153710556, 26623, 19054, 139, 172, 253, 182, 97, 12, 242, 150); - RT_INTERFACE!{static interface IMidiInPortStatics(IMidiInPortStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMidiInPortStatics] { - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IEmailStoreNotificationTriggerDetails, 3457635900, 18150, 17353, 150, 247, 250, 207, 125, 215, 16, 203); + RT_INTERFACE!{interface IEmailStoreNotificationTriggerDetails(IEmailStoreNotificationTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailStoreNotificationTriggerDetails] { + }} - impl IMidiInPortStatics { - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + DEFINE_IID!(IID_IEmailMailboxPolicies, 523453893, 7227, 19911, 180, 16, 99, 115, 120, 62, 84, 93); + RT_INTERFACE!{interface IEmailMailboxPolicies(IEmailMailboxPoliciesVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxPolicies] { + fn get_AllowedSmimeEncryptionAlgorithmNegotiation(&mut self, out: *mut EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation) -> HRESULT, + fn get_AllowSmimeSoftCertificates(&mut self, out: *mut bool) -> HRESULT, + fn get_RequiredSmimeEncryptionAlgorithm(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_RequiredSmimeSigningAlgorithm(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IEmailMailboxPolicies { + #[inline] pub unsafe fn get_allowed_smime_encryption_algorithm_negotiation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowedSmimeEncryptionAlgorithmNegotiation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_allow_smime_soft_certificates(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowSmimeSoftCertificates)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class MidiInPort: IMidiInPort} - RT_ACTIVATABLE!{IMidiInPortStatics [CLSID_MidiInPort]} - DEFINE_CLSID!(CLSID_MidiInPort = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,73,110,80,111,114,116,0]); - DEFINE_IID!(IID_IMidiOutPortStatics, 106742761, 3976, 17547, 155, 100, 169, 88, 38, 198, 91, 143); - RT_INTERFACE!{static interface IMidiOutPortStatics(IMidiOutPortStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMidiOutPortStatics] { - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IMidiOutPortStatics { - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn get_required_smime_encryption_algorithm(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).get_RequiredSmimeEncryptionAlgorithm)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + #[inline] pub unsafe fn get_required_smime_signing_algorithm(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_RequiredSmimeSigningAlgorithm)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class MidiOutPort: IMidiOutPort} - RT_ACTIVATABLE!{IMidiOutPortStatics [CLSID_MidiOutPort]} - DEFINE_CLSID!(CLSID_MidiOutPort = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,79,117,116,80,111,114,116,0]); - DEFINE_IID!(IID_IMidiSynthesizerStatics, 1109715624, 26153, 19819, 170, 143, 212, 82, 26, 90, 49, 206); - RT_INTERFACE!{static interface IMidiSynthesizerStatics(IMidiSynthesizerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSynthesizerStatics] { - fn CreateAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateFromAudioDeviceAsync(&mut self, audioDevice: *mut super::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn IsSynthesizer(&mut self, midiDevice: *mut super::enumeration::DeviceInformation, out: *mut bool) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxPolicies2, 3132459771, 41291, 18812, 168, 226, 85, 234, 194, 156, 196, 181); + RT_INTERFACE!{interface IEmailMailboxPolicies2(IEmailMailboxPolicies2Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxPolicies2] { + fn get_MustEncryptSmimeMessages(&mut self, out: *mut bool) -> HRESULT, + fn get_MustSignSmimeMessages(&mut self, out: *mut bool) -> HRESULT }} - impl IMidiSynthesizerStatics { - #[inline] pub unsafe fn create_async(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_from_audio_device_async(&mut self, audioDevice: &super::enumeration::DeviceInformation) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFromAudioDeviceAsync)(self, audioDevice as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + impl IEmailMailboxPolicies2 { + #[inline] pub unsafe fn get_must_encrypt_smime_messages(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MustEncryptSmimeMessages)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn is_synthesizer(&mut self, midiDevice: &super::enumeration::DeviceInformation) -> Result { + #[inline] pub unsafe fn get_must_sign_smime_messages(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsSynthesizer)(self, midiDevice as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_MustSignSmimeMessages)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class MidiSynthesizer: IMidiSynthesizer} - RT_ACTIVATABLE!{IMidiSynthesizerStatics [CLSID_MidiSynthesizer]} - DEFINE_CLSID!(CLSID_MidiSynthesizer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,83,121,110,116,104,101,115,105,122,101,114,0]); - DEFINE_IID!(IID_IMidiOutPort, 2468179359, 22434, 19002, 173, 184, 70, 64, 136, 111, 102, 147); - RT_INTERFACE!{interface IMidiOutPort(IMidiOutPortVtbl): IInspectable(IInspectableVtbl) [IID_IMidiOutPort] { - fn SendMessage(&mut self, midiMessage: *mut IMidiMessage) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.storage")] fn SendBuffer(&mut self, midiData: *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxPolicies3, 3184828447, 18535, 16714, 129, 162, 128, 57, 25, 196, 65, 145); + RT_INTERFACE!{interface IEmailMailboxPolicies3(IEmailMailboxPolicies3Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxPolicies3] { + fn put_AllowedSmimeEncryptionAlgorithmNegotiation(&mut self, value: EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation) -> HRESULT, + fn put_AllowSmimeSoftCertificates(&mut self, value: bool) -> HRESULT, + fn put_RequiredSmimeEncryptionAlgorithm(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn put_RequiredSmimeSigningAlgorithm(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn put_MustEncryptSmimeMessages(&mut self, value: bool) -> HRESULT, + fn put_MustSignSmimeMessages(&mut self, value: bool) -> HRESULT }} - impl IMidiOutPort { - #[inline] pub unsafe fn send_message(&mut self, midiMessage: &IMidiMessage) -> Result<()> { - let hr = ((*self.lpVtbl).SendMessage)(self, midiMessage as *const _ as *mut _); + impl IEmailMailboxPolicies3 { + #[inline] pub unsafe fn set_allowed_smime_encryption_algorithm_negotiation(&mut self, value: EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowedSmimeEncryptionAlgorithmNegotiation)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_buffer(&mut self, midiData: &super::super::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).SendBuffer)(self, midiData as *const _ as *mut _); + #[inline] pub unsafe fn set_allow_smime_soft_certificates(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowSmimeSoftCertificates)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_required_smime_encryption_algorithm(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_RequiredSmimeEncryptionAlgorithm)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IMidiInPort, 3586251227, 38682, 20143, 162, 61, 234, 25, 254, 96, 127, 249); - RT_INTERFACE!{interface IMidiInPort(IMidiInPortVtbl): IInspectable(IInspectableVtbl) [IID_IMidiInPort] { - fn add_MessageReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MessageReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IMidiInPort { - #[inline] pub unsafe fn add_message_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_MessageReceived)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_required_smime_signing_algorithm(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_RequiredSmimeSigningAlgorithm)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn remove_message_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_MessageReceived)(self, token); + #[inline] pub unsafe fn set_must_encrypt_smime_messages(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_MustEncryptSmimeMessages)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_must_sign_smime_messages(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_MustSignSmimeMessages)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IMidiSynthesizer, 4040824158, 56208, 16479, 184, 174, 33, 210, 225, 127, 46, 69); - RT_INTERFACE!{interface IMidiSynthesizer(IMidiSynthesizerVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSynthesizer] { - fn get_AudioDevice(&mut self, out: *mut *mut super::enumeration::DeviceInformation) -> HRESULT, - fn get_Volume(&mut self, out: *mut f64) -> HRESULT, - fn put_Volume(&mut self, value: f64) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxCapabilities, 4007576486, 35291, 17157, 130, 196, 67, 158, 10, 51, 218, 17); + RT_INTERFACE!{interface IEmailMailboxCapabilities(IEmailMailboxCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxCapabilities] { + fn get_CanForwardMeetings(&mut self, out: *mut bool) -> HRESULT, + fn get_CanGetAndSetExternalAutoReplies(&mut self, out: *mut bool) -> HRESULT, + fn get_CanGetAndSetInternalAutoReplies(&mut self, out: *mut bool) -> HRESULT, + fn get_CanUpdateMeetingResponses(&mut self, out: *mut bool) -> HRESULT, + fn get_CanServerSearchFolders(&mut self, out: *mut bool) -> HRESULT, + fn get_CanServerSearchMailbox(&mut self, out: *mut bool) -> HRESULT, + fn get_CanProposeNewTimeForMeetings(&mut self, out: *mut bool) -> HRESULT, + fn get_CanSmartSend(&mut self, out: *mut bool) -> HRESULT }} - impl IMidiSynthesizer { - #[inline] pub unsafe fn get_audio_device(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AudioDevice)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_volume(&mut self) -> Result { + impl IEmailMailboxCapabilities { + #[inline] pub unsafe fn get_can_forward_meetings(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Volume)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanForwardMeetings)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_volume(&mut self, value: f64) -> Result<()> { - let hr = ((*self.lpVtbl).put_Volume)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - } -} // Windows.Devices.Midi -pub mod perception { // Windows.Devices.Perception -use ::prelude::*; - RT_ENUM! { enum PerceptionFrameSourceAccessStatus: i32 { - Unspecified (PerceptionFrameSourceAccessStatus_Unspecified) = 0, Allowed (PerceptionFrameSourceAccessStatus_Allowed) = 1, DeniedByUser (PerceptionFrameSourceAccessStatus_DeniedByUser) = 2, DeniedBySystem (PerceptionFrameSourceAccessStatus_DeniedBySystem) = 3, - }} - RT_ENUM! { enum PerceptionFrameSourcePropertyChangeStatus: i32 { - Unknown (PerceptionFrameSourcePropertyChangeStatus_Unknown) = 0, Accepted (PerceptionFrameSourcePropertyChangeStatus_Accepted) = 1, LostControl (PerceptionFrameSourcePropertyChangeStatus_LostControl) = 2, PropertyNotSupported (PerceptionFrameSourcePropertyChangeStatus_PropertyNotSupported) = 3, PropertyReadOnly (PerceptionFrameSourcePropertyChangeStatus_PropertyReadOnly) = 4, ValueOutOfRange (PerceptionFrameSourcePropertyChangeStatus_ValueOutOfRange) = 5, - }} - DEFINE_IID!(IID_IPerceptionColorFrameSourceWatcher, 2528973714, 58983, 16580, 137, 249, 20, 98, 222, 166, 169, 204); - RT_INTERFACE!{interface IPerceptionColorFrameSourceWatcher(IPerceptionColorFrameSourceWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSourceWatcher] { - fn add_SourceAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Status(&mut self, out: *mut super::enumeration::DeviceWatcherStatus) -> HRESULT, - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT - }} - impl IPerceptionColorFrameSourceWatcher { - #[inline] pub unsafe fn add_source_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_get_and_set_external_auto_replies(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SourceAdded)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanGetAndSetExternalAutoReplies)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_source_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SourceAdded)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_get_and_set_internal_auto_replies(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SourceRemoved)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanGetAndSetInternalAutoReplies)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_source_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SourceRemoved)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_update_meeting_responses(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanUpdateMeetingResponses)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Stopped)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_server_search_folders(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanServerSearchFolders)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&mut self) -> Result { + #[inline] pub unsafe fn get_can_server_search_mailbox(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanServerSearchMailbox)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_can_propose_new_time_for_meetings(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanProposeNewTimeForMeetings)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_can_smart_send(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanSmartSend)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class PerceptionColorFrameSourceWatcher: IPerceptionColorFrameSourceWatcher} - RT_CLASS!{class PerceptionColorFrameSourceAddedEventArgs: IPerceptionColorFrameSourceAddedEventArgs} - RT_CLASS!{class PerceptionColorFrameSourceRemovedEventArgs: IPerceptionColorFrameSourceRemovedEventArgs} - DEFINE_IID!(IID_IPerceptionDepthFrameSourceWatcher, 2014222033, 36098, 19755, 173, 164, 91, 166, 36, 160, 235, 16); - RT_INTERFACE!{interface IPerceptionDepthFrameSourceWatcher(IPerceptionDepthFrameSourceWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSourceWatcher] { - fn add_SourceAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Status(&mut self, out: *mut super::enumeration::DeviceWatcherStatus) -> HRESULT, - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxCapabilities2, 1769094884, 12065, 19644, 136, 171, 46, 118, 2, 164, 128, 107); + RT_INTERFACE!{interface IEmailMailboxCapabilities2(IEmailMailboxCapabilities2Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxCapabilities2] { + fn get_CanResolveRecipients(&mut self, out: *mut bool) -> HRESULT, + fn get_CanValidateCertificates(&mut self, out: *mut bool) -> HRESULT, + fn get_CanEmptyFolder(&mut self, out: *mut bool) -> HRESULT, + fn get_CanCreateFolder(&mut self, out: *mut bool) -> HRESULT, + fn get_CanDeleteFolder(&mut self, out: *mut bool) -> HRESULT, + fn get_CanMoveFolder(&mut self, out: *mut bool) -> HRESULT }} - impl IPerceptionDepthFrameSourceWatcher { - #[inline] pub unsafe fn add_source_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + impl IEmailMailboxCapabilities2 { + #[inline] pub unsafe fn get_can_resolve_recipients(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SourceAdded)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanResolveRecipients)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_source_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SourceAdded)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_validate_certificates(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SourceRemoved)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanValidateCertificates)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_source_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SourceRemoved)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_empty_folder(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanEmptyFolder)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Stopped)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_can_create_folder(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CanCreateFolder)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_can_delete_folder(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanDeleteFolder)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result { + #[inline] pub unsafe fn get_can_move_folder(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_CanMoveFolder)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); + } + DEFINE_IID!(IID_IEmailMailboxCapabilities3, 4136692036, 22258, 17834, 135, 44, 12, 233, 243, 219, 11, 92); + RT_INTERFACE!{interface IEmailMailboxCapabilities3(IEmailMailboxCapabilities3Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxCapabilities3] { + fn put_CanForwardMeetings(&mut self, value: bool) -> HRESULT, + fn put_CanGetAndSetExternalAutoReplies(&mut self, value: bool) -> HRESULT, + fn put_CanGetAndSetInternalAutoReplies(&mut self, value: bool) -> HRESULT, + fn put_CanUpdateMeetingResponses(&mut self, value: bool) -> HRESULT, + fn put_CanServerSearchFolders(&mut self, value: bool) -> HRESULT, + fn put_CanServerSearchMailbox(&mut self, value: bool) -> HRESULT, + fn put_CanProposeNewTimeForMeetings(&mut self, value: bool) -> HRESULT, + fn put_CanSmartSend(&mut self, value: bool) -> HRESULT, + fn put_CanResolveRecipients(&mut self, value: bool) -> HRESULT, + fn put_CanValidateCertificates(&mut self, value: bool) -> HRESULT, + fn put_CanEmptyFolder(&mut self, value: bool) -> HRESULT, + fn put_CanCreateFolder(&mut self, value: bool) -> HRESULT, + fn put_CanDeleteFolder(&mut self, value: bool) -> HRESULT, + fn put_CanMoveFolder(&mut self, value: bool) -> HRESULT + }} + impl IEmailMailboxCapabilities3 { + #[inline] pub unsafe fn set_can_forward_meetings(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanForwardMeetings)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); + #[inline] pub unsafe fn set_can_get_and_set_external_auto_replies(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanGetAndSetExternalAutoReplies)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class PerceptionDepthFrameSourceWatcher: IPerceptionDepthFrameSourceWatcher} - RT_CLASS!{class PerceptionDepthFrameSourceAddedEventArgs: IPerceptionDepthFrameSourceAddedEventArgs} - RT_CLASS!{class PerceptionDepthFrameSourceRemovedEventArgs: IPerceptionDepthFrameSourceRemovedEventArgs} - DEFINE_IID!(IID_IPerceptionInfraredFrameSourceWatcher, 943521689, 55052, 17485, 168, 176, 114, 12, 46, 102, 254, 59); - RT_INTERFACE!{interface IPerceptionInfraredFrameSourceWatcher(IPerceptionInfraredFrameSourceWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSourceWatcher] { - fn add_SourceAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Status(&mut self, out: *mut super::enumeration::DeviceWatcherStatus) -> HRESULT, - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT - }} - impl IPerceptionInfraredFrameSourceWatcher { - #[inline] pub unsafe fn add_source_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SourceAdded)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SourceAdded)(self, token); + #[inline] pub unsafe fn set_can_get_and_set_internal_auto_replies(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanGetAndSetInternalAutoReplies)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_source_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SourceRemoved)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_can_update_meeting_responses(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanUpdateMeetingResponses)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn remove_source_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SourceRemoved)(self, token); + #[inline] pub unsafe fn set_can_server_search_folders(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanServerSearchFolders)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_can_server_search_mailbox(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanServerSearchMailbox)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn remove_stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + #[inline] pub unsafe fn set_can_propose_new_time_for_meetings(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanProposeNewTimeForMeetings)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_can_smart_send(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanSmartSend)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); + #[inline] pub unsafe fn set_can_resolve_recipients(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanResolveRecipients)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_can_validate_certificates(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanValidateCertificates)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); + #[inline] pub unsafe fn set_can_empty_folder(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanEmptyFolder)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); + #[inline] pub unsafe fn set_can_create_folder(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanCreateFolder)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class PerceptionInfraredFrameSourceWatcher: IPerceptionInfraredFrameSourceWatcher} - RT_CLASS!{class PerceptionInfraredFrameSourceAddedEventArgs: IPerceptionInfraredFrameSourceAddedEventArgs} - RT_CLASS!{class PerceptionInfraredFrameSourceRemovedEventArgs: IPerceptionInfraredFrameSourceRemovedEventArgs} - DEFINE_IID!(IID_IPerceptionColorFrameSourceAddedEventArgs, 3513513190, 55844, 17452, 187, 213, 85, 84, 155, 91, 148, 243); - RT_INTERFACE!{interface IPerceptionColorFrameSourceAddedEventArgs(IPerceptionColorFrameSourceAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSourceAddedEventArgs] { - fn get_FrameSource(&mut self, out: *mut *mut PerceptionColorFrameSource) -> HRESULT - }} - impl IPerceptionColorFrameSourceAddedEventArgs { - #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_can_delete_folder(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanDeleteFolder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class PerceptionColorFrameSource: IPerceptionColorFrameSource} - RT_ACTIVATABLE!{IPerceptionColorFrameSourceStatics [CLSID_PerceptionColorFrameSource]} - DEFINE_CLSID!(CLSID_PerceptionColorFrameSource = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,101,114,99,101,112,116,105,111,110,67,111,108,111,114,70,114,97,109,101,83,111,117,114,99,101,0]); - DEFINE_IID!(IID_IPerceptionColorFrameSourceRemovedEventArgs, 3531078249, 60236, 17135, 186, 79, 40, 143, 97, 92, 147, 193); - RT_INTERFACE!{interface IPerceptionColorFrameSourceRemovedEventArgs(IPerceptionColorFrameSourceRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSourceRemovedEventArgs] { - fn get_FrameSource(&mut self, out: *mut *mut PerceptionColorFrameSource) -> HRESULT - }} - impl IPerceptionColorFrameSourceRemovedEventArgs { - #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_can_move_folder(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanMoveFolder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionDepthFrameSourceAddedEventArgs, 2477031784, 35832, 17874, 162, 248, 74, 192, 147, 28, 199, 166); - RT_INTERFACE!{interface IPerceptionDepthFrameSourceAddedEventArgs(IPerceptionDepthFrameSourceAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSourceAddedEventArgs] { - fn get_FrameSource(&mut self, out: *mut *mut PerceptionDepthFrameSource) -> HRESULT - }} - impl IPerceptionDepthFrameSourceAddedEventArgs { - #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { + DEFINE_IID!(IID_IEmailMailbox, 2826503753, 53083, 16667, 128, 177, 74, 106, 20, 132, 206, 37); + RT_INTERFACE!{interface IEmailMailbox(IEmailMailboxVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailbox] { + fn get_Capabilities(&mut self, out: *mut *mut EmailMailboxCapabilities) -> HRESULT, + fn get_ChangeTracker(&mut self, out: *mut *mut EmailMailboxChangeTracker) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsOwnedByCurrentApp(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDataEncryptedUnderLock(&mut self, out: *mut bool) -> HRESULT, + fn get_MailAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_MailAddress(&mut self, value: HSTRING) -> HRESULT, + fn get_MailAddressAliases(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_OtherAppReadAccess(&mut self, out: *mut EmailMailboxOtherAppReadAccess) -> HRESULT, + fn put_OtherAppReadAccess(&mut self, value: EmailMailboxOtherAppReadAccess) -> HRESULT, + fn get_OtherAppWriteAccess(&mut self, out: *mut EmailMailboxOtherAppWriteAccess) -> HRESULT, + fn put_OtherAppWriteAccess(&mut self, value: EmailMailboxOtherAppWriteAccess) -> HRESULT, + fn get_Policies(&mut self, out: *mut *mut EmailMailboxPolicies) -> HRESULT, + fn get_SourceDisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SyncManager(&mut self, out: *mut *mut EmailMailboxSyncManager) -> HRESULT, + fn get_UserDataAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetConversationReader(&mut self, out: *mut *mut EmailConversationReader) -> HRESULT, + fn GetConversationReaderWithOptions(&mut self, options: *mut EmailQueryOptions, out: *mut *mut EmailConversationReader) -> HRESULT, + fn GetMessageReader(&mut self, out: *mut *mut EmailMessageReader) -> HRESULT, + fn GetMessageReaderWithOptions(&mut self, options: *mut EmailQueryOptions, out: *mut *mut EmailMessageReader) -> HRESULT, + fn DeleteAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetConversationAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetFolderAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetMessageAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetSpecialFolderAsync(&mut self, folderType: EmailSpecialFolderKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SaveAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn MarkMessageAsSeenAsync(&mut self, messageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn MarkFolderAsSeenAsync(&mut self, folderId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn MarkMessageReadAsync(&mut self, messageId: HSTRING, isRead: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ChangeMessageFlagStateAsync(&mut self, messageId: HSTRING, flagState: EmailFlagState, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn TryMoveMessageAsync(&mut self, messageId: HSTRING, newParentFolderId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryMoveFolderAsync(&mut self, folderId: HSTRING, newParentFolderId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryMoveFolderWithNewNameAsync(&mut self, folderId: HSTRING, newParentFolderId: HSTRING, newFolderName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DeleteMessageAsync(&mut self, messageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn MarkFolderSyncEnabledAsync(&mut self, folderId: HSTRING, isSyncEnabled: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SendMessageAsync(&mut self, message: *mut EmailMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SaveDraftAsync(&mut self, message: *mut EmailMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DownloadMessageAsync(&mut self, messageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DownloadAttachmentAsync(&mut self, attachmentId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn CreateResponseMessageAsync(&mut self, messageId: HSTRING, responseType: EmailMessageResponseKind, subject: HSTRING, responseHeaderType: EmailMessageBodyKind, responseHeader: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryUpdateMeetingResponseAsync(&mut self, meeting: *mut EmailMessage, response: EmailMeetingResponseType, subject: HSTRING, comment: HSTRING, sendUpdate: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryForwardMeetingAsync(&mut self, meeting: *mut EmailMessage, recipients: *mut super::super::foundation::collections::IIterable, subject: HSTRING, forwardHeaderType: EmailMessageBodyKind, forwardHeader: HSTRING, comment: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryProposeNewTimeForMeetingAsync(&mut self, meeting: *mut EmailMessage, newStartTime: super::super::foundation::DateTime, newDuration: super::super::foundation::TimeSpan, subject: HSTRING, comment: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_MailboxChanged(&mut self, pHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MailboxChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn SmartSendMessageAsync(&mut self, message: *mut EmailMessage, smartSend: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn TrySetAutoReplySettingsAsync(&mut self, autoReplySettings: *mut EmailMailboxAutoReplySettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryGetAutoReplySettingsAsync(&mut self, requestedFormat: EmailMailboxAutoReplyMessageResponseKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IEmailMailbox { + #[inline] pub unsafe fn get_capabilities(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); + let hr = ((*self.lpVtbl).get_Capabilities)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class PerceptionDepthFrameSource: IPerceptionDepthFrameSource} - RT_ACTIVATABLE!{IPerceptionDepthFrameSourceStatics [CLSID_PerceptionDepthFrameSource]} - DEFINE_CLSID!(CLSID_PerceptionDepthFrameSource = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,101,114,99,101,112,116,105,111,110,68,101,112,116,104,70,114,97,109,101,83,111,117,114,99,101,0]); - DEFINE_IID!(IID_IPerceptionDepthFrameSourceRemovedEventArgs, 2696989773, 59756, 19841, 134, 221, 56, 185, 94, 73, 198, 223); - RT_INTERFACE!{interface IPerceptionDepthFrameSourceRemovedEventArgs(IPerceptionDepthFrameSourceRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSourceRemovedEventArgs] { - fn get_FrameSource(&mut self, out: *mut *mut PerceptionDepthFrameSource) -> HRESULT - }} - impl IPerceptionDepthFrameSourceRemovedEventArgs { - #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { + #[inline] pub unsafe fn get_change_tracker(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChangeTracker)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionInfraredFrameSourceAddedEventArgs, 1832075552, 38350, 18016, 144, 122, 217, 128, 53, 170, 43, 124); - RT_INTERFACE!{interface IPerceptionInfraredFrameSourceAddedEventArgs(IPerceptionInfraredFrameSourceAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSourceAddedEventArgs] { - fn get_FrameSource(&mut self, out: *mut *mut PerceptionInfraredFrameSource) -> HRESULT - }} - impl IPerceptionInfraredFrameSourceAddedEventArgs { - #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class PerceptionInfraredFrameSource: IPerceptionInfraredFrameSource} - RT_ACTIVATABLE!{IPerceptionInfraredFrameSourceStatics [CLSID_PerceptionInfraredFrameSource]} - DEFINE_CLSID!(CLSID_PerceptionInfraredFrameSource = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,101,114,99,101,112,116,105,111,110,73,110,102,114,97,114,101,100,70,114,97,109,101,83,111,117,114,99,101,0]); - DEFINE_IID!(IID_IPerceptionInfraredFrameSourceRemovedEventArgs, 3927605361, 31344, 19041, 175, 148, 7, 48, 56, 83, 246, 149); - RT_INTERFACE!{interface IPerceptionInfraredFrameSourceRemovedEventArgs(IPerceptionInfraredFrameSourceRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSourceRemovedEventArgs] { - fn get_FrameSource(&mut self, out: *mut *mut PerceptionInfraredFrameSource) -> HRESULT - }} - impl IPerceptionInfraredFrameSourceRemovedEventArgs { - #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IKnownPerceptionFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 71); - RT_INTERFACE!{static interface IKnownPerceptionFrameSourcePropertiesStatics(IKnownPerceptionFrameSourcePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionFrameSourcePropertiesStatics] { - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_PhysicalDeviceIds(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_FrameKind(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_DeviceModelVersion(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_EnclosureLocation(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IKnownPerceptionFrameSourcePropertiesStatics { #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_physical_device_ids(&mut self) -> Result { + #[inline] pub unsafe fn get_is_owned_by_current_app(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsOwnedByCurrentApp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_data_encrypted_under_lock(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDataEncryptedUnderLock)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_mail_address(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PhysicalDeviceIds)(self, &mut out); + let hr = ((*self.lpVtbl).get_MailAddress)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_frame_kind(&mut self) -> Result { + #[inline] pub unsafe fn set_mail_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_MailAddress)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_mail_address_aliases(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameKind)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_MailAddressAliases)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_model_version(&mut self) -> Result { + #[inline] pub unsafe fn get_other_app_read_access(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OtherAppReadAccess)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_other_app_read_access(&mut self, value: EmailMailboxOtherAppReadAccess) -> Result<()> { + let hr = ((*self.lpVtbl).put_OtherAppReadAccess)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_other_app_write_access(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OtherAppWriteAccess)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_other_app_write_access(&mut self, value: EmailMailboxOtherAppWriteAccess) -> Result<()> { + let hr = ((*self.lpVtbl).put_OtherAppWriteAccess)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_policies(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceModelVersion)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Policies)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_enclosure_location(&mut self) -> Result { + #[inline] pub unsafe fn get_source_display_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_EnclosureLocation)(self, &mut out); + let hr = ((*self.lpVtbl).get_SourceDisplayName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IKnownPerceptionFrameSourcePropertiesStatics2, 2848483441, 1500, 19021, 138, 92, 164, 236, 242, 107, 188, 70); - RT_INTERFACE!{static interface IKnownPerceptionFrameSourcePropertiesStatics2(IKnownPerceptionFrameSourcePropertiesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionFrameSourcePropertiesStatics2] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IKnownPerceptionFrameSourcePropertiesStatics2 { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn get_sync_manager(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_SyncManager)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IKnownPerceptionVideoFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 72); - RT_INTERFACE!{static interface IKnownPerceptionVideoFrameSourcePropertiesStatics(IKnownPerceptionVideoFrameSourcePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionVideoFrameSourcePropertiesStatics] { - fn get_VideoProfile(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_SupportedVideoProfiles(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_AvailableVideoProfiles(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_IsMirrored(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_CameraIntrinsics(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IKnownPerceptionVideoFrameSourcePropertiesStatics { - #[inline] pub unsafe fn get_video_profile(&mut self) -> Result { + #[inline] pub unsafe fn get_user_data_account_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VideoProfile)(self, &mut out); + let hr = ((*self.lpVtbl).get_UserDataAccountId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_video_profiles(&mut self) -> Result { + #[inline] pub unsafe fn get_conversation_reader(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetConversationReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_available_video_profiles(&mut self) -> Result { + #[inline] pub unsafe fn get_conversation_reader_with_options(&mut self, options: &EmailQueryOptions) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetConversationReaderWithOptions)(self, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_mirrored(&mut self) -> Result { + #[inline] pub unsafe fn get_message_reader(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_IsMirrored)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetMessageReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_camera_intrinsics(&mut self) -> Result { + #[inline] pub unsafe fn get_message_reader_with_options(&mut self, options: &EmailQueryOptions) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetMessageReaderWithOptions)(self, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IKnownPerceptionInfraredFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 73); - RT_INTERFACE!{static interface IKnownPerceptionInfraredFrameSourcePropertiesStatics(IKnownPerceptionInfraredFrameSourcePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionInfraredFrameSourcePropertiesStatics] { - fn get_Exposure(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_AutoExposureEnabled(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ExposureCompensation(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ActiveIlluminationEnabled(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_AmbientSubtractionEnabled(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_StructureLightPatternEnabled(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_InterleavedIlluminationEnabled(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IKnownPerceptionInfraredFrameSourcePropertiesStatics { - #[inline] pub unsafe fn get_exposure(&mut self) -> Result { + #[inline] pub unsafe fn delete_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Exposure)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).DeleteAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_auto_exposure_enabled(&mut self) -> Result { + #[inline] pub unsafe fn get_conversation_async(&mut self, id: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AutoExposureEnabled)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetConversationAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_exposure_compensation(&mut self) -> Result { + #[inline] pub unsafe fn get_folder_async(&mut self, id: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ExposureCompensation)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetFolderAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_active_illumination_enabled(&mut self) -> Result { + #[inline] pub unsafe fn get_message_async(&mut self, id: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ActiveIlluminationEnabled)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetMessageAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ambient_subtraction_enabled(&mut self) -> Result { + #[inline] pub unsafe fn get_special_folder_async(&mut self, folderType: EmailSpecialFolderKind) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AmbientSubtractionEnabled)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetSpecialFolderAsync)(self, folderType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_structure_light_pattern_enabled(&mut self) -> Result { + #[inline] pub unsafe fn save_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_StructureLightPatternEnabled)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).SaveAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_interleaved_illumination_enabled(&mut self) -> Result { + #[inline] pub unsafe fn mark_message_as_seen_async(&mut self, messageId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InterleavedIlluminationEnabled)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).MarkMessageAsSeenAsync)(self, messageId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IKnownPerceptionDepthFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 74); - RT_INTERFACE!{static interface IKnownPerceptionDepthFrameSourcePropertiesStatics(IKnownPerceptionDepthFrameSourcePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionDepthFrameSourcePropertiesStatics] { - fn get_MinDepth(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_MaxDepth(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IKnownPerceptionDepthFrameSourcePropertiesStatics { - #[inline] pub unsafe fn get_min_depth(&mut self) -> Result { + #[inline] pub unsafe fn mark_folder_as_seen_async(&mut self, folderId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_MinDepth)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).MarkFolderAsSeenAsync)(self, folderId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_max_depth(&mut self) -> Result { + #[inline] pub unsafe fn mark_message_read_async(&mut self, messageId: &HStringArg, isRead: bool) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_MaxDepth)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).MarkMessageReadAsync)(self, messageId.get(), isRead, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IKnownPerceptionColorFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 75); - RT_INTERFACE!{static interface IKnownPerceptionColorFrameSourcePropertiesStatics(IKnownPerceptionColorFrameSourcePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionColorFrameSourcePropertiesStatics] { - fn get_Exposure(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_AutoExposureEnabled(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ExposureCompensation(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IKnownPerceptionColorFrameSourcePropertiesStatics { - #[inline] pub unsafe fn get_exposure(&mut self) -> Result { + #[inline] pub unsafe fn change_message_flag_state_async(&mut self, messageId: &HStringArg, flagState: EmailFlagState) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Exposure)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ChangeMessageFlagStateAsync)(self, messageId.get(), flagState, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_auto_exposure_enabled(&mut self) -> Result { + #[inline] pub unsafe fn try_move_message_async(&mut self, messageId: &HStringArg, newParentFolderId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AutoExposureEnabled)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).TryMoveMessageAsync)(self, messageId.get(), newParentFolderId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_exposure_compensation(&mut self) -> Result { + #[inline] pub unsafe fn try_move_folder_async(&mut self, folderId: &HStringArg, newParentFolderId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ExposureCompensation)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).TryMoveFolderAsync)(self, folderId.get(), newParentFolderId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IKnownPerceptionVideoProfilePropertiesStatics, 2399724263, 23158, 17379, 161, 58, 218, 61, 145, 169, 239, 152); - RT_INTERFACE!{static interface IKnownPerceptionVideoProfilePropertiesStatics(IKnownPerceptionVideoProfilePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionVideoProfilePropertiesStatics] { - fn get_BitmapPixelFormat(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_BitmapAlphaMode(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Width(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Height(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_FrameDuration(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IKnownPerceptionVideoProfilePropertiesStatics { - #[inline] pub unsafe fn get_bitmap_pixel_format(&mut self) -> Result { + #[inline] pub unsafe fn try_move_folder_with_new_name_async(&mut self, folderId: &HStringArg, newParentFolderId: &HStringArg, newFolderName: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BitmapPixelFormat)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).TryMoveFolderWithNewNameAsync)(self, folderId.get(), newParentFolderId.get(), newFolderName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_bitmap_alpha_mode(&mut self) -> Result { + #[inline] pub unsafe fn delete_message_async(&mut self, messageId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BitmapAlphaMode)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).DeleteMessageAsync)(self, messageId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_width(&mut self) -> Result { + #[inline] pub unsafe fn mark_folder_sync_enabled_async(&mut self, folderId: &HStringArg, isSyncEnabled: bool) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Width)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).MarkFolderSyncEnabledAsync)(self, folderId.get(), isSyncEnabled, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_height(&mut self) -> Result { + #[inline] pub unsafe fn send_message_async(&mut self, message: &EmailMessage) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Height)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).SendMessageAsync)(self, message as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_frame_duration(&mut self) -> Result { + #[inline] pub unsafe fn save_draft_async(&mut self, message: &EmailMessage) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameDuration)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).SaveDraftAsync)(self, message as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IKnownCameraIntrinsicsPropertiesStatics, 146815352, 17274, 19863, 166, 99, 253, 49, 149, 96, 2, 73); - RT_INTERFACE!{static interface IKnownCameraIntrinsicsPropertiesStatics(IKnownCameraIntrinsicsPropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownCameraIntrinsicsPropertiesStatics] { - fn get_FocalLength(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_PrincipalPoint(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_RadialDistortion(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_TangentialDistortion(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IKnownCameraIntrinsicsPropertiesStatics { - #[inline] pub unsafe fn get_focal_length(&mut self) -> Result { + #[inline] pub unsafe fn download_message_async(&mut self, messageId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FocalLength)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).DownloadMessageAsync)(self, messageId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_principal_point(&mut self) -> Result { + #[inline] pub unsafe fn download_attachment_async(&mut self, attachmentId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PrincipalPoint)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).DownloadAttachmentAsync)(self, attachmentId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_radial_distortion(&mut self) -> Result { + #[inline] pub unsafe fn create_response_message_async(&mut self, messageId: &HStringArg, responseType: EmailMessageResponseKind, subject: &HStringArg, responseHeaderType: EmailMessageBodyKind, responseHeader: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RadialDistortion)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).CreateResponseMessageAsync)(self, messageId.get(), responseType, subject.get(), responseHeaderType, responseHeader.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_tangential_distortion(&mut self) -> Result { + #[inline] pub unsafe fn try_update_meeting_response_async(&mut self, meeting: &EmailMessage, response: EmailMeetingResponseType, subject: &HStringArg, comment: &HStringArg, sendUpdate: bool) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_TangentialDistortion)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).TryUpdateMeetingResponseAsync)(self, meeting as *const _ as *mut _, response, subject.get(), comment.get(), sendUpdate, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionFrameSourcePropertyChangeResult, 506673418, 15504, 19746, 184, 152, 244, 43, 186, 100, 24, 255); - RT_INTERFACE!{interface IPerceptionFrameSourcePropertyChangeResult(IPerceptionFrameSourcePropertyChangeResultVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameSourcePropertyChangeResult] { - fn get_Status(&mut self, out: *mut PerceptionFrameSourcePropertyChangeStatus) -> HRESULT, - fn get_NewValue(&mut self, out: *mut *mut IInspectable) -> HRESULT - }} - impl IPerceptionFrameSourcePropertyChangeResult { - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn try_forward_meeting_async(&mut self, meeting: &EmailMessage, recipients: &super::super::foundation::collections::IIterable, subject: &HStringArg, forwardHeaderType: EmailMessageBodyKind, forwardHeader: &HStringArg, comment: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryForwardMeetingAsync)(self, meeting as *const _ as *mut _, recipients as *const _ as *mut _, subject.get(), forwardHeaderType, forwardHeader.get(), comment.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_new_value(&mut self) -> Result> { + #[inline] pub unsafe fn try_propose_new_time_for_meeting_async(&mut self, meeting: &EmailMessage, newStartTime: super::super::foundation::DateTime, newDuration: super::super::foundation::TimeSpan, subject: &HStringArg, comment: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_NewValue)(self, &mut out); + let hr = ((*self.lpVtbl).TryProposeNewTimeForMeetingAsync)(self, meeting as *const _ as *mut _, newStartTime, newDuration, subject.get(), comment.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class PerceptionControlSession: IPerceptionControlSession} - RT_CLASS!{class PerceptionFrameSourcePropertyChangeResult: IPerceptionFrameSourcePropertyChangeResult} - DEFINE_IID!(IID_IPerceptionFrameSourcePropertiesChangedEventArgs, 1818812520, 48369, 20172, 184, 145, 118, 37, 209, 36, 75, 107); - RT_INTERFACE!{interface IPerceptionFrameSourcePropertiesChangedEventArgs(IPerceptionFrameSourcePropertiesChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameSourcePropertiesChangedEventArgs] { - fn get_CollectionChange(&mut self, out: *mut super::super::foundation::collections::CollectionChange) -> HRESULT, - fn get_Key(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IPerceptionFrameSourcePropertiesChangedEventArgs { - #[inline] pub unsafe fn get_collection_change(&mut self) -> Result { + #[inline] pub unsafe fn add_mailbox_changed(&mut self, pHandler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CollectionChange)(self, &mut out); + let hr = ((*self.lpVtbl).add_MailboxChanged)(self, pHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_key(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Key)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - } - DEFINE_IID!(IID_IPerceptionInfraredFrameSourceStatics, 1576258722, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 71); - RT_INTERFACE!{static interface IPerceptionInfraredFrameSourceStatics(IPerceptionInfraredFrameSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSourceStatics] { - fn CreateWatcher(&mut self, out: *mut *mut PerceptionInfraredFrameSourceWatcher) -> HRESULT, - fn FindAllAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FromIdAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl IPerceptionInfraredFrameSourceStatics { - #[inline] pub unsafe fn create_watcher(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWatcher)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_mailbox_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MailboxChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + #[inline] pub unsafe fn smart_send_message_async(&mut self, message: &EmailMessage, smartSend: bool) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + let hr = ((*self.lpVtbl).SmartSendMessageAsync)(self, message as *const _ as *mut _, smartSend, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, id: &HStringArg) -> Result>> { + #[inline] pub unsafe fn try_set_auto_reply_settings_async(&mut self, autoReplySettings: &EmailMailboxAutoReplySettings) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, id.get(), &mut out); + let hr = ((*self.lpVtbl).TrySetAutoReplySettingsAsync)(self, autoReplySettings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + #[inline] pub unsafe fn try_get_auto_reply_settings_async(&mut self, requestedFormat: EmailMailboxAutoReplyMessageResponseKind) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + let hr = ((*self.lpVtbl).TryGetAutoReplySettingsAsync)(self, requestedFormat, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionDepthFrameSourceStatics, 1576258722, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 72); - RT_INTERFACE!{static interface IPerceptionDepthFrameSourceStatics(IPerceptionDepthFrameSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSourceStatics] { - fn CreateWatcher(&mut self, out: *mut *mut PerceptionDepthFrameSourceWatcher) -> HRESULT, - fn FindAllAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FromIdAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class EmailMailboxCapabilities: IEmailMailboxCapabilities} + RT_CLASS!{class EmailMailboxChangeTracker: IEmailMailboxChangeTracker} + RT_CLASS!{class EmailMailboxPolicies: IEmailMailboxPolicies} + RT_CLASS!{class EmailMailboxSyncManager: IEmailMailboxSyncManager} + RT_CLASS!{class EmailMailboxChangedEventArgs: IEmailMailboxChangedEventArgs} + RT_CLASS!{class EmailMailboxAutoReplySettings: IEmailMailboxAutoReplySettings} + DEFINE_IID!(IID_IEmailMailbox2, 351855620, 27810, 19122, 146, 65, 121, 205, 123, 244, 99, 70); + RT_INTERFACE!{interface IEmailMailbox2(IEmailMailbox2Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailbox2] { + fn get_LinkedMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NetworkAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NetworkId(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IPerceptionDepthFrameSourceStatics { - #[inline] pub unsafe fn create_watcher(&mut self) -> Result> { + impl IEmailMailbox2 { + #[inline] pub unsafe fn get_linked_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWatcher)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_LinkedMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + #[inline] pub unsafe fn get_network_account_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_NetworkAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, id: &HStringArg) -> Result>> { + #[inline] pub unsafe fn get_network_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, id.get(), &mut out); + let hr = ((*self.lpVtbl).get_NetworkId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEmailMailbox3, 1034258811, 17803, 16522, 142, 55, 172, 139, 5, 216, 175, 86); + RT_INTERFACE!{interface IEmailMailbox3(IEmailMailbox3Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailbox3] { + fn ResolveRecipientsAsync(&mut self, recipients: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.security")] fn ValidateCertificatesAsync(&mut self, certificates: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn TryEmptyFolderAsync(&mut self, folderId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryCreateFolderAsync(&mut self, parentFolderId: HSTRING, name: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryDeleteFolderAsync(&mut self, folderId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IEmailMailbox3 { + #[inline] pub unsafe fn resolve_recipients_async(&mut self, recipients: &super::super::foundation::collections::IIterable) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ResolveRecipientsAsync)(self, recipients as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn validate_certificates_async(&mut self, certificates: &super::super::foundation::collections::IIterable) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + let hr = ((*self.lpVtbl).ValidateCertificatesAsync)(self, certificates as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionColorFrameSourceStatics, 1576258722, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 73); - RT_INTERFACE!{static interface IPerceptionColorFrameSourceStatics(IPerceptionColorFrameSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSourceStatics] { - fn CreateWatcher(&mut self, out: *mut *mut PerceptionColorFrameSourceWatcher) -> HRESULT, - fn FindAllAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FromIdAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl IPerceptionColorFrameSourceStatics { - #[inline] pub unsafe fn create_watcher(&mut self) -> Result> { + #[inline] pub unsafe fn try_empty_folder_async(&mut self, folderId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWatcher)(self, &mut out); + let hr = ((*self.lpVtbl).TryEmptyFolderAsync)(self, folderId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + #[inline] pub unsafe fn try_create_folder_async(&mut self, parentFolderId: &HStringArg, name: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + let hr = ((*self.lpVtbl).TryCreateFolderAsync)(self, parentFolderId.get(), name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, id: &HStringArg) -> Result>> { + #[inline] pub unsafe fn try_delete_folder_async(&mut self, folderId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, id.get(), &mut out); + let hr = ((*self.lpVtbl).TryDeleteFolderAsync)(self, folderId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + } + RT_CLASS!{class EmailRecipientResolutionResult: IEmailRecipientResolutionResult} + RT_CLASS!{class EmailMailboxCreateFolderResult: IEmailMailboxCreateFolderResult} + DEFINE_IID!(IID_IEmailMailbox4, 1562325019, 61986, 18599, 183, 182, 113, 99, 86, 205, 38, 161); + RT_INTERFACE!{interface IEmailMailbox4(IEmailMailbox4Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailbox4] { + fn RegisterSyncManagerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IEmailMailbox4 { + #[inline] pub unsafe fn register_sync_manager_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + let hr = ((*self.lpVtbl).RegisterSyncManagerAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionColorFrameSource, 3698178684, 2904, 18061, 156, 161, 109, 176, 76, 192, 71, 124); - RT_INTERFACE!{interface IPerceptionColorFrameSource(IPerceptionColorFrameSourceVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSource] { - fn add_AvailableChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AvailableChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ActiveChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ActiveChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PropertiesChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PropertiesChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VideoProfileChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoProfileChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CameraIntrinsicsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CameraIntrinsicsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_DeviceKind(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Available(&mut self, out: *mut bool) -> HRESULT, - fn get_Active(&mut self, out: *mut bool) -> HRESULT, - fn get_IsControlled(&mut self, out: *mut bool) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn get_SupportedVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_AvailableVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_VideoProfile(&mut self, out: *mut *mut PerceptionVideoProfile) -> HRESULT, - #[cfg(not(feature="windows.media"))] fn __Dummy20(&mut self) -> (), - #[cfg(feature="windows.media")] fn get_CameraIntrinsics(&mut self, out: *mut *mut super::super::media::devices::core::CameraIntrinsics) -> HRESULT, - fn AcquireControlSession(&mut self, out: *mut *mut PerceptionControlSession) -> HRESULT, - fn CanControlIndependentlyFrom(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, - fn IsCorrelatedWith(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, - fn TryGetTransformTo(&mut self, targetId: HSTRING, result: *mut super::super::foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, - fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&mut self, correlatedDepthFrameSource: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryGetDepthCorrelatedCoordinateMapperAsync(&mut self, targetSourceId: HSTRING, correlatedDepthFrameSource: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TrySetVideoProfileAsync(&mut self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn OpenReader(&mut self, out: *mut *mut PerceptionColorFrameReader) -> HRESULT + DEFINE_IID!(IID_IEmailRecipientResolutionResult, 2441296122, 36237, 17779, 128, 209, 7, 23, 42, 52, 185, 141); + RT_INTERFACE!{interface IEmailRecipientResolutionResult(IEmailRecipientResolutionResultVtbl): IInspectable(IInspectableVtbl) [IID_IEmailRecipientResolutionResult] { + fn get_Status(&mut self, out: *mut EmailRecipientResolutionStatus) -> HRESULT, + #[cfg(feature="windows.security")] fn get_PublicKeys(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT }} - impl IPerceptionColorFrameSource { - #[inline] pub unsafe fn add_available_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + impl IEmailRecipientResolutionResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AvailableChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_available_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AvailableChanged)(self, token); + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_public_keys(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PublicKeys)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEmailRecipientResolutionResult2, 1581386678, 52827, 19422, 185, 212, 225, 109, 160, 176, 159, 202); + RT_INTERFACE!{interface IEmailRecipientResolutionResult2(IEmailRecipientResolutionResult2Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailRecipientResolutionResult2] { + fn put_Status(&mut self, value: EmailRecipientResolutionStatus) -> HRESULT, + #[cfg(feature="windows.security")] fn SetPublicKeys(&mut self, value: *mut super::super::foundation::collections::IIterable) -> HRESULT + }} + impl IEmailRecipientResolutionResult2 { + #[inline] pub unsafe fn set_status(&mut self, value: EmailRecipientResolutionStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_Status)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_active_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_public_keys(&mut self, value: &super::super::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).SetPublicKeys)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEmailMailboxCreateFolderResult, 2988987775, 10373, 18840, 181, 149, 138, 45, 55, 76, 233, 80); + RT_INTERFACE!{interface IEmailMailboxCreateFolderResult(IEmailMailboxCreateFolderResultVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxCreateFolderResult] { + fn get_Status(&mut self, out: *mut EmailMailboxCreateFolderStatus) -> HRESULT, + fn get_Folder(&mut self, out: *mut *mut EmailFolder) -> HRESULT + }} + impl IEmailMailboxCreateFolderResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ActiveChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_active_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ActiveChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Folder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_properties_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + } + DEFINE_IID!(IID_IEmailMailboxAutoReplySettings, 2826608552, 2758, 19319, 186, 119, 166, 185, 158, 154, 39, 184); + RT_INTERFACE!{interface IEmailMailboxAutoReplySettings(IEmailMailboxAutoReplySettingsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxAutoReplySettings] { + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsEnabled(&mut self, value: bool) -> HRESULT, + fn get_ResponseKind(&mut self, out: *mut EmailMailboxAutoReplyMessageResponseKind) -> HRESULT, + fn put_ResponseKind(&mut self, value: EmailMailboxAutoReplyMessageResponseKind) -> HRESULT, + fn get_StartTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_StartTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_EndTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_EndTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_InternalReply(&mut self, out: *mut *mut EmailMailboxAutoReply) -> HRESULT, + fn get_KnownExternalReply(&mut self, out: *mut *mut EmailMailboxAutoReply) -> HRESULT, + fn get_UnknownExternalReply(&mut self, out: *mut *mut EmailMailboxAutoReply) -> HRESULT + }} + impl IEmailMailboxAutoReplySettings { + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_PropertiesChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_properties_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_PropertiesChanged)(self, token); + #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_video_profile_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_response_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_VideoProfileChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_ResponseKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_video_profile_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_VideoProfileChanged)(self, token); + #[inline] pub unsafe fn set_response_kind(&mut self, value: EmailMailboxAutoReplyMessageResponseKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_ResponseKind)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_camera_intrinsics_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_start_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_start_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_StartTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_end_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EndTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_end_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_EndTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_internal_reply(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InternalReply)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_known_external_reply(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KnownExternalReply)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_unknown_external_reply(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UnknownExternalReply)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxAutoReply: IEmailMailboxAutoReply} + DEFINE_IID!(IID_IEmailMailboxAutoReply, 3793954124, 35508, 18523, 179, 31, 4, 209, 84, 118, 189, 89); + RT_INTERFACE!{interface IEmailMailboxAutoReply(IEmailMailboxAutoReplyVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxAutoReply] { + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsEnabled(&mut self, value: bool) -> HRESULT, + fn get_Response(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Response(&mut self, value: HSTRING) -> HRESULT + }} + impl IEmailMailboxAutoReply { + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_CameraIntrinsicsChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_camera_intrinsics_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_CameraIntrinsicsChanged)(self, token); + #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_response(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Response)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_response(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Response)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEmailMailboxSyncManager, 1367000410, 13713, 19293, 133, 188, 199, 29, 222, 134, 34, 99); + RT_INTERFACE!{interface IEmailMailboxSyncManager(IEmailMailboxSyncManagerVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxSyncManager] { + fn get_Status(&mut self, out: *mut EmailMailboxSyncStatus) -> HRESULT, + fn get_LastSuccessfulSyncTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_LastAttemptedSyncTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn SyncAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_SyncStatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IEmailMailboxSyncManager { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_successful_sync_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastSuccessfulSyncTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_attempted_sync_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastAttemptedSyncTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn sync_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SyncAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_sync_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SyncStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_sync_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SyncStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEmailMailboxSyncManager2, 3448621438, 38337, 20361, 129, 183, 230, 174, 203, 102, 149, 252); + RT_INTERFACE!{interface IEmailMailboxSyncManager2(IEmailMailboxSyncManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxSyncManager2] { + fn put_Status(&mut self, value: EmailMailboxSyncStatus) -> HRESULT, + fn put_LastSuccessfulSyncTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn put_LastAttemptedSyncTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT + }} + impl IEmailMailboxSyncManager2 { + #[inline] pub unsafe fn set_status(&mut self, value: EmailMailboxSyncStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_Status)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_last_successful_sync_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_LastSuccessfulSyncTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_last_attempted_sync_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_LastAttemptedSyncTime)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } + } + DEFINE_IID!(IID_IEmailFolder, 2723116913, 39276, 18532, 177, 186, 237, 18, 64, 229, 125, 17); + RT_INTERFACE!{interface IEmailFolder(IEmailFolderVtbl): IInspectable(IInspectableVtbl) [IID_IEmailFolder] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RemoteId(&mut self, value: HSTRING) -> HRESULT, + fn get_MailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ParentFolderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_IsSyncEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSyncEnabled(&mut self, value: bool) -> HRESULT, + fn get_LastSuccessfulSyncTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_LastSuccessfulSyncTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_Kind(&mut self, out: *mut EmailSpecialFolderKind) -> HRESULT, + fn CreateFolderAsync(&mut self, name: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DeleteAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn FindChildFoldersAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetConversationReader(&mut self, out: *mut *mut EmailConversationReader) -> HRESULT, + fn GetConversationReaderWithOptions(&mut self, options: *mut EmailQueryOptions, out: *mut *mut EmailConversationReader) -> HRESULT, + fn GetMessageAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetMessageReader(&mut self, out: *mut *mut EmailMessageReader) -> HRESULT, + fn GetMessageReaderWithOptions(&mut self, options: *mut EmailQueryOptions, out: *mut *mut EmailMessageReader) -> HRESULT, + fn GetMessageCountsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryMoveAsync(&mut self, newParentFolder: *mut EmailFolder, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryMoveWithNewNameAsync(&mut self, newParentFolder: *mut EmailFolder, newFolderName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TrySaveAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SaveMessageAsync(&mut self, message: *mut EmailMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IEmailFolder { #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + #[inline] pub unsafe fn get_remote_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + let hr = ((*self.lpVtbl).get_RemoteId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_kind(&mut self) -> Result { + #[inline] pub unsafe fn set_remote_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceKind)(self, &mut out); + let hr = ((*self.lpVtbl).get_MailboxId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_available(&mut self) -> Result { + #[inline] pub unsafe fn get_parent_folder_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ParentFolderId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_sync_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Available)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsSyncEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_active(&mut self) -> Result { + #[inline] pub unsafe fn set_is_sync_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSyncEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_successful_sync_time(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Active)(self, &mut out); + let hr = ((*self.lpVtbl).get_LastSuccessfulSyncTime)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_controlled(&mut self) -> Result { + #[inline] pub unsafe fn set_last_successful_sync_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_LastSuccessfulSyncTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsControlled)(self, &mut out); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + #[inline] pub unsafe fn create_folder_async(&mut self, name: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + let hr = ((*self.lpVtbl).CreateFolderAsync)(self, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_video_profiles(&mut self) -> Result>> { + #[inline] pub unsafe fn delete_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self, &mut out); + let hr = ((*self.lpVtbl).DeleteAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_available_video_profiles(&mut self) -> Result>> { + #[inline] pub unsafe fn find_child_folders_async(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self, &mut out); + let hr = ((*self.lpVtbl).FindChildFoldersAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_video_profile(&mut self) -> Result> { + #[inline] pub unsafe fn get_conversation_reader(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VideoProfile)(self, &mut out); + let hr = ((*self.lpVtbl).GetConversationReader)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_camera_intrinsics(&mut self) -> Result> { + #[inline] pub unsafe fn get_conversation_reader_with_options(&mut self, options: &EmailQueryOptions) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self, &mut out); + let hr = ((*self.lpVtbl).GetConversationReaderWithOptions)(self, options as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn acquire_control_session(&mut self) -> Result> { + #[inline] pub unsafe fn get_message_async(&mut self, id: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).AcquireControlSession)(self, &mut out); + let hr = ((*self.lpVtbl).GetMessageAsync)(self, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn can_control_independently_from(&mut self, targetId: &HStringArg) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).CanControlIndependentlyFrom)(self, targetId.get(), &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_message_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn is_correlated_with(&mut self, targetId: &HStringArg) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsCorrelatedWith)(self, targetId.get(), &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_message_reader_with_options(&mut self, options: &EmailQueryOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageReaderWithOptions)(self, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn try_get_transform_to(&mut self, targetId: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix4x4, bool)> { - let mut result = zeroed(); let mut out = zeroed(); - let hr = ((*self.lpVtbl).TryGetTransformTo)(self, targetId.get(), &mut result, &mut out); - if hr == S_OK { Ok((result, out)) } else { err(hr) } + #[inline] pub unsafe fn get_message_counts_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageCountsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn try_get_depth_correlated_camera_intrinsics_async(&mut self, correlatedDepthFrameSource: &PerceptionDepthFrameSource) -> Result>> { + #[inline] pub unsafe fn try_move_async(&mut self, newParentFolder: &EmailFolder) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCameraIntrinsicsAsync)(self, correlatedDepthFrameSource as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).TryMoveAsync)(self, newParentFolder as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn try_get_depth_correlated_coordinate_mapper_async(&mut self, targetSourceId: &HStringArg, correlatedDepthFrameSource: &PerceptionDepthFrameSource) -> Result>> { + #[inline] pub unsafe fn try_move_with_new_name_async(&mut self, newParentFolder: &EmailFolder, newFolderName: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCoordinateMapperAsync)(self, targetSourceId.get(), correlatedDepthFrameSource as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).TryMoveWithNewNameAsync)(self, newParentFolder as *const _ as *mut _, newFolderName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn try_set_video_profile_async(&mut self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { + #[inline] pub unsafe fn try_save_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TrySetVideoProfileAsync)(self, controlSession as *const _ as *mut _, profile as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).TrySaveAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn open_reader(&mut self) -> Result> { + #[inline] pub unsafe fn save_message_async(&mut self, message: &EmailMessage) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).OpenReader)(self, &mut out); + let hr = ((*self.lpVtbl).SaveMessageAsync)(self, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PerceptionFrameSourcePropertiesChangedEventArgs: IPerceptionFrameSourcePropertiesChangedEventArgs} - RT_CLASS!{class PerceptionVideoProfile: IPerceptionVideoProfile} - RT_CLASS!{class PerceptionDepthCorrelatedCameraIntrinsics: IPerceptionDepthCorrelatedCameraIntrinsics} - RT_CLASS!{class PerceptionDepthCorrelatedCoordinateMapper: IPerceptionDepthCorrelatedCoordinateMapper} - RT_CLASS!{class PerceptionColorFrameReader: IPerceptionColorFrameReader} - DEFINE_IID!(IID_IPerceptionColorFrameSource2, 4169140453, 22065, 17901, 173, 152, 140, 106, 160, 76, 251, 145); - RT_INTERFACE!{interface IPerceptionColorFrameSource2(IPerceptionColorFrameSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSource2] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IPerceptionColorFrameSource2 { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + RT_CLASS!{class EmailItemCounts: IEmailItemCounts} + DEFINE_IID!(IID_IEmailConversation, 3659055688, 41148, 17225, 144, 45, 144, 246, 99, 137, 245, 27); + RT_INTERFACE!{interface IEmailConversation(IEmailConversationVtbl): IInspectable(IInspectableVtbl) [IID_IEmailConversation] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FlagState(&mut self, out: *mut EmailFlagState) -> HRESULT, + fn get_HasAttachment(&mut self, out: *mut bool) -> HRESULT, + fn get_Importance(&mut self, out: *mut EmailImportance) -> HRESULT, + fn get_LastEmailResponseKind(&mut self, out: *mut EmailMessageResponseKind) -> HRESULT, + fn get_MessageCount(&mut self, out: *mut u32) -> HRESULT, + fn get_MostRecentMessageId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MostRecentMessageTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Preview(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LatestSender(&mut self, out: *mut *mut EmailRecipient) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UnreadMessageCount(&mut self, out: *mut u32) -> HRESULT, + fn FindMessagesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindMessagesWithCountAsync(&mut self, count: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IEmailConversation { + #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionDepthFrameSource, 2043950038, 18427, 19953, 191, 201, 240, 29, 64, 189, 153, 66); - RT_INTERFACE!{interface IPerceptionDepthFrameSource(IPerceptionDepthFrameSourceVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSource] { - fn add_AvailableChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AvailableChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ActiveChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ActiveChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PropertiesChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PropertiesChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VideoProfileChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoProfileChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CameraIntrinsicsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CameraIntrinsicsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_DeviceKind(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Available(&mut self, out: *mut bool) -> HRESULT, - fn get_Active(&mut self, out: *mut bool) -> HRESULT, - fn get_IsControlled(&mut self, out: *mut bool) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn get_SupportedVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_AvailableVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_VideoProfile(&mut self, out: *mut *mut PerceptionVideoProfile) -> HRESULT, - #[cfg(not(feature="windows.media"))] fn __Dummy20(&mut self) -> (), - #[cfg(feature="windows.media")] fn get_CameraIntrinsics(&mut self, out: *mut *mut super::super::media::devices::core::CameraIntrinsics) -> HRESULT, - fn AcquireControlSession(&mut self, out: *mut *mut PerceptionControlSession) -> HRESULT, - fn CanControlIndependentlyFrom(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, - fn IsCorrelatedWith(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, - fn TryGetTransformTo(&mut self, targetId: HSTRING, result: *mut super::super::foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, - fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&mut self, target: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryGetDepthCorrelatedCoordinateMapperAsync(&mut self, targetId: HSTRING, depthFrameSourceToMapWith: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TrySetVideoProfileAsync(&mut self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn OpenReader(&mut self, out: *mut *mut PerceptionDepthFrameReader) -> HRESULT - }} - impl IPerceptionDepthFrameSource { - #[inline] pub unsafe fn add_available_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_mailbox_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_flag_state(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AvailableChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_FlagState)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_available_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AvailableChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_active_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_has_attachment(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ActiveChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_HasAttachment)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_active_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ActiveChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_properties_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_importance(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_PropertiesChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Importance)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_properties_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_PropertiesChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_last_email_response_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastEmailResponseKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn add_video_profile_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_message_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_VideoProfileChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_MessageCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_video_profile_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_VideoProfileChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_most_recent_message_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MostRecentMessageId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_camera_intrinsics_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_most_recent_message_time(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_CameraIntrinsicsChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_MostRecentMessageTime)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_camera_intrinsics_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_CameraIntrinsicsChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&mut self) -> Result { + #[inline] pub unsafe fn get_preview(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_Preview)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + #[inline] pub unsafe fn get_latest_sender(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_LatestSender)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_kind(&mut self) -> Result { + #[inline] pub unsafe fn get_subject(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceKind)(self, &mut out); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_available(&mut self) -> Result { + #[inline] pub unsafe fn get_unread_message_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Available)(self, &mut out); + let hr = ((*self.lpVtbl).get_UnreadMessageCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_active(&mut self) -> Result { + #[inline] pub unsafe fn find_messages_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindMessagesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_messages_with_count_async(&mut self, count: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindMessagesWithCountAsync)(self, count, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEmailMailboxAction, 2895677946, 8698, 18727, 146, 16, 212, 16, 88, 47, 223, 62); + RT_INTERFACE!{interface IEmailMailboxAction(IEmailMailboxActionVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxAction] { + fn get_Kind(&mut self, out: *mut EmailMailboxActionKind) -> HRESULT, + fn get_ChangeNumber(&mut self, out: *mut u64) -> HRESULT + }} + impl IEmailMailboxAction { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Active)(self, &mut out); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_controlled(&mut self) -> Result { + #[inline] pub unsafe fn get_change_number(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsControlled)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChangeNumber)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + DEFINE_IID!(IID_IEmailQueryTextSearch, 2678104712, 15453, 18085, 166, 226, 49, 214, 253, 23, 229, 64); + RT_INTERFACE!{interface IEmailQueryTextSearch(IEmailQueryTextSearchVtbl): IInspectable(IInspectableVtbl) [IID_IEmailQueryTextSearch] { + fn get_Fields(&mut self, out: *mut EmailQuerySearchFields) -> HRESULT, + fn put_Fields(&mut self, value: EmailQuerySearchFields) -> HRESULT, + fn get_SearchScope(&mut self, out: *mut EmailQuerySearchScope) -> HRESULT, + fn put_SearchScope(&mut self, value: EmailQuerySearchScope) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Text(&mut self, value: HSTRING) -> HRESULT + }} + impl IEmailQueryTextSearch { + #[inline] pub unsafe fn get_fields(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Fields)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_video_profiles(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_fields(&mut self, value: EmailQuerySearchFields) -> Result<()> { + let hr = ((*self.lpVtbl).put_Fields)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_available_video_profiles(&mut self) -> Result>> { + #[inline] pub unsafe fn get_search_scope(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SearchScope)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_search_scope(&mut self, value: EmailQuerySearchScope) -> Result<()> { + let hr = ((*self.lpVtbl).put_SearchScope)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_video_profile(&mut self) -> Result> { + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Text)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEmailQueryOptionsFactory, 2297536952, 30891, 20200, 180, 227, 4, 109, 110, 47, 229, 226); + RT_INTERFACE!{static interface IEmailQueryOptionsFactory(IEmailQueryOptionsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IEmailQueryOptionsFactory] { + fn CreateWithText(&mut self, text: HSTRING, out: *mut *mut EmailQueryOptions) -> HRESULT, + fn CreateWithTextAndFields(&mut self, text: HSTRING, fields: EmailQuerySearchFields, out: *mut *mut EmailQueryOptions) -> HRESULT + }} + impl IEmailQueryOptionsFactory { + #[inline] pub unsafe fn create_with_text(&mut self, text: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VideoProfile)(self, &mut out); + let hr = ((*self.lpVtbl).CreateWithText)(self, text.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_camera_intrinsics(&mut self) -> Result> { + #[inline] pub unsafe fn create_with_text_and_fields(&mut self, text: &HStringArg, fields: EmailQuerySearchFields) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self, &mut out); + let hr = ((*self.lpVtbl).CreateWithTextAndFields)(self, text.get(), fields, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn acquire_control_session(&mut self) -> Result> { + } + DEFINE_IID!(IID_IEmailQueryOptions, 1162890139, 15999, 19794, 182, 221, 214, 253, 78, 31, 189, 154); + RT_INTERFACE!{interface IEmailQueryOptions(IEmailQueryOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailQueryOptions] { + fn get_TextSearch(&mut self, out: *mut *mut EmailQueryTextSearch) -> HRESULT, + fn get_SortDirection(&mut self, out: *mut EmailQuerySortDirection) -> HRESULT, + fn put_SortDirection(&mut self, value: EmailQuerySortDirection) -> HRESULT, + fn get_SortProperty(&mut self, out: *mut EmailQuerySortProperty) -> HRESULT, + fn put_SortProperty(&mut self, value: EmailQuerySortProperty) -> HRESULT, + fn get_Kind(&mut self, out: *mut EmailQueryKind) -> HRESULT, + fn put_Kind(&mut self, value: EmailQueryKind) -> HRESULT, + fn get_FolderIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IEmailQueryOptions { + #[inline] pub unsafe fn get_text_search(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).AcquireControlSession)(self, &mut out); + let hr = ((*self.lpVtbl).get_TextSearch)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn can_control_independently_from(&mut self, targetId: &HStringArg) -> Result { + #[inline] pub unsafe fn get_sort_direction(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).CanControlIndependentlyFrom)(self, targetId.get(), &mut out); + let hr = ((*self.lpVtbl).get_SortDirection)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn is_correlated_with(&mut self, targetId: &HStringArg) -> Result { + #[inline] pub unsafe fn set_sort_direction(&mut self, value: EmailQuerySortDirection) -> Result<()> { + let hr = ((*self.lpVtbl).put_SortDirection)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_sort_property(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsCorrelatedWith)(self, targetId.get(), &mut out); + let hr = ((*self.lpVtbl).get_SortProperty)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn try_get_transform_to(&mut self, targetId: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix4x4, bool)> { - let mut result = zeroed(); let mut out = zeroed(); - let hr = ((*self.lpVtbl).TryGetTransformTo)(self, targetId.get(), &mut result, &mut out); - if hr == S_OK { Ok((result, out)) } else { err(hr) } + #[inline] pub unsafe fn set_sort_property(&mut self, value: EmailQuerySortProperty) -> Result<()> { + let hr = ((*self.lpVtbl).put_SortProperty)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn try_get_depth_correlated_camera_intrinsics_async(&mut self, target: &PerceptionDepthFrameSource) -> Result>> { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_kind(&mut self, value: EmailQueryKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_Kind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_folder_ids(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCameraIntrinsicsAsync)(self, target as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_FolderIds)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn try_get_depth_correlated_coordinate_mapper_async(&mut self, targetId: &HStringArg, depthFrameSourceToMapWith: &PerceptionDepthFrameSource) -> Result>> { + } + RT_CLASS!{class EmailQueryTextSearch: IEmailQueryTextSearch} + DEFINE_IID!(IID_IEmailConversationBatch, 3099700097, 453, 17194, 157, 241, 254, 133, 217, 138, 39, 154); + RT_INTERFACE!{interface IEmailConversationBatch(IEmailConversationBatchVtbl): IInspectable(IInspectableVtbl) [IID_IEmailConversationBatch] { + fn get_Conversations(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Status(&mut self, out: *mut EmailBatchStatus) -> HRESULT + }} + impl IEmailConversationBatch { + #[inline] pub unsafe fn get_conversations(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCoordinateMapperAsync)(self, targetId.get(), depthFrameSourceToMapWith as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Conversations)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn try_set_video_profile_async(&mut self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEmailConversationReader, 3026390914, 10357, 17608, 155, 140, 133, 190, 179, 163, 198, 83); + RT_INTERFACE!{interface IEmailConversationReader(IEmailConversationReaderVtbl): IInspectable(IInspectableVtbl) [IID_IEmailConversationReader] { + fn ReadBatchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IEmailConversationReader { + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TrySetVideoProfileAsync)(self, controlSession as *const _ as *mut _, profile as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn open_reader(&mut self) -> Result> { + } + RT_CLASS!{class EmailConversationBatch: IEmailConversationBatch} + DEFINE_IID!(IID_IEmailMessageBatch, 1616695439, 9689, 20251, 158, 81, 5, 20, 192, 20, 150, 83); + RT_INTERFACE!{interface IEmailMessageBatch(IEmailMessageBatchVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMessageBatch] { + fn get_Messages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Status(&mut self, out: *mut EmailBatchStatus) -> HRESULT + }} + impl IEmailMessageBatch { + #[inline] pub unsafe fn get_messages(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).OpenReader)(self, &mut out); + let hr = ((*self.lpVtbl).get_Messages)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } } - RT_CLASS!{class PerceptionDepthFrameReader: IPerceptionDepthFrameReader} - DEFINE_IID!(IID_IPerceptionDepthFrameSource2, 3822206254, 28204, 20077, 145, 217, 112, 76, 216, 223, 247, 157); - RT_INTERFACE!{interface IPerceptionDepthFrameSource2(IPerceptionDepthFrameSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSource2] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IEmailMessageReader, 793427615, 25107, 19077, 163, 176, 249, 45, 26, 131, 157, 25); + RT_INTERFACE!{interface IEmailMessageReader(IEmailMessageReaderVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMessageReader] { + fn ReadBatchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IPerceptionDepthFrameSource2 { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl IEmailMessageReader { + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionInfraredFrameSource, 1437632322, 6152, 18766, 158, 48, 157, 42, 123, 232, 247, 0); - RT_INTERFACE!{interface IPerceptionInfraredFrameSource(IPerceptionInfraredFrameSourceVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSource] { - fn add_AvailableChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AvailableChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ActiveChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ActiveChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PropertiesChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PropertiesChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VideoProfileChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoProfileChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CameraIntrinsicsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CameraIntrinsicsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_DeviceKind(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Available(&mut self, out: *mut bool) -> HRESULT, - fn get_Active(&mut self, out: *mut bool) -> HRESULT, - fn get_IsControlled(&mut self, out: *mut bool) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn get_SupportedVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_AvailableVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_VideoProfile(&mut self, out: *mut *mut PerceptionVideoProfile) -> HRESULT, - #[cfg(not(feature="windows.media"))] fn __Dummy20(&mut self) -> (), - #[cfg(feature="windows.media")] fn get_CameraIntrinsics(&mut self, out: *mut *mut super::super::media::devices::core::CameraIntrinsics) -> HRESULT, - fn AcquireControlSession(&mut self, out: *mut *mut PerceptionControlSession) -> HRESULT, - fn CanControlIndependentlyFrom(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, - fn IsCorrelatedWith(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, - fn TryGetTransformTo(&mut self, targetId: HSTRING, result: *mut super::super::foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, - fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&mut self, target: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryGetDepthCorrelatedCoordinateMapperAsync(&mut self, targetId: HSTRING, depthFrameSourceToMapWith: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TrySetVideoProfileAsync(&mut self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn OpenReader(&mut self, out: *mut *mut PerceptionInfraredFrameReader) -> HRESULT + RT_CLASS!{class EmailMessageBatch: IEmailMessageBatch} + DEFINE_IID!(IID_IEmailMailboxChange, 1642984779, 4591, 16396, 173, 222, 140, 222, 101, 200, 94, 102); + RT_INTERFACE!{interface IEmailMailboxChange(IEmailMailboxChangeVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxChange] { + fn get_ChangeType(&mut self, out: *mut EmailMailboxChangeType) -> HRESULT, + fn get_MailboxActions(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Message(&mut self, out: *mut *mut EmailMessage) -> HRESULT, + fn get_Folder(&mut self, out: *mut *mut EmailFolder) -> HRESULT }} - impl IPerceptionInfraredFrameSource { - #[inline] pub unsafe fn add_available_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + impl IEmailMailboxChange { + #[inline] pub unsafe fn get_change_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AvailableChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_ChangeType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_available_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AvailableChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_mailbox_actions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MailboxActions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_active_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ActiveChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_active_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ActiveChanged)(self, token); + #[inline] pub unsafe fn get_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Folder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxAction: IEmailMailboxAction} + DEFINE_IID!(IID_IEmailMailboxChangeReader, 3183283899, 50493, 17201, 151, 190, 190, 117, 162, 20, 106, 117); + RT_INTERFACE!{interface IEmailMailboxChangeReader(IEmailMailboxChangeReaderVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxChangeReader] { + fn AcceptChanges(&mut self) -> HRESULT, + fn AcceptChangesThrough(&mut self, lastChangeToAcknowledge: *mut EmailMailboxChange) -> HRESULT, + fn ReadBatchAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IEmailMailboxChangeReader { + #[inline] pub unsafe fn accept_changes(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).AcceptChanges)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_properties_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn accept_changes_through(&mut self, lastChangeToAcknowledge: &EmailMailboxChange) -> Result<()> { + let hr = ((*self.lpVtbl).AcceptChangesThrough)(self, lastChangeToAcknowledge as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxChange: IEmailMailboxChange} + DEFINE_IID!(IID_IEmailMailboxChangeTracker, 2061796920, 20838, 17079, 136, 130, 253, 33, 201, 43, 221, 75); + RT_INTERFACE!{interface IEmailMailboxChangeTracker(IEmailMailboxChangeTrackerVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxChangeTracker] { + fn get_IsTracking(&mut self, out: *mut bool) -> HRESULT, + fn Enable(&mut self) -> HRESULT, + fn GetChangeReader(&mut self, out: *mut *mut EmailMailboxChangeReader) -> HRESULT, + fn Reset(&mut self) -> HRESULT + }} + impl IEmailMailboxChangeTracker { + #[inline] pub unsafe fn get_is_tracking(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_PropertiesChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IsTracking)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_properties_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_PropertiesChanged)(self, token); + #[inline] pub unsafe fn enable(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Enable)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_video_profile_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_VideoProfileChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_change_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetChangeReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_video_profile_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_VideoProfileChanged)(self, token); + #[inline] pub unsafe fn reset(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Reset)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_camera_intrinsics_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + } + RT_CLASS!{class EmailMailboxChangeReader: IEmailMailboxChangeReader} + DEFINE_IID!(IID_IEmailMeetingInfo, 834682793, 31027, 16735, 162, 117, 209, 101, 186, 7, 2, 107); + RT_INTERFACE!{interface IEmailMeetingInfo(IEmailMeetingInfoVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMeetingInfo] { + fn get_AllowNewTimeProposal(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowNewTimeProposal(&mut self, value: bool) -> HRESULT, + fn get_AppointmentRoamingId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AppointmentRoamingId(&mut self, value: HSTRING) -> HRESULT, + fn get_AppointmentOriginalStartTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_AppointmentOriginalStartTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Duration(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_IsAllDay(&mut self, out: *mut bool) -> HRESULT, + fn put_IsAllDay(&mut self, value: bool) -> HRESULT, + fn get_IsResponseRequested(&mut self, out: *mut bool) -> HRESULT, + fn put_IsResponseRequested(&mut self, value: bool) -> HRESULT, + fn get_Location(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Location(&mut self, value: HSTRING) -> HRESULT, + fn get_ProposedStartTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ProposedStartTime(&mut self, proposedStartTime: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ProposedDuration(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ProposedDuration(&mut self, duration: *mut super::super::foundation::IReference) -> HRESULT, + fn get_RecurrenceStartTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_RecurrenceStartTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Recurrence(&mut self, out: *mut *mut super::appointments::AppointmentRecurrence) -> HRESULT, + fn put_Recurrence(&mut self, value: *mut super::appointments::AppointmentRecurrence) -> HRESULT, + fn get_RemoteChangeNumber(&mut self, out: *mut u64) -> HRESULT, + fn put_RemoteChangeNumber(&mut self, value: u64) -> HRESULT, + fn get_StartTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_StartTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT + }} + impl IEmailMeetingInfo { + #[inline] pub unsafe fn get_allow_new_time_proposal(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_CameraIntrinsicsChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_AllowNewTimeProposal)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_camera_intrinsics_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_CameraIntrinsicsChanged)(self, token); + #[inline] pub unsafe fn set_allow_new_time_proposal(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowNewTimeProposal)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_id(&mut self) -> Result { + #[inline] pub unsafe fn get_appointment_roaming_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppointmentRoamingId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_display_name(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_appointment_roaming_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppointmentRoamingId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_device_kind(&mut self) -> Result { + #[inline] pub unsafe fn get_appointment_original_start_time(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceKind)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AppointmentOriginalStartTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_available(&mut self) -> Result { + #[inline] pub unsafe fn set_appointment_original_start_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppointmentOriginalStartTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Available)(self, &mut out); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_active(&mut self) -> Result { + #[inline] pub unsafe fn set_duration(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Duration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_all_day(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Active)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsAllDay)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_controlled(&mut self) -> Result { + #[inline] pub unsafe fn set_is_all_day(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsAllDay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_response_requested(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsControlled)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsResponseRequested)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_is_response_requested(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsResponseRequested)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_video_profiles(&mut self) -> Result>> { + #[inline] pub unsafe fn get_location(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Location)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_available_video_profiles(&mut self) -> Result>> { + #[inline] pub unsafe fn set_location(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Location)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_proposed_start_time(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self, &mut out); + let hr = ((*self.lpVtbl).get_ProposedStartTime)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_video_profile(&mut self) -> Result> { + #[inline] pub unsafe fn set_proposed_start_time(&mut self, proposedStartTime: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProposedStartTime)(self, proposedStartTime as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_proposed_duration(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VideoProfile)(self, &mut out); + let hr = ((*self.lpVtbl).get_ProposedDuration)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_camera_intrinsics(&mut self) -> Result> { + #[inline] pub unsafe fn set_proposed_duration(&mut self, duration: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProposedDuration)(self, duration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_recurrence_start_time(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self, &mut out); + let hr = ((*self.lpVtbl).get_RecurrenceStartTime)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn acquire_control_session(&mut self) -> Result> { + #[inline] pub unsafe fn set_recurrence_start_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_RecurrenceStartTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_recurrence(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).AcquireControlSession)(self, &mut out); + let hr = ((*self.lpVtbl).get_Recurrence)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn can_control_independently_from(&mut self, targetId: &HStringArg) -> Result { + #[inline] pub unsafe fn set_recurrence(&mut self, value: &super::appointments::AppointmentRecurrence) -> Result<()> { + let hr = ((*self.lpVtbl).put_Recurrence)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_change_number(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).CanControlIndependentlyFrom)(self, targetId.get(), &mut out); + let hr = ((*self.lpVtbl).get_RemoteChangeNumber)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn is_correlated_with(&mut self, targetId: &HStringArg) -> Result { + #[inline] pub unsafe fn set_remote_change_number(&mut self, value: u64) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteChangeNumber)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_start_time(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsCorrelatedWith)(self, targetId.get(), &mut out); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn try_get_transform_to(&mut self, targetId: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix4x4, bool)> { - let mut result = zeroed(); let mut out = zeroed(); - let hr = ((*self.lpVtbl).TryGetTransformTo)(self, targetId.get(), &mut result, &mut out); - if hr == S_OK { Ok((result, out)) } else { err(hr) } + #[inline] pub unsafe fn set_start_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_StartTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn try_get_depth_correlated_camera_intrinsics_async(&mut self, target: &PerceptionDepthFrameSource) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCameraIntrinsicsAsync)(self, target as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + DEFINE_IID!(IID_IEmailMeetingInfo2, 2119776365, 45273, 20453, 134, 124, 227, 30, 210, 181, 136, 184); + RT_INTERFACE!{interface IEmailMeetingInfo2(IEmailMeetingInfo2Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMeetingInfo2] { + fn get_IsReportedOutOfDateByServer(&mut self, out: *mut bool) -> HRESULT + }} + impl IEmailMeetingInfo2 { + #[inline] pub unsafe fn get_is_reported_out_of_date_by_server(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsReportedOutOfDateByServer)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn try_get_depth_correlated_coordinate_mapper_async(&mut self, targetId: &HStringArg, depthFrameSourceToMapWith: &PerceptionDepthFrameSource) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCoordinateMapperAsync)(self, targetId.get(), depthFrameSourceToMapWith as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + DEFINE_IID!(IID_IEmailItemCounts, 1540436769, 65224, 19371, 131, 186, 11, 175, 60, 31, 108, 189); + RT_INTERFACE!{interface IEmailItemCounts(IEmailItemCountsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailItemCounts] { + fn get_Flagged(&mut self, out: *mut u32) -> HRESULT, + fn get_Important(&mut self, out: *mut u32) -> HRESULT, + fn get_Total(&mut self, out: *mut u32) -> HRESULT, + fn get_Unread(&mut self, out: *mut u32) -> HRESULT + }} + impl IEmailItemCounts { + #[inline] pub unsafe fn get_flagged(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Flagged)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn try_set_video_profile_async(&mut self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).TrySetVideoProfileAsync)(self, controlSession as *const _ as *mut _, profile as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_important(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Important)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn open_reader(&mut self) -> Result> { + #[inline] pub unsafe fn get_total(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Total)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_unread(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Unread)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IEmailManagerStatics2 [CLSID_EmailManager]} + RT_ACTIVATABLE!{IEmailManagerStatics3 [CLSID_EmailManager]} + RT_ACTIVATABLE!{IEmailManagerStatics [CLSID_EmailManager]} + DEFINE_CLSID!(CLSID_EmailManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,69,109,97,105,108,46,69,109,97,105,108,77,97,110,97,103,101,114,0]); + RT_CLASS!{class EmailStoreNotificationTriggerDetails: IEmailStoreNotificationTriggerDetails} +pub mod dataprovider { // Windows.ApplicationModel.Email.DataProvider +use ::prelude::*; + DEFINE_IID!(IID_IEmailDataProviderTriggerDetails, 2403225168, 13342, 17907, 187, 160, 132, 160, 5, 225, 49, 154); + RT_INTERFACE!{interface IEmailDataProviderTriggerDetails(IEmailDataProviderTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailDataProviderTriggerDetails] { + fn get_Connection(&mut self, out: *mut *mut EmailDataProviderConnection) -> HRESULT + }} + impl IEmailDataProviderTriggerDetails { + #[inline] pub unsafe fn get_connection(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).OpenReader)(self, &mut out); + let hr = ((*self.lpVtbl).get_Connection)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PerceptionInfraredFrameReader: IPerceptionInfraredFrameReader} - DEFINE_IID!(IID_IPerceptionInfraredFrameSource2, 3704936344, 19211, 17152, 141, 133, 65, 8, 23, 250, 160, 50); - RT_INTERFACE!{interface IPerceptionInfraredFrameSource2(IPerceptionInfraredFrameSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSource2] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class EmailDataProviderConnection: IEmailDataProviderConnection} + DEFINE_IID!(IID_IEmailDataProviderConnection, 1000119751, 14258, 19440, 174, 48, 123, 100, 74, 28, 150, 225); + RT_INTERFACE!{interface IEmailDataProviderConnection(IEmailDataProviderConnectionVtbl): IInspectable(IInspectableVtbl) [IID_IEmailDataProviderConnection] { + fn add_MailboxSyncRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MailboxSyncRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadMessageRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadMessageRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadAttachmentRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadAttachmentRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_CreateFolderRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CreateFolderRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_DeleteFolderRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeleteFolderRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_EmptyFolderRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EmptyFolderRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_MoveFolderRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MoveFolderRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_UpdateMeetingResponseRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UpdateMeetingResponseRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ForwardMeetingRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ForwardMeetingRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ProposeNewTimeForMeetingRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProposeNewTimeForMeetingRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SetAutoReplySettingsRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SetAutoReplySettingsRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_GetAutoReplySettingsRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_GetAutoReplySettingsRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ResolveRecipientsRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ResolveRecipientsRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ValidateCertificatesRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ValidateCertificatesRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ServerSearchReadBatchRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServerSearchReadBatchRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn Start(&mut self) -> HRESULT }} - impl IPerceptionInfraredFrameSource2 { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - } - DEFINE_IID!(IID_IPerceptionVideoProfile, 1970683555, 282, 18190, 130, 37, 111, 5, 173, 226, 86, 72); - RT_INTERFACE!{interface IPerceptionVideoProfile(IPerceptionVideoProfileVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionVideoProfile] { - #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.graphics")] fn get_BitmapPixelFormat(&mut self, out: *mut super::super::graphics::imaging::BitmapPixelFormat) -> HRESULT, - #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.graphics")] fn get_BitmapAlphaMode(&mut self, out: *mut super::super::graphics::imaging::BitmapAlphaMode) -> HRESULT, - fn get_Width(&mut self, out: *mut i32) -> HRESULT, - fn get_Height(&mut self, out: *mut i32) -> HRESULT, - fn get_FrameDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn IsEqual(&mut self, other: *mut PerceptionVideoProfile, out: *mut bool) -> HRESULT - }} - impl IPerceptionVideoProfile { - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_bitmap_pixel_format(&mut self) -> Result { + impl IEmailDataProviderConnection { + #[inline] pub unsafe fn add_mailbox_sync_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BitmapPixelFormat)(self, &mut out); + let hr = ((*self.lpVtbl).add_MailboxSyncRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_bitmap_alpha_mode(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BitmapAlphaMode)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_mailbox_sync_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MailboxSyncRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_width(&mut self) -> Result { + #[inline] pub unsafe fn add_download_message_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + let hr = ((*self.lpVtbl).add_DownloadMessageRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_height(&mut self) -> Result { + #[inline] pub unsafe fn remove_download_message_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DownloadMessageRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_download_attachment_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + let hr = ((*self.lpVtbl).add_DownloadAttachmentRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_frame_duration(&mut self) -> Result { + #[inline] pub unsafe fn remove_download_attachment_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DownloadAttachmentRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_create_folder_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_FrameDuration)(self, &mut out); + let hr = ((*self.lpVtbl).add_CreateFolderRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn is_equal(&mut self, other: &PerceptionVideoProfile) -> Result { + #[inline] pub unsafe fn remove_create_folder_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CreateFolderRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_delete_folder_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsEqual)(self, other as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).add_DeleteFolderRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class PerceptionColorFrameArrivedEventArgs: IPerceptionColorFrameArrivedEventArgs} - RT_CLASS!{class PerceptionColorFrame: IPerceptionColorFrame} - RT_CLASS!{class PerceptionDepthFrameArrivedEventArgs: IPerceptionDepthFrameArrivedEventArgs} - RT_CLASS!{class PerceptionDepthFrame: IPerceptionDepthFrame} - RT_CLASS!{class PerceptionInfraredFrameArrivedEventArgs: IPerceptionInfraredFrameArrivedEventArgs} - RT_CLASS!{class PerceptionInfraredFrame: IPerceptionInfraredFrame} - DEFINE_IID!(IID_IPerceptionColorFrameArrivedEventArgs, 2410480341, 34551, 19853, 185, 102, 90, 55, 97, 186, 159, 89); - RT_INTERFACE!{interface IPerceptionColorFrameArrivedEventArgs(IPerceptionColorFrameArrivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameArrivedEventArgs] { - fn get_RelativeTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn TryOpenFrame(&mut self, out: *mut *mut PerceptionColorFrame) -> HRESULT - }} - impl IPerceptionColorFrameArrivedEventArgs { - #[inline] pub unsafe fn get_relative_time(&mut self) -> Result { + #[inline] pub unsafe fn remove_delete_folder_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DeleteFolderRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_empty_folder_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RelativeTime)(self, &mut out); + let hr = ((*self.lpVtbl).add_EmptyFolderRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn try_open_frame(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryOpenFrame)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_empty_folder_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EmptyFolderRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionDepthFrameArrivedEventArgs, 1144858034, 45698, 17975, 145, 115, 172, 151, 132, 53, 201, 133); - RT_INTERFACE!{interface IPerceptionDepthFrameArrivedEventArgs(IPerceptionDepthFrameArrivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameArrivedEventArgs] { - fn get_RelativeTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn TryOpenFrame(&mut self, out: *mut *mut PerceptionDepthFrame) -> HRESULT - }} - impl IPerceptionDepthFrameArrivedEventArgs { - #[inline] pub unsafe fn get_relative_time(&mut self) -> Result { + #[inline] pub unsafe fn add_move_folder_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RelativeTime)(self, &mut out); + let hr = ((*self.lpVtbl).add_MoveFolderRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn try_open_frame(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryOpenFrame)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_move_folder_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MoveFolderRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionInfraredFrameArrivedEventArgs, 2675440327, 46269, 18519, 157, 80, 190, 142, 240, 117, 218, 239); - RT_INTERFACE!{interface IPerceptionInfraredFrameArrivedEventArgs(IPerceptionInfraredFrameArrivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameArrivedEventArgs] { - fn get_RelativeTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn TryOpenFrame(&mut self, out: *mut *mut PerceptionInfraredFrame) -> HRESULT - }} - impl IPerceptionInfraredFrameArrivedEventArgs { - #[inline] pub unsafe fn get_relative_time(&mut self) -> Result { + #[inline] pub unsafe fn add_update_meeting_response_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RelativeTime)(self, &mut out); + let hr = ((*self.lpVtbl).add_UpdateMeetingResponseRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn try_open_frame(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryOpenFrame)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_update_meeting_response_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UpdateMeetingResponseRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionDepthCorrelatedCameraIntrinsics, 1699269121, 34526, 23521, 101, 130, 128, 127, 207, 76, 149, 207); - RT_INTERFACE!{interface IPerceptionDepthCorrelatedCameraIntrinsics(IPerceptionDepthCorrelatedCameraIntrinsicsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthCorrelatedCameraIntrinsics] { - fn UnprojectPixelAtCorrelatedDepth(&mut self, pixelCoordinate: super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn UnprojectPixelsAtCorrelatedDepth(&mut self, sourceCoordinatesSize: u32, sourceCoordinates: *mut super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn UnprojectRegionPixelsAtCorrelatedDepthAsync(&mut self, region: super::super::foundation::Rect, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn UnprojectAllPixelsAtCorrelatedDepthAsync(&mut self, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT - }} - impl IPerceptionDepthCorrelatedCameraIntrinsics { - #[inline] pub unsafe fn unproject_pixel_at_correlated_depth(&mut self, pixelCoordinate: super::super::foundation::Point, depthFrame: &PerceptionDepthFrame) -> Result { + #[inline] pub unsafe fn add_forward_meeting_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).UnprojectPixelAtCorrelatedDepth)(self, pixelCoordinate, depthFrame as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).add_ForwardMeetingRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn unproject_pixels_at_correlated_depth(&mut self, sourceCoordinates: &[super::super::foundation::Point], depthFrame: &PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3) -> Result<()> { - let hr = ((*self.lpVtbl).UnprojectPixelsAtCorrelatedDepth)(self, sourceCoordinates.len() as u32, sourceCoordinates.as_ptr() as *mut _, depthFrame as *const _ as *mut _, resultsSize, results); + #[inline] pub unsafe fn remove_forward_meeting_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ForwardMeetingRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn unproject_region_pixels_at_correlated_depth_async(&mut self, region: super::super::foundation::Rect, depthFrame: &PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).UnprojectRegionPixelsAtCorrelatedDepthAsync)(self, region, depthFrame as *const _ as *mut _, resultsSize, results, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn add_propose_new_time_for_meeting_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ProposeNewTimeForMeetingRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn unproject_all_pixels_at_correlated_depth_async(&mut self, depthFrame: &PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).UnprojectAllPixelsAtCorrelatedDepthAsync)(self, depthFrame as *const _ as *mut _, resultsSize, results, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_propose_new_time_for_meeting_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ProposeNewTimeForMeetingRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionDepthCorrelatedCoordinateMapper, 1531813149, 46582, 18076, 184, 194, 185, 122, 69, 230, 134, 59); - RT_INTERFACE!{interface IPerceptionDepthCorrelatedCoordinateMapper(IPerceptionDepthCorrelatedCoordinateMapperVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthCorrelatedCoordinateMapper] { - fn MapPixelToTarget(&mut self, sourcePixelCoordinate: super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, out: *mut super::super::foundation::Point) -> HRESULT, - fn MapPixelsToTarget(&mut self, sourceCoordinatesSize: u32, sourceCoordinates: *mut super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::Point) -> HRESULT, - fn MapRegionOfPixelsToTargetAsync(&mut self, region: super::super::foundation::Rect, depthFrame: *mut PerceptionDepthFrame, targetCoordinatesSize: u32, targetCoordinates: *mut super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn MapAllPixelsToTargetAsync(&mut self, depthFrame: *mut PerceptionDepthFrame, targetCoordinatesSize: u32, targetCoordinates: *mut super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT - }} - impl IPerceptionDepthCorrelatedCoordinateMapper { - #[inline] pub unsafe fn map_pixel_to_target(&mut self, sourcePixelCoordinate: super::super::foundation::Point, depthFrame: &PerceptionDepthFrame) -> Result { + #[inline] pub unsafe fn add_set_auto_reply_settings_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).MapPixelToTarget)(self, sourcePixelCoordinate, depthFrame as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).add_SetAutoReplySettingsRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn map_pixels_to_target(&mut self, sourceCoordinates: &[super::super::foundation::Point], depthFrame: &PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::Point) -> Result<()> { - let hr = ((*self.lpVtbl).MapPixelsToTarget)(self, sourceCoordinates.len() as u32, sourceCoordinates.as_ptr() as *mut _, depthFrame as *const _ as *mut _, resultsSize, results); + #[inline] pub unsafe fn remove_set_auto_reply_settings_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SetAutoReplySettingsRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn map_region_of_pixels_to_target_async(&mut self, region: super::super::foundation::Rect, depthFrame: &PerceptionDepthFrame, targetCoordinatesSize: u32, targetCoordinates: *mut super::super::foundation::Point) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).MapRegionOfPixelsToTargetAsync)(self, region, depthFrame as *const _ as *mut _, targetCoordinatesSize, targetCoordinates, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn add_get_auto_reply_settings_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_GetAutoReplySettingsRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn map_all_pixels_to_target_async(&mut self, depthFrame: &PerceptionDepthFrame, targetCoordinatesSize: u32, targetCoordinates: *mut super::super::foundation::Point) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).MapAllPixelsToTargetAsync)(self, depthFrame as *const _ as *mut _, targetCoordinatesSize, targetCoordinates, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_get_auto_reply_settings_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_GetAutoReplySettingsRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_ACTIVATABLE!{IKnownPerceptionFrameSourcePropertiesStatics [CLSID_KnownPerceptionFrameSourceProperties]} - RT_ACTIVATABLE!{IKnownPerceptionFrameSourcePropertiesStatics2 [CLSID_KnownPerceptionFrameSourceProperties]} - DEFINE_CLSID!(CLSID_KnownPerceptionFrameSourceProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,70,114,97,109,101,83,111,117,114,99,101,80,114,111,112,101,114,116,105,101,115,0]); - RT_ACTIVATABLE!{IKnownPerceptionVideoFrameSourcePropertiesStatics [CLSID_KnownPerceptionVideoFrameSourceProperties]} - DEFINE_CLSID!(CLSID_KnownPerceptionVideoFrameSourceProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,86,105,100,101,111,70,114,97,109,101,83,111,117,114,99,101,80,114,111,112,101,114,116,105,101,115,0]); - RT_ACTIVATABLE!{IKnownPerceptionInfraredFrameSourcePropertiesStatics [CLSID_KnownPerceptionInfraredFrameSourceProperties]} - DEFINE_CLSID!(CLSID_KnownPerceptionInfraredFrameSourceProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,73,110,102,114,97,114,101,100,70,114,97,109,101,83,111,117,114,99,101,80,114,111,112,101,114,116,105,101,115,0]); - RT_ACTIVATABLE!{IKnownPerceptionDepthFrameSourcePropertiesStatics [CLSID_KnownPerceptionDepthFrameSourceProperties]} - DEFINE_CLSID!(CLSID_KnownPerceptionDepthFrameSourceProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,68,101,112,116,104,70,114,97,109,101,83,111,117,114,99,101,80,114,111,112,101,114,116,105,101,115,0]); - RT_ACTIVATABLE!{IKnownPerceptionColorFrameSourcePropertiesStatics [CLSID_KnownPerceptionColorFrameSourceProperties]} - DEFINE_CLSID!(CLSID_KnownPerceptionColorFrameSourceProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,67,111,108,111,114,70,114,97,109,101,83,111,117,114,99,101,80,114,111,112,101,114,116,105,101,115,0]); - RT_ACTIVATABLE!{IKnownPerceptionVideoProfilePropertiesStatics [CLSID_KnownPerceptionVideoProfileProperties]} - DEFINE_CLSID!(CLSID_KnownPerceptionVideoProfileProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,86,105,100,101,111,80,114,111,102,105,108,101,80,114,111,112,101,114,116,105,101,115,0]); - RT_ACTIVATABLE!{IKnownCameraIntrinsicsPropertiesStatics [CLSID_KnownCameraIntrinsicsProperties]} - DEFINE_CLSID!(CLSID_KnownCameraIntrinsicsProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,67,97,109,101,114,97,73,110,116,114,105,110,115,105,99,115,80,114,111,112,101,114,116,105,101,115,0]); - DEFINE_IID!(IID_IPerceptionControlSession, 2576975443, 23101, 16767, 146, 57, 241, 136, 158, 84, 139, 72); - RT_INTERFACE!{interface IPerceptionControlSession(IPerceptionControlSessionVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionControlSession] { - fn add_ControlLost(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ControlLost(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn TrySetPropertyAsync(&mut self, name: HSTRING, value: *mut IInspectable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl IPerceptionControlSession { - #[inline] pub unsafe fn add_control_lost(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn add_resolve_recipients_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ControlLost)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).add_ResolveRecipientsRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_control_lost(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ControlLost)(self, token); + #[inline] pub unsafe fn remove_resolve_recipients_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ResolveRecipientsRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn try_set_property_async(&mut self, name: &HStringArg, value: &IInspectable) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).TrySetPropertyAsync)(self, name.get(), value as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - } - DEFINE_IID!(IID_IPerceptionColorFrameReader, 1985017198, 47605, 17947, 131, 173, 242, 34, 175, 42, 170, 220); - RT_INTERFACE!{interface IPerceptionColorFrameReader(IPerceptionColorFrameReaderVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameReader] { - fn add_FrameArrived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FrameArrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Source(&mut self, out: *mut *mut PerceptionColorFrameSource) -> HRESULT, - fn get_IsPaused(&mut self, out: *mut bool) -> HRESULT, - fn put_IsPaused(&mut self, value: bool) -> HRESULT, - fn TryReadLatestFrame(&mut self, out: *mut *mut PerceptionColorFrame) -> HRESULT - }} - impl IPerceptionColorFrameReader { - #[inline] pub unsafe fn add_frame_arrived(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn add_validate_certificates_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_FrameArrived)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).add_ValidateCertificatesRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_frame_arrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_FrameArrived)(self, token); + #[inline] pub unsafe fn remove_validate_certificates_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ValidateCertificatesRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_source(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Source)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_paused(&mut self) -> Result { + #[inline] pub unsafe fn add_server_search_read_batch_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsPaused)(self, &mut out); + let hr = ((*self.lpVtbl).add_ServerSearchReadBatchRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_is_paused(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsPaused)(self, value); + #[inline] pub unsafe fn remove_server_search_read_batch_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ServerSearchReadBatchRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn try_read_latest_frame(&mut self) -> Result> { + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxSyncManagerSyncRequestEventArgs: IEmailMailboxSyncManagerSyncRequestEventArgs} + RT_CLASS!{class EmailMailboxDownloadMessageRequestEventArgs: IEmailMailboxDownloadMessageRequestEventArgs} + RT_CLASS!{class EmailMailboxDownloadAttachmentRequestEventArgs: IEmailMailboxDownloadAttachmentRequestEventArgs} + RT_CLASS!{class EmailMailboxCreateFolderRequestEventArgs: IEmailMailboxCreateFolderRequestEventArgs} + RT_CLASS!{class EmailMailboxDeleteFolderRequestEventArgs: IEmailMailboxDeleteFolderRequestEventArgs} + RT_CLASS!{class EmailMailboxEmptyFolderRequestEventArgs: IEmailMailboxEmptyFolderRequestEventArgs} + RT_CLASS!{class EmailMailboxMoveFolderRequestEventArgs: IEmailMailboxMoveFolderRequestEventArgs} + RT_CLASS!{class EmailMailboxUpdateMeetingResponseRequestEventArgs: IEmailMailboxUpdateMeetingResponseRequestEventArgs} + RT_CLASS!{class EmailMailboxForwardMeetingRequestEventArgs: IEmailMailboxForwardMeetingRequestEventArgs} + RT_CLASS!{class EmailMailboxProposeNewTimeForMeetingRequestEventArgs: IEmailMailboxProposeNewTimeForMeetingRequestEventArgs} + RT_CLASS!{class EmailMailboxSetAutoReplySettingsRequestEventArgs: IEmailMailboxSetAutoReplySettingsRequestEventArgs} + RT_CLASS!{class EmailMailboxGetAutoReplySettingsRequestEventArgs: IEmailMailboxGetAutoReplySettingsRequestEventArgs} + RT_CLASS!{class EmailMailboxResolveRecipientsRequestEventArgs: IEmailMailboxResolveRecipientsRequestEventArgs} + RT_CLASS!{class EmailMailboxValidateCertificatesRequestEventArgs: IEmailMailboxValidateCertificatesRequestEventArgs} + RT_CLASS!{class EmailMailboxServerSearchReadBatchRequestEventArgs: IEmailMailboxServerSearchReadBatchRequestEventArgs} + DEFINE_IID!(IID_IEmailMailboxSyncManagerSyncRequest, 1309731044, 32359, 16474, 182, 115, 220, 96, 201, 16, 144, 252); + RT_INTERFACE!{interface IEmailMailboxSyncManagerSyncRequest(IEmailMailboxSyncManagerSyncRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxSyncManagerSyncRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IEmailMailboxSyncManagerSyncRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryReadLatestFrame)(self, &mut out); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionDepthFrameReader, 2980298911, 10651, 17938, 164, 247, 39, 15, 37, 160, 150, 236); - RT_INTERFACE!{interface IPerceptionDepthFrameReader(IPerceptionDepthFrameReaderVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameReader] { - fn add_FrameArrived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FrameArrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Source(&mut self, out: *mut *mut PerceptionDepthFrameSource) -> HRESULT, - fn get_IsPaused(&mut self, out: *mut bool) -> HRESULT, - fn put_IsPaused(&mut self, value: bool) -> HRESULT, - fn TryReadLatestFrame(&mut self, out: *mut *mut PerceptionDepthFrame) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxDownloadMessageRequest, 1232814471, 23373, 19235, 129, 108, 243, 132, 43, 235, 117, 62); + RT_INTERFACE!{interface IEmailMailboxDownloadMessageRequest(IEmailMailboxDownloadMessageRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxDownloadMessageRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EmailMessageId(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IPerceptionDepthFrameReader { - #[inline] pub unsafe fn add_frame_arrived(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_FrameArrived)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IEmailMailboxDownloadMessageRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_frame_arrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_FrameArrived)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_email_message_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailMessageId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_source(&mut self) -> Result> { + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_paused(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsPaused)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_paused(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsPaused)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_read_latest_frame(&mut self) -> Result> { + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryReadLatestFrame)(self, &mut out); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionInfraredFrameReader, 2036387352, 54171, 20424, 160, 74, 146, 151, 52, 198, 117, 108); - RT_INTERFACE!{interface IPerceptionInfraredFrameReader(IPerceptionInfraredFrameReaderVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameReader] { - fn add_FrameArrived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FrameArrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Source(&mut self, out: *mut *mut PerceptionInfraredFrameSource) -> HRESULT, - fn get_IsPaused(&mut self, out: *mut bool) -> HRESULT, - fn put_IsPaused(&mut self, value: bool) -> HRESULT, - fn TryReadLatestFrame(&mut self, out: *mut *mut PerceptionInfraredFrame) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxDownloadAttachmentRequest, 186497972, 29964, 18657, 188, 228, 141, 88, 150, 132, 255, 188); + RT_INTERFACE!{interface IEmailMailboxDownloadAttachmentRequest(IEmailMailboxDownloadAttachmentRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxDownloadAttachmentRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EmailMessageId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EmailAttachmentId(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IPerceptionInfraredFrameReader { - #[inline] pub unsafe fn add_frame_arrived(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_FrameArrived)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_frame_arrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_FrameArrived)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&mut self) -> Result> { + impl IEmailMailboxDownloadAttachmentRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Source)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_paused(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsPaused)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_email_message_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailMessageId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_is_paused(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsPaused)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_email_attachment_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailAttachmentId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn try_read_latest_frame(&mut self) -> Result> { + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TryReadLatestFrame)(self, &mut out); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionColorFrame, 4267840841, 11455, 20372, 152, 97, 248, 23, 234, 49, 119, 71); - RT_INTERFACE!{interface IPerceptionColorFrame(IPerceptionColorFrameVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrame] { - #[cfg(feature="windows.media")] fn get_VideoFrame(&mut self, out: *mut *mut super::super::media::VideoFrame) -> HRESULT - }} - impl IPerceptionColorFrame { - #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_video_frame(&mut self) -> Result> { + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VideoFrame)(self, &mut out); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionDepthFrame, 2742780412, 39174, 20477, 145, 97, 0, 36, 179, 96, 182, 87); - RT_INTERFACE!{interface IPerceptionDepthFrame(IPerceptionDepthFrameVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrame] { - #[cfg(feature="windows.media")] fn get_VideoFrame(&mut self, out: *mut *mut super::super::media::VideoFrame) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxCreateFolderRequest, 407713653, 51489, 19513, 163, 9, 225, 108, 159, 34, 176, 75); + RT_INTERFACE!{interface IEmailMailboxCreateFolderRequest(IEmailMailboxCreateFolderRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxCreateFolderRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ParentFolderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, folder: *mut super::EmailFolder, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, status: super::EmailMailboxCreateFolderStatus, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IPerceptionDepthFrame { - #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_video_frame(&mut self) -> Result> { + impl IEmailMailboxCreateFolderRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VideoFrame)(self, &mut out); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_parent_folder_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ParentFolderId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed_async(&mut self, folder: &super::EmailFolder) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, folder as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionInfraredFrame, 2961728118, 33950, 19578, 138, 230, 181, 96, 100, 83, 33, 83); - RT_INTERFACE!{interface IPerceptionInfraredFrame(IPerceptionInfraredFrameVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrame] { - #[cfg(feature="windows.media")] fn get_VideoFrame(&mut self, out: *mut *mut super::super::media::VideoFrame) -> HRESULT - }} - impl IPerceptionInfraredFrame { - #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_video_frame(&mut self) -> Result> { + #[inline] pub unsafe fn report_failed_async(&mut self, status: super::EmailMailboxCreateFolderStatus) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VideoFrame)(self, &mut out); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, status, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } -pub mod provider { // Windows.Devices.Perception.Provider -use ::prelude::*; - DEFINE_IID!(IID_IKnownPerceptionFrameKindStatics, 988172758, 38505, 16646, 159, 174, 72, 53, 193, 185, 97, 4); - RT_INTERFACE!{static interface IKnownPerceptionFrameKindStatics(IKnownPerceptionFrameKindStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionFrameKindStatics] { - fn get_Color(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Depth(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Infrared(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxDeleteFolderRequest, 2489968778, 43313, 18297, 146, 61, 9, 163, 234, 41, 46, 41); + RT_INTERFACE!{interface IEmailMailboxDeleteFolderRequest(IEmailMailboxDeleteFolderRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxDeleteFolderRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EmailFolderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, status: super::EmailMailboxDeleteFolderStatus, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IKnownPerceptionFrameKindStatics { - #[inline] pub unsafe fn get_color(&mut self) -> Result { + impl IEmailMailboxDeleteFolderRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_depth(&mut self) -> Result { + #[inline] pub unsafe fn get_email_folder_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Depth)(self, &mut out); + let hr = ((*self.lpVtbl).get_EmailFolderId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_infrared(&mut self) -> Result { + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Infrared)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_failed_async(&mut self, status: super::EmailMailboxDeleteFolderStatus) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, status, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionFrameProviderManagerServiceStatics, 2927855334, 51929, 17241, 143, 150, 142, 174, 81, 129, 5, 38); - RT_INTERFACE!{static interface IPerceptionFrameProviderManagerServiceStatics(IPerceptionFrameProviderManagerServiceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameProviderManagerServiceStatics] { - fn RegisterFrameProviderInfo(&mut self, manager: *mut IPerceptionFrameProviderManager, frameProviderInfo: *mut PerceptionFrameProviderInfo) -> HRESULT, - fn UnregisterFrameProviderInfo(&mut self, manager: *mut IPerceptionFrameProviderManager, frameProviderInfo: *mut PerceptionFrameProviderInfo) -> HRESULT, - fn RegisterFaceAuthenticationGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, faceAuthenticationGroup: *mut PerceptionFaceAuthenticationGroup) -> HRESULT, - fn UnregisterFaceAuthenticationGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, faceAuthenticationGroup: *mut PerceptionFaceAuthenticationGroup) -> HRESULT, - fn RegisterControlGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, controlGroup: *mut PerceptionControlGroup) -> HRESULT, - fn UnregisterControlGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, controlGroup: *mut PerceptionControlGroup) -> HRESULT, - fn RegisterCorrelationGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, correlationGroup: *mut PerceptionCorrelationGroup) -> HRESULT, - fn UnregisterCorrelationGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, correlationGroup: *mut PerceptionCorrelationGroup) -> HRESULT, - fn UpdateAvailabilityForProvider(&mut self, provider: *mut IPerceptionFrameProvider, available: bool) -> HRESULT, - fn PublishFrameForProvider(&mut self, provider: *mut IPerceptionFrameProvider, frame: *mut PerceptionFrame) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxEmptyFolderRequest, 4266329003, 63597, 18137, 180, 206, 188, 138, 109, 158, 146, 104); + RT_INTERFACE!{interface IEmailMailboxEmptyFolderRequest(IEmailMailboxEmptyFolderRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxEmptyFolderRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EmailFolderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, status: super::EmailMailboxEmptyFolderStatus, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IPerceptionFrameProviderManagerServiceStatics { - #[inline] pub unsafe fn register_frame_provider_info(&mut self, manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { - let hr = ((*self.lpVtbl).RegisterFrameProviderInfo)(self, manager as *const _ as *mut _, frameProviderInfo as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IEmailMailboxEmptyFolderRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn unregister_frame_provider_info(&mut self, manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { - let hr = ((*self.lpVtbl).UnregisterFrameProviderInfo)(self, manager as *const _ as *mut _, frameProviderInfo as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_email_folder_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailFolderId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn register_face_authentication_group(&mut self, manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { - let hr = ((*self.lpVtbl).RegisterFaceAuthenticationGroup)(self, manager as *const _ as *mut _, faceAuthenticationGroup as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn unregister_face_authentication_group(&mut self, manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { - let hr = ((*self.lpVtbl).UnregisterFaceAuthenticationGroup)(self, manager as *const _ as *mut _, faceAuthenticationGroup as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn report_failed_async(&mut self, status: super::EmailMailboxEmptyFolderStatus) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, status, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn register_control_group(&mut self, manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { - let hr = ((*self.lpVtbl).RegisterControlGroup)(self, manager as *const _ as *mut _, controlGroup as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IEmailMailboxMoveFolderRequest, 280635478, 19093, 16488, 145, 204, 103, 204, 122, 207, 69, 79); + RT_INTERFACE!{interface IEmailMailboxMoveFolderRequest(IEmailMailboxMoveFolderRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxMoveFolderRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EmailFolderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NewParentFolderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NewFolderName(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IEmailMailboxMoveFolderRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn unregister_control_group(&mut self, manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { - let hr = ((*self.lpVtbl).UnregisterControlGroup)(self, manager as *const _ as *mut _, controlGroup as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_email_folder_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailFolderId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn register_correlation_group(&mut self, manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { - let hr = ((*self.lpVtbl).RegisterCorrelationGroup)(self, manager as *const _ as *mut _, correlationGroup as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_new_parent_folder_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NewParentFolderId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn unregister_correlation_group(&mut self, manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { - let hr = ((*self.lpVtbl).UnregisterCorrelationGroup)(self, manager as *const _ as *mut _, correlationGroup as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_new_folder_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NewFolderName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn update_availability_for_provider(&mut self, provider: &IPerceptionFrameProvider, available: bool) -> Result<()> { - let hr = ((*self.lpVtbl).UpdateAvailabilityForProvider)(self, provider as *const _ as *mut _, available); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn publish_frame_for_provider(&mut self, provider: &IPerceptionFrameProvider, frame: &PerceptionFrame) -> Result<()> { - let hr = ((*self.lpVtbl).PublishFrameForProvider)(self, provider as *const _ as *mut _, frame as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PerceptionFrameProviderInfo: IPerceptionFrameProviderInfo} - RT_CLASS!{class PerceptionPropertyChangeRequest: IPerceptionPropertyChangeRequest} - RT_CLASS!{class PerceptionFaceAuthenticationGroup: IPerceptionFaceAuthenticationGroup [IPerceptionFaceAuthenticationGroupFactory] [CLSID_PerceptionFaceAuthenticationGroup]} - DEFINE_CLSID!(CLSID_PerceptionFaceAuthenticationGroup = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,70,97,99,101,65,117,116,104,101,110,116,105,99,97,116,105,111,110,71,114,111,117,112,0]); - RT_CLASS!{class PerceptionControlGroup: IPerceptionControlGroup [IPerceptionControlGroupFactory] [CLSID_PerceptionControlGroup]} - DEFINE_CLSID!(CLSID_PerceptionControlGroup = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,67,111,110,116,114,111,108,71,114,111,117,112,0]); - RT_CLASS!{class PerceptionCorrelationGroup: IPerceptionCorrelationGroup [IPerceptionCorrelationGroupFactory] [CLSID_PerceptionCorrelationGroup]} - DEFINE_CLSID!(CLSID_PerceptionCorrelationGroup = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,67,111,114,114,101,108,97,116,105,111,110,71,114,111,117,112,0]); - RT_CLASS!{class PerceptionFrame: IPerceptionFrame} - DEFINE_IID!(IID_IPerceptionFrameProviderInfo, 3433650664, 31102, 20099, 155, 135, 3, 106, 116, 20, 47, 196); - RT_INTERFACE!{interface IPerceptionFrameProviderInfo(IPerceptionFrameProviderInfoVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameProviderInfo] { - fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_Id(&mut self, value: HSTRING) -> HRESULT, - fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, - fn get_DeviceKind(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_DeviceKind(&mut self, value: HSTRING) -> HRESULT, - fn get_FrameKind(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_FrameKind(&mut self, value: HSTRING) -> HRESULT, - fn get_Hidden(&mut self, out: *mut bool) -> HRESULT, - fn put_Hidden(&mut self, value: bool) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxUpdateMeetingResponseRequest, 1536797843, 45775, 18568, 186, 79, 48, 107, 107, 102, 223, 48); + RT_INTERFACE!{interface IEmailMailboxUpdateMeetingResponseRequest(IEmailMailboxUpdateMeetingResponseRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxUpdateMeetingResponseRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EmailMessageId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Response(&mut self, out: *mut super::EmailMeetingResponseType) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Comment(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SendUpdate(&mut self, out: *mut bool) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IPerceptionFrameProviderInfo { - #[inline] pub unsafe fn get_id(&mut self) -> Result { + impl IEmailMailboxUpdateMeetingResponseRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_id(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_Id)(self, value.get()); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + #[inline] pub unsafe fn get_email_message_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + let hr = ((*self.lpVtbl).get_EmailMessageId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_response(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Response)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_kind(&mut self) -> Result { + #[inline] pub unsafe fn get_subject(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceKind)(self, &mut out); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_device_kind(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_DeviceKind)(self, value.get()); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_kind(&mut self) -> Result { + #[inline] pub unsafe fn get_comment(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameKind)(self, &mut out); + let hr = ((*self.lpVtbl).get_Comment)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_frame_kind(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_FrameKind)(self, value.get()); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hidden(&mut self) -> Result { + #[inline] pub unsafe fn get_send_update(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Hidden)(self, &mut out); + let hr = ((*self.lpVtbl).get_SendUpdate)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_hidden(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_Hidden)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionControlGroupFactory, 790295264, 47857, 17723, 190, 212, 205, 157, 70, 25, 21, 76); - RT_INTERFACE!{static interface IPerceptionControlGroupFactory(IPerceptionControlGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionControlGroupFactory] { - fn Create(&mut self, ids: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut PerceptionControlGroup) -> HRESULT - }} - impl IPerceptionControlGroupFactory { - #[inline] pub unsafe fn create(&mut self, ids: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, ids as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionControlGroup, 388778114, 12249, 19534, 186, 52, 253, 242, 10, 115, 221, 229); - RT_INTERFACE!{interface IPerceptionControlGroup(IPerceptionControlGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionControlGroup] { - fn get_FrameProviderIds(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxForwardMeetingRequest, 1634560753, 28884, 18482, 184, 105, 184, 5, 66, 174, 155, 232); + RT_INTERFACE!{interface IEmailMailboxForwardMeetingRequest(IEmailMailboxForwardMeetingRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxForwardMeetingRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EmailMessageId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Recipients(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ForwardHeaderType(&mut self, out: *mut super::EmailMessageBodyKind) -> HRESULT, + fn get_ForwardHeader(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Comment(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IPerceptionControlGroup { - #[inline] pub unsafe fn get_frame_provider_ids(&mut self) -> Result>> { + impl IEmailMailboxForwardMeetingRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameProviderIds)(self, &mut out); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_email_message_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailMessageId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_recipients(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Recipients)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_PerceptionStartFaceAuthenticationHandler, 1954639146, 8336, 18032, 140, 72, 239, 57, 231, 255, 124, 38); - RT_DELEGATE!{delegate PerceptionStartFaceAuthenticationHandler(PerceptionStartFaceAuthenticationHandlerVtbl, PerceptionStartFaceAuthenticationHandlerImpl) [IID_PerceptionStartFaceAuthenticationHandler] { - fn Invoke(&mut self, sender: *mut PerceptionFaceAuthenticationGroup, out: *mut bool) -> HRESULT - }} - impl PerceptionStartFaceAuthenticationHandler { - #[inline] pub unsafe fn invoke(&mut self, sender: &PerceptionFaceAuthenticationGroup) -> Result { + #[inline] pub unsafe fn get_subject(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_forward_header_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_ForwardHeaderType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_PerceptionStopFaceAuthenticationHandler, 947840682, 35277, 18462, 170, 222, 221, 146, 247, 11, 42, 215); - RT_DELEGATE!{delegate PerceptionStopFaceAuthenticationHandler(PerceptionStopFaceAuthenticationHandlerVtbl, PerceptionStopFaceAuthenticationHandlerImpl) [IID_PerceptionStopFaceAuthenticationHandler] { - fn Invoke(&mut self, sender: *mut PerceptionFaceAuthenticationGroup) -> HRESULT - }} - impl PerceptionStopFaceAuthenticationHandler { - #[inline] pub unsafe fn invoke(&mut self, sender: &PerceptionFaceAuthenticationGroup) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_forward_header(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ForwardHeader)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionFaceAuthenticationGroupFactory, 3867805140, 46604, 16628, 188, 185, 242, 77, 70, 70, 115, 32); - RT_INTERFACE!{static interface IPerceptionFaceAuthenticationGroupFactory(IPerceptionFaceAuthenticationGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFaceAuthenticationGroupFactory] { - fn Create(&mut self, ids: *mut ::rt::gen::windows::foundation::collections::IIterable, startHandler: *mut PerceptionStartFaceAuthenticationHandler, stopHandler: *mut PerceptionStopFaceAuthenticationHandler, out: *mut *mut PerceptionFaceAuthenticationGroup) -> HRESULT - }} - impl IPerceptionFaceAuthenticationGroupFactory { - #[inline] pub unsafe fn create(&mut self, ids: &::rt::gen::windows::foundation::collections::IIterable, startHandler: &PerceptionStartFaceAuthenticationHandler, stopHandler: &PerceptionStopFaceAuthenticationHandler) -> Result> { + #[inline] pub unsafe fn get_comment(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, ids as *const _ as *mut _, startHandler as *const _ as *mut _, stopHandler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Comment)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionFaceAuthenticationGroup, 3892418580, 19089, 16816, 131, 166, 136, 26, 23, 117, 53, 62); - RT_INTERFACE!{interface IPerceptionFaceAuthenticationGroup(IPerceptionFaceAuthenticationGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFaceAuthenticationGroup] { - fn get_FrameProviderIds(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT - }} - impl IPerceptionFaceAuthenticationGroup { - #[inline] pub unsafe fn get_frame_provider_ids(&mut self) -> Result>> { + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameProviderIds)(self, &mut out); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionCorrelationFactory, 3567698981, 10372, 19087, 129, 52, 40, 53, 215, 40, 108, 191); - RT_INTERFACE!{static interface IPerceptionCorrelationFactory(IPerceptionCorrelationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionCorrelationFactory] { - fn Create(&mut self, targetId: HSTRING, position: ::rt::gen::windows::foundation::numerics::Vector3, orientation: ::rt::gen::windows::foundation::numerics::Quaternion, out: *mut *mut PerceptionCorrelation) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxProposeNewTimeForMeetingRequest, 1525674322, 38809, 20383, 163, 153, 255, 7, 243, 238, 240, 78); + RT_INTERFACE!{interface IEmailMailboxProposeNewTimeForMeetingRequest(IEmailMailboxProposeNewTimeForMeetingRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxProposeNewTimeForMeetingRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EmailMessageId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NewStartTime(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_NewDuration(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Comment(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IPerceptionCorrelationFactory { - #[inline] pub unsafe fn create(&mut self, targetId: &HStringArg, position: ::rt::gen::windows::foundation::numerics::Vector3, orientation: ::rt::gen::windows::foundation::numerics::Quaternion) -> Result> { + impl IEmailMailboxProposeNewTimeForMeetingRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, targetId.get(), position, orientation, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class PerceptionCorrelation: IPerceptionCorrelation [IPerceptionCorrelationFactory] [CLSID_PerceptionCorrelation]} - DEFINE_CLSID!(CLSID_PerceptionCorrelation = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,67,111,114,114,101,108,97,116,105,111,110,0]); - DEFINE_IID!(IID_IPerceptionCorrelation, 3021150850, 57333, 16455, 138, 25, 59, 77, 128, 95, 113, 118); - RT_INTERFACE!{interface IPerceptionCorrelation(IPerceptionCorrelationVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionCorrelation] { - fn get_TargetId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Position(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, - fn get_Orientation(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Quaternion) -> HRESULT - }} - impl IPerceptionCorrelation { - #[inline] pub unsafe fn get_target_id(&mut self) -> Result { + #[inline] pub unsafe fn get_email_message_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_TargetId)(self, &mut out); + let hr = ((*self.lpVtbl).get_EmailMessageId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_position(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + #[inline] pub unsafe fn get_new_start_time(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + let hr = ((*self.lpVtbl).get_NewStartTime)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_orientation(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Quaternion> { + #[inline] pub unsafe fn get_new_duration(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + let hr = ((*self.lpVtbl).get_NewDuration)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IPerceptionCorrelationGroupFactory, 2113806472, 25567, 18669, 131, 177, 74, 184, 41, 19, 41, 149); - RT_INTERFACE!{static interface IPerceptionCorrelationGroupFactory(IPerceptionCorrelationGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionCorrelationGroupFactory] { - fn Create(&mut self, relativeLocations: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut PerceptionCorrelationGroup) -> HRESULT - }} - impl IPerceptionCorrelationGroupFactory { - #[inline] pub unsafe fn create(&mut self, relativeLocations: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + #[inline] pub unsafe fn get_subject(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, relativeLocations as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_comment(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Comment)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionCorrelationGroup, 1965689094, 13991, 18363, 155, 121, 86, 204, 107, 116, 103, 112); - RT_INTERFACE!{interface IPerceptionCorrelationGroup(IPerceptionCorrelationGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionCorrelationGroup] { - fn get_RelativeLocations(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxSetAutoReplySettingsRequest, 1973691088, 43150, 20052, 141, 199, 194, 67, 24, 107, 119, 78); + RT_INTERFACE!{interface IEmailMailboxSetAutoReplySettingsRequest(IEmailMailboxSetAutoReplySettingsRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxSetAutoReplySettingsRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AutoReplySettings(&mut self, out: *mut *mut super::EmailMailboxAutoReplySettings) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IPerceptionCorrelationGroup { - #[inline] pub unsafe fn get_relative_locations(&mut self) -> Result>> { + impl IEmailMailboxSetAutoReplySettingsRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RelativeLocations)(self, &mut out); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_reply_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AutoReplySettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionFrame, 2097051685, 21691, 19869, 190, 197, 142, 246, 97, 81, 210, 172); - RT_INTERFACE!{interface IPerceptionFrame(IPerceptionFrameVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrame] { - fn get_RelativeTime(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn put_RelativeTime(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::ValueSet) -> HRESULT, - fn get_FrameData(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IMemoryBuffer) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxGetAutoReplySettingsRequest, 2604140425, 7816, 19969, 132, 204, 19, 134, 173, 154, 44, 47); + RT_INTERFACE!{interface IEmailMailboxGetAutoReplySettingsRequest(IEmailMailboxGetAutoReplySettingsRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxGetAutoReplySettingsRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RequestedFormat(&mut self, out: *mut super::EmailMailboxAutoReplyMessageResponseKind) -> HRESULT, + fn ReportCompletedAsync(&mut self, autoReplySettings: *mut super::EmailMailboxAutoReplySettings, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IPerceptionFrame { - #[inline] pub unsafe fn get_relative_time(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + impl IEmailMailboxGetAutoReplySettingsRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_requested_format(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RelativeTime)(self, &mut out); + let hr = ((*self.lpVtbl).get_RequestedFormat)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_relative_time(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { - let hr = ((*self.lpVtbl).put_RelativeTime)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn report_completed_async(&mut self, autoReplySettings: &super::EmailMailboxAutoReplySettings) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, autoReplySettings as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_frame_data(&mut self) -> Result> { + } + DEFINE_IID!(IID_IEmailMailboxResolveRecipientsRequest, 4020555632, 31545, 19611, 129, 30, 65, 234, 244, 58, 51, 45); + RT_INTERFACE!{interface IEmailMailboxResolveRecipientsRequest(IEmailMailboxResolveRecipientsRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxResolveRecipientsRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Recipients(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn ReportCompletedAsync(&mut self, resolutionResults: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IEmailMailboxResolveRecipientsRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameData)(self, &mut out); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_recipients(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Recipients)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed_async(&mut self, resolutionResults: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, resolutionResults as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionVideoFrameAllocatorFactory, 442020065, 59674, 18462, 184, 118, 168, 158, 43, 188, 107, 51); - RT_INTERFACE!{static interface IPerceptionVideoFrameAllocatorFactory(IPerceptionVideoFrameAllocatorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionVideoFrameAllocatorFactory] { - #[cfg(feature="windows.graphics")] fn Create(&mut self, maxOutstandingFrameCountForWrite: u32, format: ::rt::gen::windows::graphics::imaging::BitmapPixelFormat, resolution: ::rt::gen::windows::foundation::Size, alpha: ::rt::gen::windows::graphics::imaging::BitmapAlphaMode, out: *mut *mut PerceptionVideoFrameAllocator) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxValidateCertificatesRequest, 2840410417, 57626, 20375, 184, 26, 24, 122, 112, 168, 244, 26); + RT_INTERFACE!{interface IEmailMailboxValidateCertificatesRequest(IEmailMailboxValidateCertificatesRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxValidateCertificatesRequest] { + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_Certificates(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::security::cryptography::certificates::Certificate>) -> HRESULT, + fn ReportCompletedAsync(&mut self, validationStatuses: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IPerceptionVideoFrameAllocatorFactory { - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn create(&mut self, maxOutstandingFrameCountForWrite: u32, format: ::rt::gen::windows::graphics::imaging::BitmapPixelFormat, resolution: ::rt::gen::windows::foundation::Size, alpha: ::rt::gen::windows::graphics::imaging::BitmapAlphaMode) -> Result> { + impl IEmailMailboxValidateCertificatesRequest { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, maxOutstandingFrameCountForWrite, format, resolution, alpha, &mut out); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_certificates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Certificates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed_async(&mut self, validationStatuses: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, validationStatuses as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_failed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PerceptionVideoFrameAllocator: IPerceptionVideoFrameAllocator [IPerceptionVideoFrameAllocatorFactory] [CLSID_PerceptionVideoFrameAllocator]} - DEFINE_CLSID!(CLSID_PerceptionVideoFrameAllocator = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,86,105,100,101,111,70,114,97,109,101,65,108,108,111,99,97,116,111,114,0]); - DEFINE_IID!(IID_IPerceptionPropertyChangeRequest, 1012591441, 13579, 19960, 148, 20, 89, 224, 152, 21, 81, 11); - RT_INTERFACE!{interface IPerceptionPropertyChangeRequest(IPerceptionPropertyChangeRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionPropertyChangeRequest] { - fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Value(&mut self, out: *mut *mut IInspectable) -> HRESULT, - fn get_Status(&mut self, out: *mut super::PerceptionFrameSourcePropertyChangeStatus) -> HRESULT, - fn put_Status(&mut self, value: super::PerceptionFrameSourcePropertyChangeStatus) -> HRESULT, - fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + DEFINE_IID!(IID_IEmailMailboxServerSearchReadBatchRequest, 151972831, 23190, 16851, 138, 216, 52, 145, 47, 154, 166, 14); + RT_INTERFACE!{interface IEmailMailboxServerSearchReadBatchRequest(IEmailMailboxServerSearchReadBatchRequestVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxServerSearchReadBatchRequest] { + fn get_SessionId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EmailMailboxId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EmailFolderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Options(&mut self, out: *mut *mut super::EmailQueryOptions) -> HRESULT, + fn get_SuggestedBatchSize(&mut self, out: *mut u32) -> HRESULT, + fn SaveMessageAsync(&mut self, message: *mut super::EmailMessage, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportCompletedAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&mut self, batchStatus: super::EmailBatchStatus, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IPerceptionPropertyChangeRequest { - #[inline] pub unsafe fn get_name(&mut self) -> Result { + impl IEmailMailboxServerSearchReadBatchRequest { + #[inline] pub unsafe fn get_session_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + let hr = ((*self.lpVtbl).get_SessionId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_value(&mut self) -> Result> { + #[inline] pub unsafe fn get_email_mailbox_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + let hr = ((*self.lpVtbl).get_EmailMailboxId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_email_folder_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailFolderId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_options(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Options)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result { + #[inline] pub unsafe fn get_suggested_batch_size(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_SuggestedBatchSize)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_status(&mut self, value: super::PerceptionFrameSourcePropertyChangeStatus) -> Result<()> { - let hr = ((*self.lpVtbl).put_Status)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn save_message_async(&mut self, message: &super::EmailMessage) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveMessageAsync)(self, message as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportCompletedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_failed_async(&mut self, batchStatus: super::EmailBatchStatus) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailedAsync)(self, batchStatus, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailDataProviderTriggerDetails: IEmailDataProviderTriggerDetails} + DEFINE_IID!(IID_IEmailMailboxSyncManagerSyncRequestEventArgs, 1134166810, 36812, 19173, 185, 181, 212, 52, 224, 166, 90, 168); + RT_INTERFACE!{interface IEmailMailboxSyncManagerSyncRequestEventArgs(IEmailMailboxSyncManagerSyncRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxSyncManagerSyncRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxSyncManagerSyncRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl IEmailMailboxSyncManagerSyncRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); @@ -12720,9512 +16918,29050 @@ use ::prelude::*; if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_ACTIVATABLE!{IPerceptionFrameProviderManagerServiceStatics [CLSID_PerceptionFrameProviderManagerService]} - DEFINE_CLSID!(CLSID_PerceptionFrameProviderManagerService = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,70,114,97,109,101,80,114,111,118,105,100,101,114,77,97,110,97,103,101,114,83,101,114,118,105,99,101,0]); - RT_ACTIVATABLE!{IKnownPerceptionFrameKindStatics [CLSID_KnownPerceptionFrameKind]} - DEFINE_CLSID!(CLSID_KnownPerceptionFrameKind = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,70,114,97,109,101,75,105,110,100,0]); - DEFINE_IID!(IID_IPerceptionFrameProviderManager, 2841234951, 60115, 13279, 142, 193, 185, 36, 171, 224, 25, 196); - RT_INTERFACE!{interface IPerceptionFrameProviderManager(IPerceptionFrameProviderManagerVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameProviderManager] { - fn GetFrameProvider(&mut self, frameProviderInfo: *mut PerceptionFrameProviderInfo, out: *mut *mut IPerceptionFrameProvider) -> HRESULT + RT_CLASS!{class EmailMailboxSyncManagerSyncRequest: IEmailMailboxSyncManagerSyncRequest} + DEFINE_IID!(IID_IEmailMailboxDownloadMessageRequestEventArgs, 1191446957, 53408, 19035, 187, 42, 55, 98, 16, 57, 197, 62); + RT_INTERFACE!{interface IEmailMailboxDownloadMessageRequestEventArgs(IEmailMailboxDownloadMessageRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxDownloadMessageRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxDownloadMessageRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - impl IPerceptionFrameProviderManager { - #[inline] pub unsafe fn get_frame_provider(&mut self, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result> { + impl IEmailMailboxDownloadMessageRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetFrameProvider)(self, frameProviderInfo as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionFrameProvider, 2035251897, 45949, 15155, 161, 13, 48, 98, 100, 25, 206, 101); - RT_INTERFACE!{interface IPerceptionFrameProvider(IPerceptionFrameProviderVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameProvider] { - fn get_FrameProviderInfo(&mut self, out: *mut *mut PerceptionFrameProviderInfo) -> HRESULT, - fn get_Available(&mut self, out: *mut bool) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IPropertySet) -> HRESULT, - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT, - fn SetProperty(&mut self, value: *mut PerceptionPropertyChangeRequest) -> HRESULT + RT_CLASS!{class EmailMailboxDownloadMessageRequest: IEmailMailboxDownloadMessageRequest} + DEFINE_IID!(IID_IEmailMailboxDownloadAttachmentRequestEventArgs, 3437085805, 65448, 18551, 159, 157, 254, 215, 188, 175, 65, 4); + RT_INTERFACE!{interface IEmailMailboxDownloadAttachmentRequestEventArgs(IEmailMailboxDownloadAttachmentRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxDownloadAttachmentRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxDownloadAttachmentRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - impl IPerceptionFrameProvider { - #[inline] pub unsafe fn get_frame_provider_info(&mut self) -> Result> { + impl IEmailMailboxDownloadAttachmentRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FrameProviderInfo)(self, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_available(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Available)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + } + RT_CLASS!{class EmailMailboxDownloadAttachmentRequest: IEmailMailboxDownloadAttachmentRequest} + DEFINE_IID!(IID_IEmailMailboxCreateFolderRequestEventArgs, 65323052, 9244, 20137, 166, 143, 255, 32, 188, 90, 252, 133); + RT_INTERFACE!{interface IEmailMailboxCreateFolderRequestEventArgs(IEmailMailboxCreateFolderRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxCreateFolderRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxCreateFolderRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl IEmailMailboxCreateFolderRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + } + RT_CLASS!{class EmailMailboxCreateFolderRequest: IEmailMailboxCreateFolderRequest} + DEFINE_IID!(IID_IEmailMailboxDeleteFolderRequestEventArgs, 3033738502, 9010, 18040, 131, 120, 40, 181, 121, 51, 104, 70); + RT_INTERFACE!{interface IEmailMailboxDeleteFolderRequestEventArgs(IEmailMailboxDeleteFolderRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxDeleteFolderRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxDeleteFolderRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl IEmailMailboxDeleteFolderRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_property(&mut self, value: &PerceptionPropertyChangeRequest) -> Result<()> { - let hr = ((*self.lpVtbl).SetProperty)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPerceptionVideoFrameAllocator, 1278781402, 64984, 20180, 160, 57, 42, 111, 155, 35, 80, 56); - RT_INTERFACE!{interface IPerceptionVideoFrameAllocator(IPerceptionVideoFrameAllocatorVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionVideoFrameAllocator] { - fn AllocateFrame(&mut self, out: *mut *mut PerceptionFrame) -> HRESULT, - #[cfg(feature="windows.media")] fn CopyFromVideoFrame(&mut self, frame: *mut ::rt::gen::windows::media::VideoFrame, out: *mut *mut PerceptionFrame) -> HRESULT + RT_CLASS!{class EmailMailboxDeleteFolderRequest: IEmailMailboxDeleteFolderRequest} + DEFINE_IID!(IID_IEmailMailboxEmptyFolderRequestEventArgs, 1904473220, 39002, 19136, 179, 63, 238, 14, 38, 39, 163, 192); + RT_INTERFACE!{interface IEmailMailboxEmptyFolderRequestEventArgs(IEmailMailboxEmptyFolderRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxEmptyFolderRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxEmptyFolderRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - impl IPerceptionVideoFrameAllocator { - #[inline] pub unsafe fn allocate_frame(&mut self) -> Result> { + impl IEmailMailboxEmptyFolderRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).AllocateFrame)(self, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.media")] #[inline] pub unsafe fn copy_from_video_frame(&mut self, frame: &::rt::gen::windows::media::VideoFrame) -> Result> { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CopyFromVideoFrame)(self, frame as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } -} // Windows.Devices.Perception.Provider -} // Windows.Devices.Perception -pub mod pointofservice { // Windows.Devices.PointOfService -use ::prelude::*; - RT_ENUM! { enum UnifiedPosErrorSeverity: i32 { - UnknownErrorSeverity (UnifiedPosErrorSeverity_UnknownErrorSeverity) = 0, Warning (UnifiedPosErrorSeverity_Warning) = 1, Recoverable (UnifiedPosErrorSeverity_Recoverable) = 2, Unrecoverable (UnifiedPosErrorSeverity_Unrecoverable) = 3, AssistanceRequired (UnifiedPosErrorSeverity_AssistanceRequired) = 4, Fatal (UnifiedPosErrorSeverity_Fatal) = 5, - }} - RT_ENUM! { enum UnifiedPosPowerReportingType: i32 { - UnknownPowerReportingType (UnifiedPosPowerReportingType_UnknownPowerReportingType) = 0, Standard (UnifiedPosPowerReportingType_Standard) = 1, Advanced (UnifiedPosPowerReportingType_Advanced) = 2, - }} - RT_ENUM! { enum UnifiedPosHealthCheckLevel: i32 { - UnknownHealthCheckLevel (UnifiedPosHealthCheckLevel_UnknownHealthCheckLevel) = 0, POSInternal (UnifiedPosHealthCheckLevel_POSInternal) = 1, External (UnifiedPosHealthCheckLevel_External) = 2, Interactive (UnifiedPosHealthCheckLevel_Interactive) = 3, - }} - RT_ENUM! { enum UnifiedPosErrorReason: i32 { - UnknownErrorReason (UnifiedPosErrorReason_UnknownErrorReason) = 0, NoService (UnifiedPosErrorReason_NoService) = 1, Disabled (UnifiedPosErrorReason_Disabled) = 2, Illegal (UnifiedPosErrorReason_Illegal) = 3, NoHardware (UnifiedPosErrorReason_NoHardware) = 4, Closed (UnifiedPosErrorReason_Closed) = 5, Offline (UnifiedPosErrorReason_Offline) = 6, Failure (UnifiedPosErrorReason_Failure) = 7, Timeout (UnifiedPosErrorReason_Timeout) = 8, Busy (UnifiedPosErrorReason_Busy) = 9, Extended (UnifiedPosErrorReason_Extended) = 10, - }} - RT_ENUM! { enum MagneticStripeReaderAuthenticationLevel: i32 { - NotSupported (MagneticStripeReaderAuthenticationLevel_NotSupported) = 0, Optional (MagneticStripeReaderAuthenticationLevel_Optional) = 1, Required (MagneticStripeReaderAuthenticationLevel_Required) = 2, + RT_CLASS!{class EmailMailboxEmptyFolderRequest: IEmailMailboxEmptyFolderRequest} + DEFINE_IID!(IID_IEmailMailboxMoveFolderRequestEventArgs, 945958944, 5306, 19592, 134, 152, 114, 57, 227, 200, 170, 167); + RT_INTERFACE!{interface IEmailMailboxMoveFolderRequestEventArgs(IEmailMailboxMoveFolderRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxMoveFolderRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxMoveFolderRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - RT_ENUM! { enum PosPrinterMapMode: i32 { - Dots (PosPrinterMapMode_Dots) = 0, Twips (PosPrinterMapMode_Twips) = 1, English (PosPrinterMapMode_English) = 2, Metric (PosPrinterMapMode_Metric) = 3, + impl IEmailMailboxMoveFolderRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxMoveFolderRequest: IEmailMailboxMoveFolderRequest} + DEFINE_IID!(IID_IEmailMailboxUpdateMeetingResponseRequestEventArgs, 1754847073, 22217, 20247, 190, 49, 102, 253, 169, 75, 161, 89); + RT_INTERFACE!{interface IEmailMailboxUpdateMeetingResponseRequestEventArgs(IEmailMailboxUpdateMeetingResponseRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxUpdateMeetingResponseRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxUpdateMeetingResponseRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - RT_ENUM! { enum PosPrinterCartridgeSensors: u32 { - None (PosPrinterCartridgeSensors_None) = 0, Removed (PosPrinterCartridgeSensors_Removed) = 1, Empty (PosPrinterCartridgeSensors_Empty) = 2, HeadCleaning (PosPrinterCartridgeSensors_HeadCleaning) = 4, NearEnd (PosPrinterCartridgeSensors_NearEnd) = 8, + impl IEmailMailboxUpdateMeetingResponseRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxUpdateMeetingResponseRequest: IEmailMailboxUpdateMeetingResponseRequest} + DEFINE_IID!(IID_IEmailMailboxForwardMeetingRequestEventArgs, 735638330, 10612, 18265, 165, 165, 88, 244, 77, 60, 2, 117); + RT_INTERFACE!{interface IEmailMailboxForwardMeetingRequestEventArgs(IEmailMailboxForwardMeetingRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxForwardMeetingRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxForwardMeetingRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - RT_ENUM! { enum PosPrinterColorCapabilities: u32 { - None (PosPrinterColorCapabilities_None) = 0, Primary (PosPrinterColorCapabilities_Primary) = 1, Custom1 (PosPrinterColorCapabilities_Custom1) = 2, Custom2 (PosPrinterColorCapabilities_Custom2) = 4, Custom3 (PosPrinterColorCapabilities_Custom3) = 8, Custom4 (PosPrinterColorCapabilities_Custom4) = 16, Custom5 (PosPrinterColorCapabilities_Custom5) = 32, Custom6 (PosPrinterColorCapabilities_Custom6) = 64, Cyan (PosPrinterColorCapabilities_Cyan) = 128, Magenta (PosPrinterColorCapabilities_Magenta) = 256, Yellow (PosPrinterColorCapabilities_Yellow) = 512, Full (PosPrinterColorCapabilities_Full) = 1024, + impl IEmailMailboxForwardMeetingRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxForwardMeetingRequest: IEmailMailboxForwardMeetingRequest} + DEFINE_IID!(IID_IEmailMailboxProposeNewTimeForMeetingRequestEventArgs, 4215802776, 13229, 19047, 130, 81, 15, 156, 36, 155, 106, 32); + RT_INTERFACE!{interface IEmailMailboxProposeNewTimeForMeetingRequestEventArgs(IEmailMailboxProposeNewTimeForMeetingRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxProposeNewTimeForMeetingRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxProposeNewTimeForMeetingRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - RT_ENUM! { enum PosPrinterColorCartridge: i32 { - Unknown (PosPrinterColorCartridge_Unknown) = 0, Primary (PosPrinterColorCartridge_Primary) = 1, Custom1 (PosPrinterColorCartridge_Custom1) = 2, Custom2 (PosPrinterColorCartridge_Custom2) = 3, Custom3 (PosPrinterColorCartridge_Custom3) = 4, Custom4 (PosPrinterColorCartridge_Custom4) = 5, Custom5 (PosPrinterColorCartridge_Custom5) = 6, Custom6 (PosPrinterColorCartridge_Custom6) = 7, Cyan (PosPrinterColorCartridge_Cyan) = 8, Magenta (PosPrinterColorCartridge_Magenta) = 9, Yellow (PosPrinterColorCartridge_Yellow) = 10, + impl IEmailMailboxProposeNewTimeForMeetingRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxProposeNewTimeForMeetingRequest: IEmailMailboxProposeNewTimeForMeetingRequest} + DEFINE_IID!(IID_IEmailMailboxSetAutoReplySettingsRequestEventArgs, 165286317, 55242, 16519, 172, 134, 83, 250, 103, 247, 98, 70); + RT_INTERFACE!{interface IEmailMailboxSetAutoReplySettingsRequestEventArgs(IEmailMailboxSetAutoReplySettingsRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxSetAutoReplySettingsRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxSetAutoReplySettingsRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - RT_ENUM! { enum PosPrinterMarkFeedCapabilities: u32 { - None (PosPrinterMarkFeedCapabilities_None) = 0, ToTakeUp (PosPrinterMarkFeedCapabilities_ToTakeUp) = 1, ToCutter (PosPrinterMarkFeedCapabilities_ToCutter) = 2, ToCurrentTopOfForm (PosPrinterMarkFeedCapabilities_ToCurrentTopOfForm) = 4, ToNextTopOfForm (PosPrinterMarkFeedCapabilities_ToNextTopOfForm) = 8, + impl IEmailMailboxSetAutoReplySettingsRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxSetAutoReplySettingsRequest: IEmailMailboxSetAutoReplySettingsRequest} + DEFINE_IID!(IID_IEmailMailboxGetAutoReplySettingsRequestEventArgs, 3617543618, 64837, 16388, 138, 145, 155, 172, 243, 139, 112, 34); + RT_INTERFACE!{interface IEmailMailboxGetAutoReplySettingsRequestEventArgs(IEmailMailboxGetAutoReplySettingsRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxGetAutoReplySettingsRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxGetAutoReplySettingsRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - RT_ENUM! { enum PosPrinterRuledLineCapabilities: u32 { - None (PosPrinterRuledLineCapabilities_None) = 0, Horizontal (PosPrinterRuledLineCapabilities_Horizontal) = 1, Vertical (PosPrinterRuledLineCapabilities_Vertical) = 2, + impl IEmailMailboxGetAutoReplySettingsRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxGetAutoReplySettingsRequest: IEmailMailboxGetAutoReplySettingsRequest} + DEFINE_IID!(IID_IEmailMailboxResolveRecipientsRequestEventArgs, 638557698, 45775, 16632, 140, 40, 227, 237, 67, 177, 232, 154); + RT_INTERFACE!{interface IEmailMailboxResolveRecipientsRequestEventArgs(IEmailMailboxResolveRecipientsRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxResolveRecipientsRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxResolveRecipientsRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - RT_ENUM! { enum PosPrinterPrintSide: i32 { - Unknown (PosPrinterPrintSide_Unknown) = 0, Side1 (PosPrinterPrintSide_Side1) = 1, Side2 (PosPrinterPrintSide_Side2) = 2, + impl IEmailMailboxResolveRecipientsRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxResolveRecipientsRequest: IEmailMailboxResolveRecipientsRequest} + DEFINE_IID!(IID_IEmailMailboxValidateCertificatesRequestEventArgs, 629391127, 767, 18942, 167, 60, 3, 243, 117, 102, 198, 145); + RT_INTERFACE!{interface IEmailMailboxValidateCertificatesRequestEventArgs(IEmailMailboxValidateCertificatesRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxValidateCertificatesRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxValidateCertificatesRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - RT_ENUM! { enum PosPrinterLineDirection: i32 { - Horizontal (PosPrinterLineDirection_Horizontal) = 0, Vertical (PosPrinterLineDirection_Vertical) = 1, + impl IEmailMailboxValidateCertificatesRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxValidateCertificatesRequest: IEmailMailboxValidateCertificatesRequest} + DEFINE_IID!(IID_IEmailMailboxServerSearchReadBatchRequestEventArgs, 336599886, 60830, 17873, 173, 122, 204, 155, 127, 100, 58, 226); + RT_INTERFACE!{interface IEmailMailboxServerSearchReadBatchRequestEventArgs(IEmailMailboxServerSearchReadBatchRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxServerSearchReadBatchRequestEventArgs] { + fn get_Request(&mut self, out: *mut *mut EmailMailboxServerSearchReadBatchRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT }} - RT_ENUM! { enum PosPrinterLineStyle: i32 { - SingleSolid (PosPrinterLineStyle_SingleSolid) = 0, DoubleSolid (PosPrinterLineStyle_DoubleSolid) = 1, Broken (PosPrinterLineStyle_Broken) = 2, Chain (PosPrinterLineStyle_Chain) = 3, + impl IEmailMailboxServerSearchReadBatchRequestEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EmailMailboxServerSearchReadBatchRequest: IEmailMailboxServerSearchReadBatchRequest} +} // Windows.ApplicationModel.Email.DataProvider +} // Windows.ApplicationModel.Email +pub mod extendedexecution { // Windows.ApplicationModel.ExtendedExecution +use ::prelude::*; + RT_ENUM! { enum ExtendedExecutionReason: i32 { + Unspecified (ExtendedExecutionReason_Unspecified) = 0, LocationTracking (ExtendedExecutionReason_LocationTracking) = 1, SavingData (ExtendedExecutionReason_SavingData) = 2, }} - RT_ENUM! { enum PosPrinterMarkFeedKind: i32 { - ToTakeUp (PosPrinterMarkFeedKind_ToTakeUp) = 0, ToCutter (PosPrinterMarkFeedKind_ToCutter) = 1, ToCurrentTopOfForm (PosPrinterMarkFeedKind_ToCurrentTopOfForm) = 2, ToNextTopOfForm (PosPrinterMarkFeedKind_ToNextTopOfForm) = 3, + RT_ENUM! { enum ExtendedExecutionResult: i32 { + Allowed (ExtendedExecutionResult_Allowed) = 0, Denied (ExtendedExecutionResult_Denied) = 1, }} - RT_ENUM! { enum PosPrinterAlignment: i32 { - Left (PosPrinterAlignment_Left) = 0, Center (PosPrinterAlignment_Center) = 1, Right (PosPrinterAlignment_Right) = 2, + RT_ENUM! { enum ExtendedExecutionRevokedReason: i32 { + Resumed (ExtendedExecutionRevokedReason_Resumed) = 0, SystemPolicy (ExtendedExecutionRevokedReason_SystemPolicy) = 1, }} - RT_ENUM! { enum PosPrinterBarcodeTextPosition: i32 { - None (PosPrinterBarcodeTextPosition_None) = 0, Above (PosPrinterBarcodeTextPosition_Above) = 1, Below (PosPrinterBarcodeTextPosition_Below) = 2, + DEFINE_IID!(IID_IExtendedExecutionRevokedEventArgs, 3216809750, 25525, 19467, 170, 214, 130, 138, 245, 55, 62, 195); + RT_INTERFACE!{interface IExtendedExecutionRevokedEventArgs(IExtendedExecutionRevokedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IExtendedExecutionRevokedEventArgs] { + fn get_Reason(&mut self, out: *mut ExtendedExecutionRevokedReason) -> HRESULT }} - RT_ENUM! { enum PosPrinterRotation: i32 { - Normal (PosPrinterRotation_Normal) = 0, Right90 (PosPrinterRotation_Right90) = 1, Left90 (PosPrinterRotation_Left90) = 2, Rotate180 (PosPrinterRotation_Rotate180) = 3, + impl IExtendedExecutionRevokedEventArgs { + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class ExtendedExecutionRevokedEventArgs: IExtendedExecutionRevokedEventArgs} + RT_CLASS!{class ExtendedExecutionSession: IExtendedExecutionSession} + DEFINE_IID!(IID_IExtendedExecutionSession, 2945485357, 4491, 18673, 147, 8, 12, 79, 196, 30, 32, 15); + RT_INTERFACE!{interface IExtendedExecutionSession(IExtendedExecutionSessionVtbl): IInspectable(IInspectableVtbl) [IID_IExtendedExecutionSession] { + fn get_Reason(&mut self, out: *mut ExtendedExecutionReason) -> HRESULT, + fn put_Reason(&mut self, value: ExtendedExecutionReason) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT, + fn get_PercentProgress(&mut self, out: *mut u32) -> HRESULT, + fn put_PercentProgress(&mut self, value: u32) -> HRESULT, + fn add_Revoked(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Revoked(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn RequestExtensionAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - RT_ENUM! { enum PosPrinterStatusKind: i32 { - Online (PosPrinterStatusKind_Online) = 0, Off (PosPrinterStatusKind_Off) = 1, Offline (PosPrinterStatusKind_Offline) = 2, OffOrOffline (PosPrinterStatusKind_OffOrOffline) = 3, Extended (PosPrinterStatusKind_Extended) = 4, + impl IExtendedExecutionSession { + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_reason(&mut self, value: ExtendedExecutionReason) -> Result<()> { + let hr = ((*self.lpVtbl).put_Reason)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_percent_progress(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PercentProgress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_percent_progress(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_PercentProgress)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_revoked(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Revoked)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_revoked(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Revoked)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn request_extension_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestExtensionAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +pub mod foreground { // Windows.ApplicationModel.ExtendedExecution.Foreground +use ::prelude::*; + RT_ENUM! { enum ExtendedExecutionForegroundResult: i32 { + Allowed (ExtendedExecutionForegroundResult_Allowed) = 0, Denied (ExtendedExecutionForegroundResult_Denied) = 1, }} - RT_ENUM! { enum CashDrawerStatusKind: i32 { - Online (CashDrawerStatusKind_Online) = 0, Off (CashDrawerStatusKind_Off) = 1, Offline (CashDrawerStatusKind_Offline) = 2, OffOrOffline (CashDrawerStatusKind_OffOrOffline) = 3, Extended (CashDrawerStatusKind_Extended) = 4, + RT_ENUM! { enum ExtendedExecutionForegroundRevokedReason: i32 { + Resumed (ExtendedExecutionForegroundRevokedReason_Resumed) = 0, SystemPolicy (ExtendedExecutionForegroundRevokedReason_SystemPolicy) = 1, }} - RT_ENUM! { enum BarcodeScannerStatus: i32 { - Online (BarcodeScannerStatus_Online) = 0, Off (BarcodeScannerStatus_Off) = 1, Offline (BarcodeScannerStatus_Offline) = 2, OffOrOffline (BarcodeScannerStatus_OffOrOffline) = 3, Extended (BarcodeScannerStatus_Extended) = 4, + RT_ENUM! { enum ExtendedExecutionForegroundReason: i32 { + Unspecified (ExtendedExecutionForegroundReason_Unspecified) = 0, SavingData (ExtendedExecutionForegroundReason_SavingData) = 1, BackgroundAudio (ExtendedExecutionForegroundReason_BackgroundAudio) = 2, Unconstrained (ExtendedExecutionForegroundReason_Unconstrained) = 3, }} - DEFINE_IID!(IID_IUnifiedPosErrorData, 731483194, 21852, 18569, 142, 216, 197, 153, 187, 58, 113, 42); - RT_INTERFACE!{interface IUnifiedPosErrorData(IUnifiedPosErrorDataVtbl): IInspectable(IInspectableVtbl) [IID_IUnifiedPosErrorData] { - fn get_Message(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Severity(&mut self, out: *mut UnifiedPosErrorSeverity) -> HRESULT, - fn get_Reason(&mut self, out: *mut UnifiedPosErrorReason) -> HRESULT, - fn get_ExtendedReason(&mut self, out: *mut u32) -> HRESULT + DEFINE_IID!(IID_IExtendedExecutionForegroundRevokedEventArgs, 2960972096, 38231, 44708, 44, 153, 189, 213, 109, 155, 228, 97); + RT_INTERFACE!{interface IExtendedExecutionForegroundRevokedEventArgs(IExtendedExecutionForegroundRevokedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IExtendedExecutionForegroundRevokedEventArgs] { + fn get_Reason(&mut self, out: *mut ExtendedExecutionForegroundRevokedReason) -> HRESULT }} - impl IUnifiedPosErrorData { - #[inline] pub unsafe fn get_message(&mut self) -> Result { + impl IExtendedExecutionForegroundRevokedEventArgs { + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class ExtendedExecutionForegroundRevokedEventArgs: IExtendedExecutionForegroundRevokedEventArgs} + RT_CLASS!{class ExtendedExecutionForegroundSession: IExtendedExecutionForegroundSession} + DEFINE_IID!(IID_IExtendedExecutionForegroundSession, 4227088609, 40208, 16897, 176, 30, 200, 50, 117, 41, 111, 46); + RT_INTERFACE!{interface IExtendedExecutionForegroundSession(IExtendedExecutionForegroundSessionVtbl): IInspectable(IInspectableVtbl) [IID_IExtendedExecutionForegroundSession] { + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT, + fn add_Revoked(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Revoked(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn RequestExtensionAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn get_Reason(&mut self, out: *mut ExtendedExecutionForegroundReason) -> HRESULT, + fn put_Reason(&mut self, value: ExtendedExecutionForegroundReason) -> HRESULT + }} + impl IExtendedExecutionForegroundSession { + #[inline] pub unsafe fn get_description(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_severity(&mut self) -> Result { + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_revoked(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Severity)(self, &mut out); + let hr = ((*self.lpVtbl).add_Revoked)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_reason(&mut self) -> Result { + #[inline] pub unsafe fn remove_revoked(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Revoked)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn request_extension_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestExtensionAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_reason(&mut self) -> Result { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_extended_reason(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ExtendedReason)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_reason(&mut self, value: ExtendedExecutionForegroundReason) -> Result<()> { + let hr = ((*self.lpVtbl).put_Reason)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class UnifiedPosErrorData: IUnifiedPosErrorData} - DEFINE_IID!(IID_IBarcodeScannerStatusUpdatedEventArgs, 895321478, 40003, 17963, 169, 26, 129, 109, 201, 127, 69, 44); - RT_INTERFACE!{interface IBarcodeScannerStatusUpdatedEventArgs(IBarcodeScannerStatusUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerStatusUpdatedEventArgs] { - fn get_Status(&mut self, out: *mut BarcodeScannerStatus) -> HRESULT, - fn get_ExtendedStatus(&mut self, out: *mut u32) -> HRESULT +} // Windows.ApplicationModel.ExtendedExecution.Foreground +} // Windows.ApplicationModel.ExtendedExecution +pub mod userdataaccounts { // Windows.ApplicationModel.UserDataAccounts +use ::prelude::*; + RT_ENUM! { enum UserDataAccountOtherAppReadAccess: i32 { + SystemOnly (UserDataAccountOtherAppReadAccess_SystemOnly) = 0, Full (UserDataAccountOtherAppReadAccess_Full) = 1, None (UserDataAccountOtherAppReadAccess_None) = 2, }} - impl IBarcodeScannerStatusUpdatedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result { + RT_ENUM! { enum UserDataAccountStoreAccessType: i32 { + AllAccountsReadOnly (UserDataAccountStoreAccessType_AllAccountsReadOnly) = 0, AppAccountsReadWrite (UserDataAccountStoreAccessType_AppAccountsReadWrite) = 1, + }} + RT_ENUM! { enum UserDataAccountContentKinds: u32 { + Email (UserDataAccountContentKinds_Email) = 1, Contact (UserDataAccountContentKinds_Contact) = 2, Appointment (UserDataAccountContentKinds_Appointment) = 4, + }} + DEFINE_IID!(IID_IUserDataAccount, 3116643966, 45896, 18704, 190, 148, 74, 212, 187, 166, 222, 167); + RT_INTERFACE!{interface IUserDataAccount(IUserDataAccountVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccount] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UserDisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_UserDisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_OtherAppReadAccess(&mut self, out: *mut UserDataAccountOtherAppReadAccess) -> HRESULT, + fn put_OtherAppReadAccess(&mut self, value: UserDataAccountOtherAppReadAccess) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Icon(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_DeviceAccountTypeId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn SaveAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn FindAppointmentCalendarsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindEmailMailboxesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindContactListsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindContactAnnotationListsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IUserDataAccount { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserDisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_user_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_UserDisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_other_app_read_access(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_OtherAppReadAccess)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_extended_status(&mut self) -> Result { + #[inline] pub unsafe fn set_other_app_read_access(&mut self, value: UserDataAccountOtherAppReadAccess) -> Result<()> { + let hr = ((*self.lpVtbl).put_OtherAppReadAccess)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_icon(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Icon)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_account_type_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceAccountTypeId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_package_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn save_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_appointment_calendars_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAppointmentCalendarsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_email_mailboxes_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindEmailMailboxesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_contact_lists_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindContactListsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_contact_annotation_lists_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindContactAnnotationListsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserDataAccount2, 126671007, 56962, 16459, 129, 149, 200, 163, 172, 25, 143, 96); + RT_INTERFACE!{interface IUserDataAccount2(IUserDataAccount2Vtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccount2] { + fn get_EnterpriseId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsProtectedUnderLock(&mut self, out: *mut bool) -> HRESULT + }} + impl IUserDataAccount2 { + #[inline] pub unsafe fn get_enterprise_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EnterpriseId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_protected_under_lock(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ExtendedStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsProtectedUnderLock)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class BarcodeScannerStatusUpdatedEventArgs: IBarcodeScannerStatusUpdatedEventArgs} - DEFINE_IID!(IID_IBarcodeSymbologiesStatics, 3397732795, 1746, 17396, 164, 75, 198, 32, 103, 159, 216, 208); - RT_INTERFACE!{static interface IBarcodeSymbologiesStatics(IBarcodeSymbologiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeSymbologiesStatics] { - fn get_Unknown(&mut self, out: *mut u32) -> HRESULT, - fn get_Ean8(&mut self, out: *mut u32) -> HRESULT, - fn get_Ean8Add2(&mut self, out: *mut u32) -> HRESULT, - fn get_Ean8Add5(&mut self, out: *mut u32) -> HRESULT, - fn get_Eanv(&mut self, out: *mut u32) -> HRESULT, - fn get_EanvAdd2(&mut self, out: *mut u32) -> HRESULT, - fn get_EanvAdd5(&mut self, out: *mut u32) -> HRESULT, - fn get_Ean13(&mut self, out: *mut u32) -> HRESULT, - fn get_Ean13Add2(&mut self, out: *mut u32) -> HRESULT, - fn get_Ean13Add5(&mut self, out: *mut u32) -> HRESULT, - fn get_Isbn(&mut self, out: *mut u32) -> HRESULT, - fn get_IsbnAdd5(&mut self, out: *mut u32) -> HRESULT, - fn get_Ismn(&mut self, out: *mut u32) -> HRESULT, - fn get_IsmnAdd2(&mut self, out: *mut u32) -> HRESULT, - fn get_IsmnAdd5(&mut self, out: *mut u32) -> HRESULT, - fn get_Issn(&mut self, out: *mut u32) -> HRESULT, - fn get_IssnAdd2(&mut self, out: *mut u32) -> HRESULT, - fn get_IssnAdd5(&mut self, out: *mut u32) -> HRESULT, - fn get_Ean99(&mut self, out: *mut u32) -> HRESULT, - fn get_Ean99Add2(&mut self, out: *mut u32) -> HRESULT, - fn get_Ean99Add5(&mut self, out: *mut u32) -> HRESULT, - fn get_Upca(&mut self, out: *mut u32) -> HRESULT, - fn get_UpcaAdd2(&mut self, out: *mut u32) -> HRESULT, - fn get_UpcaAdd5(&mut self, out: *mut u32) -> HRESULT, - fn get_Upce(&mut self, out: *mut u32) -> HRESULT, - fn get_UpceAdd2(&mut self, out: *mut u32) -> HRESULT, - fn get_UpceAdd5(&mut self, out: *mut u32) -> HRESULT, - fn get_UpcCoupon(&mut self, out: *mut u32) -> HRESULT, - fn get_TfStd(&mut self, out: *mut u32) -> HRESULT, - fn get_TfDis(&mut self, out: *mut u32) -> HRESULT, - fn get_TfInt(&mut self, out: *mut u32) -> HRESULT, - fn get_TfInd(&mut self, out: *mut u32) -> HRESULT, - fn get_TfMat(&mut self, out: *mut u32) -> HRESULT, - fn get_TfIata(&mut self, out: *mut u32) -> HRESULT, - fn get_Gs1DatabarType1(&mut self, out: *mut u32) -> HRESULT, - fn get_Gs1DatabarType2(&mut self, out: *mut u32) -> HRESULT, - fn get_Gs1DatabarType3(&mut self, out: *mut u32) -> HRESULT, - fn get_Code39(&mut self, out: *mut u32) -> HRESULT, - fn get_Code39Ex(&mut self, out: *mut u32) -> HRESULT, - fn get_Trioptic39(&mut self, out: *mut u32) -> HRESULT, - fn get_Code32(&mut self, out: *mut u32) -> HRESULT, - fn get_Pzn(&mut self, out: *mut u32) -> HRESULT, - fn get_Code93(&mut self, out: *mut u32) -> HRESULT, - fn get_Code93Ex(&mut self, out: *mut u32) -> HRESULT, - fn get_Code128(&mut self, out: *mut u32) -> HRESULT, - fn get_Gs1128(&mut self, out: *mut u32) -> HRESULT, - fn get_Gs1128Coupon(&mut self, out: *mut u32) -> HRESULT, - fn get_UccEan128(&mut self, out: *mut u32) -> HRESULT, - fn get_Sisac(&mut self, out: *mut u32) -> HRESULT, - fn get_Isbt(&mut self, out: *mut u32) -> HRESULT, - fn get_Codabar(&mut self, out: *mut u32) -> HRESULT, - fn get_Code11(&mut self, out: *mut u32) -> HRESULT, - fn get_Msi(&mut self, out: *mut u32) -> HRESULT, - fn get_Plessey(&mut self, out: *mut u32) -> HRESULT, - fn get_Telepen(&mut self, out: *mut u32) -> HRESULT, - fn get_Code16k(&mut self, out: *mut u32) -> HRESULT, - fn get_CodablockA(&mut self, out: *mut u32) -> HRESULT, - fn get_CodablockF(&mut self, out: *mut u32) -> HRESULT, - fn get_Codablock128(&mut self, out: *mut u32) -> HRESULT, - fn get_Code49(&mut self, out: *mut u32) -> HRESULT, - fn get_Aztec(&mut self, out: *mut u32) -> HRESULT, - fn get_DataCode(&mut self, out: *mut u32) -> HRESULT, - fn get_DataMatrix(&mut self, out: *mut u32) -> HRESULT, - fn get_HanXin(&mut self, out: *mut u32) -> HRESULT, - fn get_Maxicode(&mut self, out: *mut u32) -> HRESULT, - fn get_MicroPdf417(&mut self, out: *mut u32) -> HRESULT, - fn get_MicroQr(&mut self, out: *mut u32) -> HRESULT, - fn get_Pdf417(&mut self, out: *mut u32) -> HRESULT, - fn get_Qr(&mut self, out: *mut u32) -> HRESULT, - fn get_MsTag(&mut self, out: *mut u32) -> HRESULT, - fn get_Ccab(&mut self, out: *mut u32) -> HRESULT, - fn get_Ccc(&mut self, out: *mut u32) -> HRESULT, - fn get_Tlc39(&mut self, out: *mut u32) -> HRESULT, - fn get_AusPost(&mut self, out: *mut u32) -> HRESULT, - fn get_CanPost(&mut self, out: *mut u32) -> HRESULT, - fn get_ChinaPost(&mut self, out: *mut u32) -> HRESULT, - fn get_DutchKix(&mut self, out: *mut u32) -> HRESULT, - fn get_InfoMail(&mut self, out: *mut u32) -> HRESULT, - fn get_ItalianPost25(&mut self, out: *mut u32) -> HRESULT, - fn get_ItalianPost39(&mut self, out: *mut u32) -> HRESULT, - fn get_JapanPost(&mut self, out: *mut u32) -> HRESULT, - fn get_KoreanPost(&mut self, out: *mut u32) -> HRESULT, - fn get_SwedenPost(&mut self, out: *mut u32) -> HRESULT, - fn get_UkPost(&mut self, out: *mut u32) -> HRESULT, - fn get_UsIntelligent(&mut self, out: *mut u32) -> HRESULT, - fn get_UsIntelligentPkg(&mut self, out: *mut u32) -> HRESULT, - fn get_UsPlanet(&mut self, out: *mut u32) -> HRESULT, - fn get_UsPostNet(&mut self, out: *mut u32) -> HRESULT, - fn get_Us4StateFics(&mut self, out: *mut u32) -> HRESULT, - fn get_OcrA(&mut self, out: *mut u32) -> HRESULT, - fn get_OcrB(&mut self, out: *mut u32) -> HRESULT, - fn get_Micr(&mut self, out: *mut u32) -> HRESULT, - fn get_ExtendedBase(&mut self, out: *mut u32) -> HRESULT, - fn GetName(&mut self, scanDataType: u32, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IUserDataAccount3, 22231109, 27715, 17030, 157, 105, 62, 23, 9, 161, 242, 102); + RT_INTERFACE!{interface IUserDataAccount3(IUserDataAccount3Vtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccount3] { + fn get_ExplictReadAccessPackageFamilyNames(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT }} - impl IBarcodeSymbologiesStatics { - #[inline] pub unsafe fn get_unknown(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Unknown)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IUserDataAccount3 { + #[inline] pub unsafe fn get_explict_read_access_package_family_names(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExplictReadAccessPackageFamilyNames)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ean8(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ean8)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ean8_add2(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ean8Add2)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_ean8_add5(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ean8Add5)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IUserDataAccountStore, 544452781, 32010, 20086, 191, 69, 35, 104, 249, 120, 165, 154); + RT_INTERFACE!{interface IUserDataAccountStore(IUserDataAccountStoreVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountStore] { + fn FindAccountsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetAccountAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateAccountAsync(&mut self, userDisplayName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IUserDataAccountStore { + #[inline] pub unsafe fn find_accounts_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAccountsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_eanv(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Eanv)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_account_async(&mut self, id: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAccountAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_eanv_add2(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_EanvAdd2)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn create_account_async(&mut self, userDisplayName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAccountAsync)(self, userDisplayName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_eanv_add5(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_EanvAdd5)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class UserDataAccount: IUserDataAccount} + DEFINE_IID!(IID_IUserDataAccountStore2, 2984292087, 38240, 17969, 138, 240, 6, 29, 48, 22, 20, 105); + RT_INTERFACE!{interface IUserDataAccountStore2(IUserDataAccountStore2Vtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountStore2] { + fn CreateAccountWithPackageRelativeAppIdAsync(&mut self, userDisplayName: HSTRING, packageRelativeAppId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_StoreChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StoreChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IUserDataAccountStore2 { + #[inline] pub unsafe fn create_account_with_package_relative_app_id_async(&mut self, userDisplayName: &HStringArg, packageRelativeAppId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAccountWithPackageRelativeAppIdAsync)(self, userDisplayName.get(), packageRelativeAppId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ean13(&mut self) -> Result { + #[inline] pub unsafe fn add_store_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ean13)(self, &mut out); + let hr = ((*self.lpVtbl).add_StoreChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ean13_add2(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ean13Add2)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_store_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StoreChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_ean13_add5(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ean13Add5)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class UserDataAccountStore: IUserDataAccountStore} + RT_CLASS!{class UserDataAccountStoreChangedEventArgs: IUserDataAccountStoreChangedEventArgs} + DEFINE_IID!(IID_IUserDataAccountManagerStatics, 228297194, 6440, 18976, 134, 213, 60, 115, 127, 125, 195, 176); + RT_INTERFACE!{static interface IUserDataAccountManagerStatics(IUserDataAccountManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountManagerStatics] { + fn RequestStoreAsync(&mut self, storeAccessType: UserDataAccountStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowAddAccountAsync(&mut self, contentKinds: UserDataAccountContentKinds, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowAccountSettingsAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowAccountErrorResolverAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IUserDataAccountManagerStatics { + #[inline] pub unsafe fn request_store_async(&mut self, storeAccessType: UserDataAccountStoreAccessType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, storeAccessType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_isbn(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Isbn)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn show_add_account_async(&mut self, contentKinds: UserDataAccountContentKinds) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAddAccountAsync)(self, contentKinds, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_isbn_add5(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsbnAdd5)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn show_account_settings_async(&mut self, id: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAccountSettingsAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ismn(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ismn)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn show_account_error_resolver_async(&mut self, id: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAccountErrorResolverAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ismn_add2(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsmnAdd2)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IUserDataAccountManagerStatics2, 1782443400, 12651, 17246, 181, 52, 247, 212, 180, 183, 219, 166); + RT_INTERFACE!{static interface IUserDataAccountManagerStatics2(IUserDataAccountManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountManagerStatics2] { + #[cfg(feature="windows.system")] fn GetForUser(&mut self, user: *mut super::super::system::User, out: *mut *mut UserDataAccountManagerForUser) -> HRESULT + }} + impl IUserDataAccountManagerStatics2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user(&mut self, user: &super::super::system::User) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForUser)(self, user as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ismn_add5(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsmnAdd5)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class UserDataAccountManagerForUser: IUserDataAccountManagerForUser} + DEFINE_IID!(IID_IUserDataAccountManagerForUser, 1453779163, 56207, 16811, 166, 95, 140, 89, 113, 170, 201, 130); + RT_INTERFACE!{interface IUserDataAccountManagerForUser(IUserDataAccountManagerForUserVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountManagerForUser] { + fn RequestStoreAsync(&mut self, storeAccessType: UserDataAccountStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT + }} + impl IUserDataAccountManagerForUser { + #[inline] pub unsafe fn request_store_async(&mut self, storeAccessType: UserDataAccountStoreAccessType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, storeAccessType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_issn(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Issn)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_issn_add2(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IssnAdd2)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IUserDataAccountStoreChangedEventArgs, 2229527269, 34848, 17682, 177, 246, 46, 3, 91, 225, 7, 44); + RT_INTERFACE!{interface IUserDataAccountStoreChangedEventArgs(IUserDataAccountStoreChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountStoreChangedEventArgs] { + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IUserDataAccountStoreChangedEventArgs { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_issn_add5(&mut self) -> Result { + } + RT_ACTIVATABLE!{IUserDataAccountManagerStatics2 [CLSID_UserDataAccountManager]} + RT_ACTIVATABLE!{IUserDataAccountManagerStatics [CLSID_UserDataAccountManager]} + DEFINE_CLSID!(CLSID_UserDataAccountManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,85,115,101,114,68,97,116,97,65,99,99,111,117,110,116,115,46,85,115,101,114,68,97,116,97,65,99,99,111,117,110,116,77,97,110,97,103,101,114,0]); +pub mod provider { // Windows.ApplicationModel.UserDataAccounts.Provider +use ::prelude::*; + RT_ENUM! { enum UserDataAccountProviderOperationKind: i32 { + AddAccount (UserDataAccountProviderOperationKind_AddAccount) = 0, Settings (UserDataAccountProviderOperationKind_Settings) = 1, ResolveErrors (UserDataAccountProviderOperationKind_ResolveErrors) = 2, + }} + RT_ENUM! { enum UserDataAccountProviderPartnerAccountKind: i32 { + Exchange (UserDataAccountProviderPartnerAccountKind_Exchange) = 0, PopOrImap (UserDataAccountProviderPartnerAccountKind_PopOrImap) = 1, + }} + DEFINE_IID!(IID_IUserDataAccountProviderOperation, 2718608739, 34956, 19042, 163, 221, 52, 208, 122, 128, 43, 43); + RT_INTERFACE!{interface IUserDataAccountProviderOperation(IUserDataAccountProviderOperationVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountProviderOperation] { + fn get_Kind(&mut self, out: *mut UserDataAccountProviderOperationKind) -> HRESULT + }} + impl IUserDataAccountProviderOperation { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IssnAdd5)(self, &mut out); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ean99(&mut self) -> Result { + } + DEFINE_IID!(IID_IUserDataAccountProviderAddAccountOperation, 3116836144, 16260, 19293, 142, 170, 69, 233, 122, 168, 66, 237); + RT_INTERFACE!{interface IUserDataAccountProviderAddAccountOperation(IUserDataAccountProviderAddAccountOperationVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountProviderAddAccountOperation] { + fn get_ContentKinds(&mut self, out: *mut super::UserDataAccountContentKinds) -> HRESULT, + fn get_PartnerAccountInfos(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn ReportCompleted(&mut self, userDataAccountId: HSTRING) -> HRESULT + }} + impl IUserDataAccountProviderAddAccountOperation { + #[inline] pub unsafe fn get_content_kinds(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ean99)(self, &mut out); + let hr = ((*self.lpVtbl).get_ContentKinds)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ean99_add2(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ean99Add2)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_partner_account_infos(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PartnerAccountInfos)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ean99_add5(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ean99Add5)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn report_completed(&mut self, userDataAccountId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompleted)(self, userDataAccountId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_upca(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Upca)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class UserDataAccountPartnerAccountInfo: IUserDataAccountPartnerAccountInfo} + DEFINE_IID!(IID_IUserDataAccountPartnerAccountInfo, 1595932727, 63215, 20163, 134, 48, 1, 44, 89, 193, 20, 159); + RT_INTERFACE!{interface IUserDataAccountPartnerAccountInfo(IUserDataAccountPartnerAccountInfoVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountPartnerAccountInfo] { + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Priority(&mut self, out: *mut u32) -> HRESULT, + fn get_AccountKind(&mut self, out: *mut UserDataAccountProviderPartnerAccountKind) -> HRESULT + }} + impl IUserDataAccountPartnerAccountInfo { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_upca_add2(&mut self) -> Result { + #[inline] pub unsafe fn get_priority(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UpcaAdd2)(self, &mut out); + let hr = ((*self.lpVtbl).get_Priority)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_upca_add5(&mut self) -> Result { + #[inline] pub unsafe fn get_account_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UpcaAdd5)(self, &mut out); + let hr = ((*self.lpVtbl).get_AccountKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_upce(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Upce)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IUserDataAccountProviderSettingsOperation, 2449690039, 34376, 20272, 172, 250, 48, 2, 101, 140, 168, 13); + RT_INTERFACE!{interface IUserDataAccountProviderSettingsOperation(IUserDataAccountProviderSettingsOperationVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountProviderSettingsOperation] { + fn get_UserDataAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompleted(&mut self) -> HRESULT + }} + impl IUserDataAccountProviderSettingsOperation { + #[inline] pub unsafe fn get_user_data_account_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserDataAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_upce_add2(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UpceAdd2)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn report_completed(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompleted)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_upce_add5(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UpceAdd5)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IUserDataAccountProviderResolveErrorsOperation, 1647696917, 49099, 16865, 153, 87, 151, 89, 162, 136, 70, 204); + RT_INTERFACE!{interface IUserDataAccountProviderResolveErrorsOperation(IUserDataAccountProviderResolveErrorsOperationVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountProviderResolveErrorsOperation] { + fn get_UserDataAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn ReportCompleted(&mut self) -> HRESULT + }} + impl IUserDataAccountProviderResolveErrorsOperation { + #[inline] pub unsafe fn get_user_data_account_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserDataAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_upc_coupon(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UpcCoupon)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn report_completed(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompleted)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_tf_std(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TfStd)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class UserDataAccountProviderAddAccountOperation: IUserDataAccountProviderAddAccountOperation} + RT_CLASS!{class UserDataAccountProviderSettingsOperation: IUserDataAccountProviderSettingsOperation} + RT_CLASS!{class UserDataAccountProviderResolveErrorsOperation: IUserDataAccountProviderResolveErrorsOperation} +} // Windows.ApplicationModel.UserDataAccounts.Provider +pub mod systemaccess { // Windows.ApplicationModel.UserDataAccounts.SystemAccess +use ::prelude::*; + RT_ENUM! { enum DeviceAccountServerType: i32 { + Exchange (DeviceAccountServerType_Exchange) = 0, Pop (DeviceAccountServerType_Pop) = 1, Imap (DeviceAccountServerType_Imap) = 2, + }} + RT_ENUM! { enum DeviceAccountAuthenticationType: i32 { + Basic (DeviceAccountAuthenticationType_Basic) = 0, OAuth (DeviceAccountAuthenticationType_OAuth) = 1, SingleSignOn (DeviceAccountAuthenticationType_SingleSignOn) = 2, + }} + RT_ENUM! { enum DeviceAccountSyncScheduleKind: i32 { + Manual (DeviceAccountSyncScheduleKind_Manual) = 0, Every15Minutes (DeviceAccountSyncScheduleKind_Every15Minutes) = 1, Every30Minutes (DeviceAccountSyncScheduleKind_Every30Minutes) = 2, Every60Minutes (DeviceAccountSyncScheduleKind_Every60Minutes) = 3, Every2Hours (DeviceAccountSyncScheduleKind_Every2Hours) = 4, Daily (DeviceAccountSyncScheduleKind_Daily) = 5, AsItemsArrive (DeviceAccountSyncScheduleKind_AsItemsArrive) = 6, + }} + RT_ENUM! { enum DeviceAccountMailAgeFilter: i32 { + All (DeviceAccountMailAgeFilter_All) = 0, Last1Day (DeviceAccountMailAgeFilter_Last1Day) = 1, Last3Days (DeviceAccountMailAgeFilter_Last3Days) = 2, Last7Days (DeviceAccountMailAgeFilter_Last7Days) = 3, Last14Days (DeviceAccountMailAgeFilter_Last14Days) = 4, Last30Days (DeviceAccountMailAgeFilter_Last30Days) = 5, Last90Days (DeviceAccountMailAgeFilter_Last90Days) = 6, + }} + RT_ENUM! { enum DeviceAccountIconId: i32 { + Exchange (DeviceAccountIconId_Exchange) = 0, Msa (DeviceAccountIconId_Msa) = 1, Outlook (DeviceAccountIconId_Outlook) = 2, Generic (DeviceAccountIconId_Generic) = 3, + }} + DEFINE_IID!(IID_IDeviceAccountConfiguration, 2902533027, 64476, 19739, 190, 67, 90, 39, 234, 74, 27, 99); + RT_INTERFACE!{interface IDeviceAccountConfiguration(IDeviceAccountConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceAccountConfiguration] { + fn get_AccountName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AccountName(&mut self, value: HSTRING) -> HRESULT, + fn get_DeviceAccountTypeId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DeviceAccountTypeId(&mut self, value: HSTRING) -> HRESULT, + fn get_ServerType(&mut self, out: *mut DeviceAccountServerType) -> HRESULT, + fn put_ServerType(&mut self, value: DeviceAccountServerType) -> HRESULT, + fn get_EmailAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_EmailAddress(&mut self, value: HSTRING) -> HRESULT, + fn get_Domain(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Domain(&mut self, value: HSTRING) -> HRESULT, + fn get_EmailSyncEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_EmailSyncEnabled(&mut self, value: bool) -> HRESULT, + fn get_ContactsSyncEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_ContactsSyncEnabled(&mut self, value: bool) -> HRESULT, + fn get_CalendarSyncEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_CalendarSyncEnabled(&mut self, value: bool) -> HRESULT, + fn get_IncomingServerAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_IncomingServerAddress(&mut self, value: HSTRING) -> HRESULT, + fn get_IncomingServerPort(&mut self, out: *mut i32) -> HRESULT, + fn put_IncomingServerPort(&mut self, value: i32) -> HRESULT, + fn get_IncomingServerRequiresSsl(&mut self, out: *mut bool) -> HRESULT, + fn put_IncomingServerRequiresSsl(&mut self, value: bool) -> HRESULT, + fn get_IncomingServerUsername(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_IncomingServerUsername(&mut self, value: HSTRING) -> HRESULT, + fn get_OutgoingServerAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_OutgoingServerAddress(&mut self, value: HSTRING) -> HRESULT, + fn get_OutgoingServerPort(&mut self, out: *mut i32) -> HRESULT, + fn put_OutgoingServerPort(&mut self, value: i32) -> HRESULT, + fn get_OutgoingServerRequiresSsl(&mut self, out: *mut bool) -> HRESULT, + fn put_OutgoingServerRequiresSsl(&mut self, value: bool) -> HRESULT, + fn get_OutgoingServerUsername(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_OutgoingServerUsername(&mut self, value: HSTRING) -> HRESULT + }} + impl IDeviceAccountConfiguration { + #[inline] pub unsafe fn get_account_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccountName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_tf_dis(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TfDis)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_account_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AccountName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_tf_int(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TfInt)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_device_account_type_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceAccountTypeId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_tf_ind(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TfInd)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_device_account_type_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DeviceAccountTypeId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_tf_mat(&mut self) -> Result { + #[inline] pub unsafe fn get_server_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TfMat)(self, &mut out); + let hr = ((*self.lpVtbl).get_ServerType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_tf_iata(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TfIata)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_server_type(&mut self, value: DeviceAccountServerType) -> Result<()> { + let hr = ((*self.lpVtbl).put_ServerType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_gs1_databar_type1(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Gs1DatabarType1)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_email_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_gs1_databar_type2(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Gs1DatabarType2)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_email_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_EmailAddress)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_gs1_databar_type3(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Gs1DatabarType3)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_domain(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Domain)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_code39(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Code39)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_domain(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Domain)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_code39_ex(&mut self) -> Result { + #[inline] pub unsafe fn get_email_sync_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Code39Ex)(self, &mut out); + let hr = ((*self.lpVtbl).get_EmailSyncEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_trioptic39(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Trioptic39)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_email_sync_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_EmailSyncEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_code32(&mut self) -> Result { + #[inline] pub unsafe fn get_contacts_sync_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Code32)(self, &mut out); + let hr = ((*self.lpVtbl).get_ContactsSyncEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_pzn(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Pzn)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_contacts_sync_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContactsSyncEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_code93(&mut self) -> Result { + #[inline] pub unsafe fn get_calendar_sync_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Code93)(self, &mut out); + let hr = ((*self.lpVtbl).get_CalendarSyncEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_code93_ex(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Code93Ex)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_calendar_sync_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CalendarSyncEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_code128(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Code128)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_incoming_server_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IncomingServerAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_gs1128(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Gs1128)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_incoming_server_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_IncomingServerAddress)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_gs1128_coupon(&mut self) -> Result { + #[inline] pub unsafe fn get_incoming_server_port(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Gs1128Coupon)(self, &mut out); + let hr = ((*self.lpVtbl).get_IncomingServerPort)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ucc_ean128(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UccEan128)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_incoming_server_port(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_IncomingServerPort)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_sisac(&mut self) -> Result { + #[inline] pub unsafe fn get_incoming_server_requires_ssl(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Sisac)(self, &mut out); + let hr = ((*self.lpVtbl).get_IncomingServerRequiresSsl)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_isbt(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Isbt)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_incoming_server_requires_ssl(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IncomingServerRequiresSsl)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_codabar(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Codabar)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_incoming_server_username(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IncomingServerUsername)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_code11(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Code11)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_incoming_server_username(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_IncomingServerUsername)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_msi(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Msi)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_outgoing_server_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutgoingServerAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_plessey(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Plessey)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_outgoing_server_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutgoingServerAddress)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_telepen(&mut self) -> Result { + #[inline] pub unsafe fn get_outgoing_server_port(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Telepen)(self, &mut out); + let hr = ((*self.lpVtbl).get_OutgoingServerPort)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_code16k(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Code16k)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_outgoing_server_port(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutgoingServerPort)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_codablock_a(&mut self) -> Result { + #[inline] pub unsafe fn get_outgoing_server_requires_ssl(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CodablockA)(self, &mut out); + let hr = ((*self.lpVtbl).get_OutgoingServerRequiresSsl)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_codablock_f(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CodablockF)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_outgoing_server_requires_ssl(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutgoingServerRequiresSsl)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_codablock128(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Codablock128)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_outgoing_server_username(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutgoingServerUsername)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_code49(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Code49)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_outgoing_server_username(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutgoingServerUsername)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_aztec(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Aztec)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IDeviceAccountConfiguration2, 4071810470, 29325, 19018, 137, 69, 43, 248, 88, 1, 54, 222); + RT_INTERFACE!{interface IDeviceAccountConfiguration2(IDeviceAccountConfiguration2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceAccountConfiguration2] { + #[cfg(not(feature="windows.security"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_IncomingServerCredential(&mut self, out: *mut *mut ::rt::gen::windows::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.security")] fn put_IncomingServerCredential(&mut self, value: *mut ::rt::gen::windows::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_OutgoingServerCredential(&mut self, out: *mut *mut ::rt::gen::windows::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.security")] fn put_OutgoingServerCredential(&mut self, value: *mut ::rt::gen::windows::security::credentials::PasswordCredential) -> HRESULT, + fn get_OAuthRefreshToken(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_OAuthRefreshToken(&mut self, value: HSTRING) -> HRESULT, + fn get_IsExternallyManaged(&mut self, out: *mut bool) -> HRESULT, + fn put_IsExternallyManaged(&mut self, value: bool) -> HRESULT, + fn get_AccountIconId(&mut self, out: *mut DeviceAccountIconId) -> HRESULT, + fn put_AccountIconId(&mut self, value: DeviceAccountIconId) -> HRESULT, + fn get_AuthenticationType(&mut self, out: *mut DeviceAccountAuthenticationType) -> HRESULT, + fn put_AuthenticationType(&mut self, value: DeviceAccountAuthenticationType) -> HRESULT, + fn get_IsSsoAuthenticationSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_SsoAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SsoAccountId(&mut self, value: HSTRING) -> HRESULT, + fn get_AlwaysDownloadFullMessage(&mut self, out: *mut bool) -> HRESULT, + fn put_AlwaysDownloadFullMessage(&mut self, value: bool) -> HRESULT, + fn get_DoesPolicyAllowMailSync(&mut self, out: *mut bool) -> HRESULT, + fn get_SyncScheduleKind(&mut self, out: *mut DeviceAccountSyncScheduleKind) -> HRESULT, + fn put_SyncScheduleKind(&mut self, value: DeviceAccountSyncScheduleKind) -> HRESULT, + fn get_MailAgeFilter(&mut self, out: *mut DeviceAccountMailAgeFilter) -> HRESULT, + fn put_MailAgeFilter(&mut self, value: DeviceAccountMailAgeFilter) -> HRESULT, + fn get_IsClientAuthenticationCertificateRequired(&mut self, out: *mut bool) -> HRESULT, + fn put_IsClientAuthenticationCertificateRequired(&mut self, value: bool) -> HRESULT, + fn get_AutoSelectAuthenticationCertificate(&mut self, out: *mut bool) -> HRESULT, + fn put_AutoSelectAuthenticationCertificate(&mut self, value: bool) -> HRESULT, + fn get_AuthenticationCertificateId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AuthenticationCertificateId(&mut self, value: HSTRING) -> HRESULT, + fn get_CardDavSyncScheduleKind(&mut self, out: *mut DeviceAccountSyncScheduleKind) -> HRESULT, + fn put_CardDavSyncScheduleKind(&mut self, value: DeviceAccountSyncScheduleKind) -> HRESULT, + fn get_CalDavSyncScheduleKind(&mut self, out: *mut DeviceAccountSyncScheduleKind) -> HRESULT, + fn put_CalDavSyncScheduleKind(&mut self, value: DeviceAccountSyncScheduleKind) -> HRESULT, + fn get_CardDavServerUrl(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn put_CardDavServerUrl(&mut self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_CardDavRequiresSsl(&mut self, out: *mut bool) -> HRESULT, + fn put_CardDavRequiresSsl(&mut self, value: bool) -> HRESULT, + fn get_CalDavServerUrl(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn put_CalDavServerUrl(&mut self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_CalDavRequiresSsl(&mut self, out: *mut bool) -> HRESULT, + fn put_CalDavRequiresSsl(&mut self, value: bool) -> HRESULT, + fn get_WasModifiedByUser(&mut self, out: *mut bool) -> HRESULT, + fn put_WasModifiedByUser(&mut self, value: bool) -> HRESULT, + fn get_WasIncomingServerCertificateHashConfirmed(&mut self, out: *mut bool) -> HRESULT, + fn put_WasIncomingServerCertificateHashConfirmed(&mut self, value: bool) -> HRESULT, + fn get_IncomingServerCertificateHash(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_IncomingServerCertificateHash(&mut self, value: HSTRING) -> HRESULT, + fn get_IsOutgoingServerAuthenticationRequired(&mut self, out: *mut bool) -> HRESULT, + fn put_IsOutgoingServerAuthenticationRequired(&mut self, value: bool) -> HRESULT, + fn get_IsOutgoingServerAuthenticationEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsOutgoingServerAuthenticationEnabled(&mut self, value: bool) -> HRESULT, + fn get_WasOutgoingServerCertificateHashConfirmed(&mut self, out: *mut bool) -> HRESULT, + fn put_WasOutgoingServerCertificateHashConfirmed(&mut self, value: bool) -> HRESULT, + fn get_OutgoingServerCertificateHash(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_OutgoingServerCertificateHash(&mut self, value: HSTRING) -> HRESULT, + fn get_IsSyncScheduleManagedBySystem(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSyncScheduleManagedBySystem(&mut self, value: bool) -> HRESULT + }} + impl IDeviceAccountConfiguration2 { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_incoming_server_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IncomingServerCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_incoming_server_credential(&mut self, value: &::rt::gen::windows::security::credentials::PasswordCredential) -> Result<()> { + let hr = ((*self.lpVtbl).put_IncomingServerCredential)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_outgoing_server_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutgoingServerCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_outgoing_server_credential(&mut self, value: &::rt::gen::windows::security::credentials::PasswordCredential) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutgoingServerCredential)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_oauth_refresh_token(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OAuthRefreshToken)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_data_code(&mut self) -> Result { + #[inline] pub unsafe fn set_oauth_refresh_token(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_OAuthRefreshToken)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_externally_managed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DataCode)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsExternallyManaged)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_data_matrix(&mut self) -> Result { + #[inline] pub unsafe fn set_is_externally_managed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsExternallyManaged)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_account_icon_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DataMatrix)(self, &mut out); + let hr = ((*self.lpVtbl).get_AccountIconId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_han_xin(&mut self) -> Result { + #[inline] pub unsafe fn set_account_icon_id(&mut self, value: DeviceAccountIconId) -> Result<()> { + let hr = ((*self.lpVtbl).put_AccountIconId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_authentication_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HanXin)(self, &mut out); + let hr = ((*self.lpVtbl).get_AuthenticationType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_maxicode(&mut self) -> Result { + #[inline] pub unsafe fn set_authentication_type(&mut self, value: DeviceAccountAuthenticationType) -> Result<()> { + let hr = ((*self.lpVtbl).put_AuthenticationType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_sso_authentication_supported(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Maxicode)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsSsoAuthenticationSupported)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_micro_pdf417(&mut self) -> Result { + #[inline] pub unsafe fn get_sso_account_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SsoAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_sso_account_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SsoAccountId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_always_download_full_message(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MicroPdf417)(self, &mut out); + let hr = ((*self.lpVtbl).get_AlwaysDownloadFullMessage)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_micro_qr(&mut self) -> Result { + #[inline] pub unsafe fn set_always_download_full_message(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AlwaysDownloadFullMessage)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_does_policy_allow_mail_sync(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MicroQr)(self, &mut out); + let hr = ((*self.lpVtbl).get_DoesPolicyAllowMailSync)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_pdf417(&mut self) -> Result { + #[inline] pub unsafe fn get_sync_schedule_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Pdf417)(self, &mut out); + let hr = ((*self.lpVtbl).get_SyncScheduleKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_qr(&mut self) -> Result { + #[inline] pub unsafe fn set_sync_schedule_kind(&mut self, value: DeviceAccountSyncScheduleKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_SyncScheduleKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_mail_age_filter(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Qr)(self, &mut out); + let hr = ((*self.lpVtbl).get_MailAgeFilter)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ms_tag(&mut self) -> Result { + #[inline] pub unsafe fn set_mail_age_filter(&mut self, value: DeviceAccountMailAgeFilter) -> Result<()> { + let hr = ((*self.lpVtbl).put_MailAgeFilter)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_client_authentication_certificate_required(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MsTag)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsClientAuthenticationCertificateRequired)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ccab(&mut self) -> Result { + #[inline] pub unsafe fn set_is_client_authentication_certificate_required(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsClientAuthenticationCertificateRequired)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_select_authentication_certificate(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ccab)(self, &mut out); + let hr = ((*self.lpVtbl).get_AutoSelectAuthenticationCertificate)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ccc(&mut self) -> Result { + #[inline] pub unsafe fn set_auto_select_authentication_certificate(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoSelectAuthenticationCertificate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_authentication_certificate_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AuthenticationCertificateId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_authentication_certificate_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AuthenticationCertificateId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_card_dav_sync_schedule_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ccc)(self, &mut out); + let hr = ((*self.lpVtbl).get_CardDavSyncScheduleKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_tlc39(&mut self) -> Result { + #[inline] pub unsafe fn set_card_dav_sync_schedule_kind(&mut self, value: DeviceAccountSyncScheduleKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_CardDavSyncScheduleKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cal_dav_sync_schedule_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Tlc39)(self, &mut out); + let hr = ((*self.lpVtbl).get_CalDavSyncScheduleKind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_aus_post(&mut self) -> Result { + #[inline] pub unsafe fn set_cal_dav_sync_schedule_kind(&mut self, value: DeviceAccountSyncScheduleKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_CalDavSyncScheduleKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_card_dav_server_url(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CardDavServerUrl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_card_dav_server_url(&mut self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_CardDavServerUrl)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_card_dav_requires_ssl(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AusPost)(self, &mut out); + let hr = ((*self.lpVtbl).get_CardDavRequiresSsl)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_can_post(&mut self) -> Result { + #[inline] pub unsafe fn set_card_dav_requires_ssl(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CardDavRequiresSsl)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cal_dav_server_url(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CalDavServerUrl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_cal_dav_server_url(&mut self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_CalDavServerUrl)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cal_dav_requires_ssl(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CanPost)(self, &mut out); + let hr = ((*self.lpVtbl).get_CalDavRequiresSsl)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_china_post(&mut self) -> Result { + #[inline] pub unsafe fn set_cal_dav_requires_ssl(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CalDavRequiresSsl)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_was_modified_by_user(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ChinaPost)(self, &mut out); + let hr = ((*self.lpVtbl).get_WasModifiedByUser)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_dutch_kix(&mut self) -> Result { + #[inline] pub unsafe fn set_was_modified_by_user(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_WasModifiedByUser)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_was_incoming_server_certificate_hash_confirmed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DutchKix)(self, &mut out); + let hr = ((*self.lpVtbl).get_WasIncomingServerCertificateHashConfirmed)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_info_mail(&mut self) -> Result { + #[inline] pub unsafe fn set_was_incoming_server_certificate_hash_confirmed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_WasIncomingServerCertificateHashConfirmed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_incoming_server_certificate_hash(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IncomingServerCertificateHash)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_incoming_server_certificate_hash(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_IncomingServerCertificateHash)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_outgoing_server_authentication_required(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InfoMail)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsOutgoingServerAuthenticationRequired)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_italian_post25(&mut self) -> Result { + #[inline] pub unsafe fn set_is_outgoing_server_authentication_required(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsOutgoingServerAuthenticationRequired)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_outgoing_server_authentication_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ItalianPost25)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsOutgoingServerAuthenticationEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_italian_post39(&mut self) -> Result { + #[inline] pub unsafe fn set_is_outgoing_server_authentication_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsOutgoingServerAuthenticationEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_was_outgoing_server_certificate_hash_confirmed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ItalianPost39)(self, &mut out); + let hr = ((*self.lpVtbl).get_WasOutgoingServerCertificateHashConfirmed)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_japan_post(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_JapanPost)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_was_outgoing_server_certificate_hash_confirmed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_WasOutgoingServerCertificateHashConfirmed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_korean_post(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_KoreanPost)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_outgoing_server_certificate_hash(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutgoingServerCertificateHash)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sweden_post(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SwedenPost)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_outgoing_server_certificate_hash(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutgoingServerCertificateHash)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_uk_post(&mut self) -> Result { + #[inline] pub unsafe fn get_is_sync_schedule_managed_by_system(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UkPost)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsSyncScheduleManagedBySystem)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_us_intelligent(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsIntelligent)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_is_sync_schedule_managed_by_system(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSyncScheduleManagedBySystem)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_us_intelligent_pkg(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsIntelligentPkg)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IUserDataAccountSystemAccessManagerStatics, 2641039801, 52197, 17909, 130, 43, 194, 103, 184, 29, 189, 182); + RT_INTERFACE!{static interface IUserDataAccountSystemAccessManagerStatics(IUserDataAccountSystemAccessManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountSystemAccessManagerStatics] { + fn AddAndShowDeviceAccountsAsync(&mut self, accounts: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + }} + impl IUserDataAccountSystemAccessManagerStatics { + #[inline] pub unsafe fn add_and_show_device_accounts_async(&mut self, accounts: &::rt::gen::windows::foundation::collections::IIterable) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddAndShowDeviceAccountsAsync)(self, accounts as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_us_planet(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsPlanet)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class DeviceAccountConfiguration: IDeviceAccountConfiguration} + DEFINE_IID!(IID_IUserDataAccountSystemAccessManagerStatics2, 2487190861, 19278, 17311, 131, 211, 151, 155, 39, 192, 90, 199); + RT_INTERFACE!{static interface IUserDataAccountSystemAccessManagerStatics2(IUserDataAccountSystemAccessManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountSystemAccessManagerStatics2] { + fn SuppressLocalAccountWithAccountAsync(&mut self, userDataAccountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn CreateDeviceAccountAsync(&mut self, account: *mut DeviceAccountConfiguration, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn DeleteDeviceAccountAsync(&mut self, accountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn GetDeviceAccountConfigurationAsync(&mut self, accountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IUserDataAccountSystemAccessManagerStatics2 { + #[inline] pub unsafe fn suppress_local_account_with_account_async(&mut self, userDataAccountId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SuppressLocalAccountWithAccountAsync)(self, userDataAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_us_post_net(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsPostNet)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn create_device_account_async(&mut self, account: &DeviceAccountConfiguration) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDeviceAccountAsync)(self, account as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_us4_state_fics(&mut self) -> Result { + #[inline] pub unsafe fn delete_device_account_async(&mut self, accountId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteDeviceAccountAsync)(self, accountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_account_configuration_async(&mut self, accountId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceAccountConfigurationAsync)(self, accountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IUserDataAccountSystemAccessManagerStatics [CLSID_UserDataAccountSystemAccessManager]} + RT_ACTIVATABLE!{IUserDataAccountSystemAccessManagerStatics2 [CLSID_UserDataAccountSystemAccessManager]} + DEFINE_CLSID!(CLSID_UserDataAccountSystemAccessManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,85,115,101,114,68,97,116,97,65,99,99,111,117,110,116,115,46,83,121,115,116,101,109,65,99,99,101,115,115,46,85,115,101,114,68,97,116,97,65,99,99,111,117,110,116,83,121,115,116,101,109,65,99,99,101,115,115,77,97,110,97,103,101,114,0]); +} // Windows.ApplicationModel.UserDataAccounts.SystemAccess +} // Windows.ApplicationModel.UserDataAccounts +pub mod appextensions { // Windows.ApplicationModel.AppExtensions +use ::prelude::*; + DEFINE_IID!(IID_IAppExtensionCatalogStatics, 1010198154, 24344, 20235, 156, 229, 202, 182, 29, 25, 111, 17); + RT_INTERFACE!{static interface IAppExtensionCatalogStatics(IAppExtensionCatalogStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppExtensionCatalogStatics] { + fn Open(&mut self, appExtensionName: HSTRING, out: *mut *mut AppExtensionCatalog) -> HRESULT + }} + impl IAppExtensionCatalogStatics { + #[inline] pub unsafe fn open(&mut self, appExtensionName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Open)(self, appExtensionName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AppExtensionCatalog: IAppExtensionCatalog} + RT_ACTIVATABLE!{IAppExtensionCatalogStatics [CLSID_AppExtensionCatalog]} + DEFINE_CLSID!(CLSID_AppExtensionCatalog = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,65,112,112,69,120,116,101,110,115,105,111,110,115,46,65,112,112,69,120,116,101,110,115,105,111,110,67,97,116,97,108,111,103,0]); + DEFINE_IID!(IID_IAppExtensionCatalog, 2542215218, 33830, 19153, 144, 132, 146, 232, 140, 45, 162, 0); + RT_INTERFACE!{interface IAppExtensionCatalog(IAppExtensionCatalogVtbl): IInspectable(IInspectableVtbl) [IID_IAppExtensionCatalog] { + fn FindAllAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn RequestRemovePackageAsync(&mut self, packageFullName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_PackageInstalled(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageInstalled(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageUpdating(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageUpdating(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageUninstalling(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageUninstalling(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageStatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAppExtensionCatalog { + #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_remove_package_async(&mut self, packageFullName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestRemovePackageAsync)(self, packageFullName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_package_installed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Us4StateFics)(self, &mut out); + let hr = ((*self.lpVtbl).add_PackageInstalled)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ocr_a(&mut self) -> Result { + #[inline] pub unsafe fn remove_package_installed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PackageInstalled)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_package_updating(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_OcrA)(self, &mut out); + let hr = ((*self.lpVtbl).add_PackageUpdating)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ocr_b(&mut self) -> Result { + #[inline] pub unsafe fn remove_package_updating(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PackageUpdating)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_package_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_OcrB)(self, &mut out); + let hr = ((*self.lpVtbl).add_PackageUpdated)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_micr(&mut self) -> Result { + #[inline] pub unsafe fn remove_package_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PackageUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_package_uninstalling(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Micr)(self, &mut out); + let hr = ((*self.lpVtbl).add_PackageUninstalling)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_extended_base(&mut self) -> Result { + #[inline] pub unsafe fn remove_package_uninstalling(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PackageUninstalling)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_package_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ExtendedBase)(self, &mut out); + let hr = ((*self.lpVtbl).add_PackageStatusChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_name(&mut self, scanDataType: u32) -> Result { + #[inline] pub unsafe fn remove_package_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PackageStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AppExtension: IAppExtension} + RT_CLASS!{class AppExtensionPackageInstalledEventArgs: IAppExtensionPackageInstalledEventArgs} + RT_CLASS!{class AppExtensionPackageUpdatingEventArgs: IAppExtensionPackageUpdatingEventArgs} + RT_CLASS!{class AppExtensionPackageUpdatedEventArgs: IAppExtensionPackageUpdatedEventArgs} + RT_CLASS!{class AppExtensionPackageUninstallingEventArgs: IAppExtensionPackageUninstallingEventArgs} + RT_CLASS!{class AppExtensionPackageStatusChangedEventArgs: IAppExtensionPackageStatusChangedEventArgs} + DEFINE_IID!(IID_IAppExtension, 2219872300, 5613, 20399, 147, 234, 34, 55, 187, 248, 203, 214); + RT_INTERFACE!{interface IAppExtension(IAppExtensionVtbl): IInspectable(IInspectableVtbl) [IID_IAppExtension] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Package(&mut self, out: *mut *mut super::Package) -> HRESULT, + fn get_AppInfo(&mut self, out: *mut *mut super::AppInfo) -> HRESULT, + fn GetExtensionPropertiesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetPublicFolderAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IAppExtension { + #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetName)(self, scanDataType, &mut out); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn get_package(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extension_properties_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetExtensionPropertiesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_public_folder_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPublicFolderAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } } - RT_ACTIVATABLE!{IBarcodeSymbologiesStatics [CLSID_BarcodeSymbologies]} - DEFINE_CLSID!(CLSID_BarcodeSymbologies = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,66,97,114,99,111,100,101,83,121,109,98,111,108,111,103,105,101,115,0]); - DEFINE_IID!(IID_IBarcodeScannerDataReceivedEventArgs, 1110747106, 60823, 18045, 173, 43, 1, 228, 67, 19, 169, 41); - RT_INTERFACE!{interface IBarcodeScannerDataReceivedEventArgs(IBarcodeScannerDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerDataReceivedEventArgs] { - fn get_Report(&mut self, out: *mut *mut BarcodeScannerReport) -> HRESULT + DEFINE_IID!(IID_IAppExtensionPackageInstalledEventArgs, 971346484, 13137, 19085, 151, 69, 231, 211, 221, 69, 188, 72); + RT_INTERFACE!{interface IAppExtensionPackageInstalledEventArgs(IAppExtensionPackageInstalledEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppExtensionPackageInstalledEventArgs] { + fn get_AppExtensionName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Package(&mut self, out: *mut *mut super::Package) -> HRESULT, + fn get_Extensions(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT }} - impl IBarcodeScannerDataReceivedEventArgs { - #[inline] pub unsafe fn get_report(&mut self) -> Result> { + impl IAppExtensionPackageInstalledEventArgs { + #[inline] pub unsafe fn get_app_extension_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppExtensionName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_package(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extensions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Extensions)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class BarcodeScannerReport: IBarcodeScannerReport} - RT_CLASS!{class BarcodeScannerDataReceivedEventArgs: IBarcodeScannerDataReceivedEventArgs} - DEFINE_IID!(IID_IBarcodeScannerReport, 1558501552, 42121, 19350, 134, 196, 240, 191, 138, 55, 117, 61); - RT_INTERFACE!{interface IBarcodeScannerReport(IBarcodeScannerReportVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerReport] { - fn get_ScanDataType(&mut self, out: *mut u32) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_ScanData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_ScanDataLabel(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + DEFINE_IID!(IID_IAppExtensionPackageUpdatingEventArgs, 2127926057, 6757, 18432, 167, 0, 179, 33, 0, 158, 48, 106); + RT_INTERFACE!{interface IAppExtensionPackageUpdatingEventArgs(IAppExtensionPackageUpdatingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppExtensionPackageUpdatingEventArgs] { + fn get_AppExtensionName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Package(&mut self, out: *mut *mut super::Package) -> HRESULT }} - impl IBarcodeScannerReport { - #[inline] pub unsafe fn get_scan_data_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ScanDataType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IAppExtensionPackageUpdatingEventArgs { + #[inline] pub unsafe fn get_app_extension_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppExtensionName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_scan_data(&mut self) -> Result> { + #[inline] pub unsafe fn get_package(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ScanData)(self, &mut out); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_scan_data_label(&mut self) -> Result> { + } + DEFINE_IID!(IID_IAppExtensionPackageUpdatedEventArgs, 981713983, 31102, 17589, 186, 36, 164, 200, 181, 165, 67, 215); + RT_INTERFACE!{interface IAppExtensionPackageUpdatedEventArgs(IAppExtensionPackageUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppExtensionPackageUpdatedEventArgs] { + fn get_AppExtensionName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Package(&mut self, out: *mut *mut super::Package) -> HRESULT, + fn get_Extensions(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IAppExtensionPackageUpdatedEventArgs { + #[inline] pub unsafe fn get_app_extension_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ScanDataLabel)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppExtensionName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_package(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extensions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Extensions)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IBarcodeScannerErrorOccurredEventArgs, 751984687, 53050, 16386, 167, 90, 197, 236, 70, 143, 10, 32); - RT_INTERFACE!{interface IBarcodeScannerErrorOccurredEventArgs(IBarcodeScannerErrorOccurredEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerErrorOccurredEventArgs] { - fn get_PartialInputData(&mut self, out: *mut *mut BarcodeScannerReport) -> HRESULT, - fn get_IsRetriable(&mut self, out: *mut bool) -> HRESULT, - fn get_ErrorData(&mut self, out: *mut *mut UnifiedPosErrorData) -> HRESULT + DEFINE_IID!(IID_IAppExtensionPackageUninstallingEventArgs, 1626431685, 5918, 16639, 174, 152, 171, 44, 32, 221, 77, 117); + RT_INTERFACE!{interface IAppExtensionPackageUninstallingEventArgs(IAppExtensionPackageUninstallingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppExtensionPackageUninstallingEventArgs] { + fn get_AppExtensionName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Package(&mut self, out: *mut *mut super::Package) -> HRESULT }} - impl IBarcodeScannerErrorOccurredEventArgs { - #[inline] pub unsafe fn get_partial_input_data(&mut self) -> Result> { + impl IAppExtensionPackageUninstallingEventArgs { + #[inline] pub unsafe fn get_app_extension_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PartialInputData)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppExtensionName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_package(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_retriable(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsRetriable)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IAppExtensionPackageStatusChangedEventArgs, 484537395, 4435, 17661, 135, 177, 138, 225, 5, 3, 3, 223); + RT_INTERFACE!{interface IAppExtensionPackageStatusChangedEventArgs(IAppExtensionPackageStatusChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppExtensionPackageStatusChangedEventArgs] { + fn get_AppExtensionName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Package(&mut self, out: *mut *mut super::Package) -> HRESULT + }} + impl IAppExtensionPackageStatusChangedEventArgs { + #[inline] pub unsafe fn get_app_extension_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppExtensionName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_error_data(&mut self) -> Result> { + #[inline] pub unsafe fn get_package(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ErrorData)(self, &mut out); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class BarcodeScannerErrorOccurredEventArgs: IBarcodeScannerErrorOccurredEventArgs} - DEFINE_IID!(IID_IBarcodeScannerImagePreviewReceivedEventArgs, 4088913541, 28299, 17230, 159, 88, 6, 239, 38, 188, 75, 175); - RT_INTERFACE!{interface IBarcodeScannerImagePreviewReceivedEventArgs(IBarcodeScannerImagePreviewReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerImagePreviewReceivedEventArgs] { - #[cfg(feature="windows.storage")] fn get_Preview(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamWithContentType) -> HRESULT +} // Windows.ApplicationModel.AppExtensions +pub mod lockscreen { // Windows.ApplicationModel.LockScreen +use ::prelude::*; + DEFINE_IID!(IID_ILockScreenBadge, 3914401241, 11263, 19888, 155, 79, 56, 36, 119, 139, 156, 154); + RT_INTERFACE!{interface ILockScreenBadge(ILockScreenBadgeVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenBadge] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Logo(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Glyph(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + fn get_Number(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_AutomationName(&mut self, out: *mut HSTRING) -> HRESULT, + fn LaunchApp(&mut self) -> HRESULT }} - impl IBarcodeScannerImagePreviewReceivedEventArgs { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_preview(&mut self) -> Result> { + impl ILockScreenBadge { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_logo(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Preview)(self, &mut out); + let hr = ((*self.lpVtbl).get_Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_glyph(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Glyph)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_number(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Number)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn get_automation_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AutomationName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_app(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).LaunchApp)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class BarcodeScannerImagePreviewReceivedEventArgs: IBarcodeScannerImagePreviewReceivedEventArgs} - DEFINE_IID!(IID_IBarcodeScannerCapabilities, 3322319332, 62152, 17440, 163, 7, 177, 46, 246, 98, 40, 87); - RT_INTERFACE!{interface IBarcodeScannerCapabilities(IBarcodeScannerCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerCapabilities] { - fn get_PowerReportingType(&mut self, out: *mut UnifiedPosPowerReportingType) -> HRESULT, - fn get_IsStatisticsReportingSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsStatisticsUpdatingSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsImagePreviewSupported(&mut self, out: *mut bool) -> HRESULT + DEFINE_IID!(IID_ILockScreenInfo, 4120553052, 38673, 19913, 166, 48, 149, 182, 203, 140, 218, 208); + RT_INTERFACE!{interface ILockScreenInfo(ILockScreenInfoVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenInfo] { + fn add_LockScreenImageChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LockScreenImageChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_LockScreenImage(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + fn add_BadgesChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BadgesChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Badges(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn add_DetailTextChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DetailTextChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_DetailText(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn add_AlarmIconChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AlarmIconChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_AlarmIcon(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT }} - impl IBarcodeScannerCapabilities { - #[inline] pub unsafe fn get_power_reporting_type(&mut self) -> Result { + impl ILockScreenInfo { + #[inline] pub unsafe fn add_lock_screen_image_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PowerReportingType)(self, &mut out); + let hr = ((*self.lpVtbl).add_LockScreenImageChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_statistics_reporting_supported(&mut self) -> Result { + #[inline] pub unsafe fn remove_lock_screen_image_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LockScreenImageChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_lock_screen_image(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LockScreenImage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_badges_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self, &mut out); + let hr = ((*self.lpVtbl).add_BadgesChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_statistics_updating_supported(&mut self) -> Result { + #[inline] pub unsafe fn remove_badges_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BadgesChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_badges(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Badges)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_detail_text_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self, &mut out); + let hr = ((*self.lpVtbl).add_DetailTextChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_image_preview_supported(&mut self) -> Result { + #[inline] pub unsafe fn remove_detail_text_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DetailTextChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_detail_text(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DetailText)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_alarm_icon_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsImagePreviewSupported)(self, &mut out); + let hr = ((*self.lpVtbl).add_AlarmIconChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn remove_alarm_icon_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AlarmIconChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_alarm_icon(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlarmIcon)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } } - DEFINE_IID!(IID_IBarcodeScannerCapabilities1, 2388308969, 3628, 18223, 161, 204, 238, 128, 84, 182, 166, 132); - RT_INTERFACE!{interface IBarcodeScannerCapabilities1(IBarcodeScannerCapabilities1Vtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerCapabilities1] { - fn get_IsSoftwareTriggerSupported(&mut self, out: *mut bool) -> HRESULT + RT_CLASS!{class LockScreenInfo: ILockScreenInfo} + RT_CLASS!{class LockScreenBadge: ILockScreenBadge} + DEFINE_IID!(IID_ILockScreenUnlockingDeferral, 2122128086, 20995, 17383, 155, 214, 124, 57, 71, 209, 227, 254); + RT_INTERFACE!{interface ILockScreenUnlockingDeferral(ILockScreenUnlockingDeferralVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenUnlockingDeferral] { + fn Complete(&mut self) -> HRESULT }} - impl IBarcodeScannerCapabilities1 { - #[inline] pub unsafe fn get_is_software_trigger_supported(&mut self) -> Result { + impl ILockScreenUnlockingDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILockScreenUnlockingEventArgs, 1155973127, 30203, 19131, 159, 139, 130, 71, 72, 144, 12, 113); + RT_INTERFACE!{interface ILockScreenUnlockingEventArgs(ILockScreenUnlockingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenUnlockingEventArgs] { + fn GetDeferral(&mut self, out: *mut *mut LockScreenUnlockingDeferral) -> HRESULT, + fn get_Deadline(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT + }} + impl ILockScreenUnlockingEventArgs { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deadline(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsSoftwareTriggerSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class BarcodeScannerCapabilities: IBarcodeScannerCapabilities} - DEFINE_IID!(IID_IBarcodeScannerStatics, 1561419631, 55881, 16872, 140, 140, 240, 203, 98, 169, 196, 252); - RT_INTERFACE!{static interface IBarcodeScannerStatics(IBarcodeScannerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerStatics] { - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class LockScreenUnlockingDeferral: ILockScreenUnlockingDeferral} + DEFINE_IID!(IID_ILockApplicationHost, 955134381, 55631, 20092, 129, 250, 79, 68, 54, 80, 98, 129); + RT_INTERFACE!{interface ILockApplicationHost(ILockApplicationHostVtbl): IInspectable(IInspectableVtbl) [IID_ILockApplicationHost] { + fn RequestUnlock(&mut self) -> HRESULT, + fn add_Unlocking(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Unlocking(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT }} - impl IBarcodeScannerStatics { - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + impl ILockApplicationHost { + #[inline] pub unsafe fn request_unlock(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RequestUnlock)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_unlocking(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Unlocking)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_unlocking(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Unlocking)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class LockApplicationHost: ILockApplicationHost} + RT_ACTIVATABLE!{ILockApplicationHostStatics [CLSID_LockApplicationHost]} + DEFINE_CLSID!(CLSID_LockApplicationHost = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,76,111,99,107,83,99,114,101,101,110,46,76,111,99,107,65,112,112,108,105,99,97,116,105,111,110,72,111,115,116,0]); + RT_CLASS!{class LockScreenUnlockingEventArgs: ILockScreenUnlockingEventArgs} + DEFINE_IID!(IID_ILockApplicationHostStatics, 4103056270, 9175, 20067, 150, 161, 102, 111, 245, 45, 59, 44); + RT_INTERFACE!{static interface ILockApplicationHostStatics(ILockApplicationHostStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILockApplicationHostStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut LockApplicationHost) -> HRESULT + }} + impl ILockApplicationHostStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + } +} // Windows.ApplicationModel.LockScreen +pub mod resources { // Windows.ApplicationModel.Resources +use ::prelude::*; + DEFINE_IID!(IID_IResourceLoader, 139610376, 5871, 17837, 166, 2, 41, 54, 55, 215, 230, 26); + RT_INTERFACE!{interface IResourceLoader(IResourceLoaderVtbl): IInspectable(IInspectableVtbl) [IID_IResourceLoader] { + fn GetString(&mut self, resource: HSTRING, out: *mut HSTRING) -> HRESULT + }} + impl IResourceLoader { + #[inline] pub unsafe fn get_string(&mut self, resource: &HStringArg) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetString)(self, resource.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + } + DEFINE_IID!(IID_IResourceLoader2, 283864774, 33080, 18625, 188, 101, 225, 241, 66, 7, 54, 124); + RT_INTERFACE!{interface IResourceLoader2(IResourceLoader2Vtbl): IInspectable(IInspectableVtbl) [IID_IResourceLoader2] { + fn GetStringForUri(&mut self, uri: *mut super::super::foundation::Uri, out: *mut HSTRING) -> HRESULT + }} + impl IResourceLoader2 { + #[inline] pub unsafe fn get_string_for_uri(&mut self, uri: &super::super::foundation::Uri) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + let hr = ((*self.lpVtbl).GetStringForUri)(self, uri as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class BarcodeScanner: IBarcodeScanner} - RT_ACTIVATABLE!{IBarcodeScannerStatics [CLSID_BarcodeScanner]} - DEFINE_CLSID!(CLSID_BarcodeScanner = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,66,97,114,99,111,100,101,83,99,97,110,110,101,114,0]); - DEFINE_IID!(IID_IBarcodeScanner, 3198369286, 45668, 20227, 169, 193, 69, 178, 15, 1, 19, 79); - RT_INTERFACE!{interface IBarcodeScanner(IBarcodeScannerVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScanner] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Capabilities(&mut self, out: *mut *mut BarcodeScannerCapabilities) -> HRESULT, - fn ClaimScannerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CheckHealthAsync(&mut self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetSupportedSymbologiesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn IsSymbologySupportedAsync(&mut self, barcodeSymbology: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy6(&mut self) -> (), - #[cfg(feature="windows.storage")] fn RetrieveStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetSupportedProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn IsProfileSupported(&mut self, profile: HSTRING, out: *mut bool) -> HRESULT, - fn add_StatusUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class ResourceLoader: IResourceLoader [IResourceLoaderFactory] [CLSID_ResourceLoader]} + RT_ACTIVATABLE!{IResourceLoaderStatics2 [CLSID_ResourceLoader]} + RT_ACTIVATABLE!{IResourceLoaderStatics [CLSID_ResourceLoader]} + DEFINE_CLSID!(CLSID_ResourceLoader = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,82,101,115,111,117,114,99,101,115,46,82,101,115,111,117,114,99,101,76,111,97,100,101,114,0]); + DEFINE_IID!(IID_IResourceLoaderStatics, 3212279009, 6600, 18882, 149, 60, 71, 233, 34, 123, 51, 78); + RT_INTERFACE!{static interface IResourceLoaderStatics(IResourceLoaderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IResourceLoaderStatics] { + fn GetStringForReference(&mut self, uri: *mut super::super::foundation::Uri, out: *mut HSTRING) -> HRESULT }} - impl IBarcodeScanner { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl IResourceLoaderStatics { + #[inline] pub unsafe fn get_string_for_reference(&mut self, uri: &super::super::foundation::Uri) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).GetStringForReference)(self, uri as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_capabilities(&mut self) -> Result> { + } + DEFINE_IID!(IID_IResourceLoaderStatics2, 213926209, 25702, 18825, 148, 148, 11, 130, 223, 197, 63, 31); + RT_INTERFACE!{static interface IResourceLoaderStatics2(IResourceLoaderStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IResourceLoaderStatics2] { + fn GetForCurrentView(&mut self, out: *mut *mut ResourceLoader) -> HRESULT, + fn GetForCurrentViewWithName(&mut self, name: HSTRING, out: *mut *mut ResourceLoader) -> HRESULT, + fn GetForViewIndependentUse(&mut self, out: *mut *mut ResourceLoader) -> HRESULT, + fn GetForViewIndependentUseWithName(&mut self, name: HSTRING, out: *mut *mut ResourceLoader) -> HRESULT + }} + impl IResourceLoaderStatics2 { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Capabilities)(self, &mut out); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn claim_scanner_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_for_current_view_with_name(&mut self, name: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ClaimScannerAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetForCurrentViewWithName)(self, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn check_health_async(&mut self, level: UnifiedPosHealthCheckLevel) -> Result>> { + #[inline] pub unsafe fn get_for_view_independent_use(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CheckHealthAsync)(self, level, &mut out); + let hr = ((*self.lpVtbl).GetForViewIndependentUse)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_symbologies_async(&mut self) -> Result>>> { + #[inline] pub unsafe fn get_for_view_independent_use_with_name(&mut self, name: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSupportedSymbologiesAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetForViewIndependentUseWithName)(self, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn is_symbology_supported_async(&mut self, barcodeSymbology: u32) -> Result>> { + } + DEFINE_IID!(IID_IResourceLoaderFactory, 3275372035, 27100, 17029, 160, 119, 213, 192, 228, 124, 203, 232); + RT_INTERFACE!{static interface IResourceLoaderFactory(IResourceLoaderFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IResourceLoaderFactory] { + fn CreateResourceLoaderByName(&mut self, name: HSTRING, out: *mut *mut ResourceLoader) -> HRESULT + }} + impl IResourceLoaderFactory { + #[inline] pub unsafe fn create_resource_loader_by_name(&mut self, name: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).IsSymbologySupportedAsync)(self, barcodeSymbology, &mut out); + let hr = ((*self.lpVtbl).CreateResourceLoaderByName)(self, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn retrieve_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + } +pub mod core { // Windows.ApplicationModel.Resources.Core +use ::prelude::*; + RT_STRUCT! { struct ResourceLayoutInfo { + MajorVersion: u32, MinorVersion: u32, ResourceSubtreeCount: u32, NamedResourceCount: u32, Checksum: i32, + }} + DEFINE_IID!(IID_IResourceManager, 4148484475, 39304, 17659, 171, 214, 83, 120, 132, 76, 250, 139); + RT_INTERFACE!{interface IResourceManager(IResourceManagerVtbl): IInspectable(IInspectableVtbl) [IID_IResourceManager] { + fn get_MainResourceMap(&mut self, out: *mut *mut ResourceMap) -> HRESULT, + fn get_AllResourceMaps(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn get_DefaultContext(&mut self, out: *mut *mut ResourceContext) -> HRESULT, + #[cfg(feature="windows.storage")] fn LoadPriFiles(&mut self, files: *mut ::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> HRESULT, + #[cfg(feature="windows.storage")] fn UnloadPriFiles(&mut self, files: *mut ::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> HRESULT + }} + impl IResourceManager { + #[inline] pub unsafe fn get_main_resource_map(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RetrieveStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_MainResourceMap)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_profiles(&mut self) -> Result>> { + #[inline] pub unsafe fn get_all_resource_maps(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSupportedProfiles)(self, &mut out); + let hr = ((*self.lpVtbl).get_AllResourceMaps)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn is_profile_supported(&mut self, profile: &HStringArg) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsProfileSupported)(self, profile.get(), &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_default_context(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DefaultContext)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_status_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_StatusUpdated)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_pri_files(&mut self, files: &::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> Result<()> { + let hr = ((*self.lpVtbl).LoadPriFiles)(self, files as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn remove_status_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_StatusUpdated)(self, token); + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn unload_pri_files(&mut self, files: &::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> Result<()> { + let hr = ((*self.lpVtbl).UnloadPriFiles)(self, files as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class ClaimedBarcodeScanner: IClaimedBarcodeScanner} - DEFINE_IID!(IID_IBarcodeScanner2, 2300662119, 36078, 17261, 137, 171, 141, 251, 67, 187, 66, 134); - RT_INTERFACE!{interface IBarcodeScanner2(IBarcodeScanner2Vtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScanner2] { - fn get_VideoDeviceId(&mut self, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class ResourceMap: IResourceMap} + RT_CLASS!{class ResourceContext: IResourceContext} + RT_ACTIVATABLE!{IResourceContextStatics3 [CLSID_ResourceContext]} + RT_ACTIVATABLE!{IResourceContextStatics2 [CLSID_ResourceContext]} + RT_ACTIVATABLE!{IResourceContextStatics [CLSID_ResourceContext]} + DEFINE_CLSID!(CLSID_ResourceContext = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,82,101,115,111,117,114,99,101,115,46,67,111,114,101,46,82,101,115,111,117,114,99,101,67,111,110,116,101,120,116,0]); + DEFINE_IID!(IID_IResourceManager2, 2640772716, 42199, 19491, 158, 133, 103, 95, 48, 76, 37, 45); + RT_INTERFACE!{interface IResourceManager2(IResourceManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IResourceManager2] { + fn GetAllNamedResourcesForPackage(&mut self, packageName: HSTRING, resourceLayoutInfo: ResourceLayoutInfo, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetAllSubtreesForPackage(&mut self, packageName: HSTRING, resourceLayoutInfo: ResourceLayoutInfo, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT }} - impl IBarcodeScanner2 { - #[inline] pub unsafe fn get_video_device_id(&mut self) -> Result { + impl IResourceManager2 { + #[inline] pub unsafe fn get_all_named_resources_for_package(&mut self, packageName: &HStringArg, resourceLayoutInfo: ResourceLayoutInfo) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VideoDeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetAllNamedResourcesForPackage)(self, packageName.get(), resourceLayoutInfo, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_all_subtrees_for_package(&mut self, packageName: &HStringArg, resourceLayoutInfo: ResourceLayoutInfo) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAllSubtreesForPackage)(self, packageName.get(), resourceLayoutInfo, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_ENUM! { enum MagneticStripeReaderStatus: i32 { - Unauthenticated (MagneticStripeReaderStatus_Unauthenticated) = 0, Authenticated (MagneticStripeReaderStatus_Authenticated) = 1, Extended (MagneticStripeReaderStatus_Extended) = 2, - }} - RT_ENUM! { enum MagneticStripeReaderAuthenticationProtocol: i32 { - None (MagneticStripeReaderAuthenticationProtocol_None) = 0, ChallengeResponse (MagneticStripeReaderAuthenticationProtocol_ChallengeResponse) = 1, - }} - RT_ENUM! { enum MagneticStripeReaderTrackIds: i32 { - None (MagneticStripeReaderTrackIds_None) = 0, Track1 (MagneticStripeReaderTrackIds_Track1) = 1, Track2 (MagneticStripeReaderTrackIds_Track2) = 2, Track3 (MagneticStripeReaderTrackIds_Track3) = 4, Track4 (MagneticStripeReaderTrackIds_Track4) = 8, - }} - RT_ENUM! { enum MagneticStripeReaderErrorReportingType: i32 { - CardLevel (MagneticStripeReaderErrorReportingType_CardLevel) = 0, TrackLevel (MagneticStripeReaderErrorReportingType_TrackLevel) = 1, - }} - RT_ENUM! { enum MagneticStripeReaderTrackErrorType: i32 { - None (MagneticStripeReaderTrackErrorType_None) = 0, StartSentinelError (MagneticStripeReaderTrackErrorType_StartSentinelError) = 1, EndSentinelError (MagneticStripeReaderTrackErrorType_EndSentinelError) = 2, ParityError (MagneticStripeReaderTrackErrorType_ParityError) = 3, LrcError (MagneticStripeReaderTrackErrorType_LrcError) = 4, Unknown (MagneticStripeReaderTrackErrorType_Unknown) = -1, + RT_CLASS!{class NamedResource: INamedResource} + DEFINE_IID!(IID_IResourceManagerStatics, 482409980, 27118, 20035, 153, 1, 71, 241, 38, 135, 186, 247); + RT_INTERFACE!{static interface IResourceManagerStatics(IResourceManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IResourceManagerStatics] { + fn get_Current(&mut self, out: *mut *mut ResourceManager) -> HRESULT, + fn IsResourceReference(&mut self, resourceReference: HSTRING, out: *mut bool) -> HRESULT }} - DEFINE_IID!(IID_IMagneticStripeReaderEncryptionAlgorithmsStatics, 1404400464, 50139, 18260, 156, 0, 65, 57, 35, 116, 161, 9); - RT_INTERFACE!{static interface IMagneticStripeReaderEncryptionAlgorithmsStatics(IMagneticStripeReaderEncryptionAlgorithmsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderEncryptionAlgorithmsStatics] { - fn get_None(&mut self, out: *mut u32) -> HRESULT, - fn get_TripleDesDukpt(&mut self, out: *mut u32) -> HRESULT, - fn get_ExtendedBase(&mut self, out: *mut u32) -> HRESULT - }} - impl IMagneticStripeReaderEncryptionAlgorithmsStatics { - #[inline] pub unsafe fn get_none(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_None)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_triple_des_dukpt(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TripleDesDukpt)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IResourceManagerStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_extended_base(&mut self) -> Result { + #[inline] pub unsafe fn is_resource_reference(&mut self, resourceReference: &HStringArg) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ExtendedBase)(self, &mut out); + let hr = ((*self.lpVtbl).IsResourceReference)(self, resourceReference.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_ACTIVATABLE!{IMagneticStripeReaderEncryptionAlgorithmsStatics [CLSID_MagneticStripeReaderEncryptionAlgorithms]} - DEFINE_CLSID!(CLSID_MagneticStripeReaderEncryptionAlgorithms = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,77,97,103,110,101,116,105,99,83,116,114,105,112,101,82,101,97,100,101,114,69,110,99,114,121,112,116,105,111,110,65,108,103,111,114,105,116,104,109,115,0]); - DEFINE_IID!(IID_IMagneticStripeReaderCardTypesStatics, 1385114717, 10630, 18255, 132, 84, 124, 205, 5, 146, 141, 95); - RT_INTERFACE!{static interface IMagneticStripeReaderCardTypesStatics(IMagneticStripeReaderCardTypesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderCardTypesStatics] { - fn get_Unknown(&mut self, out: *mut u32) -> HRESULT, - fn get_Bank(&mut self, out: *mut u32) -> HRESULT, - fn get_Aamva(&mut self, out: *mut u32) -> HRESULT, - fn get_ExtendedBase(&mut self, out: *mut u32) -> HRESULT + RT_CLASS!{class ResourceManager: IResourceManager} + RT_ACTIVATABLE!{IResourceManagerStatics [CLSID_ResourceManager]} + DEFINE_CLSID!(CLSID_ResourceManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,82,101,115,111,117,114,99,101,115,46,67,111,114,101,46,82,101,115,111,117,114,99,101,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IResourceQualifier, 2019403186, 19197, 17270, 168, 136, 197, 249, 166, 183, 160, 92); + RT_INTERFACE!{interface IResourceQualifier(IResourceQualifierVtbl): IInspectable(IInspectableVtbl) [IID_IResourceQualifier] { + fn get_QualifierName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_QualifierValue(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsDefault(&mut self, out: *mut bool) -> HRESULT, + fn get_IsMatch(&mut self, out: *mut bool) -> HRESULT, + fn get_Score(&mut self, out: *mut f64) -> HRESULT }} - impl IMagneticStripeReaderCardTypesStatics { - #[inline] pub unsafe fn get_unknown(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Unknown)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IResourceQualifier { + #[inline] pub unsafe fn get_qualifier_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_QualifierName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_bank(&mut self) -> Result { + #[inline] pub unsafe fn get_qualifier_value(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_QualifierValue)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_default(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Bank)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsDefault)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_aamva(&mut self) -> Result { + #[inline] pub unsafe fn get_is_match(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Aamva)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsMatch)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_extended_base(&mut self) -> Result { + #[inline] pub unsafe fn get_score(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ExtendedBase)(self, &mut out); + let hr = ((*self.lpVtbl).get_Score)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_ACTIVATABLE!{IMagneticStripeReaderCardTypesStatics [CLSID_MagneticStripeReaderCardTypes]} - DEFINE_CLSID!(CLSID_MagneticStripeReaderCardTypes = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,77,97,103,110,101,116,105,99,83,116,114,105,112,101,82,101,97,100,101,114,67,97,114,100,84,121,112,101,115,0]); - DEFINE_IID!(IID_IMagneticStripeReaderTrackData, 273479281, 19101, 17518, 171, 197, 32, 64, 35, 7, 186, 54); - RT_INTERFACE!{interface IMagneticStripeReaderTrackData(IMagneticStripeReaderTrackDataVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderTrackData] { - #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_DiscretionaryData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_EncryptedData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + RT_CLASS!{class ResourceQualifier: IResourceQualifier} + DEFINE_IID!(IID_IResourceContext, 799158091, 28798, 19239, 173, 13, 208, 216, 205, 70, 143, 210); + RT_INTERFACE!{interface IResourceContext(IResourceContextVtbl): IInspectable(IInspectableVtbl) [IID_IResourceContext] { + fn get_QualifierValues(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IObservableMap) -> HRESULT, + fn Reset(&mut self) -> HRESULT, + fn ResetQualifierValues(&mut self, qualifierNames: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn OverrideToMatch(&mut self, result: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn Clone(&mut self, out: *mut *mut ResourceContext) -> HRESULT, + fn get_Languages(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn put_Languages(&mut self, languages: *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT }} - impl IMagneticStripeReaderTrackData { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + impl IResourceContext { + #[inline] pub unsafe fn get_qualifier_values(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + let hr = ((*self.lpVtbl).get_QualifierValues)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_discretionary_data(&mut self) -> Result> { + #[inline] pub unsafe fn reset(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Reset)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn reset_qualifier_values(&mut self, qualifierNames: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).ResetQualifierValues)(self, qualifierNames as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn override_to_match(&mut self, result: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).OverrideToMatch)(self, result as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clone(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DiscretionaryData)(self, &mut out); + let hr = ((*self.lpVtbl).Clone)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_encrypted_data(&mut self) -> Result> { + #[inline] pub unsafe fn get_languages(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_EncryptedData)(self, &mut out); + let hr = ((*self.lpVtbl).get_Languages)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn set_languages(&mut self, languages: &::rt::gen::windows::foundation::collections::IVectorView) -> Result<()> { + let hr = ((*self.lpVtbl).put_Languages)(self, languages as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - DEFINE_IID!(IID_IMagneticStripeReaderReport, 1784373319, 39344, 16776, 190, 241, 237, 223, 121, 247, 143, 230); - RT_INTERFACE!{interface IMagneticStripeReaderReport(IMagneticStripeReaderReportVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderReport] { - fn get_CardType(&mut self, out: *mut u32) -> HRESULT, - fn get_Track1(&mut self, out: *mut *mut MagneticStripeReaderTrackData) -> HRESULT, - fn get_Track2(&mut self, out: *mut *mut MagneticStripeReaderTrackData) -> HRESULT, - fn get_Track3(&mut self, out: *mut *mut MagneticStripeReaderTrackData) -> HRESULT, - fn get_Track4(&mut self, out: *mut *mut MagneticStripeReaderTrackData) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_CardAuthenticationData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn get_CardAuthenticationDataLength(&mut self, out: *mut u32) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_AdditionalSecurityInformation(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + DEFINE_IID!(IID_IResourceContextStatics, 2562628972, 25400, 19249, 153, 223, 178, 180, 66, 241, 113, 73); + RT_INTERFACE!{static interface IResourceContextStatics(IResourceContextStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IResourceContextStatics] { + fn CreateMatchingContext(&mut self, result: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ResourceContext) -> HRESULT }} - impl IMagneticStripeReaderReport { - #[inline] pub unsafe fn get_card_type(&mut self) -> Result { + impl IResourceContextStatics { + #[inline] pub unsafe fn create_matching_context(&mut self, result: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMatchingContext)(self, result as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IResourceContextStatics2, 1106727663, 4783, 16825, 171, 54, 177, 235, 75, 81, 36, 96); + RT_INTERFACE!{static interface IResourceContextStatics2(IResourceContextStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IResourceContextStatics2] { + fn GetForCurrentView(&mut self, out: *mut *mut ResourceContext) -> HRESULT, + fn SetGlobalQualifierValue(&mut self, key: HSTRING, value: HSTRING) -> HRESULT, + fn ResetGlobalQualifierValues(&mut self) -> HRESULT, + fn ResetGlobalQualifierValuesForSpecifiedQualifiers(&mut self, qualifierNames: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn GetForViewIndependentUse(&mut self, out: *mut *mut ResourceContext) -> HRESULT + }} + impl IResourceContextStatics2 { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_global_qualifier_value(&mut self, key: &HStringArg, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetGlobalQualifierValue)(self, key.get(), value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn reset_global_qualifier_values(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ResetGlobalQualifierValues)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn reset_global_qualifier_values_for_specified_qualifiers(&mut self, qualifierNames: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).ResetGlobalQualifierValuesForSpecifiedQualifiers)(self, qualifierNames as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_for_view_independent_use(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForViewIndependentUse)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum ResourceQualifierPersistence: i32 { + None (ResourceQualifierPersistence_None) = 0, LocalMachine (ResourceQualifierPersistence_LocalMachine) = 1, + }} + DEFINE_IID!(IID_IResourceContextStatics3, 550455596, 44815, 17675, 157, 166, 16, 109, 208, 194, 154, 57); + RT_INTERFACE!{static interface IResourceContextStatics3(IResourceContextStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IResourceContextStatics3] { + fn SetGlobalQualifierValueWithPersistence(&mut self, key: HSTRING, value: HSTRING, persistence: ResourceQualifierPersistence) -> HRESULT + }} + impl IResourceContextStatics3 { + #[inline] pub unsafe fn set_global_qualifier_value_with_persistence(&mut self, key: &HStringArg, value: &HStringArg, persistence: ResourceQualifierPersistence) -> Result<()> { + let hr = ((*self.lpVtbl).SetGlobalQualifierValueWithPersistence)(self, key.get(), value.get(), persistence); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IResourceCandidate, 2941388761, 50227, 18276, 179, 253, 143, 166, 191, 188, 186, 220); + RT_INTERFACE!{interface IResourceCandidate(IResourceCandidateVtbl): IInspectable(IInspectableVtbl) [IID_IResourceCandidate] { + fn get_Qualifiers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_IsMatch(&mut self, out: *mut bool) -> HRESULT, + fn get_IsMatchAsDefault(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDefault(&mut self, out: *mut bool) -> HRESULT, + fn get_ValueAsString(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetValueAsFileAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::StorageFile>) -> HRESULT, + fn GetQualifierValue(&mut self, qualifierName: HSTRING, out: *mut HSTRING) -> HRESULT + }} + impl IResourceCandidate { + #[inline] pub unsafe fn get_qualifiers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Qualifiers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_match(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CardType)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsMatch)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_track1(&mut self) -> Result> { + #[inline] pub unsafe fn get_is_match_as_default(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsMatchAsDefault)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_default(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDefault)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value_as_string(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Track1)(self, &mut out); + let hr = ((*self.lpVtbl).get_ValueAsString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_value_as_file_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetValueAsFileAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_track2(&mut self) -> Result> { + #[inline] pub unsafe fn get_qualifier_value(&mut self, qualifierName: &HStringArg) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Track2)(self, &mut out); + let hr = ((*self.lpVtbl).GetQualifierValue)(self, qualifierName.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IResourceCandidate2, 1776661608, 63228, 16403, 170, 162, 213, 63, 23, 87, 211, 181); + RT_INTERFACE!{interface IResourceCandidate2(IResourceCandidate2Vtbl): IInspectable(IInspectableVtbl) [IID_IResourceCandidate2] { + #[cfg(feature="windows.storage")] fn GetValueAsStreamAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IRandomAccessStream>) -> HRESULT + }} + impl IResourceCandidate2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_value_as_stream_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetValueAsStreamAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_track3(&mut self) -> Result> { + } + RT_CLASS!{class ResourceCandidate: IResourceCandidate} + DEFINE_IID!(IID_INamedResource, 479773209, 2835, 16960, 137, 165, 212, 149, 220, 24, 154, 0); + RT_INTERFACE!{interface INamedResource(INamedResourceVtbl): IInspectable(IInspectableVtbl) [IID_INamedResource] { + fn get_Uri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_Candidates(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn Resolve(&mut self, out: *mut *mut ResourceCandidate) -> HRESULT, + fn ResolveForContext(&mut self, resourceContext: *mut ResourceContext, out: *mut *mut ResourceCandidate) -> HRESULT, + fn ResolveAll(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn ResolveAllForContext(&mut self, resourceContext: *mut ResourceContext, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl INamedResource { + #[inline] pub unsafe fn get_uri(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Track3)(self, &mut out); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_track4(&mut self) -> Result> { + #[inline] pub unsafe fn get_candidates(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Track4)(self, &mut out); + let hr = ((*self.lpVtbl).get_Candidates)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + #[inline] pub unsafe fn resolve(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + let hr = ((*self.lpVtbl).Resolve)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_card_authentication_data(&mut self) -> Result> { + #[inline] pub unsafe fn resolve_for_context(&mut self, resourceContext: &ResourceContext) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CardAuthenticationData)(self, &mut out); + let hr = ((*self.lpVtbl).ResolveForContext)(self, resourceContext as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_card_authentication_data_length(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CardAuthenticationDataLength)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn resolve_all(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ResolveAll)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_additional_security_information(&mut self) -> Result> { + #[inline] pub unsafe fn resolve_all_for_context(&mut self, resourceContext: &ResourceContext) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AdditionalSecurityInformation)(self, &mut out); + let hr = ((*self.lpVtbl).ResolveAllForContext)(self, resourceContext as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class MagneticStripeReaderTrackData: IMagneticStripeReaderTrackData} - DEFINE_IID!(IID_IMagneticStripeReaderBankCardDataReceivedEventArgs, 781551651, 41754, 18275, 136, 44, 35, 114, 94, 57, 176, 142); - RT_INTERFACE!{interface IMagneticStripeReaderBankCardDataReceivedEventArgs(IMagneticStripeReaderBankCardDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderBankCardDataReceivedEventArgs] { - fn get_Report(&mut self, out: *mut *mut MagneticStripeReaderReport) -> HRESULT, - fn get_AccountNumber(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ExpirationDate(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ServiceCode(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_FirstName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_MiddleInitial(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Surname(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Suffix(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IResourceMap, 1915242532, 56204, 17144, 176, 140, 83, 255, 53, 125, 173, 130); + RT_INTERFACE!{interface IResourceMap(IResourceMapVtbl): IInspectable(IInspectableVtbl) [IID_IResourceMap] { + fn get_Uri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn GetValue(&mut self, resource: HSTRING, out: *mut *mut ResourceCandidate) -> HRESULT, + fn GetValueForContext(&mut self, resource: HSTRING, context: *mut ResourceContext, out: *mut *mut ResourceCandidate) -> HRESULT, + fn GetSubtree(&mut self, reference: HSTRING, out: *mut *mut ResourceMap) -> HRESULT }} - impl IMagneticStripeReaderBankCardDataReceivedEventArgs { - #[inline] pub unsafe fn get_report(&mut self) -> Result> { + impl IResourceMap { + #[inline] pub unsafe fn get_uri(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_account_number(&mut self) -> Result { + #[inline] pub unsafe fn get_value(&mut self, resource: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AccountNumber)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetValue)(self, resource.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result { + #[inline] pub unsafe fn get_value_for_context(&mut self, resource: &HStringArg, context: &ResourceContext) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetValueForContext)(self, resource.get(), context as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_service_code(&mut self) -> Result { + #[inline] pub unsafe fn get_subtree(&mut self, reference: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ServiceCode)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetSubtree)(self, reference.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_title(&mut self) -> Result { + } + RT_CLASS!{class ResourceMapIterator: ::rt::gen::windows::foundation::collections::IIterator<::rt::gen::windows::foundation::collections::IKeyValuePair>} + RT_CLASS!{class ResourceMapMapView: ::rt::gen::windows::foundation::collections::IMapView} + RT_CLASS!{class ResourceMapMapViewIterator: ::rt::gen::windows::foundation::collections::IIterator<::rt::gen::windows::foundation::collections::IKeyValuePair>} + RT_CLASS!{class ResourceQualifierObservableMap: ::rt::gen::windows::foundation::collections::IObservableMap} + RT_CLASS!{class ResourceQualifierMapView: ::rt::gen::windows::foundation::collections::IMapView} + RT_CLASS!{class ResourceQualifierVectorView: ::rt::gen::windows::foundation::collections::IVectorView} + RT_CLASS!{class ResourceCandidateVectorView: ::rt::gen::windows::foundation::collections::IVectorView} + RT_CLASS!{class ResourceContextLanguagesVectorView: ::rt::gen::windows::foundation::collections::IVectorView} +} // Windows.ApplicationModel.Resources.Core +pub mod management { // Windows.ApplicationModel.Resources.Management +use ::prelude::*; + RT_STRUCT! { struct ResourceIndexerContract { + + }} + RT_ENUM! { enum IndexedResourceType: i32 { + String (IndexedResourceType_String) = 0, Path (IndexedResourceType_Path) = 1, EmbeddedData (IndexedResourceType_EmbeddedData) = 2, + }} + DEFINE_IID!(IID_IResourceIndexer, 760019365, 58159, 19122, 135, 72, 150, 53, 10, 1, 109, 163); + RT_INTERFACE!{interface IResourceIndexer(IResourceIndexerVtbl): IInspectable(IInspectableVtbl) [IID_IResourceIndexer] { + fn IndexFilePath(&mut self, filePath: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut IndexedResourceCandidate) -> HRESULT, + fn IndexFileContentsAsync(&mut self, file: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + }} + impl IResourceIndexer { + #[inline] pub unsafe fn index_file_path(&mut self, filePath: &::rt::gen::windows::foundation::Uri) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Title)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).IndexFilePath)(self, filePath as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_first_name(&mut self) -> Result { + #[inline] pub unsafe fn index_file_contents_async(&mut self, file: &::rt::gen::windows::foundation::Uri) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FirstName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).IndexFileContentsAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_middle_initial(&mut self) -> Result { + } + RT_CLASS!{class IndexedResourceCandidate: IIndexedResourceCandidate} + DEFINE_IID!(IID_IResourceIndexerFactory, 3101572873, 12749, 19863, 189, 48, 141, 57, 247, 66, 188, 97); + RT_INTERFACE!{static interface IResourceIndexerFactory(IResourceIndexerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IResourceIndexerFactory] { + fn CreateResourceIndexer(&mut self, projectRoot: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ResourceIndexer) -> HRESULT + }} + impl IResourceIndexerFactory { + #[inline] pub unsafe fn create_resource_indexer(&mut self, projectRoot: &::rt::gen::windows::foundation::Uri) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_MiddleInitial)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).CreateResourceIndexer)(self, projectRoot as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_surname(&mut self) -> Result { + } + RT_CLASS!{class ResourceIndexer: IResourceIndexer [IResourceIndexerFactory] [CLSID_ResourceIndexer]} + DEFINE_CLSID!(CLSID_ResourceIndexer = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,82,101,115,111,117,114,99,101,115,46,77,97,110,97,103,101,109,101,110,116,46,82,101,115,111,117,114,99,101,73,110,100,101,120,101,114,0]); + DEFINE_IID!(IID_IResourceIndexerFactory2, 1614868877, 54757, 19296, 146, 1, 205, 39, 156, 188, 254, 217); + RT_INTERFACE!{interface IResourceIndexerFactory2(IResourceIndexerFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_IResourceIndexerFactory2] { + fn CreateResourceIndexerWithExtension(&mut self, projectRoot: *mut ::rt::gen::windows::foundation::Uri, extensionDllPath: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ResourceIndexer) -> HRESULT + }} + impl IResourceIndexerFactory2 { + #[inline] pub unsafe fn create_resource_indexer_with_extension(&mut self, projectRoot: &::rt::gen::windows::foundation::Uri, extensionDllPath: &::rt::gen::windows::foundation::Uri) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Surname)(self, &mut out); + let hr = ((*self.lpVtbl).CreateResourceIndexerWithExtension)(self, projectRoot as *const _ as *mut _, extensionDllPath as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IIndexedResourceQualifier, 3672357787, 54020, 18815, 161, 104, 163, 64, 4, 44, 138, 219); + RT_INTERFACE!{interface IIndexedResourceQualifier(IIndexedResourceQualifierVtbl): IInspectable(IInspectableVtbl) [IID_IIndexedResourceQualifier] { + fn get_QualifierName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_QualifierValue(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IIndexedResourceQualifier { + #[inline] pub unsafe fn get_qualifier_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_QualifierName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_suffix(&mut self) -> Result { + #[inline] pub unsafe fn get_qualifier_value(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Suffix)(self, &mut out); + let hr = ((*self.lpVtbl).get_QualifierValue)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class MagneticStripeReaderReport: IMagneticStripeReaderReport} - DEFINE_IID!(IID_IMagneticStripeReaderAamvaCardDataReceivedEventArgs, 172735825, 49942, 18704, 135, 243, 122, 98, 186, 134, 45, 49); - RT_INTERFACE!{interface IMagneticStripeReaderAamvaCardDataReceivedEventArgs(IMagneticStripeReaderAamvaCardDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderAamvaCardDataReceivedEventArgs] { - fn get_Report(&mut self, out: *mut *mut MagneticStripeReaderReport) -> HRESULT, - fn get_LicenseNumber(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ExpirationDate(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Restrictions(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Class(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Endorsements(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_BirthDate(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_FirstName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Surname(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Suffix(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Gender(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_HairColor(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_EyeColor(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Height(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Weight(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Address(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_City(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_State(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_PostalCode(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IIndexedResourceCandidate, 241278707, 64236, 17428, 169, 215, 84, 172, 213, 149, 63, 41); + RT_INTERFACE!{interface IIndexedResourceCandidate(IIndexedResourceCandidateVtbl): IInspectable(IInspectableVtbl) [IID_IIndexedResourceCandidate] { + fn get_Type(&mut self, out: *mut IndexedResourceType) -> HRESULT, + fn get_Uri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_Metadata(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn get_Qualifiers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_ValueAsString(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetQualifierValue(&mut self, qualifierName: HSTRING, out: *mut HSTRING) -> HRESULT }} - impl IMagneticStripeReaderAamvaCardDataReceivedEventArgs { - #[inline] pub unsafe fn get_report(&mut self) -> Result> { + impl IIndexedResourceCandidate { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uri(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_license_number(&mut self) -> Result { + #[inline] pub unsafe fn get_metadata(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_LicenseNumber)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Metadata)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result { + #[inline] pub unsafe fn get_qualifiers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Qualifiers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_restrictions(&mut self) -> Result { + #[inline] pub unsafe fn get_value_as_string(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Restrictions)(self, &mut out); + let hr = ((*self.lpVtbl).get_ValueAsString)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_class(&mut self) -> Result { + #[inline] pub unsafe fn get_qualifier_value(&mut self, qualifierName: &HStringArg) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Class)(self, &mut out); + let hr = ((*self.lpVtbl).GetQualifierValue)(self, qualifierName.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_endorsements(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Endorsements)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + RT_CLASS!{class IndexedResourceQualifier: IIndexedResourceQualifier} +} // Windows.ApplicationModel.Resources.Management +} // Windows.ApplicationModel.Resources +pub mod store { // Windows.ApplicationModel.Store +use ::prelude::*; + RT_ENUM! { enum ProductPurchaseStatus: i32 { + Succeeded (ProductPurchaseStatus_Succeeded) = 0, AlreadyPurchased (ProductPurchaseStatus_AlreadyPurchased) = 1, NotFulfilled (ProductPurchaseStatus_NotFulfilled) = 2, NotPurchased (ProductPurchaseStatus_NotPurchased) = 3, + }} + RT_ENUM! { enum ProductType: i32 { + Unknown (ProductType_Unknown) = 0, Durable (ProductType_Durable) = 1, Consumable (ProductType_Consumable) = 2, + }} + RT_ENUM! { enum FulfillmentResult: i32 { + Succeeded (FulfillmentResult_Succeeded) = 0, NothingToFulfill (FulfillmentResult_NothingToFulfill) = 1, PurchasePending (FulfillmentResult_PurchasePending) = 2, PurchaseReverted (FulfillmentResult_PurchaseReverted) = 3, ServerError (FulfillmentResult_ServerError) = 4, + }} + DEFINE_IID!(IID_LicenseChangedEventHandler, 3567583829, 4969, 19510, 131, 47, 111, 45, 136, 227, 101, 155); + RT_DELEGATE!{delegate LicenseChangedEventHandler(LicenseChangedEventHandlerVtbl, LicenseChangedEventHandlerImpl) [IID_LicenseChangedEventHandler] { + fn Invoke(&mut self) -> HRESULT + }} + impl LicenseChangedEventHandler { + #[inline] pub unsafe fn invoke(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_birth_date(&mut self) -> Result { + } + DEFINE_IID!(IID_ICurrentApp, 3576545381, 55871, 18053, 153, 94, 155, 72, 46, 181, 230, 3); + RT_INTERFACE!{static interface ICurrentApp(ICurrentAppVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentApp] { + fn get_LicenseInformation(&mut self, out: *mut *mut LicenseInformation) -> HRESULT, + fn get_LinkUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_AppId(&mut self, out: *mut Guid) -> HRESULT, + fn RequestAppPurchaseAsync(&mut self, includeReceipt: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseAsync(&mut self, productId: HSTRING, includeReceipt: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn LoadListingInformationAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAppReceiptAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetProductReceiptAsync(&mut self, productId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICurrentApp { + #[inline] pub unsafe fn get_license_information(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BirthDate)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_LicenseInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_first_name(&mut self) -> Result { + #[inline] pub unsafe fn get_link_uri(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FirstName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_LinkUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_surname(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Surname)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_app_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AppId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_suffix(&mut self) -> Result { + #[inline] pub unsafe fn request_app_purchase_async(&mut self, includeReceipt: bool) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Suffix)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).RequestAppPurchaseAsync)(self, includeReceipt, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_gender(&mut self) -> Result { + #[inline] pub unsafe fn request_product_purchase_async(&mut self, productId: &HStringArg, includeReceipt: bool) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Gender)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).RequestProductPurchaseAsync)(self, productId.get(), includeReceipt, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_hair_color(&mut self) -> Result { + #[inline] pub unsafe fn load_listing_information_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_HairColor)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).LoadListingInformationAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_eye_color(&mut self) -> Result { + #[inline] pub unsafe fn get_app_receipt_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_EyeColor)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetAppReceiptAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_height(&mut self) -> Result { + #[inline] pub unsafe fn get_product_receipt_async(&mut self, productId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Height)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetProductReceiptAsync)(self, productId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_weight(&mut self) -> Result { + } + RT_CLASS!{class LicenseInformation: ILicenseInformation} + RT_CLASS!{class ListingInformation: IListingInformation} + DEFINE_IID!(IID_ICurrentAppWithConsumables, 2219704433, 40527, 20345, 153, 90, 95, 145, 23, 46, 108, 239); + RT_INTERFACE!{static interface ICurrentAppWithConsumables(ICurrentAppWithConsumablesVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentAppWithConsumables] { + fn ReportConsumableFulfillmentAsync(&mut self, productId: HSTRING, transactionId: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseWithResultsAsync(&mut self, productId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseWithDisplayPropertiesAsync(&mut self, productId: HSTRING, offerId: HSTRING, displayProperties: *mut ProductPurchaseDisplayProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetUnfulfilledConsumablesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl ICurrentAppWithConsumables { + #[inline] pub unsafe fn report_consumable_fulfillment_async(&mut self, productId: &HStringArg, transactionId: Guid) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Weight)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ReportConsumableFulfillmentAsync)(self, productId.get(), transactionId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_address(&mut self) -> Result { + #[inline] pub unsafe fn request_product_purchase_with_results_async(&mut self, productId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Address)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).RequestProductPurchaseWithResultsAsync)(self, productId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_city(&mut self) -> Result { + #[inline] pub unsafe fn request_product_purchase_with_display_properties_async(&mut self, productId: &HStringArg, offerId: &HStringArg, displayProperties: &ProductPurchaseDisplayProperties) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_City)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).RequestProductPurchaseWithDisplayPropertiesAsync)(self, productId.get(), offerId.get(), displayProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_state(&mut self) -> Result { + #[inline] pub unsafe fn get_unfulfilled_consumables_async(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_State)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetUnfulfilledConsumablesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_postal_code(&mut self) -> Result { + } + RT_CLASS!{class PurchaseResults: IPurchaseResults} + RT_CLASS!{class ProductPurchaseDisplayProperties: IProductPurchaseDisplayProperties [IProductPurchaseDisplayPropertiesFactory] [CLSID_ProductPurchaseDisplayProperties]} + DEFINE_CLSID!(CLSID_ProductPurchaseDisplayProperties = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,83,116,111,114,101,46,80,114,111,100,117,99,116,80,117,114,99,104,97,115,101,68,105,115,112,108,97,121,80,114,111,112,101,114,116,105,101,115,0]); + RT_CLASS!{class UnfulfilledConsumable: IUnfulfilledConsumable} + DEFINE_IID!(IID_ICurrentAppWithCampaignId, 825183440, 14017, 17574, 179, 43, 67, 45, 96, 142, 77, 214); + RT_INTERFACE!{static interface ICurrentAppWithCampaignId(ICurrentAppWithCampaignIdVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentAppWithCampaignId] { + fn GetAppPurchaseCampaignIdAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICurrentAppWithCampaignId { + #[inline] pub unsafe fn get_app_purchase_campaign_id_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PostalCode)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetAppPurchaseCampaignIdAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs, 2936689940, 22988, 19040, 153, 232, 153, 165, 61, 172, 229, 170); - RT_INTERFACE!{interface IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs(IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs] { - fn get_Report(&mut self, out: *mut *mut MagneticStripeReaderReport) -> HRESULT + DEFINE_IID!(IID_ICurrentApp2Statics, 3746459181, 12657, 19155, 134, 20, 44, 97, 36, 67, 115, 203); + RT_INTERFACE!{static interface ICurrentApp2Statics(ICurrentApp2StaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentApp2Statics] { + fn GetCustomerPurchaseIdAsync(&mut self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetCustomerCollectionsIdAsync(&mut self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { - #[inline] pub unsafe fn get_report(&mut self) -> Result> { + impl ICurrentApp2Statics { + #[inline] pub unsafe fn get_customer_purchase_id_async(&mut self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + let hr = ((*self.lpVtbl).GetCustomerPurchaseIdAsync)(self, serviceTicket.get(), publisherUserId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_customer_collections_id_async(&mut self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCustomerCollectionsIdAsync)(self, serviceTicket.get(), publisherUserId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IMagneticStripeReaderErrorOccurredEventArgs, 535689565, 11396, 16813, 183, 120, 242, 53, 106, 120, 154, 177); - RT_INTERFACE!{interface IMagneticStripeReaderErrorOccurredEventArgs(IMagneticStripeReaderErrorOccurredEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderErrorOccurredEventArgs] { - fn get_Track1Status(&mut self, out: *mut MagneticStripeReaderTrackErrorType) -> HRESULT, - fn get_Track2Status(&mut self, out: *mut MagneticStripeReaderTrackErrorType) -> HRESULT, - fn get_Track3Status(&mut self, out: *mut MagneticStripeReaderTrackErrorType) -> HRESULT, - fn get_Track4Status(&mut self, out: *mut MagneticStripeReaderTrackErrorType) -> HRESULT, - fn get_ErrorData(&mut self, out: *mut *mut UnifiedPosErrorData) -> HRESULT, - fn get_PartialInputData(&mut self, out: *mut *mut MagneticStripeReaderReport) -> HRESULT + DEFINE_IID!(IID_ICurrentAppSimulator, 4051672497, 29901, 18311, 151, 135, 25, 134, 110, 154, 85, 89); + RT_INTERFACE!{static interface ICurrentAppSimulator(ICurrentAppSimulatorVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentAppSimulator] { + fn get_LicenseInformation(&mut self, out: *mut *mut LicenseInformation) -> HRESULT, + fn get_LinkUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_AppId(&mut self, out: *mut Guid) -> HRESULT, + fn RequestAppPurchaseAsync(&mut self, includeReceipt: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseAsync(&mut self, productId: HSTRING, includeReceipt: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn LoadListingInformationAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAppReceiptAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetProductReceiptAsync(&mut self, productId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn ReloadSimulatorAsync(&mut self, simulatorSettingsFile: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT }} - impl IMagneticStripeReaderErrorOccurredEventArgs { - #[inline] pub unsafe fn get_track1_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Track1Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl ICurrentAppSimulator { + #[inline] pub unsafe fn get_license_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LicenseInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_track2_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Track2Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_link_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LinkUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_track3_status(&mut self) -> Result { + #[inline] pub unsafe fn get_app_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Track3Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_track4_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Track4Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn request_app_purchase_async(&mut self, includeReceipt: bool) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAppPurchaseAsync)(self, includeReceipt, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_error_data(&mut self) -> Result> { + #[inline] pub unsafe fn request_product_purchase_async(&mut self, productId: &HStringArg, includeReceipt: bool) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ErrorData)(self, &mut out); + let hr = ((*self.lpVtbl).RequestProductPurchaseAsync)(self, productId.get(), includeReceipt, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_partial_input_data(&mut self) -> Result> { + #[inline] pub unsafe fn load_listing_information_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PartialInputData)(self, &mut out); + let hr = ((*self.lpVtbl).LoadListingInformationAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_receipt_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAppReceiptAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_product_receipt_async(&mut self, productId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetProductReceiptAsync)(self, productId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn reload_simulator_async(&mut self, simulatorSettingsFile: &super::super::storage::StorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReloadSimulatorAsync)(self, simulatorSettingsFile as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IMagneticStripeReaderStatusUpdatedEventArgs, 164391856, 12898, 16413, 158, 138, 232, 13, 99, 88, 144, 107); - RT_INTERFACE!{interface IMagneticStripeReaderStatusUpdatedEventArgs(IMagneticStripeReaderStatusUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderStatusUpdatedEventArgs] { - fn get_Status(&mut self, out: *mut MagneticStripeReaderStatus) -> HRESULT, - fn get_ExtendedStatus(&mut self, out: *mut u32) -> HRESULT + DEFINE_IID!(IID_ICurrentAppSimulatorWithCampaignId, 2221378115, 57088, 18034, 164, 63, 178, 91, 20, 65, 207, 207); + RT_INTERFACE!{static interface ICurrentAppSimulatorWithCampaignId(ICurrentAppSimulatorWithCampaignIdVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentAppSimulatorWithCampaignId] { + fn GetAppPurchaseCampaignIdAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IMagneticStripeReaderStatusUpdatedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result { + impl ICurrentAppSimulatorWithCampaignId { + #[inline] pub unsafe fn get_app_purchase_campaign_id_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAppPurchaseCampaignIdAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICurrentAppSimulatorWithConsumables, 1313992875, 8423, 17426, 155, 133, 89, 187, 120, 56, 134, 103); + RT_INTERFACE!{static interface ICurrentAppSimulatorWithConsumables(ICurrentAppSimulatorWithConsumablesVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentAppSimulatorWithConsumables] { + fn ReportConsumableFulfillmentAsync(&mut self, productId: HSTRING, transactionId: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseWithResultsAsync(&mut self, productId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseWithDisplayPropertiesAsync(&mut self, productId: HSTRING, offerId: HSTRING, displayProperties: *mut ProductPurchaseDisplayProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetUnfulfilledConsumablesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl ICurrentAppSimulatorWithConsumables { + #[inline] pub unsafe fn report_consumable_fulfillment_async(&mut self, productId: &HStringArg, transactionId: Guid) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportConsumableFulfillmentAsync)(self, productId.get(), transactionId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_product_purchase_with_results_async(&mut self, productId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestProductPurchaseWithResultsAsync)(self, productId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_product_purchase_with_display_properties_async(&mut self, productId: &HStringArg, offerId: &HStringArg, displayProperties: &ProductPurchaseDisplayProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestProductPurchaseWithDisplayPropertiesAsync)(self, productId.get(), offerId.get(), displayProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_unfulfilled_consumables_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetUnfulfilledConsumablesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPurchaseResults, 3981489022, 34390, 20325, 184, 200, 172, 126, 12, 177, 161, 194); + RT_INTERFACE!{interface IPurchaseResults(IPurchaseResultsVtbl): IInspectable(IInspectableVtbl) [IID_IPurchaseResults] { + fn get_Status(&mut self, out: *mut ProductPurchaseStatus) -> HRESULT, + fn get_TransactionId(&mut self, out: *mut Guid) -> HRESULT, + fn get_ReceiptXml(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_OfferId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPurchaseResults { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_extended_status(&mut self) -> Result { + #[inline] pub unsafe fn get_transaction_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ExtendedStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_TransactionId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn get_receipt_xml(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ReceiptXml)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_offer_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OfferId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } } - RT_CLASS!{class MagneticStripeReaderBankCardDataReceivedEventArgs: IMagneticStripeReaderBankCardDataReceivedEventArgs} - RT_CLASS!{class MagneticStripeReaderAamvaCardDataReceivedEventArgs: IMagneticStripeReaderAamvaCardDataReceivedEventArgs} - RT_CLASS!{class MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs: IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs} - RT_CLASS!{class MagneticStripeReaderErrorOccurredEventArgs: IMagneticStripeReaderErrorOccurredEventArgs} - RT_CLASS!{class MagneticStripeReaderStatusUpdatedEventArgs: IMagneticStripeReaderStatusUpdatedEventArgs} - DEFINE_IID!(IID_IMagneticStripeReaderCapabilities, 1898479772, 50240, 17570, 164, 103, 70, 145, 117, 208, 40, 150); - RT_INTERFACE!{interface IMagneticStripeReaderCapabilities(IMagneticStripeReaderCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderCapabilities] { - fn get_CardAuthentication(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_SupportedEncryptionAlgorithms(&mut self, out: *mut u32) -> HRESULT, - fn get_AuthenticationLevel(&mut self, out: *mut MagneticStripeReaderAuthenticationLevel) -> HRESULT, - fn get_IsIsoSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsJisOneSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsJisTwoSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_PowerReportingType(&mut self, out: *mut UnifiedPosPowerReportingType) -> HRESULT, - fn get_IsStatisticsReportingSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsStatisticsUpdatingSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsTrackDataMaskingSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsTransmitSentinelsSupported(&mut self, out: *mut bool) -> HRESULT + DEFINE_IID!(IID_ILicenseInformation, 2394414128, 61808, 20181, 142, 33, 21, 22, 218, 63, 211, 103); + RT_INTERFACE!{interface ILicenseInformation(ILicenseInformationVtbl): IInspectable(IInspectableVtbl) [IID_ILicenseInformation] { + fn get_ProductLicenses(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn get_IsTrial(&mut self, out: *mut bool) -> HRESULT, + fn get_ExpirationDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn add_LicenseChanged(&mut self, handler: *mut LicenseChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LicenseChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT }} - impl IMagneticStripeReaderCapabilities { - #[inline] pub unsafe fn get_card_authentication(&mut self) -> Result { + impl ILicenseInformation { + #[inline] pub unsafe fn get_product_licenses(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CardAuthentication)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ProductLicenses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_encryption_algorithms(&mut self) -> Result { + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SupportedEncryptionAlgorithms)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_authentication_level(&mut self) -> Result { + #[inline] pub unsafe fn get_is_trial(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AuthenticationLevel)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsTrial)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_iso_supported(&mut self) -> Result { + #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsIsoSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_jis_one_supported(&mut self) -> Result { + #[inline] pub unsafe fn add_license_changed(&mut self, handler: &LicenseChangedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsJisOneSupported)(self, &mut out); + let hr = ((*self.lpVtbl).add_LicenseChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_jis_two_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsJisTwoSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_license_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LicenseChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_power_reporting_type(&mut self) -> Result { + } + RT_CLASS!{class ProductLicense: IProductLicense} + DEFINE_IID!(IID_IProductLicense, 909314247, 11215, 19470, 143, 47, 232, 8, 170, 168, 249, 157); + RT_INTERFACE!{interface IProductLicense(IProductLicenseVtbl): IInspectable(IInspectableVtbl) [IID_IProductLicense] { + fn get_ProductId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn get_ExpirationDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT + }} + impl IProductLicense { + #[inline] pub unsafe fn get_product_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProductId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PowerReportingType)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_statistics_reporting_supported(&mut self) -> Result { + #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_statistics_updating_supported(&mut self) -> Result { + } + DEFINE_IID!(IID_IListingInformation, 1485523647, 48244, 17283, 183, 140, 153, 96, 99, 35, 222, 206); + RT_INTERFACE!{interface IListingInformation(IListingInformationVtbl): IInspectable(IInspectableVtbl) [IID_IListingInformation] { + fn get_CurrentMarket(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ProductListings(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_FormattedPrice(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AgeRating(&mut self, out: *mut u32) -> HRESULT + }} + impl IListingInformation { + #[inline] pub unsafe fn get_current_market(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentMarket)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_product_listings(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProductListings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_formatted_price(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FormattedPrice)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_age_rating(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_AgeRating)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_track_data_masking_supported(&mut self) -> Result { + } + RT_CLASS!{class ProductListing: IProductListing} + DEFINE_IID!(IID_IListingInformation2, 3237817373, 45838, 17284, 132, 234, 114, 254, 250, 130, 34, 62); + RT_INTERFACE!{interface IListingInformation2(IListingInformation2Vtbl): IInspectable(IInspectableVtbl) [IID_IListingInformation2] { + fn get_FormattedBasePrice(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SaleEndDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_IsOnSale(&mut self, out: *mut bool) -> HRESULT, + fn get_CurrencyCode(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IListingInformation2 { + #[inline] pub unsafe fn get_formatted_base_price(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FormattedBasePrice)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sale_end_date(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsTrackDataMaskingSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_SaleEndDate)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_transmit_sentinels_supported(&mut self) -> Result { + #[inline] pub unsafe fn get_is_on_sale(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsTransmitSentinelsSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsOnSale)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn get_currency_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrencyCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } } - RT_CLASS!{class MagneticStripeReaderCapabilities: IMagneticStripeReaderCapabilities} - RT_CLASS!{class ClaimedMagneticStripeReader: IClaimedMagneticStripeReader} - DEFINE_IID!(IID_IMagneticStripeReaderStatics, 3294604106, 61399, 18272, 165, 206, 21, 176, 228, 126, 148, 235); - RT_INTERFACE!{static interface IMagneticStripeReaderStatics(IMagneticStripeReaderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderStatics] { - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IProductListing, 1168627373, 51024, 19868, 148, 124, 176, 13, 203, 249, 233, 194); + RT_INTERFACE!{interface IProductListing(IProductListingVtbl): IInspectable(IInspectableVtbl) [IID_IProductListing] { + fn get_ProductId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FormattedPrice(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IMagneticStripeReaderStatics { - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + impl IProductListing { + #[inline] pub unsafe fn get_product_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ProductId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn get_formatted_price(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_FormattedPrice)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + #[inline] pub unsafe fn get_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class MagneticStripeReader: IMagneticStripeReader} - RT_ACTIVATABLE!{IMagneticStripeReaderStatics [CLSID_MagneticStripeReader]} - DEFINE_CLSID!(CLSID_MagneticStripeReader = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,77,97,103,110,101,116,105,99,83,116,114,105,112,101,82,101,97,100,101,114,0]); - DEFINE_IID!(IID_IMagneticStripeReader, 445820949, 18371, 18058, 147, 51, 12, 101, 23, 87, 72, 131); - RT_INTERFACE!{interface IMagneticStripeReader(IMagneticStripeReaderVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReader] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Capabilities(&mut self, out: *mut *mut MagneticStripeReaderCapabilities) -> HRESULT, - fn get_SupportedCardTypes(&mut self, outSize: *mut u32, out: *mut *mut u32) -> HRESULT, - fn get_DeviceAuthenticationProtocol(&mut self, out: *mut MagneticStripeReaderAuthenticationProtocol) -> HRESULT, - fn CheckHealthAsync(&mut self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ClaimReaderAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy6(&mut self) -> (), - #[cfg(feature="windows.storage")] fn RetrieveStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetErrorReportingType(&mut self, out: *mut MagneticStripeReaderErrorReportingType) -> HRESULT, - fn add_StatusUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_IProductListingWithConsumables, 3953039248, 36715, 18463, 147, 167, 92, 58, 99, 6, 129, 73); + RT_INTERFACE!{interface IProductListingWithConsumables(IProductListingWithConsumablesVtbl): IInspectable(IInspectableVtbl) [IID_IProductListingWithConsumables] { + fn get_ProductType(&mut self, out: *mut ProductType) -> HRESULT }} - impl IMagneticStripeReader { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + impl IProductListingWithConsumables { + #[inline] pub unsafe fn get_product_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProductType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_capabilities(&mut self) -> Result> { + } + DEFINE_IID!(IID_IProductListing2, 4171114767, 29694, 18765, 169, 57, 8, 169, 178, 73, 90, 190); + RT_INTERFACE!{interface IProductListing2(IProductListing2Vtbl): IInspectable(IInspectableVtbl) [IID_IProductListing2] { + fn get_FormattedBasePrice(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SaleEndDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_IsOnSale(&mut self, out: *mut bool) -> HRESULT, + fn get_CurrencyCode(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IProductListing2 { + #[inline] pub unsafe fn get_formatted_base_price(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Capabilities)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_FormattedBasePrice)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_card_types(&mut self) -> Result> { - let mut outSize = 0; let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedCardTypes)(self, &mut outSize, &mut out); - if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + #[inline] pub unsafe fn get_sale_end_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SaleEndDate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_authentication_protocol(&mut self) -> Result { + #[inline] pub unsafe fn get_is_on_sale(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DeviceAuthenticationProtocol)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsOnSale)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn check_health_async(&mut self, level: UnifiedPosHealthCheckLevel) -> Result>> { + #[inline] pub unsafe fn get_currency_code(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CheckHealthAsync)(self, level, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_CurrencyCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn claim_reader_async(&mut self) -> Result>> { + } + DEFINE_IID!(IID_ICurrentAppStaticsWithFiltering, 3547161922, 36997, 17294, 151, 186, 162, 92, 151, 107, 226, 253); + RT_INTERFACE!{static interface ICurrentAppStaticsWithFiltering(ICurrentAppStaticsWithFilteringVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentAppStaticsWithFiltering] { + fn LoadListingInformationByProductIdsAsync(&mut self, productIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn LoadListingInformationByKeywordsAsync(&mut self, keywords: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ReportProductFulfillment(&mut self, productId: HSTRING) -> HRESULT + }} + impl ICurrentAppStaticsWithFiltering { + #[inline] pub unsafe fn load_listing_information_by_product_ids_async(&mut self, productIds: &super::super::foundation::collections::IIterable) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ClaimReaderAsync)(self, &mut out); + let hr = ((*self.lpVtbl).LoadListingInformationByProductIdsAsync)(self, productIds as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn retrieve_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub unsafe fn load_listing_information_by_keywords_async(&mut self, keywords: &super::super::foundation::collections::IIterable) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RetrieveStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).LoadListingInformationByKeywordsAsync)(self, keywords as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_error_reporting_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetErrorReportingType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_status_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_StatusUpdated)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_StatusUpdated)(self, token); + #[inline] pub unsafe fn report_product_fulfillment(&mut self, productId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ReportProductFulfillment)(self, productId.get()); if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IPosPrinterCharacterSetIdsStatics, 1550884607, 28826, 20455, 178, 21, 6, 167, 72, 163, 139, 57); - RT_INTERFACE!{static interface IPosPrinterCharacterSetIdsStatics(IPosPrinterCharacterSetIdsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterCharacterSetIdsStatics] { - fn get_Utf16LE(&mut self, out: *mut u32) -> HRESULT, - fn get_Ascii(&mut self, out: *mut u32) -> HRESULT, - fn get_Ansi(&mut self, out: *mut u32) -> HRESULT + DEFINE_IID!(IID_ICurrentAppSimulatorStaticsWithFiltering, 1635676386, 63599, 19284, 150, 102, 221, 226, 133, 9, 44, 104); + RT_INTERFACE!{static interface ICurrentAppSimulatorStaticsWithFiltering(ICurrentAppSimulatorStaticsWithFilteringVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentAppSimulatorStaticsWithFiltering] { + fn LoadListingInformationByProductIdsAsync(&mut self, productIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn LoadListingInformationByKeywordsAsync(&mut self, keywords: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IPosPrinterCharacterSetIdsStatics { - #[inline] pub unsafe fn get_utf16_le(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Utf16LE)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl ICurrentAppSimulatorStaticsWithFiltering { + #[inline] pub unsafe fn load_listing_information_by_product_ids_async(&mut self, productIds: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadListingInformationByProductIdsAsync)(self, productIds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ascii(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ascii)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn load_listing_information_by_keywords_async(&mut self, keywords: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadListingInformationByKeywordsAsync)(self, keywords as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_ansi(&mut self) -> Result { + } + DEFINE_IID!(IID_IProductLicenseWithFulfillment, 4233321610, 63079, 16627, 186, 60, 4, 90, 99, 171, 179, 172); + RT_INTERFACE!{interface IProductLicenseWithFulfillment(IProductLicenseWithFulfillmentVtbl): IInspectable(IInspectableVtbl) [IID_IProductLicenseWithFulfillment] { + fn get_IsConsumable(&mut self, out: *mut bool) -> HRESULT + }} + impl IProductLicenseWithFulfillment { + #[inline] pub unsafe fn get_is_consumable(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Ansi)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsConsumable)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_ACTIVATABLE!{IPosPrinterCharacterSetIdsStatics [CLSID_PosPrinterCharacterSetIds]} - DEFINE_CLSID!(CLSID_PosPrinterCharacterSetIds = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,80,111,115,80,114,105,110,116,101,114,67,104,97,114,97,99,116,101,114,83,101,116,73,100,115,0]); - DEFINE_IID!(IID_ICommonPosPrintStationCapabilities, 3730526922, 57390, 16617, 158, 94, 27, 72, 142, 106, 172, 252); - RT_INTERFACE!{interface ICommonPosPrintStationCapabilities(ICommonPosPrintStationCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ICommonPosPrintStationCapabilities] { - fn get_IsPrinterPresent(&mut self, out: *mut bool) -> HRESULT, - fn get_IsDualColorSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_ColorCartridgeCapabilities(&mut self, out: *mut PosPrinterColorCapabilities) -> HRESULT, - fn get_CartridgeSensors(&mut self, out: *mut PosPrinterCartridgeSensors) -> HRESULT, - fn get_IsBoldSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsItalicSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsUnderlineSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsDoubleHighPrintSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsDoubleWidePrintSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsDoubleHighDoubleWidePrintSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsPaperEmptySensorSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsPaperNearEndSensorSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_SupportedCharactersPerLine(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + DEFINE_IID!(IID_IProductListingWithMetadata, 307078503, 9208, 16958, 149, 50, 24, 153, 67, 196, 10, 206); + RT_INTERFACE!{interface IProductListingWithMetadata(IProductListingWithMetadataVtbl): IInspectable(IInspectableVtbl) [IID_IProductListingWithMetadata] { + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Keywords(&mut self, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn get_ProductType(&mut self, out: *mut ProductType) -> HRESULT, + fn get_Tag(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ImageUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT }} - impl ICommonPosPrintStationCapabilities { - #[inline] pub unsafe fn get_is_printer_present(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsPrinterPresent)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IProductListingWithMetadata { + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_dual_color_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDualColorSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_keywords(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Keywords)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_color_cartridge_capabilities(&mut self) -> Result { + #[inline] pub unsafe fn get_product_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ColorCartridgeCapabilities)(self, &mut out); + let hr = ((*self.lpVtbl).get_ProductType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_cartridge_sensors(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CartridgeSensors)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_bold_supported(&mut self) -> Result { + #[inline] pub unsafe fn get_image_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ImageUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUnfulfilledConsumable, 771226555, 7389, 19640, 160, 20, 123, 156, 248, 152, 105, 39); + RT_INTERFACE!{interface IUnfulfilledConsumable(IUnfulfilledConsumableVtbl): IInspectable(IInspectableVtbl) [IID_IUnfulfilledConsumable] { + fn get_ProductId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TransactionId(&mut self, out: *mut Guid) -> HRESULT, + fn get_OfferId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IUnfulfilledConsumable { + #[inline] pub unsafe fn get_product_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProductId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transaction_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsBoldSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_TransactionId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_italic_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsItalicSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_offer_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OfferId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_underline_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsUnderlineSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IProductPurchaseDisplayProperties, 3607852064, 48274, 16411, 168, 9, 201, 178, 229, 219, 189, 175); + RT_INTERFACE!{interface IProductPurchaseDisplayProperties(IProductPurchaseDisplayPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IProductPurchaseDisplayProperties] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT, + fn get_Image(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_Image(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT + }} + impl IProductPurchaseDisplayProperties { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_double_high_print_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDoubleHighPrintSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_double_wide_print_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDoubleWidePrintSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_double_high_double_wide_print_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDoubleHighDoubleWidePrintSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_paper_empty_sensor_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsPaperEmptySensorSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_image(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Image)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_paper_near_end_sensor_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsPaperNearEndSensorSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_image(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Image)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_characters_per_line(&mut self) -> Result>> { + } + DEFINE_IID!(IID_IProductPurchaseDisplayPropertiesFactory, 1867062772, 13014, 19264, 180, 116, 184, 48, 56, 164, 217, 207); + RT_INTERFACE!{static interface IProductPurchaseDisplayPropertiesFactory(IProductPurchaseDisplayPropertiesFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IProductPurchaseDisplayPropertiesFactory] { + fn CreateProductPurchaseDisplayProperties(&mut self, name: HSTRING, out: *mut *mut ProductPurchaseDisplayProperties) -> HRESULT + }} + impl IProductPurchaseDisplayPropertiesFactory { + #[inline] pub unsafe fn create_product_purchase_display_properties(&mut self, name: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedCharactersPerLine)(self, &mut out); + let hr = ((*self.lpVtbl).CreateProductPurchaseDisplayProperties)(self, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ICommonReceiptSlipCapabilities, 153643915, 39027, 19717, 191, 190, 71, 39, 166, 3, 143, 105); - RT_INTERFACE!{interface ICommonReceiptSlipCapabilities(ICommonReceiptSlipCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ICommonReceiptSlipCapabilities] { - fn get_IsBarcodeSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsBitmapSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsLeft90RotationSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsRight90RotationSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_Is180RotationSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsPrintAreaSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_RuledLineCapabilities(&mut self, out: *mut PosPrinterRuledLineCapabilities) -> HRESULT, - fn get_SupportedBarcodeRotations(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedBitmapRotations(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + RT_ACTIVATABLE!{ICurrentAppStaticsWithFiltering [CLSID_CurrentApp]} + RT_ACTIVATABLE!{ICurrentAppWithCampaignId [CLSID_CurrentApp]} + RT_ACTIVATABLE!{ICurrentApp [CLSID_CurrentApp]} + RT_ACTIVATABLE!{ICurrentApp2Statics [CLSID_CurrentApp]} + RT_ACTIVATABLE!{ICurrentAppWithConsumables [CLSID_CurrentApp]} + DEFINE_CLSID!(CLSID_CurrentApp = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,83,116,111,114,101,46,67,117,114,114,101,110,116,65,112,112,0]); + RT_ACTIVATABLE!{ICurrentAppSimulatorWithCampaignId [CLSID_CurrentAppSimulator]} + RT_ACTIVATABLE!{ICurrentAppSimulator [CLSID_CurrentAppSimulator]} + RT_ACTIVATABLE!{ICurrentAppSimulatorStaticsWithFiltering [CLSID_CurrentAppSimulator]} + RT_ACTIVATABLE!{ICurrentAppSimulatorWithConsumables [CLSID_CurrentAppSimulator]} + DEFINE_CLSID!(CLSID_CurrentAppSimulator = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,83,116,111,114,101,46,67,117,114,114,101,110,116,65,112,112,83,105,109,117,108,97,116,111,114,0]); +pub mod preview { // Windows.ApplicationModel.Store.Preview +use ::prelude::*; + RT_ENUM! { enum StorePreviewProductPurchaseStatus: i32 { + Succeeded (StorePreviewProductPurchaseStatus_Succeeded) = 0, AlreadyPurchased (StorePreviewProductPurchaseStatus_AlreadyPurchased) = 1, NotFulfilled (StorePreviewProductPurchaseStatus_NotFulfilled) = 2, NotPurchased (StorePreviewProductPurchaseStatus_NotPurchased) = 3, }} - impl ICommonReceiptSlipCapabilities { - #[inline] pub unsafe fn get_is_barcode_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsBarcodeSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + RT_ENUM! { enum StoreSystemFeature: i32 { + ArchitectureX86 (StoreSystemFeature_ArchitectureX86) = 0, ArchitectureX64 (StoreSystemFeature_ArchitectureX64) = 1, ArchitectureArm (StoreSystemFeature_ArchitectureArm) = 2, DirectX9 (StoreSystemFeature_DirectX9) = 3, DirectX10 (StoreSystemFeature_DirectX10) = 4, DirectX11 (StoreSystemFeature_DirectX11) = 5, D3D12HardwareFL11 (StoreSystemFeature_D3D12HardwareFL11) = 6, D3D12HardwareFL12 (StoreSystemFeature_D3D12HardwareFL12) = 7, Memory300MB (StoreSystemFeature_Memory300MB) = 8, Memory750MB (StoreSystemFeature_Memory750MB) = 9, Memory1GB (StoreSystemFeature_Memory1GB) = 10, Memory2GB (StoreSystemFeature_Memory2GB) = 11, CameraFront (StoreSystemFeature_CameraFront) = 12, CameraRear (StoreSystemFeature_CameraRear) = 13, Gyroscope (StoreSystemFeature_Gyroscope) = 14, Hover (StoreSystemFeature_Hover) = 15, Magnetometer (StoreSystemFeature_Magnetometer) = 16, Nfc (StoreSystemFeature_Nfc) = 17, Resolution720P (StoreSystemFeature_Resolution720P) = 18, ResolutionWvga (StoreSystemFeature_ResolutionWvga) = 19, ResolutionWvgaOr720P (StoreSystemFeature_ResolutionWvgaOr720P) = 20, ResolutionWxga (StoreSystemFeature_ResolutionWxga) = 21, ResolutionWvgaOrWxga (StoreSystemFeature_ResolutionWvgaOrWxga) = 22, ResolutionWxgaOr720P (StoreSystemFeature_ResolutionWxgaOr720P) = 23, Memory4GB (StoreSystemFeature_Memory4GB) = 24, Memory6GB (StoreSystemFeature_Memory6GB) = 25, Memory8GB (StoreSystemFeature_Memory8GB) = 26, Memory12GB (StoreSystemFeature_Memory12GB) = 27, Memory16GB (StoreSystemFeature_Memory16GB) = 28, Memory20GB (StoreSystemFeature_Memory20GB) = 29, VideoMemory2GB (StoreSystemFeature_VideoMemory2GB) = 30, VideoMemory4GB (StoreSystemFeature_VideoMemory4GB) = 31, VideoMemory6GB (StoreSystemFeature_VideoMemory6GB) = 32, VideoMemory1GB (StoreSystemFeature_VideoMemory1GB) = 33, + }} + RT_ENUM! { enum StoreLogOptions: u32 { + None (StoreLogOptions_None) = 0, TryElevate (StoreLogOptions_TryElevate) = 1, + }} + DEFINE_IID!(IID_IStorePreviewProductInfo, 423091123, 27649, 19613, 133, 205, 91, 171, 170, 194, 179, 81); + RT_INTERFACE!{interface IStorePreviewProductInfo(IStorePreviewProductInfoVtbl): IInspectable(IInspectableVtbl) [IID_IStorePreviewProductInfo] { + fn get_ProductId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ProductType(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SkuInfoList(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IStorePreviewProductInfo { + #[inline] pub unsafe fn get_product_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProductId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_bitmap_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsBitmapSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_product_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProductType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_left90_rotation_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsLeft90RotationSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_right90_rotation_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsRight90RotationSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is180_rotation_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Is180RotationSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_sku_info_list(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SkuInfoList)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_print_area_supported(&mut self) -> Result { + } + RT_CLASS!{class StorePreviewSkuInfo: IStorePreviewSkuInfo} + DEFINE_IID!(IID_IStorePreviewSkuInfo, 2180871906, 2854, 18649, 152, 206, 39, 70, 28, 102, 157, 108); + RT_INTERFACE!{interface IStorePreviewSkuInfo(IStorePreviewSkuInfoVtbl): IInspectable(IInspectableVtbl) [IID_IStorePreviewSkuInfo] { + fn get_ProductId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SkuId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SkuType(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CustomDeveloperData(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CurrencyCode(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FormattedListPrice(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ExtendedData(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStorePreviewSkuInfo { + #[inline] pub unsafe fn get_product_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProductId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sku_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SkuId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sku_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SkuType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_developer_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomDeveloperData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_currency_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrencyCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_formatted_list_price(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FormattedListPrice)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorePreviewPurchaseResults, 2967121617, 54981, 20051, 160, 67, 251, 160, 216, 230, 18, 49); + RT_INTERFACE!{interface IStorePreviewPurchaseResults(IStorePreviewPurchaseResultsVtbl): IInspectable(IInspectableVtbl) [IID_IStorePreviewPurchaseResults] { + fn get_ProductPurchaseStatus(&mut self, out: *mut StorePreviewProductPurchaseStatus) -> HRESULT + }} + impl IStorePreviewPurchaseResults { + #[inline] pub unsafe fn get_product_purchase_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsPrintAreaSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_ProductPurchaseStatus)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ruled_line_capabilities(&mut self) -> Result { + } + DEFINE_IID!(IID_IStorePreview, 2316661313, 33806, 18857, 188, 1, 93, 91, 1, 251, 200, 233); + RT_INTERFACE!{static interface IStorePreview(IStorePreviewVtbl): IInspectable(IInspectableVtbl) [IID_IStorePreview] { + fn RequestProductPurchaseByProductIdAndSkuIdAsync(&mut self, productId: HSTRING, skuId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn LoadAddOnProductInfosAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + }} + impl IStorePreview { + #[inline] pub unsafe fn request_product_purchase_by_product_id_and_sku_id_async(&mut self, productId: &HStringArg, skuId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestProductPurchaseByProductIdAndSkuIdAsync)(self, productId.get(), skuId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn load_add_on_product_infos_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadAddOnProductInfosAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StorePreviewPurchaseResults: IStorePreviewPurchaseResults} + RT_CLASS!{class StorePreviewProductInfo: IStorePreviewProductInfo} + DEFINE_IID!(IID_IStoreHardwareManufacturerInfo, 4069710856, 50772, 17324, 162, 31, 52, 128, 28, 157, 51, 136); + RT_INTERFACE!{interface IStoreHardwareManufacturerInfo(IStoreHardwareManufacturerInfoVtbl): IInspectable(IInspectableVtbl) [IID_IStoreHardwareManufacturerInfo] { + fn get_HardwareManufacturerId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_StoreContentModifierId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ModelName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ManufacturerName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStoreHardwareManufacturerInfo { + #[inline] pub unsafe fn get_hardware_manufacturer_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HardwareManufacturerId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_store_content_modifier_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StoreContentModifierId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_model_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ModelName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manufacturer_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ManufacturerName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreConfigurationStatics, 1922006976, 34344, 17132, 132, 162, 7, 120, 14, 180, 77, 139); + RT_INTERFACE!{static interface IStoreConfigurationStatics(IStoreConfigurationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStoreConfigurationStatics] { + fn SetSystemConfiguration(&mut self, catalogHardwareManufacturerId: HSTRING, catalogStoreContentModifierId: HSTRING, systemConfigurationExpiration: ::rt::gen::windows::foundation::DateTime, catalogHardwareDescriptor: HSTRING) -> HRESULT, + fn SetMobileOperatorConfiguration(&mut self, mobileOperatorId: HSTRING, appDownloadLimitInMegabytes: u32, updateDownloadLimitInMegabytes: u32) -> HRESULT, + fn SetStoreWebAccountId(&mut self, webAccountId: HSTRING) -> HRESULT, + fn IsStoreWebAccountId(&mut self, webAccountId: HSTRING, out: *mut bool) -> HRESULT, + fn get_HardwareManufacturerInfo(&mut self, out: *mut *mut StoreHardwareManufacturerInfo) -> HRESULT, + fn FilterUnsupportedSystemFeaturesAsync(&mut self, systemFeatures: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + }} + impl IStoreConfigurationStatics { + #[inline] pub unsafe fn set_system_configuration(&mut self, catalogHardwareManufacturerId: &HStringArg, catalogStoreContentModifierId: &HStringArg, systemConfigurationExpiration: ::rt::gen::windows::foundation::DateTime, catalogHardwareDescriptor: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetSystemConfiguration)(self, catalogHardwareManufacturerId.get(), catalogStoreContentModifierId.get(), systemConfigurationExpiration, catalogHardwareDescriptor.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_mobile_operator_configuration(&mut self, mobileOperatorId: &HStringArg, appDownloadLimitInMegabytes: u32, updateDownloadLimitInMegabytes: u32) -> Result<()> { + let hr = ((*self.lpVtbl).SetMobileOperatorConfiguration)(self, mobileOperatorId.get(), appDownloadLimitInMegabytes, updateDownloadLimitInMegabytes); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_store_web_account_id(&mut self, webAccountId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetStoreWebAccountId)(self, webAccountId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn is_store_web_account_id(&mut self, webAccountId: &HStringArg) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RuledLineCapabilities)(self, &mut out); + let hr = ((*self.lpVtbl).IsStoreWebAccountId)(self, webAccountId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_barcode_rotations(&mut self) -> Result>> { + #[inline] pub unsafe fn get_hardware_manufacturer_info(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedBarcodeRotations)(self, &mut out); + let hr = ((*self.lpVtbl).get_HardwareManufacturerInfo)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_bitmap_rotations(&mut self) -> Result>> { + #[inline] pub unsafe fn filter_unsupported_system_features_async(&mut self, systemFeatures: &::rt::gen::windows::foundation::collections::IIterable) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedBitmapRotations)(self, &mut out); + let hr = ((*self.lpVtbl).FilterUnsupportedSystemFeaturesAsync)(self, systemFeatures as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IReceiptPrinterCapabilities, 3102782863, 20904, 17404, 155, 213, 141, 226, 114, 166, 65, 91); - RT_INTERFACE!{interface IReceiptPrinterCapabilities(IReceiptPrinterCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IReceiptPrinterCapabilities] { - fn get_CanCutPaper(&mut self, out: *mut bool) -> HRESULT, - fn get_IsStampSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_MarkFeedCapabilities(&mut self, out: *mut PosPrinterMarkFeedCapabilities) -> HRESULT + RT_CLASS!{class StoreHardwareManufacturerInfo: IStoreHardwareManufacturerInfo} + DEFINE_IID!(IID_IStoreConfigurationStatics2, 1702643093, 51383, 20457, 159, 76, 77, 113, 2, 125, 52, 126); + RT_INTERFACE!{static interface IStoreConfigurationStatics2(IStoreConfigurationStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IStoreConfigurationStatics2] { + fn get_PurchasePromptingPolicy(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_PurchasePromptingPolicy(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT }} - impl IReceiptPrinterCapabilities { - #[inline] pub unsafe fn get_can_cut_paper(&mut self) -> Result { + impl IStoreConfigurationStatics2 { + #[inline] pub unsafe fn get_purchase_prompting_policy(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PurchasePromptingPolicy)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_purchase_prompting_policy(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_PurchasePromptingPolicy)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreConfigurationStatics3, 1833301372, 61764, 19637, 157, 63, 78, 176, 94, 48, 182, 211); + RT_INTERFACE!{static interface IStoreConfigurationStatics3(IStoreConfigurationStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IStoreConfigurationStatics3] { + fn HasStoreWebAccount(&mut self, out: *mut bool) -> HRESULT, + #[cfg(feature="windows.system")] fn HasStoreWebAccountForUser(&mut self, user: *mut ::rt::gen::windows::system::User, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetStoreLogDataAsync(&mut self, options: StoreLogOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IRandomAccessStreamReference>) -> HRESULT, + #[cfg(feature="windows.system")] fn SetStoreWebAccountIdForUser(&mut self, user: *mut ::rt::gen::windows::system::User, webAccountId: HSTRING) -> HRESULT, + #[cfg(feature="windows.system")] fn IsStoreWebAccountIdForUser(&mut self, user: *mut ::rt::gen::windows::system::User, webAccountId: HSTRING, out: *mut bool) -> HRESULT, + #[cfg(feature="windows.system")] fn GetPurchasePromptingPolicyForUser(&mut self, user: *mut ::rt::gen::windows::system::User, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + #[cfg(feature="windows.system")] fn SetPurchasePromptingPolicyForUser(&mut self, user: *mut ::rt::gen::windows::system::User, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + }} + impl IStoreConfigurationStatics3 { + #[inline] pub unsafe fn has_store_web_account(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CanCutPaper)(self, &mut out); + let hr = ((*self.lpVtbl).HasStoreWebAccount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_stamp_supported(&mut self) -> Result { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn has_store_web_account_for_user(&mut self, user: &::rt::gen::windows::system::User) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStampSupported)(self, &mut out); + let hr = ((*self.lpVtbl).HasStoreWebAccountForUser)(self, user as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_mark_feed_capabilities(&mut self) -> Result { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_store_log_data_async(&mut self, options: StoreLogOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStoreLogDataAsync)(self, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_store_web_account_id_for_user(&mut self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetStoreWebAccountIdForUser)(self, user as *const _ as *mut _, webAccountId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn is_store_web_account_id_for_user(&mut self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MarkFeedCapabilities)(self, &mut out); + let hr = ((*self.lpVtbl).IsStoreWebAccountIdForUser)(self, user as *const _ as *mut _, webAccountId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_purchase_prompting_policy_for_user(&mut self, user: &::rt::gen::windows::system::User) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPurchasePromptingPolicyForUser)(self, user as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_purchase_prompting_policy_for_user(&mut self, user: &::rt::gen::windows::system::User, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).SetPurchasePromptingPolicyForUser)(self, user as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class ReceiptPrinterCapabilities: IReceiptPrinterCapabilities} - DEFINE_IID!(IID_ISlipPrinterCapabilities, 2578539417, 18572, 16727, 138, 194, 159, 87, 247, 8, 211, 219); - RT_INTERFACE!{interface ISlipPrinterCapabilities(ISlipPrinterCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ISlipPrinterCapabilities] { - fn get_IsFullLengthSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsBothSidesPrintingSupported(&mut self, out: *mut bool) -> HRESULT + RT_ACTIVATABLE!{IStorePreview [CLSID_StorePreview]} + DEFINE_CLSID!(CLSID_StorePreview = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,83,116,111,114,101,46,80,114,101,118,105,101,119,46,83,116,111,114,101,80,114,101,118,105,101,119,0]); + RT_ACTIVATABLE!{IStoreConfigurationStatics2 [CLSID_StoreConfiguration]} + RT_ACTIVATABLE!{IStoreConfigurationStatics [CLSID_StoreConfiguration]} + RT_ACTIVATABLE!{IStoreConfigurationStatics3 [CLSID_StoreConfiguration]} + DEFINE_CLSID!(CLSID_StoreConfiguration = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,83,116,111,114,101,46,80,114,101,118,105,101,119,46,83,116,111,114,101,67,111,110,102,105,103,117,114,97,116,105,111,110,0]); +pub mod installcontrol { // Windows.ApplicationModel.Store.Preview.InstallControl +use ::prelude::*; + RT_ENUM! { enum AppInstallState: i32 { + Pending (AppInstallState_Pending) = 0, Starting (AppInstallState_Starting) = 1, AcquiringLicense (AppInstallState_AcquiringLicense) = 2, Downloading (AppInstallState_Downloading) = 3, RestoringData (AppInstallState_RestoringData) = 4, Installing (AppInstallState_Installing) = 5, Completed (AppInstallState_Completed) = 6, Canceled (AppInstallState_Canceled) = 7, Paused (AppInstallState_Paused) = 8, Error (AppInstallState_Error) = 9, PausedLowBattery (AppInstallState_PausedLowBattery) = 10, PausedWiFiRecommended (AppInstallState_PausedWiFiRecommended) = 11, PausedWiFiRequired (AppInstallState_PausedWiFiRequired) = 12, ReadyToDownload (AppInstallState_ReadyToDownload) = 13, }} - impl ISlipPrinterCapabilities { - #[inline] pub unsafe fn get_is_full_length_supported(&mut self) -> Result { + DEFINE_IID!(IID_IAppInstallStatus, 2473446650, 9296, 16678, 136, 177, 97, 39, 166, 68, 221, 92); + RT_INTERFACE!{interface IAppInstallStatus(IAppInstallStatusVtbl): IInspectable(IInspectableVtbl) [IID_IAppInstallStatus] { + fn get_InstallState(&mut self, out: *mut AppInstallState) -> HRESULT, + fn get_DownloadSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_BytesDownloaded(&mut self, out: *mut u64) -> HRESULT, + fn get_PercentComplete(&mut self, out: *mut f64) -> HRESULT, + fn get_ErrorCode(&mut self, out: *mut ::rt::gen::windows::foundation::HResult) -> HRESULT + }} + impl IAppInstallStatus { + #[inline] pub unsafe fn get_install_state(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsFullLengthSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_InstallState)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_both_sides_printing_supported(&mut self) -> Result { + #[inline] pub unsafe fn get_download_size_in_bytes(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsBothSidesPrintingSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_DownloadSizeInBytes)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class SlipPrinterCapabilities: ISlipPrinterCapabilities} - DEFINE_IID!(IID_IJournalPrinterCapabilities, 995937347, 57415, 17507, 187, 88, 23, 181, 186, 29, 128, 86); - RT_INTERFACE!{interface IJournalPrinterCapabilities(IJournalPrinterCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IJournalPrinterCapabilities] { - - }} - RT_CLASS!{class JournalPrinterCapabilities: IJournalPrinterCapabilities} - DEFINE_IID!(IID_IPosPrinterCapabilities, 3454621473, 17280, 18821, 173, 197, 57, 219, 48, 205, 147, 188); - RT_INTERFACE!{interface IPosPrinterCapabilities(IPosPrinterCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterCapabilities] { - fn get_PowerReportingType(&mut self, out: *mut UnifiedPosPowerReportingType) -> HRESULT, - fn get_IsStatisticsReportingSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsStatisticsUpdatingSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_DefaultCharacterSet(&mut self, out: *mut u32) -> HRESULT, - fn get_HasCoverSensor(&mut self, out: *mut bool) -> HRESULT, - fn get_CanMapCharacterSet(&mut self, out: *mut bool) -> HRESULT, - fn get_IsTransactionSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_Receipt(&mut self, out: *mut *mut ReceiptPrinterCapabilities) -> HRESULT, - fn get_Slip(&mut self, out: *mut *mut SlipPrinterCapabilities) -> HRESULT, - fn get_Journal(&mut self, out: *mut *mut JournalPrinterCapabilities) -> HRESULT - }} - impl IPosPrinterCapabilities { - #[inline] pub unsafe fn get_power_reporting_type(&mut self) -> Result { + #[inline] pub unsafe fn get_bytes_downloaded(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PowerReportingType)(self, &mut out); + let hr = ((*self.lpVtbl).get_BytesDownloaded)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_statistics_reporting_supported(&mut self) -> Result { + #[inline] pub unsafe fn get_percent_complete(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_PercentComplete)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_statistics_updating_supported(&mut self) -> Result { + #[inline] pub unsafe fn get_error_code(&mut self) -> Result<::rt::gen::windows::foundation::HResult> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_default_character_set(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DefaultCharacterSet)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IAppInstallStatus2, 2531754378, 24210, 19113, 142, 220, 88, 254, 212, 184, 126, 0); + RT_INTERFACE!{interface IAppInstallStatus2(IAppInstallStatus2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppInstallStatus2] { + #[cfg(not(feature="windows.system"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut ::rt::gen::windows::system::User) -> HRESULT, + fn get_ReadyForLaunch(&mut self, out: *mut bool) -> HRESULT + }} + impl IAppInstallStatus2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_has_cover_sensor(&mut self) -> Result { + #[inline] pub unsafe fn get_ready_for_launch(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HasCoverSensor)(self, &mut out); + let hr = ((*self.lpVtbl).get_ReadyForLaunch)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_can_map_character_set(&mut self) -> Result { + } + RT_CLASS!{class AppInstallStatus: IAppInstallStatus} + RT_ENUM! { enum AppInstallType: i32 { + Install (AppInstallType_Install) = 0, Update (AppInstallType_Update) = 1, Repair (AppInstallType_Repair) = 2, + }} + DEFINE_IID!(IID_IAppInstallItem, 1238622123, 5770, 19647, 169, 58, 158, 68, 140, 130, 115, 125); + RT_INTERFACE!{interface IAppInstallItem(IAppInstallItemVtbl): IInspectable(IInspectableVtbl) [IID_IAppInstallItem] { + fn get_ProductId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_InstallType(&mut self, out: *mut AppInstallType) -> HRESULT, + fn get_IsUserInitiated(&mut self, out: *mut bool) -> HRESULT, + fn GetCurrentStatus(&mut self, out: *mut *mut AppInstallStatus) -> HRESULT, + fn Cancel(&mut self) -> HRESULT, + fn Pause(&mut self) -> HRESULT, + fn Restart(&mut self) -> HRESULT, + fn add_Completed(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_StatusChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAppInstallItem { + #[inline] pub unsafe fn get_product_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProductId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_package_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_install_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CanMapCharacterSet)(self, &mut out); + let hr = ((*self.lpVtbl).get_InstallType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_transaction_supported(&mut self) -> Result { + #[inline] pub unsafe fn get_is_user_initiated(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsTransactionSupported)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsUserInitiated)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_receipt(&mut self) -> Result> { + #[inline] pub unsafe fn get_current_status(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Receipt)(self, &mut out); + let hr = ((*self.lpVtbl).GetCurrentStatus)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_slip(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Slip)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn cancel(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Cancel)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_journal(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Journal)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn pause(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Pause)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class PosPrinterCapabilities: IPosPrinterCapabilities} - DEFINE_IID!(IID_IPosPrinterStatus, 3522217776, 55872, 17192, 191, 118, 81, 86, 250, 51, 183, 71); - RT_INTERFACE!{interface IPosPrinterStatus(IPosPrinterStatusVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterStatus] { - fn get_StatusKind(&mut self, out: *mut PosPrinterStatusKind) -> HRESULT, - fn get_ExtendedStatus(&mut self, out: *mut u32) -> HRESULT - }} - impl IPosPrinterStatus { - #[inline] pub unsafe fn get_status_kind(&mut self) -> Result { + #[inline] pub unsafe fn restart(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Restart)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_StatusKind)(self, &mut out); + let hr = ((*self.lpVtbl).add_Completed)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_extended_status(&mut self) -> Result { + #[inline] pub unsafe fn remove_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Completed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_status_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ExtendedStatus)(self, &mut out); + let hr = ((*self.lpVtbl).add_StatusChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn remove_status_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class PosPrinterStatus: IPosPrinterStatus} - DEFINE_IID!(IID_IPosPrinterStatusUpdatedEventArgs, 786139103, 5030, 17037, 186, 129, 176, 231, 195, 229, 163, 205); - RT_INTERFACE!{interface IPosPrinterStatusUpdatedEventArgs(IPosPrinterStatusUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterStatusUpdatedEventArgs] { - fn get_Status(&mut self, out: *mut *mut PosPrinterStatus) -> HRESULT + RT_CLASS!{class AppInstallItem: IAppInstallItem} + DEFINE_IID!(IID_IAppInstallItem2, 3549899512, 16576, 20439, 170, 108, 10, 161, 60, 166, 24, 140); + RT_INTERFACE!{interface IAppInstallItem2(IAppInstallItem2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppInstallItem2] { + fn CancelWithTelemetry(&mut self, correlationVector: HSTRING) -> HRESULT, + fn PauseWithTelemetry(&mut self, correlationVector: HSTRING) -> HRESULT, + fn RestartWithTelemetry(&mut self, correlationVector: HSTRING) -> HRESULT }} - impl IPosPrinterStatusUpdatedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result> { + impl IAppInstallItem2 { + #[inline] pub unsafe fn cancel_with_telemetry(&mut self, correlationVector: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).CancelWithTelemetry)(self, correlationVector.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn pause_with_telemetry(&mut self, correlationVector: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).PauseWithTelemetry)(self, correlationVector.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn restart_with_telemetry(&mut self, correlationVector: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RestartWithTelemetry)(self, correlationVector.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAppInstallManagerItemEventArgs, 3159381827, 18036, 19921, 149, 126, 194, 86, 130, 8, 106, 20); + RT_INTERFACE!{interface IAppInstallManagerItemEventArgs(IAppInstallManagerItemEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppInstallManagerItemEventArgs] { + fn get_Item(&mut self, out: *mut *mut AppInstallItem) -> HRESULT + }} + impl IAppInstallManagerItemEventArgs { + #[inline] pub unsafe fn get_item(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_Item)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PosPrinterStatusUpdatedEventArgs: IPosPrinterStatusUpdatedEventArgs} - DEFINE_IID!(IID_IPosPrinterReleaseDeviceRequestedEventArgs, 734765913, 7407, 16562, 158, 203, 249, 39, 248, 86, 174, 60); - RT_INTERFACE!{interface IPosPrinterReleaseDeviceRequestedEventArgs(IPosPrinterReleaseDeviceRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterReleaseDeviceRequestedEventArgs] { - + RT_CLASS!{class AppInstallManagerItemEventArgs: IAppInstallManagerItemEventArgs} + RT_ENUM! { enum AutoUpdateSetting: i32 { + Disabled (AutoUpdateSetting_Disabled) = 0, Enabled (AutoUpdateSetting_Enabled) = 1, DisabledByPolicy (AutoUpdateSetting_DisabledByPolicy) = 2, EnabledByPolicy (AutoUpdateSetting_EnabledByPolicy) = 3, }} - RT_CLASS!{class PosPrinterReleaseDeviceRequestedEventArgs: IPosPrinterReleaseDeviceRequestedEventArgs} - DEFINE_IID!(IID_IPosPrinterStatics, 2363544810, 4911, 19679, 166, 74, 45, 13, 124, 150, 168, 91); - RT_INTERFACE!{static interface IPosPrinterStatics(IPosPrinterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterStatics] { - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IAppInstallManager, 2471747952, 33857, 19269, 189, 114, 124, 47, 169, 37, 190, 238); + RT_INTERFACE!{interface IAppInstallManager(IAppInstallManagerVtbl): IInspectable(IInspectableVtbl) [IID_IAppInstallManager] { + fn get_AppInstallItems(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn Cancel(&mut self, productId: HSTRING) -> HRESULT, + fn Pause(&mut self, productId: HSTRING) -> HRESULT, + fn Restart(&mut self, productId: HSTRING) -> HRESULT, + fn add_ItemCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ItemStatusChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemStatusChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_AutoUpdateSetting(&mut self, out: *mut AutoUpdateSetting) -> HRESULT, + fn put_AutoUpdateSetting(&mut self, value: AutoUpdateSetting) -> HRESULT, + fn get_AcquisitionIdentity(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AcquisitionIdentity(&mut self, value: HSTRING) -> HRESULT, + fn GetIsApplicableAsync(&mut self, productId: HSTRING, skuId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn StartAppInstallAsync(&mut self, productId: HSTRING, skuId: HSTRING, repair: bool, forceUseOfNonRemovableStorage: bool, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn UpdateAppByPackageFamilyNameAsync(&mut self, packageFamilyName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn SearchForUpdatesAsync(&mut self, productId: HSTRING, skuId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn SearchForAllUpdatesAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn IsStoreBlockedByPolicyAsync(&mut self, storeClientName: HSTRING, storeClientPublisher: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetIsAppAllowedToInstallAsync(&mut self, productId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT }} - impl IPosPrinterStatics { - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + impl IAppInstallManager { + #[inline] pub unsafe fn get_app_install_items(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppInstallItems)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn cancel(&mut self, productId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).Cancel)(self, productId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn pause(&mut self, productId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).Pause)(self, productId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class PosPrinter: IPosPrinter} - RT_ACTIVATABLE!{IPosPrinterStatics [CLSID_PosPrinter]} - DEFINE_CLSID!(CLSID_PosPrinter = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,80,111,115,80,114,105,110,116,101,114,0]); - DEFINE_IID!(IID_IPosPrinter, 704889102, 39449, 18945, 153, 79, 18, 223, 173, 106, 220, 191); - RT_INTERFACE!{interface IPosPrinter(IPosPrinterVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinter] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Capabilities(&mut self, out: *mut *mut PosPrinterCapabilities) -> HRESULT, - fn get_SupportedCharacterSets(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedTypeFaces(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Status(&mut self, out: *mut *mut PosPrinterStatus) -> HRESULT, - fn ClaimPrinterAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CheckHealthAsync(&mut self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_StatusUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IPosPrinter { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn restart(&mut self, productId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).Restart)(self, productId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_item_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ItemCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_item_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ItemCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_item_status_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ItemStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_item_status_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ItemStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_update_setting(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoUpdateSetting)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_update_setting(&mut self, value: AutoUpdateSetting) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoUpdateSetting)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_acquisition_identity(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_AcquisitionIdentity)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_capabilities(&mut self) -> Result> { + #[inline] pub unsafe fn set_acquisition_identity(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AcquisitionIdentity)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_applicable_async(&mut self, productId: &HStringArg, skuId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Capabilities)(self, &mut out); + let hr = ((*self.lpVtbl).GetIsApplicableAsync)(self, productId.get(), skuId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_character_sets(&mut self) -> Result>> { + #[inline] pub unsafe fn start_app_install_async(&mut self, productId: &HStringArg, skuId: &HStringArg, repair: bool, forceUseOfNonRemovableStorage: bool) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedCharacterSets)(self, &mut out); + let hr = ((*self.lpVtbl).StartAppInstallAsync)(self, productId.get(), skuId.get(), repair, forceUseOfNonRemovableStorage, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_type_faces(&mut self) -> Result>> { + #[inline] pub unsafe fn update_app_by_package_family_name_async(&mut self, packageFamilyName: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedTypeFaces)(self, &mut out); + let hr = ((*self.lpVtbl).UpdateAppByPackageFamilyNameAsync)(self, packageFamilyName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result> { + #[inline] pub unsafe fn search_for_updates_async(&mut self, productId: &HStringArg, skuId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).SearchForUpdatesAsync)(self, productId.get(), skuId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn claim_printer_async(&mut self) -> Result>> { + #[inline] pub unsafe fn search_for_all_updates_async(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ClaimPrinterAsync)(self, &mut out); + let hr = ((*self.lpVtbl).SearchForAllUpdatesAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn check_health_async(&mut self, level: UnifiedPosHealthCheckLevel) -> Result>> { + #[inline] pub unsafe fn is_store_blocked_by_policy_async(&mut self, storeClientName: &HStringArg, storeClientPublisher: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CheckHealthAsync)(self, level, &mut out); + let hr = ((*self.lpVtbl).IsStoreBlockedByPolicyAsync)(self, storeClientName.get(), storeClientPublisher.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub unsafe fn get_is_app_allowed_to_install_async(&mut self, productId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).GetIsAppAllowedToInstallAsync)(self, productId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_status_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_StatusUpdated)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_StatusUpdated)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } } - RT_CLASS!{class ClaimedPosPrinter: IClaimedPosPrinter} - DEFINE_IID!(IID_IPosPrinterJob, 2593390684, 1557, 17809, 165, 143, 48, 248, 126, 223, 226, 228); - RT_INTERFACE!{interface IPosPrinterJob(IPosPrinterJobVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterJob] { - fn Print(&mut self, data: HSTRING) -> HRESULT, - fn PrintLine(&mut self, data: HSTRING) -> HRESULT, - fn PrintNewline(&mut self) -> HRESULT, - fn ExecuteAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class AppInstallManager: IAppInstallManager} + DEFINE_IID!(IID_IAppInstallManager2, 378763345, 60727, 18445, 131, 20, 82, 226, 124, 3, 240, 74); + RT_INTERFACE!{interface IAppInstallManager2(IAppInstallManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppInstallManager2] { + fn StartAppInstallWithTelemetryAsync(&mut self, productId: HSTRING, skuId: HSTRING, repair: bool, forceUseOfNonRemovableStorage: bool, catalogId: HSTRING, bundleId: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn UpdateAppByPackageFamilyNameWithTelemetryAsync(&mut self, packageFamilyName: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn SearchForUpdatesWithTelemetryAsync(&mut self, productId: HSTRING, skuId: HSTRING, catalogId: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn SearchForAllUpdatesWithTelemetryAsync(&mut self, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn GetIsAppAllowedToInstallWithTelemetryAsync(&mut self, productId: HSTRING, skuId: HSTRING, catalogId: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn CancelWithTelemetry(&mut self, productId: HSTRING, correlationVector: HSTRING) -> HRESULT, + fn PauseWithTelemetry(&mut self, productId: HSTRING, correlationVector: HSTRING) -> HRESULT, + fn RestartWithTelemetry(&mut self, productId: HSTRING, correlationVector: HSTRING) -> HRESULT }} - impl IPosPrinterJob { - #[inline] pub unsafe fn print(&mut self, data: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).Print)(self, data.get()); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IAppInstallManager2 { + #[inline] pub unsafe fn start_app_install_with_telemetry_async(&mut self, productId: &HStringArg, skuId: &HStringArg, repair: bool, forceUseOfNonRemovableStorage: bool, catalogId: &HStringArg, bundleId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAppInstallWithTelemetryAsync)(self, productId.get(), skuId.get(), repair, forceUseOfNonRemovableStorage, catalogId.get(), bundleId.get(), correlationVector.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn print_line(&mut self, data: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).PrintLine)(self, data.get()); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn update_app_by_package_family_name_with_telemetry_async(&mut self, packageFamilyName: &HStringArg, correlationVector: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateAppByPackageFamilyNameWithTelemetryAsync)(self, packageFamilyName.get(), correlationVector.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn print_newline(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).PrintNewline)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn search_for_updates_with_telemetry_async(&mut self, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SearchForUpdatesWithTelemetryAsync)(self, productId.get(), skuId.get(), catalogId.get(), correlationVector.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn execute_async(&mut self) -> Result>> { + #[inline] pub unsafe fn search_for_all_updates_with_telemetry_async(&mut self, correlationVector: &HStringArg) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ExecuteAsync)(self, &mut out); + let hr = ((*self.lpVtbl).SearchForAllUpdatesWithTelemetryAsync)(self, correlationVector.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IReceiptOrSlipJob, 1394710974, 51395, 19906, 137, 233, 92, 74, 55, 179, 77, 220); - RT_INTERFACE!{interface IReceiptOrSlipJob(IReceiptOrSlipJobVtbl): IInspectable(IInspectableVtbl) [IID_IReceiptOrSlipJob] { - fn SetBarcodeRotation(&mut self, value: PosPrinterRotation) -> HRESULT, - fn SetPrintRotation(&mut self, value: PosPrinterRotation, includeBitmaps: bool) -> HRESULT, - fn SetPrintArea(&mut self, value: super::super::foundation::Rect) -> HRESULT, - #[cfg(feature="windows.graphics")] fn SetBitmap(&mut self, bitmapNumber: u32, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> HRESULT, - #[cfg(feature="windows.graphics")] fn SetBitmapCustomWidthStandardAlign(&mut self, bitmapNumber: u32, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> HRESULT, - #[cfg(feature="windows.graphics")] fn SetCustomAlignedBitmap(&mut self, bitmapNumber: u32, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> HRESULT, - #[cfg(feature="windows.graphics")] fn SetBitmapCustomWidthCustomAlign(&mut self, bitmapNumber: u32, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> HRESULT, - fn PrintSavedBitmap(&mut self, bitmapNumber: u32) -> HRESULT, - fn DrawRuledLine(&mut self, positionList: HSTRING, lineDirection: PosPrinterLineDirection, lineWidth: u32, lineStyle: PosPrinterLineStyle, lineColor: u32) -> HRESULT, - fn PrintBarcode(&mut self, data: HSTRING, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> HRESULT, - fn PrintBarcodeCustomAlign(&mut self, data: HSTRING, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignmentDistance: u32) -> HRESULT, - #[cfg(feature="windows.graphics")] fn PrintBitmap(&mut self, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> HRESULT, - #[cfg(feature="windows.graphics")] fn PrintBitmapCustomWidthStandardAlign(&mut self, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> HRESULT, - #[cfg(feature="windows.graphics")] fn PrintCustomAlignedBitmap(&mut self, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> HRESULT, - #[cfg(feature="windows.graphics")] fn PrintBitmapCustomWidthCustomAlign(&mut self, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> HRESULT - }} - impl IReceiptOrSlipJob { - #[inline] pub unsafe fn set_barcode_rotation(&mut self, value: PosPrinterRotation) -> Result<()> { - let hr = ((*self.lpVtbl).SetBarcodeRotation)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_is_app_allowed_to_install_with_telemetry_async(&mut self, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIsAppAllowedToInstallWithTelemetryAsync)(self, productId.get(), skuId.get(), catalogId.get(), correlationVector.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_print_rotation(&mut self, value: PosPrinterRotation, includeBitmaps: bool) -> Result<()> { - let hr = ((*self.lpVtbl).SetPrintRotation)(self, value, includeBitmaps); + #[inline] pub unsafe fn cancel_with_telemetry(&mut self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).CancelWithTelemetry)(self, productId.get(), correlationVector.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_print_area(&mut self, value: super::super::foundation::Rect) -> Result<()> { - let hr = ((*self.lpVtbl).SetPrintArea)(self, value); + #[inline] pub unsafe fn pause_with_telemetry(&mut self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).PauseWithTelemetry)(self, productId.get(), correlationVector.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_bitmap(&mut self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> Result<()> { - let hr = ((*self.lpVtbl).SetBitmap)(self, bitmapNumber, bitmap as *const _ as *mut _, alignment); + #[inline] pub unsafe fn restart_with_telemetry(&mut self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RestartWithTelemetry)(self, productId.get(), correlationVector.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_bitmap_custom_width_standard_align(&mut self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> Result<()> { - let hr = ((*self.lpVtbl).SetBitmapCustomWidthStandardAlign)(self, bitmapNumber, bitmap as *const _ as *mut _, alignment, width); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IAppInstallManager3, 2511489815, 59754, 19726, 132, 225, 200, 203, 65, 122, 1, 120); + RT_INTERFACE!{interface IAppInstallManager3(IAppInstallManager3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppInstallManager3] { + #[cfg(not(feature="windows.management"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.management")] fn StartProductInstallAsync(&mut self, productId: HSTRING, catalogId: HSTRING, flightId: HSTRING, clientId: HSTRING, repair: bool, forceUseOfNonRemovableStorage: bool, correlationVector: HSTRING, targetVolume: *mut ::rt::gen::windows::management::deployment::PackageVolume, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + #[cfg(not(all(feature="windows.management",feature="windows.system")))] fn __Dummy1(&mut self) -> (), + #[cfg(all(feature="windows.management",feature="windows.system"))] fn StartProductInstallForUserAsync(&mut self, user: *mut ::rt::gen::windows::system::User, productId: HSTRING, catalogId: HSTRING, flightId: HSTRING, clientId: HSTRING, repair: bool, forceUseOfNonRemovableStorage: bool, correlationVector: HSTRING, targetVolume: *mut ::rt::gen::windows::management::deployment::PackageVolume, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + #[cfg(not(feature="windows.system"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.system")] fn UpdateAppByPackageFamilyNameForUserAsync(&mut self, user: *mut ::rt::gen::windows::system::User, packageFamilyName: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.system"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.system")] fn SearchForUpdatesForUserAsync(&mut self, user: *mut ::rt::gen::windows::system::User, productId: HSTRING, skuId: HSTRING, catalogId: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.system"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.system")] fn SearchForAllUpdatesForUserAsync(&mut self, user: *mut ::rt::gen::windows::system::User, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + #[cfg(not(feature="windows.system"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.system")] fn GetIsAppAllowedToInstallForUserAsync(&mut self, user: *mut ::rt::gen::windows::system::User, productId: HSTRING, skuId: HSTRING, catalogId: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.system"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.system")] fn GetIsApplicableForUserAsync(&mut self, user: *mut ::rt::gen::windows::system::User, productId: HSTRING, skuId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn MoveToFrontOfDownloadQueue(&mut self, productId: HSTRING, correlationVector: HSTRING) -> HRESULT + }} + impl IAppInstallManager3 { + #[cfg(feature="windows.management")] #[inline] pub unsafe fn start_product_install_async(&mut self, productId: &HStringArg, catalogId: &HStringArg, flightId: &HStringArg, clientId: &HStringArg, repair: bool, forceUseOfNonRemovableStorage: bool, correlationVector: &HStringArg, targetVolume: &::rt::gen::windows::management::deployment::PackageVolume) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartProductInstallAsync)(self, productId.get(), catalogId.get(), flightId.get(), clientId.get(), repair, forceUseOfNonRemovableStorage, correlationVector.get(), targetVolume as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_custom_aligned_bitmap(&mut self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> Result<()> { - let hr = ((*self.lpVtbl).SetCustomAlignedBitmap)(self, bitmapNumber, bitmap as *const _ as *mut _, alignmentDistance); - if hr == S_OK { Ok(()) } else { err(hr) } + #[cfg(all(feature="windows.management",feature="windows.system"))] #[inline] pub unsafe fn start_product_install_for_user_async(&mut self, user: &::rt::gen::windows::system::User, productId: &HStringArg, catalogId: &HStringArg, flightId: &HStringArg, clientId: &HStringArg, repair: bool, forceUseOfNonRemovableStorage: bool, correlationVector: &HStringArg, targetVolume: &::rt::gen::windows::management::deployment::PackageVolume) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartProductInstallForUserAsync)(self, user as *const _ as *mut _, productId.get(), catalogId.get(), flightId.get(), clientId.get(), repair, forceUseOfNonRemovableStorage, correlationVector.get(), targetVolume as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_bitmap_custom_width_custom_align(&mut self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> Result<()> { - let hr = ((*self.lpVtbl).SetBitmapCustomWidthCustomAlign)(self, bitmapNumber, bitmap as *const _ as *mut _, alignmentDistance, width); - if hr == S_OK { Ok(()) } else { err(hr) } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn update_app_by_package_family_name_for_user_async(&mut self, user: &::rt::gen::windows::system::User, packageFamilyName: &HStringArg, correlationVector: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateAppByPackageFamilyNameForUserAsync)(self, user as *const _ as *mut _, packageFamilyName.get(), correlationVector.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn print_saved_bitmap(&mut self, bitmapNumber: u32) -> Result<()> { - let hr = ((*self.lpVtbl).PrintSavedBitmap)(self, bitmapNumber); - if hr == S_OK { Ok(()) } else { err(hr) } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn search_for_updates_for_user_async(&mut self, user: &::rt::gen::windows::system::User, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SearchForUpdatesForUserAsync)(self, user as *const _ as *mut _, productId.get(), skuId.get(), catalogId.get(), correlationVector.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn draw_ruled_line(&mut self, positionList: &HStringArg, lineDirection: PosPrinterLineDirection, lineWidth: u32, lineStyle: PosPrinterLineStyle, lineColor: u32) -> Result<()> { - let hr = ((*self.lpVtbl).DrawRuledLine)(self, positionList.get(), lineDirection, lineWidth, lineStyle, lineColor); - if hr == S_OK { Ok(()) } else { err(hr) } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn search_for_all_updates_for_user_async(&mut self, user: &::rt::gen::windows::system::User, correlationVector: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SearchForAllUpdatesForUserAsync)(self, user as *const _ as *mut _, correlationVector.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn print_barcode(&mut self, data: &HStringArg, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> Result<()> { - let hr = ((*self.lpVtbl).PrintBarcode)(self, data.get(), symbology, height, width, textPosition, alignment); - if hr == S_OK { Ok(()) } else { err(hr) } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_is_app_allowed_to_install_for_user_async(&mut self, user: &::rt::gen::windows::system::User, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIsAppAllowedToInstallForUserAsync)(self, user as *const _ as *mut _, productId.get(), skuId.get(), catalogId.get(), correlationVector.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn print_barcode_custom_align(&mut self, data: &HStringArg, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignmentDistance: u32) -> Result<()> { - let hr = ((*self.lpVtbl).PrintBarcodeCustomAlign)(self, data.get(), symbology, height, width, textPosition, alignmentDistance); - if hr == S_OK { Ok(()) } else { err(hr) } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_is_applicable_for_user_async(&mut self, user: &::rt::gen::windows::system::User, productId: &HStringArg, skuId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIsApplicableForUserAsync)(self, user as *const _ as *mut _, productId.get(), skuId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn print_bitmap(&mut self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> Result<()> { - let hr = ((*self.lpVtbl).PrintBitmap)(self, bitmap as *const _ as *mut _, alignment); + #[inline] pub unsafe fn move_to_front_of_download_queue(&mut self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).MoveToFrontOfDownloadQueue)(self, productId.get(), correlationVector.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn print_bitmap_custom_width_standard_align(&mut self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> Result<()> { - let hr = ((*self.lpVtbl).PrintBitmapCustomWidthStandardAlign)(self, bitmap as *const _ as *mut _, alignment, width); - if hr == S_OK { Ok(()) } else { err(hr) } + } +} // Windows.ApplicationModel.Store.Preview.InstallControl +} // Windows.ApplicationModel.Store.Preview +pub mod licensemanagement { // Windows.ApplicationModel.Store.LicenseManagement +use ::prelude::*; + DEFINE_IID!(IID_ILicenseSatisfactionResult, 1013403507, 15495, 20193, 130, 1, 244, 40, 53, 155, 211, 175); + RT_INTERFACE!{interface ILicenseSatisfactionResult(ILicenseSatisfactionResultVtbl): IInspectable(IInspectableVtbl) [IID_ILicenseSatisfactionResult] { + fn get_LicenseSatisfactionInfos(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn get_ExtendedError(&mut self, out: *mut ::rt::gen::windows::foundation::HResult) -> HRESULT + }} + impl ILicenseSatisfactionResult { + #[inline] pub unsafe fn get_license_satisfaction_infos(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LicenseSatisfactionInfos)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn print_custom_aligned_bitmap(&mut self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> Result<()> { - let hr = ((*self.lpVtbl).PrintCustomAlignedBitmap)(self, bitmap as *const _ as *mut _, alignmentDistance); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn print_bitmap_custom_width_custom_align(&mut self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> Result<()> { - let hr = ((*self.lpVtbl).PrintBitmapCustomWidthCustomAlign)(self, bitmap as *const _ as *mut _, alignmentDistance, width); - if hr == S_OK { Ok(()) } else { err(hr) } - } - } - DEFINE_IID!(IID_IReceiptPrintJob, 2861958766, 44205, 19321, 157, 15, 192, 207, 192, 141, 199, 123); - RT_INTERFACE!{interface IReceiptPrintJob(IReceiptPrintJobVtbl): IInspectable(IInspectableVtbl) [IID_IReceiptPrintJob] { - fn MarkFeed(&mut self, kind: PosPrinterMarkFeedKind) -> HRESULT, - fn CutPaper(&mut self, percentage: f64) -> HRESULT, - fn CutPaperDefault(&mut self) -> HRESULT - }} - impl IReceiptPrintJob { - #[inline] pub unsafe fn mark_feed(&mut self, kind: PosPrinterMarkFeedKind) -> Result<()> { - let hr = ((*self.lpVtbl).MarkFeed)(self, kind); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn cut_paper(&mut self, percentage: f64) -> Result<()> { - let hr = ((*self.lpVtbl).CutPaper)(self, percentage); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn cut_paper_default(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).CutPaperDefault)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result<::rt::gen::windows::foundation::HResult> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class ReceiptPrintJob: IReceiptPrintJob} - RT_CLASS!{class SlipPrintJob: IReceiptOrSlipJob} - RT_CLASS!{class JournalPrintJob: IPosPrinterJob} - DEFINE_IID!(IID_ICommonClaimedPosPrinterStation, 3085657768, 65162, 19707, 139, 66, 227, 91, 40, 12, 178, 124); - RT_INTERFACE!{interface ICommonClaimedPosPrinterStation(ICommonClaimedPosPrinterStationVtbl): IInspectable(IInspectableVtbl) [IID_ICommonClaimedPosPrinterStation] { - fn put_CharactersPerLine(&mut self, value: u32) -> HRESULT, - fn get_CharactersPerLine(&mut self, out: *mut u32) -> HRESULT, - fn put_LineHeight(&mut self, value: u32) -> HRESULT, - fn get_LineHeight(&mut self, out: *mut u32) -> HRESULT, - fn put_LineSpacing(&mut self, value: u32) -> HRESULT, - fn get_LineSpacing(&mut self, out: *mut u32) -> HRESULT, - fn get_LineWidth(&mut self, out: *mut u32) -> HRESULT, - fn put_IsLetterQuality(&mut self, value: bool) -> HRESULT, - fn get_IsLetterQuality(&mut self, out: *mut bool) -> HRESULT, - fn get_IsPaperNearEnd(&mut self, out: *mut bool) -> HRESULT, - fn put_ColorCartridge(&mut self, value: PosPrinterColorCartridge) -> HRESULT, - fn get_ColorCartridge(&mut self, out: *mut PosPrinterColorCartridge) -> HRESULT, - fn get_IsCoverOpen(&mut self, out: *mut bool) -> HRESULT, - fn get_IsCartridgeRemoved(&mut self, out: *mut bool) -> HRESULT, - fn get_IsCartridgeEmpty(&mut self, out: *mut bool) -> HRESULT, - fn get_IsHeadCleaning(&mut self, out: *mut bool) -> HRESULT, - fn get_IsPaperEmpty(&mut self, out: *mut bool) -> HRESULT, - fn get_IsReadyToPrint(&mut self, out: *mut bool) -> HRESULT, - fn ValidateData(&mut self, data: HSTRING, out: *mut bool) -> HRESULT + RT_CLASS!{class LicenseSatisfactionInfo: ILicenseSatisfactionInfo} + DEFINE_IID!(IID_ILicenseSatisfactionInfo, 1019981967, 56113, 18645, 131, 132, 250, 23, 200, 20, 116, 226); + RT_INTERFACE!{interface ILicenseSatisfactionInfo(ILicenseSatisfactionInfoVtbl): IInspectable(IInspectableVtbl) [IID_ILicenseSatisfactionInfo] { + fn get_SatisfiedByDevice(&mut self, out: *mut bool) -> HRESULT, + fn get_SatisfiedByOpenLicense(&mut self, out: *mut bool) -> HRESULT, + fn get_SatisfiedByTrial(&mut self, out: *mut bool) -> HRESULT, + fn get_SatisfiedByPass(&mut self, out: *mut bool) -> HRESULT, + fn get_SatisfiedByInstallMedia(&mut self, out: *mut bool) -> HRESULT, + fn get_SatisfiedBySignedInUser(&mut self, out: *mut bool) -> HRESULT, + fn get_IsSatisfied(&mut self, out: *mut bool) -> HRESULT }} - impl ICommonClaimedPosPrinterStation { - #[inline] pub unsafe fn set_characters_per_line(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_CharactersPerLine)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_characters_per_line(&mut self) -> Result { + impl ILicenseSatisfactionInfo { + #[inline] pub unsafe fn get_satisfied_by_device(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CharactersPerLine)(self, &mut out); + let hr = ((*self.lpVtbl).get_SatisfiedByDevice)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_line_height(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_LineHeight)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_line_height(&mut self) -> Result { + #[inline] pub unsafe fn get_satisfied_by_open_license(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LineHeight)(self, &mut out); + let hr = ((*self.lpVtbl).get_SatisfiedByOpenLicense)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_line_spacing(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_LineSpacing)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_line_spacing(&mut self) -> Result { + #[inline] pub unsafe fn get_satisfied_by_trial(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LineSpacing)(self, &mut out); + let hr = ((*self.lpVtbl).get_SatisfiedByTrial)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_line_width(&mut self) -> Result { + #[inline] pub unsafe fn get_satisfied_by_pass(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LineWidth)(self, &mut out); + let hr = ((*self.lpVtbl).get_SatisfiedByPass)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_is_letter_quality(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsLetterQuality)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_letter_quality(&mut self) -> Result { + #[inline] pub unsafe fn get_satisfied_by_install_media(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsLetterQuality)(self, &mut out); + let hr = ((*self.lpVtbl).get_SatisfiedByInstallMedia)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_paper_near_end(&mut self) -> Result { + #[inline] pub unsafe fn get_satisfied_by_signed_in_user(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsPaperNearEnd)(self, &mut out); + let hr = ((*self.lpVtbl).get_SatisfiedBySignedInUser)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_color_cartridge(&mut self, value: PosPrinterColorCartridge) -> Result<()> { - let hr = ((*self.lpVtbl).put_ColorCartridge)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_color_cartridge(&mut self) -> Result { + #[inline] pub unsafe fn get_is_satisfied(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ColorCartridge)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsSatisfied)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_cover_open(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsCoverOpen)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_ILicenseManagerStatics, 3047963360, 55879, 20256, 154, 35, 9, 24, 44, 148, 118, 255); + RT_INTERFACE!{static interface ILicenseManagerStatics(ILicenseManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILicenseManagerStatics] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn AddLicenseAsync(&mut self, license: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn GetSatisfactionInfosAsync(&mut self, contentIds: *mut ::rt::gen::windows::foundation::collections::IIterable, keyIds: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl ILicenseManagerStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn add_license_async(&mut self, license: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddLicenseAsync)(self, license as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_cartridge_removed(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsCartridgeRemoved)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_satisfaction_infos_async(&mut self, contentIds: &::rt::gen::windows::foundation::collections::IIterable, keyIds: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSatisfactionInfosAsync)(self, contentIds as *const _ as *mut _, keyIds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_cartridge_empty(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsCartridgeEmpty)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class LicenseSatisfactionResult: ILicenseSatisfactionResult} + RT_ACTIVATABLE!{ILicenseManagerStatics [CLSID_LicenseManager]} + DEFINE_CLSID!(CLSID_LicenseManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,83,116,111,114,101,46,76,105,99,101,110,115,101,77,97,110,97,103,101,109,101,110,116,46,76,105,99,101,110,115,101,77,97,110,97,103,101,114,0]); +} // Windows.ApplicationModel.Store.LicenseManagement +} // Windows.ApplicationModel.Store +pub mod voicecommands { // Windows.ApplicationModel.VoiceCommands +use ::prelude::*; + DEFINE_IID!(IID_IVoiceCommandDefinitionManagerStatics, 2414323358, 1662, 20246, 161, 140, 91, 23, 233, 73, 153, 64); + RT_INTERFACE!{static interface IVoiceCommandDefinitionManagerStatics(IVoiceCommandDefinitionManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandDefinitionManagerStatics] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn InstallCommandDefinitionsFromStorageFileAsync(&mut self, file: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_InstalledCommandDefinitions(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + }} + impl IVoiceCommandDefinitionManagerStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn install_command_definitions_from_storage_file_async(&mut self, file: &super::super::storage::StorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).InstallCommandDefinitionsFromStorageFileAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_head_cleaning(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsHeadCleaning)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_installed_command_definitions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InstalledCommandDefinitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_paper_empty(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsPaperEmpty)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class VoiceCommandDefinition: IVoiceCommandDefinition} + DEFINE_IID!(IID_IVoiceCommandDefinition, 2037557968, 2420, 18809, 152, 75, 203, 137, 89, 205, 97, 174); + RT_INTERFACE!{interface IVoiceCommandDefinition(IVoiceCommandDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandDefinition] { + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn SetPhraseListAsync(&mut self, phraseListName: HSTRING, phraseList: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IVoiceCommandDefinition { + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_ready_to_print(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsReadyToPrint)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn validate_data(&mut self, data: &HStringArg) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).ValidateData)(self, data.get(), &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_phrase_list_async(&mut self, phraseListName: &HStringArg, phraseList: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetPhraseListAsync)(self, phraseListName.get(), phraseList as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IClaimedReceiptPrinter, 2597485172, 56673, 20194, 152, 55, 91, 93, 114, 213, 56, 185); - RT_INTERFACE!{interface IClaimedReceiptPrinter(IClaimedReceiptPrinterVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedReceiptPrinter] { - fn get_SidewaysMaxLines(&mut self, out: *mut u32) -> HRESULT, - fn get_SidewaysMaxChars(&mut self, out: *mut u32) -> HRESULT, - fn get_LinesToPaperCut(&mut self, out: *mut u32) -> HRESULT, - fn get_PageSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_PrintArea(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn CreateJob(&mut self, out: *mut *mut ReceiptPrintJob) -> HRESULT + RT_ENUM! { enum VoiceCommandContentTileType: i32 { + TitleOnly (VoiceCommandContentTileType_TitleOnly) = 0, TitleWithText (VoiceCommandContentTileType_TitleWithText) = 1, TitleWith68x68Icon (VoiceCommandContentTileType_TitleWith68x68Icon) = 2, TitleWith68x68IconAndText (VoiceCommandContentTileType_TitleWith68x68IconAndText) = 3, TitleWith68x92Icon (VoiceCommandContentTileType_TitleWith68x92Icon) = 4, TitleWith68x92IconAndText (VoiceCommandContentTileType_TitleWith68x92IconAndText) = 5, TitleWith280x140Icon (VoiceCommandContentTileType_TitleWith280x140Icon) = 6, TitleWith280x140IconAndText (VoiceCommandContentTileType_TitleWith280x140IconAndText) = 7, }} - impl IClaimedReceiptPrinter { - #[inline] pub unsafe fn get_sideways_max_lines(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SidewaysMaxLines)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + DEFINE_IID!(IID_IVoiceCommandContentTile, 1055910384, 47303, 19574, 160, 222, 22, 7, 137, 94, 227, 39); + RT_INTERFACE!{interface IVoiceCommandContentTile(IVoiceCommandContentTileVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandContentTile] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_TextLine1(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_TextLine1(&mut self, value: HSTRING) -> HRESULT, + fn get_TextLine2(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_TextLine2(&mut self, value: HSTRING) -> HRESULT, + fn get_TextLine3(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_TextLine3(&mut self, value: HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Image(&mut self, out: *mut *mut super::super::storage::IStorageFile) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Image(&mut self, value: *mut super::super::storage::IStorageFile) -> HRESULT, + fn get_AppContext(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_AppContext(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_AppLaunchArgument(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AppLaunchArgument(&mut self, value: HSTRING) -> HRESULT, + fn get_ContentTileType(&mut self, out: *mut VoiceCommandContentTileType) -> HRESULT, + fn put_ContentTileType(&mut self, value: VoiceCommandContentTileType) -> HRESULT + }} + impl IVoiceCommandContentTile { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sideways_max_chars(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SidewaysMaxChars)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_lines_to_paper_cut(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LinesToPaperCut)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_text_line1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextLine1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_page_size(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PageSize)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_text_line1(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextLine1)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_print_area(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PrintArea)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_text_line2(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextLine2)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_job(&mut self) -> Result> { + #[inline] pub unsafe fn set_text_line2(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextLine2)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_line3(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateJob)(self, &mut out); + let hr = ((*self.lpVtbl).get_TextLine3)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_line3(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextLine3)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_image(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Image)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class ClaimedReceiptPrinter: IClaimedReceiptPrinter} - DEFINE_IID!(IID_IClaimedSlipPrinter, 3177050098, 44944, 20106, 183, 123, 227, 174, 156, 166, 58, 127); - RT_INTERFACE!{interface IClaimedSlipPrinter(IClaimedSlipPrinterVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedSlipPrinter] { - fn get_SidewaysMaxLines(&mut self, out: *mut u32) -> HRESULT, - fn get_SidewaysMaxChars(&mut self, out: *mut u32) -> HRESULT, - fn get_MaxLines(&mut self, out: *mut u32) -> HRESULT, - fn get_LinesNearEndToEnd(&mut self, out: *mut u32) -> HRESULT, - fn get_PrintSide(&mut self, out: *mut PosPrinterPrintSide) -> HRESULT, - fn get_PageSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_PrintArea(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn OpenJaws(&mut self) -> HRESULT, - fn CloseJaws(&mut self) -> HRESULT, - fn InsertSlipAsync(&mut self, timeout: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RemoveSlipAsync(&mut self, timeout: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ChangePrintSide(&mut self, printSide: PosPrinterPrintSide) -> HRESULT, - fn CreateJob(&mut self, out: *mut *mut SlipPrintJob) -> HRESULT - }} - impl IClaimedSlipPrinter { - #[inline] pub unsafe fn get_sideways_max_lines(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SidewaysMaxLines)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_image(&mut self, value: &super::super::storage::IStorageFile) -> Result<()> { + let hr = ((*self.lpVtbl).put_Image)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_sideways_max_chars(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SidewaysMaxChars)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_app_context(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppContext)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_max_lines(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxLines)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_app_context(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppContext)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_lines_near_end_to_end(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LinesNearEndToEnd)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_app_launch_argument(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppLaunchArgument)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_print_side(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PrintSide)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_app_launch_argument(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppLaunchArgument)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_page_size(&mut self) -> Result { + #[inline] pub unsafe fn get_content_tile_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PageSize)(self, &mut out); + let hr = ((*self.lpVtbl).get_ContentTileType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_print_area(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PrintArea)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_content_tile_type(&mut self, value: VoiceCommandContentTileType) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentTileType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn open_jaws(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).OpenJaws)(self); + } + DEFINE_IID!(IID_IVoiceCommandUserMessage, 1733211072, 17654, 20231, 185, 121, 76, 114, 63, 192, 133, 151); + RT_INTERFACE!{interface IVoiceCommandUserMessage(IVoiceCommandUserMessageVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandUserMessage] { + fn get_DisplayMessage(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayMessage(&mut self, value: HSTRING) -> HRESULT, + fn get_SpokenMessage(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SpokenMessage(&mut self, value: HSTRING) -> HRESULT + }} + impl IVoiceCommandUserMessage { + #[inline] pub unsafe fn get_display_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_message(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayMessage)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn close_jaws(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).CloseJaws)(self); + #[inline] pub unsafe fn get_spoken_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SpokenMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_spoken_message(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SpokenMessage)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn insert_slip_async(&mut self, timeout: super::super::foundation::TimeSpan) -> Result>> { + } + RT_ACTIVATABLE!{IVoiceCommandDefinitionManagerStatics [CLSID_VoiceCommandDefinitionManager]} + DEFINE_CLSID!(CLSID_VoiceCommandDefinitionManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,86,111,105,99,101,67,111,109,109,97,110,100,115,46,86,111,105,99,101,67,111,109,109,97,110,100,68,101,102,105,110,105,116,105,111,110,77,97,110,97,103,101,114,0]); + RT_CLASS!{class VoiceCommandContentTile: IVoiceCommandContentTile} + RT_CLASS!{class VoiceCommandUserMessage: IVoiceCommandUserMessage} + RT_ENUM! { enum VoiceCommandCompletionReason: i32 { + Unknown (VoiceCommandCompletionReason_Unknown) = 0, CommunicationFailed (VoiceCommandCompletionReason_CommunicationFailed) = 1, ResourceLimitsExceeded (VoiceCommandCompletionReason_ResourceLimitsExceeded) = 2, Canceled (VoiceCommandCompletionReason_Canceled) = 3, TimeoutExceeded (VoiceCommandCompletionReason_TimeoutExceeded) = 4, AppLaunched (VoiceCommandCompletionReason_AppLaunched) = 5, Completed (VoiceCommandCompletionReason_Completed) = 6, + }} + DEFINE_IID!(IID_IVoiceCommand, 2473546355, 60546, 17062, 165, 92, 210, 215, 158, 198, 249, 32); + RT_INTERFACE!{interface IVoiceCommand(IVoiceCommandVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommand] { + fn get_CommandName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView>) -> HRESULT, + #[cfg(feature="windows.media")] fn get_SpeechRecognitionResult(&mut self, out: *mut *mut super::super::media::speechrecognition::SpeechRecognitionResult) -> HRESULT + }} + impl IVoiceCommand { + #[inline] pub unsafe fn get_command_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).InsertSlipAsync)(self, timeout, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_CommandName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_slip_async(&mut self, timeout: super::super::foundation::TimeSpan) -> Result>> { + #[inline] pub unsafe fn get_properties(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RemoveSlipAsync)(self, timeout, &mut out); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn change_print_side(&mut self, printSide: PosPrinterPrintSide) -> Result<()> { - let hr = ((*self.lpVtbl).ChangePrintSide)(self, printSide); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn create_job(&mut self) -> Result> { + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_speech_recognition_result(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateJob)(self, &mut out); + let hr = ((*self.lpVtbl).get_SpeechRecognitionResult)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class ClaimedSlipPrinter: IClaimedSlipPrinter} - DEFINE_IID!(IID_IClaimedJournalPrinter, 1743390256, 20861, 18559, 159, 223, 210, 224, 160, 162, 100, 165); - RT_INTERFACE!{interface IClaimedJournalPrinter(IClaimedJournalPrinterVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedJournalPrinter] { - fn CreateJob(&mut self, out: *mut *mut JournalPrintJob) -> HRESULT + DEFINE_IID!(IID_IVoiceCommandCompletedEventArgs, 3361630045, 65090, 17196, 153, 7, 9, 223, 159, 207, 100, 232); + RT_INTERFACE!{interface IVoiceCommandCompletedEventArgs(IVoiceCommandCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandCompletedEventArgs] { + fn get_Reason(&mut self, out: *mut VoiceCommandCompletionReason) -> HRESULT }} - impl IClaimedJournalPrinter { - #[inline] pub unsafe fn create_job(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateJob)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + impl IVoiceCommandCompletedEventArgs { + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class ClaimedJournalPrinter: IClaimedJournalPrinter} - DEFINE_IID!(IID_ICashDrawerStatusUpdatedEventArgs, 816507274, 3440, 17820, 149, 83, 135, 225, 36, 197, 36, 136); - RT_INTERFACE!{interface ICashDrawerStatusUpdatedEventArgs(ICashDrawerStatusUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerStatusUpdatedEventArgs] { - fn get_Status(&mut self, out: *mut *mut CashDrawerStatus) -> HRESULT + DEFINE_IID!(IID_IVoiceCommandDisambiguationResult, 3972435198, 51628, 17887, 168, 234, 254, 234, 8, 239, 156, 94); + RT_INTERFACE!{interface IVoiceCommandDisambiguationResult(IVoiceCommandDisambiguationResultVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandDisambiguationResult] { + fn get_SelectedItem(&mut self, out: *mut *mut VoiceCommandContentTile) -> HRESULT }} - impl ICashDrawerStatusUpdatedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result> { + impl IVoiceCommandDisambiguationResult { + #[inline] pub unsafe fn get_selected_item(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_SelectedItem)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class CashDrawerStatus: ICashDrawerStatus} - RT_CLASS!{class CashDrawerStatusUpdatedEventArgs: ICashDrawerStatusUpdatedEventArgs} - DEFINE_IID!(IID_ICashDrawerStatus, 1807579327, 56481, 19974, 153, 235, 90, 246, 165, 174, 193, 8); - RT_INTERFACE!{interface ICashDrawerStatus(ICashDrawerStatusVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerStatus] { - fn get_StatusKind(&mut self, out: *mut CashDrawerStatusKind) -> HRESULT, - fn get_ExtendedStatus(&mut self, out: *mut u32) -> HRESULT + DEFINE_IID!(IID_IVoiceCommandConfirmationResult, 2686605630, 33313, 17702, 176, 131, 132, 9, 114, 38, 34, 71); + RT_INTERFACE!{interface IVoiceCommandConfirmationResult(IVoiceCommandConfirmationResultVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandConfirmationResult] { + fn get_Confirmed(&mut self, out: *mut bool) -> HRESULT }} - impl ICashDrawerStatus { - #[inline] pub unsafe fn get_status_kind(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_StatusKind)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_status(&mut self) -> Result { + impl IVoiceCommandConfirmationResult { + #[inline] pub unsafe fn get_confirmed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ExtendedStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_Confirmed)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_ICashDrawerCapabilities, 197582347, 59623, 19231, 177, 209, 62, 80, 26, 208, 130, 71); - RT_INTERFACE!{interface ICashDrawerCapabilities(ICashDrawerCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerCapabilities] { - fn get_PowerReportingType(&mut self, out: *mut UnifiedPosPowerReportingType) -> HRESULT, - fn get_IsStatisticsReportingSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsStatisticsUpdatingSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsStatusReportingSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsStatusMultiDrawerDetectSupported(&mut self, out: *mut bool) -> HRESULT, - fn get_IsDrawerOpenSensorAvailable(&mut self, out: *mut bool) -> HRESULT + DEFINE_IID!(IID_IVoiceCommandServiceConnection, 3633626015, 8666, 17572, 152, 162, 251, 19, 25, 32, 169, 204); + RT_INTERFACE!{interface IVoiceCommandServiceConnection(IVoiceCommandServiceConnectionVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandServiceConnection] { + fn GetVoiceCommandAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestConfirmationAsync(&mut self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestDisambiguationAsync(&mut self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ReportProgressAsync(&mut self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ReportSuccessAsync(&mut self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ReportFailureAsync(&mut self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RequestAppLaunchAsync(&mut self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.globalization"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.globalization")] fn get_Language(&mut self, out: *mut *mut super::super::globalization::Language) -> HRESULT, + fn add_VoiceCommandCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VoiceCommandCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT }} - impl ICashDrawerCapabilities { - #[inline] pub unsafe fn get_power_reporting_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PowerReportingType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IVoiceCommandServiceConnection { + #[inline] pub unsafe fn get_voice_command_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVoiceCommandAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_statistics_reporting_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn request_confirmation_async(&mut self, response: &VoiceCommandResponse) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestConfirmationAsync)(self, response as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_statistics_updating_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn request_disambiguation_async(&mut self, response: &VoiceCommandResponse) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestDisambiguationAsync)(self, response as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_status_reporting_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStatusReportingSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn report_progress_async(&mut self, response: &VoiceCommandResponse) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportProgressAsync)(self, response as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_status_multi_drawer_detect_supported(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsStatusMultiDrawerDetectSupported)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn report_success_async(&mut self, response: &VoiceCommandResponse) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportSuccessAsync)(self, response as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_drawer_open_sensor_available(&mut self) -> Result { + #[inline] pub unsafe fn report_failure_async(&mut self, response: &VoiceCommandResponse) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportFailureAsync)(self, response as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_app_launch_async(&mut self, response: &VoiceCommandResponse) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAppLaunchAsync)(self, response as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_language(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_voice_command_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDrawerOpenSensorAvailable)(self, &mut out); + let hr = ((*self.lpVtbl).add_VoiceCommandCompleted)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn remove_voice_command_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VoiceCommandCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - RT_CLASS!{class CashDrawerCapabilities: ICashDrawerCapabilities} - DEFINE_IID!(IID_ICashDrawerEventSourceEventArgs, 1774926785, 5247, 16924, 156, 35, 9, 1, 35, 187, 120, 108); - RT_INTERFACE!{interface ICashDrawerEventSourceEventArgs(ICashDrawerEventSourceEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerEventSourceEventArgs] { - fn get_CashDrawer(&mut self, out: *mut *mut CashDrawer) -> HRESULT + RT_CLASS!{class VoiceCommand: IVoiceCommand} + RT_CLASS!{class VoiceCommandResponse: IVoiceCommandResponse} + RT_ACTIVATABLE!{IVoiceCommandResponseStatics [CLSID_VoiceCommandResponse]} + DEFINE_CLSID!(CLSID_VoiceCommandResponse = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,86,111,105,99,101,67,111,109,109,97,110,100,115,46,86,111,105,99,101,67,111,109,109,97,110,100,82,101,115,112,111,110,115,101,0]); + RT_CLASS!{class VoiceCommandConfirmationResult: IVoiceCommandConfirmationResult} + RT_CLASS!{class VoiceCommandDisambiguationResult: IVoiceCommandDisambiguationResult} + RT_CLASS!{class VoiceCommandServiceConnection: IVoiceCommandServiceConnection} + RT_ACTIVATABLE!{IVoiceCommandServiceConnectionStatics [CLSID_VoiceCommandServiceConnection]} + DEFINE_CLSID!(CLSID_VoiceCommandServiceConnection = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,86,111,105,99,101,67,111,109,109,97,110,100,115,46,86,111,105,99,101,67,111,109,109,97,110,100,83,101,114,118,105,99,101,67,111,110,110,101,99,116,105,111,110,0]); + RT_CLASS!{class VoiceCommandCompletedEventArgs: IVoiceCommandCompletedEventArgs} + DEFINE_IID!(IID_IVoiceCommandServiceConnectionStatics, 923713531, 11572, 17119, 135, 112, 7, 77, 15, 51, 70, 151); + RT_INTERFACE!{static interface IVoiceCommandServiceConnectionStatics(IVoiceCommandServiceConnectionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandServiceConnectionStatics] { + fn FromAppServiceTriggerDetails(&mut self, triggerDetails: *mut super::appservice::AppServiceTriggerDetails, out: *mut *mut VoiceCommandServiceConnection) -> HRESULT }} - impl ICashDrawerEventSourceEventArgs { - #[inline] pub unsafe fn get_cash_drawer(&mut self) -> Result> { + impl IVoiceCommandServiceConnectionStatics { + #[inline] pub unsafe fn from_app_service_trigger_details(&mut self, triggerDetails: &super::appservice::AppServiceTriggerDetails) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CashDrawer)(self, &mut out); + let hr = ((*self.lpVtbl).FromAppServiceTriggerDetails)(self, triggerDetails as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class CashDrawer: ICashDrawer} - RT_ACTIVATABLE!{ICashDrawerStatics [CLSID_CashDrawer]} - DEFINE_CLSID!(CLSID_CashDrawer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,67,97,115,104,68,114,97,119,101,114,0]); - RT_CLASS!{class CashDrawerClosedEventArgs: ICashDrawerEventSourceEventArgs} - RT_CLASS!{class CashDrawerOpenedEventArgs: ICashDrawerEventSourceEventArgs} - DEFINE_IID!(IID_ICashDrawerEventSource, 3758548076, 62201, 17455, 141, 214, 6, 193, 10, 66, 39, 186); - RT_INTERFACE!{interface ICashDrawerEventSource(ICashDrawerEventSourceVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerEventSource] { - fn add_DrawerClosed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DrawerClosed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DrawerOpened(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DrawerOpened(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_IVoiceCommandResponseStatics, 691206163, 3387, 18930, 150, 221, 98, 80, 25, 189, 59, 93); + RT_INTERFACE!{static interface IVoiceCommandResponseStatics(IVoiceCommandResponseStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandResponseStatics] { + fn get_MaxSupportedVoiceCommandContentTiles(&mut self, out: *mut u32) -> HRESULT, + fn CreateResponse(&mut self, userMessage: *mut VoiceCommandUserMessage, out: *mut *mut VoiceCommandResponse) -> HRESULT, + fn CreateResponseWithTiles(&mut self, message: *mut VoiceCommandUserMessage, contentTiles: *mut super::super::foundation::collections::IIterable, out: *mut *mut VoiceCommandResponse) -> HRESULT, + fn CreateResponseForPrompt(&mut self, message: *mut VoiceCommandUserMessage, repeatMessage: *mut VoiceCommandUserMessage, out: *mut *mut VoiceCommandResponse) -> HRESULT, + fn CreateResponseForPromptWithTiles(&mut self, message: *mut VoiceCommandUserMessage, repeatMessage: *mut VoiceCommandUserMessage, contentTiles: *mut super::super::foundation::collections::IIterable, out: *mut *mut VoiceCommandResponse) -> HRESULT }} - impl ICashDrawerEventSource { - #[inline] pub unsafe fn add_drawer_closed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_DrawerClosed)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_drawer_closed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_DrawerClosed)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_drawer_opened(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + impl IVoiceCommandResponseStatics { + #[inline] pub unsafe fn get_max_supported_voice_command_content_tiles(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_DrawerOpened)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_MaxSupportedVoiceCommandContentTiles)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_drawer_opened(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_DrawerOpened)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn create_response(&mut self, userMessage: &VoiceCommandUserMessage) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateResponse)(self, userMessage as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class CashDrawerEventSource: ICashDrawerEventSource} - DEFINE_IID!(IID_ICashDrawerStatics, 3751843162, 54327, 20479, 181, 71, 221, 169, 105, 164, 248, 131); - RT_INTERFACE!{static interface ICashDrawerStatics(ICashDrawerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerStatics] { - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl ICashDrawerStatics { - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + #[inline] pub unsafe fn create_response_with_tiles(&mut self, message: &VoiceCommandUserMessage, contentTiles: &super::super::foundation::collections::IIterable) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + let hr = ((*self.lpVtbl).CreateResponseWithTiles)(self, message as *const _ as *mut _, contentTiles as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn create_response_for_prompt(&mut self, message: &VoiceCommandUserMessage, repeatMessage: &VoiceCommandUserMessage) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).CreateResponseForPrompt)(self, message as *const _ as *mut _, repeatMessage as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + #[inline] pub unsafe fn create_response_for_prompt_with_tiles(&mut self, message: &VoiceCommandUserMessage, repeatMessage: &VoiceCommandUserMessage, contentTiles: &super::super::foundation::collections::IIterable) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).CreateResponseForPromptWithTiles)(self, message as *const _ as *mut _, repeatMessage as *const _ as *mut _, contentTiles as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ICashDrawer, 2676553160, 56916, 19182, 168, 144, 146, 11, 203, 254, 48, 252); - RT_INTERFACE!{interface ICashDrawer(ICashDrawerVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawer] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Capabilities(&mut self, out: *mut *mut CashDrawerCapabilities) -> HRESULT, - fn get_Status(&mut self, out: *mut *mut CashDrawerStatus) -> HRESULT, - fn get_IsDrawerOpen(&mut self, out: *mut bool) -> HRESULT, - fn get_DrawerEventSource(&mut self, out: *mut *mut CashDrawerEventSource) -> HRESULT, - fn ClaimDrawerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CheckHealthAsync(&mut self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_StatusUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_IVoiceCommandResponse, 42251022, 35387, 19652, 166, 161, 202, 213, 190, 39, 22, 181); + RT_INTERFACE!{interface IVoiceCommandResponse(IVoiceCommandResponseVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandResponse] { + fn get_Message(&mut self, out: *mut *mut VoiceCommandUserMessage) -> HRESULT, + fn put_Message(&mut self, value: *mut VoiceCommandUserMessage) -> HRESULT, + fn get_RepeatMessage(&mut self, out: *mut *mut VoiceCommandUserMessage) -> HRESULT, + fn put_RepeatMessage(&mut self, value: *mut VoiceCommandUserMessage) -> HRESULT, + fn get_AppLaunchArgument(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AppLaunchArgument(&mut self, value: HSTRING) -> HRESULT, + fn get_VoiceCommandContentTiles(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT }} - impl ICashDrawer { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl IVoiceCommandResponse { + #[inline] pub unsafe fn get_message(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_capabilities(&mut self) -> Result> { + #[inline] pub unsafe fn set_message(&mut self, value: &VoiceCommandUserMessage) -> Result<()> { + let hr = ((*self.lpVtbl).put_Message)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_repeat_message(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Capabilities)(self, &mut out); + let hr = ((*self.lpVtbl).get_RepeatMessage)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result> { + #[inline] pub unsafe fn set_repeat_message(&mut self, value: &VoiceCommandUserMessage) -> Result<()> { + let hr = ((*self.lpVtbl).put_RepeatMessage)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_launch_argument(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_AppLaunchArgument)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_app_launch_argument(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppLaunchArgument)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_voice_command_content_tiles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VoiceCommandContentTiles)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_drawer_open(&mut self) -> Result { + } +} // Windows.ApplicationModel.VoiceCommands +pub mod wallet { // Windows.ApplicationModel.Wallet +use ::prelude::*; + RT_ENUM! { enum WalletBarcodeSymbology: i32 { + Invalid (WalletBarcodeSymbology_Invalid) = 0, Upca (WalletBarcodeSymbology_Upca) = 1, Upce (WalletBarcodeSymbology_Upce) = 2, Ean13 (WalletBarcodeSymbology_Ean13) = 3, Ean8 (WalletBarcodeSymbology_Ean8) = 4, Itf (WalletBarcodeSymbology_Itf) = 5, Code39 (WalletBarcodeSymbology_Code39) = 6, Code128 (WalletBarcodeSymbology_Code128) = 7, Qr (WalletBarcodeSymbology_Qr) = 8, Pdf417 (WalletBarcodeSymbology_Pdf417) = 9, Aztec (WalletBarcodeSymbology_Aztec) = 10, Custom (WalletBarcodeSymbology_Custom) = 100000, + }} + DEFINE_IID!(IID_IWalletBarcode, 1334147881, 56960, 20132, 161, 205, 129, 205, 8, 77, 172, 39); + RT_INTERFACE!{interface IWalletBarcode(IWalletBarcodeVtbl): IInspectable(IInspectableVtbl) [IID_IWalletBarcode] { + fn get_Symbology(&mut self, out: *mut WalletBarcodeSymbology) -> HRESULT, + fn get_Value(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetImageAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IWalletBarcode { + #[inline] pub unsafe fn get_symbology(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDrawerOpen)(self, &mut out); + let hr = ((*self.lpVtbl).get_Symbology)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_drawer_event_source(&mut self) -> Result> { + #[inline] pub unsafe fn get_value(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DrawerEventSource)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn claim_drawer_async(&mut self) -> Result>> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_image_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ClaimDrawerAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetImageAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn check_health_async(&mut self, level: UnifiedPosHealthCheckLevel) -> Result>> { + } + RT_ENUM! { enum WalletDetailViewPosition: i32 { + Hidden (WalletDetailViewPosition_Hidden) = 0, HeaderField1 (WalletDetailViewPosition_HeaderField1) = 1, HeaderField2 (WalletDetailViewPosition_HeaderField2) = 2, PrimaryField1 (WalletDetailViewPosition_PrimaryField1) = 3, PrimaryField2 (WalletDetailViewPosition_PrimaryField2) = 4, SecondaryField1 (WalletDetailViewPosition_SecondaryField1) = 5, SecondaryField2 (WalletDetailViewPosition_SecondaryField2) = 6, SecondaryField3 (WalletDetailViewPosition_SecondaryField3) = 7, SecondaryField4 (WalletDetailViewPosition_SecondaryField4) = 8, SecondaryField5 (WalletDetailViewPosition_SecondaryField5) = 9, CenterField1 (WalletDetailViewPosition_CenterField1) = 10, FooterField1 (WalletDetailViewPosition_FooterField1) = 11, FooterField2 (WalletDetailViewPosition_FooterField2) = 12, FooterField3 (WalletDetailViewPosition_FooterField3) = 13, FooterField4 (WalletDetailViewPosition_FooterField4) = 14, + }} + RT_ENUM! { enum WalletSummaryViewPosition: i32 { + Hidden (WalletSummaryViewPosition_Hidden) = 0, Field1 (WalletSummaryViewPosition_Field1) = 1, Field2 (WalletSummaryViewPosition_Field2) = 2, + }} + DEFINE_IID!(IID_IWalletItemCustomProperty, 3108716787, 64000, 16637, 152, 220, 157, 228, 102, 151, 241, 231); + RT_INTERFACE!{interface IWalletItemCustomProperty(IWalletItemCustomPropertyVtbl): IInspectable(IInspectableVtbl) [IID_IWalletItemCustomProperty] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_Value(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Value(&mut self, value: HSTRING) -> HRESULT, + fn get_AutoDetectLinks(&mut self, out: *mut bool) -> HRESULT, + fn put_AutoDetectLinks(&mut self, value: bool) -> HRESULT, + fn get_DetailViewPosition(&mut self, out: *mut WalletDetailViewPosition) -> HRESULT, + fn put_DetailViewPosition(&mut self, value: WalletDetailViewPosition) -> HRESULT, + fn get_SummaryViewPosition(&mut self, out: *mut WalletSummaryViewPosition) -> HRESULT, + fn put_SummaryViewPosition(&mut self, value: WalletSummaryViewPosition) -> HRESULT + }} + impl IWalletItemCustomProperty { + #[inline] pub unsafe fn get_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CheckHealthAsync)(self, level, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_status_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn set_value(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_detect_links(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_StatusUpdated)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_AutoDetectLinks)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_status_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_StatusUpdated)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - } - RT_CLASS!{class ClaimedCashDrawer: IClaimedCashDrawer} - DEFINE_IID!(IID_ICashDrawerCloseAlarm, 1811451079, 28515, 17166, 171, 59, 149, 215, 95, 251, 232, 127); - RT_INTERFACE!{interface ICashDrawerCloseAlarm(ICashDrawerCloseAlarmVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerCloseAlarm] { - fn put_AlarmTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_AlarmTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_BeepFrequency(&mut self, value: u32) -> HRESULT, - fn get_BeepFrequency(&mut self, out: *mut u32) -> HRESULT, - fn put_BeepDuration(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_BeepDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_BeepDelay(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_BeepDelay(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn add_AlarmTimeoutExpired(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AlarmTimeoutExpired(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn StartAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl ICashDrawerCloseAlarm { - #[inline] pub unsafe fn set_alarm_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { - let hr = ((*self.lpVtbl).put_AlarmTimeout)(self, value); + #[inline] pub unsafe fn set_auto_detect_links(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoDetectLinks)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_alarm_timeout(&mut self) -> Result { + #[inline] pub unsafe fn get_detail_view_position(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AlarmTimeout)(self, &mut out); + let hr = ((*self.lpVtbl).get_DetailViewPosition)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_beep_frequency(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_BeepFrequency)(self, value); + #[inline] pub unsafe fn set_detail_view_position(&mut self, value: WalletDetailViewPosition) -> Result<()> { + let hr = ((*self.lpVtbl).put_DetailViewPosition)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_beep_frequency(&mut self) -> Result { + #[inline] pub unsafe fn get_summary_view_position(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BeepFrequency)(self, &mut out); + let hr = ((*self.lpVtbl).get_SummaryViewPosition)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_beep_duration(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { - let hr = ((*self.lpVtbl).put_BeepDuration)(self, value); + #[inline] pub unsafe fn set_summary_view_position(&mut self, value: WalletSummaryViewPosition) -> Result<()> { + let hr = ((*self.lpVtbl).put_SummaryViewPosition)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_beep_duration(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BeepDuration)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IWalletVerb, 397944534, 58305, 19572, 138, 148, 33, 122, 173, 188, 72, 132); + RT_INTERFACE!{interface IWalletVerb(IWalletVerbVtbl): IInspectable(IInspectableVtbl) [IID_IWalletVerb] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT + }} + impl IWalletVerb { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_beep_delay(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { - let hr = ((*self.lpVtbl).put_BeepDelay)(self, value); + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_beep_delay(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BeepDelay)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_alarm_timeout_expired(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AlarmTimeoutExpired)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_ENUM! { enum WalletItemKind: i32 { + Invalid (WalletItemKind_Invalid) = 0, Deal (WalletItemKind_Deal) = 1, General (WalletItemKind_General) = 2, PaymentInstrument (WalletItemKind_PaymentInstrument) = 3, Ticket (WalletItemKind_Ticket) = 4, BoardingPass (WalletItemKind_BoardingPass) = 5, MembershipCard (WalletItemKind_MembershipCard) = 6, + }} + DEFINE_IID!(IID_IWalletItem, 548752360, 4493, 20164, 153, 108, 185, 99, 231, 189, 62, 116); + RT_INTERFACE!{interface IWalletItem(IWalletItemVtbl): IInspectable(IInspectableVtbl) [IID_IWalletItem] { + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsAcknowledged(&mut self, out: *mut bool) -> HRESULT, + fn put_IsAcknowledged(&mut self, value: bool) -> HRESULT, + fn get_IssuerDisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_IssuerDisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_LastUpdated(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_LastUpdated(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Kind(&mut self, out: *mut WalletItemKind) -> HRESULT, + fn get_Barcode(&mut self, out: *mut *mut WalletBarcode) -> HRESULT, + fn put_Barcode(&mut self, value: *mut WalletBarcode) -> HRESULT, + fn get_ExpirationDate(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ExpirationDate(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy14(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Logo159x159(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy15(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Logo159x159(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy16(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Logo336x336(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy17(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Logo336x336(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy18(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Logo99x99(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy19(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Logo99x99(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_DisplayMessage(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayMessage(&mut self, value: HSTRING) -> HRESULT, + fn get_IsDisplayMessageLaunchable(&mut self, out: *mut bool) -> HRESULT, + fn put_IsDisplayMessageLaunchable(&mut self, value: bool) -> HRESULT, + fn get_LogoText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_LogoText(&mut self, value: HSTRING) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy26(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_HeaderColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy27(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_HeaderColor(&mut self, value: super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy28(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_BodyColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy29(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_BodyColor(&mut self, value: super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy30(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_HeaderFontColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy31(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_HeaderFontColor(&mut self, value: super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy32(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_BodyFontColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy33(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_BodyFontColor(&mut self, value: super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy34(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_HeaderBackgroundImage(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy35(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_HeaderBackgroundImage(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy36(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_BodyBackgroundImage(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy37(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_BodyBackgroundImage(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy38(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_LogoImage(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy39(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_LogoImage(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy40(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_PromotionalImage(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy41(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_PromotionalImage(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_RelevantDate(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_RelevantDate(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_RelevantDateDisplayMessage(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RelevantDateDisplayMessage(&mut self, value: HSTRING) -> HRESULT, + fn get_TransactionHistory(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_RelevantLocations(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_IsMoreTransactionHistoryLaunchable(&mut self, out: *mut bool) -> HRESULT, + fn put_IsMoreTransactionHistoryLaunchable(&mut self, value: bool) -> HRESULT, + fn get_DisplayProperties(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_Verbs(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT + }} + impl IWalletItem { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_alarm_timeout_expired(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AlarmTimeoutExpired)(self, token); + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn start_async(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).StartAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - } - RT_CLASS!{class CashDrawerCloseAlarm: ICashDrawerCloseAlarm} - DEFINE_IID!(IID_IClaimedBarcodeScanner, 1248048284, 36772, 17202, 187, 38, 148, 93, 17, 216, 30, 15); - RT_INTERFACE!{interface IClaimedBarcodeScanner(IClaimedBarcodeScannerVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedBarcodeScanner] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_IsDisabledOnDataReceived(&mut self, value: bool) -> HRESULT, - fn get_IsDisabledOnDataReceived(&mut self, out: *mut bool) -> HRESULT, - fn put_IsDecodeDataEnabled(&mut self, value: bool) -> HRESULT, - fn get_IsDecodeDataEnabled(&mut self, out: *mut bool) -> HRESULT, - fn EnableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DisableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RetainDevice(&mut self) -> HRESULT, - fn SetActiveSymbologiesAsync(&mut self, symbologies: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ResetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn UpdateStatisticsAsync(&mut self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SetActiveProfileAsync(&mut self, profile: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn add_DataReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DataReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_TriggerPressed(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TriggerPressed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_TriggerReleased(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TriggerReleased(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ReleaseDeviceRequested(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReleaseDeviceRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ImagePreviewReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ImagePreviewReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ErrorOccurred(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ErrorOccurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IClaimedBarcodeScanner { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + #[inline] pub unsafe fn get_is_acknowledged(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsAcknowledged)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_is_disabled_on_data_received(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsDisabledOnDataReceived)(self, value); + #[inline] pub unsafe fn set_is_acknowledged(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsAcknowledged)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_disabled_on_data_received(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDisabledOnDataReceived)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_issuer_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IssuerDisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_is_decode_data_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsDecodeDataEnabled)(self, value); + #[inline] pub unsafe fn set_issuer_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_IssuerDisplayName)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_decode_data_enabled(&mut self) -> Result { + #[inline] pub unsafe fn get_last_updated(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LastUpdated)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_last_updated(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_LastUpdated)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDecodeDataEnabled)(self, &mut out); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn enable_async(&mut self) -> Result> { + #[inline] pub unsafe fn get_barcode(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).EnableAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_Barcode)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn disable_async(&mut self) -> Result> { + #[inline] pub unsafe fn set_barcode(&mut self, value: &WalletBarcode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Barcode)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).DisableAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn retain_device(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).RetainDevice)(self); + #[inline] pub unsafe fn set_expiration_date(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExpirationDate)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_active_symbologies_async(&mut self, symbologies: &super::super::foundation::collections::IIterable) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_logo159x159(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SetActiveSymbologiesAsync)(self, symbologies as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Logo159x159)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn reset_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_logo159x159(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Logo159x159)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_logo336x336(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Logo336x336)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn update_statistics_async(&mut self, statistics: &super::super::foundation::collections::IIterable>) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_logo336x336(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Logo336x336)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_logo99x99(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self, statistics as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Logo99x99)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_active_profile_async(&mut self, profile: &HStringArg) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_logo99x99(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Logo99x99)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_message(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SetActiveProfileAsync)(self, profile.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DisplayMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_data_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn set_display_message(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayMessage)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_display_message_launchable(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_DataReceived)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IsDisplayMessageLaunchable)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_data_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_DataReceived)(self, token); + #[inline] pub unsafe fn set_is_display_message_launchable(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDisplayMessageLaunchable)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_trigger_pressed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_TriggerPressed)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_logo_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LogoText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_trigger_pressed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_TriggerPressed)(self, token); + #[inline] pub unsafe fn set_logo_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_LogoText)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_trigger_released(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_header_color(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_TriggerReleased)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_HeaderColor)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_trigger_released(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_TriggerReleased)(self, token); + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_header_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderColor)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_release_device_requested(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_body_color(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_BodyColor)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_release_device_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self, token); + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_body_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_BodyColor)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_image_preview_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_header_font_color(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ImagePreviewReceived)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_HeaderFontColor)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_image_preview_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ImagePreviewReceived)(self, token); + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_header_font_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderFontColor)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_error_occurred(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_body_font_color(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ErrorOccurred)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_BodyFontColor)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_error_occurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ErrorOccurred)(self, token); + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_body_font_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_BodyFontColor)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IClaimedBarcodeScanner1, 4128943372, 34129, 17076, 153, 140, 151, 12, 32, 33, 10, 34); - RT_INTERFACE!{interface IClaimedBarcodeScanner1(IClaimedBarcodeScanner1Vtbl): IInspectable(IInspectableVtbl) [IID_IClaimedBarcodeScanner1] { - fn StartSoftwareTriggerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StopSoftwareTriggerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT - }} - impl IClaimedBarcodeScanner1 { - #[inline] pub unsafe fn start_software_trigger_async(&mut self) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_header_background_image(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).StartSoftwareTriggerAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_HeaderBackgroundImage)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn stop_software_trigger_async(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).StopSoftwareTriggerAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_header_background_image(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderBackgroundImage)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IClaimedMagneticStripeReader, 1197254899, 37911, 18620, 185, 215, 65, 99, 167, 132, 76, 2); - RT_INTERFACE!{interface IClaimedMagneticStripeReader(IClaimedMagneticStripeReaderVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedMagneticStripeReader] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_IsDisabledOnDataReceived(&mut self, value: bool) -> HRESULT, - fn get_IsDisabledOnDataReceived(&mut self, out: *mut bool) -> HRESULT, - fn put_IsDecodeDataEnabled(&mut self, value: bool) -> HRESULT, - fn get_IsDecodeDataEnabled(&mut self, out: *mut bool) -> HRESULT, - fn get_IsDeviceAuthenticated(&mut self, out: *mut bool) -> HRESULT, - fn put_DataEncryptionAlgorithm(&mut self, value: u32) -> HRESULT, - fn get_DataEncryptionAlgorithm(&mut self, out: *mut u32) -> HRESULT, - fn put_TracksToRead(&mut self, value: MagneticStripeReaderTrackIds) -> HRESULT, - fn get_TracksToRead(&mut self, out: *mut MagneticStripeReaderTrackIds) -> HRESULT, - fn put_IsTransmitSentinelsEnabled(&mut self, value: bool) -> HRESULT, - fn get_IsTransmitSentinelsEnabled(&mut self, out: *mut bool) -> HRESULT, - fn EnableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DisableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RetainDevice(&mut self) -> HRESULT, - fn SetErrorReportingType(&mut self, value: MagneticStripeReaderErrorReportingType) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy17(&mut self) -> (), - #[cfg(feature="windows.storage")] fn RetrieveDeviceAuthenticationDataAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn AuthenticateDeviceAsync(&mut self, responseTokenSize: u32, responseToken: *mut u8, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeAuthenticateDeviceAsync(&mut self, responseTokenSize: u32, responseToken: *mut u8, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn UpdateKeyAsync(&mut self, key: HSTRING, keyName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ResetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn UpdateStatisticsAsync(&mut self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn add_BankCardDataReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BankCardDataReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AamvaCardDataReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AamvaCardDataReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VendorSpecificDataReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VendorSpecificDataReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ReleaseDeviceRequested(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReleaseDeviceRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ErrorOccurred(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ErrorOccurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IClaimedMagneticStripeReader { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_body_background_image(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + let hr = ((*self.lpVtbl).get_BodyBackgroundImage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_is_disabled_on_data_received(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsDisabledOnDataReceived)(self, value); + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_body_background_image(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_BodyBackgroundImage)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_disabled_on_data_received(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDisabledOnDataReceived)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_logo_image(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LogoImage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_is_decode_data_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsDecodeDataEnabled)(self, value); + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_logo_image(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_LogoImage)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_decode_data_enabled(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDecodeDataEnabled)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_device_authenticated(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDeviceAuthenticated)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_promotional_image(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PromotionalImage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_data_encryption_algorithm(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_DataEncryptionAlgorithm)(self, value); + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_promotional_image(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_PromotionalImage)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_data_encryption_algorithm(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DataEncryptionAlgorithm)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_relevant_date(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RelevantDate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_tracks_to_read(&mut self, value: MagneticStripeReaderTrackIds) -> Result<()> { - let hr = ((*self.lpVtbl).put_TracksToRead)(self, value); + #[inline] pub unsafe fn set_relevant_date(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_RelevantDate)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_tracks_to_read(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_TracksToRead)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_relevant_date_display_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RelevantDateDisplayMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_is_transmit_sentinels_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsTransmitSentinelsEnabled)(self, value); + #[inline] pub unsafe fn set_relevant_date_display_message(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RelevantDateDisplayMessage)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_transmit_sentinels_enabled(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsTransmitSentinelsEnabled)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn enable_async(&mut self) -> Result> { + #[inline] pub unsafe fn get_transaction_history(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).EnableAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_TransactionHistory)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn disable_async(&mut self) -> Result> { + #[inline] pub unsafe fn get_relevant_locations(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).DisableAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_RelevantLocations)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn retain_device(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).RetainDevice)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_is_more_transaction_history_launchable(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsMoreTransactionHistoryLaunchable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_error_reporting_type(&mut self, value: MagneticStripeReaderErrorReportingType) -> Result<()> { - let hr = ((*self.lpVtbl).SetErrorReportingType)(self, value); + #[inline] pub unsafe fn set_is_more_transaction_history_launchable(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsMoreTransactionHistoryLaunchable)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn retrieve_device_authentication_data_async(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).RetrieveDeviceAuthenticationDataAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn authenticate_device_async(&mut self, responseToken: &[u8]) -> Result> { + #[inline] pub unsafe fn get_display_properties(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).AuthenticateDeviceAsync)(self, responseToken.len() as u32, responseToken.as_ptr() as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_DisplayProperties)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn de_authenticate_device_async(&mut self, responseToken: &[u8]) -> Result> { + #[inline] pub unsafe fn get_verbs(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).DeAuthenticateDeviceAsync)(self, responseToken.len() as u32, responseToken.as_ptr() as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Verbs)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn update_key_async(&mut self, key: &HStringArg, keyName: &HStringArg) -> Result> { + } + RT_CLASS!{class WalletBarcode: IWalletBarcode [IWalletBarcodeFactory] [CLSID_WalletBarcode]} + DEFINE_CLSID!(CLSID_WalletBarcode = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,87,97,108,108,101,116,46,87,97,108,108,101,116,66,97,114,99,111,100,101,0]); + RT_CLASS!{class WalletTransaction: IWalletTransaction} + RT_CLASS!{class WalletRelevantLocation: IWalletRelevantLocation} + RT_CLASS!{class WalletItemCustomProperty: IWalletItemCustomProperty [IWalletItemCustomPropertyFactory] [CLSID_WalletItemCustomProperty]} + DEFINE_CLSID!(CLSID_WalletItemCustomProperty = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,87,97,108,108,101,116,46,87,97,108,108,101,116,73,116,101,109,67,117,115,116,111,109,80,114,111,112,101,114,116,121,0]); + RT_CLASS!{class WalletVerb: IWalletVerb [IWalletVerbFactory] [CLSID_WalletVerb]} + DEFINE_CLSID!(CLSID_WalletVerb = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,87,97,108,108,101,116,46,87,97,108,108,101,116,86,101,114,98,0]); + DEFINE_IID!(IID_IWalletTransaction, 1088547136, 9734, 17689, 129, 203, 191, 241, 198, 13, 31, 121); + RT_INTERFACE!{interface IWalletTransaction(IWalletTransactionVtbl): IInspectable(IInspectableVtbl) [IID_IWalletTransaction] { + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT, + fn get_DisplayAmount(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayAmount(&mut self, value: HSTRING) -> HRESULT, + fn get_IgnoreTimeOfDay(&mut self, out: *mut bool) -> HRESULT, + fn put_IgnoreTimeOfDay(&mut self, value: bool) -> HRESULT, + fn get_DisplayLocation(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayLocation(&mut self, value: HSTRING) -> HRESULT, + fn get_TransactionDate(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_TransactionDate(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_IsLaunchable(&mut self, out: *mut bool) -> HRESULT, + fn put_IsLaunchable(&mut self, value: bool) -> HRESULT + }} + impl IWalletTransaction { + #[inline] pub unsafe fn get_description(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).UpdateKeyAsync)(self, key.get(), keyName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn reset_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn update_statistics_async(&mut self, statistics: &super::super::foundation::collections::IIterable>) -> Result> { + #[inline] pub unsafe fn get_display_amount(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self, statistics as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_bank_card_data_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_BankCardDataReceived)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DisplayAmount)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_bank_card_data_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_BankCardDataReceived)(self, token); + #[inline] pub unsafe fn set_display_amount(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayAmount)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_aamva_card_data_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_ignore_time_of_day(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AamvaCardDataReceived)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IgnoreTimeOfDay)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_aamva_card_data_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AamvaCardDataReceived)(self, token); + #[inline] pub unsafe fn set_ignore_time_of_day(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IgnoreTimeOfDay)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_vendor_specific_data_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_VendorSpecificDataReceived)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_display_location(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayLocation)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_vendor_specific_data_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_VendorSpecificDataReceived)(self, token); + #[inline] pub unsafe fn set_display_location(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayLocation)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_release_device_requested(&mut self, handler: &super::super::foundation::EventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_transaction_date(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransactionDate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_release_device_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self, token); + #[inline] pub unsafe fn set_transaction_date(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransactionDate)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_error_occurred(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_is_launchable(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ErrorOccurred)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IsLaunchable)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_error_occurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ErrorOccurred)(self, token); + #[inline] pub unsafe fn set_is_launchable(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsLaunchable)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IClaimedPosPrinter, 1835322892, 57406, 19220, 163, 142, 194, 140, 52, 184, 99, 83); - RT_INTERFACE!{interface IClaimedPosPrinter(IClaimedPosPrinterVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedPosPrinter] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_CharacterSet(&mut self, value: u32) -> HRESULT, - fn get_CharacterSet(&mut self, out: *mut u32) -> HRESULT, - fn get_IsCoverOpen(&mut self, out: *mut bool) -> HRESULT, - fn put_IsCharacterSetMappingEnabled(&mut self, value: bool) -> HRESULT, - fn get_IsCharacterSetMappingEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_MapMode(&mut self, value: PosPrinterMapMode) -> HRESULT, - fn get_MapMode(&mut self, out: *mut PosPrinterMapMode) -> HRESULT, - fn get_Receipt(&mut self, out: *mut *mut ClaimedReceiptPrinter) -> HRESULT, - fn get_Slip(&mut self, out: *mut *mut ClaimedSlipPrinter) -> HRESULT, - fn get_Journal(&mut self, out: *mut *mut ClaimedJournalPrinter) -> HRESULT, - fn EnableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DisableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RetainDeviceAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ResetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UpdateStatisticsAsync(&mut self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_ReleaseDeviceRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReleaseDeviceRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_IWalletRelevantLocation, 2681763882, 58361, 19937, 186, 179, 187, 25, 46, 70, 179, 243); + RT_INTERFACE!{interface IWalletRelevantLocation(IWalletRelevantLocationVtbl): IInspectable(IInspectableVtbl) [IID_IWalletRelevantLocation] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_Position(&mut self, out: *mut super::super::devices::geolocation::BasicGeoposition) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.devices")] fn put_Position(&mut self, value: super::super::devices::geolocation::BasicGeoposition) -> HRESULT, + fn get_DisplayMessage(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayMessage(&mut self, value: HSTRING) -> HRESULT }} - impl IClaimedPosPrinter { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + impl IWalletRelevantLocation { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_position(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_character_set(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_CharacterSet)(self, value); + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn set_position(&mut self, value: super::super::devices::geolocation::BasicGeoposition) -> Result<()> { + let hr = ((*self.lpVtbl).put_Position)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_character_set(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CharacterSet)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_cover_open(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsCoverOpen)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_display_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_is_character_set_mapping_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsCharacterSetMappingEnabled)(self, value); + #[inline] pub unsafe fn set_display_message(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayMessage)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_character_set_mapping_enabled(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsCharacterSetMappingEnabled)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_map_mode(&mut self, value: PosPrinterMapMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_MapMode)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IWalletItemStore, 1902135371, 27977, 18680, 145, 169, 64, 161, 208, 241, 62, 244); + RT_INTERFACE!{interface IWalletItemStore(IWalletItemStoreVtbl): IInspectable(IInspectableVtbl) [IID_IWalletItemStore] { + fn AddAsync(&mut self, id: HSTRING, item: *mut WalletItem, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ClearAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetWalletItemAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetItemsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetItemsWithKindAsync(&mut self, kind: WalletItemKind, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn ImportItemAsync(&mut self, stream: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DeleteAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowItemAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn UpdateAsync(&mut self, item: *mut WalletItem, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IWalletItemStore { + #[inline] pub unsafe fn add_async(&mut self, id: &HStringArg, item: &WalletItem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddAsync)(self, id.get(), item as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_map_mode(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MapMode)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn clear_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_receipt(&mut self) -> Result> { + #[inline] pub unsafe fn get_wallet_item_async(&mut self, id: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Receipt)(self, &mut out); + let hr = ((*self.lpVtbl).GetWalletItemAsync)(self, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_slip(&mut self) -> Result> { + #[inline] pub unsafe fn get_items_async(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Slip)(self, &mut out); + let hr = ((*self.lpVtbl).GetItemsAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_journal(&mut self) -> Result> { + #[inline] pub unsafe fn get_items_with_kind_async(&mut self, kind: WalletItemKind) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Journal)(self, &mut out); + let hr = ((*self.lpVtbl).GetItemsWithKindAsync)(self, kind, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn enable_async(&mut self) -> Result>> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn import_item_async(&mut self, stream: &super::super::storage::streams::IRandomAccessStreamReference) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).EnableAsync)(self, &mut out); + let hr = ((*self.lpVtbl).ImportItemAsync)(self, stream as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn disable_async(&mut self) -> Result>> { + #[inline] pub unsafe fn delete_async(&mut self, id: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).DisableAsync)(self, &mut out); + let hr = ((*self.lpVtbl).DeleteAsync)(self, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn retain_device_async(&mut self) -> Result>> { + #[inline] pub unsafe fn show_async(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RetainDeviceAsync)(self, &mut out); + let hr = ((*self.lpVtbl).ShowAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn reset_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub unsafe fn show_item_async(&mut self, id: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).ShowItemAsync)(self, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn update_statistics_async(&mut self, statistics: &super::super::foundation::collections::IIterable>) -> Result>> { + #[inline] pub unsafe fn update_async(&mut self, item: &WalletItem) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self, statistics as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).UpdateAsync)(self, item as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_release_device_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + } + RT_CLASS!{class WalletItem: IWalletItem [IWalletItemFactory] [CLSID_WalletItem]} + DEFINE_CLSID!(CLSID_WalletItem = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,87,97,108,108,101,116,46,87,97,108,108,101,116,73,116,101,109,0]); + DEFINE_IID!(IID_IWalletItemStore2, 1709605616, 28681, 18965, 189, 84, 79, 255, 55, 155, 255, 226); + RT_INTERFACE!{interface IWalletItemStore2(IWalletItemStore2Vtbl): IInspectable(IInspectableVtbl) [IID_IWalletItemStore2] { + fn add_ItemsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemsChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IWalletItemStore2 { + #[inline] pub unsafe fn add_items_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).add_ItemsChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_release_device_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self, token); + #[inline] pub unsafe fn remove_items_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ItemsChanged)(self, cookie); if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IClaimedCashDrawer, 3393165743, 43960, 17089, 138, 132, 92, 102, 81, 47, 90, 117); - RT_INTERFACE!{interface IClaimedCashDrawer(IClaimedCashDrawerVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedCashDrawer] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, - fn get_IsDrawerOpen(&mut self, out: *mut bool) -> HRESULT, - fn get_CloseAlarm(&mut self, out: *mut *mut CashDrawerCloseAlarm) -> HRESULT, - fn OpenDrawerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn EnableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DisableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RetainDeviceAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ResetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UpdateStatisticsAsync(&mut self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_ReleaseDeviceRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReleaseDeviceRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class WalletItemStore: IWalletItemStore} + DEFINE_IID!(IID_IWalletManagerStatics, 1360123576, 51620, 19556, 180, 221, 225, 229, 72, 0, 28, 13); + RT_INTERFACE!{static interface IWalletManagerStatics(IWalletManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWalletManagerStatics] { + fn RequestStoreAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IClaimedCashDrawer { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl IWalletManagerStatics { + #[inline] pub unsafe fn request_store_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IWalletItemCustomPropertyFactory, 3489950276, 24993, 16810, 178, 89, 165, 97, 10, 181, 213, 117); + RT_INTERFACE!{static interface IWalletItemCustomPropertyFactory(IWalletItemCustomPropertyFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWalletItemCustomPropertyFactory] { + fn CreateWalletItemCustomProperty(&mut self, name: HSTRING, value: HSTRING, out: *mut *mut WalletItemCustomProperty) -> HRESULT + }} + impl IWalletItemCustomPropertyFactory { + #[inline] pub unsafe fn create_wallet_item_custom_property(&mut self, name: &HStringArg, value: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWalletItemCustomProperty)(self, name.get(), value.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_is_drawer_open(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDrawerOpen)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IWalletVerbFactory, 1979787121, 48728, 19806, 131, 237, 88, 177, 102, 156, 122, 217); + RT_INTERFACE!{static interface IWalletVerbFactory(IWalletVerbFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWalletVerbFactory] { + fn CreateWalletVerb(&mut self, name: HSTRING, out: *mut *mut WalletVerb) -> HRESULT + }} + impl IWalletVerbFactory { + #[inline] pub unsafe fn create_wallet_verb(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWalletVerb)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_close_alarm(&mut self) -> Result> { + } + RT_ACTIVATABLE!{IWalletManagerStatics [CLSID_WalletManager]} + DEFINE_CLSID!(CLSID_WalletManager = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,87,97,108,108,101,116,46,87,97,108,108,101,116,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IWalletItemFactory, 1407349872, 20235, 19006, 153, 229, 11, 187, 30, 171, 56, 212); + RT_INTERFACE!{static interface IWalletItemFactory(IWalletItemFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWalletItemFactory] { + fn CreateWalletItem(&mut self, kind: WalletItemKind, displayName: HSTRING, out: *mut *mut WalletItem) -> HRESULT + }} + impl IWalletItemFactory { + #[inline] pub unsafe fn create_wallet_item(&mut self, kind: WalletItemKind, displayName: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CloseAlarm)(self, &mut out); + let hr = ((*self.lpVtbl).CreateWalletItem)(self, kind, displayName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn open_drawer_async(&mut self) -> Result>> { + } + DEFINE_IID!(IID_IWalletBarcodeFactory, 806449505, 60828, 18078, 187, 253, 48, 108, 149, 234, 113, 8); + RT_INTERFACE!{static interface IWalletBarcodeFactory(IWalletBarcodeFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWalletBarcodeFactory] { + fn CreateWalletBarcode(&mut self, symbology: WalletBarcodeSymbology, value: HSTRING, out: *mut *mut WalletBarcode) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateCustomWalletBarcode(&mut self, streamToBarcodeImage: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut WalletBarcode) -> HRESULT + }} + impl IWalletBarcodeFactory { + #[inline] pub unsafe fn create_wallet_barcode(&mut self, symbology: WalletBarcodeSymbology, value: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).OpenDrawerAsync)(self, &mut out); + let hr = ((*self.lpVtbl).CreateWalletBarcode)(self, symbology, value.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn enable_async(&mut self) -> Result>> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_custom_wallet_barcode(&mut self, streamToBarcodeImage: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).EnableAsync)(self, &mut out); + let hr = ((*self.lpVtbl).CreateCustomWalletBarcode)(self, streamToBarcodeImage as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn disable_async(&mut self) -> Result>> { + } + RT_STRUCT! { struct WalletContract { + + }} + RT_ENUM! { enum WalletActionKind: i32 { + OpenItem (WalletActionKind_OpenItem) = 0, Transaction (WalletActionKind_Transaction) = 1, MoreTransactions (WalletActionKind_MoreTransactions) = 2, Message (WalletActionKind_Message) = 3, Verb (WalletActionKind_Verb) = 4, + }} +pub mod system { // Windows.ApplicationModel.Wallet.System +use ::prelude::*; + RT_ENUM! { enum WalletItemAppAssociation: i32 { + None (WalletItemAppAssociation_None) = 0, AppInstalled (WalletItemAppAssociation_AppInstalled) = 1, AppNotInstalled (WalletItemAppAssociation_AppNotInstalled) = 2, + }} + DEFINE_IID!(IID_IWalletItemSystemStore, 1378757631, 38562, 18967, 141, 25, 254, 29, 159, 131, 117, 97); + RT_INTERFACE!{interface IWalletItemSystemStore(IWalletItemSystemStoreVtbl): IInspectable(IInspectableVtbl) [IID_IWalletItemSystemStore] { + fn GetItemsAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn DeleteAsync(&mut self, item: *mut super::WalletItem, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn ImportItemAsync(&mut self, stream: *mut ::rt::gen::windows::storage::streams::IRandomAccessStreamReference, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetAppStatusForItem(&mut self, item: *mut super::WalletItem, out: *mut WalletItemAppAssociation) -> HRESULT, + fn LaunchAppForItemAsync(&mut self, item: *mut super::WalletItem, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IWalletItemSystemStore { + #[inline] pub unsafe fn get_items_async(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).DisableAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetItemsAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn retain_device_async(&mut self) -> Result>> { + #[inline] pub unsafe fn delete_async(&mut self, item: &super::WalletItem) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RetainDeviceAsync)(self, &mut out); + let hr = ((*self.lpVtbl).DeleteAsync)(self, item as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn reset_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn import_item_async(&mut self, stream: &::rt::gen::windows::storage::streams::IRandomAccessStreamReference) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).ImportItemAsync)(self, stream as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn update_statistics_async(&mut self, statistics: &super::super::foundation::collections::IIterable>) -> Result>> { + #[inline] pub unsafe fn get_app_status_for_item(&mut self, item: &super::WalletItem) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetAppStatusForItem)(self, item as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn launch_app_for_item_async(&mut self, item: &super::WalletItem) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self, statistics as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).LaunchAppForItemAsync)(self, item as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_release_device_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + } + DEFINE_IID!(IID_IWalletItemSystemStore2, 4186782286, 48640, 20445, 151, 52, 108, 17, 60, 26, 193, 203); + RT_INTERFACE!{interface IWalletItemSystemStore2(IWalletItemSystemStore2Vtbl): IInspectable(IInspectableVtbl) [IID_IWalletItemSystemStore2] { + fn add_ItemsChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemsChanged(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IWalletItemSystemStore2 { + #[inline] pub unsafe fn add_items_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).add_ItemsChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_release_device_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self, token); + #[inline] pub unsafe fn remove_items_changed(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ItemsChanged)(self, cookie); if hr == S_OK { Ok(()) } else { err(hr) } } } -} // Windows.Devices.PointOfService -pub mod radios { // Windows.Devices.Radios -use ::prelude::*; - RT_ENUM! { enum RadioState: i32 { - Unknown (RadioState_Unknown) = 0, On (RadioState_On) = 1, Off (RadioState_Off) = 2, Disabled (RadioState_Disabled) = 3, - }} - RT_ENUM! { enum RadioKind: i32 { - Other (RadioKind_Other) = 0, WiFi (RadioKind_WiFi) = 1, MobileBroadband (RadioKind_MobileBroadband) = 2, Bluetooth (RadioKind_Bluetooth) = 3, FM (RadioKind_FM) = 4, - }} - RT_ENUM! { enum RadioAccessStatus: i32 { - Unspecified (RadioAccessStatus_Unspecified) = 0, Allowed (RadioAccessStatus_Allowed) = 1, DeniedByUser (RadioAccessStatus_DeniedByUser) = 2, DeniedBySystem (RadioAccessStatus_DeniedBySystem) = 3, - }} - DEFINE_IID!(IID_IRadioStatics, 1605804334, 26571, 18094, 170, 233, 101, 145, 159, 134, 239, 244); - RT_INTERFACE!{static interface IRadioStatics(IRadioStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRadioStatics] { - fn GetRadiosAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class WalletItemSystemStore: IWalletItemSystemStore} + DEFINE_IID!(IID_IWalletManagerSystemStatics, 3202935689, 9780, 19354, 139, 35, 238, 137, 3, 201, 31, 224); + RT_INTERFACE!{static interface IWalletManagerSystemStatics(IWalletManagerSystemStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWalletManagerSystemStatics] { + fn RequestStoreAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT }} - impl IRadioStatics { - #[inline] pub unsafe fn get_radios_async(&mut self) -> Result>>> { + impl IWalletManagerSystemStatics { + #[inline] pub unsafe fn request_store_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetRadiosAsync)(self, &mut out); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + RT_ACTIVATABLE!{IWalletManagerSystemStatics [CLSID_WalletManagerSystem]} + DEFINE_CLSID!(CLSID_WalletManagerSystem = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,87,97,108,108,101,116,46,83,121,115,116,101,109,46,87,97,108,108,101,116,77,97,110,97,103,101,114,83,121,115,116,101,109,0]); +} // Windows.ApplicationModel.Wallet.System +} // Windows.ApplicationModel.Wallet +pub mod preview { // Windows.ApplicationModel.Preview +pub mod notes { // Windows.ApplicationModel.Preview.Notes +use ::prelude::*; + RT_STRUCT! { struct PreviewNotesContract { + + }} + DEFINE_IID!(IID_INotePlacementChangedPreviewEventArgs, 1226659767, 63360, 20095, 169, 57, 154, 76, 175, 150, 82, 20); + RT_INTERFACE!{interface INotePlacementChangedPreviewEventArgs(INotePlacementChangedPreviewEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_INotePlacementChangedPreviewEventArgs] { + fn get_ViewId(&mut self, out: *mut i32) -> HRESULT + }} + impl INotePlacementChangedPreviewEventArgs { + #[inline] pub unsafe fn get_view_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ViewId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + RT_CLASS!{class NotePlacementChangedPreviewEventArgs: INotePlacementChangedPreviewEventArgs} + DEFINE_IID!(IID_INoteVisibilityChangedPreviewEventArgs, 238314654, 14357, 20470, 131, 179, 161, 77, 23, 18, 14, 36); + RT_INTERFACE!{interface INoteVisibilityChangedPreviewEventArgs(INoteVisibilityChangedPreviewEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_INoteVisibilityChangedPreviewEventArgs] { + fn get_ViewId(&mut self, out: *mut i32) -> HRESULT, + fn get_IsVisible(&mut self, out: *mut bool) -> HRESULT + }} + impl INoteVisibilityChangedPreviewEventArgs { + #[inline] pub unsafe fn get_view_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ViewId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_is_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class Radio: IRadio} - RT_ACTIVATABLE!{IRadioStatics [CLSID_Radio]} - DEFINE_CLSID!(CLSID_Radio = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,82,97,100,105,111,115,46,82,97,100,105,111,0]); - DEFINE_IID!(IID_IRadio, 622926047, 45886, 16746, 135, 95, 28, 243, 138, 226, 216, 62); - RT_INTERFACE!{interface IRadio(IRadioVtbl): IInspectable(IInspectableVtbl) [IID_IRadio] { - fn SetStateAsync(&mut self, value: RadioState, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_StateChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_State(&mut self, out: *mut RadioState) -> HRESULT, - fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Kind(&mut self, out: *mut RadioKind) -> HRESULT + RT_CLASS!{class NoteVisibilityChangedPreviewEventArgs: INoteVisibilityChangedPreviewEventArgs} + DEFINE_IID!(IID_INotesWindowManagerPreview, 3693789758, 18512, 20243, 156, 199, 255, 72, 126, 253, 252, 222); + RT_INTERFACE!{interface INotesWindowManagerPreview(INotesWindowManagerPreviewVtbl): IInspectable(IInspectableVtbl) [IID_INotesWindowManagerPreview] { + fn get_IsScreenLocked(&mut self, out: *mut bool) -> HRESULT, + fn ShowNote(&mut self, noteViewId: i32) -> HRESULT, + fn ShowNoteRelativeTo(&mut self, noteViewId: i32, anchorNoteViewId: i32) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn ShowNoteWithPlacement(&mut self, noteViewId: i32, data: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn HideNote(&mut self, noteViewId: i32) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetNotePlacement(&mut self, noteViewId: i32, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn TrySetNoteSize(&mut self, noteViewId: i32, size: ::rt::gen::windows::foundation::Size, out: *mut bool) -> HRESULT, + fn SetFocusToNextView(&mut self) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SetNotesThumbnailAsync(&mut self, thumbnail: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn add_SystemLockStateChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SystemLockStateChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_NotePlacementChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NotePlacementChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_NoteVisibilityChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NoteVisibilityChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT }} - impl IRadio { - #[inline] pub unsafe fn set_state_async(&mut self, value: RadioState) -> Result>> { + impl INotesWindowManagerPreview { + #[inline] pub unsafe fn get_is_screen_locked(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsScreenLocked)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn show_note(&mut self, noteViewId: i32) -> Result<()> { + let hr = ((*self.lpVtbl).ShowNote)(self, noteViewId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show_note_relative_to(&mut self, noteViewId: i32, anchorNoteViewId: i32) -> Result<()> { + let hr = ((*self.lpVtbl).ShowNoteRelativeTo)(self, noteViewId, anchorNoteViewId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn show_note_with_placement(&mut self, noteViewId: i32, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).ShowNoteWithPlacement)(self, noteViewId, data as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn hide_note(&mut self, noteViewId: i32) -> Result<()> { + let hr = ((*self.lpVtbl).HideNote)(self, noteViewId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_note_placement(&mut self, noteViewId: i32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SetStateAsync)(self, value, &mut out); + let hr = ((*self.lpVtbl).GetNotePlacement)(self, noteViewId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_state_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn try_set_note_size(&mut self, noteViewId: i32, size: ::rt::gen::windows::foundation::Size) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_StateChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).TrySetNoteSize)(self, noteViewId, size, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_state_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_StateChanged)(self, eventCookie); + #[inline] pub unsafe fn set_focus_to_next_view(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SetFocusToNextView)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_state(&mut self) -> Result { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_notes_thumbnail_async(&mut self, thumbnail: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetNotesThumbnailAsync)(self, thumbnail as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_system_lock_state_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_State)(self, &mut out); + let hr = ((*self.lpVtbl).add_SystemLockStateChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_name(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Name)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_system_lock_state_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SystemLockStateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_kind(&mut self) -> Result { + #[inline] pub unsafe fn add_note_placement_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + let hr = ((*self.lpVtbl).add_NotePlacementChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_note_placement_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NotePlacementChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_note_visibility_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NoteVisibilityChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn remove_note_visibility_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NoteVisibilityChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } } -} // Windows.Devices.Radios -pub mod sensors { // Windows.Devices.Sensors -use ::prelude::*; - RT_ENUM! { enum MagnetometerAccuracy: i32 { - Unknown (MagnetometerAccuracy_Unknown) = 0, Unreliable (MagnetometerAccuracy_Unreliable) = 1, Approximate (MagnetometerAccuracy_Approximate) = 2, High (MagnetometerAccuracy_High) = 3, - }} - RT_ENUM! { enum ActivityType: i32 { - Unknown (ActivityType_Unknown) = 0, Idle (ActivityType_Idle) = 1, Stationary (ActivityType_Stationary) = 2, Fidgeting (ActivityType_Fidgeting) = 3, Walking (ActivityType_Walking) = 4, Running (ActivityType_Running) = 5, InVehicle (ActivityType_InVehicle) = 6, Biking (ActivityType_Biking) = 7, + RT_CLASS!{class NotesWindowManagerPreview: INotesWindowManagerPreview} + RT_ACTIVATABLE!{INotesWindowManagerPreviewStatics [CLSID_NotesWindowManagerPreview]} + DEFINE_CLSID!(CLSID_NotesWindowManagerPreview = &[87,105,110,100,111,119,115,46,65,112,112,108,105,99,97,116,105,111,110,77,111,100,101,108,46,80,114,101,118,105,101,119,46,78,111,116,101,115,46,78,111,116,101,115,87,105,110,100,111,119,77,97,110,97,103,101,114,80,114,101,118,105,101,119,0]); + DEFINE_IID!(IID_INotesWindowManagerPreviewStatics, 1718144136, 2702, 16679, 163, 142, 153, 84, 69, 134, 138, 120); + RT_INTERFACE!{static interface INotesWindowManagerPreviewStatics(INotesWindowManagerPreviewStaticsVtbl): IInspectable(IInspectableVtbl) [IID_INotesWindowManagerPreviewStatics] { + fn GetForCurrentApp(&mut self, out: *mut *mut NotesWindowManagerPreview) -> HRESULT }} - RT_ENUM! { enum ActivitySensorReadingConfidence: i32 { - High (ActivitySensorReadingConfidence_High) = 0, Low (ActivitySensorReadingConfidence_Low) = 1, + impl INotesWindowManagerPreviewStatics { + #[inline] pub unsafe fn get_for_current_app(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentApp)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.ApplicationModel.Preview.Notes +} // Windows.ApplicationModel.Preview +} // Windows.ApplicationModel +#[cfg(feature="windows.data")] +pub mod data { // Windows.Data +pub mod html { // Windows.Data.Html +use ::prelude::*; + DEFINE_IID!(IID_IHtmlUtilities, 4273998557, 9113, 20396, 181, 167, 5, 233, 172, 215, 24, 29); + RT_INTERFACE!{static interface IHtmlUtilities(IHtmlUtilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IHtmlUtilities] { + fn ConvertToText(&mut self, html: HSTRING, out: *mut HSTRING) -> HRESULT }} - RT_ENUM! { enum SensorReadingType: i32 { - Absolute (SensorReadingType_Absolute) = 0, Relative (SensorReadingType_Relative) = 1, + impl IHtmlUtilities { + #[inline] pub unsafe fn convert_to_text(&mut self, html: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConvertToText)(self, html.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IHtmlUtilities [CLSID_HtmlUtilities]} + DEFINE_CLSID!(CLSID_HtmlUtilities = &[87,105,110,100,111,119,115,46,68,97,116,97,46,72,116,109,108,46,72,116,109,108,85,116,105,108,105,116,105,101,115,0]); +} // Windows.Data.Html +pub mod json { // Windows.Data.Json +use ::prelude::*; + RT_ENUM! { enum JsonValueType: i32 { + Null (JsonValueType_Null) = 0, Boolean (JsonValueType_Boolean) = 1, Number (JsonValueType_Number) = 2, String (JsonValueType_String) = 3, Array (JsonValueType_Array) = 4, Object (JsonValueType_Object) = 5, }} - RT_ENUM! { enum AccelerometerReadingType: i32 { - Standard (AccelerometerReadingType_Standard) = 0, Linear (AccelerometerReadingType_Linear) = 1, Gravity (AccelerometerReadingType_Gravity) = 2, + RT_ENUM! { enum JsonErrorStatus: i32 { + Unknown (JsonErrorStatus_Unknown) = 0, InvalidJsonString (JsonErrorStatus_InvalidJsonString) = 1, InvalidJsonNumber (JsonErrorStatus_InvalidJsonNumber) = 2, JsonValueNotFound (JsonErrorStatus_JsonValueNotFound) = 3, ImplementationLimit (JsonErrorStatus_ImplementationLimit) = 4, }} - RT_ENUM! { enum SensorOptimizationGoal: i32 { - Precision (SensorOptimizationGoal_Precision) = 0, PowerEfficiency (SensorOptimizationGoal_PowerEfficiency) = 1, + DEFINE_IID!(IID_IJsonValue, 2736889547, 61619, 19917, 190, 238, 25, 212, 140, 211, 237, 30); + RT_INTERFACE!{interface IJsonValue(IJsonValueVtbl): IInspectable(IInspectableVtbl) [IID_IJsonValue] { + fn get_ValueType(&mut self, out: *mut JsonValueType) -> HRESULT, + fn Stringify(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetString(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetNumber(&mut self, out: *mut f64) -> HRESULT, + fn GetBoolean(&mut self, out: *mut bool) -> HRESULT, + fn GetArray(&mut self, out: *mut *mut JsonArray) -> HRESULT, + fn GetObject(&mut self, out: *mut *mut JsonObject) -> HRESULT }} - RT_ENUM! { enum SensorType: i32 { - Accelerometer (SensorType_Accelerometer) = 0, ActivitySensor (SensorType_ActivitySensor) = 1, Barometer (SensorType_Barometer) = 2, Compass (SensorType_Compass) = 3, CustomSensor (SensorType_CustomSensor) = 4, Gyroscope (SensorType_Gyroscope) = 5, ProximitySensor (SensorType_ProximitySensor) = 6, Inclinometer (SensorType_Inclinometer) = 7, LightSensor (SensorType_LightSensor) = 8, OrientationSensor (SensorType_OrientationSensor) = 9, Pedometer (SensorType_Pedometer) = 10, RelativeInclinometer (SensorType_RelativeInclinometer) = 11, RelativeOrientationSensor (SensorType_RelativeOrientationSensor) = 12, SimpleOrientationSensor (SensorType_SimpleOrientationSensor) = 13, + impl IJsonValue { + #[inline] pub unsafe fn get_value_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ValueType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn stringify(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Stringify)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_boolean(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetBoolean)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_array(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetArray)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_object(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetObject)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class JsonArray: IJsonArray} + RT_ACTIVATABLE!{IJsonArrayStatics [CLSID_JsonArray]} + DEFINE_CLSID!(CLSID_JsonArray = &[87,105,110,100,111,119,115,46,68,97,116,97,46,74,115,111,110,46,74,115,111,110,65,114,114,97,121,0]); + RT_CLASS!{class JsonObject: IJsonObject} + RT_ACTIVATABLE!{IJsonObjectStatics [CLSID_JsonObject]} + DEFINE_CLSID!(CLSID_JsonObject = &[87,105,110,100,111,119,115,46,68,97,116,97,46,74,115,111,110,46,74,115,111,110,79,98,106,101,99,116,0]); + DEFINE_IID!(IID_IJsonValueStatics, 1600869450, 12115, 18657, 145, 163, 247, 139, 80, 166, 52, 92); + RT_INTERFACE!{static interface IJsonValueStatics(IJsonValueStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IJsonValueStatics] { + fn Parse(&mut self, input: HSTRING, out: *mut *mut JsonValue) -> HRESULT, + fn TryParse(&mut self, input: HSTRING, result: *mut *mut JsonValue, out: *mut bool) -> HRESULT, + fn CreateBooleanValue(&mut self, input: bool, out: *mut *mut JsonValue) -> HRESULT, + fn CreateNumberValue(&mut self, input: f64, out: *mut *mut JsonValue) -> HRESULT, + fn CreateStringValue(&mut self, input: HSTRING, out: *mut *mut JsonValue) -> HRESULT }} - DEFINE_IID!(IID_ISensorDataThreshold, 1423633505, 65099, 19975, 178, 96, 58, 76, 223, 190, 57, 110); - RT_INTERFACE!{interface ISensorDataThreshold(ISensorDataThresholdVtbl): IInspectable(IInspectableVtbl) [IID_ISensorDataThreshold] { - + impl IJsonValueStatics { + #[inline] pub unsafe fn parse(&mut self, input: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Parse)(self, input.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_parse(&mut self, input: &HStringArg) -> Result<(ComPtr, bool)> { + let mut result = null_mut(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryParse)(self, input.get(), &mut result, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(result), out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_boolean_value(&mut self, input: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBooleanValue)(self, input, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_number_value(&mut self, input: f64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateNumberValue)(self, input, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_string_value(&mut self, input: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStringValue)(self, input.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class JsonValue: IJsonValue} + RT_ACTIVATABLE!{IJsonValueStatics2 [CLSID_JsonValue]} + RT_ACTIVATABLE!{IJsonValueStatics [CLSID_JsonValue]} + DEFINE_CLSID!(CLSID_JsonValue = &[87,105,110,100,111,119,115,46,68,97,116,97,46,74,115,111,110,46,74,115,111,110,86,97,108,117,101,0]); + DEFINE_IID!(IID_IJsonValueStatics2, 496946148, 16360, 17205, 131, 146, 147, 216, 227, 104, 101, 240); + RT_INTERFACE!{static interface IJsonValueStatics2(IJsonValueStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IJsonValueStatics2] { + fn CreateNullValue(&mut self, out: *mut *mut JsonValue) -> HRESULT }} - DEFINE_IID!(IID_ISensorDataThresholdTriggerDetails, 2433151415, 59533, 18609, 188, 144, 97, 156, 123, 52, 147, 145); - RT_INTERFACE!{interface ISensorDataThresholdTriggerDetails(ISensorDataThresholdTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ISensorDataThresholdTriggerDetails] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_SensorType(&mut self, out: *mut SensorType) -> HRESULT + impl IJsonValueStatics2 { + #[inline] pub unsafe fn create_null_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateNullValue)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IJsonObject, 105784541, 10690, 20355, 154, 193, 158, 225, 21, 120, 190, 179); + RT_INTERFACE!{interface IJsonObject(IJsonObjectVtbl): IInspectable(IInspectableVtbl) [IID_IJsonObject] { + fn GetNamedValue(&mut self, name: HSTRING, out: *mut *mut JsonValue) -> HRESULT, + fn SetNamedValue(&mut self, name: HSTRING, value: *mut IJsonValue) -> HRESULT, + fn GetNamedObject(&mut self, name: HSTRING, out: *mut *mut JsonObject) -> HRESULT, + fn GetNamedArray(&mut self, name: HSTRING, out: *mut *mut JsonArray) -> HRESULT, + fn GetNamedString(&mut self, name: HSTRING, out: *mut HSTRING) -> HRESULT, + fn GetNamedNumber(&mut self, name: HSTRING, out: *mut f64) -> HRESULT, + fn GetNamedBoolean(&mut self, name: HSTRING, out: *mut bool) -> HRESULT }} - impl ISensorDataThresholdTriggerDetails { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl IJsonObject { + #[inline] pub unsafe fn get_named_value(&mut self, name: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).GetNamedValue)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_named_value(&mut self, name: &HStringArg, value: &IJsonValue) -> Result<()> { + let hr = ((*self.lpVtbl).SetNamedValue)(self, name.get(), value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_named_object(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNamedObject)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_named_array(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNamedArray)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_named_string(&mut self, name: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNamedString)(self, name.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_sensor_type(&mut self) -> Result { + #[inline] pub unsafe fn get_named_number(&mut self, name: &HStringArg) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SensorType)(self, &mut out); + let hr = ((*self.lpVtbl).GetNamedNumber)(self, name.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_named_boolean(&mut self, name: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetNamedBoolean)(self, name.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class SensorDataThresholdTriggerDetails: ISensorDataThresholdTriggerDetails} - DEFINE_IID!(IID_IAccelerometerDeviceId, 2125227177, 38869, 17517, 171, 90, 145, 125, 249, 185, 106, 44); - RT_INTERFACE!{interface IAccelerometerDeviceId(IAccelerometerDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerDeviceId] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IJsonObjectWithDefaultValues, 3647001250, 47088, 20224, 142, 68, 216, 44, 244, 21, 234, 19); + RT_INTERFACE!{interface IJsonObjectWithDefaultValues(IJsonObjectWithDefaultValuesVtbl): IInspectable(IInspectableVtbl) [IID_IJsonObjectWithDefaultValues] { + fn GetNamedValueOrDefault(&mut self, name: HSTRING, defaultValue: *mut JsonValue, out: *mut *mut JsonValue) -> HRESULT, + fn GetNamedObjectOrDefault(&mut self, name: HSTRING, defaultValue: *mut JsonObject, out: *mut *mut JsonObject) -> HRESULT, + fn GetNamedStringOrDefault(&mut self, name: HSTRING, defaultValue: HSTRING, out: *mut HSTRING) -> HRESULT, + fn GetNamedArrayOrDefault(&mut self, name: HSTRING, defaultValue: *mut JsonArray, out: *mut *mut JsonArray) -> HRESULT, + fn GetNamedNumberOrDefault(&mut self, name: HSTRING, defaultValue: f64, out: *mut f64) -> HRESULT, + fn GetNamedBooleanOrDefault(&mut self, name: HSTRING, defaultValue: bool, out: *mut bool) -> HRESULT }} - impl IAccelerometerDeviceId { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl IJsonObjectWithDefaultValues { + #[inline] pub unsafe fn get_named_value_or_default(&mut self, name: &HStringArg, defaultValue: &JsonValue) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).GetNamedValueOrDefault)(self, name.get(), defaultValue as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_named_object_or_default(&mut self, name: &HStringArg, defaultValue: &JsonObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNamedObjectOrDefault)(self, name.get(), defaultValue as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_named_string_or_default(&mut self, name: &HStringArg, defaultValue: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNamedStringOrDefault)(self, name.get(), defaultValue.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn get_named_array_or_default(&mut self, name: &HStringArg, defaultValue: &JsonArray) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNamedArrayOrDefault)(self, name.get(), defaultValue as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_named_number_or_default(&mut self, name: &HStringArg, defaultValue: f64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetNamedNumberOrDefault)(self, name.get(), defaultValue, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_named_boolean_or_default(&mut self, name: &HStringArg, defaultValue: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetNamedBooleanOrDefault)(self, name.get(), defaultValue, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } } - DEFINE_IID!(IID_IAccelerometerStatics, 2783087476, 23175, 18989, 190, 204, 15, 144, 110, 160, 97, 221); - RT_INTERFACE!{static interface IAccelerometerStatics(IAccelerometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerStatics] { - fn GetDefault(&mut self, out: *mut *mut Accelerometer) -> HRESULT + DEFINE_IID!(IID_IJsonObjectStatics, 579465561, 21726, 17880, 171, 204, 34, 96, 63, 160, 102, 160); + RT_INTERFACE!{static interface IJsonObjectStatics(IJsonObjectStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IJsonObjectStatics] { + fn Parse(&mut self, input: HSTRING, out: *mut *mut JsonObject) -> HRESULT, + fn TryParse(&mut self, input: HSTRING, result: *mut *mut JsonObject, out: *mut bool) -> HRESULT }} - impl IAccelerometerStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + impl IJsonObjectStatics { + #[inline] pub unsafe fn parse(&mut self, input: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).Parse)(self, input.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn try_parse(&mut self, input: &HStringArg) -> Result<(ComPtr, bool)> { + let mut result = null_mut(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryParse)(self, input.get(), &mut result, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(result), out)) } else { err(hr) } + } } - RT_CLASS!{class Accelerometer: IAccelerometer} - RT_ACTIVATABLE!{IAccelerometerStatics [CLSID_Accelerometer]} - RT_ACTIVATABLE!{IAccelerometerStatics2 [CLSID_Accelerometer]} - DEFINE_CLSID!(CLSID_Accelerometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,65,99,99,101,108,101,114,111,109,101,116,101,114,0]); - DEFINE_IID!(IID_IAccelerometerStatics2, 3301213231, 55403, 18053, 178, 215, 51, 150, 247, 152, 213, 123); - RT_INTERFACE!{static interface IAccelerometerStatics2(IAccelerometerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerStatics2] { - fn GetDefaultWithAccelerometerReadingType(&mut self, readingType: AccelerometerReadingType, out: *mut *mut Accelerometer) -> HRESULT + DEFINE_IID!(IID_IJsonArray, 146922934, 3261, 19098, 181, 211, 47, 133, 45, 195, 126, 129); + RT_INTERFACE!{interface IJsonArray(IJsonArrayVtbl): IInspectable(IInspectableVtbl) [IID_IJsonArray] { + fn GetObjectAt(&mut self, index: u32, out: *mut *mut JsonObject) -> HRESULT, + fn GetArrayAt(&mut self, index: u32, out: *mut *mut JsonArray) -> HRESULT, + fn GetStringAt(&mut self, index: u32, out: *mut HSTRING) -> HRESULT, + fn GetNumberAt(&mut self, index: u32, out: *mut f64) -> HRESULT, + fn GetBooleanAt(&mut self, index: u32, out: *mut bool) -> HRESULT }} - impl IAccelerometerStatics2 { - #[inline] pub unsafe fn get_default_with_accelerometer_reading_type(&mut self, readingType: AccelerometerReadingType) -> Result> { + impl IJsonArray { + #[inline] pub unsafe fn get_object_at(&mut self, index: u32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultWithAccelerometerReadingType)(self, readingType, &mut out); + let hr = ((*self.lpVtbl).GetObjectAt)(self, index, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_array_at(&mut self, index: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetArrayAt)(self, index, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn get_string_at(&mut self, index: u32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStringAt)(self, index, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_at(&mut self, index: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetNumberAt)(self, index, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_boolean_at(&mut self, index: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetBooleanAt)(self, index, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } } - DEFINE_IID!(IID_IAccelerometer, 3742909768, 10001, 19879, 128, 152, 75, 130, 32, 93, 60, 125); - RT_INTERFACE!{interface IAccelerometer(IAccelerometerVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometer] { - fn GetCurrentReading(&mut self, out: *mut *mut AccelerometerReading) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Shaken(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Shaken(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_IJsonArrayStatics, 3675534505, 57700, 18847, 147, 226, 138, 143, 73, 187, 144, 186); + RT_INTERFACE!{static interface IJsonArrayStatics(IJsonArrayStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IJsonArrayStatics] { + fn Parse(&mut self, input: HSTRING, out: *mut *mut JsonArray) -> HRESULT, + fn TryParse(&mut self, input: HSTRING, result: *mut *mut JsonArray, out: *mut bool) -> HRESULT }} - impl IAccelerometer { - #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + impl IJsonArrayStatics { + #[inline] pub unsafe fn parse(&mut self, input: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + let hr = ((*self.lpVtbl).Parse)(self, input.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + #[inline] pub unsafe fn try_parse(&mut self, input: &HStringArg) -> Result<(ComPtr, bool)> { + let mut result = null_mut(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryParse)(self, input.get(), &mut result, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(result), out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IJsonErrorStatics2, 1077948634, 34768, 17260, 131, 171, 252, 123, 18, 192, 204, 38); + RT_INTERFACE!{static interface IJsonErrorStatics2(IJsonErrorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IJsonErrorStatics2] { + fn GetJsonStatus(&mut self, hresult: i32, out: *mut JsonErrorStatus) -> HRESULT + }} + impl IJsonErrorStatics2 { + #[inline] pub unsafe fn get_json_status(&mut self, hresult: i32) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).GetJsonStatus)(self, hresult, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + } + RT_ACTIVATABLE!{IJsonErrorStatics2 [CLSID_JsonError]} + DEFINE_CLSID!(CLSID_JsonError = &[87,105,110,100,111,119,115,46,68,97,116,97,46,74,115,111,110,46,74,115,111,110,69,114,114,111,114,0]); +} // Windows.Data.Json +pub mod pdf { // Windows.Data.Pdf +use ::prelude::*; + DEFINE_IID!(IID_IPdfPageDimensions, 571933809, 12606, 17640, 131, 93, 99, 163, 231, 98, 74, 16); + RT_INTERFACE!{interface IPdfPageDimensions(IPdfPageDimensionsVtbl): IInspectable(IInspectableVtbl) [IID_IPdfPageDimensions] { + fn get_MediaBox(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_CropBox(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_BleedBox(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_TrimBox(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_ArtBox(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT + }} + impl IPdfPageDimensions { + #[inline] pub unsafe fn get_media_box(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).get_MediaBox)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_crop_box(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CropBox)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_bleed_box(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BleedBox)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn add_shaken(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_trim_box(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Shaken)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_TrimBox)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_shaken(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Shaken)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_art_box(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ArtBox)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class AccelerometerReading: IAccelerometerReading} - RT_CLASS!{class AccelerometerReadingChangedEventArgs: IAccelerometerReadingChangedEventArgs} - RT_CLASS!{class AccelerometerShakenEventArgs: IAccelerometerShakenEventArgs} - DEFINE_IID!(IID_IAccelerometer2, 3908080366, 18788, 16410, 182, 2, 34, 13, 113, 83, 198, 10); - RT_INTERFACE!{interface IAccelerometer2(IAccelerometer2Vtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometer2] { - #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, - #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT + RT_ENUM! { enum PdfPageRotation: i32 { + Normal (PdfPageRotation_Normal) = 0, Rotate90 (PdfPageRotation_Rotate90) = 1, Rotate180 (PdfPageRotation_Rotate180) = 2, Rotate270 (PdfPageRotation_Rotate270) = 3, }} - impl IAccelerometer2 { - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); + DEFINE_IID!(IID_IPdfPageRenderOptions, 1016595823, 47055, 19497, 154, 4, 82, 217, 2, 103, 244, 37); + RT_INTERFACE!{interface IPdfPageRenderOptions(IPdfPageRenderOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IPdfPageRenderOptions] { + fn get_SourceRect(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn put_SourceRect(&mut self, value: super::super::foundation::Rect) -> HRESULT, + fn get_DestinationWidth(&mut self, out: *mut u32) -> HRESULT, + fn put_DestinationWidth(&mut self, value: u32) -> HRESULT, + fn get_DestinationHeight(&mut self, out: *mut u32) -> HRESULT, + fn put_DestinationHeight(&mut self, value: u32) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_BackgroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_BackgroundColor(&mut self, value: super::super::ui::Color) -> HRESULT, + fn get_IsIgnoringHighContrast(&mut self, out: *mut bool) -> HRESULT, + fn put_IsIgnoringHighContrast(&mut self, value: bool) -> HRESULT, + fn get_BitmapEncoderId(&mut self, out: *mut Guid) -> HRESULT, + fn put_BitmapEncoderId(&mut self, value: Guid) -> HRESULT + }} + impl IPdfPageRenderOptions { + #[inline] pub unsafe fn get_source_rect(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SourceRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_source_rect(&mut self, value: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).put_SourceRect)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { + #[inline] pub unsafe fn get_destination_width(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); + let hr = ((*self.lpVtbl).get_DestinationWidth)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IAccelerometer3, 2279604778, 60800, 18923, 191, 138, 164, 234, 49, 229, 205, 132); - RT_INTERFACE!{interface IAccelerometer3(IAccelerometer3Vtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometer3] { - fn put_ReportLatency(&mut self, value: u32) -> HRESULT, - fn get_ReportLatency(&mut self, out: *mut u32) -> HRESULT, - fn get_MaxBatchSize(&mut self, out: *mut u32) -> HRESULT - }} - impl IAccelerometer3 { - #[inline] pub unsafe fn set_report_latency(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportLatency)(self, value); + #[inline] pub unsafe fn set_destination_width(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DestinationWidth)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_report_latency(&mut self) -> Result { + #[inline] pub unsafe fn get_destination_height(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportLatency)(self, &mut out); + let hr = ((*self.lpVtbl).get_DestinationHeight)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_batch_size(&mut self) -> Result { + #[inline] pub unsafe fn set_destination_height(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DestinationHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_background_color(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxBatchSize)(self, &mut out); + let hr = ((*self.lpVtbl).get_BackgroundColor)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IAccelerometer4, 490159183, 17107, 17842, 129, 68, 171, 127, 182, 101, 235, 89); - RT_INTERFACE!{interface IAccelerometer4(IAccelerometer4Vtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometer4] { - fn get_ReadingType(&mut self, out: *mut AccelerometerReadingType) -> HRESULT - }} - impl IAccelerometer4 { - #[inline] pub unsafe fn get_reading_type(&mut self) -> Result { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_background_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_BackgroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_ignoring_high_contrast(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadingType)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsIgnoringHighContrast)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_ignoring_high_contrast(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsIgnoringHighContrast)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitmap_encoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BitmapEncoderId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn set_bitmap_encoder_id(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).put_BitmapEncoderId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - DEFINE_IID!(IID_IAccelerometerReading, 3120462539, 54097, 16559, 139, 182, 122, 169, 174, 100, 31, 183); - RT_INTERFACE!{interface IAccelerometerReading(IAccelerometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerReading] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_AccelerationX(&mut self, out: *mut f64) -> HRESULT, - fn get_AccelerationY(&mut self, out: *mut f64) -> HRESULT, - fn get_AccelerationZ(&mut self, out: *mut f64) -> HRESULT + DEFINE_IID!(IID_IPdfPage, 2645864648, 21280, 19708, 173, 118, 73, 63, 218, 208, 229, 148); + RT_INTERFACE!{interface IPdfPage(IPdfPageVtbl): IInspectable(IInspectableVtbl) [IID_IPdfPage] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RenderToStreamAsync(&mut self, outputStream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RenderWithOptionsToStreamAsync(&mut self, outputStream: *mut super::super::storage::streams::IRandomAccessStream, options: *mut PdfPageRenderOptions, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn PreparePageAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_Index(&mut self, out: *mut u32) -> HRESULT, + fn get_Size(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_Dimensions(&mut self, out: *mut *mut PdfPageDimensions) -> HRESULT, + fn get_Rotation(&mut self, out: *mut PdfPageRotation) -> HRESULT, + fn get_PreferredZoom(&mut self, out: *mut f32) -> HRESULT }} - impl IAccelerometerReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + impl IPdfPage { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn render_to_stream_async(&mut self, outputStream: &super::super::storage::streams::IRandomAccessStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RenderToStreamAsync)(self, outputStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn render_with_options_to_stream_async(&mut self, outputStream: &super::super::storage::streams::IRandomAccessStream, options: &PdfPageRenderOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RenderWithOptionsToStreamAsync)(self, outputStream as *const _ as *mut _, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn prepare_page_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PreparePageAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_index(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_Index)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_acceleration_x(&mut self) -> Result { + #[inline] pub unsafe fn get_size(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AccelerationX)(self, &mut out); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_acceleration_y(&mut self) -> Result { + #[inline] pub unsafe fn get_dimensions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Dimensions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AccelerationY)(self, &mut out); + let hr = ((*self.lpVtbl).get_Rotation)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_acceleration_z(&mut self) -> Result { + #[inline] pub unsafe fn get_preferred_zoom(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AccelerationZ)(self, &mut out); + let hr = ((*self.lpVtbl).get_PreferredZoom)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IAccelerometerReadingChangedEventArgs, 9815643, 46764, 18266, 159, 68, 139, 50, 211, 90, 63, 37); - RT_INTERFACE!{interface IAccelerometerReadingChangedEventArgs(IAccelerometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut AccelerometerReading) -> HRESULT + RT_CLASS!{class PdfPageRenderOptions: IPdfPageRenderOptions} + RT_CLASS!{class PdfPageDimensions: IPdfPageDimensions} + DEFINE_IID!(IID_IPdfDocument, 2893987549, 33018, 16521, 132, 110, 129, 183, 127, 245, 168, 108); + RT_INTERFACE!{interface IPdfDocument(IPdfDocumentVtbl): IInspectable(IInspectableVtbl) [IID_IPdfDocument] { + fn GetPage(&mut self, pageIndex: u32, out: *mut *mut PdfPage) -> HRESULT, + fn get_PageCount(&mut self, out: *mut u32) -> HRESULT, + fn get_IsPasswordProtected(&mut self, out: *mut bool) -> HRESULT }} - impl IAccelerometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + impl IPdfDocument { + #[inline] pub unsafe fn get_page(&mut self, pageIndex: u32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + let hr = ((*self.lpVtbl).GetPage)(self, pageIndex, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IAccelerometerShakenEventArgs, 2516517329, 18984, 20277, 152, 232, 129, 120, 170, 228, 8, 74); - RT_INTERFACE!{interface IAccelerometerShakenEventArgs(IAccelerometerShakenEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerShakenEventArgs] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT - }} - impl IAccelerometerShakenEventArgs { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + #[inline] pub unsafe fn get_page_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_PageCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_password_protected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPasswordProtected)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IInclinometerDeviceId, 32053634, 16895, 17414, 174, 131, 98, 33, 15, 241, 111, 227); - RT_INTERFACE!{interface IInclinometerDeviceId(IInclinometerDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerDeviceId] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class PdfPage: IPdfPage} + DEFINE_IID!(IID_IPdfDocumentStatics, 1127877471, 49159, 18312, 144, 242, 8, 20, 61, 146, 37, 153); + RT_INTERFACE!{static interface IPdfDocumentStatics(IPdfDocumentStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPdfDocumentStatics] { + #[cfg(feature="windows.storage")] fn LoadFromFileAsync(&mut self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn LoadFromFileWithPasswordAsync(&mut self, file: *mut super::super::storage::IStorageFile, password: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn LoadFromStreamAsync(&mut self, inputStream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn LoadFromStreamWithPasswordAsync(&mut self, inputStream: *mut super::super::storage::streams::IRandomAccessStream, password: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IInclinometerDeviceId { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl IPdfDocumentStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_from_file_async(&mut self, file: &super::super::storage::IStorageFile) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).LoadFromFileAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IInclinometerStatics, 4063151441, 39984, 17722, 139, 73, 60, 62, 235, 51, 203, 97); - RT_INTERFACE!{static interface IInclinometerStatics(IInclinometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerStatics] { - fn GetDefault(&mut self, out: *mut *mut Inclinometer) -> HRESULT - }} - impl IInclinometerStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_from_file_with_password_async(&mut self, file: &super::super::storage::IStorageFile, password: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).LoadFromFileWithPasswordAsync)(self, file as *const _ as *mut _, password.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class Inclinometer: IInclinometer} - RT_ACTIVATABLE!{IInclinometerStatics2 [CLSID_Inclinometer]} - RT_ACTIVATABLE!{IInclinometerStatics [CLSID_Inclinometer]} - RT_ACTIVATABLE!{IInclinometerStatics3 [CLSID_Inclinometer]} - DEFINE_CLSID!(CLSID_Inclinometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,73,110,99,108,105,110,111,109,101,116,101,114,0]); - DEFINE_IID!(IID_IInclinometerStatics2, 71276405, 27166, 18844, 134, 224, 99, 140, 26, 134, 75, 0); - RT_INTERFACE!{static interface IInclinometerStatics2(IInclinometerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerStatics2] { - fn GetDefaultForRelativeReadings(&mut self, out: *mut *mut Inclinometer) -> HRESULT - }} - impl IInclinometerStatics2 { - #[inline] pub unsafe fn get_default_for_relative_readings(&mut self) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_from_stream_async(&mut self, inputStream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultForRelativeReadings)(self, &mut out); + let hr = ((*self.lpVtbl).LoadFromStreamAsync)(self, inputStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_from_stream_with_password_async(&mut self, inputStream: &super::super::storage::streams::IRandomAccessStream, password: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadFromStreamWithPasswordAsync)(self, inputStream as *const _ as *mut _, password.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IInclinometerStatics3, 3181003392, 47386, 18473, 147, 146, 171, 192, 182, 189, 242, 180); - RT_INTERFACE!{static interface IInclinometerStatics3(IInclinometerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerStatics3] { - fn GetDefaultWithSensorReadingType(&mut self, sensorReadingtype: SensorReadingType, out: *mut *mut Inclinometer) -> HRESULT + RT_CLASS!{class PdfDocument: IPdfDocument} + RT_ACTIVATABLE!{IPdfDocumentStatics [CLSID_PdfDocument]} + DEFINE_CLSID!(CLSID_PdfDocument = &[87,105,110,100,111,119,115,46,68,97,116,97,46,80,100,102,46,80,100,102,68,111,99,117,109,101,110,116,0]); +} // Windows.Data.Pdf +pub mod text { // Windows.Data.Text +use ::prelude::*; + RT_STRUCT! { struct TextSegment { + StartPosition: u32, Length: u32, }} - impl IInclinometerStatics3 { - #[inline] pub unsafe fn get_default_with_sensor_reading_type(&mut self, sensorReadingtype: SensorReadingType) -> Result> { + DEFINE_IID!(IID_ISemanticTextQueryFactory, 596378883, 63893, 17799, 135, 119, 162, 183, 216, 10, 207, 239); + RT_INTERFACE!{static interface ISemanticTextQueryFactory(ISemanticTextQueryFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISemanticTextQueryFactory] { + fn Create(&mut self, aqsFilter: HSTRING, out: *mut *mut SemanticTextQuery) -> HRESULT, + fn CreateWithLanguage(&mut self, aqsFilter: HSTRING, filterLanguage: HSTRING, out: *mut *mut SemanticTextQuery) -> HRESULT + }} + impl ISemanticTextQueryFactory { + #[inline] pub unsafe fn create(&mut self, aqsFilter: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultWithSensorReadingType)(self, sensorReadingtype, &mut out); + let hr = ((*self.lpVtbl).Create)(self, aqsFilter.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_language(&mut self, aqsFilter: &HStringArg, filterLanguage: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithLanguage)(self, aqsFilter.get(), filterLanguage.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IInclinometer, 642304623, 8838, 16495, 145, 97, 240, 196, 189, 128, 110, 191); - RT_INTERFACE!{interface IInclinometer(IInclinometerVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometer] { - fn GetCurrentReading(&mut self, out: *mut *mut InclinometerReading) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class SemanticTextQuery: ISemanticTextQuery [ISemanticTextQueryFactory] [CLSID_SemanticTextQuery]} + DEFINE_CLSID!(CLSID_SemanticTextQuery = &[87,105,110,100,111,119,115,46,68,97,116,97,46,84,101,120,116,46,83,101,109,97,110,116,105,99,84,101,120,116,81,117,101,114,121,0]); + DEFINE_IID!(IID_ISemanticTextQuery, 1780263761, 8114, 18697, 128, 184, 53, 115, 26, 43, 62, 127); + RT_INTERFACE!{interface ISemanticTextQuery(ISemanticTextQueryVtbl): IInspectable(IInspectableVtbl) [IID_ISemanticTextQuery] { + fn Find(&mut self, content: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn FindInProperty(&mut self, propertyContent: HSTRING, propertyName: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT }} - impl IInclinometer { - #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + impl ISemanticTextQuery { + #[inline] pub unsafe fn find(&mut self, content: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + let hr = ((*self.lpVtbl).Find)(self, content.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + #[inline] pub unsafe fn find_in_property(&mut self, propertyContent: &HStringArg, propertyName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindInProperty)(self, propertyContent.get(), propertyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum UnicodeGeneralCategory: i32 { + UppercaseLetter (UnicodeGeneralCategory_UppercaseLetter) = 0, LowercaseLetter (UnicodeGeneralCategory_LowercaseLetter) = 1, TitlecaseLetter (UnicodeGeneralCategory_TitlecaseLetter) = 2, ModifierLetter (UnicodeGeneralCategory_ModifierLetter) = 3, OtherLetter (UnicodeGeneralCategory_OtherLetter) = 4, NonspacingMark (UnicodeGeneralCategory_NonspacingMark) = 5, SpacingCombiningMark (UnicodeGeneralCategory_SpacingCombiningMark) = 6, EnclosingMark (UnicodeGeneralCategory_EnclosingMark) = 7, DecimalDigitNumber (UnicodeGeneralCategory_DecimalDigitNumber) = 8, LetterNumber (UnicodeGeneralCategory_LetterNumber) = 9, OtherNumber (UnicodeGeneralCategory_OtherNumber) = 10, SpaceSeparator (UnicodeGeneralCategory_SpaceSeparator) = 11, LineSeparator (UnicodeGeneralCategory_LineSeparator) = 12, ParagraphSeparator (UnicodeGeneralCategory_ParagraphSeparator) = 13, Control (UnicodeGeneralCategory_Control) = 14, Format (UnicodeGeneralCategory_Format) = 15, Surrogate (UnicodeGeneralCategory_Surrogate) = 16, PrivateUse (UnicodeGeneralCategory_PrivateUse) = 17, ConnectorPunctuation (UnicodeGeneralCategory_ConnectorPunctuation) = 18, DashPunctuation (UnicodeGeneralCategory_DashPunctuation) = 19, OpenPunctuation (UnicodeGeneralCategory_OpenPunctuation) = 20, ClosePunctuation (UnicodeGeneralCategory_ClosePunctuation) = 21, InitialQuotePunctuation (UnicodeGeneralCategory_InitialQuotePunctuation) = 22, FinalQuotePunctuation (UnicodeGeneralCategory_FinalQuotePunctuation) = 23, OtherPunctuation (UnicodeGeneralCategory_OtherPunctuation) = 24, MathSymbol (UnicodeGeneralCategory_MathSymbol) = 25, CurrencySymbol (UnicodeGeneralCategory_CurrencySymbol) = 26, ModifierSymbol (UnicodeGeneralCategory_ModifierSymbol) = 27, OtherSymbol (UnicodeGeneralCategory_OtherSymbol) = 28, NotAssigned (UnicodeGeneralCategory_NotAssigned) = 29, + }} + RT_ENUM! { enum UnicodeNumericType: i32 { + None (UnicodeNumericType_None) = 0, Decimal (UnicodeNumericType_Decimal) = 1, Digit (UnicodeNumericType_Digit) = 2, Numeric (UnicodeNumericType_Numeric) = 3, + }} + DEFINE_IID!(IID_IUnicodeCharactersStatics, 2542837383, 37521, 20369, 182, 200, 182, 227, 89, 215, 167, 251); + RT_INTERFACE!{static interface IUnicodeCharactersStatics(IUnicodeCharactersStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUnicodeCharactersStatics] { + fn GetCodepointFromSurrogatePair(&mut self, highSurrogate: u32, lowSurrogate: u32, out: *mut u32) -> HRESULT, + fn GetSurrogatePairFromCodepoint(&mut self, codepoint: u32, highSurrogate: *mut Char, lowSurrogate: *mut Char) -> HRESULT, + fn IsHighSurrogate(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsLowSurrogate(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsSupplementary(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsNoncharacter(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsWhitespace(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsAlphabetic(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsCased(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsUppercase(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsLowercase(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsIdStart(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsIdContinue(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsGraphemeBase(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn IsGraphemeExtend(&mut self, codepoint: u32, out: *mut bool) -> HRESULT, + fn GetNumericType(&mut self, codepoint: u32, out: *mut UnicodeNumericType) -> HRESULT, + fn GetGeneralCategory(&mut self, codepoint: u32, out: *mut UnicodeGeneralCategory) -> HRESULT + }} + impl IUnicodeCharactersStatics { + #[inline] pub unsafe fn get_codepoint_from_surrogate_pair(&mut self, highSurrogate: u32, lowSurrogate: u32) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).GetCodepointFromSurrogatePair)(self, highSurrogate, lowSurrogate, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_surrogate_pair_from_codepoint(&mut self, codepoint: u32) -> Result<(Char, Char)> { + let mut highSurrogate = zeroed(); let mut lowSurrogate = zeroed(); + let hr = ((*self.lpVtbl).GetSurrogatePairFromCodepoint)(self, codepoint, &mut highSurrogate, &mut lowSurrogate); + if hr == S_OK { Ok((highSurrogate, lowSurrogate)) } else { err(hr) } } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + #[inline] pub unsafe fn is_high_surrogate(&mut self, codepoint: u32) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).IsHighSurrogate)(self, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn is_low_surrogate(&mut self, codepoint: u32) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).IsLowSurrogate)(self, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn is_supplementary(&mut self, codepoint: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsSupplementary)(self, codepoint, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class InclinometerReading: IInclinometerReading} - RT_CLASS!{class InclinometerReadingChangedEventArgs: IInclinometerReadingChangedEventArgs} - DEFINE_IID!(IID_IInclinometer2, 43987859, 10418, 17912, 187, 22, 97, 232, 106, 127, 174, 110); - RT_INTERFACE!{interface IInclinometer2(IInclinometer2Vtbl): IInspectable(IInspectableVtbl) [IID_IInclinometer2] { - #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, - #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT, - fn get_ReadingType(&mut self, out: *mut SensorReadingType) -> HRESULT - }} - impl IInclinometer2 { - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn is_noncharacter(&mut self, codepoint: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsNoncharacter)(self, codepoint, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { + #[inline] pub unsafe fn is_whitespace(&mut self, codepoint: u32) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); + let hr = ((*self.lpVtbl).IsWhitespace)(self, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_reading_type(&mut self) -> Result { + #[inline] pub unsafe fn is_alphabetic(&mut self, codepoint: u32) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadingType)(self, &mut out); + let hr = ((*self.lpVtbl).IsAlphabetic)(self, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IInclinometerReading, 2672095317, 46838, 18815, 177, 39, 26, 119, 94, 80, 20, 88); - RT_INTERFACE!{interface IInclinometerReading(IInclinometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerReading] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_PitchDegrees(&mut self, out: *mut f32) -> HRESULT, - fn get_RollDegrees(&mut self, out: *mut f32) -> HRESULT, - fn get_YawDegrees(&mut self, out: *mut f32) -> HRESULT - }} - impl IInclinometerReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + #[inline] pub unsafe fn is_cased(&mut self, codepoint: u32) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).IsCased)(self, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_pitch_degrees(&mut self) -> Result { + #[inline] pub unsafe fn is_uppercase(&mut self, codepoint: u32) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PitchDegrees)(self, &mut out); + let hr = ((*self.lpVtbl).IsUppercase)(self, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_roll_degrees(&mut self) -> Result { + #[inline] pub unsafe fn is_lowercase(&mut self, codepoint: u32) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RollDegrees)(self, &mut out); + let hr = ((*self.lpVtbl).IsLowercase)(self, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_yaw_degrees(&mut self) -> Result { + #[inline] pub unsafe fn is_id_start(&mut self, codepoint: u32) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_YawDegrees)(self, &mut out); + let hr = ((*self.lpVtbl).IsIdStart)(self, codepoint, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_id_continue(&mut self, codepoint: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsIdContinue)(self, codepoint, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_grapheme_base(&mut self, codepoint: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsGraphemeBase)(self, codepoint, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_grapheme_extend(&mut self, codepoint: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsGraphemeExtend)(self, codepoint, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeric_type(&mut self, codepoint: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetNumericType)(self, codepoint, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_general_category(&mut self, codepoint: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetGeneralCategory)(self, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IInclinometerReadingYawAccuracy, 3025397888, 8163, 18822, 162, 87, 230, 236, 226, 114, 57, 73); - RT_INTERFACE!{interface IInclinometerReadingYawAccuracy(IInclinometerReadingYawAccuracyVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerReadingYawAccuracy] { - fn get_YawAccuracy(&mut self, out: *mut MagnetometerAccuracy) -> HRESULT + RT_ACTIVATABLE!{IUnicodeCharactersStatics [CLSID_UnicodeCharacters]} + DEFINE_CLSID!(CLSID_UnicodeCharacters = &[87,105,110,100,111,119,115,46,68,97,116,97,46,84,101,120,116,46,85,110,105,99,111,100,101,67,104,97,114,97,99,116,101,114,115,0]); + RT_ENUM! { enum AlternateNormalizationFormat: i32 { + NotNormalized (AlternateNormalizationFormat_NotNormalized) = 0, Number (AlternateNormalizationFormat_Number) = 1, Currency (AlternateNormalizationFormat_Currency) = 3, Date (AlternateNormalizationFormat_Date) = 4, Time (AlternateNormalizationFormat_Time) = 5, }} - impl IInclinometerReadingYawAccuracy { - #[inline] pub unsafe fn get_yaw_accuracy(&mut self) -> Result { + DEFINE_IID!(IID_IAlternateWordForm, 1194945566, 20921, 16903, 145, 70, 36, 142, 99, 106, 29, 29); + RT_INTERFACE!{interface IAlternateWordForm(IAlternateWordFormVtbl): IInspectable(IInspectableVtbl) [IID_IAlternateWordForm] { + fn get_SourceTextSegment(&mut self, out: *mut TextSegment) -> HRESULT, + fn get_AlternateText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NormalizationFormat(&mut self, out: *mut AlternateNormalizationFormat) -> HRESULT + }} + impl IAlternateWordForm { + #[inline] pub unsafe fn get_source_text_segment(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_YawAccuracy)(self, &mut out); + let hr = ((*self.lpVtbl).get_SourceTextSegment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_alternate_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlternateText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_normalization_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NormalizationFormat)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IInclinometerReadingChangedEventArgs, 1256791489, 59371, 18744, 133, 17, 174, 13, 107, 68, 4, 56); - RT_INTERFACE!{interface IInclinometerReadingChangedEventArgs(IInclinometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut InclinometerReading) -> HRESULT + RT_CLASS!{class AlternateWordForm: IAlternateWordForm} + DEFINE_IID!(IID_ISelectableWordSegment, 2439662775, 35495, 19576, 179, 116, 93, 237, 183, 82, 230, 11); + RT_INTERFACE!{interface ISelectableWordSegment(ISelectableWordSegmentVtbl): IInspectable(IInspectableVtbl) [IID_ISelectableWordSegment] { + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SourceTextSegment(&mut self, out: *mut TextSegment) -> HRESULT }} - impl IInclinometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + impl ISelectableWordSegment { + #[inline] pub unsafe fn get_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_source_text_segment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SourceTextSegment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IGyrometerDeviceId, 518383992, 35234, 17013, 158, 149, 113, 38, 244, 112, 135, 96); - RT_INTERFACE!{interface IGyrometerDeviceId(IGyrometerDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_IGyrometerDeviceId] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IWordSegment, 3537156717, 39036, 19648, 182, 189, 212, 154, 17, 179, 143, 154); + RT_INTERFACE!{interface IWordSegment(IWordSegmentVtbl): IInspectable(IInspectableVtbl) [IID_IWordSegment] { + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SourceTextSegment(&mut self, out: *mut TextSegment) -> HRESULT, + fn get_AlternateForms(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT }} - impl IGyrometerDeviceId { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl IWordSegment { + #[inline] pub unsafe fn get_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IGyrometerStatics, 2209802185, 58525, 19257, 134, 230, 205, 85, 75, 228, 197, 193); - RT_INTERFACE!{static interface IGyrometerStatics(IGyrometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGyrometerStatics] { - fn GetDefault(&mut self, out: *mut *mut Gyrometer) -> HRESULT - }} - impl IGyrometerStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + #[inline] pub unsafe fn get_source_text_segment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SourceTextSegment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_alternate_forms(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).get_AlternateForms)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class Gyrometer: IGyrometer} - RT_ACTIVATABLE!{IGyrometerStatics [CLSID_Gyrometer]} - DEFINE_CLSID!(CLSID_Gyrometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,71,121,114,111,109,101,116,101,114,0]); - DEFINE_IID!(IID_IGyrometer, 4256803268, 33969, 19618, 151, 99, 155, 88, 149, 6, 199, 12); - RT_INTERFACE!{interface IGyrometer(IGyrometerVtbl): IInspectable(IInspectableVtbl) [IID_IGyrometer] { - fn GetCurrentReading(&mut self, out: *mut *mut GyrometerReading) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class WordSegment: IWordSegment} + DEFINE_IID!(IID_WordSegmentsTokenizingHandler, 2782749527, 48938, 19535, 163, 31, 41, 231, 28, 111, 139, 53); + RT_DELEGATE!{delegate WordSegmentsTokenizingHandler(WordSegmentsTokenizingHandlerVtbl, WordSegmentsTokenizingHandlerImpl) [IID_WordSegmentsTokenizingHandler] { + fn Invoke(&mut self, precedingWords: *mut super::super::foundation::collections::IIterable, words: *mut super::super::foundation::collections::IIterable) -> HRESULT }} - impl IGyrometer { - #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + impl WordSegmentsTokenizingHandler { + #[inline] pub unsafe fn invoke(&mut self, precedingWords: &super::super::foundation::collections::IIterable, words: &super::super::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, precedingWords as *const _ as *mut _, words as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWordsSegmenter, 2259997905, 45822, 20020, 168, 29, 102, 100, 3, 0, 69, 79); + RT_INTERFACE!{interface IWordsSegmenter(IWordsSegmenterVtbl): IInspectable(IInspectableVtbl) [IID_IWordsSegmenter] { + fn get_ResolvedLanguage(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetTokenAt(&mut self, text: HSTRING, startIndex: u32, out: *mut *mut WordSegment) -> HRESULT, + fn GetTokens(&mut self, text: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn Tokenize(&mut self, text: HSTRING, startIndex: u32, handler: *mut WordSegmentsTokenizingHandler) -> HRESULT + }} + impl IWordsSegmenter { + #[inline] pub unsafe fn get_resolved_language(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_token_at(&mut self, text: &HStringArg, startIndex: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTokenAt)(self, text.get(), startIndex, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_tokens(&mut self, text: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTokens)(self, text.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + #[inline] pub unsafe fn tokenize(&mut self, text: &HStringArg, startIndex: u32, handler: &WordSegmentsTokenizingHandler) -> Result<()> { + let hr = ((*self.lpVtbl).Tokenize)(self, text.get(), startIndex, handler as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IWordsSegmenterFactory, 3868684916, 64565, 17756, 139, 251, 109, 127, 70, 83, 202, 151); + RT_INTERFACE!{static interface IWordsSegmenterFactory(IWordsSegmenterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWordsSegmenterFactory] { + fn CreateWithLanguage(&mut self, language: HSTRING, out: *mut *mut WordsSegmenter) -> HRESULT + }} + impl IWordsSegmenterFactory { + #[inline] pub unsafe fn create_with_language(&mut self, language: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithLanguage)(self, language.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class GyrometerReading: IGyrometerReading} - RT_CLASS!{class GyrometerReadingChangedEventArgs: IGyrometerReadingChangedEventArgs} - DEFINE_IID!(IID_IGyrometer2, 1675568195, 36072, 16835, 172, 68, 134, 152, 129, 11, 85, 127); - RT_INTERFACE!{interface IGyrometer2(IGyrometer2Vtbl): IInspectable(IInspectableVtbl) [IID_IGyrometer2] { - #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, - #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT + RT_CLASS!{class WordsSegmenter: IWordsSegmenter [IWordsSegmenterFactory] [CLSID_WordsSegmenter]} + DEFINE_CLSID!(CLSID_WordsSegmenter = &[87,105,110,100,111,119,115,46,68,97,116,97,46,84,101,120,116,46,87,111,114,100,115,83,101,103,109,101,110,116,101,114,0]); + RT_CLASS!{class SelectableWordSegment: ISelectableWordSegment} + DEFINE_IID!(IID_SelectableWordSegmentsTokenizingHandler, 977140892, 44766, 19911, 158, 108, 65, 192, 68, 189, 53, 146); + RT_DELEGATE!{delegate SelectableWordSegmentsTokenizingHandler(SelectableWordSegmentsTokenizingHandlerVtbl, SelectableWordSegmentsTokenizingHandlerImpl) [IID_SelectableWordSegmentsTokenizingHandler] { + fn Invoke(&mut self, precedingWords: *mut super::super::foundation::collections::IIterable, words: *mut super::super::foundation::collections::IIterable) -> HRESULT }} - impl IGyrometer2 { - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); + impl SelectableWordSegmentsTokenizingHandler { + #[inline] pub unsafe fn invoke(&mut self, precedingWords: &super::super::foundation::collections::IIterable, words: &super::super::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, precedingWords as *const _ as *mut _, words as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } } - DEFINE_IID!(IID_IGyrometerReading, 3017203292, 7908, 17775, 157, 231, 226, 73, 59, 92, 142, 3); - RT_INTERFACE!{interface IGyrometerReading(IGyrometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IGyrometerReading] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_AngularVelocityX(&mut self, out: *mut f64) -> HRESULT, - fn get_AngularVelocityY(&mut self, out: *mut f64) -> HRESULT, - fn get_AngularVelocityZ(&mut self, out: *mut f64) -> HRESULT + DEFINE_IID!(IID_ISelectableWordsSegmenter, 4141625831, 19219, 17861, 136, 151, 125, 113, 38, 158, 8, 93); + RT_INTERFACE!{interface ISelectableWordsSegmenter(ISelectableWordsSegmenterVtbl): IInspectable(IInspectableVtbl) [IID_ISelectableWordsSegmenter] { + fn get_ResolvedLanguage(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetTokenAt(&mut self, text: HSTRING, startIndex: u32, out: *mut *mut SelectableWordSegment) -> HRESULT, + fn GetTokens(&mut self, text: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn Tokenize(&mut self, text: HSTRING, startIndex: u32, handler: *mut SelectableWordSegmentsTokenizingHandler) -> HRESULT }} - impl IGyrometerReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl ISelectableWordsSegmenter { + #[inline] pub unsafe fn get_resolved_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_angular_velocity_x(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AngularVelocityX)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_token_at(&mut self, text: &HStringArg, startIndex: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTokenAt)(self, text.get(), startIndex, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_angular_velocity_y(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AngularVelocityY)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_tokens(&mut self, text: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTokens)(self, text.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_angular_velocity_z(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AngularVelocityZ)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn tokenize(&mut self, text: &HStringArg, startIndex: u32, handler: &SelectableWordSegmentsTokenizingHandler) -> Result<()> { + let hr = ((*self.lpVtbl).Tokenize)(self, text.get(), startIndex, handler as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IGyrometerReadingChangedEventArgs, 266279061, 28574, 17102, 141, 88, 56, 140, 10, 184, 53, 109); - RT_INTERFACE!{interface IGyrometerReadingChangedEventArgs(IGyrometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGyrometerReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut GyrometerReading) -> HRESULT + DEFINE_IID!(IID_ISelectableWordsSegmenterFactory, 2356835912, 24663, 17209, 188, 112, 242, 16, 1, 10, 65, 80); + RT_INTERFACE!{static interface ISelectableWordsSegmenterFactory(ISelectableWordsSegmenterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISelectableWordsSegmenterFactory] { + fn CreateWithLanguage(&mut self, language: HSTRING, out: *mut *mut SelectableWordsSegmenter) -> HRESULT }} - impl IGyrometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + impl ISelectableWordsSegmenterFactory { + #[inline] pub unsafe fn create_with_language(&mut self, language: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + let hr = ((*self.lpVtbl).CreateWithLanguage)(self, language.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ICompassDeviceId, 3514944041, 45189, 19229, 135, 10, 79, 245, 123, 167, 79, 212); - RT_INTERFACE!{interface ICompassDeviceId(ICompassDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_ICompassDeviceId] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class SelectableWordsSegmenter: ISelectableWordsSegmenter [ISelectableWordsSegmenterFactory] [CLSID_SelectableWordsSegmenter]} + DEFINE_CLSID!(CLSID_SelectableWordsSegmenter = &[87,105,110,100,111,119,115,46,68,97,116,97,46,84,101,120,116,46,83,101,108,101,99,116,97,98,108,101,87,111,114,100,115,83,101,103,109,101,110,116,101,114,0]); + DEFINE_IID!(IID_ITextPredictionGenerator, 1588374279, 44017, 19638, 157, 158, 50, 111, 43, 70, 135, 86); + RT_INTERFACE!{interface ITextPredictionGenerator(ITextPredictionGeneratorVtbl): IInspectable(IInspectableVtbl) [IID_ITextPredictionGenerator] { + fn get_ResolvedLanguage(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LanguageAvailableButNotInstalled(&mut self, out: *mut bool) -> HRESULT, + fn GetCandidatesAsync(&mut self, input: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetCandidatesWithMaxCountAsync(&mut self, input: HSTRING, maxCandidates: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT }} - impl ICompassDeviceId { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl ITextPredictionGenerator { + #[inline] pub unsafe fn get_resolved_language(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_ICompassStatics, 2596050911, 22252, 19493, 181, 77, 64, 166, 139, 181, 178, 105); - RT_INTERFACE!{static interface ICompassStatics(ICompassStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICompassStatics] { - fn GetDefault(&mut self, out: *mut *mut Compass) -> HRESULT - }} - impl ICompassStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + #[inline] pub unsafe fn get_language_available_but_not_installed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LanguageAvailableButNotInstalled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_candidates_async(&mut self, input: &HStringArg) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).GetCandidatesAsync)(self, input.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_candidates_with_max_count_async(&mut self, input: &HStringArg, maxCandidates: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCandidatesWithMaxCountAsync)(self, input.get(), maxCandidates, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class Compass: ICompass} - RT_ACTIVATABLE!{ICompassStatics [CLSID_Compass]} - DEFINE_CLSID!(CLSID_Compass = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,67,111,109,112,97,115,115,0]); - DEFINE_IID!(IID_ICompass, 691010196, 6981, 16444, 186, 6, 177, 6, 219, 166, 154, 100); - RT_INTERFACE!{interface ICompass(ICompassVtbl): IInspectable(IInspectableVtbl) [IID_ICompass] { - fn GetCurrentReading(&mut self, out: *mut *mut CompassReading) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_ITextPredictionGeneratorFactory, 1918350358, 35746, 18257, 157, 48, 157, 133, 67, 86, 83, 162); + RT_INTERFACE!{static interface ITextPredictionGeneratorFactory(ITextPredictionGeneratorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITextPredictionGeneratorFactory] { + fn Create(&mut self, languageTag: HSTRING, out: *mut *mut TextPredictionGenerator) -> HRESULT }} - impl ICompass { - #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + impl ITextPredictionGeneratorFactory { + #[inline] pub unsafe fn create(&mut self, languageTag: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, languageTag.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + } + RT_CLASS!{class TextPredictionGenerator: ITextPredictionGenerator [ITextPredictionGeneratorFactory] [CLSID_TextPredictionGenerator]} + DEFINE_CLSID!(CLSID_TextPredictionGenerator = &[87,105,110,100,111,119,115,46,68,97,116,97,46,84,101,120,116,46,84,101,120,116,80,114,101,100,105,99,116,105,111,110,71,101,110,101,114,97,116,111,114,0]); + DEFINE_IID!(IID_ITextConversionGenerator, 56650334, 10921, 19126, 175, 139, 165, 98, 182, 58, 137, 146); + RT_INTERFACE!{interface ITextConversionGenerator(ITextConversionGeneratorVtbl): IInspectable(IInspectableVtbl) [IID_ITextConversionGenerator] { + fn get_ResolvedLanguage(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LanguageAvailableButNotInstalled(&mut self, out: *mut bool) -> HRESULT, + fn GetCandidatesAsync(&mut self, input: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetCandidatesWithMaxCountAsync(&mut self, input: HSTRING, maxCandidates: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl ITextConversionGenerator { + #[inline] pub unsafe fn get_resolved_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + #[inline] pub unsafe fn get_language_available_but_not_installed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).get_LanguageAvailableButNotInstalled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_candidates_async(&mut self, input: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCandidatesAsync)(self, input.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_candidates_with_max_count_async(&mut self, input: &HStringArg, maxCandidates: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCandidatesWithMaxCountAsync)(self, input.get(), maxCandidates, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class CompassReading: ICompassReading} - RT_CLASS!{class CompassReadingChangedEventArgs: ICompassReadingChangedEventArgs} - DEFINE_IID!(IID_ICompass2, 921857289, 51159, 17231, 180, 97, 151, 157, 223, 194, 50, 47); - RT_INTERFACE!{interface ICompass2(ICompass2Vtbl): IInspectable(IInspectableVtbl) [IID_ICompass2] { - #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, - #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT + DEFINE_IID!(IID_ITextConversionGeneratorFactory, 4239013761, 12419, 18859, 190, 21, 86, 223, 187, 183, 77, 111); + RT_INTERFACE!{static interface ITextConversionGeneratorFactory(ITextConversionGeneratorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITextConversionGeneratorFactory] { + fn Create(&mut self, languageTag: HSTRING, out: *mut *mut TextConversionGenerator) -> HRESULT }} - impl ICompass2 { - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl ITextConversionGeneratorFactory { + #[inline] pub unsafe fn create(&mut self, languageTag: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, languageTag.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ICompassReading, 2190545192, 20797, 19913, 183, 129, 94, 237, 251, 240, 45, 12); - RT_INTERFACE!{interface ICompassReading(ICompassReadingVtbl): IInspectable(IInspectableVtbl) [IID_ICompassReading] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_HeadingMagneticNorth(&mut self, out: *mut f64) -> HRESULT, - fn get_HeadingTrueNorth(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + RT_CLASS!{class TextConversionGenerator: ITextConversionGenerator [ITextConversionGeneratorFactory] [CLSID_TextConversionGenerator]} + DEFINE_CLSID!(CLSID_TextConversionGenerator = &[87,105,110,100,111,119,115,46,68,97,116,97,46,84,101,120,116,46,84,101,120,116,67,111,110,118,101,114,115,105,111,110,71,101,110,101,114,97,116,111,114,0]); + DEFINE_IID!(IID_ITextReverseConversionGenerator, 1374156052, 40017, 19846, 174, 27, 180, 152, 251, 173, 131, 19); + RT_INTERFACE!{interface ITextReverseConversionGenerator(ITextReverseConversionGeneratorVtbl): IInspectable(IInspectableVtbl) [IID_ITextReverseConversionGenerator] { + fn get_ResolvedLanguage(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LanguageAvailableButNotInstalled(&mut self, out: *mut bool) -> HRESULT, + fn ConvertBackAsync(&mut self, input: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl ICompassReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl ITextReverseConversionGenerator { + #[inline] pub unsafe fn get_resolved_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_heading_magnetic_north(&mut self) -> Result { + #[inline] pub unsafe fn get_language_available_but_not_installed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HeadingMagneticNorth)(self, &mut out); + let hr = ((*self.lpVtbl).get_LanguageAvailableButNotInstalled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_heading_true_north(&mut self) -> Result>> { + #[inline] pub unsafe fn convert_back_async(&mut self, input: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_HeadingTrueNorth)(self, &mut out); + let hr = ((*self.lpVtbl).ConvertBackAsync)(self, input.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ICompassReadingHeadingAccuracy, 3881907534, 35089, 16631, 158, 22, 110, 204, 125, 174, 197, 222); - RT_INTERFACE!{interface ICompassReadingHeadingAccuracy(ICompassReadingHeadingAccuracyVtbl): IInspectable(IInspectableVtbl) [IID_ICompassReadingHeadingAccuracy] { - fn get_HeadingAccuracy(&mut self, out: *mut MagnetometerAccuracy) -> HRESULT - }} - impl ICompassReadingHeadingAccuracy { - #[inline] pub unsafe fn get_heading_accuracy(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_HeadingAccuracy)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - } - DEFINE_IID!(IID_ICompassReadingChangedEventArgs, 2400537008, 59580, 19582, 176, 9, 78, 65, 223, 19, 112, 114); - RT_INTERFACE!{interface ICompassReadingChangedEventArgs(ICompassReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICompassReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut CompassReading) -> HRESULT + DEFINE_IID!(IID_ITextReverseConversionGeneratorFactory, 1673450278, 8154, 16886, 137, 213, 35, 221, 234, 60, 114, 154); + RT_INTERFACE!{static interface ITextReverseConversionGeneratorFactory(ITextReverseConversionGeneratorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITextReverseConversionGeneratorFactory] { + fn Create(&mut self, languageTag: HSTRING, out: *mut *mut TextReverseConversionGenerator) -> HRESULT }} - impl ICompassReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + impl ITextReverseConversionGeneratorFactory { + #[inline] pub unsafe fn create(&mut self, languageTag: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, languageTag.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ILightSensorDeviceId, 2146322936, 2811, 20305, 135, 240, 108, 38, 55, 92, 233, 79); - RT_INTERFACE!{interface ILightSensorDeviceId(ILightSensorDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_ILightSensorDeviceId] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class TextReverseConversionGenerator: ITextReverseConversionGenerator [ITextReverseConversionGeneratorFactory] [CLSID_TextReverseConversionGenerator]} + DEFINE_CLSID!(CLSID_TextReverseConversionGenerator = &[87,105,110,100,111,119,115,46,68,97,116,97,46,84,101,120,116,46,84,101,120,116,82,101,118,101,114,115,101,67,111,110,118,101,114,115,105,111,110,71,101,110,101,114,97,116,111,114,0]); + DEFINE_IID!(IID_ITextPhoneme, 2472715274, 39802, 17769, 148, 207, 216, 79, 47, 56, 207, 155); + RT_INTERFACE!{interface ITextPhoneme(ITextPhonemeVtbl): IInspectable(IInspectableVtbl) [IID_ITextPhoneme] { + fn get_DisplayText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ReadingText(&mut self, out: *mut HSTRING) -> HRESULT }} - impl ILightSensorDeviceId { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl ITextPhoneme { + #[inline] pub unsafe fn get_display_text(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_DisplayText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_reading_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ReadingText)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ILightSensorStatics, 1172016260, 50088, 18206, 154, 83, 100, 87, 250, 216, 124, 14); - RT_INTERFACE!{static interface ILightSensorStatics(ILightSensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILightSensorStatics] { - fn GetDefault(&mut self, out: *mut *mut LightSensor) -> HRESULT + RT_CLASS!{class TextPhoneme: ITextPhoneme} + DEFINE_IID!(IID_ITextReverseConversionGenerator2, 447730412, 34262, 18173, 130, 138, 58, 72, 48, 250, 110, 24); + RT_INTERFACE!{interface ITextReverseConversionGenerator2(ITextReverseConversionGenerator2Vtbl): IInspectable(IInspectableVtbl) [IID_ITextReverseConversionGenerator2] { + fn GetPhonemesAsync(&mut self, input: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT }} - impl ILightSensorStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + impl ITextReverseConversionGenerator2 { + #[inline] pub unsafe fn get_phonemes_async(&mut self, input: &HStringArg) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).GetPhonemesAsync)(self, input.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class LightSensor: ILightSensor} - RT_ACTIVATABLE!{ILightSensorStatics [CLSID_LightSensor]} - DEFINE_CLSID!(CLSID_LightSensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,76,105,103,104,116,83,101,110,115,111,114,0]); - DEFINE_IID!(IID_ILightSensor, 4165732120, 3156, 18350, 146, 46, 120, 159, 87, 251, 3, 160); - RT_INTERFACE!{interface ILightSensor(ILightSensorVtbl): IInspectable(IInspectableVtbl) [IID_ILightSensor] { - fn GetCurrentReading(&mut self, out: *mut *mut LightSensorReading) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT +} // Windows.Data.Text +pub mod xml { // Windows.Data.Xml +pub mod dom { // Windows.Data.Xml.Dom +use ::prelude::*; + RT_ENUM! { enum NodeType: i32 { + Invalid (NodeType_Invalid) = 0, ElementNode (NodeType_ElementNode) = 1, AttributeNode (NodeType_AttributeNode) = 2, TextNode (NodeType_TextNode) = 3, DataSectionNode (NodeType_DataSectionNode) = 4, EntityReferenceNode (NodeType_EntityReferenceNode) = 5, EntityNode (NodeType_EntityNode) = 6, ProcessingInstructionNode (NodeType_ProcessingInstructionNode) = 7, CommentNode (NodeType_CommentNode) = 8, DocumentNode (NodeType_DocumentNode) = 9, DocumentTypeNode (NodeType_DocumentTypeNode) = 10, DocumentFragmentNode (NodeType_DocumentFragmentNode) = 11, NotationNode (NodeType_NotationNode) = 12, }} - impl ILightSensor { - #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + DEFINE_IID!(IID_IXmlNodeSelector, 1675344523, 53467, 20449, 183, 69, 249, 67, 58, 253, 194, 91); + RT_INTERFACE!{interface IXmlNodeSelector(IXmlNodeSelectorVtbl): IInspectable(IInspectableVtbl) [IID_IXmlNodeSelector] { + fn SelectSingleNode(&mut self, xpath: HSTRING, out: *mut *mut IXmlNode) -> HRESULT, + fn SelectNodes(&mut self, xpath: HSTRING, out: *mut *mut XmlNodeList) -> HRESULT, + fn SelectSingleNodeNS(&mut self, xpath: HSTRING, namespaces: *mut IInspectable, out: *mut *mut IXmlNode) -> HRESULT, + fn SelectNodesNS(&mut self, xpath: HSTRING, namespaces: *mut IInspectable, out: *mut *mut XmlNodeList) -> HRESULT + }} + impl IXmlNodeSelector { + #[inline] pub unsafe fn select_single_node(&mut self, xpath: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + let hr = ((*self.lpVtbl).SelectSingleNode)(self, xpath.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn select_nodes(&mut self, xpath: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectNodes)(self, xpath.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn select_single_node_ns(&mut self, xpath: &HStringArg, namespaces: &IInspectable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectSingleNodeNS)(self, xpath.get(), namespaces as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn select_nodes_ns(&mut self, xpath: &HStringArg, namespaces: &IInspectable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectNodesNS)(self, xpath.get(), namespaces as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class LightSensorReading: ILightSensorReading} - RT_CLASS!{class LightSensorReadingChangedEventArgs: ILightSensorReadingChangedEventArgs} - DEFINE_IID!(IID_ILightSensorReading, 4292829952, 8828, 19755, 179, 2, 252, 1, 66, 72, 92, 104); - RT_INTERFACE!{interface ILightSensorReading(ILightSensorReadingVtbl): IInspectable(IInspectableVtbl) [IID_ILightSensorReading] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_IlluminanceInLux(&mut self, out: *mut f32) -> HRESULT + RT_CLASS!{class XmlNodeList: IXmlNodeList} + RT_CLASS!{class XmlNamedNodeMap: IXmlNamedNodeMap} + RT_CLASS!{class XmlDocument: IXmlDocument} + RT_ACTIVATABLE!{IXmlDocumentStatics [CLSID_XmlDocument]} + DEFINE_CLSID!(CLSID_XmlDocument = &[87,105,110,100,111,119,115,46,68,97,116,97,46,88,109,108,46,68,111,109,46,88,109,108,68,111,99,117,109,101,110,116,0]); + DEFINE_IID!(IID_IXmlNodeSerializer, 1556460418, 59101, 18833, 171, 239, 6, 216, 210, 231, 189, 12); + RT_INTERFACE!{interface IXmlNodeSerializer(IXmlNodeSerializerVtbl): IInspectable(IInspectableVtbl) [IID_IXmlNodeSerializer] { + fn GetXml(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_InnerText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_InnerText(&mut self, value: HSTRING) -> HRESULT }} - impl ILightSensorReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IXmlNodeSerializer { + #[inline] pub unsafe fn get_xml(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetXml)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_illuminance_in_lux(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IlluminanceInLux)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_inner_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InnerText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_inner_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_InnerText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_ILightSensorReadingChangedEventArgs, 2745365711, 9611, 16908, 184, 171, 142, 221, 96, 30, 207, 80); - RT_INTERFACE!{interface ILightSensorReadingChangedEventArgs(ILightSensorReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ILightSensorReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut LightSensorReading) -> HRESULT + DEFINE_IID!(IID_IXmlNode, 477371737, 8482, 18389, 168, 86, 131, 243, 212, 33, 72, 117); + RT_INTERFACE!{interface IXmlNode(IXmlNodeVtbl): IInspectable(IInspectableVtbl) [IID_IXmlNode] { + fn get_NodeValue(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_NodeValue(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_NodeType(&mut self, out: *mut NodeType) -> HRESULT, + fn get_NodeName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ParentNode(&mut self, out: *mut *mut IXmlNode) -> HRESULT, + fn get_ChildNodes(&mut self, out: *mut *mut XmlNodeList) -> HRESULT, + fn get_FirstChild(&mut self, out: *mut *mut IXmlNode) -> HRESULT, + fn get_LastChild(&mut self, out: *mut *mut IXmlNode) -> HRESULT, + fn get_PreviousSibling(&mut self, out: *mut *mut IXmlNode) -> HRESULT, + fn get_NextSibling(&mut self, out: *mut *mut IXmlNode) -> HRESULT, + fn get_Attributes(&mut self, out: *mut *mut XmlNamedNodeMap) -> HRESULT, + fn HasChildNodes(&mut self, out: *mut bool) -> HRESULT, + fn get_OwnerDocument(&mut self, out: *mut *mut XmlDocument) -> HRESULT, + fn InsertBefore(&mut self, newChild: *mut IXmlNode, referenceChild: *mut IXmlNode, out: *mut *mut IXmlNode) -> HRESULT, + fn ReplaceChild(&mut self, newChild: *mut IXmlNode, referenceChild: *mut IXmlNode, out: *mut *mut IXmlNode) -> HRESULT, + fn RemoveChild(&mut self, childNode: *mut IXmlNode, out: *mut *mut IXmlNode) -> HRESULT, + fn AppendChild(&mut self, newChild: *mut IXmlNode, out: *mut *mut IXmlNode) -> HRESULT, + fn CloneNode(&mut self, deep: bool, out: *mut *mut IXmlNode) -> HRESULT, + fn get_NamespaceUri(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_LocalName(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_Prefix(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn Normalize(&mut self) -> HRESULT, + fn put_Prefix(&mut self, value: *mut IInspectable) -> HRESULT }} - impl ILightSensorReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + impl IXmlNode { + #[inline] pub unsafe fn get_node_value(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + let hr = ((*self.lpVtbl).get_NodeValue)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_ISensorRotationMatrix, 171792999, 8948, 17298, 149, 56, 101, 208, 189, 6, 74, 166); - RT_INTERFACE!{interface ISensorRotationMatrix(ISensorRotationMatrixVtbl): IInspectable(IInspectableVtbl) [IID_ISensorRotationMatrix] { - fn get_M11(&mut self, out: *mut f32) -> HRESULT, - fn get_M12(&mut self, out: *mut f32) -> HRESULT, - fn get_M13(&mut self, out: *mut f32) -> HRESULT, - fn get_M21(&mut self, out: *mut f32) -> HRESULT, - fn get_M22(&mut self, out: *mut f32) -> HRESULT, - fn get_M23(&mut self, out: *mut f32) -> HRESULT, - fn get_M31(&mut self, out: *mut f32) -> HRESULT, - fn get_M32(&mut self, out: *mut f32) -> HRESULT, - fn get_M33(&mut self, out: *mut f32) -> HRESULT - }} - impl ISensorRotationMatrix { - #[inline] pub unsafe fn get_m11(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_M11)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_node_value(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_NodeValue)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_m12(&mut self) -> Result { + #[inline] pub unsafe fn get_node_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_M12)(self, &mut out); + let hr = ((*self.lpVtbl).get_NodeType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_m13(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_M13)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_node_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NodeName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_m21(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_M21)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_parent_node(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ParentNode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_m22(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_M22)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_child_nodes(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChildNodes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_m23(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_M23)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_first_child(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FirstChild)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_m31(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_M31)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_last_child(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LastChild)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_m32(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_M32)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_previous_sibling(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreviousSibling)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_m33(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_M33)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_next_sibling(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NextSibling)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_ISensorQuaternion, 3385182247, 50972, 18151, 157, 163, 54, 161, 147, 178, 50, 188); - RT_INTERFACE!{interface ISensorQuaternion(ISensorQuaternionVtbl): IInspectable(IInspectableVtbl) [IID_ISensorQuaternion] { - fn get_W(&mut self, out: *mut f32) -> HRESULT, - fn get_X(&mut self, out: *mut f32) -> HRESULT, - fn get_Y(&mut self, out: *mut f32) -> HRESULT, - fn get_Z(&mut self, out: *mut f32) -> HRESULT - }} - impl ISensorQuaternion { - #[inline] pub unsafe fn get_w(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_W)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_attributes(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Attributes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_x(&mut self) -> Result { + #[inline] pub unsafe fn has_child_nodes(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_X)(self, &mut out); + let hr = ((*self.lpVtbl).HasChildNodes)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_y(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Y)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_owner_document(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OwnerDocument)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_z(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Z)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn insert_before(&mut self, newChild: &IXmlNode, referenceChild: &IXmlNode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).InsertBefore)(self, newChild as *const _ as *mut _, referenceChild as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class SensorRotationMatrix: ISensorRotationMatrix} - RT_CLASS!{class SensorQuaternion: ISensorQuaternion} - DEFINE_IID!(IID_IOrientationSensorDeviceId, 1516877384, 19497, 18924, 178, 143, 234, 29, 17, 123, 102, 240); - RT_INTERFACE!{interface IOrientationSensorDeviceId(IOrientationSensorDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorDeviceId] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IOrientationSensorDeviceId { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn replace_child(&mut self, newChild: &IXmlNode, referenceChild: &IXmlNode) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ReplaceChild)(self, newChild as *const _ as *mut _, referenceChild as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IOrientationSensorStatics, 284133138, 64332, 17034, 137, 139, 39, 101, 228, 9, 230, 105); - RT_INTERFACE!{static interface IOrientationSensorStatics(IOrientationSensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorStatics] { - fn GetDefault(&mut self, out: *mut *mut OrientationSensor) -> HRESULT - }} - impl IOrientationSensorStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + #[inline] pub unsafe fn remove_child(&mut self, childNode: &IXmlNode) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).RemoveChild)(self, childNode as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class OrientationSensor: IOrientationSensor} - RT_ACTIVATABLE!{IOrientationSensorStatics [CLSID_OrientationSensor]} - RT_ACTIVATABLE!{IOrientationSensorStatics3 [CLSID_OrientationSensor]} - RT_ACTIVATABLE!{IOrientationSensorStatics2 [CLSID_OrientationSensor]} - DEFINE_CLSID!(CLSID_OrientationSensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,79,114,105,101,110,116,97,116,105,111,110,83,101,110,115,111,114,0]); - DEFINE_IID!(IID_IOrientationSensorStatics2, 1507462411, 54282, 19569, 146, 118, 138, 39, 42, 10, 102, 25); - RT_INTERFACE!{static interface IOrientationSensorStatics2(IOrientationSensorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorStatics2] { - fn GetDefaultForRelativeReadings(&mut self, out: *mut *mut OrientationSensor) -> HRESULT - }} - impl IOrientationSensorStatics2 { - #[inline] pub unsafe fn get_default_for_relative_readings(&mut self) -> Result> { + #[inline] pub unsafe fn append_child(&mut self, newChild: &IXmlNode) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultForRelativeReadings)(self, &mut out); + let hr = ((*self.lpVtbl).AppendChild)(self, newChild as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IOrientationSensorStatics3, 3626821920, 10103, 16639, 159, 89, 214, 84, 176, 133, 241, 47); - RT_INTERFACE!{static interface IOrientationSensorStatics3(IOrientationSensorStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorStatics3] { - fn GetDefaultWithSensorReadingType(&mut self, sensorReadingtype: SensorReadingType, out: *mut *mut OrientationSensor) -> HRESULT, - fn GetDefaultWithSensorReadingTypeAndSensorOptimizationGoal(&mut self, sensorReadingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal, out: *mut *mut OrientationSensor) -> HRESULT - }} - impl IOrientationSensorStatics3 { - #[inline] pub unsafe fn get_default_with_sensor_reading_type(&mut self, sensorReadingtype: SensorReadingType) -> Result> { + #[inline] pub unsafe fn clone_node(&mut self, deep: bool) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultWithSensorReadingType)(self, sensorReadingtype, &mut out); + let hr = ((*self.lpVtbl).CloneNode)(self, deep, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_with_sensor_reading_type_and_sensor_optimization_goal(&mut self, sensorReadingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal) -> Result> { + #[inline] pub unsafe fn get_namespace_uri(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultWithSensorReadingTypeAndSensorOptimizationGoal)(self, sensorReadingType, optimizationGoal, &mut out); + let hr = ((*self.lpVtbl).get_NamespaceUri)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IOrientationSensor, 1580549685, 53099, 19555, 171, 216, 16, 37, 43, 11, 246, 236); - RT_INTERFACE!{interface IOrientationSensor(IOrientationSensorVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensor] { - fn GetCurrentReading(&mut self, out: *mut *mut OrientationSensorReading) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IOrientationSensor { - #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + #[inline] pub unsafe fn get_local_name(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + let hr = ((*self.lpVtbl).get_LocalName)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_prefix(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Prefix)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + #[inline] pub unsafe fn normalize(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Normalize)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_prefix(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Prefix)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + } + DEFINE_IID!(IID_IXmlDomImplementation, 1843757362, 61725, 20411, 140, 198, 88, 60, 186, 147, 17, 47); + RT_INTERFACE!{interface IXmlDomImplementation(IXmlDomImplementationVtbl): IInspectable(IInspectableVtbl) [IID_IXmlDomImplementation] { + fn HasFeature(&mut self, feature: HSTRING, version: *mut IInspectable, out: *mut bool) -> HRESULT + }} + impl IXmlDomImplementation { + #[inline] pub unsafe fn has_feature(&mut self, feature: &HStringArg, version: &IInspectable) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).HasFeature)(self, feature.get(), version as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IXmlDocumentType, 4147389477, 38785, 18788, 142, 148, 155, 28, 109, 252, 155, 199); + RT_INTERFACE!{interface IXmlDocumentType(IXmlDocumentTypeVtbl): IInspectable(IInspectableVtbl) [IID_IXmlDocumentType] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Entities(&mut self, out: *mut *mut XmlNamedNodeMap) -> HRESULT, + fn get_Notations(&mut self, out: *mut *mut XmlNamedNodeMap) -> HRESULT + }} + impl IXmlDocumentType { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_entities(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Entities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_notations(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Notations)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class OrientationSensorReading: IOrientationSensorReading} - RT_CLASS!{class OrientationSensorReadingChangedEventArgs: IOrientationSensorReadingChangedEventArgs} - DEFINE_IID!(IID_IOrientationSensor2, 227691769, 12063, 18889, 128, 66, 74, 24, 19, 214, 119, 96); - RT_INTERFACE!{interface IOrientationSensor2(IOrientationSensor2Vtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensor2] { - #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, - #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT, - fn get_ReadingType(&mut self, out: *mut SensorReadingType) -> HRESULT + DEFINE_IID!(IID_IXmlAttribute, 2887010980, 46321, 19894, 178, 6, 138, 34, 195, 8, 219, 10); + RT_INTERFACE!{interface IXmlAttribute(IXmlAttributeVtbl): IInspectable(IInspectableVtbl) [IID_IXmlAttribute] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Specified(&mut self, out: *mut bool) -> HRESULT, + fn get_Value(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Value(&mut self, value: HSTRING) -> HRESULT }} - impl IOrientationSensor2 { - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IXmlAttribute { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { + #[inline] pub unsafe fn get_specified(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); + let hr = ((*self.lpVtbl).get_Specified)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_reading_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadingType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IOrientationSensorReading, 1196870035, 26005, 18583, 188, 198, 213, 55, 238, 117, 117, 100); - RT_INTERFACE!{interface IOrientationSensorReading(IOrientationSensorReadingVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorReading] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_RotationMatrix(&mut self, out: *mut *mut SensorRotationMatrix) -> HRESULT, - fn get_Quaternion(&mut self, out: *mut *mut SensorQuaternion) -> HRESULT + DEFINE_IID!(IID_IXmlDocumentFragment, 3807013526, 3105, 17573, 139, 201, 158, 74, 38, 39, 8, 236); + RT_INTERFACE!{interface IXmlDocumentFragment(IXmlDocumentFragmentVtbl): IInspectable(IInspectableVtbl) [IID_IXmlDocumentFragment] { + }} - impl IOrientationSensorReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + DEFINE_IID!(IID_IXmlElement, 771459615, 27408, 20216, 159, 131, 239, 204, 232, 250, 236, 55); + RT_INTERFACE!{interface IXmlElement(IXmlElementVtbl): IInspectable(IInspectableVtbl) [IID_IXmlElement] { + fn get_TagName(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetAttribute(&mut self, attributeName: HSTRING, out: *mut HSTRING) -> HRESULT, + fn SetAttribute(&mut self, attributeName: HSTRING, attributeValue: HSTRING) -> HRESULT, + fn RemoveAttribute(&mut self, attributeName: HSTRING) -> HRESULT, + fn GetAttributeNode(&mut self, attributeName: HSTRING, out: *mut *mut XmlAttribute) -> HRESULT, + fn SetAttributeNode(&mut self, newAttribute: *mut XmlAttribute, out: *mut *mut XmlAttribute) -> HRESULT, + fn RemoveAttributeNode(&mut self, attributeNode: *mut XmlAttribute, out: *mut *mut XmlAttribute) -> HRESULT, + fn GetElementsByTagName(&mut self, tagName: HSTRING, out: *mut *mut XmlNodeList) -> HRESULT, + fn SetAttributeNS(&mut self, namespaceUri: *mut IInspectable, qualifiedName: HSTRING, value: HSTRING) -> HRESULT, + fn GetAttributeNS(&mut self, namespaceUri: *mut IInspectable, localName: HSTRING, out: *mut HSTRING) -> HRESULT, + fn RemoveAttributeNS(&mut self, namespaceUri: *mut IInspectable, localName: HSTRING) -> HRESULT, + fn SetAttributeNodeNS(&mut self, newAttribute: *mut XmlAttribute, out: *mut *mut XmlAttribute) -> HRESULT, + fn GetAttributeNodeNS(&mut self, namespaceUri: *mut IInspectable, localName: HSTRING, out: *mut *mut XmlAttribute) -> HRESULT + }} + impl IXmlElement { + #[inline] pub unsafe fn get_tag_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TagName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_rotation_matrix(&mut self) -> Result> { + #[inline] pub unsafe fn get_attribute(&mut self, attributeName: &HStringArg) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RotationMatrix)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetAttribute)(self, attributeName.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_quaternion(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Quaternion)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_attribute(&mut self, attributeName: &HStringArg, attributeValue: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetAttribute)(self, attributeName.get(), attributeValue.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IOrientationSensorReadingYawAccuracy, 3517749284, 16218, 18850, 188, 123, 17, 128, 188, 56, 205, 43); - RT_INTERFACE!{interface IOrientationSensorReadingYawAccuracy(IOrientationSensorReadingYawAccuracyVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorReadingYawAccuracy] { - fn get_YawAccuracy(&mut self, out: *mut MagnetometerAccuracy) -> HRESULT - }} - impl IOrientationSensorReadingYawAccuracy { - #[inline] pub unsafe fn get_yaw_accuracy(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_YawAccuracy)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_attribute(&mut self, attributeName: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveAttribute)(self, attributeName.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IOrientationSensorReadingChangedEventArgs, 19665286, 50106, 18108, 174, 101, 122, 152, 153, 108, 191, 184); - RT_INTERFACE!{interface IOrientationSensorReadingChangedEventArgs(IOrientationSensorReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut OrientationSensorReading) -> HRESULT - }} - impl IOrientationSensorReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + #[inline] pub unsafe fn get_attribute_node(&mut self, attributeName: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + let hr = ((*self.lpVtbl).GetAttributeNode)(self, attributeName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_ENUM! { enum SimpleOrientation: i32 { - NotRotated (SimpleOrientation_NotRotated) = 0, Rotated90DegreesCounterclockwise (SimpleOrientation_Rotated90DegreesCounterclockwise) = 1, Rotated180DegreesCounterclockwise (SimpleOrientation_Rotated180DegreesCounterclockwise) = 2, Rotated270DegreesCounterclockwise (SimpleOrientation_Rotated270DegreesCounterclockwise) = 3, Faceup (SimpleOrientation_Faceup) = 4, Facedown (SimpleOrientation_Facedown) = 5, - }} - DEFINE_IID!(IID_ISimpleOrientationSensorDeviceId, 4223666891, 15222, 16886, 128, 145, 48, 239, 230, 70, 211, 207); - RT_INTERFACE!{interface ISimpleOrientationSensorDeviceId(ISimpleOrientationSensorDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_ISimpleOrientationSensorDeviceId] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl ISimpleOrientationSensorDeviceId { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn set_attribute_node(&mut self, newAttribute: &XmlAttribute) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).SetAttributeNode)(self, newAttribute as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_ISimpleOrientationSensorStatics, 1928136303, 28842, 16582, 155, 27, 52, 51, 247, 69, 155, 78); - RT_INTERFACE!{static interface ISimpleOrientationSensorStatics(ISimpleOrientationSensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISimpleOrientationSensorStatics] { - fn GetDefault(&mut self, out: *mut *mut SimpleOrientationSensor) -> HRESULT - }} - impl ISimpleOrientationSensorStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + #[inline] pub unsafe fn remove_attribute_node(&mut self, attributeNode: &XmlAttribute) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).RemoveAttributeNode)(self, attributeNode as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class SimpleOrientationSensor: ISimpleOrientationSensor} - RT_ACTIVATABLE!{ISimpleOrientationSensorStatics [CLSID_SimpleOrientationSensor]} - DEFINE_CLSID!(CLSID_SimpleOrientationSensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,83,105,109,112,108,101,79,114,105,101,110,116,97,116,105,111,110,83,101,110,115,111,114,0]); - DEFINE_IID!(IID_ISimpleOrientationSensor, 1609906262, 8522, 19950, 163, 249, 97, 111, 26, 176, 111, 253); - RT_INTERFACE!{interface ISimpleOrientationSensor(ISimpleOrientationSensorVtbl): IInspectable(IInspectableVtbl) [IID_ISimpleOrientationSensor] { - fn GetCurrentOrientation(&mut self, out: *mut SimpleOrientation) -> HRESULT, - fn add_OrientationChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OrientationChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl ISimpleOrientationSensor { - #[inline] pub unsafe fn get_current_orientation(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetCurrentOrientation)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_orientation_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_OrientationChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_elements_by_tag_name(&mut self, tagName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetElementsByTagName)(self, tagName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_orientation_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_OrientationChanged)(self, token); + #[inline] pub unsafe fn set_attribute_ns(&mut self, namespaceUri: &IInspectable, qualifiedName: &HStringArg, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetAttributeNS)(self, namespaceUri as *const _ as *mut _, qualifiedName.get(), value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class SimpleOrientationSensorOrientationChangedEventArgs: ISimpleOrientationSensorOrientationChangedEventArgs} - DEFINE_IID!(IID_ISimpleOrientationSensor2, 2725750680, 34928, 17726, 139, 214, 184, 245, 216, 215, 148, 27); - RT_INTERFACE!{interface ISimpleOrientationSensor2(ISimpleOrientationSensor2Vtbl): IInspectable(IInspectableVtbl) [IID_ISimpleOrientationSensor2] { - #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, - #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT - }} - impl ISimpleOrientationSensor2 { - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_attribute_ns(&mut self, namespaceUri: &IInspectable, localName: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAttributeNS)(self, namespaceUri as *const _ as *mut _, localName.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_attribute_ns(&mut self, namespaceUri: &IInspectable, localName: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveAttributeNS)(self, namespaceUri as *const _ as *mut _, localName.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_ISimpleOrientationSensorOrientationChangedEventArgs, 3168126560, 9172, 19276, 162, 46, 186, 129, 173, 224, 198, 1); - RT_INTERFACE!{interface ISimpleOrientationSensorOrientationChangedEventArgs(ISimpleOrientationSensorOrientationChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISimpleOrientationSensorOrientationChangedEventArgs] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_Orientation(&mut self, out: *mut SimpleOrientation) -> HRESULT - }} - impl ISimpleOrientationSensorOrientationChangedEventArgs { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_attribute_node_ns(&mut self, newAttribute: &XmlAttribute) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetAttributeNodeNS)(self, newAttribute as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_orientation(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_attribute_node_ns(&mut self, namespaceUri: &IInspectable, localName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAttributeNodeNS)(self, namespaceUri as *const _ as *mut _, localName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IMagnetometerDeviceId, 1488230594, 32331, 16460, 159, 197, 93, 232, 180, 14, 186, 227); - RT_INTERFACE!{interface IMagnetometerDeviceId(IMagnetometerDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometerDeviceId] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class XmlAttribute: IXmlAttribute} + DEFINE_IID!(IID_IDtdNotation, 2360664141, 27974, 20187, 171, 115, 223, 131, 197, 26, 211, 151); + RT_INTERFACE!{interface IDtdNotation(IDtdNotationVtbl): IInspectable(IInspectableVtbl) [IID_IDtdNotation] { + fn get_PublicId(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_SystemId(&mut self, out: *mut *mut IInspectable) -> HRESULT }} - impl IMagnetometerDeviceId { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl IDtdNotation { + #[inline] pub unsafe fn get_public_id(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_PublicId)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IMagnetometerStatics, 2235327692, 1688, 19930, 166, 223, 156, 185, 204, 74, 180, 10); - RT_INTERFACE!{static interface IMagnetometerStatics(IMagnetometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometerStatics] { - fn GetDefault(&mut self, out: *mut *mut Magnetometer) -> HRESULT - }} - impl IMagnetometerStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + #[inline] pub unsafe fn get_system_id(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).get_SystemId)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class Magnetometer: IMagnetometer} - RT_ACTIVATABLE!{IMagnetometerStatics [CLSID_Magnetometer]} - DEFINE_CLSID!(CLSID_Magnetometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,77,97,103,110,101,116,111,109,101,116,101,114,0]); - DEFINE_IID!(IID_IMagnetometer, 1213162094, 54217, 16657, 179, 246, 44, 241, 250, 164, 24, 213); - RT_INTERFACE!{interface IMagnetometer(IMagnetometerVtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometer] { - fn GetCurrentReading(&mut self, out: *mut *mut MagnetometerReading) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_IDtdEntity, 1779130364, 25524, 18447, 158, 106, 138, 146, 129, 106, 173, 228); + RT_INTERFACE!{interface IDtdEntity(IDtdEntityVtbl): IInspectable(IInspectableVtbl) [IID_IDtdEntity] { + fn get_PublicId(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_SystemId(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_NotationName(&mut self, out: *mut *mut IInspectable) -> HRESULT }} - impl IMagnetometer { - #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + impl IDtdEntity { + #[inline] pub unsafe fn get_public_id(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + let hr = ((*self.lpVtbl).get_PublicId)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_system_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SystemId)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_notation_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NotationName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IXmlEntityReference, 774850492, 50128, 19663, 187, 134, 10, 184, 195, 106, 97, 207); + RT_INTERFACE!{interface IXmlEntityReference(IXmlEntityReferenceVtbl): IInspectable(IInspectableVtbl) [IID_IXmlEntityReference] { + + }} + DEFINE_IID!(IID_IXmlProcessingInstruction, 654834974, 7826, 20174, 182, 244, 38, 240, 105, 7, 141, 220); + RT_INTERFACE!{interface IXmlProcessingInstruction(IXmlProcessingInstructionVtbl): IInspectable(IInspectableVtbl) [IID_IXmlProcessingInstruction] { + fn get_Target(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Data(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Data(&mut self, value: HSTRING) -> HRESULT + }} + impl IXmlProcessingInstruction { + #[inline] pub unsafe fn get_target(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Target)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + #[inline] pub unsafe fn set_data(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Data)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class MagnetometerReading: IMagnetometerReading} - RT_CLASS!{class MagnetometerReadingChangedEventArgs: IMagnetometerReadingChangedEventArgs} - DEFINE_IID!(IID_IMagnetometer2, 3026545797, 9974, 17483, 169, 226, 162, 63, 150, 108, 211, 104); - RT_INTERFACE!{interface IMagnetometer2(IMagnetometer2Vtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometer2] { - #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, - #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT + DEFINE_IID!(IID_IXmlCharacterData, 321798827, 20022, 19958, 177, 200, 12, 230, 47, 216, 139, 38); + RT_INTERFACE!{interface IXmlCharacterData(IXmlCharacterDataVtbl): IInspectable(IInspectableVtbl) [IID_IXmlCharacterData] { + fn get_Data(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Data(&mut self, value: HSTRING) -> HRESULT, + fn get_Length(&mut self, out: *mut u32) -> HRESULT, + fn SubstringData(&mut self, offset: u32, count: u32, out: *mut HSTRING) -> HRESULT, + fn AppendData(&mut self, data: HSTRING) -> HRESULT, + fn InsertData(&mut self, offset: u32, data: HSTRING) -> HRESULT, + fn DeleteData(&mut self, offset: u32, count: u32) -> HRESULT, + fn ReplaceData(&mut self, offset: u32, count: u32, data: HSTRING) -> HRESULT }} - impl IMagnetometer2 { - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); + impl IXmlCharacterData { + #[inline] pub unsafe fn get_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_data(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Data)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { + #[inline] pub unsafe fn get_length(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IMagnetometerReading, 204260365, 60413, 20060, 187, 17, 175, 194, 155, 60, 174, 97); - RT_INTERFACE!{interface IMagnetometerReading(IMagnetometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometerReading] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_MagneticFieldX(&mut self, out: *mut f32) -> HRESULT, - fn get_MagneticFieldY(&mut self, out: *mut f32) -> HRESULT, - fn get_MagneticFieldZ(&mut self, out: *mut f32) -> HRESULT, - fn get_DirectionalAccuracy(&mut self, out: *mut MagnetometerAccuracy) -> HRESULT - }} - impl IMagnetometerReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn substring_data(&mut self, offset: u32, count: u32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SubstringData)(self, offset, count, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_magnetic_field_x(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MagneticFieldX)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn append_data(&mut self, data: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AppendData)(self, data.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_magnetic_field_y(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MagneticFieldY)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn insert_data(&mut self, offset: u32, data: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).InsertData)(self, offset, data.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_magnetic_field_z(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MagneticFieldZ)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn delete_data(&mut self, offset: u32, count: u32) -> Result<()> { + let hr = ((*self.lpVtbl).DeleteData)(self, offset, count); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_directional_accuracy(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DirectionalAccuracy)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn replace_data(&mut self, offset: u32, count: u32, data: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ReplaceData)(self, offset, count, data.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IMagnetometerReadingChangedEventArgs, 401270898, 11961, 20199, 138, 208, 49, 39, 83, 125, 148, 155); - RT_INTERFACE!{interface IMagnetometerReadingChangedEventArgs(IMagnetometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometerReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut MagnetometerReading) -> HRESULT + DEFINE_IID!(IID_IXmlComment, 3164894421, 46623, 17937, 156, 172, 46, 146, 227, 71, 109, 71); + RT_INTERFACE!{interface IXmlComment(IXmlCommentVtbl): IInspectable(IInspectableVtbl) [IID_IXmlComment] { + }} - impl IMagnetometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + DEFINE_IID!(IID_IXmlText, 4180780235, 12429, 18272, 161, 213, 67, 182, 116, 80, 172, 126); + RT_INTERFACE!{interface IXmlText(IXmlTextVtbl): IInspectable(IInspectableVtbl) [IID_IXmlText] { + fn SplitText(&mut self, offset: u32, out: *mut *mut IXmlText) -> HRESULT + }} + impl IXmlText { + #[inline] pub unsafe fn split_text(&mut self, offset: u32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + let hr = ((*self.lpVtbl).SplitText)(self, offset, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IActivitySensorStatics, 2803764893, 61067, 17873, 178, 91, 8, 204, 13, 249, 42, 182); - RT_INTERFACE!{static interface IActivitySensorStatics(IActivitySensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorStatics] { - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetSystemHistoryAsync(&mut self, fromTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetSystemHistoryWithDurationAsync(&mut self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + DEFINE_IID!(IID_IXmlCDataSection, 1292153967, 51389, 17844, 136, 153, 4, 0, 215, 194, 198, 15); + RT_INTERFACE!{interface IXmlCDataSection(IXmlCDataSectionVtbl): IInspectable(IInspectableVtbl) [IID_IXmlCDataSection] { + }} - impl IActivitySensorStatics { - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + DEFINE_IID!(IID_IXmlDocument, 4159939846, 7815, 17110, 188, 251, 184, 200, 9, 250, 84, 148); + RT_INTERFACE!{interface IXmlDocument(IXmlDocumentVtbl): IInspectable(IInspectableVtbl) [IID_IXmlDocument] { + fn get_Doctype(&mut self, out: *mut *mut XmlDocumentType) -> HRESULT, + fn get_Implementation(&mut self, out: *mut *mut XmlDomImplementation) -> HRESULT, + fn get_DocumentElement(&mut self, out: *mut *mut XmlElement) -> HRESULT, + fn CreateElement(&mut self, tagName: HSTRING, out: *mut *mut XmlElement) -> HRESULT, + fn CreateDocumentFragment(&mut self, out: *mut *mut XmlDocumentFragment) -> HRESULT, + fn CreateTextNode(&mut self, data: HSTRING, out: *mut *mut XmlText) -> HRESULT, + fn CreateComment(&mut self, data: HSTRING, out: *mut *mut XmlComment) -> HRESULT, + fn CreateProcessingInstruction(&mut self, target: HSTRING, data: HSTRING, out: *mut *mut XmlProcessingInstruction) -> HRESULT, + fn CreateAttribute(&mut self, name: HSTRING, out: *mut *mut XmlAttribute) -> HRESULT, + fn CreateEntityReference(&mut self, name: HSTRING, out: *mut *mut XmlEntityReference) -> HRESULT, + fn GetElementsByTagName(&mut self, tagName: HSTRING, out: *mut *mut XmlNodeList) -> HRESULT, + fn CreateCDataSection(&mut self, data: HSTRING, out: *mut *mut XmlCDataSection) -> HRESULT, + fn get_DocumentUri(&mut self, out: *mut HSTRING) -> HRESULT, + fn CreateAttributeNS(&mut self, namespaceUri: *mut IInspectable, qualifiedName: HSTRING, out: *mut *mut XmlAttribute) -> HRESULT, + fn CreateElementNS(&mut self, namespaceUri: *mut IInspectable, qualifiedName: HSTRING, out: *mut *mut XmlElement) -> HRESULT, + fn GetElementById(&mut self, elementId: HSTRING, out: *mut *mut XmlElement) -> HRESULT, + fn ImportNode(&mut self, node: *mut IXmlNode, deep: bool, out: *mut *mut IXmlNode) -> HRESULT + }} + impl IXmlDocument { + #[inline] pub unsafe fn get_doctype(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_Doctype)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + #[inline] pub unsafe fn get_implementation(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Implementation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn get_document_element(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).get_DocumentElement)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_system_history_async(&mut self, fromTime: super::super::foundation::DateTime) -> Result>>> { + #[inline] pub unsafe fn create_element(&mut self, tagName: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSystemHistoryAsync)(self, fromTime, &mut out); + let hr = ((*self.lpVtbl).CreateElement)(self, tagName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_system_history_with_duration_async(&mut self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { + #[inline] pub unsafe fn create_document_fragment(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSystemHistoryWithDurationAsync)(self, fromTime, duration, &mut out); + let hr = ((*self.lpVtbl).CreateDocumentFragment)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class ActivitySensor: IActivitySensor} - RT_ACTIVATABLE!{IActivitySensorStatics [CLSID_ActivitySensor]} - DEFINE_CLSID!(CLSID_ActivitySensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,65,99,116,105,118,105,116,121,83,101,110,115,111,114,0]); - RT_CLASS!{class ActivitySensorReading: IActivitySensorReading} - DEFINE_IID!(IID_IActivitySensor, 3447350028, 64351, 18667, 176, 155, 162, 112, 141, 28, 97, 239); - RT_INTERFACE!{interface IActivitySensor(IActivitySensorVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensor] { - fn GetCurrentReadingAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn get_SubscribedActivities(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_PowerInMilliwatts(&mut self, out: *mut f64) -> HRESULT, - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_SupportedActivities(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IActivitySensor { - #[inline] pub unsafe fn get_current_reading_async(&mut self) -> Result>> { + #[inline] pub unsafe fn create_text_node(&mut self, data: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReadingAsync)(self, &mut out); + let hr = ((*self.lpVtbl).CreateTextNode)(self, data.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_subscribed_activities(&mut self) -> Result>> { + #[inline] pub unsafe fn create_comment(&mut self, data: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SubscribedActivities)(self, &mut out); + let hr = ((*self.lpVtbl).CreateComment)(self, data.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_power_in_milliwatts(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PowerInMilliwatts)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn create_processing_instruction(&mut self, target: &HStringArg, data: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateProcessingInstruction)(self, target.get(), data.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn create_attribute(&mut self, name: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).CreateAttribute)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_entity_reference(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateEntityReference)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_elements_by_tag_name(&mut self, tagName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetElementsByTagName)(self, tagName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_cdata_section(&mut self, data: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCDataSection)(self, data.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_document_uri(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DocumentUri)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_activities(&mut self) -> Result>> { + #[inline] pub unsafe fn create_attribute_ns(&mut self, namespaceUri: &IInspectable, qualifiedName: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedActivities)(self, &mut out); + let hr = ((*self.lpVtbl).CreateAttributeNS)(self, namespaceUri as *const _ as *mut _, qualifiedName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn create_element_ns(&mut self, namespaceUri: &IInspectable, qualifiedName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateElementNS)(self, namespaceUri as *const _ as *mut _, qualifiedName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_element_by_id(&mut self, elementId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetElementById)(self, elementId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn import_node(&mut self, node: &IXmlNode, deep: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportNode)(self, node as *const _ as *mut _, deep, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class ActivitySensorReadingChangedEventArgs: IActivitySensorReadingChangedEventArgs} - DEFINE_IID!(IID_IActivitySensorReading, 2232572566, 5234, 16546, 178, 174, 225, 239, 41, 34, 108, 120); - RT_INTERFACE!{interface IActivitySensorReading(IActivitySensorReadingVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorReading] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_Activity(&mut self, out: *mut ActivityType) -> HRESULT, - fn get_Confidence(&mut self, out: *mut ActivitySensorReadingConfidence) -> HRESULT - }} - impl IActivitySensorReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + RT_CLASS!{class XmlDocumentType: IXmlDocumentType} + RT_CLASS!{class XmlDomImplementation: IXmlDomImplementation} + RT_CLASS!{class XmlElement: IXmlElement} + RT_CLASS!{class XmlDocumentFragment: IXmlDocumentFragment} + RT_CLASS!{class XmlText: IXmlText} + RT_CLASS!{class XmlComment: IXmlComment} + RT_CLASS!{class XmlProcessingInstruction: IXmlProcessingInstruction} + RT_CLASS!{class XmlEntityReference: IXmlEntityReference} + RT_CLASS!{class XmlCDataSection: IXmlCDataSection} + DEFINE_IID!(IID_IXmlNamedNodeMap, 3014041264, 43696, 19330, 166, 250, 177, 69, 63, 124, 2, 27); + RT_INTERFACE!{interface IXmlNamedNodeMap(IXmlNamedNodeMapVtbl): IInspectable(IInspectableVtbl) [IID_IXmlNamedNodeMap] { + fn get_Length(&mut self, out: *mut u32) -> HRESULT, + fn Item(&mut self, index: u32, out: *mut *mut IXmlNode) -> HRESULT, + fn GetNamedItem(&mut self, name: HSTRING, out: *mut *mut IXmlNode) -> HRESULT, + fn SetNamedItem(&mut self, node: *mut IXmlNode, out: *mut *mut IXmlNode) -> HRESULT, + fn RemoveNamedItem(&mut self, name: HSTRING, out: *mut *mut IXmlNode) -> HRESULT, + fn GetNamedItemNS(&mut self, namespaceUri: *mut IInspectable, name: HSTRING, out: *mut *mut IXmlNode) -> HRESULT, + fn RemoveNamedItemNS(&mut self, namespaceUri: *mut IInspectable, name: HSTRING, out: *mut *mut IXmlNode) -> HRESULT, + fn SetNamedItemNS(&mut self, node: *mut IXmlNode, out: *mut *mut IXmlNode) -> HRESULT + }} + impl IXmlNamedNodeMap { + #[inline] pub unsafe fn get_length(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_activity(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Activity)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn item(&mut self, index: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Item)(self, index, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_confidence(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Confidence)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_named_item(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNamedItem)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IActivitySensorReadingChangedEventArgs, 3728238359, 44726, 20167, 148, 106, 217, 204, 25, 185, 81, 236); - RT_INTERFACE!{interface IActivitySensorReadingChangedEventArgs(IActivitySensorReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut ActivitySensorReading) -> HRESULT - }} - impl IActivitySensorReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + #[inline] pub unsafe fn set_named_item(&mut self, node: &IXmlNode) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + let hr = ((*self.lpVtbl).SetNamedItem)(self, node as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IActivitySensorReadingChangeReport, 1329342741, 55611, 18365, 150, 10, 242, 15, 178, 243, 34, 185); - RT_INTERFACE!{interface IActivitySensorReadingChangeReport(IActivitySensorReadingChangeReportVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorReadingChangeReport] { - fn get_Reading(&mut self, out: *mut *mut ActivitySensorReading) -> HRESULT - }} - impl IActivitySensorReadingChangeReport { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + #[inline] pub unsafe fn remove_named_item(&mut self, name: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + let hr = ((*self.lpVtbl).RemoveNamedItem)(self, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IActivitySensorTriggerDetails, 748578322, 47562, 18039, 178, 99, 36, 50, 151, 247, 157, 58); - RT_INTERFACE!{interface IActivitySensorTriggerDetails(IActivitySensorTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorTriggerDetails] { - fn ReadReports(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT - }} - impl IActivitySensorTriggerDetails { - #[inline] pub unsafe fn read_reports(&mut self) -> Result>> { + #[inline] pub unsafe fn get_named_item_ns(&mut self, namespaceUri: &IInspectable, name: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ReadReports)(self, &mut out); + let hr = ((*self.lpVtbl).GetNamedItemNS)(self, namespaceUri as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class ActivitySensorReadingChangeReport: IActivitySensorReadingChangeReport} - RT_CLASS!{class ActivitySensorTriggerDetails: IActivitySensorTriggerDetails} - DEFINE_IID!(IID_IBarometerStatics, 678110986, 739, 20358, 132, 252, 253, 216, 146, 181, 148, 15); - RT_INTERFACE!{static interface IBarometerStatics(IBarometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBarometerStatics] { - fn GetDefault(&mut self, out: *mut *mut Barometer) -> HRESULT - }} - impl IBarometerStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + #[inline] pub unsafe fn remove_named_item_ns(&mut self, namespaceUri: &IInspectable, name: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + let hr = ((*self.lpVtbl).RemoveNamedItemNS)(self, namespaceUri as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class Barometer: IBarometer} - RT_ACTIVATABLE!{IBarometerStatics [CLSID_Barometer]} - DEFINE_CLSID!(CLSID_Barometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,66,97,114,111,109,101,116,101,114,0]); - DEFINE_IID!(IID_IBarometer, 2470737320, 30911, 17711, 176, 23, 240, 32, 156, 230, 218, 180); - RT_INTERFACE!{interface IBarometer(IBarometerVtbl): IInspectable(IInspectableVtbl) [IID_IBarometer] { - fn GetCurrentReading(&mut self, out: *mut *mut BarometerReading) -> HRESULT, - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IBarometer { - #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + #[inline] pub unsafe fn set_named_item_ns(&mut self, node: &IXmlNode) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + let hr = ((*self.lpVtbl).SetNamedItemNS)(self, node as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + } + DEFINE_IID!(IID_IXmlNodeList, 2355146103, 33700, 20161, 156, 84, 123, 164, 41, 225, 61, 166); + RT_INTERFACE!{interface IXmlNodeList(IXmlNodeListVtbl): IInspectable(IInspectableVtbl) [IID_IXmlNodeList] { + fn get_Length(&mut self, out: *mut u32) -> HRESULT, + fn Item(&mut self, index: u32, out: *mut *mut IXmlNode) -> HRESULT + }} + impl IXmlNodeList { + #[inline] pub unsafe fn get_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn item(&mut self, index: u32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).Item)(self, index, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + } + DEFINE_IID!(IID_IXmlLoadSettings, 1487538088, 65238, 18167, 180, 197, 251, 27, 167, 33, 8, 214); + RT_INTERFACE!{interface IXmlLoadSettings(IXmlLoadSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IXmlLoadSettings] { + fn get_MaxElementDepth(&mut self, out: *mut u32) -> HRESULT, + fn put_MaxElementDepth(&mut self, value: u32) -> HRESULT, + fn get_ProhibitDtd(&mut self, out: *mut bool) -> HRESULT, + fn put_ProhibitDtd(&mut self, value: bool) -> HRESULT, + fn get_ResolveExternals(&mut self, out: *mut bool) -> HRESULT, + fn put_ResolveExternals(&mut self, value: bool) -> HRESULT, + fn get_ValidateOnParse(&mut self, out: *mut bool) -> HRESULT, + fn put_ValidateOnParse(&mut self, value: bool) -> HRESULT, + fn get_ElementContentWhiteSpace(&mut self, out: *mut bool) -> HRESULT, + fn put_ElementContentWhiteSpace(&mut self, value: bool) -> HRESULT + }} + impl IXmlLoadSettings { + #[inline] pub unsafe fn get_max_element_depth(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxElementDepth)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + #[inline] pub unsafe fn set_max_element_depth(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxElementDepth)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + #[inline] pub unsafe fn get_prohibit_dtd(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).get_ProhibitDtd)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn set_prohibit_dtd(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProhibitDtd)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_resolve_externals(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_ResolveExternals)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + #[inline] pub unsafe fn set_resolve_externals(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ResolveExternals)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class BarometerReading: IBarometerReading} - RT_CLASS!{class BarometerReadingChangedEventArgs: IBarometerReadingChangedEventArgs} - DEFINE_IID!(IID_IBarometerReading, 4122596070, 7670, 18970, 167, 173, 50, 29, 79, 93, 178, 71); - RT_INTERFACE!{interface IBarometerReading(IBarometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IBarometerReading] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_StationPressureInHectopascals(&mut self, out: *mut f64) -> HRESULT - }} - impl IBarometerReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + #[inline] pub unsafe fn get_validate_on_parse(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_ValidateOnParse)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_station_pressure_in_hectopascals(&mut self) -> Result { + #[inline] pub unsafe fn set_validate_on_parse(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ValidateOnParse)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_element_content_white_space(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_StationPressureInHectopascals)(self, &mut out); + let hr = ((*self.lpVtbl).get_ElementContentWhiteSpace)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } + #[inline] pub unsafe fn set_element_content_white_space(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ElementContentWhiteSpace)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - DEFINE_IID!(IID_IBarometerReadingChangedEventArgs, 1032098911, 891, 16463, 155, 187, 98, 50, 214, 149, 67, 195); - RT_INTERFACE!{interface IBarometerReadingChangedEventArgs(IBarometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBarometerReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut BarometerReading) -> HRESULT + DEFINE_IID!(IID_IXmlDocumentIO, 1825630030, 61029, 17545, 158, 191, 202, 67, 232, 123, 166, 55); + RT_INTERFACE!{interface IXmlDocumentIO(IXmlDocumentIOVtbl): IInspectable(IInspectableVtbl) [IID_IXmlDocumentIO] { + fn LoadXml(&mut self, xml: HSTRING) -> HRESULT, + fn LoadXmlWithSettings(&mut self, xml: HSTRING, loadSettings: *mut XmlLoadSettings) -> HRESULT, + #[cfg(feature="windows.storage")] fn SaveToFileAsync(&mut self, file: *mut ::rt::gen::windows::storage::IStorageFile, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT }} - impl IBarometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + impl IXmlDocumentIO { + #[inline] pub unsafe fn load_xml(&mut self, xml: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).LoadXml)(self, xml.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn load_xml_with_settings(&mut self, xml: &HStringArg, loadSettings: &XmlLoadSettings) -> Result<()> { + let hr = ((*self.lpVtbl).LoadXmlWithSettings)(self, xml.get(), loadSettings as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn save_to_file_async(&mut self, file: &::rt::gen::windows::storage::IStorageFile) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + let hr = ((*self.lpVtbl).SaveToFileAsync)(self, file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_ENUM! { enum PedometerStepKind: i32 { - Unknown (PedometerStepKind_Unknown) = 0, Walking (PedometerStepKind_Walking) = 1, Running (PedometerStepKind_Running) = 2, - }} - DEFINE_IID!(IID_IPedometerReading, 575003892, 43233, 17199, 137, 106, 190, 13, 217, 176, 45, 36); - RT_INTERFACE!{interface IPedometerReading(IPedometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IPedometerReading] { - fn get_StepKind(&mut self, out: *mut PedometerStepKind) -> HRESULT, - fn get_CumulativeSteps(&mut self, out: *mut i32) -> HRESULT, - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_CumulativeStepsDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + RT_CLASS!{class XmlLoadSettings: IXmlLoadSettings} + DEFINE_IID!(IID_IXmlDocumentIO2, 1560495713, 31704, 19157, 158, 191, 129, 230, 52, 114, 99, 177); + RT_INTERFACE!{interface IXmlDocumentIO2(IXmlDocumentIO2Vtbl): IInspectable(IInspectableVtbl) [IID_IXmlDocumentIO2] { + #[cfg(feature="windows.storage")] fn LoadXmlFromBuffer(&mut self, buffer: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn LoadXmlFromBufferWithSettings(&mut self, buffer: *mut ::rt::gen::windows::storage::streams::IBuffer, loadSettings: *mut XmlLoadSettings) -> HRESULT }} - impl IPedometerReading { - #[inline] pub unsafe fn get_step_kind(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_StepKind)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cumulative_steps(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CumulativeSteps)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IXmlDocumentIO2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_xml_from_buffer(&mut self, buffer: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).LoadXmlFromBuffer)(self, buffer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_cumulative_steps_duration(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CumulativeStepsDuration)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_xml_from_buffer_with_settings(&mut self, buffer: &::rt::gen::windows::storage::streams::IBuffer, loadSettings: &XmlLoadSettings) -> Result<()> { + let hr = ((*self.lpVtbl).LoadXmlFromBufferWithSettings)(self, buffer as *const _ as *mut _, loadSettings as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IPedometerReadingChangedEventArgs, 4166378622, 43964, 17494, 134, 168, 37, 207, 43, 51, 55, 66); - RT_INTERFACE!{interface IPedometerReadingChangedEventArgs(IPedometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPedometerReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut PedometerReading) -> HRESULT + DEFINE_IID!(IID_IXmlDocumentStatics, 1430508116, 55127, 19321, 149, 57, 35, 43, 24, 245, 11, 241); + RT_INTERFACE!{static interface IXmlDocumentStatics(IXmlDocumentStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IXmlDocumentStatics] { + fn LoadFromUriAsync(&mut self, uri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn LoadFromUriWithSettingsAsync(&mut self, uri: *mut ::rt::gen::windows::foundation::Uri, loadSettings: *mut XmlLoadSettings, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn LoadFromFileAsync(&mut self, file: *mut ::rt::gen::windows::storage::IStorageFile, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn LoadFromFileWithSettingsAsync(&mut self, file: *mut ::rt::gen::windows::storage::IStorageFile, loadSettings: *mut XmlLoadSettings, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT }} - impl IPedometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + impl IXmlDocumentStatics { + #[inline] pub unsafe fn load_from_uri_async(&mut self, uri: &::rt::gen::windows::foundation::Uri) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + let hr = ((*self.lpVtbl).LoadFromUriAsync)(self, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn load_from_uri_with_settings_async(&mut self, uri: &::rt::gen::windows::foundation::Uri, loadSettings: &XmlLoadSettings) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadFromUriWithSettingsAsync)(self, uri as *const _ as *mut _, loadSettings as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_from_file_async(&mut self, file: &::rt::gen::windows::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadFromFileAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_from_file_with_settings_async(&mut self, file: &::rt::gen::windows::storage::IStorageFile, loadSettings: &XmlLoadSettings) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadFromFileWithSettingsAsync)(self, file as *const _ as *mut _, loadSettings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PedometerReading: IPedometerReading} - DEFINE_IID!(IID_IPedometerStatics, 2191002159, 16515, 19963, 180, 17, 147, 142, 160, 244, 185, 70); - RT_INTERFACE!{static interface IPedometerStatics(IPedometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPedometerStatics] { - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn GetSystemHistoryAsync(&mut self, fromTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetSystemHistoryWithDurationAsync(&mut self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + RT_CLASS!{class DtdNotation: IDtdNotation} + RT_CLASS!{class DtdEntity: IDtdEntity} +} // Windows.Data.Xml.Dom +pub mod xsl { // Windows.Data.Xml.Xsl +use ::prelude::*; + DEFINE_IID!(IID_IXsltProcessor, 2070179903, 21772, 18630, 169, 15, 147, 165, 185, 100, 81, 143); + RT_INTERFACE!{interface IXsltProcessor(IXsltProcessorVtbl): IInspectable(IInspectableVtbl) [IID_IXsltProcessor] { + fn TransformToString(&mut self, inputNode: *mut super::dom::IXmlNode, out: *mut HSTRING) -> HRESULT }} - impl IPedometerStatics { - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + impl IXsltProcessor { + #[inline] pub unsafe fn transform_to_string(&mut self, inputNode: &super::dom::IXmlNode) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).TransformToString)(self, inputNode as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IXsltProcessor2, 2376358998, 38821, 17611, 168, 190, 39, 216, 98, 128, 199, 10); + RT_INTERFACE!{interface IXsltProcessor2(IXsltProcessor2Vtbl): IInspectable(IInspectableVtbl) [IID_IXsltProcessor2] { + fn TransformToDocument(&mut self, inputNode: *mut super::dom::IXmlNode, out: *mut *mut super::dom::XmlDocument) -> HRESULT + }} + impl IXsltProcessor2 { + #[inline] pub unsafe fn transform_to_document(&mut self, inputNode: &super::dom::IXmlNode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TransformToDocument)(self, inputNode as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + } + DEFINE_IID!(IID_IXsltProcessorFactory, 658589376, 39505, 18019, 191, 48, 14, 247, 66, 20, 111, 32); + RT_INTERFACE!{static interface IXsltProcessorFactory(IXsltProcessorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IXsltProcessorFactory] { + fn CreateInstance(&mut self, document: *mut super::dom::XmlDocument, out: *mut *mut XsltProcessor) -> HRESULT + }} + impl IXsltProcessorFactory { + #[inline] pub unsafe fn create_instance(&mut self, document: &super::dom::XmlDocument) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + let hr = ((*self.lpVtbl).CreateInstance)(self, document as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + } + RT_CLASS!{class XsltProcessor: IXsltProcessor [IXsltProcessorFactory] [CLSID_XsltProcessor]} + DEFINE_CLSID!(CLSID_XsltProcessor = &[87,105,110,100,111,119,115,46,68,97,116,97,46,88,109,108,46,88,115,108,46,88,115,108,116,80,114,111,99,101,115,115,111,114,0]); +} // Windows.Data.Xml.Xsl +} // Windows.Data.Xml +} // Windows.Data +#[cfg(feature="windows.devices")] +pub mod devices { // Windows.Devices +use ::prelude::*; + RT_STRUCT! { struct DevicesLowLevelContract { + + }} + DEFINE_IID!(IID_ILowLevelDevicesAggregateProvider, 2805880348, 43713, 20167, 168, 82, 71, 159, 112, 96, 208, 31); + RT_INTERFACE!{interface ILowLevelDevicesAggregateProvider(ILowLevelDevicesAggregateProviderVtbl): IInspectable(IInspectableVtbl) [IID_ILowLevelDevicesAggregateProvider] { + fn get_AdcControllerProvider(&mut self, out: *mut *mut adc::provider::IAdcControllerProvider) -> HRESULT, + fn get_PwmControllerProvider(&mut self, out: *mut *mut pwm::provider::IPwmControllerProvider) -> HRESULT, + fn get_GpioControllerProvider(&mut self, out: *mut *mut gpio::provider::IGpioControllerProvider) -> HRESULT, + fn get_I2cControllerProvider(&mut self, out: *mut *mut i2c::provider::II2cControllerProvider) -> HRESULT, + fn get_SpiControllerProvider(&mut self, out: *mut *mut spi::provider::ISpiControllerProvider) -> HRESULT + }} + impl ILowLevelDevicesAggregateProvider { + #[inline] pub unsafe fn get_adc_controller_provider(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AdcControllerProvider)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_system_history_async(&mut self, fromTime: super::super::foundation::DateTime) -> Result>>> { + #[inline] pub unsafe fn get_pwm_controller_provider(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSystemHistoryAsync)(self, fromTime, &mut out); + let hr = ((*self.lpVtbl).get_PwmControllerProvider)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_system_history_with_duration_async(&mut self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { + #[inline] pub unsafe fn get_gpio_controller_provider(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSystemHistoryWithDurationAsync)(self, fromTime, duration, &mut out); + let hr = ((*self.lpVtbl).get_GpioControllerProvider)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class Pedometer: IPedometer} - RT_ACTIVATABLE!{IPedometerStatics2 [CLSID_Pedometer]} - RT_ACTIVATABLE!{IPedometerStatics [CLSID_Pedometer]} - DEFINE_CLSID!(CLSID_Pedometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,80,101,100,111,109,101,116,101,114,0]); - DEFINE_IID!(IID_IPedometerStatics2, 2046150331, 52750, 16691, 180, 126, 134, 39, 234, 114, 246, 119); - RT_INTERFACE!{static interface IPedometerStatics2(IPedometerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IPedometerStatics2] { - fn GetReadingsFromTriggerDetails(&mut self, triggerDetails: *mut SensorDataThresholdTriggerDetails, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT - }} - impl IPedometerStatics2 { - #[inline] pub unsafe fn get_readings_from_trigger_details(&mut self, triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>> { + #[inline] pub unsafe fn get_i2c_controller_provider(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetReadingsFromTriggerDetails)(self, triggerDetails as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_I2cControllerProvider)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_spi_controller_provider(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SpiControllerProvider)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPedometer2, 3852732127, 11137, 19165, 178, 255, 119, 171, 108, 152, 186, 25); - RT_INTERFACE!{interface IPedometer2(IPedometer2Vtbl): IInspectable(IInspectableVtbl) [IID_IPedometer2] { - fn GetCurrentReadings(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + DEFINE_IID!(IID_ILowLevelDevicesAggregateProviderFactory, 2596580086, 13427, 18014, 150, 213, 54, 40, 26, 44, 87, 175); + RT_INTERFACE!{static interface ILowLevelDevicesAggregateProviderFactory(ILowLevelDevicesAggregateProviderFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ILowLevelDevicesAggregateProviderFactory] { + fn Create(&mut self, adc: *mut adc::provider::IAdcControllerProvider, pwm: *mut pwm::provider::IPwmControllerProvider, gpio: *mut gpio::provider::IGpioControllerProvider, i2c: *mut i2c::provider::II2cControllerProvider, spi: *mut spi::provider::ISpiControllerProvider, out: *mut *mut LowLevelDevicesAggregateProvider) -> HRESULT }} - impl IPedometer2 { - #[inline] pub unsafe fn get_current_readings(&mut self) -> Result>> { + impl ILowLevelDevicesAggregateProviderFactory { + #[inline] pub unsafe fn create(&mut self, adc: &adc::provider::IAdcControllerProvider, pwm: &pwm::provider::IPwmControllerProvider, gpio: &gpio::provider::IGpioControllerProvider, i2c: &i2c::provider::II2cControllerProvider, spi: &spi::provider::ISpiControllerProvider) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReadings)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, adc as *const _ as *mut _, pwm as *const _ as *mut _, gpio as *const _ as *mut _, i2c as *const _ as *mut _, spi as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IPedometer, 2585657661, 15768, 17912, 137, 32, 142, 78, 202, 202, 95, 151); - RT_INTERFACE!{interface IPedometer(IPedometerVtbl): IInspectable(IInspectableVtbl) [IID_IPedometer] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_PowerInMilliwatts(&mut self, out: *mut f64) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class LowLevelDevicesAggregateProvider: ILowLevelDevicesAggregateProvider [ILowLevelDevicesAggregateProviderFactory] [CLSID_LowLevelDevicesAggregateProvider]} + DEFINE_CLSID!(CLSID_LowLevelDevicesAggregateProvider = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,76,111,119,76,101,118,101,108,68,101,118,105,99,101,115,65,103,103,114,101,103,97,116,101,80,114,111,118,105,100,101,114,0]); + DEFINE_IID!(IID_ILowLevelDevicesController, 784481748, 6043, 17886, 155, 57, 58, 224, 37, 39, 222, 82); + RT_INTERFACE!{interface ILowLevelDevicesController(ILowLevelDevicesControllerVtbl): IInspectable(IInspectableVtbl) [IID_ILowLevelDevicesController] { + }} - impl IPedometer { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + DEFINE_IID!(IID_ILowLevelDevicesControllerStatics, 155095658, 64715, 17300, 166, 151, 25, 222, 99, 124, 45, 179); + RT_INTERFACE!{static interface ILowLevelDevicesControllerStatics(ILowLevelDevicesControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILowLevelDevicesControllerStatics] { + fn get_DefaultProvider(&mut self, out: *mut *mut ILowLevelDevicesAggregateProvider) -> HRESULT, + fn put_DefaultProvider(&mut self, value: *mut ILowLevelDevicesAggregateProvider) -> HRESULT + }} + impl ILowLevelDevicesControllerStatics { + #[inline] pub unsafe fn get_default_provider(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DefaultProvider)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_power_in_milliwatts(&mut self) -> Result { + #[inline] pub unsafe fn set_default_provider(&mut self, value: &ILowLevelDevicesAggregateProvider) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultProvider)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class LowLevelDevicesController: ILowLevelDevicesController} + RT_ACTIVATABLE!{ILowLevelDevicesControllerStatics [CLSID_LowLevelDevicesController]} + DEFINE_CLSID!(CLSID_LowLevelDevicesController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,76,111,119,76,101,118,101,108,68,101,118,105,99,101,115,67,111,110,116,114,111,108,108,101,114,0]); +pub mod adc { // Windows.Devices.Adc +use ::prelude::*; + RT_ENUM! { enum AdcChannelMode: i32 { + SingleEnded (AdcChannelMode_SingleEnded) = 0, Differential (AdcChannelMode_Differential) = 1, + }} + DEFINE_IID!(IID_IAdcController, 712434864, 43158, 16921, 134, 182, 234, 140, 220, 233, 143, 86); + RT_INTERFACE!{interface IAdcController(IAdcControllerVtbl): IInspectable(IInspectableVtbl) [IID_IAdcController] { + fn get_ChannelCount(&mut self, out: *mut i32) -> HRESULT, + fn get_ResolutionInBits(&mut self, out: *mut i32) -> HRESULT, + fn get_MinValue(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxValue(&mut self, out: *mut i32) -> HRESULT, + fn get_ChannelMode(&mut self, out: *mut AdcChannelMode) -> HRESULT, + fn put_ChannelMode(&mut self, value: AdcChannelMode) -> HRESULT, + fn IsChannelModeSupported(&mut self, channelMode: AdcChannelMode, out: *mut bool) -> HRESULT, + fn OpenChannel(&mut self, channelNumber: i32, out: *mut *mut AdcChannel) -> HRESULT + }} + impl IAdcController { + #[inline] pub unsafe fn get_channel_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PowerInMilliwatts)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChannelCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + #[inline] pub unsafe fn get_resolution_in_bits(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).get_ResolutionInBits)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_min_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + #[inline] pub unsafe fn get_max_value(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxValue)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_channel_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_ChannelMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + #[inline] pub unsafe fn set_channel_mode(&mut self, value: AdcChannelMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ChannelMode)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } + #[inline] pub unsafe fn is_channel_mode_supported(&mut self, channelMode: AdcChannelMode) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsChannelModeSupported)(self, channelMode, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn open_channel(&mut self, channelNumber: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenChannel)(self, channelNumber, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } } - RT_CLASS!{class PedometerReadingChangedEventArgs: IPedometerReadingChangedEventArgs} - DEFINE_IID!(IID_IPedometerDataThresholdFactory, 3417149264, 31316, 18027, 144, 16, 119, 161, 98, 252, 165, 215); - RT_INTERFACE!{static interface IPedometerDataThresholdFactory(IPedometerDataThresholdFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPedometerDataThresholdFactory] { - fn Create(&mut self, sensor: *mut Pedometer, stepGoal: i32, out: *mut *mut PedometerDataThreshold) -> HRESULT + RT_CLASS!{class AdcChannel: IAdcChannel} + DEFINE_IID!(IID_IAdcControllerStatics, 3437858316, 504, 18577, 188, 59, 190, 83, 239, 39, 156, 164); + RT_INTERFACE!{static interface IAdcControllerStatics(IAdcControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAdcControllerStatics] { + fn GetControllersAsync(&mut self, provider: *mut provider::IAdcProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT }} - impl IPedometerDataThresholdFactory { - #[inline] pub unsafe fn create(&mut self, sensor: &Pedometer, stepGoal: i32) -> Result> { + impl IAdcControllerStatics { + #[inline] pub unsafe fn get_controllers_async(&mut self, provider: &provider::IAdcProvider) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, sensor as *const _ as *mut _, stepGoal, &mut out); + let hr = ((*self.lpVtbl).GetControllersAsync)(self, provider as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class PedometerDataThreshold: ISensorDataThreshold [IPedometerDataThresholdFactory] [CLSID_PedometerDataThreshold]} - DEFINE_CLSID!(CLSID_PedometerDataThreshold = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,80,101,100,111,109,101,116,101,114,68,97,116,97,84,104,114,101,115,104,111,108,100,0]); - DEFINE_IID!(IID_IProximitySensorStatics, 689464905, 25193, 20055, 165, 173, 130, 190, 128, 129, 51, 146); - RT_INTERFACE!{static interface IProximitySensorStatics(IProximitySensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensorStatics] { - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn FromId(&mut self, sensorId: HSTRING, out: *mut *mut ProximitySensor) -> HRESULT + RT_CLASS!{class AdcController: IAdcController} + RT_ACTIVATABLE!{IAdcControllerStatics2 [CLSID_AdcController]} + RT_ACTIVATABLE!{IAdcControllerStatics [CLSID_AdcController]} + DEFINE_CLSID!(CLSID_AdcController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,100,99,46,65,100,99,67,111,110,116,114,111,108,108,101,114,0]); + DEFINE_IID!(IID_IAdcControllerStatics2, 2730048285, 38779, 20314, 165, 254, 166, 171, 175, 254, 100, 132); + RT_INTERFACE!{static interface IAdcControllerStatics2(IAdcControllerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdcControllerStatics2] { + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IProximitySensorStatics { - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + impl IAdcControllerStatics2 { + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id(&mut self, sensorId: &HStringArg) -> Result> { + } + DEFINE_IID!(IID_IAdcChannel, 67892244, 9608, 19030, 171, 239, 115, 162, 96, 172, 198, 10); + RT_INTERFACE!{interface IAdcChannel(IAdcChannelVtbl): IInspectable(IInspectableVtbl) [IID_IAdcChannel] { + fn get_Controller(&mut self, out: *mut *mut AdcController) -> HRESULT, + fn ReadValue(&mut self, out: *mut i32) -> HRESULT, + fn ReadRatio(&mut self, out: *mut f64) -> HRESULT + }} + impl IAdcChannel { + #[inline] pub unsafe fn get_controller(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromId)(self, sensorId.get(), &mut out); + let hr = ((*self.lpVtbl).get_Controller)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn read_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_ratio(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadRatio)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } } - RT_CLASS!{class ProximitySensor: IProximitySensor} - RT_ACTIVATABLE!{IProximitySensorStatics2 [CLSID_ProximitySensor]} - RT_ACTIVATABLE!{IProximitySensorStatics [CLSID_ProximitySensor]} - DEFINE_CLSID!(CLSID_ProximitySensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,80,114,111,120,105,109,105,116,121,83,101,110,115,111,114,0]); - DEFINE_IID!(IID_IProximitySensor, 1421899448, 60667, 18756, 185, 40, 116, 252, 80, 77, 71, 238); - RT_INTERFACE!{interface IProximitySensor(IProximitySensorVtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensor] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_MaxDistanceInMillimeters(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_MinDistanceInMillimeters(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn GetCurrentReading(&mut self, out: *mut *mut ProximitySensorReading) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn CreateDisplayOnOffController(&mut self, out: *mut *mut ProximitySensorDisplayOnOffController) -> HRESULT +pub mod provider { // Windows.Devices.Adc.Provider +use ::prelude::*; + RT_ENUM! { enum ProviderAdcChannelMode: i32 { + SingleEnded (ProviderAdcChannelMode_SingleEnded) = 0, Differential (ProviderAdcChannelMode_Differential) = 1, }} - impl IProximitySensor { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + DEFINE_IID!(IID_IAdcControllerProvider, 3193198632, 33133, 19941, 160, 72, 171, 160, 105, 88, 170, 168); + RT_INTERFACE!{interface IAdcControllerProvider(IAdcControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_IAdcControllerProvider] { + fn get_ChannelCount(&mut self, out: *mut i32) -> HRESULT, + fn get_ResolutionInBits(&mut self, out: *mut i32) -> HRESULT, + fn get_MinValue(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxValue(&mut self, out: *mut i32) -> HRESULT, + fn get_ChannelMode(&mut self, out: *mut ProviderAdcChannelMode) -> HRESULT, + fn put_ChannelMode(&mut self, value: ProviderAdcChannelMode) -> HRESULT, + fn IsChannelModeSupported(&mut self, channelMode: ProviderAdcChannelMode, out: *mut bool) -> HRESULT, + fn AcquireChannel(&mut self, channel: i32) -> HRESULT, + fn ReleaseChannel(&mut self, channel: i32) -> HRESULT, + fn ReadValue(&mut self, channelNumber: i32, out: *mut i32) -> HRESULT + }} + impl IAdcControllerProvider { + #[inline] pub unsafe fn get_channel_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ChannelCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_distance_in_millimeters(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_MaxDistanceInMillimeters)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_resolution_in_bits(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResolutionInBits)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_min_distance_in_millimeters(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_MinDistanceInMillimeters)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_min_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_max_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_channel_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_ChannelMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + #[inline] pub unsafe fn set_channel_mode(&mut self, value: ProviderAdcChannelMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ChannelMode)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn create_display_on_off_controller(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateDisplayOnOffController)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn is_channel_mode_supported(&mut self, channelMode: ProviderAdcChannelMode) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsChannelModeSupported)(self, channelMode, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn acquire_channel(&mut self, channel: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AcquireChannel)(self, channel); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn release_channel(&mut self, channel: i32) -> Result<()> { + let hr = ((*self.lpVtbl).ReleaseChannel)(self, channel); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn read_value(&mut self, channelNumber: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadValue)(self, channelNumber, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - RT_CLASS!{class ProximitySensorReading: IProximitySensorReading} - RT_CLASS!{class ProximitySensorReadingChangedEventArgs: IProximitySensorReadingChangedEventArgs} - RT_CLASS!{class ProximitySensorDisplayOnOffController: super::super::foundation::IClosable} - DEFINE_IID!(IID_IProximitySensorReadingChangedEventArgs, 3485660006, 50152, 16637, 140, 195, 103, 226, 137, 0, 73, 56); - RT_INTERFACE!{interface IProximitySensorReadingChangedEventArgs(IProximitySensorReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensorReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut ProximitySensorReading) -> HRESULT + DEFINE_IID!(IID_IAdcProvider, 680867432, 37721, 19543, 188, 136, 226, 117, 232, 22, 56, 201); + RT_INTERFACE!{interface IAdcProvider(IAdcProviderVtbl): IInspectable(IInspectableVtbl) [IID_IAdcProvider] { + fn GetControllers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT }} - impl IProximitySensorReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + impl IAdcProvider { + #[inline] pub unsafe fn get_controllers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + let hr = ((*self.lpVtbl).GetControllers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IProximitySensorReading, 1898089817, 4909, 19807, 143, 249, 47, 13, 184, 117, 28, 237); - RT_INTERFACE!{interface IProximitySensorReading(IProximitySensorReadingVtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensorReading] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_IsDetected(&mut self, out: *mut bool) -> HRESULT, - fn get_DistanceInMillimeters(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT +} // Windows.Devices.Adc.Provider +} // Windows.Devices.Adc +pub mod gpio { // Windows.Devices.Gpio +use ::prelude::*; + RT_ENUM! { enum GpioSharingMode: i32 { + Exclusive (GpioSharingMode_Exclusive) = 0, SharedReadOnly (GpioSharingMode_SharedReadOnly) = 1, }} - impl IProximitySensorReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + RT_ENUM! { enum GpioOpenStatus: i32 { + PinOpened (GpioOpenStatus_PinOpened) = 0, PinUnavailable (GpioOpenStatus_PinUnavailable) = 1, SharingViolation (GpioOpenStatus_SharingViolation) = 2, + }} + RT_ENUM! { enum GpioPinDriveMode: i32 { + Input (GpioPinDriveMode_Input) = 0, Output (GpioPinDriveMode_Output) = 1, InputPullUp (GpioPinDriveMode_InputPullUp) = 2, InputPullDown (GpioPinDriveMode_InputPullDown) = 3, OutputOpenDrain (GpioPinDriveMode_OutputOpenDrain) = 4, OutputOpenDrainPullUp (GpioPinDriveMode_OutputOpenDrainPullUp) = 5, OutputOpenSource (GpioPinDriveMode_OutputOpenSource) = 6, OutputOpenSourcePullDown (GpioPinDriveMode_OutputOpenSourcePullDown) = 7, + }} + RT_ENUM! { enum GpioPinValue: i32 { + Low (GpioPinValue_Low) = 0, High (GpioPinValue_High) = 1, + }} + RT_ENUM! { enum GpioPinEdge: i32 { + FallingEdge (GpioPinEdge_FallingEdge) = 0, RisingEdge (GpioPinEdge_RisingEdge) = 1, + }} + DEFINE_IID!(IID_IGpioPinValueChangedEventArgs, 825731809, 28733, 16473, 189, 36, 181, 178, 93, 255, 184, 78); + RT_INTERFACE!{interface IGpioPinValueChangedEventArgs(IGpioPinValueChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGpioPinValueChangedEventArgs] { + fn get_Edge(&mut self, out: *mut GpioPinEdge) -> HRESULT + }} + impl IGpioPinValueChangedEventArgs { + #[inline] pub unsafe fn get_edge(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_Edge)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_detected(&mut self) -> Result { + } + RT_CLASS!{class GpioPinValueChangedEventArgs: IGpioPinValueChangedEventArgs} + RT_CLASS!{class GpioPin: IGpioPin} + DEFINE_IID!(IID_IGpioController, 675287779, 29793, 18076, 168, 188, 97, 214, 157, 8, 165, 60); + RT_INTERFACE!{interface IGpioController(IGpioControllerVtbl): IInspectable(IInspectableVtbl) [IID_IGpioController] { + fn get_PinCount(&mut self, out: *mut i32) -> HRESULT, + fn OpenPin(&mut self, pinNumber: i32, out: *mut *mut GpioPin) -> HRESULT, + fn OpenPinWithSharingMode(&mut self, pinNumber: i32, sharingMode: GpioSharingMode, out: *mut *mut GpioPin) -> HRESULT, + fn TryOpenPin(&mut self, pinNumber: i32, sharingMode: GpioSharingMode, pin: *mut *mut GpioPin, openStatus: *mut GpioOpenStatus, out: *mut bool) -> HRESULT + }} + impl IGpioController { + #[inline] pub unsafe fn get_pin_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDetected)(self, &mut out); + let hr = ((*self.lpVtbl).get_PinCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_distance_in_millimeters(&mut self) -> Result>> { + #[inline] pub unsafe fn open_pin(&mut self, pinNumber: i32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DistanceInMillimeters)(self, &mut out); + let hr = ((*self.lpVtbl).OpenPin)(self, pinNumber, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IProximitySensorDataThresholdFactory, 2421866785, 27943, 19155, 157, 181, 100, 103, 242, 165, 173, 157); - RT_INTERFACE!{static interface IProximitySensorDataThresholdFactory(IProximitySensorDataThresholdFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensorDataThresholdFactory] { - fn Create(&mut self, sensor: *mut ProximitySensor, out: *mut *mut ProximitySensorDataThreshold) -> HRESULT - }} - impl IProximitySensorDataThresholdFactory { - #[inline] pub unsafe fn create(&mut self, sensor: &ProximitySensor) -> Result> { + #[inline] pub unsafe fn open_pin_with_sharing_mode(&mut self, pinNumber: i32, sharingMode: GpioSharingMode) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, sensor as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).OpenPinWithSharingMode)(self, pinNumber, sharingMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class ProximitySensorDataThreshold: ISensorDataThreshold [IProximitySensorDataThresholdFactory] [CLSID_ProximitySensorDataThreshold]} - DEFINE_CLSID!(CLSID_ProximitySensorDataThreshold = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,80,114,111,120,105,109,105,116,121,83,101,110,115,111,114,68,97,116,97,84,104,114,101,115,104,111,108,100,0]); - DEFINE_IID!(IID_IProximitySensorStatics2, 3421795246, 59850, 16943, 173, 103, 76, 61, 37, 223, 53, 12); - RT_INTERFACE!{static interface IProximitySensorStatics2(IProximitySensorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensorStatics2] { - fn GetReadingsFromTriggerDetails(&mut self, triggerDetails: *mut SensorDataThresholdTriggerDetails, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT - }} - impl IProximitySensorStatics2 { - #[inline] pub unsafe fn get_readings_from_trigger_details(&mut self, triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetReadingsFromTriggerDetails)(self, triggerDetails as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn try_open_pin(&mut self, pinNumber: i32, sharingMode: GpioSharingMode) -> Result<(ComPtr, GpioOpenStatus, bool)> { + let mut pin = null_mut(); let mut openStatus = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryOpenPin)(self, pinNumber, sharingMode, &mut pin, &mut openStatus, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(pin), openStatus, out)) } else { err(hr) } } } - DEFINE_IID!(IID_IAltimeterStatics, 2662651843, 58796, 18382, 142, 239, 211, 113, 129, 104, 192, 31); - RT_INTERFACE!{static interface IAltimeterStatics(IAltimeterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAltimeterStatics] { - fn GetDefault(&mut self, out: *mut *mut Altimeter) -> HRESULT + DEFINE_IID!(IID_IGpioControllerStatics, 785839150, 31479, 16662, 149, 51, 196, 61, 153, 161, 251, 100); + RT_INTERFACE!{static interface IGpioControllerStatics(IGpioControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGpioControllerStatics] { + fn GetDefault(&mut self, out: *mut *mut GpioController) -> HRESULT }} - impl IAltimeterStatics { - #[inline] pub unsafe fn get_default(&mut self) -> Result> { + impl IGpioControllerStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class Altimeter: IAltimeter} - RT_ACTIVATABLE!{IAltimeterStatics [CLSID_Altimeter]} - DEFINE_CLSID!(CLSID_Altimeter = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,65,108,116,105,109,101,116,101,114,0]); - DEFINE_IID!(IID_IAltimeter, 1928353789, 36612, 18929, 180, 167, 244, 227, 99, 183, 1, 162); - RT_INTERFACE!{interface IAltimeter(IAltimeterVtbl): IInspectable(IInspectableVtbl) [IID_IAltimeter] { - fn GetCurrentReading(&mut self, out: *mut *mut AltimeterReading) -> HRESULT, - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class GpioController: IGpioController} + RT_ACTIVATABLE!{IGpioControllerStatics2 [CLSID_GpioController]} + RT_ACTIVATABLE!{IGpioControllerStatics [CLSID_GpioController]} + DEFINE_CLSID!(CLSID_GpioController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,112,105,111,46,71,112,105,111,67,111,110,116,114,111,108,108,101,114,0]); + DEFINE_IID!(IID_IGpioControllerStatics2, 2435546400, 27812, 16646, 163, 115, 255, 253, 52, 107, 14, 91); + RT_INTERFACE!{static interface IGpioControllerStatics2(IGpioControllerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGpioControllerStatics2] { + fn GetControllersAsync(&mut self, provider: *mut provider::IGpioProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IAltimeter { - #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + impl IGpioControllerStatics2 { + #[inline] pub unsafe fn get_controllers_async(&mut self, provider: &provider::IGpioProvider) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + let hr = ((*self.lpVtbl).GetControllersAsync)(self, provider as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + } + DEFINE_IID!(IID_IGpioPin, 299479175, 44974, 18320, 158, 233, 224, 234, 201, 66, 210, 1); + RT_INTERFACE!{interface IGpioPin(IGpioPinVtbl): IInspectable(IInspectableVtbl) [IID_IGpioPin] { + fn add_ValueChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ValueChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_DebounceTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_DebounceTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_PinNumber(&mut self, out: *mut i32) -> HRESULT, + fn get_SharingMode(&mut self, out: *mut GpioSharingMode) -> HRESULT, + fn IsDriveModeSupported(&mut self, driveMode: GpioPinDriveMode, out: *mut bool) -> HRESULT, + fn GetDriveMode(&mut self, out: *mut GpioPinDriveMode) -> HRESULT, + fn SetDriveMode(&mut self, value: GpioPinDriveMode) -> HRESULT, + fn Write(&mut self, value: GpioPinValue) -> HRESULT, + fn Read(&mut self, out: *mut GpioPinValue) -> HRESULT + }} + impl IGpioPin { + #[inline] pub unsafe fn add_value_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).add_ValueChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + #[inline] pub unsafe fn remove_value_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ValueChanged)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_debounce_timeout(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_DebounceTimeout)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + #[inline] pub unsafe fn set_debounce_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_DebounceTimeout)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class AltimeterReading: IAltimeterReading} - RT_CLASS!{class AltimeterReadingChangedEventArgs: IAltimeterReadingChangedEventArgs} - DEFINE_IID!(IID_IAltimeterReading, 4226346867, 32606, 18632, 170, 26, 241, 243, 190, 252, 17, 68); - RT_INTERFACE!{interface IAltimeterReading(IAltimeterReadingVtbl): IInspectable(IInspectableVtbl) [IID_IAltimeterReading] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_AltitudeChangeInMeters(&mut self, out: *mut f64) -> HRESULT - }} - impl IAltimeterReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + #[inline] pub unsafe fn get_pin_number(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_PinNumber)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_altitude_change_in_meters(&mut self) -> Result { + #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AltitudeChangeInMeters)(self, &mut out); + let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IAltimeterReadingChangedEventArgs, 1885982839, 17517, 18423, 153, 140, 235, 194, 59, 69, 228, 162); - RT_INTERFACE!{interface IAltimeterReadingChangedEventArgs(IAltimeterReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAltimeterReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut AltimeterReading) -> HRESULT - }} - impl IAltimeterReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - } -pub mod custom { // Windows.Devices.Sensors.Custom -use ::prelude::*; - DEFINE_IID!(IID_ICustomSensorStatics, 2569032399, 62498, 19581, 131, 107, 231, 220, 116, 167, 18, 75); - RT_INTERFACE!{static interface ICustomSensorStatics(ICustomSensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICustomSensorStatics] { - fn GetDeviceSelector(&mut self, interfaceId: Guid, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, sensorId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT - }} - impl ICustomSensorStatics { - #[inline] pub unsafe fn get_device_selector(&mut self, interfaceId: Guid) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, interfaceId, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&mut self, sensorId: &HStringArg) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, sensorId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - } - RT_CLASS!{class CustomSensor: ICustomSensor} - RT_ACTIVATABLE!{ICustomSensorStatics [CLSID_CustomSensor]} - DEFINE_CLSID!(CLSID_CustomSensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,67,117,115,116,111,109,46,67,117,115,116,111,109,83,101,110,115,111,114,0]); - DEFINE_IID!(IID_ICustomSensor, 2704734637, 16436, 19277, 153, 221, 83, 26, 172, 100, 156, 9); - RT_INTERFACE!{interface ICustomSensor(ICustomSensorVtbl): IInspectable(IInspectableVtbl) [IID_ICustomSensor] { - fn GetCurrentReading(&mut self, out: *mut *mut CustomSensorReading) -> HRESULT, - fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn put_ReportInterval(&mut self, value: u32) -> HRESULT, - fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn add_ReadingChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT - }} - impl ICustomSensor { - #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + #[inline] pub unsafe fn is_drive_mode_supported(&mut self, driveMode: GpioPinDriveMode) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).IsDriveModeSupported)(self, driveMode, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + #[inline] pub unsafe fn get_drive_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + let hr = ((*self.lpVtbl).GetDriveMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_drive_mode(&mut self, value: GpioPinDriveMode) -> Result<()> { + let hr = ((*self.lpVtbl).SetDriveMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn remove_reading_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + #[inline] pub unsafe fn write(&mut self, value: GpioPinValue) -> Result<()> { + let hr = ((*self.lpVtbl).Write)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class CustomSensorReading: ICustomSensorReading} - RT_CLASS!{class CustomSensorReadingChangedEventArgs: ICustomSensorReadingChangedEventArgs} - DEFINE_IID!(IID_ICustomSensorReading, 1677741901, 17514, 17254, 168, 122, 95, 150, 50, 104, 236, 83); - RT_INTERFACE!{interface ICustomSensorReading(ICustomSensorReadingVtbl): IInspectable(IInspectableVtbl) [IID_ICustomSensorReading] { - fn get_Timestamp(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT - }} - impl ICustomSensorReading { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + #[inline] pub unsafe fn read(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).Read)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - } - DEFINE_IID!(IID_ICustomSensorReadingChangedEventArgs, 1797267491, 53245, 19649, 143, 240, 226, 24, 35, 215, 111, 204); - RT_INTERFACE!{interface ICustomSensorReadingChangedEventArgs(ICustomSensorReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICustomSensorReadingChangedEventArgs] { - fn get_Reading(&mut self, out: *mut *mut CustomSensorReading) -> HRESULT - }} - impl ICustomSensorReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } } -} // Windows.Devices.Sensors.Custom -} // Windows.Devices.Sensors -pub mod serialcommunication { // Windows.Devices.SerialCommunication +pub mod provider { // Windows.Devices.Gpio.Provider use ::prelude::*; - RT_ENUM! { enum SerialParity: i32 { - None (SerialParity_None) = 0, Odd (SerialParity_Odd) = 1, Even (SerialParity_Even) = 2, Mark (SerialParity_Mark) = 3, Space (SerialParity_Space) = 4, - }} - RT_ENUM! { enum SerialHandshake: i32 { - None (SerialHandshake_None) = 0, RequestToSend (SerialHandshake_RequestToSend) = 1, XOnXOff (SerialHandshake_XOnXOff) = 2, RequestToSendXOnXOff (SerialHandshake_RequestToSendXOnXOff) = 3, + RT_ENUM! { enum ProviderGpioSharingMode: i32 { + Exclusive (ProviderGpioSharingMode_Exclusive) = 0, SharedReadOnly (ProviderGpioSharingMode_SharedReadOnly) = 1, }} - RT_ENUM! { enum SerialStopBitCount: i32 { - One (SerialStopBitCount_One) = 0, OnePointFive (SerialStopBitCount_OnePointFive) = 1, Two (SerialStopBitCount_Two) = 2, + RT_ENUM! { enum ProviderGpioPinDriveMode: i32 { + Input (ProviderGpioPinDriveMode_Input) = 0, Output (ProviderGpioPinDriveMode_Output) = 1, InputPullUp (ProviderGpioPinDriveMode_InputPullUp) = 2, InputPullDown (ProviderGpioPinDriveMode_InputPullDown) = 3, OutputOpenDrain (ProviderGpioPinDriveMode_OutputOpenDrain) = 4, OutputOpenDrainPullUp (ProviderGpioPinDriveMode_OutputOpenDrainPullUp) = 5, OutputOpenSource (ProviderGpioPinDriveMode_OutputOpenSource) = 6, OutputOpenSourcePullDown (ProviderGpioPinDriveMode_OutputOpenSourcePullDown) = 7, }} - RT_ENUM! { enum SerialError: i32 { - Frame (SerialError_Frame) = 0, BufferOverrun (SerialError_BufferOverrun) = 1, ReceiveFull (SerialError_ReceiveFull) = 2, ReceiveParity (SerialError_ReceiveParity) = 3, TransmitFull (SerialError_TransmitFull) = 4, + RT_ENUM! { enum ProviderGpioPinValue: i32 { + Low (ProviderGpioPinValue_Low) = 0, High (ProviderGpioPinValue_High) = 1, }} - RT_ENUM! { enum SerialPinChange: i32 { - BreakSignal (SerialPinChange_BreakSignal) = 0, CarrierDetect (SerialPinChange_CarrierDetect) = 1, ClearToSend (SerialPinChange_ClearToSend) = 2, DataSetReady (SerialPinChange_DataSetReady) = 3, RingIndicator (SerialPinChange_RingIndicator) = 4, + RT_ENUM! { enum ProviderGpioPinEdge: i32 { + FallingEdge (ProviderGpioPinEdge_FallingEdge) = 0, RisingEdge (ProviderGpioPinEdge_RisingEdge) = 1, }} - DEFINE_IID!(IID_ISerialDeviceStatics, 93080176, 2102, 18835, 174, 26, 182, 26, 227, 190, 5, 107); - RT_INTERFACE!{static interface ISerialDeviceStatics(ISerialDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISerialDeviceStatics] { - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromPortName(&mut self, portName: HSTRING, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromUsbVidPid(&mut self, vendorId: u16, productId: u16, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + DEFINE_IID!(IID_IGpioPinProviderValueChangedEventArgsFactory, 1053494105, 22156, 17298, 178, 74, 138, 89, 169, 2, 177, 241); + RT_INTERFACE!{static interface IGpioPinProviderValueChangedEventArgsFactory(IGpioPinProviderValueChangedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGpioPinProviderValueChangedEventArgsFactory] { + fn Create(&mut self, edge: ProviderGpioPinEdge, out: *mut *mut GpioPinProviderValueChangedEventArgs) -> HRESULT }} - impl ISerialDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_port_name(&mut self, portName: &HStringArg) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromPortName)(self, portName.get(), &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_usb_vid_pid(&mut self, vendorId: u16, productId: u16) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromUsbVidPid)(self, vendorId, productId, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + impl IGpioPinProviderValueChangedEventArgsFactory { + #[inline] pub unsafe fn create(&mut self, edge: ProviderGpioPinEdge) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).Create)(self, edge, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class SerialDevice: ISerialDevice} - RT_ACTIVATABLE!{ISerialDeviceStatics [CLSID_SerialDevice]} - DEFINE_CLSID!(CLSID_SerialDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,114,105,97,108,67,111,109,109,117,110,105,99,97,116,105,111,110,46,83,101,114,105,97,108,68,101,118,105,99,101,0]); - RT_CLASS!{class ErrorReceivedEventArgs: IErrorReceivedEventArgs} - RT_CLASS!{class PinChangedEventArgs: IPinChangedEventArgs} - DEFINE_IID!(IID_IErrorReceivedEventArgs, 4240883545, 4739, 19850, 191, 223, 86, 107, 51, 221, 178, 143); - RT_INTERFACE!{interface IErrorReceivedEventArgs(IErrorReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IErrorReceivedEventArgs] { - fn get_Error(&mut self, out: *mut SerialError) -> HRESULT - }} - impl IErrorReceivedEventArgs { - #[inline] pub unsafe fn get_error(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Error)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - } - DEFINE_IID!(IID_IPinChangedEventArgs, 2730433968, 64668, 17927, 147, 208, 250, 94, 131, 67, 238, 34); - RT_INTERFACE!{interface IPinChangedEventArgs(IPinChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPinChangedEventArgs] { - fn get_PinChange(&mut self, out: *mut SerialPinChange) -> HRESULT + RT_CLASS!{class GpioPinProviderValueChangedEventArgs: IGpioPinProviderValueChangedEventArgs [IGpioPinProviderValueChangedEventArgsFactory] [CLSID_GpioPinProviderValueChangedEventArgs]} + DEFINE_CLSID!(CLSID_GpioPinProviderValueChangedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,112,105,111,46,80,114,111,118,105,100,101,114,46,71,112,105,111,80,105,110,80,114,111,118,105,100,101,114,86,97,108,117,101,67,104,97,110,103,101,100,69,118,101,110,116,65,114,103,115,0]); + DEFINE_IID!(IID_IGpioPinProviderValueChangedEventArgs, 849794802, 15707, 17613, 143, 190, 19, 166, 159, 46, 219, 36); + RT_INTERFACE!{interface IGpioPinProviderValueChangedEventArgs(IGpioPinProviderValueChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGpioPinProviderValueChangedEventArgs] { + fn get_Edge(&mut self, out: *mut ProviderGpioPinEdge) -> HRESULT }} - impl IPinChangedEventArgs { - #[inline] pub unsafe fn get_pin_change(&mut self) -> Result { + impl IGpioPinProviderValueChangedEventArgs { + #[inline] pub unsafe fn get_edge(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PinChange)(self, &mut out); + let hr = ((*self.lpVtbl).get_Edge)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_ISerialDevice, 3783773382, 8720, 16719, 182, 90, 245, 85, 58, 3, 55, 42); - RT_INTERFACE!{interface ISerialDevice(ISerialDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ISerialDevice] { - fn get_BaudRate(&mut self, out: *mut u32) -> HRESULT, - fn put_BaudRate(&mut self, value: u32) -> HRESULT, - fn get_BreakSignalState(&mut self, out: *mut bool) -> HRESULT, - fn put_BreakSignalState(&mut self, value: bool) -> HRESULT, - fn get_BytesReceived(&mut self, out: *mut u32) -> HRESULT, - fn get_CarrierDetectState(&mut self, out: *mut bool) -> HRESULT, - fn get_ClearToSendState(&mut self, out: *mut bool) -> HRESULT, - fn get_DataBits(&mut self, out: *mut u16) -> HRESULT, - fn put_DataBits(&mut self, value: u16) -> HRESULT, - fn get_DataSetReadyState(&mut self, out: *mut bool) -> HRESULT, - fn get_Handshake(&mut self, out: *mut SerialHandshake) -> HRESULT, - fn put_Handshake(&mut self, value: SerialHandshake) -> HRESULT, - fn get_IsDataTerminalReadyEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_IsDataTerminalReadyEnabled(&mut self, value: bool) -> HRESULT, - fn get_IsRequestToSendEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_IsRequestToSendEnabled(&mut self, value: bool) -> HRESULT, - fn get_Parity(&mut self, out: *mut SerialParity) -> HRESULT, - fn put_Parity(&mut self, value: SerialParity) -> HRESULT, - fn get_PortName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ReadTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_ReadTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_StopBits(&mut self, out: *mut SerialStopBitCount) -> HRESULT, - fn put_StopBits(&mut self, value: SerialStopBitCount) -> HRESULT, - fn get_UsbVendorId(&mut self, out: *mut u16) -> HRESULT, - fn get_UsbProductId(&mut self, out: *mut u16) -> HRESULT, - fn get_WriteTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_WriteTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy27(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_InputStream(&mut self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy28(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_OutputStream(&mut self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, - fn add_ErrorReceived(&mut self, reportHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ErrorReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PinChanged(&mut self, reportHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PinChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_IGpioPinProvider, 1110723767, 27324, 16639, 156, 231, 115, 184, 83, 1, 185, 0); + RT_INTERFACE!{interface IGpioPinProvider(IGpioPinProviderVtbl): IInspectable(IInspectableVtbl) [IID_IGpioPinProvider] { + fn add_ValueChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ValueChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_DebounceTimeout(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn put_DebounceTimeout(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_PinNumber(&mut self, out: *mut i32) -> HRESULT, + fn get_SharingMode(&mut self, out: *mut ProviderGpioSharingMode) -> HRESULT, + fn IsDriveModeSupported(&mut self, driveMode: ProviderGpioPinDriveMode, out: *mut bool) -> HRESULT, + fn GetDriveMode(&mut self, out: *mut ProviderGpioPinDriveMode) -> HRESULT, + fn SetDriveMode(&mut self, value: ProviderGpioPinDriveMode) -> HRESULT, + fn Write(&mut self, value: ProviderGpioPinValue) -> HRESULT, + fn Read(&mut self, out: *mut ProviderGpioPinValue) -> HRESULT }} - impl ISerialDevice { - #[inline] pub unsafe fn get_baud_rate(&mut self) -> Result { + impl IGpioPinProvider { + #[inline] pub unsafe fn add_value_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BaudRate)(self, &mut out); + let hr = ((*self.lpVtbl).add_ValueChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_baud_rate(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_BaudRate)(self, value); + #[inline] pub unsafe fn remove_value_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ValueChanged)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_break_signal_state(&mut self) -> Result { + #[inline] pub unsafe fn get_debounce_timeout(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BreakSignalState)(self, &mut out); + let hr = ((*self.lpVtbl).get_DebounceTimeout)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_break_signal_state(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_BreakSignalState)(self, value); + #[inline] pub unsafe fn set_debounce_timeout(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_DebounceTimeout)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_bytes_received(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BytesReceived)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_carrier_detect_state(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CarrierDetectState)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_clear_to_send_state(&mut self) -> Result { + #[inline] pub unsafe fn get_pin_number(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ClearToSendState)(self, &mut out); + let hr = ((*self.lpVtbl).get_PinNumber)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_data_bits(&mut self) -> Result { + #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DataBits)(self, &mut out); + let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_data_bits(&mut self, value: u16) -> Result<()> { - let hr = ((*self.lpVtbl).put_DataBits)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_set_ready_state(&mut self) -> Result { + #[inline] pub unsafe fn is_drive_mode_supported(&mut self, driveMode: ProviderGpioPinDriveMode) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DataSetReadyState)(self, &mut out); + let hr = ((*self.lpVtbl).IsDriveModeSupported)(self, driveMode, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_handshake(&mut self) -> Result { + #[inline] pub unsafe fn get_drive_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Handshake)(self, &mut out); + let hr = ((*self.lpVtbl).GetDriveMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_handshake(&mut self, value: SerialHandshake) -> Result<()> { - let hr = ((*self.lpVtbl).put_Handshake)(self, value); + #[inline] pub unsafe fn set_drive_mode(&mut self, value: ProviderGpioPinDriveMode) -> Result<()> { + let hr = ((*self.lpVtbl).SetDriveMode)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_data_terminal_ready_enabled(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsDataTerminalReadyEnabled)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_data_terminal_ready_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsDataTerminalReadyEnabled)(self, value); + #[inline] pub unsafe fn write(&mut self, value: ProviderGpioPinValue) -> Result<()> { + let hr = ((*self.lpVtbl).Write)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_is_request_to_send_enabled(&mut self) -> Result { + #[inline] pub unsafe fn read(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsRequestToSendEnabled)(self, &mut out); + let hr = ((*self.lpVtbl).Read)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_is_request_to_send_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsRequestToSendEnabled)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_parity(&mut self) -> Result { + } + DEFINE_IID!(IID_IGpioControllerProvider, 2903625415, 6634, 19233, 135, 79, 185, 26, 237, 74, 37, 219); + RT_INTERFACE!{interface IGpioControllerProvider(IGpioControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_IGpioControllerProvider] { + fn get_PinCount(&mut self, out: *mut i32) -> HRESULT, + fn OpenPinProvider(&mut self, pin: i32, sharingMode: ProviderGpioSharingMode, out: *mut *mut IGpioPinProvider) -> HRESULT + }} + impl IGpioControllerProvider { + #[inline] pub unsafe fn get_pin_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Parity)(self, &mut out); + let hr = ((*self.lpVtbl).get_PinCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_parity(&mut self, value: SerialParity) -> Result<()> { - let hr = ((*self.lpVtbl).put_Parity)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_port_name(&mut self) -> Result { + #[inline] pub unsafe fn open_pin_provider(&mut self, pin: i32, sharingMode: ProviderGpioSharingMode) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PortName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_read_timeout(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadTimeout)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_read_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReadTimeout)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stop_bits(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_StopBits)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_stop_bits(&mut self, value: SerialStopBitCount) -> Result<()> { - let hr = ((*self.lpVtbl).put_StopBits)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + let hr = ((*self.lpVtbl).OpenPinProvider)(self, pin, sharingMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_usb_vendor_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsbVendorId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IGpioProvider, 1156065031, 2250, 17226, 175, 224, 214, 21, 128, 68, 111, 126); + RT_INTERFACE!{interface IGpioProvider(IGpioProviderVtbl): IInspectable(IInspectableVtbl) [IID_IGpioProvider] { + fn GetControllers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IGpioProvider { + #[inline] pub unsafe fn get_controllers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetControllers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_usb_product_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UsbProductId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } +} // Windows.Devices.Gpio.Provider +} // Windows.Devices.Gpio +pub mod i2c { // Windows.Devices.I2c +use ::prelude::*; + RT_ENUM! { enum I2cBusSpeed: i32 { + StandardMode (I2cBusSpeed_StandardMode) = 0, FastMode (I2cBusSpeed_FastMode) = 1, + }} + RT_ENUM! { enum I2cTransferStatus: i32 { + FullTransfer (I2cTransferStatus_FullTransfer) = 0, PartialTransfer (I2cTransferStatus_PartialTransfer) = 1, SlaveAddressNotAcknowledged (I2cTransferStatus_SlaveAddressNotAcknowledged) = 2, + }} + RT_ENUM! { enum I2cSharingMode: i32 { + Exclusive (I2cSharingMode_Exclusive) = 0, Shared (I2cSharingMode_Shared) = 1, + }} + RT_STRUCT! { struct I2cTransferResult { + Status: I2cTransferStatus, BytesTransferred: u32, + }} + DEFINE_IID!(IID_II2cConnectionSettingsFactory, 2176157363, 38547, 16817, 162, 67, 222, 212, 246, 230, 105, 38); + RT_INTERFACE!{static interface II2cConnectionSettingsFactory(II2cConnectionSettingsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_II2cConnectionSettingsFactory] { + fn Create(&mut self, slaveAddress: i32, out: *mut *mut I2cConnectionSettings) -> HRESULT + }} + impl II2cConnectionSettingsFactory { + #[inline] pub unsafe fn create(&mut self, slaveAddress: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, slaveAddress, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_write_timeout(&mut self) -> Result { + } + RT_CLASS!{class I2cConnectionSettings: II2cConnectionSettings [II2cConnectionSettingsFactory] [CLSID_I2cConnectionSettings]} + DEFINE_CLSID!(CLSID_I2cConnectionSettings = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,73,50,99,46,73,50,99,67,111,110,110,101,99,116,105,111,110,83,101,116,116,105,110,103,115,0]); + DEFINE_IID!(IID_II2cConnectionSettings, 4074443527, 43887, 17977, 167, 103, 84, 83, 109, 195, 70, 15); + RT_INTERFACE!{interface II2cConnectionSettings(II2cConnectionSettingsVtbl): IInspectable(IInspectableVtbl) [IID_II2cConnectionSettings] { + fn get_SlaveAddress(&mut self, out: *mut i32) -> HRESULT, + fn put_SlaveAddress(&mut self, value: i32) -> HRESULT, + fn get_BusSpeed(&mut self, out: *mut I2cBusSpeed) -> HRESULT, + fn put_BusSpeed(&mut self, value: I2cBusSpeed) -> HRESULT, + fn get_SharingMode(&mut self, out: *mut I2cSharingMode) -> HRESULT, + fn put_SharingMode(&mut self, value: I2cSharingMode) -> HRESULT + }} + impl II2cConnectionSettings { + #[inline] pub unsafe fn get_slave_address(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_WriteTimeout)(self, &mut out); + let hr = ((*self.lpVtbl).get_SlaveAddress)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_write_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { - let hr = ((*self.lpVtbl).put_WriteTimeout)(self, value); + #[inline] pub unsafe fn set_slave_address(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SlaveAddress)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_input_stream(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InputStream)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_OutputStream)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_error_received(&mut self, reportHandler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_bus_speed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ErrorReceived)(self, reportHandler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_BusSpeed)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_error_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ErrorReceived)(self, token); + #[inline] pub unsafe fn set_bus_speed(&mut self, value: I2cBusSpeed) -> Result<()> { + let hr = ((*self.lpVtbl).put_BusSpeed)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_pin_changed(&mut self, reportHandler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_PinChanged)(self, reportHandler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_pin_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_PinChanged)(self, token); + #[inline] pub unsafe fn set_sharing_mode(&mut self, value: I2cSharingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_SharingMode)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } } -} // Windows.Devices.SerialCommunication -pub mod smartcards { // Windows.Devices.SmartCards -use ::prelude::*; - RT_ENUM! { enum SmartCardReaderKind: i32 { - Any (SmartCardReaderKind_Any) = 0, Generic (SmartCardReaderKind_Generic) = 1, Tpm (SmartCardReaderKind_Tpm) = 2, Nfc (SmartCardReaderKind_Nfc) = 3, Uicc (SmartCardReaderKind_Uicc) = 4, EmbeddedSE (SmartCardReaderKind_EmbeddedSE) = 5, - }} - RT_ENUM! { enum SmartCardReaderStatus: i32 { - Disconnected (SmartCardReaderStatus_Disconnected) = 0, Ready (SmartCardReaderStatus_Ready) = 1, Exclusive (SmartCardReaderStatus_Exclusive) = 2, - }} - RT_ENUM! { enum SmartCardStatus: i32 { - Disconnected (SmartCardStatus_Disconnected) = 0, Ready (SmartCardStatus_Ready) = 1, Shared (SmartCardStatus_Shared) = 2, Exclusive (SmartCardStatus_Exclusive) = 3, Unresponsive (SmartCardStatus_Unresponsive) = 4, - }} - RT_ENUM! { enum SmartCardPinCharacterPolicyOption: i32 { - Allow (SmartCardPinCharacterPolicyOption_Allow) = 0, RequireAtLeastOne (SmartCardPinCharacterPolicyOption_RequireAtLeastOne) = 1, Disallow (SmartCardPinCharacterPolicyOption_Disallow) = 2, - }} - DEFINE_IID!(IID_ISmartCardReaderStatics, 272368865, 41418, 18674, 162, 129, 91, 111, 102, 154, 241, 7); - RT_INTERFACE!{static interface ISmartCardReaderStatics(ISmartCardReaderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardReaderStatics] { + DEFINE_IID!(IID_II2cDeviceStatics, 2443394019, 29492, 17682, 150, 188, 251, 174, 148, 89, 245, 246); + RT_INTERFACE!{static interface II2cDeviceStatics(II2cDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_II2cDeviceStatics] { fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorWithKind(&mut self, kind: SmartCardReaderKind, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetDeviceSelectorFromFriendlyName(&mut self, friendlyName: HSTRING, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, settings: *mut I2cConnectionSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl ISmartCardReaderStatics { + impl II2cDeviceStatics { #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_with_kind(&mut self, kind: SmartCardReaderKind) -> Result { + #[inline] pub unsafe fn get_device_selector_from_friendly_name(&mut self, friendlyName: &HStringArg) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorWithKind)(self, kind, &mut out); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromFriendlyName)(self, friendlyName.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg, settings: &I2cConnectionSettings) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), settings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class SmartCardReader: ISmartCardReader} - RT_ACTIVATABLE!{ISmartCardReaderStatics [CLSID_SmartCardReader]} - DEFINE_CLSID!(CLSID_SmartCardReader = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,97,114,116,67,97,114,100,115,46,83,109,97,114,116,67,97,114,100,82,101,97,100,101,114,0]); - DEFINE_IID!(IID_ISmartCardReader, 276083936, 21698, 19952, 129, 122, 20, 193, 67, 120, 240, 108); - RT_INTERFACE!{interface ISmartCardReader(ISmartCardReaderVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardReader] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Kind(&mut self, out: *mut SmartCardReaderKind) -> HRESULT, - fn GetStatusAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllCardsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn add_CardAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CardAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CardRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CardRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class I2cDevice: II2cDevice} + RT_ACTIVATABLE!{II2cDeviceStatics [CLSID_I2cDevice]} + DEFINE_CLSID!(CLSID_I2cDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,73,50,99,46,73,50,99,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_II2cController, 3297423794, 34720, 16742, 142, 62, 180, 184, 249, 124, 215, 41); + RT_INTERFACE!{interface II2cController(II2cControllerVtbl): IInspectable(IInspectableVtbl) [IID_II2cController] { + fn GetDevice(&mut self, settings: *mut I2cConnectionSettings, out: *mut *mut I2cDevice) -> HRESULT }} - impl ISmartCardReader { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + impl II2cController { + #[inline] pub unsafe fn get_device(&mut self, settings: &I2cConnectionSettings) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetDevice)(self, settings as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_name(&mut self) -> Result { + } + DEFINE_IID!(IID_II2cControllerStatics, 1090257765, 24325, 20094, 132, 189, 16, 13, 184, 224, 174, 197); + RT_INTERFACE!{static interface II2cControllerStatics(II2cControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_II2cControllerStatics] { + fn GetControllersAsync(&mut self, provider: *mut provider::II2cProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl II2cControllerStatics { + #[inline] pub unsafe fn get_controllers_async(&mut self, provider: &provider::II2cProvider) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Name)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetControllersAsync)(self, provider as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_kind(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_status_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetStatusAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn find_all_cards_async(&mut self) -> Result>>> { + } + RT_CLASS!{class I2cController: II2cController} + RT_ACTIVATABLE!{II2cControllerStatics [CLSID_I2cController]} + DEFINE_CLSID!(CLSID_I2cController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,73,50,99,46,73,50,99,67,111,110,116,114,111,108,108,101,114,0]); + DEFINE_IID!(IID_II2cDevice, 2251735350, 47557, 20336, 148, 73, 204, 70, 220, 111, 87, 235); + RT_INTERFACE!{interface II2cDevice(II2cDeviceVtbl): IInspectable(IInspectableVtbl) [IID_II2cDevice] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ConnectionSettings(&mut self, out: *mut *mut I2cConnectionSettings) -> HRESULT, + fn Write(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, + fn WritePartial(&mut self, bufferSize: u32, buffer: *mut u8, out: *mut I2cTransferResult) -> HRESULT, + fn Read(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, + fn ReadPartial(&mut self, bufferSize: u32, buffer: *mut u8, out: *mut I2cTransferResult) -> HRESULT, + fn WriteRead(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT, + fn WriteReadPartial(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8, out: *mut I2cTransferResult) -> HRESULT + }} + impl II2cDevice { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllCardsAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_connection_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConnectionSettings)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_card_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn write(&mut self, buffer: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).Write)(self, buffer.len() as u32, buffer.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_partial(&mut self, buffer: &[u8]) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_CardAdded)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).WritePartial)(self, buffer.len() as u32, buffer.as_ptr() as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_card_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_CardAdded)(self, token); + #[inline] pub unsafe fn read(&mut self, bufferSize: u32, buffer: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).Read)(self, bufferSize, buffer); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_card_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn read_partial(&mut self, bufferSize: u32, buffer: *mut u8) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_CardRemoved)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).ReadPartial)(self, bufferSize, buffer, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_card_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_CardRemoved)(self, token); + #[inline] pub unsafe fn write_read(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).WriteRead)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); if hr == S_OK { Ok(()) } else { err(hr) } } + #[inline] pub unsafe fn write_read_partial(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).WriteReadPartial)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } } - RT_CLASS!{class SmartCard: ISmartCard} - RT_CLASS!{class CardAddedEventArgs: ICardAddedEventArgs} - RT_CLASS!{class CardRemovedEventArgs: ICardRemovedEventArgs} - DEFINE_IID!(IID_ICardAddedEventArgs, 414969752, 61835, 19923, 177, 24, 223, 178, 200, 226, 60, 198); - RT_INTERFACE!{interface ICardAddedEventArgs(ICardAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICardAddedEventArgs] { - fn get_SmartCard(&mut self, out: *mut *mut SmartCard) -> HRESULT +pub mod provider { // Windows.Devices.I2c.Provider +use ::prelude::*; + RT_ENUM! { enum ProviderI2cBusSpeed: i32 { + StandardMode (ProviderI2cBusSpeed_StandardMode) = 0, FastMode (ProviderI2cBusSpeed_FastMode) = 1, }} - impl ICardAddedEventArgs { - #[inline] pub unsafe fn get_smart_card(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SmartCard)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + RT_ENUM! { enum ProviderI2cTransferStatus: i32 { + FullTransfer (ProviderI2cTransferStatus_FullTransfer) = 0, PartialTransfer (ProviderI2cTransferStatus_PartialTransfer) = 1, SlaveAddressNotAcknowledged (ProviderI2cTransferStatus_SlaveAddressNotAcknowledged) = 2, + }} + RT_ENUM! { enum ProviderI2cSharingMode: i32 { + Exclusive (ProviderI2cSharingMode_Exclusive) = 0, Shared (ProviderI2cSharingMode_Shared) = 1, + }} + RT_STRUCT! { struct ProviderI2cTransferResult { + Status: ProviderI2cTransferStatus, BytesTransferred: u32, + }} + DEFINE_IID!(IID_IProviderI2cConnectionSettings, 3923463732, 58640, 17591, 128, 157, 242, 248, 91, 85, 83, 57); + RT_INTERFACE!{interface IProviderI2cConnectionSettings(IProviderI2cConnectionSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IProviderI2cConnectionSettings] { + fn get_SlaveAddress(&mut self, out: *mut i32) -> HRESULT, + fn put_SlaveAddress(&mut self, value: i32) -> HRESULT, + fn get_BusSpeed(&mut self, out: *mut ProviderI2cBusSpeed) -> HRESULT, + fn put_BusSpeed(&mut self, value: ProviderI2cBusSpeed) -> HRESULT, + fn get_SharingMode(&mut self, out: *mut ProviderI2cSharingMode) -> HRESULT, + fn put_SharingMode(&mut self, value: ProviderI2cSharingMode) -> HRESULT + }} + impl IProviderI2cConnectionSettings { + #[inline] pub unsafe fn get_slave_address(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SlaveAddress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_slave_address(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SlaveAddress)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bus_speed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BusSpeed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bus_speed(&mut self, value: ProviderI2cBusSpeed) -> Result<()> { + let hr = ((*self.lpVtbl).put_BusSpeed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_sharing_mode(&mut self, value: ProviderI2cSharingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_SharingMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_ICardRemovedEventArgs, 355670703, 8919, 18757, 175, 201, 3, 180, 111, 66, 166, 205); - RT_INTERFACE!{interface ICardRemovedEventArgs(ICardRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICardRemovedEventArgs] { - fn get_SmartCard(&mut self, out: *mut *mut SmartCard) -> HRESULT + RT_CLASS!{class ProviderI2cConnectionSettings: IProviderI2cConnectionSettings} + DEFINE_IID!(IID_II2cControllerProvider, 1640151938, 17680, 16739, 168, 124, 78, 21, 169, 85, 137, 128); + RT_INTERFACE!{interface II2cControllerProvider(II2cControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_II2cControllerProvider] { + fn GetDeviceProvider(&mut self, settings: *mut ProviderI2cConnectionSettings, out: *mut *mut II2cDeviceProvider) -> HRESULT }} - impl ICardRemovedEventArgs { - #[inline] pub unsafe fn get_smart_card(&mut self) -> Result> { + impl II2cControllerProvider { + #[inline] pub unsafe fn get_device_provider(&mut self, settings: &ProviderI2cConnectionSettings) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SmartCard)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeviceProvider)(self, settings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ISmartCard, 460425329, 25652, 17396, 181, 90, 106, 41, 98, 56, 112, 170); - RT_INTERFACE!{interface ISmartCard(ISmartCardVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCard] { - fn get_Reader(&mut self, out: *mut *mut SmartCardReader) -> HRESULT, - fn GetStatusAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows.storage")] fn GetAnswerToResetAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + DEFINE_IID!(IID_II2cProvider, 1863518270, 48994, 20450, 169, 90, 240, 137, 153, 102, 152, 24); + RT_INTERFACE!{interface II2cProvider(II2cProviderVtbl): IInspectable(IInspectableVtbl) [IID_II2cProvider] { + fn GetControllersAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT }} - impl ISmartCard { - #[inline] pub unsafe fn get_reader(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Reader)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status_async(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetStatusAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_answer_to_reset_async(&mut self) -> Result>> { + impl II2cProvider { + #[inline] pub unsafe fn get_controllers_async(&mut self) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetAnswerToResetAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetControllersAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ISmartCardProvisioningStatics, 327690312, 3347, 20080, 151, 53, 81, 218, 236, 165, 37, 79); - RT_INTERFACE!{static interface ISmartCardProvisioningStatics(ISmartCardProvisioningStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardProvisioningStatics] { - fn FromSmartCardAsync(&mut self, card: *mut SmartCard, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.storage")] fn RequestVirtualSmartCardCreationAsync(&mut self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), - #[cfg(feature="windows.storage")] fn RequestVirtualSmartCardCreationAsyncWithCardId(&mut self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, cardId: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestVirtualSmartCardDeletionAsync(&mut self, card: *mut SmartCard, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + DEFINE_IID!(IID_II2cDeviceProvider, 2905876052, 22504, 17726, 131, 41, 209, 228, 71, 209, 3, 169); + RT_INTERFACE!{interface II2cDeviceProvider(II2cDeviceProviderVtbl): IInspectable(IInspectableVtbl) [IID_II2cDeviceProvider] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn Write(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, + fn WritePartial(&mut self, bufferSize: u32, buffer: *mut u8, out: *mut ProviderI2cTransferResult) -> HRESULT, + fn Read(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, + fn ReadPartial(&mut self, bufferSize: u32, buffer: *mut u8, out: *mut ProviderI2cTransferResult) -> HRESULT, + fn WriteRead(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT, + fn WriteReadPartial(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8, out: *mut ProviderI2cTransferResult) -> HRESULT }} - impl ISmartCardProvisioningStatics { - #[inline] pub unsafe fn from_smart_card_async(&mut self, card: &SmartCard) -> Result>> { + impl II2cDeviceProvider { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromSmartCardAsync)(self, card as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn request_virtual_smart_card_creation_async(&mut self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestVirtualSmartCardCreationAsync)(self, friendlyName.get(), administrativeKey as *const _ as *mut _, pinPolicy as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn write(&mut self, buffer: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).Write)(self, buffer.len() as u32, buffer.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn request_virtual_smart_card_creation_async_with_card_id(&mut self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestVirtualSmartCardCreationAsyncWithCardId)(self, friendlyName.get(), administrativeKey as *const _ as *mut _, pinPolicy as *const _ as *mut _, cardId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn write_partial(&mut self, buffer: &[u8]) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).WritePartial)(self, buffer.len() as u32, buffer.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn request_virtual_smart_card_deletion_async(&mut self, card: &SmartCard) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestVirtualSmartCardDeletionAsync)(self, card as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn read(&mut self, bufferSize: u32, buffer: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).Read)(self, bufferSize, buffer); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class SmartCardProvisioning: ISmartCardProvisioning} - RT_ACTIVATABLE!{ISmartCardProvisioningStatics2 [CLSID_SmartCardProvisioning]} - RT_ACTIVATABLE!{ISmartCardProvisioningStatics [CLSID_SmartCardProvisioning]} - DEFINE_CLSID!(CLSID_SmartCardProvisioning = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,97,114,116,67,97,114,100,115,46,83,109,97,114,116,67,97,114,100,80,114,111,118,105,115,105,111,110,105,110,103,0]); - RT_CLASS!{class SmartCardPinPolicy: ISmartCardPinPolicy} - DEFINE_IID!(IID_ISmartCardProvisioningStatics2, 877119144, 51616, 19414, 181, 13, 37, 31, 78, 141, 58, 98); - RT_INTERFACE!{static interface ISmartCardProvisioningStatics2(ISmartCardProvisioningStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardProvisioningStatics2] { - #[cfg(feature="windows.storage")] fn RequestAttestedVirtualSmartCardCreationAsync(&mut self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows.storage")] fn RequestAttestedVirtualSmartCardCreationAsyncWithCardId(&mut self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, cardId: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl ISmartCardProvisioningStatics2 { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn request_attested_virtual_smart_card_creation_async(&mut self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestAttestedVirtualSmartCardCreationAsync)(self, friendlyName.get(), administrativeKey as *const _ as *mut _, pinPolicy as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn read_partial(&mut self, bufferSize: u32, buffer: *mut u8) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadPartial)(self, bufferSize, buffer, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn request_attested_virtual_smart_card_creation_async_with_card_id(&mut self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestAttestedVirtualSmartCardCreationAsyncWithCardId)(self, friendlyName.get(), administrativeKey as *const _ as *mut _, pinPolicy as *const _ as *mut _, cardId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn write_read(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).WriteRead)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_read_partial(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).WriteReadPartial)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_ISmartCardProvisioning, 435088829, 8107, 18300, 183, 18, 26, 44, 90, 241, 253, 110); - RT_INTERFACE!{interface ISmartCardProvisioning(ISmartCardProvisioningVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardProvisioning] { - fn get_SmartCard(&mut self, out: *mut *mut SmartCard) -> HRESULT, - fn GetIdAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetNameAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetChallengeContextAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPinChangeAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPinResetAsync(&mut self, handler: *mut SmartCardPinResetHandler, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT +} // Windows.Devices.I2c.Provider +} // Windows.Devices.I2c +pub mod pwm { // Windows.Devices.Pwm +use ::prelude::*; + RT_ENUM! { enum PwmPulsePolarity: i32 { + ActiveHigh (PwmPulsePolarity_ActiveHigh) = 0, ActiveLow (PwmPulsePolarity_ActiveLow) = 1, }} - impl ISmartCardProvisioning { - #[inline] pub unsafe fn get_smart_card(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SmartCard)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + DEFINE_IID!(IID_IPwmController, 3294583941, 53992, 17103, 155, 214, 207, 94, 208, 41, 230, 167); + RT_INTERFACE!{interface IPwmController(IPwmControllerVtbl): IInspectable(IInspectableVtbl) [IID_IPwmController] { + fn get_PinCount(&mut self, out: *mut i32) -> HRESULT, + fn get_ActualFrequency(&mut self, out: *mut f64) -> HRESULT, + fn SetDesiredFrequency(&mut self, desiredFrequency: f64, out: *mut f64) -> HRESULT, + fn get_MinFrequency(&mut self, out: *mut f64) -> HRESULT, + fn get_MaxFrequency(&mut self, out: *mut f64) -> HRESULT, + fn OpenPin(&mut self, pinNumber: i32, out: *mut *mut PwmPin) -> HRESULT + }} + impl IPwmController { + #[inline] pub unsafe fn get_pin_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PinCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_id_async(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetIdAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_actual_frequency(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActualFrequency)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_name_async(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetNameAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_desired_frequency(&mut self, desiredFrequency: f64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).SetDesiredFrequency)(self, desiredFrequency, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_challenge_context_async(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetChallengeContextAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_min_frequency(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinFrequency)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn request_pin_change_async(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestPinChangeAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_max_frequency(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxFrequency)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn request_pin_reset_async(&mut self, handler: &SmartCardPinResetHandler) -> Result>> { + #[inline] pub unsafe fn open_pin(&mut self, pinNumber: i32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestPinResetAsync)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).OpenPin)(self, pinNumber, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class SmartCardChallengeContext: ISmartCardChallengeContext} - DEFINE_IID!(IID_SmartCardPinResetHandler, 328031808, 62396, 19036, 180, 29, 75, 78, 246, 132, 226, 55); - RT_DELEGATE!{delegate SmartCardPinResetHandler(SmartCardPinResetHandlerVtbl, SmartCardPinResetHandlerImpl) [IID_SmartCardPinResetHandler] { - fn Invoke(&mut self, sender: *mut SmartCardProvisioning, request: *mut SmartCardPinResetRequest) -> HRESULT + RT_CLASS!{class PwmPin: IPwmPin} + DEFINE_IID!(IID_IPwmControllerStatics, 1113832865, 35142, 17412, 189, 72, 129, 221, 18, 74, 244, 217); + RT_INTERFACE!{static interface IPwmControllerStatics(IPwmControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPwmControllerStatics] { + fn GetControllersAsync(&mut self, provider: *mut provider::IPwmProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT }} - impl SmartCardPinResetHandler { - #[inline] pub unsafe fn invoke(&mut self, sender: &SmartCardProvisioning, request: &SmartCardPinResetRequest) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, request as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IPwmControllerStatics { + #[inline] pub unsafe fn get_controllers_async(&mut self, provider: &provider::IPwmProvider) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetControllersAsync)(self, provider as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class SmartCardPinResetRequest: ISmartCardPinResetRequest} - DEFINE_IID!(IID_ISmartCardProvisioning2, 285026539, 16249, 19302, 155, 124, 17, 193, 73, 183, 208, 188); - RT_INTERFACE!{interface ISmartCardProvisioning2(ISmartCardProvisioning2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardProvisioning2] { - fn GetAuthorityKeyContainerNameAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class PwmController: IPwmController} + RT_ACTIVATABLE!{IPwmControllerStatics [CLSID_PwmController]} + RT_ACTIVATABLE!{IPwmControllerStatics2 [CLSID_PwmController]} + DEFINE_CLSID!(CLSID_PwmController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,119,109,46,80,119,109,67,111,110,116,114,111,108,108,101,114,0]); + DEFINE_IID!(IID_IPwmControllerStatics2, 1157389087, 61721, 19421, 151, 173, 247, 110, 249, 134, 115, 109); + RT_INTERFACE!{static interface IPwmControllerStatics2(IPwmControllerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IPwmControllerStatics2] { + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl ISmartCardProvisioning2 { - #[inline] pub unsafe fn get_authority_key_container_name_async(&mut self) -> Result>> { + impl IPwmControllerStatics2 { + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetAuthorityKeyContainerNameAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_ISmartCardPinResetRequest, 318651469, 24505, 20110, 159, 246, 97, 244, 117, 18, 79, 239); - RT_INTERFACE!{interface ISmartCardPinResetRequest(ISmartCardPinResetRequestVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardPinResetRequest] { - #[cfg(feature="windows.storage")] fn get_Challenge(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn get_Deadline(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn GetDeferral(&mut self, out: *mut *mut SmartCardPinResetDeferral) -> HRESULT, - #[cfg(feature="windows.storage")] fn SetResponse(&mut self, response: *mut super::super::storage::streams::IBuffer) -> HRESULT + DEFINE_IID!(IID_IPwmPin, 580333000, 50895, 18465, 183, 249, 198, 69, 79, 182, 175, 121); + RT_INTERFACE!{interface IPwmPin(IPwmPinVtbl): IInspectable(IInspectableVtbl) [IID_IPwmPin] { + fn get_Controller(&mut self, out: *mut *mut PwmController) -> HRESULT, + fn GetActiveDutyCyclePercentage(&mut self, out: *mut f64) -> HRESULT, + fn SetActiveDutyCyclePercentage(&mut self, dutyCyclePercentage: f64) -> HRESULT, + fn get_Polarity(&mut self, out: *mut PwmPulsePolarity) -> HRESULT, + fn put_Polarity(&mut self, value: PwmPulsePolarity) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn get_IsStarted(&mut self, out: *mut bool) -> HRESULT }} - impl ISmartCardPinResetRequest { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_challenge(&mut self) -> Result> { + impl IPwmPin { + #[inline] pub unsafe fn get_controller(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Challenge)(self, &mut out); + let hr = ((*self.lpVtbl).get_Controller)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_deadline(&mut self) -> Result { + #[inline] pub unsafe fn get_active_duty_cycle_percentage(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); + let hr = ((*self.lpVtbl).GetActiveDutyCyclePercentage)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_active_duty_cycle_percentage(&mut self, dutyCyclePercentage: f64) -> Result<()> { + let hr = ((*self.lpVtbl).SetActiveDutyCyclePercentage)(self, dutyCyclePercentage); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_response(&mut self, response: &super::super::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).SetResponse)(self, response as *const _ as *mut _); + #[inline] pub unsafe fn get_polarity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Polarity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_polarity(&mut self, value: PwmPulsePolarity) -> Result<()> { + let hr = ((*self.lpVtbl).put_Polarity)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class SmartCardPinResetDeferral: ISmartCardPinResetDeferral} - DEFINE_IID!(IID_ISmartCardPinResetDeferral, 415845036, 30725, 16388, 133, 228, 187, 239, 172, 143, 104, 132); - RT_INTERFACE!{interface ISmartCardPinResetDeferral(ISmartCardPinResetDeferralVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardPinResetDeferral] { - fn Complete(&mut self) -> HRESULT - }} - impl ISmartCardPinResetDeferral { - #[inline] pub unsafe fn complete(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Complete)(self); + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); if hr == S_OK { Ok(()) } else { err(hr) } } + #[inline] pub unsafe fn get_is_started(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStarted)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } } - DEFINE_IID!(IID_ISmartCardPinPolicy, 406643076, 19894, 18497, 172, 158, 42, 193, 243, 155, 115, 4); - RT_INTERFACE!{interface ISmartCardPinPolicy(ISmartCardPinPolicyVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardPinPolicy] { - fn get_MinLength(&mut self, out: *mut u32) -> HRESULT, - fn put_MinLength(&mut self, value: u32) -> HRESULT, - fn get_MaxLength(&mut self, out: *mut u32) -> HRESULT, - fn put_MaxLength(&mut self, value: u32) -> HRESULT, - fn get_UppercaseLetters(&mut self, out: *mut SmartCardPinCharacterPolicyOption) -> HRESULT, - fn put_UppercaseLetters(&mut self, value: SmartCardPinCharacterPolicyOption) -> HRESULT, - fn get_LowercaseLetters(&mut self, out: *mut SmartCardPinCharacterPolicyOption) -> HRESULT, - fn put_LowercaseLetters(&mut self, value: SmartCardPinCharacterPolicyOption) -> HRESULT, - fn get_Digits(&mut self, out: *mut SmartCardPinCharacterPolicyOption) -> HRESULT, - fn put_Digits(&mut self, value: SmartCardPinCharacterPolicyOption) -> HRESULT, - fn get_SpecialCharacters(&mut self, out: *mut SmartCardPinCharacterPolicyOption) -> HRESULT, - fn put_SpecialCharacters(&mut self, value: SmartCardPinCharacterPolicyOption) -> HRESULT +pub mod provider { // Windows.Devices.Pwm.Provider +use ::prelude::*; + DEFINE_IID!(IID_IPwmControllerProvider, 318789947, 58083, 16548, 183, 217, 72, 223, 240, 55, 122, 82); + RT_INTERFACE!{interface IPwmControllerProvider(IPwmControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_IPwmControllerProvider] { + fn get_PinCount(&mut self, out: *mut i32) -> HRESULT, + fn get_ActualFrequency(&mut self, out: *mut f64) -> HRESULT, + fn SetDesiredFrequency(&mut self, frequency: f64, out: *mut f64) -> HRESULT, + fn get_MaxFrequency(&mut self, out: *mut f64) -> HRESULT, + fn get_MinFrequency(&mut self, out: *mut f64) -> HRESULT, + fn AcquirePin(&mut self, pin: i32) -> HRESULT, + fn ReleasePin(&mut self, pin: i32) -> HRESULT, + fn EnablePin(&mut self, pin: i32) -> HRESULT, + fn DisablePin(&mut self, pin: i32) -> HRESULT, + fn SetPulseParameters(&mut self, pin: i32, dutyCycle: f64, invertPolarity: bool) -> HRESULT }} - impl ISmartCardPinPolicy { - #[inline] pub unsafe fn get_min_length(&mut self) -> Result { + impl IPwmControllerProvider { + #[inline] pub unsafe fn get_pin_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinLength)(self, &mut out); + let hr = ((*self.lpVtbl).get_PinCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_min_length(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_MinLength)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_length(&mut self) -> Result { + #[inline] pub unsafe fn get_actual_frequency(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxLength)(self, &mut out); + let hr = ((*self.lpVtbl).get_ActualFrequency)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_max_length(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_MaxLength)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_uppercase_letters(&mut self) -> Result { + #[inline] pub unsafe fn set_desired_frequency(&mut self, frequency: f64) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_UppercaseLetters)(self, &mut out); + let hr = ((*self.lpVtbl).SetDesiredFrequency)(self, frequency, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_uppercase_letters(&mut self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { - let hr = ((*self.lpVtbl).put_UppercaseLetters)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_max_frequency(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxFrequency)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_lowercase_letters(&mut self) -> Result { + #[inline] pub unsafe fn get_min_frequency(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_LowercaseLetters)(self, &mut out); + let hr = ((*self.lpVtbl).get_MinFrequency)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_lowercase_letters(&mut self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { - let hr = ((*self.lpVtbl).put_LowercaseLetters)(self, value); + #[inline] pub unsafe fn acquire_pin(&mut self, pin: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AcquirePin)(self, pin); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_digits(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Digits)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn release_pin(&mut self, pin: i32) -> Result<()> { + let hr = ((*self.lpVtbl).ReleasePin)(self, pin); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_digits(&mut self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { - let hr = ((*self.lpVtbl).put_Digits)(self, value); + #[inline] pub unsafe fn enable_pin(&mut self, pin: i32) -> Result<()> { + let hr = ((*self.lpVtbl).EnablePin)(self, pin); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_special_characters(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SpecialCharacters)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn disable_pin(&mut self, pin: i32) -> Result<()> { + let hr = ((*self.lpVtbl).DisablePin)(self, pin); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_special_characters(&mut self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { - let hr = ((*self.lpVtbl).put_SpecialCharacters)(self, value); + #[inline] pub unsafe fn set_pulse_parameters(&mut self, pin: i32, dutyCycle: f64, invertPolarity: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetPulseParameters)(self, pin, dutyCycle, invertPolarity); if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_ISmartCardConnect, 803178469, 653, 18718, 160, 88, 51, 130, 195, 152, 111, 64); - RT_INTERFACE!{interface ISmartCardConnect(ISmartCardConnectVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardConnect] { - fn ConnectAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + DEFINE_IID!(IID_IPwmProvider, 2737836584, 21233, 18352, 147, 73, 102, 186, 67, 210, 89, 2); + RT_INTERFACE!{interface IPwmProvider(IPwmProviderVtbl): IInspectable(IInspectableVtbl) [IID_IPwmProvider] { + fn GetControllers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT }} - impl ISmartCardConnect { - #[inline] pub unsafe fn connect_async(&mut self) -> Result>> { + impl IPwmProvider { + #[inline] pub unsafe fn get_controllers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ConnectAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetControllers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class SmartCardConnection: ISmartCardConnection} - DEFINE_IID!(IID_ISmartCardChallengeContext, 422204185, 51652, 18759, 129, 204, 68, 121, 74, 97, 239, 145); - RT_INTERFACE!{interface ISmartCardChallengeContext(ISmartCardChallengeContextVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardChallengeContext] { - #[cfg(feature="windows.storage")] fn get_Challenge(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - #[cfg(feature="windows.storage")] fn VerifyResponseAsync(&mut self, response: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows.storage")] fn ProvisionAsync(&mut self, response: *mut super::super::storage::streams::IBuffer, formatCard: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - #[cfg(feature="windows.storage")] fn ProvisionAsyncWithNewCardId(&mut self, response: *mut super::super::storage::streams::IBuffer, formatCard: bool, newCardId: Guid, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - #[cfg(feature="windows.storage")] fn ChangeAdministrativeKeyAsync(&mut self, response: *mut super::super::storage::streams::IBuffer, newAdministrativeKey: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT +} // Windows.Devices.Pwm.Provider +} // Windows.Devices.Pwm +pub mod spi { // Windows.Devices.Spi +use ::prelude::*; + RT_ENUM! { enum SpiMode: i32 { + Mode0 (SpiMode_Mode0) = 0, Mode1 (SpiMode_Mode1) = 1, Mode2 (SpiMode_Mode2) = 2, Mode3 (SpiMode_Mode3) = 3, }} - impl ISmartCardChallengeContext { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_challenge(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Challenge)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn verify_response_async(&mut self, response: &super::super::storage::streams::IBuffer) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).VerifyResponseAsync)(self, response as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn provision_async(&mut self, response: &super::super::storage::streams::IBuffer, formatCard: bool) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ProvisionAsync)(self, response as *const _ as *mut _, formatCard, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn provision_async_with_new_card_id(&mut self, response: &super::super::storage::streams::IBuffer, formatCard: bool, newCardId: Guid) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ProvisionAsyncWithNewCardId)(self, response as *const _ as *mut _, formatCard, newCardId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn change_administrative_key_async(&mut self, response: &super::super::storage::streams::IBuffer, newAdministrativeKey: &super::super::storage::streams::IBuffer) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ChangeAdministrativeKeyAsync)(self, response as *const _ as *mut _, newAdministrativeKey as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - } - DEFINE_IID!(IID_ISmartCardConnection, 2128320794, 43034, 18364, 166, 73, 21, 107, 230, 183, 242, 49); - RT_INTERFACE!{interface ISmartCardConnection(ISmartCardConnectionVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardConnection] { - #[cfg(feature="windows.storage")] fn TransmitAsync(&mut self, command: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_ENUM! { enum SpiSharingMode: i32 { + Exclusive (SpiSharingMode_Exclusive) = 0, Shared (SpiSharingMode_Shared) = 1, }} - impl ISmartCardConnection { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn transmit_async(&mut self, command: &super::super::storage::streams::IBuffer) -> Result>> { + DEFINE_IID!(IID_ISpiConnectionSettingsFactory, 4288219166, 4292, 17591, 159, 234, 167, 72, 181, 164, 111, 49); + RT_INTERFACE!{static interface ISpiConnectionSettingsFactory(ISpiConnectionSettingsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISpiConnectionSettingsFactory] { + fn Create(&mut self, chipSelectLine: i32, out: *mut *mut SpiConnectionSettings) -> HRESULT + }} + impl ISpiConnectionSettingsFactory { + #[inline] pub unsafe fn create(&mut self, chipSelectLine: i32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).TransmitAsync)(self, command as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).Create)(self, chipSelectLine, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } -} // Windows.Devices.SmartCards -pub mod usb { // Windows.Devices.Usb -use ::prelude::*; - RT_ENUM! { enum UsbTransferDirection: i32 { - Out (UsbTransferDirection_Out) = 0, In (UsbTransferDirection_In) = 1, - }} - RT_ENUM! { enum UsbEndpointType: i32 { - Control (UsbEndpointType_Control) = 0, Isochronous (UsbEndpointType_Isochronous) = 1, Bulk (UsbEndpointType_Bulk) = 2, Interrupt (UsbEndpointType_Interrupt) = 3, - }} - RT_ENUM! { enum UsbControlRecipient: i32 { - Device (UsbControlRecipient_Device) = 0, SpecifiedInterface (UsbControlRecipient_SpecifiedInterface) = 1, Endpoint (UsbControlRecipient_Endpoint) = 2, Other (UsbControlRecipient_Other) = 3, DefaultInterface (UsbControlRecipient_DefaultInterface) = 4, - }} - RT_ENUM! { enum UsbControlTransferType: i32 { - Standard (UsbControlTransferType_Standard) = 0, Class (UsbControlTransferType_Class) = 1, Vendor (UsbControlTransferType_Vendor) = 2, - }} - DEFINE_IID!(IID_IUsbControlRequestType, 2392090022, 55101, 18142, 148, 190, 170, 231, 240, 124, 15, 92); - RT_INTERFACE!{interface IUsbControlRequestType(IUsbControlRequestTypeVtbl): IInspectable(IInspectableVtbl) [IID_IUsbControlRequestType] { - fn get_Direction(&mut self, out: *mut UsbTransferDirection) -> HRESULT, - fn put_Direction(&mut self, value: UsbTransferDirection) -> HRESULT, - fn get_ControlTransferType(&mut self, out: *mut UsbControlTransferType) -> HRESULT, - fn put_ControlTransferType(&mut self, value: UsbControlTransferType) -> HRESULT, - fn get_Recipient(&mut self, out: *mut UsbControlRecipient) -> HRESULT, - fn put_Recipient(&mut self, value: UsbControlRecipient) -> HRESULT, - fn get_AsByte(&mut self, out: *mut u8) -> HRESULT, - fn put_AsByte(&mut self, value: u8) -> HRESULT + RT_CLASS!{class SpiConnectionSettings: ISpiConnectionSettings [ISpiConnectionSettingsFactory] [CLSID_SpiConnectionSettings]} + DEFINE_CLSID!(CLSID_SpiConnectionSettings = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,112,105,46,83,112,105,67,111,110,110,101,99,116,105,111,110,83,101,116,116,105,110,103,115,0]); + DEFINE_IID!(IID_ISpiConnectionSettings, 1384358783, 63797, 19359, 167, 167, 58, 120, 144, 175, 165, 206); + RT_INTERFACE!{interface ISpiConnectionSettings(ISpiConnectionSettingsVtbl): IInspectable(IInspectableVtbl) [IID_ISpiConnectionSettings] { + fn get_ChipSelectLine(&mut self, out: *mut i32) -> HRESULT, + fn put_ChipSelectLine(&mut self, value: i32) -> HRESULT, + fn get_Mode(&mut self, out: *mut SpiMode) -> HRESULT, + fn put_Mode(&mut self, value: SpiMode) -> HRESULT, + fn get_DataBitLength(&mut self, out: *mut i32) -> HRESULT, + fn put_DataBitLength(&mut self, value: i32) -> HRESULT, + fn get_ClockFrequency(&mut self, out: *mut i32) -> HRESULT, + fn put_ClockFrequency(&mut self, value: i32) -> HRESULT, + fn get_SharingMode(&mut self, out: *mut SpiSharingMode) -> HRESULT, + fn put_SharingMode(&mut self, value: SpiSharingMode) -> HRESULT }} - impl IUsbControlRequestType { - #[inline] pub unsafe fn get_direction(&mut self) -> Result { + impl ISpiConnectionSettings { + #[inline] pub unsafe fn get_chip_select_line(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Direction)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChipSelectLine)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_direction(&mut self, value: UsbTransferDirection) -> Result<()> { - let hr = ((*self.lpVtbl).put_Direction)(self, value); + #[inline] pub unsafe fn set_chip_select_line(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ChipSelectLine)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_control_transfer_type(&mut self) -> Result { + #[inline] pub unsafe fn get_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ControlTransferType)(self, &mut out); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_control_transfer_type(&mut self, value: UsbControlTransferType) -> Result<()> { - let hr = ((*self.lpVtbl).put_ControlTransferType)(self, value); + #[inline] pub unsafe fn set_mode(&mut self, value: SpiMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_recipient(&mut self) -> Result { + #[inline] pub unsafe fn get_data_bit_length(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Recipient)(self, &mut out); + let hr = ((*self.lpVtbl).get_DataBitLength)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_recipient(&mut self, value: UsbControlRecipient) -> Result<()> { - let hr = ((*self.lpVtbl).put_Recipient)(self, value); + #[inline] pub unsafe fn set_data_bit_length(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataBitLength)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_as_byte(&mut self) -> Result { + #[inline] pub unsafe fn get_clock_frequency(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AsByte)(self, &mut out); + let hr = ((*self.lpVtbl).get_ClockFrequency)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_as_byte(&mut self, value: u8) -> Result<()> { - let hr = ((*self.lpVtbl).put_AsByte)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - } - RT_CLASS!{class UsbControlRequestType: IUsbControlRequestType} - DEFINE_IID!(IID_IUsbSetupPacketFactory, 3374677328, 6958, 19009, 162, 167, 51, 143, 12, 239, 60, 20); - RT_INTERFACE!{static interface IUsbSetupPacketFactory(IUsbSetupPacketFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IUsbSetupPacketFactory] { - #[cfg(feature="windows.storage")] fn CreateWithEightByteBuffer(&mut self, eightByteBuffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut UsbSetupPacket) -> HRESULT - }} - impl IUsbSetupPacketFactory { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_with_eight_byte_buffer(&mut self, eightByteBuffer: &super::super::storage::streams::IBuffer) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithEightByteBuffer)(self, eightByteBuffer as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - } - RT_CLASS!{class UsbSetupPacket: IUsbSetupPacket [IUsbSetupPacketFactory] [CLSID_UsbSetupPacket]} - DEFINE_CLSID!(CLSID_UsbSetupPacket = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,83,101,116,117,112,80,97,99,107,101,116,0]); - DEFINE_IID!(IID_IUsbSetupPacket, 273391922, 51087, 19537, 182, 84, 228, 157, 2, 242, 203, 3); - RT_INTERFACE!{interface IUsbSetupPacket(IUsbSetupPacketVtbl): IInspectable(IInspectableVtbl) [IID_IUsbSetupPacket] { - fn get_RequestType(&mut self, out: *mut *mut UsbControlRequestType) -> HRESULT, - fn put_RequestType(&mut self, value: *mut UsbControlRequestType) -> HRESULT, - fn get_Request(&mut self, out: *mut u8) -> HRESULT, - fn put_Request(&mut self, value: u8) -> HRESULT, - fn get_Value(&mut self, out: *mut u32) -> HRESULT, - fn put_Value(&mut self, value: u32) -> HRESULT, - fn get_Index(&mut self, out: *mut u32) -> HRESULT, - fn put_Index(&mut self, value: u32) -> HRESULT, - fn get_Length(&mut self, out: *mut u32) -> HRESULT, - fn put_Length(&mut self, value: u32) -> HRESULT - }} - impl IUsbSetupPacket { - #[inline] pub unsafe fn get_request_type(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RequestType)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_request_type(&mut self, value: &UsbControlRequestType) -> Result<()> { - let hr = ((*self.lpVtbl).put_RequestType)(self, value as *const _ as *mut _); + #[inline] pub unsafe fn set_clock_frequency(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ClockFrequency)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_request(&mut self) -> Result { + #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_request(&mut self, value: u8) -> Result<()> { - let hr = ((*self.lpVtbl).put_Request)(self, value); + #[inline] pub unsafe fn set_sharing_mode(&mut self, value: SpiSharingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_SharingMode)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_value(&mut self) -> Result { + } + DEFINE_IID!(IID_ISpiBusInfo, 2569618506, 21746, 18630, 185, 82, 156, 50, 252, 2, 198, 105); + RT_INTERFACE!{interface ISpiBusInfo(ISpiBusInfoVtbl): IInspectable(IInspectableVtbl) [IID_ISpiBusInfo] { + fn get_ChipSelectLineCount(&mut self, out: *mut i32) -> HRESULT, + fn get_MinClockFrequency(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxClockFrequency(&mut self, out: *mut i32) -> HRESULT, + fn get_SupportedDataBitLengths(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl ISpiBusInfo { + #[inline] pub unsafe fn get_chip_select_line_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChipSelectLineCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_value(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_Value)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_index(&mut self) -> Result { + #[inline] pub unsafe fn get_min_clock_frequency(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Index)(self, &mut out); + let hr = ((*self.lpVtbl).get_MinClockFrequency)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_index(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_Index)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_length(&mut self) -> Result { + #[inline] pub unsafe fn get_max_clock_frequency(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + let hr = ((*self.lpVtbl).get_MaxClockFrequency)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_length(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_Length)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_supported_data_bit_lengths(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedDataBitLengths)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IUsbDeviceClass, 85541625, 33886, 18411, 177, 42, 56, 242, 246, 23, 175, 231); - RT_INTERFACE!{interface IUsbDeviceClass(IUsbDeviceClassVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDeviceClass] { - fn get_ClassCode(&mut self, out: *mut u8) -> HRESULT, - fn put_ClassCode(&mut self, value: u8) -> HRESULT, - fn get_SubclassCode(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_SubclassCode(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ProtocolCode(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ProtocolCode(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT + RT_CLASS!{class SpiBusInfo: ISpiBusInfo} + DEFINE_IID!(IID_ISpiDeviceStatics, 2725832025, 22304, 19775, 189, 147, 86, 245, 255, 90, 88, 121); + RT_INTERFACE!{static interface ISpiDeviceStatics(ISpiDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpiDeviceStatics] { + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromFriendlyName(&mut self, friendlyName: HSTRING, out: *mut HSTRING) -> HRESULT, + fn GetBusInfo(&mut self, busId: HSTRING, out: *mut *mut SpiBusInfo) -> HRESULT, + fn FromIdAsync(&mut self, busId: HSTRING, settings: *mut SpiConnectionSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IUsbDeviceClass { - #[inline] pub unsafe fn get_class_code(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ClassCode)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl ISpiDeviceStatics { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_class_code(&mut self, value: u8) -> Result<()> { - let hr = ((*self.lpVtbl).put_ClassCode)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_device_selector_from_friendly_name(&mut self, friendlyName: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromFriendlyName)(self, friendlyName.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_subclass_code(&mut self) -> Result>> { + #[inline] pub unsafe fn get_bus_info(&mut self, busId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SubclassCode)(self, &mut out); + let hr = ((*self.lpVtbl).GetBusInfo)(self, busId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_subclass_code(&mut self, value: &super::super::foundation::IReference) -> Result<()> { - let hr = ((*self.lpVtbl).put_SubclassCode)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_code(&mut self) -> Result>> { + #[inline] pub unsafe fn from_id_async(&mut self, busId: &HStringArg, settings: &SpiConnectionSettings) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ProtocolCode)(self, &mut out); + let hr = ((*self.lpVtbl).FromIdAsync)(self, busId.get(), settings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_protocol_code(&mut self, value: &super::super::foundation::IReference) -> Result<()> { - let hr = ((*self.lpVtbl).put_ProtocolCode)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } - } } - RT_CLASS!{class UsbDeviceClass: IUsbDeviceClass} - DEFINE_IID!(IID_IUsbDeviceClassesStatics, 2987066663, 50560, 17817, 161, 101, 152, 27, 79, 208, 50, 48); - RT_INTERFACE!{static interface IUsbDeviceClassesStatics(IUsbDeviceClassesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDeviceClassesStatics] { - fn get_CdcControl(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, - fn get_Physical(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, - fn get_PersonalHealthcare(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, - fn get_ActiveSync(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, - fn get_PalmSync(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, - fn get_DeviceFirmwareUpdate(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, - fn get_Irda(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, - fn get_Measurement(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, - fn get_VendorSpecific(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT + RT_CLASS!{class SpiDevice: ISpiDevice} + RT_ACTIVATABLE!{ISpiDeviceStatics [CLSID_SpiDevice]} + DEFINE_CLSID!(CLSID_SpiDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,112,105,46,83,112,105,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_ISpiController, 2832451625, 39061, 16729, 169, 52, 135, 65, 241, 238, 109, 39); + RT_INTERFACE!{interface ISpiController(ISpiControllerVtbl): IInspectable(IInspectableVtbl) [IID_ISpiController] { + fn GetDevice(&mut self, settings: *mut SpiConnectionSettings, out: *mut *mut SpiDevice) -> HRESULT }} - impl IUsbDeviceClassesStatics { - #[inline] pub unsafe fn get_cdc_control(&mut self) -> Result> { + impl ISpiController { + #[inline] pub unsafe fn get_device(&mut self, settings: &SpiConnectionSettings) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_CdcControl)(self, &mut out); + let hr = ((*self.lpVtbl).GetDevice)(self, settings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_physical(&mut self) -> Result> { + } + DEFINE_IID!(IID_ISpiControllerStatics, 223488482, 5003, 20040, 185, 100, 79, 47, 121, 185, 197, 162); + RT_INTERFACE!{static interface ISpiControllerStatics(ISpiControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpiControllerStatics] { + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetControllersAsync(&mut self, provider: *mut provider::ISpiProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl ISpiControllerStatics { + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Physical)(self, &mut out); + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_personal_healthcare(&mut self) -> Result> { + #[inline] pub unsafe fn get_controllers_async(&mut self, provider: &provider::ISpiProvider) -> Result>>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PersonalHealthcare)(self, &mut out); + let hr = ((*self.lpVtbl).GetControllersAsync)(self, provider as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_active_sync(&mut self) -> Result> { + } + RT_CLASS!{class SpiController: ISpiController} + RT_ACTIVATABLE!{ISpiControllerStatics [CLSID_SpiController]} + DEFINE_CLSID!(CLSID_SpiController = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,112,105,46,83,112,105,67,111,110,116,114,111,108,108,101,114,0]); + DEFINE_IID!(IID_ISpiDevice, 97858925, 4534, 19769, 132, 213, 149, 223, 180, 201, 242, 206); + RT_INTERFACE!{interface ISpiDevice(ISpiDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ISpiDevice] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ConnectionSettings(&mut self, out: *mut *mut SpiConnectionSettings) -> HRESULT, + fn Write(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, + fn Read(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, + fn TransferSequential(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT, + fn TransferFullDuplex(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT + }} + impl ISpiDevice { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ActiveSync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_palm_sync(&mut self) -> Result> { + #[inline] pub unsafe fn get_connection_settings(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PalmSync)(self, &mut out); + let hr = ((*self.lpVtbl).get_ConnectionSettings)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_firmware_update(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceFirmwareUpdate)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn write(&mut self, buffer: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).Write)(self, buffer.len() as u32, buffer.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_irda(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Irda)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn read(&mut self, bufferSize: u32, buffer: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).Read)(self, bufferSize, buffer); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_measurement(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Measurement)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn transfer_sequential(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).TransferSequential)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_vendor_specific(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_VendorSpecific)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn transfer_full_duplex(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).TransferFullDuplex)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IUsbDeviceClasses, 1752143197, 39826, 19248, 151, 129, 194, 44, 85, 172, 53, 203); - RT_INTERFACE!{interface IUsbDeviceClasses(IUsbDeviceClassesVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDeviceClasses] { - +pub mod provider { // Windows.Devices.Spi.Provider +use ::prelude::*; + RT_ENUM! { enum ProviderSpiMode: i32 { + Mode0 (ProviderSpiMode_Mode0) = 0, Mode1 (ProviderSpiMode_Mode1) = 1, Mode2 (ProviderSpiMode_Mode2) = 2, Mode3 (ProviderSpiMode_Mode3) = 3, }} - RT_CLASS!{class UsbDeviceClasses: IUsbDeviceClasses} - RT_ACTIVATABLE!{IUsbDeviceClassesStatics [CLSID_UsbDeviceClasses]} - DEFINE_CLSID!(CLSID_UsbDeviceClasses = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,68,101,118,105,99,101,67,108,97,115,115,101,115,0]); - DEFINE_IID!(IID_IUsbDeviceStatics, 107709858, 2487, 17478, 133, 2, 111, 230, 220, 170, 115, 9); - RT_INTERFACE!{static interface IUsbDeviceStatics(IUsbDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDeviceStatics] { - fn GetDeviceSelector(&mut self, vendorId: u32, productId: u32, winUsbInterfaceClass: Guid, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorGuidOnly(&mut self, winUsbInterfaceClass: Guid, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorVidPidOnly(&mut self, vendorId: u32, productId: u32, out: *mut HSTRING) -> HRESULT, - fn GetDeviceClassSelector(&mut self, usbClass: *mut UsbDeviceClass, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_ENUM! { enum ProviderSpiSharingMode: i32 { + Exclusive (ProviderSpiSharingMode_Exclusive) = 0, Shared (ProviderSpiSharingMode_Shared) = 1, }} - impl IUsbDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&mut self, vendorId: u32, productId: u32, winUsbInterfaceClass: Guid) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, vendorId, productId, winUsbInterfaceClass, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_guid_only(&mut self, winUsbInterfaceClass: Guid) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorGuidOnly)(self, winUsbInterfaceClass, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_vid_pid_only(&mut self, vendorId: u32, productId: u32) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorVidPidOnly)(self, vendorId, productId, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_class_selector(&mut self, usbClass: &UsbDeviceClass) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceClassSelector)(self, usbClass as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + DEFINE_IID!(IID_IProviderSpiConnectionSettingsFactory, 1715825498, 3193, 17379, 159, 60, 229, 151, 128, 172, 24, 250); + RT_INTERFACE!{static interface IProviderSpiConnectionSettingsFactory(IProviderSpiConnectionSettingsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IProviderSpiConnectionSettingsFactory] { + fn Create(&mut self, chipSelectLine: i32, out: *mut *mut ProviderSpiConnectionSettings) -> HRESULT + }} + impl IProviderSpiConnectionSettingsFactory { + #[inline] pub unsafe fn create(&mut self, chipSelectLine: i32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).Create)(self, chipSelectLine, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class UsbDevice: IUsbDevice} - RT_ACTIVATABLE!{IUsbDeviceStatics [CLSID_UsbDevice]} - DEFINE_CLSID!(CLSID_UsbDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,68,101,118,105,99,101,0]); - RT_CLASS!{class UsbInterface: IUsbInterface} - RT_CLASS!{class UsbDeviceDescriptor: IUsbDeviceDescriptor} - RT_CLASS!{class UsbConfiguration: IUsbConfiguration} - DEFINE_IID!(IID_IUsbDeviceDescriptor, 524866038, 47767, 17186, 185, 44, 181, 177, 137, 33, 101, 136); - RT_INTERFACE!{interface IUsbDeviceDescriptor(IUsbDeviceDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDeviceDescriptor] { - fn get_BcdUsb(&mut self, out: *mut u32) -> HRESULT, - fn get_MaxPacketSize0(&mut self, out: *mut u8) -> HRESULT, - fn get_VendorId(&mut self, out: *mut u32) -> HRESULT, - fn get_ProductId(&mut self, out: *mut u32) -> HRESULT, - fn get_BcdDeviceRevision(&mut self, out: *mut u32) -> HRESULT, - fn get_NumberOfConfigurations(&mut self, out: *mut u8) -> HRESULT + RT_CLASS!{class ProviderSpiConnectionSettings: IProviderSpiConnectionSettings [IProviderSpiConnectionSettingsFactory] [CLSID_ProviderSpiConnectionSettings]} + DEFINE_CLSID!(CLSID_ProviderSpiConnectionSettings = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,112,105,46,80,114,111,118,105,100,101,114,46,80,114,111,118,105,100,101,114,83,112,105,67,111,110,110,101,99,116,105,111,110,83,101,116,116,105,110,103,115,0]); + DEFINE_IID!(IID_IProviderSpiConnectionSettings, 4127409488, 42306, 20160, 150, 1, 164, 221, 104, 248, 105, 123); + RT_INTERFACE!{interface IProviderSpiConnectionSettings(IProviderSpiConnectionSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IProviderSpiConnectionSettings] { + fn get_ChipSelectLine(&mut self, out: *mut i32) -> HRESULT, + fn put_ChipSelectLine(&mut self, value: i32) -> HRESULT, + fn get_Mode(&mut self, out: *mut ProviderSpiMode) -> HRESULT, + fn put_Mode(&mut self, value: ProviderSpiMode) -> HRESULT, + fn get_DataBitLength(&mut self, out: *mut i32) -> HRESULT, + fn put_DataBitLength(&mut self, value: i32) -> HRESULT, + fn get_ClockFrequency(&mut self, out: *mut i32) -> HRESULT, + fn put_ClockFrequency(&mut self, value: i32) -> HRESULT, + fn get_SharingMode(&mut self, out: *mut ProviderSpiSharingMode) -> HRESULT, + fn put_SharingMode(&mut self, value: ProviderSpiSharingMode) -> HRESULT }} - impl IUsbDeviceDescriptor { - #[inline] pub unsafe fn get_bcd_usb(&mut self) -> Result { + impl IProviderSpiConnectionSettings { + #[inline] pub unsafe fn get_chip_select_line(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BcdUsb)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChipSelectLine)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_packet_size0(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxPacketSize0)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_chip_select_line(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ChipSelectLine)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_vendor_id(&mut self) -> Result { + #[inline] pub unsafe fn get_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_VendorId)(self, &mut out); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_product_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ProductId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_mode(&mut self, value: ProviderSpiMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_bcd_device_revision(&mut self) -> Result { + #[inline] pub unsafe fn get_data_bit_length(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BcdDeviceRevision)(self, &mut out); + let hr = ((*self.lpVtbl).get_DataBitLength)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_number_of_configurations(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_NumberOfConfigurations)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_data_bit_length(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataBitLength)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IUsbConfigurationDescriptor, 4061621650, 46146, 16506, 130, 7, 125, 100, 108, 3, 133, 243); - RT_INTERFACE!{interface IUsbConfigurationDescriptor(IUsbConfigurationDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbConfigurationDescriptor] { - fn get_ConfigurationValue(&mut self, out: *mut u8) -> HRESULT, - fn get_MaxPowerMilliamps(&mut self, out: *mut u32) -> HRESULT, - fn get_SelfPowered(&mut self, out: *mut bool) -> HRESULT, - fn get_RemoteWakeup(&mut self, out: *mut bool) -> HRESULT - }} - impl IUsbConfigurationDescriptor { - #[inline] pub unsafe fn get_configuration_value(&mut self) -> Result { + #[inline] pub unsafe fn get_clock_frequency(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ConfigurationValue)(self, &mut out); + let hr = ((*self.lpVtbl).get_ClockFrequency)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_power_milliamps(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxPowerMilliamps)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_clock_frequency(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ClockFrequency)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_self_powered(&mut self) -> Result { + #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SelfPowered)(self, &mut out); + let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_remote_wakeup(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_RemoteWakeup)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn set_sharing_mode(&mut self, value: ProviderSpiSharingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_SharingMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IUsbConfigurationDescriptorStatics, 1112337811, 59200, 16545, 146, 189, 218, 18, 14, 160, 73, 20); - RT_INTERFACE!{static interface IUsbConfigurationDescriptorStatics(IUsbConfigurationDescriptorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbConfigurationDescriptorStatics] { - fn TryParse(&mut self, descriptor: *mut UsbDescriptor, parsed: *mut *mut UsbConfigurationDescriptor, out: *mut bool) -> HRESULT, - fn Parse(&mut self, descriptor: *mut UsbDescriptor, out: *mut *mut UsbConfigurationDescriptor) -> HRESULT + DEFINE_IID!(IID_ISpiControllerProvider, 3244844292, 718, 16934, 163, 133, 79, 17, 251, 4, 180, 27); + RT_INTERFACE!{interface ISpiControllerProvider(ISpiControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_ISpiControllerProvider] { + fn GetDeviceProvider(&mut self, settings: *mut ProviderSpiConnectionSettings, out: *mut *mut ISpiDeviceProvider) -> HRESULT }} - impl IUsbConfigurationDescriptorStatics { - #[inline] pub unsafe fn try_parse(&mut self, descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { - let mut parsed = null_mut(); let mut out = zeroed(); - let hr = ((*self.lpVtbl).TryParse)(self, descriptor as *const _ as *mut _, &mut parsed, &mut out); - if hr == S_OK { Ok((ComPtr::wrap(parsed), out)) } else { err(hr) } - } - #[inline] pub unsafe fn parse(&mut self, descriptor: &UsbDescriptor) -> Result> { + impl ISpiControllerProvider { + #[inline] pub unsafe fn get_device_provider(&mut self, settings: &ProviderSpiConnectionSettings) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Parse)(self, descriptor as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).GetDeviceProvider)(self, settings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class UsbDescriptor: IUsbDescriptor} - RT_CLASS!{class UsbConfigurationDescriptor: IUsbConfigurationDescriptor} - RT_ACTIVATABLE!{IUsbConfigurationDescriptorStatics [CLSID_UsbConfigurationDescriptor]} - DEFINE_CLSID!(CLSID_UsbConfigurationDescriptor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,67,111,110,102,105,103,117,114,97,116,105,111,110,68,101,115,99,114,105,112,116,111,114,0]); - DEFINE_IID!(IID_IUsbInterfaceDescriptor, 429289671, 47086, 20368, 140, 213, 148, 162, 226, 87, 89, 138); - RT_INTERFACE!{interface IUsbInterfaceDescriptor(IUsbInterfaceDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterfaceDescriptor] { - fn get_ClassCode(&mut self, out: *mut u8) -> HRESULT, - fn get_SubclassCode(&mut self, out: *mut u8) -> HRESULT, - fn get_ProtocolCode(&mut self, out: *mut u8) -> HRESULT, - fn get_AlternateSettingNumber(&mut self, out: *mut u8) -> HRESULT, - fn get_InterfaceNumber(&mut self, out: *mut u8) -> HRESULT + DEFINE_IID!(IID_ISpiProvider, 2528403938, 30676, 18638, 170, 160, 117, 113, 90, 131, 98, 207); + RT_INTERFACE!{interface ISpiProvider(ISpiProviderVtbl): IInspectable(IInspectableVtbl) [IID_ISpiProvider] { + fn GetControllersAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT }} - impl IUsbInterfaceDescriptor { - #[inline] pub unsafe fn get_class_code(&mut self) -> Result { + impl ISpiProvider { + #[inline] pub unsafe fn get_controllers_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetControllersAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpiDeviceProvider, 219952195, 12363, 16476, 180, 247, 245, 171, 16, 116, 70, 30); + RT_INTERFACE!{interface ISpiDeviceProvider(ISpiDeviceProviderVtbl): IInspectable(IInspectableVtbl) [IID_ISpiDeviceProvider] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ConnectionSettings(&mut self, out: *mut *mut ProviderSpiConnectionSettings) -> HRESULT, + fn Write(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, + fn Read(&mut self, bufferSize: u32, buffer: *mut u8) -> HRESULT, + fn TransferSequential(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT, + fn TransferFullDuplex(&mut self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT + }} + impl ISpiDeviceProvider { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_connection_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConnectionSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write(&mut self, buffer: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).Write)(self, buffer.len() as u32, buffer.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn read(&mut self, bufferSize: u32, buffer: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).Read)(self, bufferSize, buffer); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn transfer_sequential(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).TransferSequential)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn transfer_full_duplex(&mut self, writeBuffer: &[u8], readBufferSize: u32, readBuffer: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).TransferFullDuplex)(self, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBufferSize, readBuffer); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Devices.Spi.Provider +} // Windows.Devices.Spi +pub mod custom { // Windows.Devices.Custom +use ::prelude::*; + RT_STRUCT! { struct CustomDeviceContract { + + }} + DEFINE_IID!(IID_IKnownDeviceTypesStatics, 3998513602, 21576, 17882, 173, 27, 36, 148, 140, 35, 144, 148); + RT_INTERFACE!{static interface IKnownDeviceTypesStatics(IKnownDeviceTypesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownDeviceTypesStatics] { + fn get_Unknown(&mut self, out: *mut u16) -> HRESULT + }} + impl IKnownDeviceTypesStatics { + #[inline] pub unsafe fn get_unknown(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ClassCode)(self, &mut out); + let hr = ((*self.lpVtbl).get_Unknown)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_subclass_code(&mut self) -> Result { + } + RT_ACTIVATABLE!{IKnownDeviceTypesStatics [CLSID_KnownDeviceTypes]} + DEFINE_CLSID!(CLSID_KnownDeviceTypes = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,67,117,115,116,111,109,46,75,110,111,119,110,68,101,118,105,99,101,84,121,112,101,115,0]); + RT_ENUM! { enum IOControlAccessMode: i32 { + Any (IOControlAccessMode_Any) = 0, Read (IOControlAccessMode_Read) = 1, Write (IOControlAccessMode_Write) = 2, ReadWrite (IOControlAccessMode_ReadWrite) = 3, + }} + RT_ENUM! { enum IOControlBufferingMethod: i32 { + Buffered (IOControlBufferingMethod_Buffered) = 0, DirectInput (IOControlBufferingMethod_DirectInput) = 1, DirectOutput (IOControlBufferingMethod_DirectOutput) = 2, Neither (IOControlBufferingMethod_Neither) = 3, + }} + DEFINE_IID!(IID_IIOControlCode, 244668903, 24776, 17269, 167, 97, 127, 136, 8, 6, 108, 96); + RT_INTERFACE!{interface IIOControlCode(IIOControlCodeVtbl): IInspectable(IInspectableVtbl) [IID_IIOControlCode] { + fn get_AccessMode(&mut self, out: *mut IOControlAccessMode) -> HRESULT, + fn get_BufferingMethod(&mut self, out: *mut IOControlBufferingMethod) -> HRESULT, + fn get_Function(&mut self, out: *mut u16) -> HRESULT, + fn get_DeviceType(&mut self, out: *mut u16) -> HRESULT, + fn get_ControlCode(&mut self, out: *mut u32) -> HRESULT + }} + impl IIOControlCode { + #[inline] pub unsafe fn get_access_mode(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SubclassCode)(self, &mut out); + let hr = ((*self.lpVtbl).get_AccessMode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_protocol_code(&mut self) -> Result { + #[inline] pub unsafe fn get_buffering_method(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ProtocolCode)(self, &mut out); + let hr = ((*self.lpVtbl).get_BufferingMethod)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_alternate_setting_number(&mut self) -> Result { + #[inline] pub unsafe fn get_function(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AlternateSettingNumber)(self, &mut out); + let hr = ((*self.lpVtbl).get_Function)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_interface_number(&mut self) -> Result { + #[inline] pub unsafe fn get_device_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InterfaceNumber)(self, &mut out); + let hr = ((*self.lpVtbl).get_DeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_control_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ControlCode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IUsbInterfaceDescriptorStatics, 3813318645, 30678, 18614, 176, 190, 22, 198, 66, 35, 22, 254); - RT_INTERFACE!{static interface IUsbInterfaceDescriptorStatics(IUsbInterfaceDescriptorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterfaceDescriptorStatics] { - fn TryParse(&mut self, descriptor: *mut UsbDescriptor, parsed: *mut *mut UsbInterfaceDescriptor, out: *mut bool) -> HRESULT, - fn Parse(&mut self, descriptor: *mut UsbDescriptor, out: *mut *mut UsbInterfaceDescriptor) -> HRESULT + DEFINE_IID!(IID_IIOControlCodeFactory, 2238348528, 19473, 17582, 175, 198, 184, 212, 162, 18, 120, 143); + RT_INTERFACE!{static interface IIOControlCodeFactory(IIOControlCodeFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IIOControlCodeFactory] { + fn CreateIOControlCode(&mut self, deviceType: u16, function: u16, accessMode: IOControlAccessMode, bufferingMethod: IOControlBufferingMethod, out: *mut *mut IOControlCode) -> HRESULT }} - impl IUsbInterfaceDescriptorStatics { - #[inline] pub unsafe fn try_parse(&mut self, descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { - let mut parsed = null_mut(); let mut out = zeroed(); - let hr = ((*self.lpVtbl).TryParse)(self, descriptor as *const _ as *mut _, &mut parsed, &mut out); - if hr == S_OK { Ok((ComPtr::wrap(parsed), out)) } else { err(hr) } - } - #[inline] pub unsafe fn parse(&mut self, descriptor: &UsbDescriptor) -> Result> { + impl IIOControlCodeFactory { + #[inline] pub unsafe fn create_iocontrol_code(&mut self, deviceType: u16, function: u16, accessMode: IOControlAccessMode, bufferingMethod: IOControlBufferingMethod) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Parse)(self, descriptor as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).CreateIOControlCode)(self, deviceType, function, accessMode, bufferingMethod, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class UsbInterfaceDescriptor: IUsbInterfaceDescriptor} - RT_ACTIVATABLE!{IUsbInterfaceDescriptorStatics [CLSID_UsbInterfaceDescriptor]} - DEFINE_CLSID!(CLSID_UsbInterfaceDescriptor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,73,110,116,101,114,102,97,99,101,68,101,115,99,114,105,112,116,111,114,0]); - DEFINE_IID!(IID_IUsbEndpointDescriptor, 1799906009, 36343, 19264, 172, 131, 87, 143, 19, 159, 5, 117); - RT_INTERFACE!{interface IUsbEndpointDescriptor(IUsbEndpointDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbEndpointDescriptor] { - fn get_EndpointNumber(&mut self, out: *mut u8) -> HRESULT, - fn get_Direction(&mut self, out: *mut UsbTransferDirection) -> HRESULT, - fn get_EndpointType(&mut self, out: *mut UsbEndpointType) -> HRESULT, - fn get_AsBulkInEndpointDescriptor(&mut self, out: *mut *mut UsbBulkInEndpointDescriptor) -> HRESULT, - fn get_AsInterruptInEndpointDescriptor(&mut self, out: *mut *mut UsbInterruptInEndpointDescriptor) -> HRESULT, - fn get_AsBulkOutEndpointDescriptor(&mut self, out: *mut *mut UsbBulkOutEndpointDescriptor) -> HRESULT, - fn get_AsInterruptOutEndpointDescriptor(&mut self, out: *mut *mut UsbInterruptOutEndpointDescriptor) -> HRESULT + RT_CLASS!{class IOControlCode: IIOControlCode [IIOControlCodeFactory] [CLSID_IOControlCode]} + DEFINE_CLSID!(CLSID_IOControlCode = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,67,117,115,116,111,109,46,73,79,67,111,110,116,114,111,108,67,111,100,101,0]); + RT_ENUM! { enum DeviceAccessMode: i32 { + Read (DeviceAccessMode_Read) = 0, Write (DeviceAccessMode_Write) = 1, ReadWrite (DeviceAccessMode_ReadWrite) = 2, }} - impl IUsbEndpointDescriptor { - #[inline] pub unsafe fn get_endpoint_number(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_EndpointNumber)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_direction(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Direction)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_endpoint_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_EndpointType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + RT_ENUM! { enum DeviceSharingMode: i32 { + Shared (DeviceSharingMode_Shared) = 0, Exclusive (DeviceSharingMode_Exclusive) = 1, + }} + DEFINE_IID!(IID_ICustomDeviceStatics, 3357672210, 61260, 18097, 165, 142, 238, 179, 8, 220, 137, 23); + RT_INTERFACE!{static interface ICustomDeviceStatics(ICustomDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICustomDeviceStatics] { + fn GetDeviceSelector(&mut self, classGuid: Guid, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, desiredAccess: DeviceAccessMode, sharingMode: DeviceSharingMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICustomDeviceStatics { + #[inline] pub unsafe fn get_device_selector(&mut self, classGuid: Guid) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, classGuid, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_as_bulk_in_endpoint_descriptor(&mut self) -> Result> { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg, desiredAccess: DeviceAccessMode, sharingMode: DeviceSharingMode) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AsBulkInEndpointDescriptor)(self, &mut out); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), desiredAccess, sharingMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_as_interrupt_in_endpoint_descriptor(&mut self) -> Result> { + } + RT_CLASS!{class CustomDevice: ICustomDevice} + RT_ACTIVATABLE!{ICustomDeviceStatics [CLSID_CustomDevice]} + DEFINE_CLSID!(CLSID_CustomDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,67,117,115,116,111,109,46,67,117,115,116,111,109,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_ICustomDevice, 3710919967, 50315, 17341, 188, 177, 222, 200, 143, 21, 20, 62); + RT_INTERFACE!{interface ICustomDevice(ICustomDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ICustomDevice] { + #[cfg(feature="windows.storage")] fn get_InputStream(&mut self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_OutputStream(&mut self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, + #[cfg(feature="windows.storage")] fn SendIOControlAsync(&mut self, ioControlCode: *mut IIOControlCode, inputBuffer: *mut super::super::storage::streams::IBuffer, outputBuffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn TrySendIOControlAsync(&mut self, ioControlCode: *mut IIOControlCode, inputBuffer: *mut super::super::storage::streams::IBuffer, outputBuffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICustomDevice { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_input_stream(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AsInterruptInEndpointDescriptor)(self, &mut out); + let hr = ((*self.lpVtbl).get_InputStream)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_as_bulk_out_endpoint_descriptor(&mut self) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AsBulkOutEndpointDescriptor)(self, &mut out); + let hr = ((*self.lpVtbl).get_OutputStream)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_as_interrupt_out_endpoint_descriptor(&mut self) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_iocontrol_async(&mut self, ioControlCode: &IIOControlCode, inputBuffer: &super::super::storage::streams::IBuffer, outputBuffer: &super::super::storage::streams::IBuffer) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AsInterruptOutEndpointDescriptor)(self, &mut out); + let hr = ((*self.lpVtbl).SendIOControlAsync)(self, ioControlCode as *const _ as *mut _, inputBuffer as *const _ as *mut _, outputBuffer as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class UsbBulkInEndpointDescriptor: IUsbBulkInEndpointDescriptor} - RT_CLASS!{class UsbInterruptInEndpointDescriptor: IUsbInterruptInEndpointDescriptor} - RT_CLASS!{class UsbBulkOutEndpointDescriptor: IUsbBulkOutEndpointDescriptor} - RT_CLASS!{class UsbInterruptOutEndpointDescriptor: IUsbInterruptOutEndpointDescriptor} - DEFINE_IID!(IID_IUsbEndpointDescriptorStatics, 3364925953, 39530, 18782, 168, 44, 41, 91, 158, 112, 129, 6); - RT_INTERFACE!{static interface IUsbEndpointDescriptorStatics(IUsbEndpointDescriptorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbEndpointDescriptorStatics] { - fn TryParse(&mut self, descriptor: *mut UsbDescriptor, parsed: *mut *mut UsbEndpointDescriptor, out: *mut bool) -> HRESULT, - fn Parse(&mut self, descriptor: *mut UsbDescriptor, out: *mut *mut UsbEndpointDescriptor) -> HRESULT - }} - impl IUsbEndpointDescriptorStatics { - #[inline] pub unsafe fn try_parse(&mut self, descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { - let mut parsed = null_mut(); let mut out = zeroed(); - let hr = ((*self.lpVtbl).TryParse)(self, descriptor as *const _ as *mut _, &mut parsed, &mut out); - if hr == S_OK { Ok((ComPtr::wrap(parsed), out)) } else { err(hr) } - } - #[inline] pub unsafe fn parse(&mut self, descriptor: &UsbDescriptor) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn try_send_iocontrol_async(&mut self, ioControlCode: &IIOControlCode, inputBuffer: &super::super::storage::streams::IBuffer, outputBuffer: &super::super::storage::streams::IBuffer) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Parse)(self, descriptor as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).TrySendIOControlAsync)(self, ioControlCode as *const _ as *mut _, inputBuffer as *const _ as *mut _, outputBuffer as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class UsbEndpointDescriptor: IUsbEndpointDescriptor} - RT_ACTIVATABLE!{IUsbEndpointDescriptorStatics [CLSID_UsbEndpointDescriptor]} - DEFINE_CLSID!(CLSID_UsbEndpointDescriptor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,69,110,100,112,111,105,110,116,68,101,115,99,114,105,112,116,111,114,0]); - DEFINE_IID!(IID_IUsbDescriptor, 176812566, 24477, 18548, 137, 4, 218, 154, 211, 245, 82, 143); - RT_INTERFACE!{interface IUsbDescriptor(IUsbDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDescriptor] { - fn get_Length(&mut self, out: *mut u8) -> HRESULT, - fn get_DescriptorType(&mut self, out: *mut u8) -> HRESULT, - #[cfg(feature="windows.storage")] fn ReadDescriptorBuffer(&mut self, buffer: *mut super::super::storage::streams::IBuffer) -> HRESULT +} // Windows.Devices.Custom +pub mod printers { // Windows.Devices.Printers +use ::prelude::*; + RT_STRUCT! { struct PrintersContract { + }} - impl IUsbDescriptor { - #[inline] pub unsafe fn get_length(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Length)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_descriptor_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DescriptorType)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + DEFINE_IID!(IID_IPrint3DDeviceStatics, 4259537418, 26573, 16823, 163, 68, 81, 80, 161, 253, 117, 181); + RT_INTERFACE!{static interface IPrint3DDeviceStatics(IPrint3DDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DDeviceStatics] { + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPrint3DDeviceStatics { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn read_descriptor_buffer(&mut self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).ReadDescriptorBuffer)(self, buffer as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IUsbInterruptInEventArgs, 3081781394, 5144, 18742, 130, 9, 41, 156, 245, 96, 85, 131); - RT_INTERFACE!{interface IUsbInterruptInEventArgs(IUsbInterruptInEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterruptInEventArgs] { - #[cfg(feature="windows.storage")] fn get_InterruptData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + RT_CLASS!{class Print3DDevice: IPrint3DDevice} + RT_ACTIVATABLE!{IPrint3DDeviceStatics [CLSID_Print3DDevice]} + DEFINE_CLSID!(CLSID_Print3DDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,114,105,110,116,101,114,115,46,80,114,105,110,116,51,68,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_IPrint3DDevice, 68959513, 38675, 17058, 152, 19, 125, 195, 51, 116, 40, 211); + RT_INTERFACE!{interface IPrint3DDevice(IPrint3DDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DDevice] { + fn get_PrintSchema(&mut self, out: *mut *mut PrintSchema) -> HRESULT }} - impl IUsbInterruptInEventArgs { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_interrupt_data(&mut self) -> Result> { + impl IPrint3DDevice { + #[inline] pub unsafe fn get_print_schema(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InterruptData)(self, &mut out); + let hr = ((*self.lpVtbl).get_PrintSchema)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class UsbInterruptInEventArgs: IUsbInterruptInEventArgs} - RT_ENUM! { enum UsbReadOptions: u32 { - None (UsbReadOptions_None) = 0, AutoClearStall (UsbReadOptions_AutoClearStall) = 1, OverrideAutomaticBufferManagement (UsbReadOptions_OverrideAutomaticBufferManagement) = 2, IgnoreShortPacket (UsbReadOptions_IgnoreShortPacket) = 4, AllowPartialReads (UsbReadOptions_AllowPartialReads) = 8, - }} - RT_ENUM! { enum UsbWriteOptions: u32 { - None (UsbWriteOptions_None) = 0, AutoClearStall (UsbWriteOptions_AutoClearStall) = 1, ShortPacketTerminate (UsbWriteOptions_ShortPacketTerminate) = 2, - }} - DEFINE_IID!(IID_IUsbBulkInPipe, 4028443963, 17736, 19792, 179, 38, 216, 44, 218, 190, 18, 32); - RT_INTERFACE!{interface IUsbBulkInPipe(IUsbBulkInPipeVtbl): IInspectable(IInspectableVtbl) [IID_IUsbBulkInPipe] { - fn get_MaxTransferSizeBytes(&mut self, out: *mut u32) -> HRESULT, - fn get_EndpointDescriptor(&mut self, out: *mut *mut UsbBulkInEndpointDescriptor) -> HRESULT, - fn ClearStallAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn put_ReadOptions(&mut self, value: UsbReadOptions) -> HRESULT, - fn get_ReadOptions(&mut self, out: *mut UsbReadOptions) -> HRESULT, - fn FlushBuffer(&mut self) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_InputStream(&mut self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT + RT_CLASS!{class PrintSchema: IPrintSchema} + DEFINE_IID!(IID_IPrintSchema, 3266937622, 9912, 19451, 129, 56, 159, 150, 44, 34, 163, 91); + RT_INTERFACE!{interface IPrintSchema(IPrintSchemaVtbl): IInspectable(IInspectableVtbl) [IID_IPrintSchema] { + #[cfg(feature="windows.storage")] fn GetDefaultPrintTicketAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetCapabilitiesAsync(&mut self, constrainTicket: *mut super::super::storage::streams::IRandomAccessStreamWithContentType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn MergeAndValidateWithDefaultPrintTicketAsync(&mut self, deltaTicket: *mut super::super::storage::streams::IRandomAccessStreamWithContentType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IUsbBulkInPipe { - #[inline] pub unsafe fn get_max_transfer_size_bytes(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxTransferSizeBytes)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_endpoint_descriptor(&mut self) -> Result> { + impl IPrintSchema { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_default_print_ticket_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self, &mut out); + let hr = ((*self.lpVtbl).GetDefaultPrintTicketAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn clear_stall_async(&mut self) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_capabilities_async(&mut self, constrainTicket: &super::super::storage::streams::IRandomAccessStreamWithContentType) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ClearStallAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetCapabilitiesAsync)(self, constrainTicket as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_read_options(&mut self, value: UsbReadOptions) -> Result<()> { - let hr = ((*self.lpVtbl).put_ReadOptions)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn merge_and_validate_with_default_print_ticket_async(&mut self, deltaTicket: &super::super::storage::streams::IRandomAccessStreamWithContentType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MergeAndValidateWithDefaultPrintTicketAsync)(self, deltaTicket as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_read_options(&mut self) -> Result { + } +pub mod extensions { // Windows.Devices.Printers.Extensions +use ::prelude::*; + RT_ENUM! { enum Print3DWorkflowStatus: i32 { + Abandoned (Print3DWorkflowStatus_Abandoned) = 0, Canceled (Print3DWorkflowStatus_Canceled) = 1, Failed (Print3DWorkflowStatus_Failed) = 2, Slicing (Print3DWorkflowStatus_Slicing) = 3, Submitted (Print3DWorkflowStatus_Submitted) = 4, + }} + RT_ENUM! { enum Print3DWorkflowDetail: i32 { + Unknown (Print3DWorkflowDetail_Unknown) = 0, ModelExceedsPrintBed (Print3DWorkflowDetail_ModelExceedsPrintBed) = 1, UploadFailed (Print3DWorkflowDetail_UploadFailed) = 2, InvalidMaterialSelection (Print3DWorkflowDetail_InvalidMaterialSelection) = 3, InvalidModel (Print3DWorkflowDetail_InvalidModel) = 4, ModelNotManifold (Print3DWorkflowDetail_ModelNotManifold) = 5, InvalidPrintTicket (Print3DWorkflowDetail_InvalidPrintTicket) = 6, + }} + DEFINE_IID!(IID_IPrint3DWorkflowPrintRequestedEventArgs, 435734616, 23240, 19285, 138, 95, 230, 21, 103, 218, 251, 77); + RT_INTERFACE!{interface IPrint3DWorkflowPrintRequestedEventArgs(IPrint3DWorkflowPrintRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DWorkflowPrintRequestedEventArgs] { + fn get_Status(&mut self, out: *mut Print3DWorkflowStatus) -> HRESULT, + fn SetExtendedStatus(&mut self, value: Print3DWorkflowDetail) -> HRESULT, + fn SetSource(&mut self, source: *mut IInspectable) -> HRESULT, + fn SetSourceChanged(&mut self, value: bool) -> HRESULT + }} + impl IPrint3DWorkflowPrintRequestedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ReadOptions)(self, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn flush_buffer(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).FlushBuffer)(self); + #[inline] pub unsafe fn set_extended_status(&mut self, value: Print3DWorkflowDetail) -> Result<()> { + let hr = ((*self.lpVtbl).SetExtendedStatus)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_input_stream(&mut self) -> Result> { + #[inline] pub unsafe fn set_source(&mut self, source: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetSource)(self, source as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_source_changed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetSourceChanged)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrint3DWorkflowPrinterChangedEventArgs, 1159881730, 38396, 18503, 147, 179, 19, 77, 191, 92, 96, 247); + RT_INTERFACE!{interface IPrint3DWorkflowPrinterChangedEventArgs(IPrint3DWorkflowPrinterChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DWorkflowPrinterChangedEventArgs] { + fn get_NewDeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPrint3DWorkflowPrinterChangedEventArgs { + #[inline] pub unsafe fn get_new_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InputStream)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_NewDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IUsbInterruptInPipe, 4194332950, 34007, 18631, 138, 63, 76, 11, 35, 95, 46, 166); - RT_INTERFACE!{interface IUsbInterruptInPipe(IUsbInterruptInPipeVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterruptInPipe] { - fn get_EndpointDescriptor(&mut self, out: *mut *mut UsbInterruptInEndpointDescriptor) -> HRESULT, - fn ClearStallAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn add_DataReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DataReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + RT_CLASS!{class Print3DWorkflowPrintRequestedEventArgs: IPrint3DWorkflowPrintRequestedEventArgs} + RT_CLASS!{class Print3DWorkflowPrinterChangedEventArgs: IPrint3DWorkflowPrinterChangedEventArgs} + DEFINE_IID!(IID_IPrint3DWorkflow, 3312415933, 13929, 19046, 171, 66, 200, 21, 25, 48, 205, 52); + RT_INTERFACE!{interface IPrint3DWorkflow(IPrint3DWorkflowVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DWorkflow] { + fn get_DeviceID(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetPrintModelPackage(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_IsPrintReady(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPrintReady(&mut self, value: bool) -> HRESULT, + fn add_PrintRequested(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PrintRequested(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT }} - impl IUsbInterruptInPipe { - #[inline] pub unsafe fn get_endpoint_descriptor(&mut self) -> Result> { + impl IPrint3DWorkflow { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DeviceID)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn clear_stall_async(&mut self) -> Result> { + #[inline] pub unsafe fn get_print_model_package(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ClearStallAsync)(self, &mut out); + let hr = ((*self.lpVtbl).GetPrintModelPackage)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_data_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_is_print_ready(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_DataReceived)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_IsPrintReady)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_data_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_DataReceived)(self, token); + #[inline] pub unsafe fn set_is_print_ready(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPrintReady)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class UsbInterruptInPipe: IUsbInterruptInPipe} - DEFINE_IID!(IID_IUsbBulkOutPipe, 2833903214, 277, 17834, 139, 33, 55, 178, 37, 188, 206, 231); - RT_INTERFACE!{interface IUsbBulkOutPipe(IUsbBulkOutPipeVtbl): IInspectable(IInspectableVtbl) [IID_IUsbBulkOutPipe] { - fn get_EndpointDescriptor(&mut self, out: *mut *mut UsbBulkOutEndpointDescriptor) -> HRESULT, - fn ClearStallAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn put_WriteOptions(&mut self, value: UsbWriteOptions) -> HRESULT, - fn get_WriteOptions(&mut self, out: *mut UsbWriteOptions) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_OutputStream(&mut self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT - }} - impl IUsbBulkOutPipe { - #[inline] pub unsafe fn get_endpoint_descriptor(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clear_stall_async(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ClearStallAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn add_print_requested(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PrintRequested)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_write_options(&mut self, value: UsbWriteOptions) -> Result<()> { - let hr = ((*self.lpVtbl).put_WriteOptions)(self, value); + #[inline] pub unsafe fn remove_print_requested(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PrintRequested)(self, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_write_options(&mut self) -> Result { + } + RT_CLASS!{class Print3DWorkflow: IPrint3DWorkflow} + DEFINE_IID!(IID_IPrint3DWorkflow2, 2728838479, 35521, 18712, 151, 65, 227, 79, 48, 4, 35, 158); + RT_INTERFACE!{interface IPrint3DWorkflow2(IPrint3DWorkflow2Vtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DWorkflow2] { + fn add_PrinterChanged(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PrinterChanged(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPrint3DWorkflow2 { + #[inline] pub unsafe fn add_printer_changed(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_WriteOptions)(self, &mut out); + let hr = ((*self.lpVtbl).add_PrinterChanged)(self, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_OutputStream)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_printer_changed(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PrinterChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IUsbInterruptOutPipe, 3917793449, 43769, 18896, 185, 108, 246, 97, 171, 74, 127, 149); - RT_INTERFACE!{interface IUsbInterruptOutPipe(IUsbInterruptOutPipeVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterruptOutPipe] { - fn get_EndpointDescriptor(&mut self, out: *mut *mut UsbInterruptOutEndpointDescriptor) -> HRESULT, - fn ClearStallAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn put_WriteOptions(&mut self, value: UsbWriteOptions) -> HRESULT, - fn get_WriteOptions(&mut self, out: *mut UsbWriteOptions) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_OutputStream(&mut self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT + RT_STRUCT! { struct ExtensionsContract { + }} - impl IUsbInterruptOutPipe { - #[inline] pub unsafe fn get_endpoint_descriptor(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clear_stall_async(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ClearStallAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + DEFINE_IID!(IID_IPrintTaskConfigurationSaveRequestedDeferral, 3914978664, 63273, 17572, 135, 29, 189, 6, 40, 105, 106, 51); + RT_INTERFACE!{interface IPrintTaskConfigurationSaveRequestedDeferral(IPrintTaskConfigurationSaveRequestedDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskConfigurationSaveRequestedDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IPrintTaskConfigurationSaveRequestedDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn set_write_options(&mut self, value: UsbWriteOptions) -> Result<()> { - let hr = ((*self.lpVtbl).put_WriteOptions)(self, value); + } + RT_CLASS!{class PrintTaskConfigurationSaveRequestedDeferral: IPrintTaskConfigurationSaveRequestedDeferral} + DEFINE_IID!(IID_IPrintTaskConfigurationSaveRequest, 4004458443, 25118, 19298, 172, 119, 178, 129, 204, 224, 141, 96); + RT_INTERFACE!{interface IPrintTaskConfigurationSaveRequest(IPrintTaskConfigurationSaveRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskConfigurationSaveRequest] { + fn Cancel(&mut self) -> HRESULT, + fn Save(&mut self, printerExtensionContext: *mut IInspectable) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut PrintTaskConfigurationSaveRequestedDeferral) -> HRESULT, + fn get_Deadline(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + }} + impl IPrintTaskConfigurationSaveRequest { + #[inline] pub unsafe fn cancel(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Cancel)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_write_options(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_WriteOptions)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn save(&mut self, printerExtensionContext: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).Save)(self, printerExtensionContext as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream(&mut self) -> Result> { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_OutputStream)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn get_deadline(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } } - RT_CLASS!{class UsbBulkInPipe: IUsbBulkInPipe} - RT_CLASS!{class UsbBulkOutPipe: IUsbBulkOutPipe} - RT_CLASS!{class UsbInterruptOutPipe: IUsbInterruptOutPipe} - DEFINE_IID!(IID_IUsbConfiguration, 1746367529, 13993, 18135, 184, 115, 252, 104, 146, 81, 236, 48); - RT_INTERFACE!{interface IUsbConfiguration(IUsbConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IUsbConfiguration] { - fn get_UsbInterfaces(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ConfigurationDescriptor(&mut self, out: *mut *mut UsbConfigurationDescriptor) -> HRESULT, - fn get_Descriptors(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + RT_CLASS!{class PrintTaskConfigurationSaveRequest: IPrintTaskConfigurationSaveRequest} + DEFINE_IID!(IID_IPrintTaskConfigurationSaveRequestedEventArgs, 3765184633, 3425, 18744, 145, 208, 150, 164, 91, 238, 132, 121); + RT_INTERFACE!{interface IPrintTaskConfigurationSaveRequestedEventArgs(IPrintTaskConfigurationSaveRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskConfigurationSaveRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut PrintTaskConfigurationSaveRequest) -> HRESULT }} - impl IUsbConfiguration { - #[inline] pub unsafe fn get_usb_interfaces(&mut self) -> Result>> { + impl IPrintTaskConfigurationSaveRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_UsbInterfaces)(self, &mut out); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_configuration_descriptor(&mut self) -> Result> { + } + RT_CLASS!{class PrintTaskConfigurationSaveRequestedEventArgs: IPrintTaskConfigurationSaveRequestedEventArgs} + DEFINE_IID!(IID_IPrintTaskConfiguration, 3821151313, 15012, 18565, 146, 64, 49, 31, 95, 143, 190, 157); + RT_INTERFACE!{interface IPrintTaskConfiguration(IPrintTaskConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskConfiguration] { + fn get_PrinterExtensionContext(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn add_SaveRequested(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SaveRequested(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPrintTaskConfiguration { + #[inline] pub unsafe fn get_printer_extension_context(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ConfigurationDescriptor)(self, &mut out); + let hr = ((*self.lpVtbl).get_PrinterExtensionContext)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_descriptors(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Descriptors)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn add_save_requested(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SaveRequested)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_save_requested(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SaveRequested)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IUsbInterface, 2687642517, 32583, 18603, 167, 39, 103, 140, 37, 190, 33, 18); - RT_INTERFACE!{interface IUsbInterface(IUsbInterfaceVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterface] { - fn get_BulkInPipes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InterruptInPipes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_BulkOutPipes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InterruptOutPipes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InterfaceSettings(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InterfaceNumber(&mut self, out: *mut u8) -> HRESULT, - fn get_Descriptors(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + RT_CLASS!{class PrintTaskConfiguration: IPrintTaskConfiguration} + DEFINE_IID!(IID_IPrintNotificationEventDetails, 3759033482, 18472, 19873, 139, 184, 134, 114, 223, 133, 21, 231); + RT_INTERFACE!{interface IPrintNotificationEventDetails(IPrintNotificationEventDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintNotificationEventDetails] { + fn get_PrinterName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EventData(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_EventData(&mut self, value: HSTRING) -> HRESULT }} - impl IUsbInterface { - #[inline] pub unsafe fn get_bulk_in_pipes(&mut self) -> Result>> { + impl IPrintNotificationEventDetails { + #[inline] pub unsafe fn get_printer_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BulkInPipes)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_PrinterName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_interrupt_in_pipes(&mut self) -> Result>> { + #[inline] pub unsafe fn get_event_data(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InterruptInPipes)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_EventData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_bulk_out_pipes(&mut self) -> Result>> { + #[inline] pub unsafe fn set_event_data(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_EventData)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PrintNotificationEventDetails: IPrintNotificationEventDetails} + DEFINE_IID!(IID_IPrintExtensionContextStatic, 3876429761, 65401, 19108, 140, 155, 12, 147, 174, 223, 222, 138); + RT_INTERFACE!{static interface IPrintExtensionContextStatic(IPrintExtensionContextStaticVtbl): IInspectable(IInspectableVtbl) [IID_IPrintExtensionContextStatic] { + fn FromDeviceId(&mut self, deviceId: HSTRING, out: *mut *mut IInspectable) -> HRESULT + }} + impl IPrintExtensionContextStatic { + #[inline] pub unsafe fn from_device_id(&mut self, deviceId: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BulkOutPipes)(self, &mut out); + let hr = ((*self.lpVtbl).FromDeviceId)(self, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_interrupt_out_pipes(&mut self) -> Result>> { + } + RT_ACTIVATABLE!{IPrintExtensionContextStatic [CLSID_PrintExtensionContext]} + DEFINE_CLSID!(CLSID_PrintExtensionContext = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,114,105,110,116,101,114,115,46,69,120,116,101,110,115,105,111,110,115,46,80,114,105,110,116,69,120,116,101,110,115,105,111,110,67,111,110,116,101,120,116,0]); +} // Windows.Devices.Printers.Extensions +} // Windows.Devices.Printers +pub mod power { // Windows.Devices.Power +use ::prelude::*; + DEFINE_IID!(IID_IBattery, 3163115462, 114, 18376, 139, 93, 97, 74, 170, 122, 67, 126); + RT_INTERFACE!{interface IBattery(IBatteryVtbl): IInspectable(IInspectableVtbl) [IID_IBattery] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetReport(&mut self, out: *mut *mut BatteryReport) -> HRESULT, + fn add_ReportUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReportUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IBattery { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InterruptOutPipes)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_interface_settings(&mut self) -> Result>> { + #[inline] pub unsafe fn get_report(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InterfaceSettings)(self, &mut out); + let hr = ((*self.lpVtbl).GetReport)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_interface_number(&mut self) -> Result { + #[inline] pub unsafe fn add_report_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_InterfaceNumber)(self, &mut out); + let hr = ((*self.lpVtbl).add_ReportUpdated)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_descriptors(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Descriptors)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_report_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReportUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class UsbInterfaceSetting: IUsbInterfaceSetting} - DEFINE_IID!(IID_IUsbInterfaceSetting, 405257127, 36263, 19191, 143, 76, 127, 48, 50, 231, 129, 245); - RT_INTERFACE!{interface IUsbInterfaceSetting(IUsbInterfaceSettingVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterfaceSetting] { - fn get_BulkInEndpoints(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InterruptInEndpoints(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_BulkOutEndpoints(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InterruptOutEndpoints(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Selected(&mut self, out: *mut bool) -> HRESULT, - fn SelectSettingAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn get_InterfaceDescriptor(&mut self, out: *mut *mut UsbInterfaceDescriptor) -> HRESULT, - fn get_Descriptors(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + RT_CLASS!{class BatteryReport: IBatteryReport} + RT_CLASS!{class Battery: IBattery} + RT_ACTIVATABLE!{IBatteryStatics [CLSID_Battery]} + DEFINE_CLSID!(CLSID_Battery = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,119,101,114,46,66,97,116,116,101,114,121,0]); + DEFINE_IID!(IID_IBatteryReport, 3380972602, 19987, 16906, 168, 208, 36, 241, 143, 57, 84, 1); + RT_INTERFACE!{interface IBatteryReport(IBatteryReportVtbl): IInspectable(IInspectableVtbl) [IID_IBatteryReport] { + fn get_ChargeRateInMilliwatts(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_DesignCapacityInMilliwattHours(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_FullChargeCapacityInMilliwattHours(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_RemainingCapacityInMilliwattHours(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + #[cfg(feature="windows.system")] fn get_Status(&mut self, out: *mut super::super::system::power::BatteryStatus) -> HRESULT }} - impl IUsbInterfaceSetting { - #[inline] pub unsafe fn get_bulk_in_endpoints(&mut self) -> Result>> { + impl IBatteryReport { + #[inline] pub unsafe fn get_charge_rate_in_milliwatts(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BulkInEndpoints)(self, &mut out); + let hr = ((*self.lpVtbl).get_ChargeRateInMilliwatts)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_interrupt_in_endpoints(&mut self) -> Result>> { + #[inline] pub unsafe fn get_design_capacity_in_milliwatt_hours(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InterruptInEndpoints)(self, &mut out); + let hr = ((*self.lpVtbl).get_DesignCapacityInMilliwattHours)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_bulk_out_endpoints(&mut self) -> Result>> { + #[inline] pub unsafe fn get_full_charge_capacity_in_milliwatt_hours(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BulkOutEndpoints)(self, &mut out); + let hr = ((*self.lpVtbl).get_FullChargeCapacityInMilliwattHours)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_interrupt_out_endpoints(&mut self) -> Result>> { + #[inline] pub unsafe fn get_remaining_capacity_in_milliwatt_hours(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InterruptOutEndpoints)(self, &mut out); + let hr = ((*self.lpVtbl).get_RemainingCapacityInMilliwattHours)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_selected(&mut self) -> Result { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Selected)(self, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn select_setting_async(&mut self) -> Result> { + } + DEFINE_IID!(IID_IBatteryStatics, 2043507382, 40542, 17490, 190, 166, 223, 205, 84, 30, 89, 127); + RT_INTERFACE!{static interface IBatteryStatics(IBatteryStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBatteryStatics] { + fn get_AggregateBattery(&mut self, out: *mut *mut Battery) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IBatteryStatics { + #[inline] pub unsafe fn get_aggregate_battery(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SelectSettingAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_AggregateBattery)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_interface_descriptor(&mut self) -> Result> { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InterfaceDescriptor)(self, &mut out); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_descriptors(&mut self) -> Result>> { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Descriptors)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IUsbBulkInEndpointDescriptor, 1013860422, 1743, 17065, 157, 194, 151, 28, 27, 20, 182, 227); - RT_INTERFACE!{interface IUsbBulkInEndpointDescriptor(IUsbBulkInEndpointDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbBulkInEndpointDescriptor] { - fn get_MaxPacketSize(&mut self, out: *mut u32) -> HRESULT, - fn get_EndpointNumber(&mut self, out: *mut u8) -> HRESULT, - fn get_Pipe(&mut self, out: *mut *mut UsbBulkInPipe) -> HRESULT +} // Windows.Devices.Power +pub mod sms { // Windows.Devices.Sms +use ::prelude::*; + RT_ENUM! { enum SmsMessageClass: i32 { + None (SmsMessageClass_None) = 0, Class0 (SmsMessageClass_Class0) = 1, Class1 (SmsMessageClass_Class1) = 2, Class2 (SmsMessageClass_Class2) = 3, Class3 (SmsMessageClass_Class3) = 4, }} - impl IUsbBulkInEndpointDescriptor { - #[inline] pub unsafe fn get_max_packet_size(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxPacketSize)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_endpoint_number(&mut self) -> Result { + RT_ENUM! { enum SmsMessageType: i32 { + Binary (SmsMessageType_Binary) = 0, Text (SmsMessageType_Text) = 1, Wap (SmsMessageType_Wap) = 2, App (SmsMessageType_App) = 3, Broadcast (SmsMessageType_Broadcast) = 4, Voicemail (SmsMessageType_Voicemail) = 5, Status (SmsMessageType_Status) = 6, + }} + RT_ENUM! { enum CellularClass: i32 { + None (CellularClass_None) = 0, Gsm (CellularClass_Gsm) = 1, Cdma (CellularClass_Cdma) = 2, + }} + DEFINE_IID!(IID_ISmsMessageBase, 753991216, 65104, 20422, 170, 136, 76, 207, 226, 122, 41, 234); + RT_INTERFACE!{interface ISmsMessageBase(ISmsMessageBaseVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageBase] { + fn get_MessageType(&mut self, out: *mut SmsMessageType) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CellularClass(&mut self, out: *mut CellularClass) -> HRESULT, + fn get_MessageClass(&mut self, out: *mut SmsMessageClass) -> HRESULT, + fn get_SimIccId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISmsMessageBase { + #[inline] pub unsafe fn get_message_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_EndpointNumber)(self, &mut out); + let hr = ((*self.lpVtbl).get_MessageType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_pipe(&mut self) -> Result> { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Pipe)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - } - DEFINE_IID!(IID_IUsbInterruptInEndpointDescriptor, 3226634599, 51473, 19514, 134, 178, 65, 156, 45, 168, 144, 57); - RT_INTERFACE!{interface IUsbInterruptInEndpointDescriptor(IUsbInterruptInEndpointDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterruptInEndpointDescriptor] { - fn get_MaxPacketSize(&mut self, out: *mut u32) -> HRESULT, - fn get_EndpointNumber(&mut self, out: *mut u8) -> HRESULT, - fn get_Interval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Pipe(&mut self, out: *mut *mut UsbInterruptInPipe) -> HRESULT - }} - impl IUsbInterruptInEndpointDescriptor { - #[inline] pub unsafe fn get_max_packet_size(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxPacketSize)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_endpoint_number(&mut self) -> Result { + #[inline] pub unsafe fn get_cellular_class(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_EndpointNumber)(self, &mut out); + let hr = ((*self.lpVtbl).get_CellularClass)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_interval(&mut self) -> Result { + #[inline] pub unsafe fn get_message_class(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Interval)(self, &mut out); + let hr = ((*self.lpVtbl).get_MessageClass)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_pipe(&mut self) -> Result> { + #[inline] pub unsafe fn get_sim_icc_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Pipe)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_SimIccId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IUsbBulkOutEndpointDescriptor, 673219706, 65518, 20320, 155, 225, 149, 108, 172, 62, 203, 101); - RT_INTERFACE!{interface IUsbBulkOutEndpointDescriptor(IUsbBulkOutEndpointDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbBulkOutEndpointDescriptor] { - fn get_MaxPacketSize(&mut self, out: *mut u32) -> HRESULT, - fn get_EndpointNumber(&mut self, out: *mut u8) -> HRESULT, - fn get_Pipe(&mut self, out: *mut *mut UsbBulkOutPipe) -> HRESULT + RT_ENUM! { enum SmsDataFormat: i32 { + Unknown (SmsDataFormat_Unknown) = 0, CdmaSubmit (SmsDataFormat_CdmaSubmit) = 1, GsmSubmit (SmsDataFormat_GsmSubmit) = 2, CdmaDeliver (SmsDataFormat_CdmaDeliver) = 3, GsmDeliver (SmsDataFormat_GsmDeliver) = 4, }} - impl IUsbBulkOutEndpointDescriptor { - #[inline] pub unsafe fn get_max_packet_size(&mut self) -> Result { + RT_ENUM! { enum SmsEncoding: i32 { + Unknown (SmsEncoding_Unknown) = 0, Optimal (SmsEncoding_Optimal) = 1, SevenBitAscii (SmsEncoding_SevenBitAscii) = 2, Unicode (SmsEncoding_Unicode) = 3, GsmSevenBit (SmsEncoding_GsmSevenBit) = 4, EightBit (SmsEncoding_EightBit) = 5, Latin (SmsEncoding_Latin) = 6, Korean (SmsEncoding_Korean) = 7, IA5 (SmsEncoding_IA5) = 8, ShiftJis (SmsEncoding_ShiftJis) = 9, LatinHebrew (SmsEncoding_LatinHebrew) = 10, + }} + DEFINE_IID!(IID_ISmsTextMessage2, 580966547, 17749, 18261, 181, 161, 231, 253, 132, 149, 95, 141); + RT_INTERFACE!{interface ISmsTextMessage2(ISmsTextMessage2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmsTextMessage2] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_To(&mut self, value: HSTRING) -> HRESULT, + fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Body(&mut self, value: HSTRING) -> HRESULT, + fn get_Encoding(&mut self, out: *mut SmsEncoding) -> HRESULT, + fn put_Encoding(&mut self, value: SmsEncoding) -> HRESULT, + fn get_CallbackNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CallbackNumber(&mut self, value: HSTRING) -> HRESULT, + fn get_IsDeliveryNotificationEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsDeliveryNotificationEnabled(&mut self, value: bool) -> HRESULT, + fn get_RetryAttemptCount(&mut self, out: *mut i32) -> HRESULT, + fn put_RetryAttemptCount(&mut self, value: i32) -> HRESULT, + fn get_TeleserviceId(&mut self, out: *mut i32) -> HRESULT, + fn get_ProtocolId(&mut self, out: *mut i32) -> HRESULT + }} + impl ISmsTextMessage2 { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxPacketSize)(self, &mut out); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_endpoint_number(&mut self) -> Result { + #[inline] pub unsafe fn get_to(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_To)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_to(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_To)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_from(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_From)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_body(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_body(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Body)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_encoding(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_EndpointNumber)(self, &mut out); + let hr = ((*self.lpVtbl).get_Encoding)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_pipe(&mut self) -> Result> { + #[inline] pub unsafe fn set_encoding(&mut self, value: SmsEncoding) -> Result<()> { + let hr = ((*self.lpVtbl).put_Encoding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_callback_number(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Pipe)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_CallbackNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IUsbInterruptOutEndpointDescriptor, 3433033089, 4298, 17715, 149, 45, 158, 39, 131, 65, 232, 15); - RT_INTERFACE!{interface IUsbInterruptOutEndpointDescriptor(IUsbInterruptOutEndpointDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterruptOutEndpointDescriptor] { - fn get_MaxPacketSize(&mut self, out: *mut u32) -> HRESULT, - fn get_EndpointNumber(&mut self, out: *mut u8) -> HRESULT, - fn get_Interval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Pipe(&mut self, out: *mut *mut UsbInterruptOutPipe) -> HRESULT - }} - impl IUsbInterruptOutEndpointDescriptor { - #[inline] pub unsafe fn get_max_packet_size(&mut self) -> Result { + #[inline] pub unsafe fn set_callback_number(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CallbackNumber)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_delivery_notification_enabled(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxPacketSize)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsDeliveryNotificationEnabled)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_endpoint_number(&mut self) -> Result { + #[inline] pub unsafe fn set_is_delivery_notification_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDeliveryNotificationEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_retry_attempt_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_EndpointNumber)(self, &mut out); + let hr = ((*self.lpVtbl).get_RetryAttemptCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_interval(&mut self) -> Result { + #[inline] pub unsafe fn set_retry_attempt_count(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RetryAttemptCount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_teleservice_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Interval)(self, &mut out); + let hr = ((*self.lpVtbl).get_TeleserviceId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_pipe(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Pipe)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_protocol_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtocolId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IUsbDevice, 1380563346, 50262, 17621, 173, 94, 36, 245, 160, 137, 246, 59); - RT_INTERFACE!{interface IUsbDevice(IUsbDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDevice] { - #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.storage")] fn SendControlOutTransferAsync(&mut self, setupPacket: *mut UsbSetupPacket, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SendControlOutTransferAsyncNoBuffer(&mut self, setupPacket: *mut UsbSetupPacket, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), - #[cfg(feature="windows.storage")] fn SendControlInTransferAsync(&mut self, setupPacket: *mut UsbSetupPacket, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), - #[cfg(feature="windows.storage")] fn SendControlInTransferAsyncNoBuffer(&mut self, setupPacket: *mut UsbSetupPacket, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn get_DefaultInterface(&mut self, out: *mut *mut UsbInterface) -> HRESULT, - fn get_DeviceDescriptor(&mut self, out: *mut *mut UsbDeviceDescriptor) -> HRESULT, - fn get_Configuration(&mut self, out: *mut *mut UsbConfiguration) -> HRESULT + RT_CLASS!{class SmsTextMessage2: ISmsTextMessage2} + DEFINE_IID!(IID_ISmsWapMessage, 3448993603, 31317, 19771, 144, 33, 242, 46, 2, 45, 9, 197); + RT_INTERFACE!{interface ISmsWapMessage(ISmsWapMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsWapMessage] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ApplicationId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ContentType(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_BinaryBody(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_Headers(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT }} - impl IUsbDevice { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_control_out_transfer_async(&mut self, setupPacket: &UsbSetupPacket, buffer: &super::super::storage::streams::IBuffer) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).SendControlOutTransferAsync)(self, setupPacket as *const _ as *mut _, buffer as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + impl ISmsWapMessage { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn send_control_out_transfer_async_no_buffer(&mut self, setupPacket: &UsbSetupPacket) -> Result>> { + #[inline] pub unsafe fn get_to(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SendControlOutTransferAsyncNoBuffer)(self, setupPacket as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_To)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_control_in_transfer_async(&mut self, setupPacket: &UsbSetupPacket, buffer: &super::super::storage::streams::IBuffer) -> Result>> { + #[inline] pub unsafe fn get_from(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SendControlInTransferAsync)(self, setupPacket as *const _ as *mut _, buffer as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_From)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_control_in_transfer_async_no_buffer(&mut self, setupPacket: &UsbSetupPacket) -> Result>> { + #[inline] pub unsafe fn get_application_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).SendControlInTransferAsyncNoBuffer)(self, setupPacket as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ApplicationId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_interface(&mut self) -> Result> { + #[inline] pub unsafe fn get_content_type(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DefaultInterface)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ContentType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_descriptor(&mut self) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_binary_body(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceDescriptor)(self, &mut out); + let hr = ((*self.lpVtbl).get_BinaryBody)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_configuration(&mut self) -> Result> { + #[inline] pub unsafe fn get_headers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Configuration)(self, &mut out); + let hr = ((*self.lpVtbl).get_Headers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } -} // Windows.Devices.Usb -pub mod wifi { // Windows.Devices.WiFi -use ::prelude::*; - RT_ENUM! { enum WiFiNetworkKind: i32 { - Any (WiFiNetworkKind_Any) = 0, Infrastructure (WiFiNetworkKind_Infrastructure) = 1, Adhoc (WiFiNetworkKind_Adhoc) = 2, - }} - RT_ENUM! { enum WiFiPhyKind: i32 { - Unknown (WiFiPhyKind_Unknown) = 0, Fhss (WiFiPhyKind_Fhss) = 1, Dsss (WiFiPhyKind_Dsss) = 2, IRBaseband (WiFiPhyKind_IRBaseband) = 3, Ofdm (WiFiPhyKind_Ofdm) = 4, Hrdsss (WiFiPhyKind_Hrdsss) = 5, Erp (WiFiPhyKind_Erp) = 6, HT (WiFiPhyKind_HT) = 7, Vht (WiFiPhyKind_Vht) = 8, Dmg (WiFiPhyKind_Dmg) = 9, - }} - RT_ENUM! { enum WiFiAccessStatus: i32 { - Unspecified (WiFiAccessStatus_Unspecified) = 0, Allowed (WiFiAccessStatus_Allowed) = 1, DeniedByUser (WiFiAccessStatus_DeniedByUser) = 2, DeniedBySystem (WiFiAccessStatus_DeniedBySystem) = 3, - }} - RT_ENUM! { enum WiFiReconnectionKind: i32 { - Automatic (WiFiReconnectionKind_Automatic) = 0, Manual (WiFiReconnectionKind_Manual) = 1, - }} - RT_ENUM! { enum WiFiConnectionStatus: i32 { - UnspecifiedFailure (WiFiConnectionStatus_UnspecifiedFailure) = 0, Success (WiFiConnectionStatus_Success) = 1, AccessRevoked (WiFiConnectionStatus_AccessRevoked) = 2, InvalidCredential (WiFiConnectionStatus_InvalidCredential) = 3, NetworkNotAvailable (WiFiConnectionStatus_NetworkNotAvailable) = 4, Timeout (WiFiConnectionStatus_Timeout) = 5, UnsupportedAuthenticationProtocol (WiFiConnectionStatus_UnsupportedAuthenticationProtocol) = 6, - }} - DEFINE_IID!(IID_IWiFiAdapterStatics, 3659922909, 53836, 17379, 170, 189, 196, 101, 159, 115, 15, 153); - RT_INTERFACE!{static interface IWiFiAdapterStatics(IWiFiAdapterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiAdapterStatics] { - fn FindAllAdaptersAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class SmsWapMessage: ISmsWapMessage} + DEFINE_IID!(IID_ISmsAppMessage, 3904603284, 54176, 18954, 134, 215, 41, 16, 51, 168, 207, 84); + RT_INTERFACE!{interface ISmsAppMessage(ISmsAppMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsAppMessage] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_To(&mut self, value: HSTRING) -> HRESULT, + fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Body(&mut self, value: HSTRING) -> HRESULT, + fn get_CallbackNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CallbackNumber(&mut self, value: HSTRING) -> HRESULT, + fn get_IsDeliveryNotificationEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsDeliveryNotificationEnabled(&mut self, value: bool) -> HRESULT, + fn get_RetryAttemptCount(&mut self, out: *mut i32) -> HRESULT, + fn put_RetryAttemptCount(&mut self, value: i32) -> HRESULT, + fn get_Encoding(&mut self, out: *mut SmsEncoding) -> HRESULT, + fn put_Encoding(&mut self, value: SmsEncoding) -> HRESULT, + fn get_PortNumber(&mut self, out: *mut i32) -> HRESULT, + fn put_PortNumber(&mut self, value: i32) -> HRESULT, + fn get_TeleserviceId(&mut self, out: *mut i32) -> HRESULT, + fn put_TeleserviceId(&mut self, value: i32) -> HRESULT, + fn get_ProtocolId(&mut self, out: *mut i32) -> HRESULT, + fn put_ProtocolId(&mut self, value: i32) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_BinaryBody(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn put_BinaryBody(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT }} - impl IWiFiAdapterStatics { - #[inline] pub unsafe fn find_all_adapters_async(&mut self) -> Result>>> { + impl ISmsAppMessage { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_to(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FindAllAdaptersAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_To)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + #[inline] pub unsafe fn set_to(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_To)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_from(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + let hr = ((*self.lpVtbl).get_From)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn get_body(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + #[inline] pub unsafe fn set_body(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Body)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_callback_number(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_CallbackNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class WiFiAdapter: IWiFiAdapter} - RT_ACTIVATABLE!{IWiFiAdapterStatics [CLSID_WiFiAdapter]} - DEFINE_CLSID!(CLSID_WiFiAdapter = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,46,87,105,70,105,65,100,97,112,116,101,114,0]); - DEFINE_IID!(IID_IWiFiAdapter, 2797921315, 15733, 17316, 185, 222, 17, 226, 107, 114, 217, 176); - RT_INTERFACE!{interface IWiFiAdapter(IWiFiAdapterVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiAdapter] { - #[cfg(not(feature="windows.networking"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.networking")] fn get_NetworkAdapter(&mut self, out: *mut *mut super::super::networking::connectivity::NetworkAdapter) -> HRESULT, - fn ScanAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn get_NetworkReport(&mut self, out: *mut *mut WiFiNetworkReport) -> HRESULT, - fn add_AvailableNetworksChanged(&mut self, args: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AvailableNetworksChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn ConnectAsync(&mut self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.security"))] fn __Dummy6(&mut self) -> (), - #[cfg(feature="windows.security")] fn ConnectWithPasswordCredentialAsync(&mut self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: *mut super::super::security::credentials::PasswordCredential, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(not(feature="windows.security"))] fn __Dummy7(&mut self) -> (), - #[cfg(feature="windows.security")] fn ConnectWithPasswordCredentialAndSsidAsync(&mut self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: *mut super::super::security::credentials::PasswordCredential, ssid: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn Disconnect(&mut self) -> HRESULT - }} - impl IWiFiAdapter { - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_network_adapter(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_NetworkAdapter)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_callback_number(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CallbackNumber)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn scan_async(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ScanAsync)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_is_delivery_notification_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDeliveryNotificationEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_network_report(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_NetworkReport)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_is_delivery_notification_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDeliveryNotificationEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_available_networks_changed(&mut self, args: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_retry_attempt_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AvailableNetworksChanged)(self, args as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_RetryAttemptCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_available_networks_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AvailableNetworksChanged)(self, eventCookie); + #[inline] pub unsafe fn set_retry_attempt_count(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RetryAttemptCount)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn connect_async(&mut self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ConnectAsync)(self, availableNetwork as *const _ as *mut _, reconnectionKind, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_encoding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Encoding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.security")] #[inline] pub unsafe fn connect_with_password_credential_async(&mut self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ConnectWithPasswordCredentialAsync)(self, availableNetwork as *const _ as *mut _, reconnectionKind, passwordCredential as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_encoding(&mut self, value: SmsEncoding) -> Result<()> { + let hr = ((*self.lpVtbl).put_Encoding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.security")] #[inline] pub unsafe fn connect_with_password_credential_and_ssid_async(&mut self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: &super::super::security::credentials::PasswordCredential, ssid: &HStringArg) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ConnectWithPasswordCredentialAndSsidAsync)(self, availableNetwork as *const _ as *mut _, reconnectionKind, passwordCredential as *const _ as *mut _, ssid.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_port_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PortNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn disconnect(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Disconnect)(self); + #[inline] pub unsafe fn set_port_number(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_PortNumber)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - RT_CLASS!{class WiFiNetworkReport: IWiFiNetworkReport} - RT_CLASS!{class WiFiAvailableNetwork: IWiFiAvailableNetwork} - RT_CLASS!{class WiFiConnectionResult: IWiFiConnectionResult} - DEFINE_IID!(IID_IWiFiNetworkReport, 2502221522, 22801, 17502, 129, 148, 190, 79, 26, 112, 72, 149); - RT_INTERFACE!{interface IWiFiNetworkReport(IWiFiNetworkReportVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiNetworkReport] { - fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_AvailableNetworks(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT - }} - impl IWiFiNetworkReport { - #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + #[inline] pub unsafe fn get_teleservice_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + let hr = ((*self.lpVtbl).get_TeleserviceId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_available_networks(&mut self) -> Result>> { + #[inline] pub unsafe fn set_teleservice_id(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TeleserviceId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_protocol_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtocolId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_protocol_id(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProtocolId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_binary_body(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AvailableNetworks)(self, &mut out); + let hr = ((*self.lpVtbl).get_BinaryBody)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_binary_body(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_BinaryBody)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } } - DEFINE_IID!(IID_IWiFiAvailableNetwork, 652829254, 6206, 18180, 152, 38, 113, 180, 162, 240, 246, 104); - RT_INTERFACE!{interface IWiFiAvailableNetwork(IWiFiAvailableNetworkVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiAvailableNetwork] { - fn get_Uptime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Ssid(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Bssid(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ChannelCenterFrequencyInKilohertz(&mut self, out: *mut i32) -> HRESULT, - fn get_NetworkRssiInDecibelMilliwatts(&mut self, out: *mut f64) -> HRESULT, - fn get_SignalBars(&mut self, out: *mut u8) -> HRESULT, - fn get_NetworkKind(&mut self, out: *mut WiFiNetworkKind) -> HRESULT, - fn get_PhyKind(&mut self, out: *mut WiFiPhyKind) -> HRESULT, - #[cfg(not(feature="windows.networking"))] fn __Dummy8(&mut self) -> (), - #[cfg(feature="windows.networking")] fn get_SecuritySettings(&mut self, out: *mut *mut super::super::networking::connectivity::NetworkSecuritySettings) -> HRESULT, - fn get_BeaconInterval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_IsWiFiDirect(&mut self, out: *mut bool) -> HRESULT + RT_CLASS!{class SmsAppMessage: ISmsAppMessage} + RT_ENUM! { enum SmsGeographicalScope: i32 { + None (SmsGeographicalScope_None) = 0, CellWithImmediateDisplay (SmsGeographicalScope_CellWithImmediateDisplay) = 1, LocationArea (SmsGeographicalScope_LocationArea) = 2, Plmn (SmsGeographicalScope_Plmn) = 3, Cell (SmsGeographicalScope_Cell) = 4, }} - impl IWiFiAvailableNetwork { - #[inline] pub unsafe fn get_uptime(&mut self) -> Result { + RT_ENUM! { enum SmsBroadcastType: i32 { + Other (SmsBroadcastType_Other) = 0, CmasPresidential (SmsBroadcastType_CmasPresidential) = 1, CmasExtreme (SmsBroadcastType_CmasExtreme) = 2, CmasSevere (SmsBroadcastType_CmasSevere) = 3, CmasAmber (SmsBroadcastType_CmasAmber) = 4, CmasTest (SmsBroadcastType_CmasTest) = 5, EUAlert1 (SmsBroadcastType_EUAlert1) = 6, EUAlert2 (SmsBroadcastType_EUAlert2) = 7, EUAlert3 (SmsBroadcastType_EUAlert3) = 8, EUAlertAmber (SmsBroadcastType_EUAlertAmber) = 9, EUAlertInfo (SmsBroadcastType_EUAlertInfo) = 10, EtwsEarthquake (SmsBroadcastType_EtwsEarthquake) = 11, EtwsTsunami (SmsBroadcastType_EtwsTsunami) = 12, EtwsTsunamiAndEarthquake (SmsBroadcastType_EtwsTsunamiAndEarthquake) = 13, LatAlertLocal (SmsBroadcastType_LatAlertLocal) = 14, + }} + DEFINE_IID!(IID_ISmsBroadcastMessage, 1974385649, 58551, 18548, 160, 156, 41, 86, 229, 146, 249, 87); + RT_INTERFACE!{interface ISmsBroadcastMessage(ISmsBroadcastMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsBroadcastMessage] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Channel(&mut self, out: *mut i32) -> HRESULT, + fn get_GeographicalScope(&mut self, out: *mut SmsGeographicalScope) -> HRESULT, + fn get_MessageCode(&mut self, out: *mut i32) -> HRESULT, + fn get_UpdateNumber(&mut self, out: *mut i32) -> HRESULT, + fn get_BroadcastType(&mut self, out: *mut SmsBroadcastType) -> HRESULT, + fn get_IsEmergencyAlert(&mut self, out: *mut bool) -> HRESULT, + fn get_IsUserPopupRequested(&mut self, out: *mut bool) -> HRESULT + }} + impl ISmsBroadcastMessage { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Uptime)(self, &mut out); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ssid(&mut self) -> Result { + #[inline] pub unsafe fn get_to(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Ssid)(self, &mut out); + let hr = ((*self.lpVtbl).get_To)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_bssid(&mut self) -> Result { + #[inline] pub unsafe fn get_body(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Bssid)(self, &mut out); + let hr = ((*self.lpVtbl).get_Body)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_channel_center_frequency_in_kilohertz(&mut self) -> Result { + #[inline] pub unsafe fn get_channel(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ChannelCenterFrequencyInKilohertz)(self, &mut out); + let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_network_rssi_in_decibel_milliwatts(&mut self) -> Result { + #[inline] pub unsafe fn get_geographical_scope(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_NetworkRssiInDecibelMilliwatts)(self, &mut out); + let hr = ((*self.lpVtbl).get_GeographicalScope)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_signal_bars(&mut self) -> Result { + #[inline] pub unsafe fn get_message_code(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SignalBars)(self, &mut out); + let hr = ((*self.lpVtbl).get_MessageCode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_network_kind(&mut self) -> Result { + #[inline] pub unsafe fn get_update_number(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_NetworkKind)(self, &mut out); + let hr = ((*self.lpVtbl).get_UpdateNumber)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_phy_kind(&mut self) -> Result { + #[inline] pub unsafe fn get_broadcast_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PhyKind)(self, &mut out); + let hr = ((*self.lpVtbl).get_BroadcastType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_security_settings(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SecuritySettings)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_beacon_interval(&mut self) -> Result { + #[inline] pub unsafe fn get_is_emergency_alert(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BeaconInterval)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsEmergencyAlert)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_is_wi_fi_direct(&mut self) -> Result { + #[inline] pub unsafe fn get_is_user_popup_requested(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsWiFiDirect)(self, &mut out); + let hr = ((*self.lpVtbl).get_IsUserPopupRequested)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IWiFiConnectionResult, 339468249, 50045, 16574, 165, 200, 133, 123, 206, 133, 169, 49); - RT_INTERFACE!{interface IWiFiConnectionResult(IWiFiConnectionResultVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiConnectionResult] { - fn get_ConnectionStatus(&mut self, out: *mut WiFiConnectionStatus) -> HRESULT + RT_CLASS!{class SmsBroadcastMessage: ISmsBroadcastMessage} + DEFINE_IID!(IID_ISmsVoicemailMessage, 656056486, 38321, 17663, 188, 184, 184, 253, 215, 224, 139, 195); + RT_INTERFACE!{interface ISmsVoicemailMessage(ISmsVoicemailMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsVoicemailMessage] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MessageCount(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT }} - impl IWiFiConnectionResult { - #[inline] pub unsafe fn get_connection_status(&mut self) -> Result { + impl ISmsVoicemailMessage { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ConnectionStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } -} // Windows.Devices.WiFi -pub mod wifidirect { // Windows.Devices.WiFiDirect -use ::prelude::*; - RT_ENUM! { enum WiFiDirectConnectionStatus: i32 { - Disconnected (WiFiDirectConnectionStatus_Disconnected) = 0, Connected (WiFiDirectConnectionStatus_Connected) = 1, - }} - RT_ENUM! { enum WiFiDirectError: i32 { - Success (WiFiDirectError_Success) = 0, RadioNotAvailable (WiFiDirectError_RadioNotAvailable) = 1, ResourceInUse (WiFiDirectError_ResourceInUse) = 2, - }} - RT_ENUM! { enum WiFiDirectDeviceSelectorType: i32 { - DeviceInterface (WiFiDirectDeviceSelectorType_DeviceInterface) = 0, AssociationEndpoint (WiFiDirectDeviceSelectorType_AssociationEndpoint) = 1, - }} - RT_ENUM! { enum WiFiDirectAdvertisementListenStateDiscoverability: i32 { - None (WiFiDirectAdvertisementListenStateDiscoverability_None) = 0, Normal (WiFiDirectAdvertisementListenStateDiscoverability_Normal) = 1, Intensive (WiFiDirectAdvertisementListenStateDiscoverability_Intensive) = 2, - }} - RT_ENUM! { enum WiFiDirectAdvertisementPublisherStatus: i32 { - Created (WiFiDirectAdvertisementPublisherStatus_Created) = 0, Started (WiFiDirectAdvertisementPublisherStatus_Started) = 1, Stopped (WiFiDirectAdvertisementPublisherStatus_Stopped) = 2, Aborted (WiFiDirectAdvertisementPublisherStatus_Aborted) = 3, - }} - RT_ENUM! { enum WiFiDirectConfigurationMethod: i32 { - ProvidePin (WiFiDirectConfigurationMethod_ProvidePin) = 0, DisplayPin (WiFiDirectConfigurationMethod_DisplayPin) = 1, PushButton (WiFiDirectConfigurationMethod_PushButton) = 2, - }} - RT_ENUM! { enum WiFiDirectPairingProcedure: i32 { - GroupOwnerNegotiation (WiFiDirectPairingProcedure_GroupOwnerNegotiation) = 0, Invitation (WiFiDirectPairingProcedure_Invitation) = 1, - }} - DEFINE_IID!(IID_IWiFiDirectDeviceStatics, 3899438460, 15020, 18513, 167, 146, 72, 42, 175, 147, 27, 4); - RT_INTERFACE!{static interface IWiFiDirectDeviceStatics(IWiFiDirectDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectDeviceStatics] { - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl IWiFiDirectDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + #[inline] pub unsafe fn get_to(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + let hr = ((*self.lpVtbl).get_To)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - } - RT_CLASS!{class WiFiDirectDevice: IWiFiDirectDevice} - RT_ACTIVATABLE!{IWiFiDirectDeviceStatics2 [CLSID_WiFiDirectDevice]} - RT_ACTIVATABLE!{IWiFiDirectDeviceStatics [CLSID_WiFiDirectDevice]} - DEFINE_CLSID!(CLSID_WiFiDirectDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,46,87,105,70,105,68,105,114,101,99,116,68,101,118,105,99,101,0]); - DEFINE_IID!(IID_IWiFiDirectDeviceStatics2, 445988425, 45315, 17278, 146, 38, 171, 103, 151, 19, 66, 249); - RT_INTERFACE!{static interface IWiFiDirectDeviceStatics2(IWiFiDirectDeviceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectDeviceStatics2] { - fn GetDeviceSelector(&mut self, type_: WiFiDirectDeviceSelectorType, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, connectionParameters: *mut WiFiDirectConnectionParameters, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT - }} - impl IWiFiDirectDeviceStatics2 { - #[inline] pub unsafe fn get_device_selector(&mut self, type_: WiFiDirectDeviceSelectorType) -> Result { + #[inline] pub unsafe fn get_body(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, type_, &mut out); + let hr = ((*self.lpVtbl).get_Body)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg, connectionParameters: &WiFiDirectConnectionParameters) -> Result>> { + #[inline] pub unsafe fn get_message_count(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), connectionParameters as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_MessageCount)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class WiFiDirectConnectionParameters: IWiFiDirectConnectionParameters} - RT_ACTIVATABLE!{IWiFiDirectConnectionParametersStatics [CLSID_WiFiDirectConnectionParameters]} - DEFINE_CLSID!(CLSID_WiFiDirectConnectionParameters = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,46,87,105,70,105,68,105,114,101,99,116,67,111,110,110,101,99,116,105,111,110,80,97,114,97,109,101,116,101,114,115,0]); - DEFINE_IID!(IID_IWiFiDirectInformationElementStatics, 3687853846, 4517, 20064, 140, 170, 52, 119, 33, 72, 55, 138); - RT_INTERFACE!{static interface IWiFiDirectInformationElementStatics(IWiFiDirectInformationElementStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectInformationElementStatics] { - #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.storage")] fn CreateFromBuffer(&mut self, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn CreateFromDeviceInformation(&mut self, deviceInformation: *mut super::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + RT_CLASS!{class SmsVoicemailMessage: ISmsVoicemailMessage} + DEFINE_IID!(IID_ISmsStatusMessage, 3872555842, 46859, 18039, 147, 121, 201, 120, 63, 223, 248, 244); + RT_INTERFACE!{interface ISmsStatusMessage(ISmsStatusMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsStatusMessage] { + fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Status(&mut self, out: *mut i32) -> HRESULT, + fn get_MessageReferenceNumber(&mut self, out: *mut i32) -> HRESULT, + fn get_ServiceCenterTimestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_DischargeTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT }} - impl IWiFiDirectInformationElementStatics { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_buffer(&mut self, buffer: &super::super::storage::streams::IBuffer) -> Result>> { + impl ISmsStatusMessage { + #[inline] pub unsafe fn get_to(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFromBuffer)(self, buffer as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_To)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_from_device_information(&mut self, deviceInformation: &super::enumeration::DeviceInformation) -> Result>> { + #[inline] pub unsafe fn get_from(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateFromDeviceInformation)(self, deviceInformation as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_From)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class WiFiDirectInformationElement: IWiFiDirectInformationElement} - RT_ACTIVATABLE!{IWiFiDirectInformationElementStatics [CLSID_WiFiDirectInformationElement]} - DEFINE_CLSID!(CLSID_WiFiDirectInformationElement = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,46,87,105,70,105,68,105,114,101,99,116,73,110,102,111,114,109,97,116,105,111,110,69,108,101,109,101,110,116,0]); - DEFINE_IID!(IID_IWiFiDirectInformationElement, 2952491734, 30395, 18814, 172, 139, 220, 114, 131, 139, 195, 9); - RT_INTERFACE!{interface IWiFiDirectInformationElement(IWiFiDirectInformationElementVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectInformationElement] { - #[cfg(feature="windows.storage")] fn get_Oui(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - #[cfg(feature="windows.storage")] fn put_Oui(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn get_OuiType(&mut self, out: *mut u8) -> HRESULT, - fn put_OuiType(&mut self, value: u8) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_Value(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - #[cfg(feature="windows.storage")] fn put_Value(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT - }} - impl IWiFiDirectInformationElement { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_oui(&mut self) -> Result> { + #[inline] pub unsafe fn get_body(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Oui)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_oui(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_Oui)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_oui_type(&mut self) -> Result { + #[inline] pub unsafe fn get_message_reference_number(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_OuiType)(self, &mut out); + let hr = ((*self.lpVtbl).get_MessageReferenceNumber)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_oui_type(&mut self, value: u8) -> Result<()> { - let hr = ((*self.lpVtbl).put_OuiType)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_service_center_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceCenterTimestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_value(&mut self) -> Result> { + #[inline] pub unsafe fn get_discharge_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DischargeTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SmsStatusMessage: ISmsStatusMessage} + RT_STRUCT! { struct SmsEncodedLength { + SegmentCount: u32, CharacterCountLastSegment: u32, CharactersPerSegment: u32, ByteCountLastSegment: u32, BytesPerSegment: u32, + }} + RT_ENUM! { enum SmsDeviceStatus: i32 { + Off (SmsDeviceStatus_Off) = 0, Ready (SmsDeviceStatus_Ready) = 1, SimNotInserted (SmsDeviceStatus_SimNotInserted) = 2, BadSim (SmsDeviceStatus_BadSim) = 3, DeviceFailure (SmsDeviceStatus_DeviceFailure) = 4, SubscriptionNotActivated (SmsDeviceStatus_SubscriptionNotActivated) = 5, DeviceLocked (SmsDeviceStatus_DeviceLocked) = 6, DeviceBlocked (SmsDeviceStatus_DeviceBlocked) = 7, + }} + RT_ENUM! { enum SmsModemErrorCode: i32 { + Other (SmsModemErrorCode_Other) = 0, MessagingNetworkError (SmsModemErrorCode_MessagingNetworkError) = 1, SmsOperationNotSupportedByDevice (SmsModemErrorCode_SmsOperationNotSupportedByDevice) = 2, SmsServiceNotSupportedByNetwork (SmsModemErrorCode_SmsServiceNotSupportedByNetwork) = 3, DeviceFailure (SmsModemErrorCode_DeviceFailure) = 4, MessageNotEncodedProperly (SmsModemErrorCode_MessageNotEncodedProperly) = 5, MessageTooLarge (SmsModemErrorCode_MessageTooLarge) = 6, DeviceNotReady (SmsModemErrorCode_DeviceNotReady) = 7, NetworkNotReady (SmsModemErrorCode_NetworkNotReady) = 8, InvalidSmscAddress (SmsModemErrorCode_InvalidSmscAddress) = 9, NetworkFailure (SmsModemErrorCode_NetworkFailure) = 10, FixedDialingNumberRestricted (SmsModemErrorCode_FixedDialingNumberRestricted) = 11, + }} + DEFINE_IID!(IID_ISmsSendMessageResult, 3675495154, 30921, 20459, 150, 34, 69, 35, 40, 8, 141, 98); + RT_INTERFACE!{interface ISmsSendMessageResult(ISmsSendMessageResultVtbl): IInspectable(IInspectableVtbl) [IID_ISmsSendMessageResult] { + fn get_IsSuccessful(&mut self, out: *mut bool) -> HRESULT, + fn get_MessageReferenceNumbers(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_CellularClass(&mut self, out: *mut CellularClass) -> HRESULT, + fn get_ModemErrorCode(&mut self, out: *mut SmsModemErrorCode) -> HRESULT, + fn get_IsErrorTransient(&mut self, out: *mut bool) -> HRESULT, + fn get_NetworkCauseCode(&mut self, out: *mut i32) -> HRESULT, + fn get_TransportFailureCause(&mut self, out: *mut i32) -> HRESULT + }} + impl ISmsSendMessageResult { + #[inline] pub unsafe fn get_is_successful(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSuccessful)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_message_reference_numbers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + let hr = ((*self.lpVtbl).get_MessageReferenceNumbers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_value(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_Value)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_cellular_class(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CellularClass)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - } - DEFINE_IID!(IID_IWiFiDirectLegacySettings, 2790251450, 62205, 17767, 169, 27, 245, 194, 245, 50, 16, 87); - RT_INTERFACE!{interface IWiFiDirectLegacySettings(IWiFiDirectLegacySettingsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectLegacySettings] { - fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_IsEnabled(&mut self, value: bool) -> HRESULT, - fn get_Ssid(&mut self, out: *mut HSTRING) -> HRESULT, - fn put_Ssid(&mut self, value: HSTRING) -> HRESULT, - #[cfg(feature="windows.security")] fn get_Passphrase(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, - #[cfg(feature="windows.security")] fn put_Passphrase(&mut self, value: *mut super::super::security::credentials::PasswordCredential) -> HRESULT - }} - impl IWiFiDirectLegacySettings { - #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + #[inline] pub unsafe fn get_modem_error_code(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + let hr = ((*self.lpVtbl).get_ModemErrorCode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_is_error_transient(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsErrorTransient)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_ssid(&mut self) -> Result { + #[inline] pub unsafe fn get_network_cause_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkCauseCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_transport_failure_cause(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TransportFailureCause)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SmsSendMessageResult: ISmsSendMessageResult} + DEFINE_IID!(IID_ISmsDevice2Statics, 1707574053, 4145, 18718, 143, 182, 239, 153, 145, 175, 227, 99); + RT_INTERFACE!{static interface ISmsDevice2Statics(ISmsDevice2StaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsDevice2Statics] { + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn FromId(&mut self, deviceId: HSTRING, out: *mut *mut SmsDevice2) -> HRESULT, + fn GetDefault(&mut self, out: *mut *mut SmsDevice2) -> HRESULT, + fn FromParentId(&mut self, parentDeviceId: HSTRING, out: *mut *mut SmsDevice2) -> HRESULT + }} + impl ISmsDevice2Statics { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Ssid)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_ssid(&mut self, value: &HStringArg) -> Result<()> { - let hr = ((*self.lpVtbl).put_Ssid)(self, value.get()); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn from_id(&mut self, deviceId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromId)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_passphrase(&mut self) -> Result> { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Passphrase)(self, &mut out); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_passphrase(&mut self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { - let hr = ((*self.lpVtbl).put_Passphrase)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn from_parent_id(&mut self, parentDeviceId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromParentId)(self, parentDeviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class WiFiDirectLegacySettings: IWiFiDirectLegacySettings} - DEFINE_IID!(IID_IWiFiDirectAdvertisement, 2874219053, 10758, 18849, 165, 132, 97, 67, 92, 121, 5, 166); - RT_INTERFACE!{interface IWiFiDirectAdvertisement(IWiFiDirectAdvertisementVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectAdvertisement] { - fn get_InformationElements(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn put_InformationElements(&mut self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_ListenStateDiscoverability(&mut self, out: *mut WiFiDirectAdvertisementListenStateDiscoverability) -> HRESULT, - fn put_ListenStateDiscoverability(&mut self, value: WiFiDirectAdvertisementListenStateDiscoverability) -> HRESULT, - fn get_IsAutonomousGroupOwnerEnabled(&mut self, out: *mut bool) -> HRESULT, - fn put_IsAutonomousGroupOwnerEnabled(&mut self, value: bool) -> HRESULT, - fn get_LegacySettings(&mut self, out: *mut *mut WiFiDirectLegacySettings) -> HRESULT + RT_CLASS!{class SmsDevice2: ISmsDevice2} + RT_ACTIVATABLE!{ISmsDevice2Statics [CLSID_SmsDevice2]} + DEFINE_CLSID!(CLSID_SmsDevice2 = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,68,101,118,105,99,101,50,0]); + DEFINE_IID!(IID_ISmsDevice2, 3179961363, 58658, 18123, 184, 213, 158, 173, 48, 251, 108, 71); + RT_INTERFACE!{interface ISmsDevice2(ISmsDevice2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmsDevice2] { + fn get_SmscAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SmscAddress(&mut self, value: HSTRING) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ParentDeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AccountPhoneNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CellularClass(&mut self, out: *mut CellularClass) -> HRESULT, + fn get_DeviceStatus(&mut self, out: *mut SmsDeviceStatus) -> HRESULT, + fn CalculateLength(&mut self, message: *mut ISmsMessageBase, out: *mut SmsEncodedLength) -> HRESULT, + fn SendMessageAndGetResultAsync(&mut self, message: *mut ISmsMessageBase, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_DeviceStatusChanged(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeviceStatusChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT }} - impl IWiFiDirectAdvertisement { - #[inline] pub unsafe fn get_information_elements(&mut self) -> Result>> { + impl ISmsDevice2 { + #[inline] pub unsafe fn get_smsc_address(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_InformationElements)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_SmscAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_information_elements(&mut self, value: &super::super::foundation::collections::IVector) -> Result<()> { - let hr = ((*self.lpVtbl).put_InformationElements)(self, value as *const _ as *mut _); + #[inline] pub unsafe fn set_smsc_address(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SmscAddress)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_listen_state_discoverability(&mut self) -> Result { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_parent_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ParentDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_account_phone_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccountPhoneNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cellular_class(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ListenStateDiscoverability)(self, &mut out); + let hr = ((*self.lpVtbl).get_CellularClass)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_listen_state_discoverability(&mut self, value: WiFiDirectAdvertisementListenStateDiscoverability) -> Result<()> { - let hr = ((*self.lpVtbl).put_ListenStateDiscoverability)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_autonomous_group_owner_enabled(&mut self) -> Result { + #[inline] pub unsafe fn get_device_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsAutonomousGroupOwnerEnabled)(self, &mut out); + let hr = ((*self.lpVtbl).get_DeviceStatus)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_is_autonomous_group_owner_enabled(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_IsAutonomousGroupOwnerEnabled)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn calculate_length(&mut self, message: &ISmsMessageBase) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CalculateLength)(self, message as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_legacy_settings(&mut self) -> Result> { + #[inline] pub unsafe fn send_message_and_get_result_async(&mut self, message: &ISmsMessageBase) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_LegacySettings)(self, &mut out); + let hr = ((*self.lpVtbl).SendMessageAndGetResultAsync)(self, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IWiFiDirectAdvertisement2, 3076106822, 55318, 18715, 145, 122, 180, 13, 125, 196, 3, 162); - RT_INTERFACE!{interface IWiFiDirectAdvertisement2(IWiFiDirectAdvertisement2Vtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectAdvertisement2] { - fn get_SupportedConfigurationMethods(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT - }} - impl IWiFiDirectAdvertisement2 { - #[inline] pub unsafe fn get_supported_configuration_methods(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedConfigurationMethods)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn add_device_status_changed(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DeviceStatusChanged)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_device_status_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DeviceStatusChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class WiFiDirectAdvertisement: IWiFiDirectAdvertisement} - DEFINE_IID!(IID_IWiFiDirectAdvertisementPublisherStatusChangedEventArgs, 2868766012, 21633, 18150, 144, 221, 50, 17, 101, 24, 241, 146); - RT_INTERFACE!{interface IWiFiDirectAdvertisementPublisherStatusChangedEventArgs(IWiFiDirectAdvertisementPublisherStatusChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectAdvertisementPublisherStatusChangedEventArgs] { - fn get_Status(&mut self, out: *mut WiFiDirectAdvertisementPublisherStatus) -> HRESULT, - fn get_Error(&mut self, out: *mut WiFiDirectError) -> HRESULT + DEFINE_IID!(IID_ISmsMessageReceivedTriggerDetails, 735038420, 9815, 16680, 173, 95, 227, 135, 113, 50, 189, 177); + RT_INTERFACE!{interface ISmsMessageReceivedTriggerDetails(ISmsMessageReceivedTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageReceivedTriggerDetails] { + fn get_MessageType(&mut self, out: *mut SmsMessageType) -> HRESULT, + fn get_TextMessage(&mut self, out: *mut *mut SmsTextMessage2) -> HRESULT, + fn get_WapMessage(&mut self, out: *mut *mut SmsWapMessage) -> HRESULT, + fn get_AppMessage(&mut self, out: *mut *mut SmsAppMessage) -> HRESULT, + fn get_BroadcastMessage(&mut self, out: *mut *mut SmsBroadcastMessage) -> HRESULT, + fn get_VoicemailMessage(&mut self, out: *mut *mut SmsVoicemailMessage) -> HRESULT, + fn get_StatusMessage(&mut self, out: *mut *mut SmsStatusMessage) -> HRESULT, + fn Drop(&mut self) -> HRESULT, + fn Accept(&mut self) -> HRESULT }} - impl IWiFiDirectAdvertisementPublisherStatusChangedEventArgs { - #[inline] pub unsafe fn get_status(&mut self) -> Result { + impl ISmsMessageReceivedTriggerDetails { + #[inline] pub unsafe fn get_message_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_MessageType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_error(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Error)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_text_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextMessage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class WiFiDirectAdvertisementPublisherStatusChangedEventArgs: IWiFiDirectAdvertisementPublisherStatusChangedEventArgs} - DEFINE_IID!(IID_IWiFiDirectAdvertisementPublisher, 3009031450, 39711, 17881, 146, 90, 105, 77, 102, 223, 104, 239); - RT_INTERFACE!{interface IWiFiDirectAdvertisementPublisher(IWiFiDirectAdvertisementPublisherVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectAdvertisementPublisher] { - fn get_Advertisement(&mut self, out: *mut *mut WiFiDirectAdvertisement) -> HRESULT, - fn get_Status(&mut self, out: *mut WiFiDirectAdvertisementPublisherStatus) -> HRESULT, - fn add_StatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT - }} - impl IWiFiDirectAdvertisementPublisher { - #[inline] pub unsafe fn get_advertisement(&mut self) -> Result> { + #[inline] pub unsafe fn get_wap_message(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Advertisement)(self, &mut out); + let hr = ((*self.lpVtbl).get_WapMessage)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_app_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppMessage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_StatusChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_broadcast_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BroadcastMessage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_StatusChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_voicemail_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VoicemailMessage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); + #[inline] pub unsafe fn get_status_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StatusMessage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn drop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Drop)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); + #[inline] pub unsafe fn accept(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Accept)(self); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class WiFiDirectAdvertisementPublisher: IWiFiDirectAdvertisementPublisher} - DEFINE_IID!(IID_IWiFiDirectConnectionParametersStatics, 1502278803, 30274, 17775, 185, 216, 232, 169, 235, 31, 64, 26); - RT_INTERFACE!{static interface IWiFiDirectConnectionParametersStatics(IWiFiDirectConnectionParametersStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionParametersStatics] { - fn GetDevicePairingKinds(&mut self, configurationMethod: WiFiDirectConfigurationMethod, out: *mut super::enumeration::DevicePairingKinds) -> HRESULT + RT_CLASS!{class SmsMessageReceivedTriggerDetails: ISmsMessageReceivedTriggerDetails} + RT_ENUM! { enum SmsFilterActionType: i32 { + AcceptImmediately (SmsFilterActionType_AcceptImmediately) = 0, Drop (SmsFilterActionType_Drop) = 1, Peek (SmsFilterActionType_Peek) = 2, Accept (SmsFilterActionType_Accept) = 3, }} - impl IWiFiDirectConnectionParametersStatics { - #[inline] pub unsafe fn get_device_pairing_kinds(&mut self, configurationMethod: WiFiDirectConfigurationMethod) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetDevicePairingKinds)(self, configurationMethod, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - } - DEFINE_IID!(IID_IWiFiDirectConnectionParameters, 3001373701, 22274, 19222, 160, 44, 187, 205, 33, 239, 96, 152); - RT_INTERFACE!{interface IWiFiDirectConnectionParameters(IWiFiDirectConnectionParametersVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionParameters] { - fn get_GroupOwnerIntent(&mut self, out: *mut i16) -> HRESULT, - fn put_GroupOwnerIntent(&mut self, value: i16) -> HRESULT + DEFINE_IID!(IID_ISmsFilterRule, 1088630702, 45129, 20412, 175, 233, 226, 166, 16, 239, 245, 92); + RT_INTERFACE!{interface ISmsFilterRule(ISmsFilterRuleVtbl): IInspectable(IInspectableVtbl) [IID_ISmsFilterRule] { + fn get_MessageType(&mut self, out: *mut SmsMessageType) -> HRESULT, + fn get_ImsiPrefixes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_DeviceIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_SenderNumbers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_TextMessagePrefixes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_PortNumbers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_CellularClass(&mut self, out: *mut CellularClass) -> HRESULT, + fn put_CellularClass(&mut self, value: CellularClass) -> HRESULT, + fn get_ProtocolIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_TeleserviceIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_WapApplicationIds(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_WapContentTypes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_BroadcastTypes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_BroadcastChannels(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT }} - impl IWiFiDirectConnectionParameters { - #[inline] pub unsafe fn get_group_owner_intent(&mut self) -> Result { + impl ISmsFilterRule { + #[inline] pub unsafe fn get_message_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_GroupOwnerIntent)(self, &mut out); + let hr = ((*self.lpVtbl).get_MessageType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_group_owner_intent(&mut self, value: i16) -> Result<()> { - let hr = ((*self.lpVtbl).put_GroupOwnerIntent)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - } - DEFINE_IID!(IID_IWiFiDirectConnectionParameters2, 2872774590, 43650, 17588, 136, 200, 227, 5, 107, 137, 128, 29); - RT_INTERFACE!{interface IWiFiDirectConnectionParameters2(IWiFiDirectConnectionParameters2Vtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionParameters2] { - fn get_PreferenceOrderedConfigurationMethods(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_PreferredPairingProcedure(&mut self, out: *mut WiFiDirectPairingProcedure) -> HRESULT, - fn put_PreferredPairingProcedure(&mut self, value: WiFiDirectPairingProcedure) -> HRESULT - }} - impl IWiFiDirectConnectionParameters2 { - #[inline] pub unsafe fn get_preference_ordered_configuration_methods(&mut self) -> Result>> { + #[inline] pub unsafe fn get_imsi_prefixes(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PreferenceOrderedConfigurationMethods)(self, &mut out); + let hr = ((*self.lpVtbl).get_ImsiPrefixes)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_preferred_pairing_procedure(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PreferredPairingProcedure)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_preferred_pairing_procedure(&mut self, value: WiFiDirectPairingProcedure) -> Result<()> { - let hr = ((*self.lpVtbl).put_PreferredPairingProcedure)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - } - RT_CLASS!{class WiFiDirectConnectionRequest: IWiFiDirectConnectionRequest} - DEFINE_IID!(IID_IWiFiDirectConnectionRequestedEventArgs, 4187824318, 54157, 18511, 130, 21, 231, 182, 90, 191, 36, 76); - RT_INTERFACE!{interface IWiFiDirectConnectionRequestedEventArgs(IWiFiDirectConnectionRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionRequestedEventArgs] { - fn GetConnectionRequest(&mut self, out: *mut *mut WiFiDirectConnectionRequest) -> HRESULT - }} - impl IWiFiDirectConnectionRequestedEventArgs { - #[inline] pub unsafe fn get_connection_request(&mut self) -> Result> { + #[inline] pub unsafe fn get_device_ids(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetConnectionRequest)(self, &mut out); + let hr = ((*self.lpVtbl).get_DeviceIds)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class WiFiDirectConnectionRequestedEventArgs: IWiFiDirectConnectionRequestedEventArgs} - DEFINE_IID!(IID_IWiFiDirectConnectionListener, 1771838221, 36115, 20201, 185, 236, 156, 114, 248, 37, 31, 125); - RT_INTERFACE!{interface IWiFiDirectConnectionListener(IWiFiDirectConnectionListenerVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionListener] { - fn add_ConnectionRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ConnectionRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT - }} - impl IWiFiDirectConnectionListener { - #[inline] pub unsafe fn add_connection_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ConnectionRequested)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_connection_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ConnectionRequested)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_sender_numbers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SenderNumbers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class WiFiDirectConnectionListener: IWiFiDirectConnectionListener} - DEFINE_IID!(IID_IWiFiDirectDevice, 1927195304, 29419, 19886, 138, 40, 133, 19, 53, 93, 39, 119); - RT_INTERFACE!{interface IWiFiDirectDevice(IWiFiDirectDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectDevice] { - fn get_ConnectionStatus(&mut self, out: *mut WiFiDirectConnectionStatus) -> HRESULT, - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn add_ConnectionStatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ConnectionStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - #[cfg(feature="windows.networking")] fn GetConnectionEndpointPairs(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT - }} - impl IWiFiDirectDevice { - #[inline] pub unsafe fn get_connection_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ConnectionStatus)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_text_message_prefixes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextMessagePrefixes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn get_port_numbers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_PortNumbers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_connection_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_cellular_class(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_ConnectionStatusChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_CellularClass)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_connection_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_ConnectionStatusChanged)(self, token); + #[inline] pub unsafe fn set_cellular_class(&mut self, value: CellularClass) -> Result<()> { + let hr = ((*self.lpVtbl).put_CellularClass)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_connection_endpoint_pairs(&mut self) -> Result>> { + #[inline] pub unsafe fn get_protocol_ids(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetConnectionEndpointPairs)(self, &mut out); + let hr = ((*self.lpVtbl).get_ProtocolIds)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IWiFiDirectConnectionRequest, 2394527237, 37199, 18883, 166, 20, 209, 141, 197, 177, 155, 67); - RT_INTERFACE!{interface IWiFiDirectConnectionRequest(IWiFiDirectConnectionRequestVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionRequest] { - fn get_DeviceInformation(&mut self, out: *mut *mut super::enumeration::DeviceInformation) -> HRESULT - }} - impl IWiFiDirectConnectionRequest { - #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + #[inline] pub unsafe fn get_teleservice_ids(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + let hr = ((*self.lpVtbl).get_TeleserviceIds)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } -pub mod services { // Windows.Devices.WiFiDirect.Services -use ::prelude::*; - RT_ENUM! { enum WiFiDirectServiceConfigurationMethod: i32 { - Default (WiFiDirectServiceConfigurationMethod_Default) = 0, PinDisplay (WiFiDirectServiceConfigurationMethod_PinDisplay) = 1, PinEntry (WiFiDirectServiceConfigurationMethod_PinEntry) = 2, - }} - RT_ENUM! { enum WiFiDirectServiceStatus: i32 { - Available (WiFiDirectServiceStatus_Available) = 0, Busy (WiFiDirectServiceStatus_Busy) = 1, Custom (WiFiDirectServiceStatus_Custom) = 2, - }} - RT_ENUM! { enum WiFiDirectServiceSessionStatus: i32 { - Closed (WiFiDirectServiceSessionStatus_Closed) = 0, Initiated (WiFiDirectServiceSessionStatus_Initiated) = 1, Requested (WiFiDirectServiceSessionStatus_Requested) = 2, Open (WiFiDirectServiceSessionStatus_Open) = 3, - }} - RT_ENUM! { enum WiFiDirectServiceSessionErrorStatus: i32 { - Ok (WiFiDirectServiceSessionErrorStatus_Ok) = 0, Disassociated (WiFiDirectServiceSessionErrorStatus_Disassociated) = 1, LocalClose (WiFiDirectServiceSessionErrorStatus_LocalClose) = 2, RemoteClose (WiFiDirectServiceSessionErrorStatus_RemoteClose) = 3, SystemFailure (WiFiDirectServiceSessionErrorStatus_SystemFailure) = 4, NoResponseFromRemote (WiFiDirectServiceSessionErrorStatus_NoResponseFromRemote) = 5, - }} - RT_ENUM! { enum WiFiDirectServiceAdvertisementStatus: i32 { - Created (WiFiDirectServiceAdvertisementStatus_Created) = 0, Started (WiFiDirectServiceAdvertisementStatus_Started) = 1, Stopped (WiFiDirectServiceAdvertisementStatus_Stopped) = 2, Aborted (WiFiDirectServiceAdvertisementStatus_Aborted) = 3, - }} - RT_ENUM! { enum WiFiDirectServiceError: i32 { - Success (WiFiDirectServiceError_Success) = 0, RadioNotAvailable (WiFiDirectServiceError_RadioNotAvailable) = 1, ResourceInUse (WiFiDirectServiceError_ResourceInUse) = 2, UnsupportedHardware (WiFiDirectServiceError_UnsupportedHardware) = 3, NoHardware (WiFiDirectServiceError_NoHardware) = 4, - }} - RT_ENUM! { enum WiFiDirectServiceIPProtocol: i32 { - Tcp (WiFiDirectServiceIPProtocol_Tcp) = 6, Udp (WiFiDirectServiceIPProtocol_Udp) = 17, - }} - DEFINE_IID!(IID_IWiFiDirectServiceProvisioningInfo, 2346417406, 38873, 17826, 142, 153, 219, 80, 145, 15, 182, 166); - RT_INTERFACE!{interface IWiFiDirectServiceProvisioningInfo(IWiFiDirectServiceProvisioningInfoVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceProvisioningInfo] { - fn get_SelectedConfigurationMethod(&mut self, out: *mut WiFiDirectServiceConfigurationMethod) -> HRESULT, - fn get_IsGroupFormationNeeded(&mut self, out: *mut bool) -> HRESULT - }} - impl IWiFiDirectServiceProvisioningInfo { - #[inline] pub unsafe fn get_selected_configuration_method(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SelectedConfigurationMethod)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_group_formation_needed(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsGroupFormationNeeded)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - } - RT_CLASS!{class WiFiDirectServiceProvisioningInfo: IWiFiDirectServiceProvisioningInfo} - DEFINE_IID!(IID_IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs, 3705266206, 33759, 17381, 143, 67, 203, 232, 71, 158, 132, 235); - RT_INTERFACE!{interface IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs(IWiFiDirectServiceAutoAcceptSessionConnectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs] { - fn get_Session(&mut self, out: *mut *mut WiFiDirectServiceSession) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_SessionInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT - }} - impl IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs { - #[inline] pub unsafe fn get_session(&mut self) -> Result> { + #[inline] pub unsafe fn get_wap_application_ids(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Session)(self, &mut out); + let hr = ((*self.lpVtbl).get_WapApplicationIds)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_session_info(&mut self) -> Result> { + #[inline] pub unsafe fn get_wap_content_types(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SessionInfo)(self, &mut out); + let hr = ((*self.lpVtbl).get_WapContentTypes)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class WiFiDirectServiceSession: IWiFiDirectServiceSession} - RT_CLASS!{class WiFiDirectServiceAutoAcceptSessionConnectedEventArgs: IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs} - DEFINE_IID!(IID_IWiFiDirectServiceRemotePortAddedEventArgs, 3570318017, 16339, 20238, 183, 189, 120, 41, 6, 244, 68, 17); - RT_INTERFACE!{interface IWiFiDirectServiceRemotePortAddedEventArgs(IWiFiDirectServiceRemotePortAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceRemotePortAddedEventArgs] { - #[cfg(not(feature="windows.networking"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.networking")] fn get_EndpointPairs(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::networking::EndpointPair>) -> HRESULT, - fn get_Protocol(&mut self, out: *mut WiFiDirectServiceIPProtocol) -> HRESULT - }} - impl IWiFiDirectServiceRemotePortAddedEventArgs { - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_endpoint_pairs(&mut self) -> Result>> { + #[inline] pub unsafe fn get_broadcast_types(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_EndpointPairs)(self, &mut out); + let hr = ((*self.lpVtbl).get_BroadcastTypes)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_protocol(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Protocol)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_broadcast_channels(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BroadcastChannels)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class WiFiDirectServiceRemotePortAddedEventArgs: IWiFiDirectServiceRemotePortAddedEventArgs} - DEFINE_IID!(IID_IWiFiDirectServiceSessionDeferredEventArgs, 2382109055, 4609, 20255, 182, 244, 93, 241, 183, 185, 251, 46); - RT_INTERFACE!{interface IWiFiDirectServiceSessionDeferredEventArgs(IWiFiDirectServiceSessionDeferredEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceSessionDeferredEventArgs] { - #[cfg(feature="windows.storage")] fn get_DeferredSessionInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + DEFINE_IID!(IID_ISmsFilterRuleFactory, 12805384, 25238, 20265, 154, 173, 137, 32, 206, 186, 60, 232); + RT_INTERFACE!{static interface ISmsFilterRuleFactory(ISmsFilterRuleFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISmsFilterRuleFactory] { + fn CreateFilterRule(&mut self, messageType: SmsMessageType, out: *mut *mut SmsFilterRule) -> HRESULT }} - impl IWiFiDirectServiceSessionDeferredEventArgs { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_deferred_session_info(&mut self) -> Result> { + impl ISmsFilterRuleFactory { + #[inline] pub unsafe fn create_filter_rule(&mut self, messageType: SmsMessageType) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeferredSessionInfo)(self, &mut out); + let hr = ((*self.lpVtbl).CreateFilterRule)(self, messageType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class WiFiDirectServiceSessionDeferredEventArgs: IWiFiDirectServiceSessionDeferredEventArgs} - DEFINE_IID!(IID_IWiFiDirectServiceSessionRequestedEventArgs, 1958595601, 21462, 18841, 180, 248, 108, 142, 204, 23, 113, 231); - RT_INTERFACE!{interface IWiFiDirectServiceSessionRequestedEventArgs(IWiFiDirectServiceSessionRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceSessionRequestedEventArgs] { - fn GetSessionRequest(&mut self, out: *mut *mut WiFiDirectServiceSessionRequest) -> HRESULT + RT_CLASS!{class SmsFilterRule: ISmsFilterRule [ISmsFilterRuleFactory] [CLSID_SmsFilterRule]} + DEFINE_CLSID!(CLSID_SmsFilterRule = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,70,105,108,116,101,114,82,117,108,101,0]); + DEFINE_IID!(IID_ISmsFilterRules, 1313336059, 31181, 18561, 152, 148, 85, 164, 19, 91, 35, 250); + RT_INTERFACE!{interface ISmsFilterRules(ISmsFilterRulesVtbl): IInspectable(IInspectableVtbl) [IID_ISmsFilterRules] { + fn get_ActionType(&mut self, out: *mut SmsFilterActionType) -> HRESULT, + fn get_Rules(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT }} - impl IWiFiDirectServiceSessionRequestedEventArgs { - #[inline] pub unsafe fn get_session_request(&mut self) -> Result> { + impl ISmsFilterRules { + #[inline] pub unsafe fn get_action_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActionType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_rules(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSessionRequest)(self, &mut out); + let hr = ((*self.lpVtbl).get_Rules)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class WiFiDirectServiceSessionRequest: IWiFiDirectServiceSessionRequest} - RT_CLASS!{class WiFiDirectServiceSessionRequestedEventArgs: IWiFiDirectServiceSessionRequestedEventArgs} - DEFINE_IID!(IID_IWiFiDirectServiceAdvertiserFactory, 822520845, 46150, 20243, 159, 154, 138, 233, 37, 254, 186, 43); - RT_INTERFACE!{static interface IWiFiDirectServiceAdvertiserFactory(IWiFiDirectServiceAdvertiserFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceAdvertiserFactory] { - fn CreateWiFiDirectServiceAdvertiser(&mut self, serviceName: HSTRING, out: *mut *mut WiFiDirectServiceAdvertiser) -> HRESULT + DEFINE_IID!(IID_ISmsFilterRulesFactory, 2694391021, 28206, 17712, 159, 222, 70, 93, 2, 238, 208, 14); + RT_INTERFACE!{static interface ISmsFilterRulesFactory(ISmsFilterRulesFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISmsFilterRulesFactory] { + fn CreateFilterRules(&mut self, actionType: SmsFilterActionType, out: *mut *mut SmsFilterRules) -> HRESULT }} - impl IWiFiDirectServiceAdvertiserFactory { - #[inline] pub unsafe fn create_wi_fi_direct_service_advertiser(&mut self, serviceName: &HStringArg) -> Result> { + impl ISmsFilterRulesFactory { + #[inline] pub unsafe fn create_filter_rules(&mut self, actionType: SmsFilterActionType) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWiFiDirectServiceAdvertiser)(self, serviceName.get(), &mut out); + let hr = ((*self.lpVtbl).CreateFilterRules)(self, actionType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class WiFiDirectServiceAdvertiser: IWiFiDirectServiceAdvertiser [IWiFiDirectServiceAdvertiserFactory] [CLSID_WiFiDirectServiceAdvertiser]} - DEFINE_CLSID!(CLSID_WiFiDirectServiceAdvertiser = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,46,83,101,114,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,83,101,114,118,105,99,101,65,100,118,101,114,116,105,115,101,114,0]); - DEFINE_IID!(IID_IWiFiDirectServiceAdvertiser, 2762612449, 40335, 20303, 147, 238, 125, 222, 162, 227, 127, 70); - RT_INTERFACE!{interface IWiFiDirectServiceAdvertiser(IWiFiDirectServiceAdvertiserVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceAdvertiser] { - fn get_ServiceName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_ServiceNamePrefixes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_ServiceInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), - #[cfg(feature="windows.storage")] fn put_ServiceInfo(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - fn get_AutoAcceptSession(&mut self, out: *mut bool) -> HRESULT, - fn put_AutoAcceptSession(&mut self, value: bool) -> HRESULT, - fn get_PreferGroupOwnerMode(&mut self, out: *mut bool) -> HRESULT, - fn put_PreferGroupOwnerMode(&mut self, value: bool) -> HRESULT, - fn get_PreferredConfigurationMethods(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_ServiceStatus(&mut self, out: *mut WiFiDirectServiceStatus) -> HRESULT, - fn put_ServiceStatus(&mut self, value: WiFiDirectServiceStatus) -> HRESULT, - fn get_CustomServiceStatusCode(&mut self, out: *mut u32) -> HRESULT, - fn put_CustomServiceStatusCode(&mut self, value: u32) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy13(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_DeferredSessionInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy14(&mut self) -> (), - #[cfg(feature="windows.storage")] fn put_DeferredSessionInfo(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - fn get_AdvertisementStatus(&mut self, out: *mut WiFiDirectServiceAdvertisementStatus) -> HRESULT, - fn get_ServiceError(&mut self, out: *mut WiFiDirectServiceError) -> HRESULT, - fn add_SessionRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SessionRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_AutoAcceptSessionConnected(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AutoAcceptSessionConnected(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_AdvertisementStatusChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AdvertisementStatusChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn ConnectAsync(&mut self, deviceInfo: *mut super::super::enumeration::DeviceInformation, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ConnectAsyncWithPin(&mut self, deviceInfo: *mut super::super::enumeration::DeviceInformation, pin: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn Start(&mut self) -> HRESULT, - fn Stop(&mut self) -> HRESULT + RT_CLASS!{class SmsFilterRules: ISmsFilterRules [ISmsFilterRulesFactory] [CLSID_SmsFilterRules]} + DEFINE_CLSID!(CLSID_SmsFilterRules = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,70,105,108,116,101,114,82,117,108,101,115,0]); + DEFINE_IID!(IID_ISmsMessageRegistrationStatics, 1671451748, 10392, 18296, 160, 60, 111, 153, 73, 7, 214, 58); + RT_INTERFACE!{static interface ISmsMessageRegistrationStatics(ISmsMessageRegistrationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageRegistrationStatics] { + fn get_AllRegistrations(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn Register(&mut self, id: HSTRING, filterRules: *mut SmsFilterRules, out: *mut *mut SmsMessageRegistration) -> HRESULT }} - impl IWiFiDirectServiceAdvertiser { - #[inline] pub unsafe fn get_service_name(&mut self) -> Result { + impl ISmsMessageRegistrationStatics { + #[inline] pub unsafe fn get_all_registrations(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ServiceName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AllRegistrations)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_service_name_prefixes(&mut self) -> Result>> { + #[inline] pub unsafe fn register(&mut self, id: &HStringArg, filterRules: &SmsFilterRules) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ServiceNamePrefixes)(self, &mut out); + let hr = ((*self.lpVtbl).Register)(self, id.get(), filterRules as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_service_info(&mut self) -> Result> { + } + RT_CLASS!{class SmsMessageRegistration: ISmsMessageRegistration} + RT_ACTIVATABLE!{ISmsMessageRegistrationStatics [CLSID_SmsMessageRegistration]} + DEFINE_CLSID!(CLSID_SmsMessageRegistration = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,77,101,115,115,97,103,101,82,101,103,105,115,116,114,97,116,105,111,110,0]); + DEFINE_IID!(IID_ISmsMessageRegistration, 387993662, 62287, 17515, 131, 179, 15, 241, 153, 35, 180, 9); + RT_INTERFACE!{interface ISmsMessageRegistration(ISmsMessageRegistrationVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageRegistration] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn Unregister(&mut self) -> HRESULT, + fn add_MessageReceived(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceived(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISmsMessageRegistration { + #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ServiceInfo)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_service_info(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_ServiceInfo)(self, value as *const _ as *mut _); + #[inline] pub unsafe fn unregister(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Unregister)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_auto_accept_session(&mut self) -> Result { + #[inline] pub unsafe fn add_message_received(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AutoAcceptSession)(self, &mut out); + let hr = ((*self.lpVtbl).add_MessageReceived)(self, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_auto_accept_session(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_AutoAcceptSession)(self, value); + #[inline] pub unsafe fn remove_message_received(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MessageReceived)(self, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_prefer_group_owner_mode(&mut self) -> Result { + } + RT_STRUCT! { struct LegacySmsApiContract { + + }} + DEFINE_IID!(IID_ISmsMessage, 3980156456, 27012, 19207, 129, 29, 141, 89, 6, 237, 60, 234); + RT_INTERFACE!{interface ISmsMessage(ISmsMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessage] { + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_MessageClass(&mut self, out: *mut SmsMessageClass) -> HRESULT + }} + impl ISmsMessage { + #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PreferGroupOwnerMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_prefer_group_owner_mode(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_PreferGroupOwnerMode)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preferred_configuration_methods(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_PreferredConfigurationMethods)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_status(&mut self) -> Result { + #[inline] pub unsafe fn get_message_class(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_MessageClass)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_service_status(&mut self, value: WiFiDirectServiceStatus) -> Result<()> { - let hr = ((*self.lpVtbl).put_ServiceStatus)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_service_status_code(&mut self) -> Result { + } + DEFINE_IID!(IID_ISmsBinaryMessage, 1542776851, 15187, 19566, 182, 26, 216, 106, 99, 117, 86, 80); + RT_INTERFACE!{interface ISmsBinaryMessage(ISmsBinaryMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsBinaryMessage] { + fn get_Format(&mut self, out: *mut SmsDataFormat) -> HRESULT, + fn put_Format(&mut self, value: SmsDataFormat) -> HRESULT, + fn GetData(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn SetData(&mut self, valueSize: u32, value: *mut u8) -> HRESULT + }} + impl ISmsBinaryMessage { + #[inline] pub unsafe fn get_format(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CustomServiceStatusCode)(self, &mut out); + let hr = ((*self.lpVtbl).get_Format)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_custom_service_status_code(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_CustomServiceStatusCode)(self, value); + #[inline] pub unsafe fn set_format(&mut self, value: SmsDataFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_Format)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_deferred_session_info(&mut self) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeferredSessionInfo)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetData)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_deferred_session_info(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_DeferredSessionInfo)(self, value as *const _ as *mut _); + #[inline] pub unsafe fn set_data(&mut self, value: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).SetData)(self, value.len() as u32, value.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_advertisement_status(&mut self) -> Result { + } + RT_CLASS!{class SmsBinaryMessage: ISmsBinaryMessage} + DEFINE_IID!(IID_ISmsTextMessage, 3592196172, 42133, 18559, 154, 111, 151, 21, 72, 197, 188, 159); + RT_INTERFACE!{interface ISmsTextMessage(ISmsTextMessageVtbl): IInspectable(IInspectableVtbl) [IID_ISmsTextMessage] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_PartReferenceId(&mut self, out: *mut u32) -> HRESULT, + fn get_PartNumber(&mut self, out: *mut u32) -> HRESULT, + fn get_PartCount(&mut self, out: *mut u32) -> HRESULT, + fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_To(&mut self, value: HSTRING) -> HRESULT, + fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_From(&mut self, value: HSTRING) -> HRESULT, + fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Body(&mut self, value: HSTRING) -> HRESULT, + fn get_Encoding(&mut self, out: *mut SmsEncoding) -> HRESULT, + fn put_Encoding(&mut self, value: SmsEncoding) -> HRESULT, + fn ToBinaryMessages(&mut self, format: SmsDataFormat, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl ISmsTextMessage { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AdvertisementStatus)(self, &mut out); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_service_error(&mut self) -> Result { + #[inline] pub unsafe fn get_part_reference_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceError)(self, &mut out); + let hr = ((*self.lpVtbl).get_PartReferenceId)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn add_session_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn get_part_number(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SessionRequested)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_PartNumber)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_session_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SessionRequested)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_auto_accept_session_connected(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn get_part_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AutoAcceptSessionConnected)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_PartCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_auto_accept_session_connected(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AutoAcceptSessionConnected)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_advertisement_status_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_AdvertisementStatusChanged)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_to(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_To)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn remove_advertisement_status_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_AdvertisementStatusChanged)(self, token); + #[inline] pub unsafe fn set_to(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_To)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn connect_async(&mut self, deviceInfo: &super::super::enumeration::DeviceInformation) -> Result>> { + #[inline] pub unsafe fn get_from(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ConnectAsync)(self, deviceInfo as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_From)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn connect_async_with_pin(&mut self, deviceInfo: &super::super::enumeration::DeviceInformation, pin: &HStringArg) -> Result>> { + #[inline] pub unsafe fn set_from(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_From)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_body(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ConnectAsyncWithPin)(self, deviceInfo as *const _ as *mut _, pin.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn start(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Start)(self); + #[inline] pub unsafe fn set_body(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Body)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn stop(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Stop)(self); + #[inline] pub unsafe fn get_encoding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Encoding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_encoding(&mut self, value: SmsEncoding) -> Result<()> { + let hr = ((*self.lpVtbl).put_Encoding)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IWiFiDirectServiceStatics, 2108948549, 64884, 18056, 183, 37, 93, 206, 134, 172, 242, 51); - RT_INTERFACE!{static interface IWiFiDirectServiceStatics(IWiFiDirectServiceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceStatics] { - fn GetSelector(&mut self, serviceName: HSTRING, out: *mut HSTRING) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), - #[cfg(feature="windows.storage")] fn GetSelectorWithFilter(&mut self, serviceName: HSTRING, serviceInfoFilter: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT - }} - impl IWiFiDirectServiceStatics { - #[inline] pub unsafe fn get_selector(&mut self, serviceName: &HStringArg) -> Result { + #[inline] pub unsafe fn to_binary_messages(&mut self, format: SmsDataFormat) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSelector)(self, serviceName.get(), &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).ToBinaryMessages)(self, format, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_selector_with_filter(&mut self, serviceName: &HStringArg, serviceInfoFilter: &::rt::gen::windows::storage::streams::IBuffer) -> Result { + } + DEFINE_IID!(IID_ISmsTextMessageStatics, 2137572845, 15564, 18339, 140, 85, 56, 13, 59, 1, 8, 146); + RT_INTERFACE!{static interface ISmsTextMessageStatics(ISmsTextMessageStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsTextMessageStatics] { + fn FromBinaryMessage(&mut self, binaryMessage: *mut SmsBinaryMessage, out: *mut *mut SmsTextMessage) -> HRESULT, + fn FromBinaryData(&mut self, format: SmsDataFormat, valueSize: u32, value: *mut u8, out: *mut *mut SmsTextMessage) -> HRESULT + }} + impl ISmsTextMessageStatics { + #[inline] pub unsafe fn from_binary_message(&mut self, binaryMessage: &SmsBinaryMessage) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetSelectorWithFilter)(self, serviceName.get(), serviceInfoFilter as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).FromBinaryMessage)(self, binaryMessage as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + #[inline] pub unsafe fn from_binary_data(&mut self, format: SmsDataFormat, value: &[u8]) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).FromBinaryData)(self, format, value.len() as u32, value.as_ptr() as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class WiFiDirectService: IWiFiDirectService} - RT_ACTIVATABLE!{IWiFiDirectServiceStatics [CLSID_WiFiDirectService]} - DEFINE_CLSID!(CLSID_WiFiDirectService = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,46,83,101,114,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,83,101,114,118,105,99,101,0]); - DEFINE_IID!(IID_IWiFiDirectService, 1353366456, 24433, 17900, 132, 241, 161, 228, 252, 120, 121, 163); - RT_INTERFACE!{interface IWiFiDirectService(IWiFiDirectServiceVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectService] { - #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_RemoteServiceInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - fn get_SupportedConfigurationMethods(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_PreferGroupOwnerMode(&mut self, out: *mut bool) -> HRESULT, - fn put_PreferGroupOwnerMode(&mut self, value: bool) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), - #[cfg(feature="windows.storage")] fn get_SessionInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), - #[cfg(feature="windows.storage")] fn put_SessionInfo(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - fn get_ServiceError(&mut self, out: *mut WiFiDirectServiceError) -> HRESULT, - fn add_SessionDeferred(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SessionDeferred(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn GetProvisioningInfoAsync(&mut self, selectedConfigurationMethod: WiFiDirectServiceConfigurationMethod, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ConnectAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ConnectAsyncWithPin(&mut self, pin: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + RT_CLASS!{class SmsTextMessage: ISmsTextMessage} + RT_ACTIVATABLE!{ISmsTextMessageStatics [CLSID_SmsTextMessage]} + DEFINE_CLSID!(CLSID_SmsTextMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,84,101,120,116,77,101,115,115,97,103,101,0]); + RT_ENUM! { enum SmsMessageFilter: i32 { + All (SmsMessageFilter_All) = 0, Unread (SmsMessageFilter_Unread) = 1, Read (SmsMessageFilter_Read) = 2, Sent (SmsMessageFilter_Sent) = 3, Draft (SmsMessageFilter_Draft) = 4, }} - impl IWiFiDirectService { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_remote_service_info(&mut self) -> Result> { + RT_CLASS!{class DeleteSmsMessageOperation: super::super::foundation::IAsyncAction} + RT_CLASS!{class DeleteSmsMessagesOperation: super::super::foundation::IAsyncAction} + RT_CLASS!{class GetSmsMessageOperation: super::super::foundation::IAsyncOperation} + RT_CLASS!{class GetSmsMessagesOperation: super::super::foundation::IAsyncOperationWithProgress, i32>} + DEFINE_IID!(IID_ISmsDeviceMessageStore, 2559177299, 61832, 17447, 141, 84, 206, 12, 36, 35, 197, 193); + RT_INTERFACE!{interface ISmsDeviceMessageStore(ISmsDeviceMessageStoreVtbl): IInspectable(IInspectableVtbl) [IID_ISmsDeviceMessageStore] { + fn DeleteMessageAsync(&mut self, messageId: u32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteMessagesAsync(&mut self, messageFilter: SmsMessageFilter, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetMessageAsync(&mut self, messageId: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetMessagesAsync(&mut self, messageFilter: SmsMessageFilter, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress, i32>) -> HRESULT, + fn get_MaxMessages(&mut self, out: *mut u32) -> HRESULT + }} + impl ISmsDeviceMessageStore { + #[inline] pub unsafe fn delete_message_async(&mut self, messageId: u32) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RemoteServiceInfo)(self, &mut out); + let hr = ((*self.lpVtbl).DeleteMessageAsync)(self, messageId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_supported_configuration_methods(&mut self) -> Result>> { + #[inline] pub unsafe fn delete_messages_async(&mut self, messageFilter: SmsMessageFilter) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SupportedConfigurationMethods)(self, &mut out); + let hr = ((*self.lpVtbl).DeleteMessagesAsync)(self, messageFilter, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_prefer_group_owner_mode(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PreferGroupOwnerMode)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_prefer_group_owner_mode(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_PreferGroupOwnerMode)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_session_info(&mut self) -> Result> { + #[inline] pub unsafe fn get_message_async(&mut self, messageId: u32) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SessionInfo)(self, &mut out); + let hr = ((*self.lpVtbl).GetMessageAsync)(self, messageId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_session_info(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { - let hr = ((*self.lpVtbl).put_SessionInfo)(self, value as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_error(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ServiceError)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_messages_async(&mut self, messageFilter: SmsMessageFilter) -> Result, i32>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessagesAsync)(self, messageFilter, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_session_deferred(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn get_max_messages(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SessionDeferred)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_MaxMessages)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_session_deferred(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SessionDeferred)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_provisioning_info_async(&mut self, selectedConfigurationMethod: WiFiDirectServiceConfigurationMethod) -> Result>> { + } + RT_CLASS!{class SmsDeviceMessageStore: ISmsDeviceMessageStore} + RT_CLASS!{class SendSmsMessageOperation: super::super::foundation::IAsyncAction} + DEFINE_IID!(IID_ISmsMessageReceivedEventArgs, 149424792, 47333, 16833, 163, 216, 211, 171, 250, 226, 38, 117); + RT_INTERFACE!{interface ISmsMessageReceivedEventArgs(ISmsMessageReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageReceivedEventArgs] { + fn get_TextMessage(&mut self, out: *mut *mut SmsTextMessage) -> HRESULT, + fn get_BinaryMessage(&mut self, out: *mut *mut SmsBinaryMessage) -> HRESULT + }} + impl ISmsMessageReceivedEventArgs { + #[inline] pub unsafe fn get_text_message(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetProvisioningInfoAsync)(self, selectedConfigurationMethod, &mut out); + let hr = ((*self.lpVtbl).get_TextMessage)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn connect_async(&mut self) -> Result>> { + #[inline] pub unsafe fn get_binary_message(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ConnectAsync)(self, &mut out); + let hr = ((*self.lpVtbl).get_BinaryMessage)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn connect_async_with_pin(&mut self, pin: &HStringArg) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ConnectAsyncWithPin)(self, pin.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + RT_CLASS!{class SmsMessageReceivedEventArgs: ISmsMessageReceivedEventArgs} + DEFINE_IID!(IID_SmsMessageReceivedEventHandler, 192599049, 60461, 18382, 162, 83, 115, 43, 238, 235, 202, 205); + RT_DELEGATE!{delegate SmsMessageReceivedEventHandler(SmsMessageReceivedEventHandlerVtbl, SmsMessageReceivedEventHandlerImpl) [IID_SmsMessageReceivedEventHandler] { + fn Invoke(&mut self, sender: *mut SmsDevice, e: *mut SmsMessageReceivedEventArgs) -> HRESULT + }} + impl SmsMessageReceivedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &SmsDevice, e: &SmsMessageReceivedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IWiFiDirectServiceSessionRequest, 2699197579, 20683, 19032, 155, 207, 228, 114, 185, 159, 186, 4); - RT_INTERFACE!{interface IWiFiDirectServiceSessionRequest(IWiFiDirectServiceSessionRequestVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceSessionRequest] { - fn get_DeviceInformation(&mut self, out: *mut *mut super::super::enumeration::DeviceInformation) -> HRESULT, - fn get_ProvisioningInfo(&mut self, out: *mut *mut WiFiDirectServiceProvisioningInfo) -> HRESULT, - #[cfg(feature="windows.storage")] fn get_SessionInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + RT_CLASS!{class SmsDevice: ISmsDevice} + RT_ACTIVATABLE!{ISmsDeviceStatics [CLSID_SmsDevice]} + RT_ACTIVATABLE!{ISmsDeviceStatics2 [CLSID_SmsDevice]} + DEFINE_CLSID!(CLSID_SmsDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_SmsDeviceStatusChangedEventHandler, 2552959330, 15831, 17944, 175, 137, 12, 39, 45, 93, 6, 216); + RT_DELEGATE!{delegate SmsDeviceStatusChangedEventHandler(SmsDeviceStatusChangedEventHandlerVtbl, SmsDeviceStatusChangedEventHandlerImpl) [IID_SmsDeviceStatusChangedEventHandler] { + fn Invoke(&mut self, sender: *mut SmsDevice) -> HRESULT }} - impl IWiFiDirectServiceSessionRequest { - #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + impl SmsDeviceStatusChangedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &SmsDevice) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class GetSmsDeviceOperation: super::super::foundation::IAsyncOperation} + DEFINE_IID!(IID_ISmsDeviceStatics, 4169992170, 55317, 19921, 162, 52, 69, 32, 206, 70, 4, 164); + RT_INTERFACE!{static interface ISmsDeviceStatics(ISmsDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsDeviceStatics] { + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISmsDeviceStatics { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_provisioning_info(&mut self) -> Result> { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ProvisioningInfo)(self, &mut out); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_session_info(&mut self) -> Result> { + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SessionInfo)(self, &mut out); + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IWiFiDirectServiceSession, 2165580131, 58406, 18379, 134, 64, 225, 179, 88, 139, 242, 111); - RT_INTERFACE!{interface IWiFiDirectServiceSession(IWiFiDirectServiceSessionVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceSession] { - fn get_ServiceName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Status(&mut self, out: *mut WiFiDirectServiceSessionStatus) -> HRESULT, - fn get_ErrorStatus(&mut self, out: *mut WiFiDirectServiceSessionErrorStatus) -> HRESULT, - fn get_SessionId(&mut self, out: *mut u32) -> HRESULT, - fn get_AdvertisementId(&mut self, out: *mut u32) -> HRESULT, - fn get_ServiceAddress(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_SessionAddress(&mut self, out: *mut HSTRING) -> HRESULT, - #[cfg(not(feature="windows.networking"))] fn __Dummy7(&mut self) -> (), - #[cfg(feature="windows.networking")] fn GetConnectionEndpointPairs(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::networking::EndpointPair>) -> HRESULT, - fn add_SessionStatusChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SessionStatusChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - #[cfg(not(feature="windows.networking"))] fn __Dummy10(&mut self) -> (), - #[cfg(feature="windows.networking")] fn AddStreamSocketListenerAsync(&mut self, value: *mut ::rt::gen::windows::networking::sockets::StreamSocketListener, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - #[cfg(not(feature="windows.networking"))] fn __Dummy11(&mut self) -> (), - #[cfg(feature="windows.networking")] fn AddDatagramSocketAsync(&mut self, value: *mut ::rt::gen::windows::networking::sockets::DatagramSocket, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn add_RemotePortAdded(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RemotePortAdded(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + DEFINE_IID!(IID_ISmsDeviceStatics2, 748756103, 2163, 19631, 138, 125, 189, 71, 30, 133, 134, 209); + RT_INTERFACE!{static interface ISmsDeviceStatics2(ISmsDeviceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmsDeviceStatics2] { + fn FromNetworkAccountIdAsync(&mut self, networkAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IWiFiDirectServiceSession { - #[inline] pub unsafe fn get_service_name(&mut self) -> Result { + impl ISmsDeviceStatics2 { + #[inline] pub unsafe fn from_network_account_id_async(&mut self, networkAccountId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ServiceName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_status(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ErrorStatus)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + let hr = ((*self.lpVtbl).FromNetworkAccountIdAsync)(self, networkAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_session_id(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SessionId)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_ISmsDevice, 152539629, 34603, 20204, 156, 114, 171, 17, 98, 123, 52, 236); + RT_INTERFACE!{interface ISmsDevice(ISmsDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ISmsDevice] { + fn SendMessageAsync(&mut self, message: *mut ISmsMessage, out: *mut *mut SendSmsMessageOperation) -> HRESULT, + fn CalculateLength(&mut self, message: *mut SmsTextMessage, out: *mut SmsEncodedLength) -> HRESULT, + fn get_AccountPhoneNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CellularClass(&mut self, out: *mut CellularClass) -> HRESULT, + fn get_MessageStore(&mut self, out: *mut *mut SmsDeviceMessageStore) -> HRESULT, + fn get_DeviceStatus(&mut self, out: *mut SmsDeviceStatus) -> HRESULT, + fn add_SmsMessageReceived(&mut self, eventHandler: *mut SmsMessageReceivedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SmsMessageReceived(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SmsDeviceStatusChanged(&mut self, eventHandler: *mut SmsDeviceStatusChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SmsDeviceStatusChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISmsDevice { + #[inline] pub unsafe fn send_message_async(&mut self, message: &ISmsMessage) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendMessageAsync)(self, message as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_advertisement_id(&mut self) -> Result { + #[inline] pub unsafe fn calculate_length(&mut self, message: &SmsTextMessage) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AdvertisementId)(self, &mut out); + let hr = ((*self.lpVtbl).CalculateLength)(self, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_service_address(&mut self) -> Result { + #[inline] pub unsafe fn get_account_phone_number(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ServiceAddress)(self, &mut out); + let hr = ((*self.lpVtbl).get_AccountPhoneNumber)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_session_address(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SessionAddress)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_cellular_class(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CellularClass)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_connection_endpoint_pairs(&mut self) -> Result>> { + #[inline] pub unsafe fn get_message_store(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetConnectionEndpointPairs)(self, &mut out); + let hr = ((*self.lpVtbl).get_MessageStore)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn add_session_status_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn get_device_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_SessionStatusChanged)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_DeviceStatus)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_session_status_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_SessionStatusChanged)(self, token); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn add_stream_socket_listener_async(&mut self, value: &::rt::gen::windows::networking::sockets::StreamSocketListener) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).AddStreamSocketListenerAsync)(self, value as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn add_sms_message_received(&mut self, eventHandler: &SmsMessageReceivedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SmsMessageReceived)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.networking")] #[inline] pub unsafe fn add_datagram_socket_async(&mut self, value: &::rt::gen::windows::networking::sockets::DatagramSocket) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).AddDatagramSocketAsync)(self, value as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn remove_sms_message_received(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SmsMessageReceived)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn add_remote_port_added(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub unsafe fn add_sms_device_status_changed(&mut self, eventHandler: &SmsDeviceStatusChangedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_RemotePortAdded)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).add_SmsDeviceStatusChanged)(self, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_remote_port_added(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_RemotePortAdded)(self, token); + #[inline] pub unsafe fn remove_sms_device_status_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SmsDeviceStatusChanged)(self, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } } } -} // Windows.Devices.WiFiDirect.Services -} // Windows.Devices.WiFiDirect -pub mod portable { // Windows.Devices.Portable -use ::prelude::*; - RT_STRUCT! { struct PortableDeviceContract { - - }} - RT_ENUM! { enum ServiceDeviceType: i32 { - CalendarService (ServiceDeviceType_CalendarService) = 0, ContactsService (ServiceDeviceType_ContactsService) = 1, DeviceStatusService (ServiceDeviceType_DeviceStatusService) = 2, NotesService (ServiceDeviceType_NotesService) = 3, RingtonesService (ServiceDeviceType_RingtonesService) = 4, SmsService (ServiceDeviceType_SmsService) = 5, TasksService (ServiceDeviceType_TasksService) = 6, - }} - DEFINE_IID!(IID_IStorageDeviceStatics, 1590576366, 6947, 19922, 134, 82, 188, 22, 79, 0, 49, 40); - RT_INTERFACE!{static interface IStorageDeviceStatics(IStorageDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStorageDeviceStatics] { - #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), - #[cfg(feature="windows.storage")] fn FromId(&mut self, deviceId: HSTRING, out: *mut *mut super::super::storage::StorageFolder) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_ISmsReceivedEventDetails, 1538592533, 58477, 19586, 132, 125, 90, 3, 4, 193, 213, 61); + RT_INTERFACE!{interface ISmsReceivedEventDetails(ISmsReceivedEventDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ISmsReceivedEventDetails] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MessageIndex(&mut self, out: *mut u32) -> HRESULT }} - impl IStorageDeviceStatics { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn from_id(&mut self, deviceId: &HStringArg) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromId)(self, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + impl ISmsReceivedEventDetails { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } + #[inline] pub unsafe fn get_message_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MessageIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } } - DEFINE_IID!(IID_IServiceDeviceStatics, 2827097313, 22983, 18976, 171, 166, 159, 103, 7, 147, 114, 48); - RT_INTERFACE!{static interface IServiceDeviceStatics(IServiceDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IServiceDeviceStatics] { - fn GetDeviceSelector(&mut self, serviceType: ServiceDeviceType, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromServiceId(&mut self, serviceId: Guid, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_ISmsReceivedEventDetails2, 1088445574, 42932, 18289, 154, 231, 11, 95, 251, 18, 192, 58); + RT_INTERFACE!{interface ISmsReceivedEventDetails2(ISmsReceivedEventDetails2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmsReceivedEventDetails2] { + fn get_MessageClass(&mut self, out: *mut SmsMessageClass) -> HRESULT, + fn get_BinaryMessage(&mut self, out: *mut *mut SmsBinaryMessage) -> HRESULT }} - impl IServiceDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&mut self, serviceType: ServiceDeviceType) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, serviceType, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + impl ISmsReceivedEventDetails2 { + #[inline] pub unsafe fn get_message_class(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MessageClass)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector_from_service_id(&mut self, serviceId: Guid) -> Result { + #[inline] pub unsafe fn get_binary_message(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelectorFromServiceId)(self, serviceId, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_BinaryMessage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_ACTIVATABLE!{IStorageDeviceStatics [CLSID_StorageDevice]} - DEFINE_CLSID!(CLSID_StorageDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,114,116,97,98,108,101,46,83,116,111,114,97,103,101,68,101,118,105,99,101,0]); - RT_ACTIVATABLE!{IServiceDeviceStatics [CLSID_ServiceDevice]} - DEFINE_CLSID!(CLSID_ServiceDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,114,116,97,98,108,101,46,83,101,114,118,105,99,101,68,101,118,105,99,101,0]); -} // Windows.Devices.Portable -pub mod scanners { // Windows.Devices.Scanners + RT_CLASS!{class SmsReceivedEventDetails: ISmsReceivedEventDetails} +} // Windows.Devices.Sms +pub mod alljoyn { // Windows.Devices.AllJoyn use ::prelude::*; - RT_STRUCT! { struct ScannerDeviceContract { - - }} - RT_ENUM! { enum ImageScannerFormat: i32 { - Jpeg (ImageScannerFormat_Jpeg) = 0, Png (ImageScannerFormat_Png) = 1, DeviceIndependentBitmap (ImageScannerFormat_DeviceIndependentBitmap) = 2, Tiff (ImageScannerFormat_Tiff) = 3, Xps (ImageScannerFormat_Xps) = 4, OpenXps (ImageScannerFormat_OpenXps) = 5, Pdf (ImageScannerFormat_Pdf) = 6, + RT_ENUM! { enum AllJoynAuthenticationMechanism: i32 { + None (AllJoynAuthenticationMechanism_None) = 0, SrpAnonymous (AllJoynAuthenticationMechanism_SrpAnonymous) = 1, SrpLogon (AllJoynAuthenticationMechanism_SrpLogon) = 2, EcdheNull (AllJoynAuthenticationMechanism_EcdheNull) = 3, EcdhePsk (AllJoynAuthenticationMechanism_EcdhePsk) = 4, EcdheEcdsa (AllJoynAuthenticationMechanism_EcdheEcdsa) = 5, EcdheSpeke (AllJoynAuthenticationMechanism_EcdheSpeke) = 6, }} - DEFINE_IID!(IID_IImageScannerFormatConfiguration, 2921815313, 56031, 16400, 191, 16, 204, 165, 200, 61, 203, 176); - RT_INTERFACE!{interface IImageScannerFormatConfiguration(IImageScannerFormatConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerFormatConfiguration] { - fn get_DefaultFormat(&mut self, out: *mut ImageScannerFormat) -> HRESULT, - fn get_Format(&mut self, out: *mut ImageScannerFormat) -> HRESULT, - fn put_Format(&mut self, value: ImageScannerFormat) -> HRESULT, - fn IsFormatSupported(&mut self, value: ImageScannerFormat, out: *mut bool) -> HRESULT + DEFINE_IID!(IID_IAllJoynStatusStatics, 3501695358, 3369, 19881, 138, 198, 84, 197, 84, 190, 219, 197); + RT_INTERFACE!{static interface IAllJoynStatusStatics(IAllJoynStatusStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynStatusStatics] { + fn get_Ok(&mut self, out: *mut i32) -> HRESULT, + fn get_Fail(&mut self, out: *mut i32) -> HRESULT, + fn get_OperationTimedOut(&mut self, out: *mut i32) -> HRESULT, + fn get_OtherEndClosed(&mut self, out: *mut i32) -> HRESULT, + fn get_ConnectionRefused(&mut self, out: *mut i32) -> HRESULT, + fn get_AuthenticationFailed(&mut self, out: *mut i32) -> HRESULT, + fn get_AuthenticationRejectedByUser(&mut self, out: *mut i32) -> HRESULT, + fn get_SslConnectFailed(&mut self, out: *mut i32) -> HRESULT, + fn get_SslIdentityVerificationFailed(&mut self, out: *mut i32) -> HRESULT, + fn get_InsufficientSecurity(&mut self, out: *mut i32) -> HRESULT, + fn get_InvalidArgument1(&mut self, out: *mut i32) -> HRESULT, + fn get_InvalidArgument2(&mut self, out: *mut i32) -> HRESULT, + fn get_InvalidArgument3(&mut self, out: *mut i32) -> HRESULT, + fn get_InvalidArgument4(&mut self, out: *mut i32) -> HRESULT, + fn get_InvalidArgument5(&mut self, out: *mut i32) -> HRESULT, + fn get_InvalidArgument6(&mut self, out: *mut i32) -> HRESULT, + fn get_InvalidArgument7(&mut self, out: *mut i32) -> HRESULT, + fn get_InvalidArgument8(&mut self, out: *mut i32) -> HRESULT }} - impl IImageScannerFormatConfiguration { - #[inline] pub unsafe fn get_default_format(&mut self) -> Result { + impl IAllJoynStatusStatics { + #[inline] pub unsafe fn get_ok(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DefaultFormat)(self, &mut out); + let hr = ((*self.lpVtbl).get_Ok)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_format(&mut self) -> Result { + #[inline] pub unsafe fn get_fail(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Format)(self, &mut out); + let hr = ((*self.lpVtbl).get_Fail)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_format(&mut self, value: ImageScannerFormat) -> Result<()> { - let hr = ((*self.lpVtbl).put_Format)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_operation_timed_out(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OperationTimedOut)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn is_format_supported(&mut self, value: ImageScannerFormat) -> Result { + #[inline] pub unsafe fn get_other_end_closed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsFormatSupported)(self, value, &mut out); + let hr = ((*self.lpVtbl).get_OtherEndClosed)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class ImageScannerAutoConfiguration: IImageScannerFormatConfiguration} - RT_ENUM! { enum ImageScannerAutoCroppingMode: i32 { - Disabled (ImageScannerAutoCroppingMode_Disabled) = 0, SingleRegion (ImageScannerAutoCroppingMode_SingleRegion) = 1, MultipleRegion (ImageScannerAutoCroppingMode_MultipleRegion) = 2, - }} - RT_ENUM! { enum ImageScannerColorMode: i32 { - Color (ImageScannerColorMode_Color) = 0, Grayscale (ImageScannerColorMode_Grayscale) = 1, Monochrome (ImageScannerColorMode_Monochrome) = 2, AutoColor (ImageScannerColorMode_AutoColor) = 3, - }} - RT_STRUCT! { struct ImageScannerResolution { - DpiX: f32, DpiY: f32, - }} - DEFINE_IID!(IID_IImageScannerSourceConfiguration, 3216310357, 2884, 19586, 158, 137, 32, 95, 156, 35, 78, 89); - RT_INTERFACE!{interface IImageScannerSourceConfiguration(IImageScannerSourceConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerSourceConfiguration] { - fn get_MinScanArea(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_MaxScanArea(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_SelectedScanRegion(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn put_SelectedScanRegion(&mut self, value: super::super::foundation::Rect) -> HRESULT, - fn get_AutoCroppingMode(&mut self, out: *mut ImageScannerAutoCroppingMode) -> HRESULT, - fn put_AutoCroppingMode(&mut self, value: ImageScannerAutoCroppingMode) -> HRESULT, - fn IsAutoCroppingModeSupported(&mut self, value: ImageScannerAutoCroppingMode, out: *mut bool) -> HRESULT, - fn get_MinResolution(&mut self, out: *mut ImageScannerResolution) -> HRESULT, - fn get_MaxResolution(&mut self, out: *mut ImageScannerResolution) -> HRESULT, - fn get_OpticalResolution(&mut self, out: *mut ImageScannerResolution) -> HRESULT, - fn get_DesiredResolution(&mut self, out: *mut ImageScannerResolution) -> HRESULT, - fn put_DesiredResolution(&mut self, value: ImageScannerResolution) -> HRESULT, - fn get_ActualResolution(&mut self, out: *mut ImageScannerResolution) -> HRESULT, - fn get_DefaultColorMode(&mut self, out: *mut ImageScannerColorMode) -> HRESULT, - fn get_ColorMode(&mut self, out: *mut ImageScannerColorMode) -> HRESULT, - fn put_ColorMode(&mut self, value: ImageScannerColorMode) -> HRESULT, - fn IsColorModeSupported(&mut self, value: ImageScannerColorMode, out: *mut bool) -> HRESULT, - fn get_MinBrightness(&mut self, out: *mut i32) -> HRESULT, - fn get_MaxBrightness(&mut self, out: *mut i32) -> HRESULT, - fn get_BrightnessStep(&mut self, out: *mut u32) -> HRESULT, - fn get_DefaultBrightness(&mut self, out: *mut i32) -> HRESULT, - fn get_Brightness(&mut self, out: *mut i32) -> HRESULT, - fn put_Brightness(&mut self, value: i32) -> HRESULT, - fn get_MinContrast(&mut self, out: *mut i32) -> HRESULT, - fn get_MaxContrast(&mut self, out: *mut i32) -> HRESULT, - fn get_ContrastStep(&mut self, out: *mut u32) -> HRESULT, - fn get_DefaultContrast(&mut self, out: *mut i32) -> HRESULT, - fn get_Contrast(&mut self, out: *mut i32) -> HRESULT, - fn put_Contrast(&mut self, value: i32) -> HRESULT - }} - impl IImageScannerSourceConfiguration { - #[inline] pub unsafe fn get_min_scan_area(&mut self) -> Result { + #[inline] pub unsafe fn get_connection_refused(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinScanArea)(self, &mut out); + let hr = ((*self.lpVtbl).get_ConnectionRefused)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_scan_area(&mut self) -> Result { + #[inline] pub unsafe fn get_authentication_failed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxScanArea)(self, &mut out); + let hr = ((*self.lpVtbl).get_AuthenticationFailed)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_selected_scan_region(&mut self) -> Result { + #[inline] pub unsafe fn get_authentication_rejected_by_user(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_SelectedScanRegion)(self, &mut out); + let hr = ((*self.lpVtbl).get_AuthenticationRejectedByUser)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_selected_scan_region(&mut self, value: super::super::foundation::Rect) -> Result<()> { - let hr = ((*self.lpVtbl).put_SelectedScanRegion)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_cropping_mode(&mut self) -> Result { + #[inline] pub unsafe fn get_ssl_connect_failed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AutoCroppingMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_SslConnectFailed)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_auto_cropping_mode(&mut self, value: ImageScannerAutoCroppingMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_AutoCroppingMode)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn is_auto_cropping_mode_supported(&mut self, value: ImageScannerAutoCroppingMode) -> Result { + #[inline] pub unsafe fn get_ssl_identity_verification_failed(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsAutoCroppingModeSupported)(self, value, &mut out); + let hr = ((*self.lpVtbl).get_SslIdentityVerificationFailed)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_min_resolution(&mut self) -> Result { + #[inline] pub unsafe fn get_insufficient_security(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinResolution)(self, &mut out); + let hr = ((*self.lpVtbl).get_InsufficientSecurity)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_resolution(&mut self) -> Result { + #[inline] pub unsafe fn get_invalid_argument1(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxResolution)(self, &mut out); + let hr = ((*self.lpVtbl).get_InvalidArgument1)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_optical_resolution(&mut self) -> Result { + #[inline] pub unsafe fn get_invalid_argument2(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_OpticalResolution)(self, &mut out); + let hr = ((*self.lpVtbl).get_InvalidArgument2)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_desired_resolution(&mut self) -> Result { + #[inline] pub unsafe fn get_invalid_argument3(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DesiredResolution)(self, &mut out); + let hr = ((*self.lpVtbl).get_InvalidArgument3)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_desired_resolution(&mut self, value: ImageScannerResolution) -> Result<()> { - let hr = ((*self.lpVtbl).put_DesiredResolution)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_actual_resolution(&mut self) -> Result { + #[inline] pub unsafe fn get_invalid_argument4(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ActualResolution)(self, &mut out); + let hr = ((*self.lpVtbl).get_InvalidArgument4)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_default_color_mode(&mut self) -> Result { + #[inline] pub unsafe fn get_invalid_argument5(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DefaultColorMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_InvalidArgument5)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_color_mode(&mut self) -> Result { + #[inline] pub unsafe fn get_invalid_argument6(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ColorMode)(self, &mut out); + let hr = ((*self.lpVtbl).get_InvalidArgument6)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_color_mode(&mut self, value: ImageScannerColorMode) -> Result<()> { - let hr = ((*self.lpVtbl).put_ColorMode)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn is_color_mode_supported(&mut self, value: ImageScannerColorMode) -> Result { + #[inline] pub unsafe fn get_invalid_argument7(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsColorModeSupported)(self, value, &mut out); + let hr = ((*self.lpVtbl).get_InvalidArgument7)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_min_brightness(&mut self) -> Result { + #[inline] pub unsafe fn get_invalid_argument8(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinBrightness)(self, &mut out); + let hr = ((*self.lpVtbl).get_InvalidArgument8)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_brightness(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxBrightness)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_ACTIVATABLE!{IAllJoynStatusStatics [CLSID_AllJoynStatus]} + DEFINE_CLSID!(CLSID_AllJoynStatus = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,116,97,116,117,115,0]); + RT_ENUM! { enum AllJoynBusAttachmentState: i32 { + Disconnected (AllJoynBusAttachmentState_Disconnected) = 0, Connecting (AllJoynBusAttachmentState_Connecting) = 1, Connected (AllJoynBusAttachmentState_Connected) = 2, Disconnecting (AllJoynBusAttachmentState_Disconnecting) = 3, + }} + DEFINE_IID!(IID_IAllJoynBusAttachment, 4077515091, 7917, 17091, 162, 14, 67, 109, 65, 254, 98, 246); + RT_INTERFACE!{interface IAllJoynBusAttachment(IAllJoynBusAttachmentVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusAttachment] { + fn get_AboutData(&mut self, out: *mut *mut AllJoynAboutData) -> HRESULT, + fn get_ConnectionSpecification(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_State(&mut self, out: *mut AllJoynBusAttachmentState) -> HRESULT, + fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT, + fn PingAsync(&mut self, uniqueName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn Connect(&mut self) -> HRESULT, + fn Disconnect(&mut self) -> HRESULT, + fn add_StateChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_AuthenticationMechanisms(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn add_CredentialsRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CredentialsRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CredentialsVerificationRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CredentialsVerificationRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AuthenticationComplete(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AuthenticationComplete(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAllJoynBusAttachment { + #[inline] pub unsafe fn get_about_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AboutData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_brightness_step(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_BrightnessStep)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_connection_specification(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConnectionSpecification)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_brightness(&mut self) -> Result { + #[inline] pub unsafe fn get_state(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DefaultBrightness)(self, &mut out); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_brightness(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Brightness)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_brightness(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_Brightness)(self, value); + #[inline] pub unsafe fn ping_async(&mut self, uniqueName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PingAsync)(self, uniqueName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Connect)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_min_contrast(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MinContrast)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn disconnect(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Disconnect)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_max_contrast(&mut self) -> Result { + #[inline] pub unsafe fn add_state_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxContrast)(self, &mut out); + let hr = ((*self.lpVtbl).add_StateChanged)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_contrast_step(&mut self) -> Result { + #[inline] pub unsafe fn remove_state_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_authentication_mechanisms(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AuthenticationMechanisms)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_credentials_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ContrastStep)(self, &mut out); + let hr = ((*self.lpVtbl).add_CredentialsRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_default_contrast(&mut self) -> Result { + #[inline] pub unsafe fn remove_credentials_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CredentialsRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_credentials_verification_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DefaultContrast)(self, &mut out); + let hr = ((*self.lpVtbl).add_CredentialsVerificationRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_contrast(&mut self) -> Result { + #[inline] pub unsafe fn remove_credentials_verification_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CredentialsVerificationRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_authentication_complete(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Contrast)(self, &mut out); + let hr = ((*self.lpVtbl).add_AuthenticationComplete)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_contrast(&mut self, value: i32) -> Result<()> { - let hr = ((*self.lpVtbl).put_Contrast)(self, value); + #[inline] pub unsafe fn remove_authentication_complete(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AuthenticationComplete)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } } - RT_CLASS!{class ImageScannerFlatbedConfiguration: IImageScannerFormatConfiguration} - DEFINE_IID!(IID_IImageScannerFeederConfiguration, 1958587630, 64151, 19479, 130, 128, 64, 227, 156, 109, 204, 103); - RT_INTERFACE!{interface IImageScannerFeederConfiguration(IImageScannerFeederConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerFeederConfiguration] { - fn get_CanAutoDetectPageSize(&mut self, out: *mut bool) -> HRESULT, - fn get_AutoDetectPageSize(&mut self, out: *mut bool) -> HRESULT, - fn put_AutoDetectPageSize(&mut self, value: bool) -> HRESULT, - #[cfg(not(feature="windows.graphics"))] fn __Dummy3(&mut self) -> (), - #[cfg(feature="windows.graphics")] fn get_PageSize(&mut self, out: *mut super::super::graphics::printing::PrintMediaSize) -> HRESULT, - #[cfg(not(feature="windows.graphics"))] fn __Dummy4(&mut self) -> (), - #[cfg(feature="windows.graphics")] fn put_PageSize(&mut self, value: super::super::graphics::printing::PrintMediaSize) -> HRESULT, - #[cfg(not(feature="windows.graphics"))] fn __Dummy5(&mut self) -> (), - #[cfg(feature="windows.graphics")] fn get_PageOrientation(&mut self, out: *mut super::super::graphics::printing::PrintOrientation) -> HRESULT, - #[cfg(not(feature="windows.graphics"))] fn __Dummy6(&mut self) -> (), - #[cfg(feature="windows.graphics")] fn put_PageOrientation(&mut self, value: super::super::graphics::printing::PrintOrientation) -> HRESULT, - fn get_PageSizeDimensions(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, - #[cfg(not(feature="windows.graphics"))] fn __Dummy8(&mut self) -> (), - #[cfg(feature="windows.graphics")] fn IsPageSizeSupported(&mut self, pageSize: super::super::graphics::printing::PrintMediaSize, pageOrientation: super::super::graphics::printing::PrintOrientation, out: *mut bool) -> HRESULT, - fn get_MaxNumberOfPages(&mut self, out: *mut u32) -> HRESULT, - fn put_MaxNumberOfPages(&mut self, value: u32) -> HRESULT, - fn get_CanScanDuplex(&mut self, out: *mut bool) -> HRESULT, - fn get_Duplex(&mut self, out: *mut bool) -> HRESULT, - fn put_Duplex(&mut self, value: bool) -> HRESULT, - fn get_CanScanAhead(&mut self, out: *mut bool) -> HRESULT, - fn get_ScanAhead(&mut self, out: *mut bool) -> HRESULT, - fn put_ScanAhead(&mut self, value: bool) -> HRESULT + RT_CLASS!{class AllJoynAboutData: IAllJoynAboutData} + RT_CLASS!{class AllJoynBusAttachment: IAllJoynBusAttachment [IAllJoynBusAttachmentFactory] [CLSID_AllJoynBusAttachment]} + RT_ACTIVATABLE!{IAllJoynBusAttachmentStatics [CLSID_AllJoynBusAttachment]} + DEFINE_CLSID!(CLSID_AllJoynBusAttachment = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,66,117,115,65,116,116,97,99,104,109,101,110,116,0]); + RT_CLASS!{class AllJoynBusAttachmentStateChangedEventArgs: IAllJoynBusAttachmentStateChangedEventArgs} + RT_CLASS!{class AllJoynCredentialsRequestedEventArgs: IAllJoynCredentialsRequestedEventArgs} + RT_CLASS!{class AllJoynCredentialsVerificationRequestedEventArgs: IAllJoynCredentialsVerificationRequestedEventArgs} + RT_CLASS!{class AllJoynAuthenticationCompleteEventArgs: IAllJoynAuthenticationCompleteEventArgs} + DEFINE_IID!(IID_IAllJoynBusAttachment2, 880069406, 9064, 17330, 180, 62, 106, 58, 193, 39, 141, 152); + RT_INTERFACE!{interface IAllJoynBusAttachment2(IAllJoynBusAttachment2Vtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusAttachment2] { + fn GetAboutDataAsync(&mut self, serviceInfo: *mut AllJoynServiceInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.globalization"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.globalization")] fn GetAboutDataWithLanguageAsync(&mut self, serviceInfo: *mut AllJoynServiceInfo, language: *mut super::super::globalization::Language, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_AcceptSessionJoinerRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AcceptSessionJoinerRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SessionJoined(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SessionJoined(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT }} - impl IImageScannerFeederConfiguration { - #[inline] pub unsafe fn get_can_auto_detect_page_size(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CanAutoDetectPageSize)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + impl IAllJoynBusAttachment2 { + #[inline] pub unsafe fn get_about_data_async(&mut self, serviceInfo: &AllJoynServiceInfo) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAboutDataAsync)(self, serviceInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_auto_detect_page_size(&mut self) -> Result { + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_about_data_with_language_async(&mut self, serviceInfo: &AllJoynServiceInfo, language: &super::super::globalization::Language) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAboutDataWithLanguageAsync)(self, serviceInfo as *const _ as *mut _, language as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_accept_session_joiner_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_AutoDetectPageSize)(self, &mut out); + let hr = ((*self.lpVtbl).add_AcceptSessionJoinerRequested)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_auto_detect_page_size(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_AutoDetectPageSize)(self, value); + #[inline] pub unsafe fn remove_accept_session_joiner_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AcceptSessionJoinerRequested)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_page_size(&mut self) -> Result { + #[inline] pub unsafe fn add_session_joined(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PageSize)(self, &mut out); + let hr = ((*self.lpVtbl).add_SessionJoined)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_page_size(&mut self, value: super::super::graphics::printing::PrintMediaSize) -> Result<()> { - let hr = ((*self.lpVtbl).put_PageSize)(self, value); + #[inline] pub unsafe fn remove_session_joined(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SessionJoined)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_page_orientation(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PageOrientation)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class AllJoynServiceInfo: IAllJoynServiceInfo [IAllJoynServiceInfoFactory] [CLSID_AllJoynServiceInfo]} + RT_ACTIVATABLE!{IAllJoynServiceInfoStatics [CLSID_AllJoynServiceInfo]} + DEFINE_CLSID!(CLSID_AllJoynServiceInfo = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,114,118,105,99,101,73,110,102,111,0]); + RT_CLASS!{class AllJoynAboutDataView: IAllJoynAboutDataView} + RT_ACTIVATABLE!{IAllJoynAboutDataViewStatics [CLSID_AllJoynAboutDataView]} + DEFINE_CLSID!(CLSID_AllJoynAboutDataView = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,65,98,111,117,116,68,97,116,97,86,105,101,119,0]); + RT_CLASS!{class AllJoynAcceptSessionJoinerEventArgs: IAllJoynAcceptSessionJoinerEventArgs [IAllJoynAcceptSessionJoinerEventArgsFactory] [CLSID_AllJoynAcceptSessionJoinerEventArgs]} + DEFINE_CLSID!(CLSID_AllJoynAcceptSessionJoinerEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,65,99,99,101,112,116,83,101,115,115,105,111,110,74,111,105,110,101,114,69,118,101,110,116,65,114,103,115,0]); + RT_CLASS!{class AllJoynSessionJoinedEventArgs: IAllJoynSessionJoinedEventArgs [IAllJoynSessionJoinedEventArgsFactory] [CLSID_AllJoynSessionJoinedEventArgs]} + DEFINE_CLSID!(CLSID_AllJoynSessionJoinedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,115,115,105,111,110,74,111,105,110,101,100,69,118,101,110,116,65,114,103,115,0]); + DEFINE_IID!(IID_IAllJoynBusAttachmentStatics, 2208124221, 4177, 16599, 135, 42, 141, 1, 65, 17, 91, 31); + RT_INTERFACE!{static interface IAllJoynBusAttachmentStatics(IAllJoynBusAttachmentStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusAttachmentStatics] { + fn GetDefault(&mut self, out: *mut *mut AllJoynBusAttachment) -> HRESULT, + fn GetWatcher(&mut self, requiredInterfaces: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::enumeration::DeviceWatcher) -> HRESULT + }} + impl IAllJoynBusAttachmentStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_page_orientation(&mut self, value: super::super::graphics::printing::PrintOrientation) -> Result<()> { - let hr = ((*self.lpVtbl).put_PageOrientation)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_watcher(&mut self, requiredInterfaces: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetWatcher)(self, requiredInterfaces as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_page_size_dimensions(&mut self) -> Result { + } + DEFINE_IID!(IID_IAllJoynBusAttachmentStateChangedEventArgs, 3626923508, 49194, 16876, 168, 213, 234, 177, 85, 137, 83, 170); + RT_INTERFACE!{interface IAllJoynBusAttachmentStateChangedEventArgs(IAllJoynBusAttachmentStateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusAttachmentStateChangedEventArgs] { + fn get_State(&mut self, out: *mut AllJoynBusAttachmentState) -> HRESULT, + fn get_Status(&mut self, out: *mut i32) -> HRESULT + }} + impl IAllJoynBusAttachmentStateChangedEventArgs { + #[inline] pub unsafe fn get_state(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_PageSizeDimensions)(self, &mut out); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn is_page_size_supported(&mut self, pageSize: super::super::graphics::printing::PrintMediaSize, pageOrientation: super::super::graphics::printing::PrintOrientation) -> Result { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsPageSizeSupported)(self, pageSize, pageOrientation, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_max_number_of_pages(&mut self) -> Result { + } + DEFINE_IID!(IID_IAllJoynCredentials, 2185646322, 41360, 16561, 171, 171, 52, 158, 194, 68, 223, 170); + RT_INTERFACE!{interface IAllJoynCredentials(IAllJoynCredentialsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynCredentials] { + fn get_AuthenticationMechanism(&mut self, out: *mut AllJoynAuthenticationMechanism) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_Certificate(&mut self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.security")] fn put_Certificate(&mut self, value: *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_PasswordCredential(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.security")] fn put_PasswordCredential(&mut self, value: *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + fn get_Timeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Timeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT + }} + impl IAllJoynCredentials { + #[inline] pub unsafe fn get_authentication_mechanism(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_MaxNumberOfPages)(self, &mut out); + let hr = ((*self.lpVtbl).get_AuthenticationMechanism)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_max_number_of_pages(&mut self, value: u32) -> Result<()> { - let hr = ((*self.lpVtbl).put_MaxNumberOfPages)(self, value); + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_certificate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Certificate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_certificate(&mut self, value: &super::super::security::cryptography::certificates::Certificate) -> Result<()> { + let hr = ((*self.lpVtbl).put_Certificate)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_can_scan_duplex(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CanScanDuplex)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_password_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PasswordCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_duplex(&mut self) -> Result { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_password_credential(&mut self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { + let hr = ((*self.lpVtbl).put_PasswordCredential)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_timeout(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Duplex)(self, &mut out); + let hr = ((*self.lpVtbl).get_Timeout)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn set_duplex(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_Duplex)(self, value); + #[inline] pub unsafe fn set_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Timeout)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_can_scan_ahead(&mut self) -> Result { + } + RT_CLASS!{class AllJoynCredentials: IAllJoynCredentials} + DEFINE_IID!(IID_IAllJoynCredentialsRequestedEventArgs, 1787290446, 45161, 19328, 158, 26, 65, 188, 131, 124, 101, 210); + RT_INTERFACE!{interface IAllJoynCredentialsRequestedEventArgs(IAllJoynCredentialsRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynCredentialsRequestedEventArgs] { + fn get_AttemptCount(&mut self, out: *mut u16) -> HRESULT, + fn get_Credentials(&mut self, out: *mut *mut AllJoynCredentials) -> HRESULT, + fn get_PeerUniqueName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RequestedUserName(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IAllJoynCredentialsRequestedEventArgs { + #[inline] pub unsafe fn get_attempt_count(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_CanScanAhead)(self, &mut out); + let hr = ((*self.lpVtbl).get_AttemptCount)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_scan_ahead(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ScanAhead)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_credentials(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Credentials)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_scan_ahead(&mut self, value: bool) -> Result<()> { - let hr = ((*self.lpVtbl).put_ScanAhead)(self, value); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_peer_unique_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PeerUniqueName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class ImageScannerFeederConfiguration: IImageScannerFormatConfiguration} - DEFINE_IID!(IID_IImageScannerScanResult, 3373671629, 36919, 20040, 132, 193, 172, 9, 117, 7, 107, 197); - RT_INTERFACE!{interface IImageScannerScanResult(IImageScannerScanResultVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerScanResult] { - #[cfg(feature="windows.storage")] fn get_ScannedFiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT - }} - impl IImageScannerScanResult { - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_scanned_files(&mut self) -> Result>> { + #[inline] pub unsafe fn get_requested_user_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_ScannedFiles)(self, &mut out); + let hr = ((*self.lpVtbl).get_RequestedUserName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_CLASS!{class ImageScannerScanResult: IImageScannerScanResult} - DEFINE_IID!(IID_IImageScannerPreviewResult, 146275982, 34961, 17437, 190, 156, 23, 111, 161, 9, 200, 187); - RT_INTERFACE!{interface IImageScannerPreviewResult(IImageScannerPreviewResultVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerPreviewResult] { - fn get_Succeeded(&mut self, out: *mut bool) -> HRESULT, - fn get_Format(&mut self, out: *mut ImageScannerFormat) -> HRESULT + DEFINE_IID!(IID_IAllJoynCredentialsVerificationRequestedEventArgs, 2148169234, 47109, 17583, 162, 225, 121, 42, 182, 85, 162, 208); + RT_INTERFACE!{interface IAllJoynCredentialsVerificationRequestedEventArgs(IAllJoynCredentialsVerificationRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynCredentialsVerificationRequestedEventArgs] { + fn get_AuthenticationMechanism(&mut self, out: *mut AllJoynAuthenticationMechanism) -> HRESULT, + fn get_PeerUniqueName(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_PeerCertificate(&mut self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, + #[cfg(not(feature="windows.networking"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.networking")] fn get_PeerCertificateErrorSeverity(&mut self, out: *mut super::super::networking::sockets::SocketSslErrorSeverity) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_PeerCertificateErrors(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_PeerIntermediateCertificates(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn Accept(&mut self) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT }} - impl IImageScannerPreviewResult { - #[inline] pub unsafe fn get_succeeded(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Succeeded)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_format(&mut self) -> Result { + impl IAllJoynCredentialsVerificationRequestedEventArgs { + #[inline] pub unsafe fn get_authentication_mechanism(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Format)(self, &mut out); + let hr = ((*self.lpVtbl).get_AuthenticationMechanism)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - } - RT_CLASS!{class ImageScannerPreviewResult: IImageScannerPreviewResult} - RT_ENUM! { enum ImageScannerScanSource: i32 { - Default (ImageScannerScanSource_Default) = 0, Flatbed (ImageScannerScanSource_Flatbed) = 1, Feeder (ImageScannerScanSource_Feeder) = 2, AutoConfigured (ImageScannerScanSource_AutoConfigured) = 3, - }} - DEFINE_IID!(IID_IImageScanner, 1403555704, 21144, 18592, 141, 163, 128, 135, 81, 150, 101, 224); - RT_INTERFACE!{interface IImageScanner(IImageScannerVtbl): IInspectable(IInspectableVtbl) [IID_IImageScanner] { - fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_DefaultScanSource(&mut self, out: *mut ImageScannerScanSource) -> HRESULT, - fn IsScanSourceSupported(&mut self, value: ImageScannerScanSource, out: *mut bool) -> HRESULT, - fn get_FlatbedConfiguration(&mut self, out: *mut *mut ImageScannerFlatbedConfiguration) -> HRESULT, - fn get_FeederConfiguration(&mut self, out: *mut *mut ImageScannerFeederConfiguration) -> HRESULT, - fn get_AutoConfiguration(&mut self, out: *mut *mut ImageScannerAutoConfiguration) -> HRESULT, - fn IsPreviewSupported(&mut self, scanSource: ImageScannerScanSource, out: *mut bool) -> HRESULT, - #[cfg(feature="windows.storage")] fn ScanPreviewToStreamAsync(&mut self, scanSource: ImageScannerScanSource, targetStream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows.storage")] fn ScanFilesToFolderAsync(&mut self, scanSource: ImageScannerScanSource, storageFolder: *mut super::super::storage::StorageFolder, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT - }} - impl IImageScanner { - #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + #[inline] pub unsafe fn get_peer_unique_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + let hr = ((*self.lpVtbl).get_PeerUniqueName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_default_scan_source(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_DefaultScanSource)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_peer_certificate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PeerCertificate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn is_scan_source_supported(&mut self, value: ImageScannerScanSource) -> Result { + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_peer_certificate_error_severity(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsScanSourceSupported)(self, value, &mut out); + let hr = ((*self.lpVtbl).get_PeerCertificateErrorSeverity)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_flatbed_configuration(&mut self) -> Result> { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_peer_certificate_errors(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FlatbedConfiguration)(self, &mut out); + let hr = ((*self.lpVtbl).get_PeerCertificateErrors)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_feeder_configuration(&mut self) -> Result> { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_peer_intermediate_certificates(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_FeederConfiguration)(self, &mut out); + let hr = ((*self.lpVtbl).get_PeerIntermediateCertificates)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_auto_configuration(&mut self) -> Result> { + #[inline] pub unsafe fn accept(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Accept)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AutoConfiguration)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn is_preview_supported(&mut self, scanSource: ImageScannerScanSource) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).IsPreviewSupported)(self, scanSource, &mut out); + } + DEFINE_IID!(IID_IAllJoynAuthenticationCompleteEventArgs, 2545184796, 5596, 19283, 182, 164, 125, 19, 67, 0, 215, 191); + RT_INTERFACE!{interface IAllJoynAuthenticationCompleteEventArgs(IAllJoynAuthenticationCompleteEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAuthenticationCompleteEventArgs] { + fn get_AuthenticationMechanism(&mut self, out: *mut AllJoynAuthenticationMechanism) -> HRESULT, + fn get_PeerUniqueName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Succeeded(&mut self, out: *mut bool) -> HRESULT + }} + impl IAllJoynAuthenticationCompleteEventArgs { + #[inline] pub unsafe fn get_authentication_mechanism(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AuthenticationMechanism)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn scan_preview_to_stream_async(&mut self, scanSource: ImageScannerScanSource, targetStream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + #[inline] pub unsafe fn get_peer_unique_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ScanPreviewToStreamAsync)(self, scanSource, targetStream as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_PeerUniqueName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[cfg(feature="windows.storage")] #[inline] pub unsafe fn scan_files_to_folder_async(&mut self, scanSource: ImageScannerScanSource, storageFolder: &super::super::storage::StorageFolder) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).ScanFilesToFolderAsync)(self, scanSource, storageFolder as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_succeeded(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Succeeded)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IImageScannerStatics, 3159877390, 55300, 17527, 159, 181, 185, 17, 181, 71, 56, 151); - RT_INTERFACE!{static interface IImageScannerStatics(IImageScannerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerStatics] { - fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + DEFINE_IID!(IID_IAllJoynBusAttachmentFactory, 1680798116, 44421, 19935, 144, 174, 96, 68, 82, 178, 34, 136); + RT_INTERFACE!{static interface IAllJoynBusAttachmentFactory(IAllJoynBusAttachmentFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusAttachmentFactory] { + fn Create(&mut self, connectionSpecification: HSTRING, out: *mut *mut AllJoynBusAttachment) -> HRESULT }} - impl IImageScannerStatics { - #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + impl IAllJoynBusAttachmentFactory { + #[inline] pub unsafe fn create(&mut self, connectionSpecification: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + let hr = ((*self.lpVtbl).Create)(self, connectionSpecification.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - } - RT_CLASS!{class ImageScanner: IImageScanner} - RT_ACTIVATABLE!{IImageScannerStatics [CLSID_ImageScanner]} - DEFINE_CLSID!(CLSID_ImageScanner = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,99,97,110,110,101,114,115,46,73,109,97,103,101,83,99,97,110,110,101,114,0]); -} // Windows.Devices.Scanners -} // Windows.Devices -pub mod foundation { // Windows.Foundation -use ::prelude::*; - DEFINE_IID!(IID_IClosable, 819308585, 32676, 16422, 131, 187, 215, 91, 174, 78, 169, 158); - RT_INTERFACE!{interface IClosable(IClosableVtbl): IInspectable(IInspectableVtbl) [IID_IClosable] { - fn Close(&mut self) -> HRESULT - }} - impl IClosable { - #[inline] pub unsafe fn close(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Close)(self); - if hr == S_OK { Ok(()) } else { err(hr) } - } } - RT_ENUM! { enum PropertyType: i32 { - Empty (PropertyType_Empty) = 0, UInt8 (PropertyType_UInt8) = 1, Int16 (PropertyType_Int16) = 2, UInt16 (PropertyType_UInt16) = 3, Int32 (PropertyType_Int32) = 4, UInt32 (PropertyType_UInt32) = 5, Int64 (PropertyType_Int64) = 6, UInt64 (PropertyType_UInt64) = 7, Single (PropertyType_Single) = 8, Double (PropertyType_Double) = 9, Char16 (PropertyType_Char16) = 10, Boolean (PropertyType_Boolean) = 11, String (PropertyType_String) = 12, Inspectable (PropertyType_Inspectable) = 13, DateTime (PropertyType_DateTime) = 14, TimeSpan (PropertyType_TimeSpan) = 15, Guid (PropertyType_Guid) = 16, Point (PropertyType_Point) = 17, Size (PropertyType_Size) = 18, Rect (PropertyType_Rect) = 19, OtherType (PropertyType_OtherType) = 20, UInt8Array (PropertyType_UInt8Array) = 1025, Int16Array (PropertyType_Int16Array) = 1026, UInt16Array (PropertyType_UInt16Array) = 1027, Int32Array (PropertyType_Int32Array) = 1028, UInt32Array (PropertyType_UInt32Array) = 1029, Int64Array (PropertyType_Int64Array) = 1030, UInt64Array (PropertyType_UInt64Array) = 1031, SingleArray (PropertyType_SingleArray) = 1032, DoubleArray (PropertyType_DoubleArray) = 1033, Char16Array (PropertyType_Char16Array) = 1034, BooleanArray (PropertyType_BooleanArray) = 1035, StringArray (PropertyType_StringArray) = 1036, InspectableArray (PropertyType_InspectableArray) = 1037, DateTimeArray (PropertyType_DateTimeArray) = 1038, TimeSpanArray (PropertyType_TimeSpanArray) = 1039, GuidArray (PropertyType_GuidArray) = 1040, PointArray (PropertyType_PointArray) = 1041, SizeArray (PropertyType_SizeArray) = 1042, RectArray (PropertyType_RectArray) = 1043, OtherTypeArray (PropertyType_OtherTypeArray) = 1044, - }} - RT_STRUCT! { struct Point { - X: f32, Y: f32, - }} - RT_STRUCT! { struct Size { - Width: f32, Height: f32, - }} - RT_STRUCT! { struct Rect { - X: f32, Y: f32, Width: f32, Height: f32, - }} - RT_STRUCT! { struct DateTime { - UniversalTime: i64, - }} - RT_STRUCT! { struct TimeSpan { - Duration: i64, - }} - DEFINE_IID!(IID_IPropertyValue, 1272349405, 30036, 16617, 154, 155, 130, 101, 78, 222, 126, 98); - RT_INTERFACE!{interface IPropertyValue(IPropertyValueVtbl): IInspectable(IInspectableVtbl) [IID_IPropertyValue] { - fn get_Type(&mut self, out: *mut PropertyType) -> HRESULT, - fn get_IsNumericScalar(&mut self, out: *mut bool) -> HRESULT, - fn GetUInt8(&mut self, out: *mut u8) -> HRESULT, - fn GetInt16(&mut self, out: *mut i16) -> HRESULT, - fn GetUInt16(&mut self, out: *mut u16) -> HRESULT, - fn GetInt32(&mut self, out: *mut i32) -> HRESULT, - fn GetUInt32(&mut self, out: *mut u32) -> HRESULT, - fn GetInt64(&mut self, out: *mut i64) -> HRESULT, - fn GetUInt64(&mut self, out: *mut u64) -> HRESULT, - fn GetSingle(&mut self, out: *mut f32) -> HRESULT, - fn GetDouble(&mut self, out: *mut f64) -> HRESULT, - fn GetChar16(&mut self, out: *mut Char) -> HRESULT, - fn GetBoolean(&mut self, out: *mut bool) -> HRESULT, - fn GetString(&mut self, out: *mut HSTRING) -> HRESULT, - fn GetGuid(&mut self, out: *mut Guid) -> HRESULT, - fn GetDateTime(&mut self, out: *mut DateTime) -> HRESULT, - fn GetTimeSpan(&mut self, out: *mut TimeSpan) -> HRESULT, - fn GetPoint(&mut self, out: *mut Point) -> HRESULT, - fn GetSize(&mut self, out: *mut Size) -> HRESULT, - fn GetRect(&mut self, out: *mut Rect) -> HRESULT, - fn GetUInt8Array(&mut self, valueSize: *mut u32, value: *mut *mut u8) -> HRESULT, - fn GetInt16Array(&mut self, valueSize: *mut u32, value: *mut *mut i16) -> HRESULT, - fn GetUInt16Array(&mut self, valueSize: *mut u32, value: *mut *mut u16) -> HRESULT, - fn GetInt32Array(&mut self, valueSize: *mut u32, value: *mut *mut i32) -> HRESULT, - fn GetUInt32Array(&mut self, valueSize: *mut u32, value: *mut *mut u32) -> HRESULT, - fn GetInt64Array(&mut self, valueSize: *mut u32, value: *mut *mut i64) -> HRESULT, - fn GetUInt64Array(&mut self, valueSize: *mut u32, value: *mut *mut u64) -> HRESULT, - fn GetSingleArray(&mut self, valueSize: *mut u32, value: *mut *mut f32) -> HRESULT, - fn GetDoubleArray(&mut self, valueSize: *mut u32, value: *mut *mut f64) -> HRESULT, - fn GetChar16Array(&mut self, valueSize: *mut u32, value: *mut *mut Char) -> HRESULT, - fn GetBooleanArray(&mut self, valueSize: *mut u32, value: *mut *mut bool) -> HRESULT, - fn GetStringArray(&mut self, valueSize: *mut u32, value: *mut *mut HSTRING) -> HRESULT, - fn GetInspectableArray(&mut self, valueSize: *mut u32, value: *mut *mut *mut IInspectable) -> HRESULT, - fn GetGuidArray(&mut self, valueSize: *mut u32, value: *mut *mut Guid) -> HRESULT, - fn GetDateTimeArray(&mut self, valueSize: *mut u32, value: *mut *mut DateTime) -> HRESULT, - fn GetTimeSpanArray(&mut self, valueSize: *mut u32, value: *mut *mut TimeSpan) -> HRESULT, - fn GetPointArray(&mut self, valueSize: *mut u32, value: *mut *mut Point) -> HRESULT, - fn GetSizeArray(&mut self, valueSize: *mut u32, value: *mut *mut Size) -> HRESULT, - fn GetRectArray(&mut self, valueSize: *mut u32, value: *mut *mut Rect) -> HRESULT + DEFINE_IID!(IID_IAllJoynSession, 3906018060, 49364, 16492, 136, 169, 169, 62, 250, 133, 212, 177); + RT_INTERFACE!{interface IAllJoynSession(IAllJoynSessionVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSession] { + fn get_Id(&mut self, out: *mut i32) -> HRESULT, + fn get_Status(&mut self, out: *mut i32) -> HRESULT, + fn RemoveMemberAsync(&mut self, uniqueName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_MemberAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MemberAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_MemberRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MemberRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Lost(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Lost(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT }} - impl IPropertyValue { - #[inline] pub unsafe fn get_type(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Type)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_numeric_scalar(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_IsNumericScalar)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint8(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetUInt8)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_int16(&mut self) -> Result { + impl IAllJoynSession { + #[inline] pub unsafe fn get_id(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetInt16)(self, &mut out); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_uint16(&mut self) -> Result { + #[inline] pub unsafe fn get_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetUInt16)(self, &mut out); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_int32(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetInt32)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_member_async(&mut self, uniqueName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RemoveMemberAsync)(self, uniqueName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_uint32(&mut self) -> Result { + #[inline] pub unsafe fn add_member_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetUInt32)(self, &mut out); + let hr = ((*self.lpVtbl).add_MemberAdded)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_int64(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetInt64)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_member_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MemberAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_uint64(&mut self) -> Result { + #[inline] pub unsafe fn add_member_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetUInt64)(self, &mut out); + let hr = ((*self.lpVtbl).add_MemberRemoved)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_single(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetSingle)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_member_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MemberRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_double(&mut self) -> Result { + #[inline] pub unsafe fn add_lost(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetDouble)(self, &mut out); + let hr = ((*self.lpVtbl).add_Lost)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_char16(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetChar16)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn remove_lost(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Lost)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_boolean(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetBoolean)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class AllJoynSession: IAllJoynSession} + RT_ACTIVATABLE!{IAllJoynSessionStatics [CLSID_AllJoynSession]} + DEFINE_CLSID!(CLSID_AllJoynSession = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,115,115,105,111,110,0]); + RT_CLASS!{class AllJoynSessionMemberAddedEventArgs: IAllJoynSessionMemberAddedEventArgs [IAllJoynSessionMemberAddedEventArgsFactory] [CLSID_AllJoynSessionMemberAddedEventArgs]} + DEFINE_CLSID!(CLSID_AllJoynSessionMemberAddedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,115,115,105,111,110,77,101,109,98,101,114,65,100,100,101,100,69,118,101,110,116,65,114,103,115,0]); + RT_CLASS!{class AllJoynSessionMemberRemovedEventArgs: IAllJoynSessionMemberRemovedEventArgs [IAllJoynSessionMemberRemovedEventArgsFactory] [CLSID_AllJoynSessionMemberRemovedEventArgs]} + DEFINE_CLSID!(CLSID_AllJoynSessionMemberRemovedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,115,115,105,111,110,77,101,109,98,101,114,82,101,109,111,118,101,100,69,118,101,110,116,65,114,103,115,0]); + RT_CLASS!{class AllJoynSessionLostEventArgs: IAllJoynSessionLostEventArgs [IAllJoynSessionLostEventArgsFactory] [CLSID_AllJoynSessionLostEventArgs]} + DEFINE_CLSID!(CLSID_AllJoynSessionLostEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,115,115,105,111,110,76,111,115,116,69,118,101,110,116,65,114,103,115,0]); + DEFINE_IID!(IID_IAllJoynSessionStatics, 2651182596, 41068, 18132, 180, 108, 11, 11, 84, 16, 91, 68); + RT_INTERFACE!{static interface IAllJoynSessionStatics(IAllJoynSessionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionStatics] { + fn GetFromServiceInfoAsync(&mut self, serviceInfo: *mut AllJoynServiceInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetFromServiceInfoAndBusAttachmentAsync(&mut self, serviceInfo: *mut AllJoynServiceInfo, busAttachment: *mut AllJoynBusAttachment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IAllJoynSessionStatics { + #[inline] pub unsafe fn get_from_service_info_async(&mut self, serviceInfo: &AllJoynServiceInfo) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFromServiceInfoAsync)(self, serviceInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_string(&mut self) -> Result { + #[inline] pub unsafe fn get_from_service_info_and_bus_attachment_async(&mut self, serviceInfo: &AllJoynServiceInfo, busAttachment: &AllJoynBusAttachment) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetString)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).GetFromServiceInfoAndBusAttachmentAsync)(self, serviceInfo as *const _ as *mut _, busAttachment as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_guid(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetGuid)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + DEFINE_IID!(IID_IAllJoynProducer, 2634565241, 18075, 18778, 167, 16, 172, 80, 241, 35, 6, 159); + RT_INTERFACE!{interface IAllJoynProducer(IAllJoynProducerVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynProducer] { + fn SetBusObject(&mut self, busObject: *mut AllJoynBusObject) -> HRESULT + }} + impl IAllJoynProducer { + #[inline] pub unsafe fn set_bus_object(&mut self, busObject: &AllJoynBusObject) -> Result<()> { + let hr = ((*self.lpVtbl).SetBusObject)(self, busObject as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_date_time(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetDateTime)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + } + RT_CLASS!{class AllJoynBusObject: IAllJoynBusObject [IAllJoynBusObjectFactory] [CLSID_AllJoynBusObject]} + DEFINE_CLSID!(CLSID_AllJoynBusObject = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,66,117,115,79,98,106,101,99,116,0]); + DEFINE_IID!(IID_IAllJoynBusObject, 3908928094, 63290, 18700, 136, 4, 4, 224, 38, 100, 48, 71); + RT_INTERFACE!{interface IAllJoynBusObject(IAllJoynBusObjectVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusObject] { + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn AddProducer(&mut self, producer: *mut IAllJoynProducer) -> HRESULT, + fn get_BusAttachment(&mut self, out: *mut *mut AllJoynBusAttachment) -> HRESULT, + fn get_Session(&mut self, out: *mut *mut AllJoynSession) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAllJoynBusObject { + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_time_span(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetTimeSpan)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_point(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetPoint)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn add_producer(&mut self, producer: &IAllJoynProducer) -> Result<()> { + let hr = ((*self.lpVtbl).AddProducer)(self, producer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_size(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetSize)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } + #[inline] pub unsafe fn get_bus_attachment(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BusAttachment)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_rect(&mut self) -> Result { + #[inline] pub unsafe fn get_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Session)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).GetRect)(self, &mut out); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_uint8_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetUInt8Array)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_int16_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetInt16Array)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint16_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetUInt16Array)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_int32_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetInt32Array)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint32_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetUInt32Array)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_int64_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetInt64Array)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint64_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetUInt64Array)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_single_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetSingleArray)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_double_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetDoubleArray)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_char16_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetChar16Array)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetBooleanArray)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_string_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetStringArray)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_inspectable_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetInspectableArray)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_guid_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetGuidArray)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_time_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetDateTimeArray)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_span_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetTimeSpanArray)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_point_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetPointArray)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_size_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetSizeArray)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rect_array(&mut self) -> Result> { - let mut valueSize = 0; let mut value = null_mut(); - let hr = ((*self.lpVtbl).GetRectArray)(self, &mut valueSize, &mut value); - if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + #[inline] pub unsafe fn remove_stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IPropertyValueStatics, 1654381512, 55602, 20468, 150, 185, 141, 150, 197, 193, 232, 88); - RT_INTERFACE!{static interface IPropertyValueStatics(IPropertyValueStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPropertyValueStatics] { - fn CreateEmpty(&mut self, out: *mut *mut IInspectable) -> HRESULT, - fn CreateUInt8(&mut self, value: u8, out: *mut *mut IInspectable) -> HRESULT, - fn CreateInt16(&mut self, value: i16, out: *mut *mut IInspectable) -> HRESULT, - fn CreateUInt16(&mut self, value: u16, out: *mut *mut IInspectable) -> HRESULT, - fn CreateInt32(&mut self, value: i32, out: *mut *mut IInspectable) -> HRESULT, - fn CreateUInt32(&mut self, value: u32, out: *mut *mut IInspectable) -> HRESULT, - fn CreateInt64(&mut self, value: i64, out: *mut *mut IInspectable) -> HRESULT, - fn CreateUInt64(&mut self, value: u64, out: *mut *mut IInspectable) -> HRESULT, - fn CreateSingle(&mut self, value: f32, out: *mut *mut IInspectable) -> HRESULT, - fn CreateDouble(&mut self, value: f64, out: *mut *mut IInspectable) -> HRESULT, - fn CreateChar16(&mut self, value: Char, out: *mut *mut IInspectable) -> HRESULT, - fn CreateBoolean(&mut self, value: bool, out: *mut *mut IInspectable) -> HRESULT, - fn CreateString(&mut self, value: HSTRING, out: *mut *mut IInspectable) -> HRESULT, - fn CreateInspectable(&mut self, value: *mut IInspectable, out: *mut *mut IInspectable) -> HRESULT, - fn CreateGuid(&mut self, value: Guid, out: *mut *mut IInspectable) -> HRESULT, - fn CreateDateTime(&mut self, value: DateTime, out: *mut *mut IInspectable) -> HRESULT, - fn CreateTimeSpan(&mut self, value: TimeSpan, out: *mut *mut IInspectable) -> HRESULT, - fn CreatePoint(&mut self, value: Point, out: *mut *mut IInspectable) -> HRESULT, - fn CreateSize(&mut self, value: Size, out: *mut *mut IInspectable) -> HRESULT, - fn CreateRect(&mut self, value: Rect, out: *mut *mut IInspectable) -> HRESULT, - fn CreateUInt8Array(&mut self, valueSize: u32, value: *mut u8, out: *mut *mut IInspectable) -> HRESULT, - fn CreateInt16Array(&mut self, valueSize: u32, value: *mut i16, out: *mut *mut IInspectable) -> HRESULT, - fn CreateUInt16Array(&mut self, valueSize: u32, value: *mut u16, out: *mut *mut IInspectable) -> HRESULT, - fn CreateInt32Array(&mut self, valueSize: u32, value: *mut i32, out: *mut *mut IInspectable) -> HRESULT, - fn CreateUInt32Array(&mut self, valueSize: u32, value: *mut u32, out: *mut *mut IInspectable) -> HRESULT, - fn CreateInt64Array(&mut self, valueSize: u32, value: *mut i64, out: *mut *mut IInspectable) -> HRESULT, - fn CreateUInt64Array(&mut self, valueSize: u32, value: *mut u64, out: *mut *mut IInspectable) -> HRESULT, - fn CreateSingleArray(&mut self, valueSize: u32, value: *mut f32, out: *mut *mut IInspectable) -> HRESULT, - fn CreateDoubleArray(&mut self, valueSize: u32, value: *mut f64, out: *mut *mut IInspectable) -> HRESULT, - fn CreateChar16Array(&mut self, valueSize: u32, value: *mut Char, out: *mut *mut IInspectable) -> HRESULT, - fn CreateBooleanArray(&mut self, valueSize: u32, value: *mut bool, out: *mut *mut IInspectable) -> HRESULT, - fn CreateStringArray(&mut self, valueSize: u32, value: *mut HSTRING, out: *mut *mut IInspectable) -> HRESULT, - fn CreateInspectableArray(&mut self, valueSize: u32, value: *mut *mut IInspectable, out: *mut *mut IInspectable) -> HRESULT, - fn CreateGuidArray(&mut self, valueSize: u32, value: *mut Guid, out: *mut *mut IInspectable) -> HRESULT, - fn CreateDateTimeArray(&mut self, valueSize: u32, value: *mut DateTime, out: *mut *mut IInspectable) -> HRESULT, - fn CreateTimeSpanArray(&mut self, valueSize: u32, value: *mut TimeSpan, out: *mut *mut IInspectable) -> HRESULT, - fn CreatePointArray(&mut self, valueSize: u32, value: *mut Point, out: *mut *mut IInspectable) -> HRESULT, - fn CreateSizeArray(&mut self, valueSize: u32, value: *mut Size, out: *mut *mut IInspectable) -> HRESULT, - fn CreateRectArray(&mut self, valueSize: u32, value: *mut Rect, out: *mut *mut IInspectable) -> HRESULT + RT_CLASS!{class AllJoynBusObjectStoppedEventArgs: IAllJoynBusObjectStoppedEventArgs [IAllJoynBusObjectStoppedEventArgsFactory] [CLSID_AllJoynBusObjectStoppedEventArgs]} + DEFINE_CLSID!(CLSID_AllJoynBusObjectStoppedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,66,117,115,79,98,106,101,99,116,83,116,111,112,112,101,100,69,118,101,110,116,65,114,103,115,0]); + DEFINE_IID!(IID_IAllJoynBusObjectFactory, 741318411, 36354, 20380, 172, 39, 234, 109, 173, 93, 59, 80); + RT_INTERFACE!{static interface IAllJoynBusObjectFactory(IAllJoynBusObjectFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusObjectFactory] { + fn Create(&mut self, objectPath: HSTRING, out: *mut *mut AllJoynBusObject) -> HRESULT, + fn CreateWithBusAttachment(&mut self, objectPath: HSTRING, busAttachment: *mut AllJoynBusAttachment, out: *mut *mut AllJoynBusObject) -> HRESULT }} - impl IPropertyValueStatics { - #[inline] pub unsafe fn create_empty(&mut self) -> Result> { + impl IAllJoynBusObjectFactory { + #[inline] pub unsafe fn create(&mut self, objectPath: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateEmpty)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, objectPath.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_uint8(&mut self, value: u8) -> Result> { + #[inline] pub unsafe fn create_with_bus_attachment(&mut self, objectPath: &HStringArg, busAttachment: &AllJoynBusAttachment) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateUInt8)(self, value, &mut out); + let hr = ((*self.lpVtbl).CreateWithBusAttachment)(self, objectPath.get(), busAttachment as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_int16(&mut self, value: i16) -> Result> { + } + DEFINE_IID!(IID_IAllJoynServiceInfo, 1287553545, 47422, 16770, 153, 155, 221, 208, 0, 249, 197, 117); + RT_INTERFACE!{interface IAllJoynServiceInfo(IAllJoynServiceInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynServiceInfo] { + fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ObjectPath(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SessionPort(&mut self, out: *mut u16) -> HRESULT + }} + impl IAllJoynServiceInfo { + #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateInt16)(self, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_uint16(&mut self, value: u16) -> Result> { + #[inline] pub unsafe fn get_object_path(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateUInt16)(self, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ObjectPath)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_int32(&mut self, value: i32) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateInt32)(self, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_session_port(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SessionPort)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn create_uint32(&mut self, value: u32) -> Result> { + } + DEFINE_IID!(IID_IAllJoynServiceInfoStatics, 1450727178, 24634, 18940, 183, 80, 14, 241, 54, 9, 33, 60); + RT_INTERFACE!{static interface IAllJoynServiceInfoStatics(IAllJoynServiceInfoStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynServiceInfoStatics] { + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IAllJoynServiceInfoStatics { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateUInt32)(self, value, &mut out); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_int64(&mut self, value: i64) -> Result> { + } + DEFINE_IID!(IID_IAllJoynServiceInfoFactory, 1971444413, 65027, 20299, 148, 164, 240, 47, 220, 189, 17, 184); + RT_INTERFACE!{static interface IAllJoynServiceInfoFactory(IAllJoynServiceInfoFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynServiceInfoFactory] { + fn Create(&mut self, uniqueName: HSTRING, objectPath: HSTRING, sessionPort: u16, out: *mut *mut AllJoynServiceInfo) -> HRESULT + }} + impl IAllJoynServiceInfoFactory { + #[inline] pub unsafe fn create(&mut self, uniqueName: &HStringArg, objectPath: &HStringArg, sessionPort: u16) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateInt64)(self, value, &mut out); + let hr = ((*self.lpVtbl).Create)(self, uniqueName.get(), objectPath.get(), sessionPort, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_uint64(&mut self, value: u64) -> Result> { + } + DEFINE_IID!(IID_IAllJoynAboutDataViewStatics, 1475196552, 3166, 16750, 136, 181, 57, 179, 45, 37, 196, 125); + RT_INTERFACE!{static interface IAllJoynAboutDataViewStatics(IAllJoynAboutDataViewStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAboutDataViewStatics] { + fn GetDataBySessionPortAsync(&mut self, uniqueName: HSTRING, busAttachment: *mut AllJoynBusAttachment, sessionPort: u16, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.globalization")] fn GetDataBySessionPortWithLanguageAsync(&mut self, uniqueName: HSTRING, busAttachment: *mut AllJoynBusAttachment, sessionPort: u16, language: *mut super::super::globalization::Language, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IAllJoynAboutDataViewStatics { + #[inline] pub unsafe fn get_data_by_session_port_async(&mut self, uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateUInt64)(self, value, &mut out); + let hr = ((*self.lpVtbl).GetDataBySessionPortAsync)(self, uniqueName.get(), busAttachment as *const _ as *mut _, sessionPort, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_single(&mut self, value: f32) -> Result> { + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_data_by_session_port_with_language_async(&mut self, uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16, language: &super::super::globalization::Language) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateSingle)(self, value, &mut out); + let hr = ((*self.lpVtbl).GetDataBySessionPortWithLanguageAsync)(self, uniqueName.get(), busAttachment as *const _ as *mut _, sessionPort, language as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_double(&mut self, value: f64) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateDouble)(self, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + DEFINE_IID!(IID_IAllJoynAboutDataView, 1747128607, 25106, 18740, 156, 72, 225, 156, 164, 152, 66, 136); + RT_INTERFACE!{interface IAllJoynAboutDataView(IAllJoynAboutDataViewVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAboutDataView] { + fn get_Status(&mut self, out: *mut i32) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_AJSoftwareVersion(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AppId(&mut self, out: *mut Guid) -> HRESULT, + fn get_DateOfManufacture(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + #[cfg(not(feature="windows.globalization"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.globalization")] fn get_DefaultLanguage(&mut self, out: *mut *mut super::super::globalization::Language) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HardwareVersion(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ModelNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SoftwareVersion(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.globalization"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.globalization")] fn get_SupportedLanguages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportUrl(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_AppName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DeviceName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Manufacturer(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAllJoynAboutDataView { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn create_char16(&mut self, value: Char) -> Result> { + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateChar16)(self, value, &mut out); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_boolean(&mut self, value: bool) -> Result> { + #[inline] pub unsafe fn get_ajsoftware_version(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateBoolean)(self, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AJSoftwareVersion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_string(&mut self, value: &HStringArg) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateString)(self, value.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_app_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AppId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn create_inspectable(&mut self, value: &IInspectable) -> Result> { + #[inline] pub unsafe fn get_date_of_manufacture(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateInspectable)(self, value as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_DateOfManufacture)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_guid(&mut self, value: Guid) -> Result> { + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_default_language(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateGuid)(self, value, &mut out); + let hr = ((*self.lpVtbl).get_DefaultLanguage)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_date_time(&mut self, value: DateTime) -> Result> { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateDateTime)(self, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_time_span(&mut self, value: TimeSpan) -> Result> { + #[inline] pub unsafe fn get_hardware_version(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateTimeSpan)(self, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_HardwareVersion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_point(&mut self, value: Point) -> Result> { + #[inline] pub unsafe fn get_model_number(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreatePoint)(self, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ModelNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_size(&mut self, value: Size) -> Result> { + #[inline] pub unsafe fn get_software_version(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateSize)(self, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_SoftwareVersion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_rect(&mut self, value: Rect) -> Result> { + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_supported_languages(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateRect)(self, value, &mut out); + let hr = ((*self.lpVtbl).get_SupportedLanguages)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_uint8_array(&mut self, value: &[u8]) -> Result> { + #[inline] pub unsafe fn get_support_url(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateUInt8Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_SupportUrl)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_int16_array(&mut self, value: &[i16]) -> Result> { + #[inline] pub unsafe fn get_app_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateInt16Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_AppName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_uint16_array(&mut self, value: &[u16]) -> Result> { + #[inline] pub unsafe fn get_description(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateUInt16Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_int32_array(&mut self, value: &[i32]) -> Result> { + #[inline] pub unsafe fn get_device_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateInt32Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DeviceName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_uint32_array(&mut self, value: &[u32]) -> Result> { + #[inline] pub unsafe fn get_manufacturer(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateUInt32Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_Manufacturer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_int64_array(&mut self, value: &[i64]) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateInt64Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + DEFINE_IID!(IID_IAllJoynAboutData, 3853106944, 8098, 18489, 147, 239, 249, 223, 64, 72, 144, 247); + RT_INTERFACE!{interface IAllJoynAboutData(IAllJoynAboutDataVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAboutData] { + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsEnabled(&mut self, value: bool) -> HRESULT, + fn get_DefaultAppName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DefaultAppName(&mut self, value: HSTRING) -> HRESULT, + fn get_AppNames(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_DateOfManufacture(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_DateOfManufacture(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_DefaultDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DefaultDescription(&mut self, value: HSTRING) -> HRESULT, + fn get_Descriptions(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_DefaultManufacturer(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DefaultManufacturer(&mut self, value: HSTRING) -> HRESULT, + fn get_Manufacturers(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_ModelNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ModelNumber(&mut self, value: HSTRING) -> HRESULT, + fn get_SoftwareVersion(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SoftwareVersion(&mut self, value: HSTRING) -> HRESULT, + fn get_SupportUrl(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_SupportUrl(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_AppId(&mut self, out: *mut Guid) -> HRESULT, + fn put_AppId(&mut self, value: Guid) -> HRESULT + }} + impl IAllJoynAboutData { + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn create_uint64_array(&mut self, value: &[u64]) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateUInt64Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn create_single_array(&mut self, value: &[f32]) -> Result> { + #[inline] pub unsafe fn get_default_app_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateSingleArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DefaultAppName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_double_array(&mut self, value: &[f64]) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateDoubleArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_default_app_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultAppName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn create_char16_array(&mut self, value: &[Char]) -> Result> { + #[inline] pub unsafe fn get_app_names(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateChar16Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_AppNames)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_boolean_array(&mut self, value: &[bool]) -> Result> { + #[inline] pub unsafe fn get_date_of_manufacture(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateBooleanArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_DateOfManufacture)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_string_array(&mut self, value: &[&HStringArg]) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateStringArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_date_of_manufacture(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_DateOfManufacture)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn create_inspectable_array(&mut self, value: &[&IInspectable]) -> Result> { + #[inline] pub unsafe fn get_default_description(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateInspectableArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DefaultDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_guid_array(&mut self, value: &[Guid]) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateGuidArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_default_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultDescription)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn create_date_time_array(&mut self, value: &[DateTime]) -> Result> { + #[inline] pub unsafe fn get_descriptions(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateDateTimeArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Descriptions)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_time_span_array(&mut self, value: &[TimeSpan]) -> Result> { + #[inline] pub unsafe fn get_default_manufacturer(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateTimeSpanArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DefaultManufacturer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_point_array(&mut self, value: &[Point]) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreatePointArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn set_default_manufacturer(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultManufacturer)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn create_size_array(&mut self, value: &[Size]) -> Result> { + #[inline] pub unsafe fn get_manufacturers(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateSizeArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_Manufacturers)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_rect_array(&mut self, value: &[Rect]) -> Result> { + #[inline] pub unsafe fn get_model_number(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateRectArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ModelNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_ACTIVATABLE!{IPropertyValueStatics [CLSID_PropertyValue]} - DEFINE_CLSID!(CLSID_PropertyValue = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,80,114,111,112,101,114,116,121,86,97,108,117,101,0]); - DEFINE_IID!(IID_IStringable, 2520162132, 36534, 18672, 171, 206, 193, 178, 17, 230, 39, 195); - RT_INTERFACE!{interface IStringable(IStringableVtbl): IInspectable(IInspectableVtbl) [IID_IStringable] { - fn ToString(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IStringable { - #[inline] pub unsafe fn to_string(&mut self) -> Result { + #[inline] pub unsafe fn set_model_number(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ModelNumber)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_software_version(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).ToString)(self, &mut out); + let hr = ((*self.lpVtbl).get_SoftwareVersion)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_AsyncActionCompletedHandler, 2767019137, 30409, 16573, 139, 230, 177, 217, 15, 178, 10, 231); - RT_DELEGATE!{delegate AsyncActionCompletedHandler(AsyncActionCompletedHandlerVtbl, AsyncActionCompletedHandlerImpl) [IID_AsyncActionCompletedHandler] { - fn Invoke(&mut self, asyncInfo: *mut IAsyncAction, asyncStatus: AsyncStatus) -> HRESULT - }} - impl AsyncActionCompletedHandler { - #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncAction, asyncStatus: AsyncStatus) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, asyncStatus); + #[inline] pub unsafe fn set_software_version(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SoftwareVersion)(self, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_IDeferral, 3592853298, 15231, 18087, 180, 11, 79, 220, 162, 162, 198, 147); - RT_INTERFACE!{interface IDeferral(IDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IDeferral] { - fn Complete(&mut self) -> HRESULT - }} - impl IDeferral { - #[inline] pub unsafe fn complete(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Complete)(self); + #[inline] pub unsafe fn get_support_url(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportUrl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_support_url(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_SupportUrl)(self, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } } - } - DEFINE_IID!(IID_DeferralCompletedHandler, 3979518834, 62408, 20394, 156, 251, 71, 1, 72, 218, 56, 136); - RT_DELEGATE!{delegate DeferralCompletedHandler(DeferralCompletedHandlerVtbl, DeferralCompletedHandlerImpl) [IID_DeferralCompletedHandler] { - fn Invoke(&mut self) -> HRESULT - }} - impl DeferralCompletedHandler { - #[inline] pub unsafe fn invoke(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self); + #[inline] pub unsafe fn get_app_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AppId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_app_id(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppId)(self, value); if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IDeferralFactory, 1705110725, 16309, 18482, 140, 169, 240, 97, 178, 129, 209, 58); - RT_INTERFACE!{static interface IDeferralFactory(IDeferralFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDeferralFactory] { - fn Create(&mut self, handler: *mut DeferralCompletedHandler, out: *mut *mut Deferral) -> HRESULT + RT_ENUM! { enum AllJoynTrafficType: i32 { + Unknown (AllJoynTrafficType_Unknown) = 0, Messages (AllJoynTrafficType_Messages) = 1, RawUnreliable (AllJoynTrafficType_RawUnreliable) = 2, RawReliable (AllJoynTrafficType_RawReliable) = 4, }} - impl IDeferralFactory { - #[inline] pub unsafe fn create(&mut self, handler: &DeferralCompletedHandler) -> Result> { + DEFINE_IID!(IID_IAllJoynAcceptSessionJoinerEventArgs, 1325093733, 16010, 16983, 143, 16, 83, 156, 224, 213, 108, 15); + RT_INTERFACE!{interface IAllJoynAcceptSessionJoinerEventArgs(IAllJoynAcceptSessionJoinerEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAcceptSessionJoinerEventArgs] { + fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SessionPort(&mut self, out: *mut u16) -> HRESULT, + fn get_TrafficType(&mut self, out: *mut AllJoynTrafficType) -> HRESULT, + fn get_SamePhysicalNode(&mut self, out: *mut bool) -> HRESULT, + fn get_SameNetwork(&mut self, out: *mut bool) -> HRESULT, + fn Accept(&mut self) -> HRESULT + }} + impl IAllJoynAcceptSessionJoinerEventArgs { + #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class Deferral: IDeferral [IDeferralFactory] [CLSID_Deferral]} - DEFINE_CLSID!(CLSID_Deferral = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,68,101,102,101,114,114,97,108,0]); - RT_ENUM! { enum AsyncStatus: i32 { - Canceled (AsyncStatus_Canceled) = 2, Completed (AsyncStatus_Completed) = 1, Error (AsyncStatus_Error) = 3, Started (AsyncStatus_Started) = 0, - }} - RT_STRUCT! { struct EventRegistrationToken { - Value: i64, - }} - RT_STRUCT! { struct HResult { - Value: i32, - }} - DEFINE_IID!(IID_IAsyncInfo, 54, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70); - RT_INTERFACE!{interface IAsyncInfo(IAsyncInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncInfo] { - fn get_Id(&mut self, out: *mut u32) -> HRESULT, - fn get_Status(&mut self, out: *mut AsyncStatus) -> HRESULT, - fn get_ErrorCode(&mut self, out: *mut HResult) -> HRESULT, - fn Cancel(&mut self) -> HRESULT, - fn Close(&mut self) -> HRESULT - }} - impl IAsyncInfo { - #[inline] pub unsafe fn get_id(&mut self) -> Result { + #[inline] pub unsafe fn get_session_port(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + let hr = ((*self.lpVtbl).get_SessionPort)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_status(&mut self) -> Result { + #[inline] pub unsafe fn get_traffic_type(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + let hr = ((*self.lpVtbl).get_TrafficType)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_error_code(&mut self) -> Result { + #[inline] pub unsafe fn get_same_physical_node(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); + let hr = ((*self.lpVtbl).get_SamePhysicalNode)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn cancel(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Cancel)(self); - if hr == S_OK { Ok(()) } else { err(hr) } + #[inline] pub unsafe fn get_same_network(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SameNetwork)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn close(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).Close)(self); + #[inline] pub unsafe fn accept(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Accept)(self); if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IAsyncAction, 1516535814, 33850, 19881, 134, 91, 157, 38, 229, 223, 173, 123); - RT_INTERFACE!{interface IAsyncAction(IAsyncActionVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncAction] { - fn put_Completed(&mut self, handler: *mut AsyncActionCompletedHandler) -> HRESULT, - fn get_Completed(&mut self, out: *mut *mut AsyncActionCompletedHandler) -> HRESULT, - fn GetResults(&mut self) -> HRESULT + DEFINE_IID!(IID_IAllJoynAcceptSessionJoiner, 1302861778, 52509, 16419, 167, 196, 22, 222, 248, 156, 40, 223); + RT_INTERFACE!{interface IAllJoynAcceptSessionJoiner(IAllJoynAcceptSessionJoinerVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAcceptSessionJoiner] { + fn Accept(&mut self) -> HRESULT }} - impl IAsyncAction { - #[inline] pub unsafe fn set_completed(&mut self, handler: &AsyncActionCompletedHandler) -> Result<()> { - let hr = ((*self.lpVtbl).put_Completed)(self, handler as *const _ as *mut _); + impl IAllJoynAcceptSessionJoiner { + #[inline] pub unsafe fn accept(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Accept)(self); if hr == S_OK { Ok(()) } else { err(hr) } } - #[inline] pub unsafe fn get_completed(&mut self) -> Result> { + } + DEFINE_IID!(IID_IAllJoynAcceptSessionJoinerEventArgsFactory, 3024313280, 24901, 17054, 132, 219, 213, 191, 231, 114, 177, 79); + RT_INTERFACE!{static interface IAllJoynAcceptSessionJoinerEventArgsFactory(IAllJoynAcceptSessionJoinerEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAcceptSessionJoinerEventArgsFactory] { + fn Create(&mut self, uniqueName: HSTRING, sessionPort: u16, trafficType: AllJoynTrafficType, proximity: u8, acceptSessionJoiner: *mut IAllJoynAcceptSessionJoiner, out: *mut *mut AllJoynAcceptSessionJoinerEventArgs) -> HRESULT + }} + impl IAllJoynAcceptSessionJoinerEventArgsFactory { + #[inline] pub unsafe fn create(&mut self, uniqueName: &HStringArg, sessionPort: u16, trafficType: AllJoynTrafficType, proximity: u8, acceptSessionJoiner: &IAllJoynAcceptSessionJoiner) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Completed)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, uniqueName.get(), sessionPort, trafficType, proximity, acceptSessionJoiner as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_results(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).GetResults)(self); - if hr == S_OK { Ok(()) } else { err(hr) } - } } - DEFINE_IID!(IID_AsyncOperationWithProgressCompletedHandler, 3898471453, 27303, 18147, 168, 226, 240, 9, 216, 64, 198, 39); - RT_DELEGATE!{delegate AsyncOperationWithProgressCompletedHandler(AsyncOperationWithProgressCompletedHandlerVtbl, AsyncOperationWithProgressCompletedHandlerImpl) [IID_AsyncOperationWithProgressCompletedHandler] { - fn Invoke(&mut self, asyncInfo: *mut IAsyncOperationWithProgress, asyncStatus: AsyncStatus) -> HRESULT + DEFINE_IID!(IID_IAllJoynSessionMemberAddedEventArgs, 1235384714, 3537, 18113, 156, 214, 39, 25, 14, 80, 58, 94); + RT_INTERFACE!{interface IAllJoynSessionMemberAddedEventArgs(IAllJoynSessionMemberAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionMemberAddedEventArgs] { + fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT }} - impl AsyncOperationWithProgressCompletedHandler { - #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncOperationWithProgress, asyncStatus: AsyncStatus) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, asyncStatus); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IAllJoynSessionMemberAddedEventArgs { + #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IAsyncOperationWithProgress, 3050321623, 58007, 18831, 186, 96, 2, 137, 231, 110, 35, 221); - RT_INTERFACE!{interface IAsyncOperationWithProgress(IAsyncOperationWithProgressVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncOperationWithProgress] { - fn put_Progress(&mut self, handler: *mut AsyncOperationProgressHandler) -> HRESULT, - fn get_Progress(&mut self, out: *mut *mut AsyncOperationProgressHandler) -> HRESULT, - fn put_Completed(&mut self, handler: *mut AsyncOperationWithProgressCompletedHandler) -> HRESULT, - fn get_Completed(&mut self, out: *mut *mut AsyncOperationWithProgressCompletedHandler) -> HRESULT, - fn GetResults(&mut self, out: *mut TResult::Abi) -> HRESULT + DEFINE_IID!(IID_IAllJoynSessionMemberAddedEventArgsFactory, 874373970, 7475, 16545, 161, 211, 229, 119, 112, 32, 225, 241); + RT_INTERFACE!{static interface IAllJoynSessionMemberAddedEventArgsFactory(IAllJoynSessionMemberAddedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionMemberAddedEventArgsFactory] { + fn Create(&mut self, uniqueName: HSTRING, out: *mut *mut AllJoynSessionMemberAddedEventArgs) -> HRESULT }} - impl IAsyncOperationWithProgress { - #[inline] pub unsafe fn set_progress(&mut self, handler: &AsyncOperationProgressHandler) -> Result<()> { - let hr = ((*self.lpVtbl).put_Progress)(self, handler as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&mut self) -> Result>> { + impl IAllJoynSessionMemberAddedEventArgsFactory { + #[inline] pub unsafe fn create(&mut self, uniqueName: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, uniqueName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_completed(&mut self, handler: &AsyncOperationWithProgressCompletedHandler) -> Result<()> { - let hr = ((*self.lpVtbl).put_Completed)(self, handler as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } + } + DEFINE_IID!(IID_IAllJoynSessionMemberRemovedEventArgs, 1083842975, 43594, 18579, 180, 48, 186, 161, 182, 60, 98, 25); + RT_INTERFACE!{interface IAllJoynSessionMemberRemovedEventArgs(IAllJoynSessionMemberRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionMemberRemovedEventArgs] { + fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAllJoynSessionMemberRemovedEventArgs { + #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_completed(&mut self) -> Result>> { + } + DEFINE_IID!(IID_IAllJoynSessionMemberRemovedEventArgsFactory, 3302184424, 17080, 19303, 183, 87, 208, 207, 202, 213, 146, 128); + RT_INTERFACE!{static interface IAllJoynSessionMemberRemovedEventArgsFactory(IAllJoynSessionMemberRemovedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionMemberRemovedEventArgsFactory] { + fn Create(&mut self, uniqueName: HSTRING, out: *mut *mut AllJoynSessionMemberRemovedEventArgs) -> HRESULT + }} + impl IAllJoynSessionMemberRemovedEventArgsFactory { + #[inline] pub unsafe fn create(&mut self, uniqueName: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Completed)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, uniqueName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_results(&mut self) -> Result { - let mut out = TResult::uninitialized(); - let hr = ((*self.lpVtbl).GetResults)(self, &mut out); - if hr == S_OK { Ok(TResult::wrap(out)) } else { err(hr) } - } } - DEFINE_IID!(IID_AsyncOperationCompletedHandler, 4242337836, 58840, 17528, 145, 90, 77, 144, 183, 75, 131, 165); - RT_DELEGATE!{delegate AsyncOperationCompletedHandler(AsyncOperationCompletedHandlerVtbl, AsyncOperationCompletedHandlerImpl) [IID_AsyncOperationCompletedHandler] { - fn Invoke(&mut self, asyncInfo: *mut IAsyncOperation, asyncStatus: AsyncStatus) -> HRESULT + RT_ENUM! { enum AllJoynSessionLostReason: i32 { + None (AllJoynSessionLostReason_None) = 0, ProducerLeftSession (AllJoynSessionLostReason_ProducerLeftSession) = 1, ProducerClosedAbruptly (AllJoynSessionLostReason_ProducerClosedAbruptly) = 2, RemovedByProducer (AllJoynSessionLostReason_RemovedByProducer) = 3, LinkTimeout (AllJoynSessionLostReason_LinkTimeout) = 4, Other (AllJoynSessionLostReason_Other) = 5, }} - impl AsyncOperationCompletedHandler { - #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncOperation, asyncStatus: AsyncStatus) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, asyncStatus); - if hr == S_OK { Ok(()) } else { err(hr) } + DEFINE_IID!(IID_IAllJoynSessionJoinedEventArgs, 2661243856, 46551, 18373, 141, 171, 176, 64, 204, 25, 40, 113); + RT_INTERFACE!{interface IAllJoynSessionJoinedEventArgs(IAllJoynSessionJoinedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionJoinedEventArgs] { + fn get_Session(&mut self, out: *mut *mut AllJoynSession) -> HRESULT + }} + impl IAllJoynSessionJoinedEventArgs { + #[inline] pub unsafe fn get_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Session)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IAsyncOperation, 2680336571, 58438, 17634, 170, 97, 156, 171, 143, 99, 106, 242); - RT_INTERFACE!{interface IAsyncOperation(IAsyncOperationVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncOperation] { - fn put_Completed(&mut self, handler: *mut AsyncOperationCompletedHandler) -> HRESULT, - fn get_Completed(&mut self, out: *mut *mut AsyncOperationCompletedHandler) -> HRESULT, - fn GetResults(&mut self, out: *mut TResult::Abi) -> HRESULT + DEFINE_IID!(IID_IAllJoynSessionJoinedEventArgsFactory, 1747244681, 54987, 19870, 160, 158, 53, 128, 104, 112, 177, 127); + RT_INTERFACE!{static interface IAllJoynSessionJoinedEventArgsFactory(IAllJoynSessionJoinedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionJoinedEventArgsFactory] { + fn Create(&mut self, session: *mut AllJoynSession, out: *mut *mut AllJoynSessionJoinedEventArgs) -> HRESULT }} - impl IAsyncOperation { - #[inline] pub unsafe fn set_completed(&mut self, handler: &AsyncOperationCompletedHandler) -> Result<()> { - let hr = ((*self.lpVtbl).put_Completed)(self, handler as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_completed(&mut self) -> Result>> { + impl IAllJoynSessionJoinedEventArgsFactory { + #[inline] pub unsafe fn create(&mut self, session: &AllJoynSession) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Completed)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, session as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_results(&mut self) -> Result { - let mut out = TResult::uninitialized(); - let hr = ((*self.lpVtbl).GetResults)(self, &mut out); - if hr == S_OK { Ok(TResult::wrap(out)) } else { err(hr) } - } } - DEFINE_IID!(IID_AsyncActionWithProgressCompletedHandler, 2617417617, 52356, 17661, 172, 38, 10, 108, 78, 85, 82, 129); - RT_DELEGATE!{delegate AsyncActionWithProgressCompletedHandler(AsyncActionWithProgressCompletedHandlerVtbl, AsyncActionWithProgressCompletedHandlerImpl) [IID_AsyncActionWithProgressCompletedHandler] { - fn Invoke(&mut self, asyncInfo: *mut IAsyncActionWithProgress, asyncStatus: AsyncStatus) -> HRESULT + DEFINE_IID!(IID_IAllJoynSessionLostEventArgs, 3882263690, 35768, 18772, 174, 103, 210, 250, 67, 209, 249, 107); + RT_INTERFACE!{interface IAllJoynSessionLostEventArgs(IAllJoynSessionLostEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionLostEventArgs] { + fn get_Reason(&mut self, out: *mut AllJoynSessionLostReason) -> HRESULT }} - impl AsyncActionWithProgressCompletedHandler { - #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncActionWithProgress, asyncStatus: AsyncStatus) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, asyncStatus); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IAllJoynSessionLostEventArgs { + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IAsyncActionWithProgress, 527282776, 59395, 18593, 149, 70, 235, 115, 83, 57, 136, 132); - RT_INTERFACE!{interface IAsyncActionWithProgress(IAsyncActionWithProgressVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncActionWithProgress] { - fn put_Progress(&mut self, handler: *mut AsyncActionProgressHandler) -> HRESULT, - fn get_Progress(&mut self, out: *mut *mut AsyncActionProgressHandler) -> HRESULT, - fn put_Completed(&mut self, handler: *mut AsyncActionWithProgressCompletedHandler) -> HRESULT, - fn get_Completed(&mut self, out: *mut *mut AsyncActionWithProgressCompletedHandler) -> HRESULT, - fn GetResults(&mut self) -> HRESULT + DEFINE_IID!(IID_IAllJoynSessionLostEventArgsFactory, 331087154, 54004, 18889, 152, 14, 40, 5, 225, 53, 134, 177); + RT_INTERFACE!{static interface IAllJoynSessionLostEventArgsFactory(IAllJoynSessionLostEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynSessionLostEventArgsFactory] { + fn Create(&mut self, reason: AllJoynSessionLostReason, out: *mut *mut AllJoynSessionLostEventArgs) -> HRESULT }} - impl IAsyncActionWithProgress { - #[inline] pub unsafe fn set_progress(&mut self, handler: &AsyncActionProgressHandler) -> Result<()> { - let hr = ((*self.lpVtbl).put_Progress)(self, handler as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&mut self) -> Result>> { + impl IAllJoynSessionLostEventArgsFactory { + #[inline] pub unsafe fn create(&mut self, reason: AllJoynSessionLostReason) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); + let hr = ((*self.lpVtbl).Create)(self, reason, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn set_completed(&mut self, handler: &AsyncActionWithProgressCompletedHandler) -> Result<()> { - let hr = ((*self.lpVtbl).put_Completed)(self, handler as *const _ as *mut _); - if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_completed(&mut self) -> Result>> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Completed)(self, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_results(&mut self) -> Result<()> { - let hr = ((*self.lpVtbl).GetResults)(self); - if hr == S_OK { Ok(()) } else { err(hr) } - } } - DEFINE_IID!(IID_AsyncOperationProgressHandler, 1432946946, 2731, 16922, 135, 120, 248, 206, 80, 38, 215, 88); - RT_DELEGATE!{delegate AsyncOperationProgressHandler(AsyncOperationProgressHandlerVtbl, AsyncOperationProgressHandlerImpl) [IID_AsyncOperationProgressHandler] { - fn Invoke(&mut self, asyncInfo: *mut IAsyncOperationWithProgress, progressInfo: TProgress::Abi) -> HRESULT + DEFINE_IID!(IID_IAllJoynProducerStoppedEventArgs, 1362138992, 18743, 18733, 128, 128, 35, 100, 57, 152, 124, 235); + RT_INTERFACE!{interface IAllJoynProducerStoppedEventArgs(IAllJoynProducerStoppedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynProducerStoppedEventArgs] { + fn get_Status(&mut self, out: *mut i32) -> HRESULT }} - impl AsyncOperationProgressHandler { - #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncOperationWithProgress, progressInfo: &TProgress::In) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, TProgress::unwrap(progressInfo)); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IAllJoynProducerStoppedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_AsyncActionProgressHandler, 1837385816, 3327, 17808, 174, 137, 149, 165, 165, 200, 180, 184); - RT_DELEGATE!{delegate AsyncActionProgressHandler(AsyncActionProgressHandlerVtbl, AsyncActionProgressHandlerImpl) [IID_AsyncActionProgressHandler] { - fn Invoke(&mut self, asyncInfo: *mut IAsyncActionWithProgress, progressInfo: TProgress::Abi) -> HRESULT + DEFINE_IID!(IID_IAllJoynProducerStoppedEventArgsFactory, 1448253793, 45593, 19822, 159, 120, 250, 63, 153, 250, 143, 229); + RT_INTERFACE!{static interface IAllJoynProducerStoppedEventArgsFactory(IAllJoynProducerStoppedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynProducerStoppedEventArgsFactory] { + fn Create(&mut self, status: i32, out: *mut *mut AllJoynProducerStoppedEventArgs) -> HRESULT }} - impl AsyncActionProgressHandler { - #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncActionWithProgress, progressInfo: &TProgress::In) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, TProgress::unwrap(progressInfo)); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IAllJoynProducerStoppedEventArgsFactory { + #[inline] pub unsafe fn create(&mut self, status: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, status, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IReference, 1640068870, 11621, 4576, 154, 232, 212, 133, 100, 1, 84, 114); - RT_INTERFACE!{interface IReference(IReferenceVtbl): IInspectable(IInspectableVtbl) [IID_IReference] { - fn get_Value(&mut self, out: *mut T::Abi) -> HRESULT + RT_CLASS!{class AllJoynProducerStoppedEventArgs: IAllJoynProducerStoppedEventArgs [IAllJoynProducerStoppedEventArgsFactory] [CLSID_AllJoynProducerStoppedEventArgs]} + DEFINE_CLSID!(CLSID_AllJoynProducerStoppedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,80,114,111,100,117,99,101,114,83,116,111,112,112,101,100,69,118,101,110,116,65,114,103,115,0]); + DEFINE_IID!(IID_IAllJoynBusObjectStoppedEventArgs, 3725598997, 61326, 19778, 185, 59, 162, 174, 116, 81, 151, 102); + RT_INTERFACE!{interface IAllJoynBusObjectStoppedEventArgs(IAllJoynBusObjectStoppedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusObjectStoppedEventArgs] { + fn get_Status(&mut self, out: *mut i32) -> HRESULT }} - impl IReference { - #[inline] pub unsafe fn get_value(&mut self) -> Result { - let mut out = T::uninitialized(); - let hr = ((*self.lpVtbl).get_Value)(self, &mut out); - if hr == S_OK { Ok(T::wrap(out)) } else { err(hr) } + impl IAllJoynBusObjectStoppedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_IReferenceArray, 1640068871, 11621, 4576, 154, 232, 212, 133, 100, 1, 84, 114); - RT_INTERFACE!{interface IReferenceArray(IReferenceArrayVtbl): IInspectable(IInspectableVtbl) [IID_IReferenceArray] { - fn get_Value(&mut self, outSize: *mut u32, out: *mut *mut T::Abi) -> HRESULT + DEFINE_IID!(IID_IAllJoynBusObjectStoppedEventArgsFactory, 1797455176, 53411, 16981, 149, 58, 71, 114, 180, 2, 128, 115); + RT_INTERFACE!{static interface IAllJoynBusObjectStoppedEventArgsFactory(IAllJoynBusObjectStoppedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusObjectStoppedEventArgsFactory] { + fn Create(&mut self, status: i32, out: *mut *mut AllJoynBusObjectStoppedEventArgs) -> HRESULT }} - impl IReferenceArray { - #[inline] pub unsafe fn get_value(&mut self) -> Result> { - let mut outSize = 0; let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Value)(self, &mut outSize, &mut out); - if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + impl IAllJoynBusObjectStoppedEventArgsFactory { + #[inline] pub unsafe fn create(&mut self, status: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, status, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_TypedEventHandler, 2648818996, 27361, 4576, 132, 225, 24, 169, 5, 188, 197, 63); - RT_DELEGATE!{delegate TypedEventHandler(TypedEventHandlerVtbl, TypedEventHandlerImpl) [IID_TypedEventHandler] { - fn Invoke(&mut self, sender: TSender::Abi, args: TResult::Abi) -> HRESULT + DEFINE_IID!(IID_IAllJoynWatcherStoppedEventArgs, 3388776507, 28701, 19112, 151, 221, 162, 187, 10, 143, 95, 163); + RT_INTERFACE!{interface IAllJoynWatcherStoppedEventArgs(IAllJoynWatcherStoppedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynWatcherStoppedEventArgs] { + fn get_Status(&mut self, out: *mut i32) -> HRESULT }} - impl TypedEventHandler { - #[inline] pub unsafe fn invoke(&mut self, sender: &TSender::In, args: &TResult::In) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, TSender::unwrap(sender), TResult::unwrap(args)); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IAllJoynWatcherStoppedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } } - DEFINE_IID!(IID_EventHandler, 2648818997, 27361, 4576, 132, 225, 24, 169, 5, 188, 197, 63); - RT_DELEGATE!{delegate EventHandler(EventHandlerVtbl, EventHandlerImpl) [IID_EventHandler] { - fn Invoke(&mut self, sender: *mut IInspectable, args: T::Abi) -> HRESULT + DEFINE_IID!(IID_IAllJoynWatcherStoppedEventArgsFactory, 2274338216, 11600, 18401, 144, 74, 32, 191, 13, 72, 199, 130); + RT_INTERFACE!{static interface IAllJoynWatcherStoppedEventArgsFactory(IAllJoynWatcherStoppedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynWatcherStoppedEventArgsFactory] { + fn Create(&mut self, status: i32, out: *mut *mut AllJoynWatcherStoppedEventArgs) -> HRESULT }} - impl EventHandler { - #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, args: &T::In) -> Result<()> { - let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, T::unwrap(args)); - if hr == S_OK { Ok(()) } else { err(hr) } + impl IAllJoynWatcherStoppedEventArgsFactory { + #[inline] pub unsafe fn create(&mut self, status: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, status, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - RT_STRUCT! { struct FoundationContract { - - }} - DEFINE_IID!(IID_IUriRuntimeClass, 2654363223, 18610, 16736, 149, 111, 199, 56, 81, 32, 187, 252); - RT_INTERFACE!{interface IUriRuntimeClass(IUriRuntimeClassVtbl): IInspectable(IInspectableVtbl) [IID_IUriRuntimeClass] { - fn get_AbsoluteUri(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_DisplayUri(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Domain(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Extension(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Fragment(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Host(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Password(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Path(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Query(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_QueryParsed(&mut self, out: *mut *mut WwwFormUrlDecoder) -> HRESULT, - fn get_RawUri(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_SchemeName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_UserName(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Port(&mut self, out: *mut i32) -> HRESULT, - fn get_Suspicious(&mut self, out: *mut bool) -> HRESULT, - fn Equals(&mut self, pUri: *mut Uri, out: *mut bool) -> HRESULT, - fn CombineUri(&mut self, relativeUri: HSTRING, out: *mut *mut Uri) -> HRESULT + RT_CLASS!{class AllJoynWatcherStoppedEventArgs: IAllJoynWatcherStoppedEventArgs [IAllJoynWatcherStoppedEventArgsFactory] [CLSID_AllJoynWatcherStoppedEventArgs]} + DEFINE_CLSID!(CLSID_AllJoynWatcherStoppedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,87,97,116,99,104,101,114,83,116,111,112,112,101,100,69,118,101,110,116,65,114,103,115,0]); + DEFINE_IID!(IID_IAllJoynServiceInfoRemovedEventArgs, 811051359, 7487, 16883, 137, 105, 227, 39, 146, 98, 115, 150); + RT_INTERFACE!{interface IAllJoynServiceInfoRemovedEventArgs(IAllJoynServiceInfoRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynServiceInfoRemovedEventArgs] { + fn get_UniqueName(&mut self, out: *mut HSTRING) -> HRESULT }} - impl IUriRuntimeClass { - #[inline] pub unsafe fn get_absolute_uri(&mut self) -> Result { + impl IAllJoynServiceInfoRemovedEventArgs { + #[inline] pub unsafe fn get_unique_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AbsoluteUri)(self, &mut out); + let hr = ((*self.lpVtbl).get_UniqueName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_display_uri(&mut self) -> Result { + } + DEFINE_IID!(IID_IAllJoynServiceInfoRemovedEventArgsFactory, 230655527, 39679, 18773, 146, 39, 105, 83, 186, 244, 21, 105); + RT_INTERFACE!{static interface IAllJoynServiceInfoRemovedEventArgsFactory(IAllJoynServiceInfoRemovedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynServiceInfoRemovedEventArgsFactory] { + fn Create(&mut self, uniqueName: HSTRING, out: *mut *mut AllJoynServiceInfoRemovedEventArgs) -> HRESULT + }} + impl IAllJoynServiceInfoRemovedEventArgsFactory { + #[inline] pub unsafe fn create(&mut self, uniqueName: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DisplayUri)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).Create)(self, uniqueName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_domain(&mut self) -> Result { + } + RT_CLASS!{class AllJoynServiceInfoRemovedEventArgs: IAllJoynServiceInfoRemovedEventArgs [IAllJoynServiceInfoRemovedEventArgsFactory] [CLSID_AllJoynServiceInfoRemovedEventArgs]} + DEFINE_CLSID!(CLSID_AllJoynServiceInfoRemovedEventArgs = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,83,101,114,118,105,99,101,73,110,102,111,82,101,109,111,118,101,100,69,118,101,110,116,65,114,103,115,0]); + DEFINE_IID!(IID_IAllJoynMessageInfo, 4281008423, 11282, 18521, 170, 58, 199, 68, 97, 238, 129, 76); + RT_INTERFACE!{interface IAllJoynMessageInfo(IAllJoynMessageInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynMessageInfo] { + fn get_SenderUniqueName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAllJoynMessageInfo { + #[inline] pub unsafe fn get_sender_unique_name(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Domain)(self, &mut out); + let hr = ((*self.lpVtbl).get_SenderUniqueName)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_extension(&mut self) -> Result { + } + DEFINE_IID!(IID_IAllJoynMessageInfoFactory, 879119402, 33417, 17364, 180, 168, 63, 77, 227, 89, 240, 67); + RT_INTERFACE!{static interface IAllJoynMessageInfoFactory(IAllJoynMessageInfoFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynMessageInfoFactory] { + fn Create(&mut self, senderUniqueName: HSTRING, out: *mut *mut AllJoynMessageInfo) -> HRESULT + }} + impl IAllJoynMessageInfoFactory { + #[inline] pub unsafe fn create(&mut self, senderUniqueName: &HStringArg) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Extension)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).Create)(self, senderUniqueName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_fragment(&mut self) -> Result { + } + RT_CLASS!{class AllJoynMessageInfo: IAllJoynMessageInfo [IAllJoynMessageInfoFactory] [CLSID_AllJoynMessageInfo]} + DEFINE_CLSID!(CLSID_AllJoynMessageInfo = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,65,108,108,74,111,121,110,46,65,108,108,74,111,121,110,77,101,115,115,97,103,101,73,110,102,111,0]); +} // Windows.Devices.AllJoyn +pub mod background { // Windows.Devices.Background +use ::prelude::*; + DEFINE_IID!(IID_IDeviceUseDetails, 2102808897, 21886, 16724, 185, 148, 228, 247, 161, 31, 179, 35); + RT_INTERFACE!{interface IDeviceUseDetails(IDeviceUseDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceUseDetails] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Arguments(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IDeviceUseDetails { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Fragment)(self, &mut out); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_host(&mut self) -> Result { + #[inline] pub unsafe fn get_arguments(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Host)(self, &mut out); + let hr = ((*self.lpVtbl).get_Arguments)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_password(&mut self) -> Result { + } + RT_CLASS!{class DeviceUseDetails: IDeviceUseDetails} + DEFINE_IID!(IID_IDeviceServicingDetails, 1252781609, 9028, 19140, 133, 39, 74, 142, 246, 144, 86, 69); + RT_INTERFACE!{interface IDeviceServicingDetails(IDeviceServicingDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceServicingDetails] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Arguments(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ExpectedDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IDeviceServicingDetails { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Password)(self, &mut out); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_path(&mut self) -> Result { + #[inline] pub unsafe fn get_arguments(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Path)(self, &mut out); + let hr = ((*self.lpVtbl).get_Arguments)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_query(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Query)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + #[inline] pub unsafe fn get_expected_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExpectedDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn get_query_parsed(&mut self) -> Result> { + } + RT_CLASS!{class DeviceServicingDetails: IDeviceServicingDetails} +} // Windows.Devices.Background +pub mod bluetooth { // Windows.Devices.Bluetooth +use ::prelude::*; + RT_ENUM! { enum BluetoothCacheMode: i32 { + Cached (BluetoothCacheMode_Cached) = 0, Uncached (BluetoothCacheMode_Uncached) = 1, + }} + RT_ENUM! { enum BluetoothMajorClass: i32 { + Miscellaneous (BluetoothMajorClass_Miscellaneous) = 0, Computer (BluetoothMajorClass_Computer) = 1, Phone (BluetoothMajorClass_Phone) = 2, NetworkAccessPoint (BluetoothMajorClass_NetworkAccessPoint) = 3, AudioVideo (BluetoothMajorClass_AudioVideo) = 4, Peripheral (BluetoothMajorClass_Peripheral) = 5, Imaging (BluetoothMajorClass_Imaging) = 6, Wearable (BluetoothMajorClass_Wearable) = 7, Toy (BluetoothMajorClass_Toy) = 8, Health (BluetoothMajorClass_Health) = 9, + }} + RT_ENUM! { enum BluetoothMinorClass: i32 { + Uncategorized (BluetoothMinorClass_Uncategorized) = 0, ComputerDesktop (BluetoothMinorClass_ComputerDesktop) = 1, ComputerServer (BluetoothMinorClass_ComputerServer) = 2, ComputerLaptop (BluetoothMinorClass_ComputerLaptop) = 3, ComputerHandheld (BluetoothMinorClass_ComputerHandheld) = 4, ComputerPalmSize (BluetoothMinorClass_ComputerPalmSize) = 5, ComputerWearable (BluetoothMinorClass_ComputerWearable) = 6, ComputerTablet (BluetoothMinorClass_ComputerTablet) = 7, PhoneCellular (BluetoothMinorClass_PhoneCellular) = 1, PhoneCordless (BluetoothMinorClass_PhoneCordless) = 2, PhoneSmartPhone (BluetoothMinorClass_PhoneSmartPhone) = 3, PhoneWired (BluetoothMinorClass_PhoneWired) = 4, PhoneIsdn (BluetoothMinorClass_PhoneIsdn) = 5, NetworkFullyAvailable (BluetoothMinorClass_NetworkFullyAvailable) = 0, NetworkUsed01To17Percent (BluetoothMinorClass_NetworkUsed01To17Percent) = 8, NetworkUsed17To33Percent (BluetoothMinorClass_NetworkUsed17To33Percent) = 16, NetworkUsed33To50Percent (BluetoothMinorClass_NetworkUsed33To50Percent) = 24, NetworkUsed50To67Percent (BluetoothMinorClass_NetworkUsed50To67Percent) = 32, NetworkUsed67To83Percent (BluetoothMinorClass_NetworkUsed67To83Percent) = 40, NetworkUsed83To99Percent (BluetoothMinorClass_NetworkUsed83To99Percent) = 48, NetworkNoServiceAvailable (BluetoothMinorClass_NetworkNoServiceAvailable) = 56, AudioVideoWearableHeadset (BluetoothMinorClass_AudioVideoWearableHeadset) = 1, AudioVideoHandsFree (BluetoothMinorClass_AudioVideoHandsFree) = 2, AudioVideoMicrophone (BluetoothMinorClass_AudioVideoMicrophone) = 4, AudioVideoLoudspeaker (BluetoothMinorClass_AudioVideoLoudspeaker) = 5, AudioVideoHeadphones (BluetoothMinorClass_AudioVideoHeadphones) = 6, AudioVideoPortableAudio (BluetoothMinorClass_AudioVideoPortableAudio) = 7, AudioVideoCarAudio (BluetoothMinorClass_AudioVideoCarAudio) = 8, AudioVideoSetTopBox (BluetoothMinorClass_AudioVideoSetTopBox) = 9, AudioVideoHifiAudioDevice (BluetoothMinorClass_AudioVideoHifiAudioDevice) = 10, AudioVideoVcr (BluetoothMinorClass_AudioVideoVcr) = 11, AudioVideoVideoCamera (BluetoothMinorClass_AudioVideoVideoCamera) = 12, AudioVideoCamcorder (BluetoothMinorClass_AudioVideoCamcorder) = 13, AudioVideoVideoMonitor (BluetoothMinorClass_AudioVideoVideoMonitor) = 14, AudioVideoVideoDisplayAndLoudspeaker (BluetoothMinorClass_AudioVideoVideoDisplayAndLoudspeaker) = 15, AudioVideoVideoConferencing (BluetoothMinorClass_AudioVideoVideoConferencing) = 16, AudioVideoGamingOrToy (BluetoothMinorClass_AudioVideoGamingOrToy) = 18, PeripheralJoystick (BluetoothMinorClass_PeripheralJoystick) = 1, PeripheralGamepad (BluetoothMinorClass_PeripheralGamepad) = 2, PeripheralRemoteControl (BluetoothMinorClass_PeripheralRemoteControl) = 3, PeripheralSensing (BluetoothMinorClass_PeripheralSensing) = 4, PeripheralDigitizerTablet (BluetoothMinorClass_PeripheralDigitizerTablet) = 5, PeripheralCardReader (BluetoothMinorClass_PeripheralCardReader) = 6, PeripheralDigitalPen (BluetoothMinorClass_PeripheralDigitalPen) = 7, PeripheralHandheldScanner (BluetoothMinorClass_PeripheralHandheldScanner) = 8, PeripheralHandheldGesture (BluetoothMinorClass_PeripheralHandheldGesture) = 9, WearableWristwatch (BluetoothMinorClass_WearableWristwatch) = 1, WearablePager (BluetoothMinorClass_WearablePager) = 2, WearableJacket (BluetoothMinorClass_WearableJacket) = 3, WearableHelmet (BluetoothMinorClass_WearableHelmet) = 4, WearableGlasses (BluetoothMinorClass_WearableGlasses) = 5, ToyRobot (BluetoothMinorClass_ToyRobot) = 1, ToyVehicle (BluetoothMinorClass_ToyVehicle) = 2, ToyDoll (BluetoothMinorClass_ToyDoll) = 3, ToyController (BluetoothMinorClass_ToyController) = 4, ToyGame (BluetoothMinorClass_ToyGame) = 5, HealthBloodPressureMonitor (BluetoothMinorClass_HealthBloodPressureMonitor) = 1, HealthThermometer (BluetoothMinorClass_HealthThermometer) = 2, HealthWeighingScale (BluetoothMinorClass_HealthWeighingScale) = 3, HealthGlucoseMeter (BluetoothMinorClass_HealthGlucoseMeter) = 4, HealthPulseOximeter (BluetoothMinorClass_HealthPulseOximeter) = 5, HealthHeartRateMonitor (BluetoothMinorClass_HealthHeartRateMonitor) = 6, HealthHealthDataDisplay (BluetoothMinorClass_HealthHealthDataDisplay) = 7, HealthStepCounter (BluetoothMinorClass_HealthStepCounter) = 8, HealthBodyCompositionAnalyzer (BluetoothMinorClass_HealthBodyCompositionAnalyzer) = 9, HealthPeakFlowMonitor (BluetoothMinorClass_HealthPeakFlowMonitor) = 10, HealthMedicationMonitor (BluetoothMinorClass_HealthMedicationMonitor) = 11, HealthKneeProsthesis (BluetoothMinorClass_HealthKneeProsthesis) = 12, HealthAnkleProsthesis (BluetoothMinorClass_HealthAnkleProsthesis) = 13, HealthGenericHealthManager (BluetoothMinorClass_HealthGenericHealthManager) = 14, HealthPersonalMobilityDevice (BluetoothMinorClass_HealthPersonalMobilityDevice) = 15, + }} + RT_ENUM! { enum BluetoothServiceCapabilities: u32 { + None (BluetoothServiceCapabilities_None) = 0, LimitedDiscoverableMode (BluetoothServiceCapabilities_LimitedDiscoverableMode) = 1, PositioningService (BluetoothServiceCapabilities_PositioningService) = 8, NetworkingService (BluetoothServiceCapabilities_NetworkingService) = 16, RenderingService (BluetoothServiceCapabilities_RenderingService) = 32, CapturingService (BluetoothServiceCapabilities_CapturingService) = 64, ObjectTransferService (BluetoothServiceCapabilities_ObjectTransferService) = 128, AudioService (BluetoothServiceCapabilities_AudioService) = 256, TelephoneService (BluetoothServiceCapabilities_TelephoneService) = 512, InformationService (BluetoothServiceCapabilities_InformationService) = 1024, + }} + RT_ENUM! { enum BluetoothConnectionStatus: i32 { + Disconnected (BluetoothConnectionStatus_Disconnected) = 0, Connected (BluetoothConnectionStatus_Connected) = 1, + }} + RT_ENUM! { enum BluetoothError: i32 { + Success (BluetoothError_Success) = 0, RadioNotAvailable (BluetoothError_RadioNotAvailable) = 1, ResourceInUse (BluetoothError_ResourceInUse) = 2, DeviceNotConnected (BluetoothError_DeviceNotConnected) = 3, OtherError (BluetoothError_OtherError) = 4, DisabledByPolicy (BluetoothError_DisabledByPolicy) = 5, NotSupported (BluetoothError_NotSupported) = 6, DisabledByUser (BluetoothError_DisabledByUser) = 7, ConsentRequired (BluetoothError_ConsentRequired) = 8, + }} + RT_ENUM! { enum BluetoothAddressType: i32 { + Public (BluetoothAddressType_Public) = 0, Random (BluetoothAddressType_Random) = 1, + }} + DEFINE_IID!(IID_IBluetoothDeviceStatics, 160554833, 22491, 18213, 187, 215, 132, 246, 67, 39, 236, 44); + RT_INTERFACE!{static interface IBluetoothDeviceStatics(IBluetoothDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDeviceStatics] { + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.networking"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.networking")] fn FromHostNameAsync(&mut self, hostName: *mut super::super::networking::HostName, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromBluetoothAddressAsync(&mut self, address: u64, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IBluetoothDeviceStatics { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_QueryParsed)(self, &mut out); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_raw_uri(&mut self) -> Result { + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn from_host_name_async(&mut self, hostName: &super::super::networking::HostName) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_RawUri)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).FromHostNameAsync)(self, hostName as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_scheme_name(&mut self) -> Result { + #[inline] pub unsafe fn from_bluetooth_address_async(&mut self, address: u64) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_SchemeName)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).FromBluetoothAddressAsync)(self, address, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_user_name(&mut self) -> Result { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_UserName)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_port(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Port)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_suspicious(&mut self) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Suspicious)(self, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn equals(&mut self, pUri: &Uri) -> Result { - let mut out = zeroed(); - let hr = ((*self.lpVtbl).Equals)(self, pUri as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn combine_uri(&mut self, relativeUri: &HStringArg) -> Result> { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).CombineUri)(self, relativeUri.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } } - RT_CLASS!{class WwwFormUrlDecoder: IWwwFormUrlDecoderRuntimeClass [IWwwFormUrlDecoderRuntimeClassFactory] [CLSID_WwwFormUrlDecoder]} - DEFINE_CLSID!(CLSID_WwwFormUrlDecoder = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,87,119,119,70,111,114,109,85,114,108,68,101,99,111,100,101,114,0]); - RT_CLASS!{class Uri: IUriRuntimeClass [IUriRuntimeClassFactory] [CLSID_Uri]} - RT_ACTIVATABLE!{IUriEscapeStatics [CLSID_Uri]} - DEFINE_CLSID!(CLSID_Uri = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,85,114,105,0]); - DEFINE_IID!(IID_IUriRuntimeClassWithAbsoluteCanonicalUri, 1972213345, 8732, 18447, 163, 57, 80, 101, 102, 115, 244, 111); - RT_INTERFACE!{interface IUriRuntimeClassWithAbsoluteCanonicalUri(IUriRuntimeClassWithAbsoluteCanonicalUriVtbl): IInspectable(IInspectableVtbl) [IID_IUriRuntimeClassWithAbsoluteCanonicalUri] { - fn get_AbsoluteCanonicalUri(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_DisplayIri(&mut self, out: *mut HSTRING) -> HRESULT + RT_CLASS!{class BluetoothDevice: IBluetoothDevice} + RT_ACTIVATABLE!{IBluetoothDeviceStatics [CLSID_BluetoothDevice]} + RT_ACTIVATABLE!{IBluetoothDeviceStatics2 [CLSID_BluetoothDevice]} + DEFINE_CLSID!(CLSID_BluetoothDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_IBluetoothDeviceStatics2, 3265170991, 19988, 17527, 170, 27, 184, 180, 126, 91, 126, 206); + RT_INTERFACE!{static interface IBluetoothDeviceStatics2(IBluetoothDeviceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDeviceStatics2] { + fn GetDeviceSelectorFromPairingState(&mut self, pairingState: bool, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromConnectionStatus(&mut self, connectionStatus: BluetoothConnectionStatus, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromDeviceName(&mut self, deviceName: HSTRING, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromBluetoothAddress(&mut self, bluetoothAddress: u64, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromClassOfDevice(&mut self, classOfDevice: *mut BluetoothClassOfDevice, out: *mut HSTRING) -> HRESULT }} - impl IUriRuntimeClassWithAbsoluteCanonicalUri { - #[inline] pub unsafe fn get_absolute_canonical_uri(&mut self) -> Result { + impl IBluetoothDeviceStatics2 { + #[inline] pub unsafe fn get_device_selector_from_pairing_state(&mut self, pairingState: bool) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_AbsoluteCanonicalUri)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromPairingState)(self, pairingState, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_display_iri(&mut self) -> Result { + #[inline] pub unsafe fn get_device_selector_from_connection_status(&mut self, connectionStatus: BluetoothConnectionStatus) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_DisplayIri)(self, &mut out); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromConnectionStatus)(self, connectionStatus, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IUriEscapeStatics, 3251909306, 51236, 17490, 167, 253, 81, 43, 195, 187, 233, 161); - RT_INTERFACE!{static interface IUriEscapeStatics(IUriEscapeStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUriEscapeStatics] { - fn UnescapeComponent(&mut self, toUnescape: HSTRING, out: *mut HSTRING) -> HRESULT, - fn EscapeComponent(&mut self, toEscape: HSTRING, out: *mut HSTRING) -> HRESULT - }} - impl IUriEscapeStatics { - #[inline] pub unsafe fn unescape_component(&mut self, toUnescape: &HStringArg) -> Result { + #[inline] pub unsafe fn get_device_selector_from_device_name(&mut self, deviceName: &HStringArg) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).UnescapeComponent)(self, toUnescape.get(), &mut out); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromDeviceName)(self, deviceName.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn escape_component(&mut self, toEscape: &HStringArg) -> Result { + #[inline] pub unsafe fn get_device_selector_from_bluetooth_address(&mut self, bluetoothAddress: u64) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).EscapeComponent)(self, toEscape.get(), &mut out); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromBluetoothAddress)(self, bluetoothAddress, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_class_of_device(&mut self, classOfDevice: &BluetoothClassOfDevice) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromClassOfDevice)(self, classOfDevice as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IUriRuntimeClassFactory, 1151957359, 29246, 20447, 162, 24, 3, 62, 117, 176, 192, 132); - RT_INTERFACE!{static interface IUriRuntimeClassFactory(IUriRuntimeClassFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IUriRuntimeClassFactory] { - fn CreateUri(&mut self, uri: HSTRING, out: *mut *mut Uri) -> HRESULT, - fn CreateWithRelativeUri(&mut self, baseUri: HSTRING, relativeUri: HSTRING, out: *mut *mut Uri) -> HRESULT + RT_CLASS!{class BluetoothClassOfDevice: IBluetoothClassOfDevice} + RT_ACTIVATABLE!{IBluetoothClassOfDeviceStatics [CLSID_BluetoothClassOfDevice]} + DEFINE_CLSID!(CLSID_BluetoothClassOfDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,67,108,97,115,115,79,102,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_IBluetoothDevice, 590721366, 37074, 18948, 174, 245, 14, 32, 185, 230, 183, 7); + RT_INTERFACE!{interface IBluetoothDevice(IBluetoothDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDevice] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.networking"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.networking")] fn get_HostName(&mut self, out: *mut *mut super::super::networking::HostName) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ClassOfDevice(&mut self, out: *mut *mut BluetoothClassOfDevice) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_SdpRecords(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_RfcommServices(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ConnectionStatus(&mut self, out: *mut BluetoothConnectionStatus) -> HRESULT, + fn get_BluetoothAddress(&mut self, out: *mut u64) -> HRESULT, + fn add_NameChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NameChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SdpRecordsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SdpRecordsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ConnectionStatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT }} - impl IUriRuntimeClassFactory { - #[inline] pub unsafe fn create_uri(&mut self, uri: &HStringArg) -> Result> { + impl IBluetoothDevice { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateUri)(self, uri.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn create_with_relative_uri(&mut self, baseUri: &HStringArg, relativeUri: &HStringArg) -> Result> { + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_host_name(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWithRelativeUri)(self, baseUri.get(), relativeUri.get(), &mut out); + let hr = ((*self.lpVtbl).get_HostName)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IWwwFormUrlDecoderEntry, 308180017, 63096, 20110, 182, 112, 32, 169, 176, 108, 81, 45); - RT_INTERFACE!{interface IWwwFormUrlDecoderEntry(IWwwFormUrlDecoderEntryVtbl): IInspectable(IInspectableVtbl) [IID_IWwwFormUrlDecoderEntry] { - fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, - fn get_Value(&mut self, out: *mut HSTRING) -> HRESULT - }} - impl IWwwFormUrlDecoderEntry { #[inline] pub unsafe fn get_name(&mut self) -> Result { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } } - #[inline] pub unsafe fn get_value(&mut self) -> Result { - let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Value)(self, &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - } - DEFINE_IID!(IID_IWwwFormUrlDecoderRuntimeClass, 3562669137, 61989, 17730, 146, 150, 14, 29, 245, 210, 84, 223); - RT_INTERFACE!{interface IWwwFormUrlDecoderRuntimeClass(IWwwFormUrlDecoderRuntimeClassVtbl): IInspectable(IInspectableVtbl) [IID_IWwwFormUrlDecoderRuntimeClass] { - fn GetFirstValueByName(&mut self, name: HSTRING, out: *mut HSTRING) -> HRESULT - }} - impl IWwwFormUrlDecoderRuntimeClass { - #[inline] pub unsafe fn get_first_value_by_name(&mut self, name: &HStringArg) -> Result { + #[inline] pub unsafe fn get_class_of_device(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetFirstValueByName)(self, name.get(), &mut out); - if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + let hr = ((*self.lpVtbl).get_ClassOfDevice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IWwwFormUrlDecoderRuntimeClassFactory, 1535929149, 9390, 16821, 161, 191, 240, 195, 213, 68, 132, 91); - RT_INTERFACE!{static interface IWwwFormUrlDecoderRuntimeClassFactory(IWwwFormUrlDecoderRuntimeClassFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWwwFormUrlDecoderRuntimeClassFactory] { - fn CreateWwwFormUrlDecoder(&mut self, query: HSTRING, out: *mut *mut WwwFormUrlDecoder) -> HRESULT - }} - impl IWwwFormUrlDecoderRuntimeClassFactory { - #[inline] pub unsafe fn create_www_form_url_decoder(&mut self, query: &HStringArg) -> Result> { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_sdp_records(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateWwwFormUrlDecoder)(self, query.get(), &mut out); + let hr = ((*self.lpVtbl).get_SdpRecords)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class WwwFormUrlDecoderEntry: IWwwFormUrlDecoderEntry} - DEFINE_IID!(IID_IGetActivationFactory, 1323011810, 38621, 18855, 148, 247, 70, 7, 221, 171, 142, 60); - RT_INTERFACE!{interface IGetActivationFactory(IGetActivationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGetActivationFactory] { - fn GetActivationFactory(&mut self, activatableClassId: HSTRING, out: *mut *mut IInspectable) -> HRESULT - }} - impl IGetActivationFactory { - #[inline] pub unsafe fn get_activation_factory(&mut self, activatableClassId: &HStringArg) -> Result> { + #[inline] pub unsafe fn get_rfcomm_services(&mut self) -> Result>> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetActivationFactory)(self, activatableClassId.get(), &mut out); + let hr = ((*self.lpVtbl).get_RfcommServices)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - DEFINE_IID!(IID_IMemoryBufferReference, 4223982889, 9307, 4580, 175, 152, 104, 148, 35, 38, 12, 248); - RT_INTERFACE!{interface IMemoryBufferReference(IMemoryBufferReferenceVtbl): IInspectable(IInspectableVtbl) [IID_IMemoryBufferReference] { - fn get_Capacity(&mut self, out: *mut u32) -> HRESULT, - fn add_Closed(&mut self, handler: *mut TypedEventHandler, out: *mut EventRegistrationToken) -> HRESULT, - fn remove_Closed(&mut self, cookie: EventRegistrationToken) -> HRESULT - }} - impl IMemoryBufferReference { - #[inline] pub unsafe fn get_capacity(&mut self) -> Result { + #[inline] pub unsafe fn get_connection_status(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).get_Capacity)(self, &mut out); + let hr = ((*self.lpVtbl).get_ConnectionStatus)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn add_closed(&mut self, handler: &TypedEventHandler) -> Result { + #[inline] pub unsafe fn get_bluetooth_address(&mut self) -> Result { let mut out = zeroed(); - let hr = ((*self.lpVtbl).add_Closed)(self, handler as *const _ as *mut _, &mut out); + let hr = ((*self.lpVtbl).get_BluetoothAddress)(self, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } } - #[inline] pub unsafe fn remove_closed(&mut self, cookie: EventRegistrationToken) -> Result<()> { - let hr = ((*self.lpVtbl).remove_Closed)(self, cookie); + #[inline] pub unsafe fn add_name_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NameChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_name_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NameChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_sdp_records_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SdpRecordsChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_sdp_records_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SdpRecordsChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_connection_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ConnectionStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_connection_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ConnectionStatusChanged)(self, token); if hr == S_OK { Ok(()) } else { err(hr) } } } - DEFINE_IID!(IID_IMemoryBuffer, 4223982890, 9307, 4580, 175, 152, 104, 148, 35, 38, 12, 248); - RT_INTERFACE!{interface IMemoryBuffer(IMemoryBufferVtbl): IInspectable(IInspectableVtbl) [IID_IMemoryBuffer] { - fn CreateReference(&mut self, out: *mut *mut IMemoryBufferReference) -> HRESULT + DEFINE_IID!(IID_IBluetoothDevice2, 20183380, 45398, 19920, 177, 245, 193, 27, 195, 26, 81, 99); + RT_INTERFACE!{interface IBluetoothDevice2(IBluetoothDevice2Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDevice2] { + fn get_DeviceInformation(&mut self, out: *mut *mut super::enumeration::DeviceInformation) -> HRESULT }} - impl IMemoryBuffer { - #[inline] pub unsafe fn create_reference(&mut self) -> Result> { + impl IBluetoothDevice2 { + #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).CreateReference)(self, &mut out); + let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } } - DEFINE_IID!(IID_IMemoryBufferFactory, 4223982891, 9307, 4580, 175, 152, 104, 148, 35, 38, 12, 248); - RT_INTERFACE!{static interface IMemoryBufferFactory(IMemoryBufferFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMemoryBufferFactory] { - fn Create(&mut self, capacity: u32, out: *mut *mut MemoryBuffer) -> HRESULT + DEFINE_IID!(IID_IBluetoothDevice3, 1476392843, 25882, 17492, 185, 15, 235, 33, 239, 11, 13, 113); + RT_INTERFACE!{interface IBluetoothDevice3(IBluetoothDevice3Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDevice3] { + fn get_DeviceAccessInformation(&mut self, out: *mut *mut super::enumeration::DeviceAccessInformation) -> HRESULT, + fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetRfcommServicesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetRfcommServicesWithCacheModeAsync(&mut self, cacheMode: BluetoothCacheMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetRfcommServicesForIdAsync(&mut self, serviceId: *mut rfcomm::RfcommServiceId, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetRfcommServicesForIdWithCacheModeAsync(&mut self, serviceId: *mut rfcomm::RfcommServiceId, cacheMode: BluetoothCacheMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT }} - impl IMemoryBufferFactory { - #[inline] pub unsafe fn create(&mut self, capacity: u32) -> Result> { + impl IBluetoothDevice3 { + #[inline] pub unsafe fn get_device_access_information(&mut self) -> Result> { let mut out = null_mut(); - let hr = ((*self.lpVtbl).Create)(self, capacity, &mut out); + let hr = ((*self.lpVtbl).get_DeviceAccessInformation)(self, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } } - } - RT_CLASS!{class MemoryBuffer: IMemoryBuffer [IMemoryBufferFactory] [CLSID_MemoryBuffer]} - DEFINE_CLSID!(CLSID_MemoryBuffer = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,77,101,109,111,114,121,66,117,102,102,101,114,0]); - RT_STRUCT! { struct UniversalApiContract { - - }} - RT_PINTERFACE!{ for AsyncActionProgressHandler => [0x44825c7c,0x0da9,0x5691,0xb2,0xb4,0x91,0x4f,0x23,0x1e,0xec,0xed] as IID_AsyncActionProgressHandler_1_System_Double } - #[cfg(feature="windows.web")] RT_PINTERFACE!{ for AsyncActionProgressHandler => [0xc1610085,0x94d0,0x5706,0x9a,0xc6,0x10,0x17,0x9d,0x7d,0xeb,0x92] as IID_AsyncActionProgressHandler_1_Windows_Web_Syndication_TransferProgress } - RT_PINTERFACE!{ for AsyncActionProgressHandler => [0x55e233ca,0xf243,0x5ae2,0x85,0x3b,0xf9,0xcc,0x7c,0x0a,0xe0,0xcf] as IID_AsyncActionProgressHandler_1_System_UInt64 } - RT_PINTERFACE!{ for AsyncActionWithProgressCompletedHandler => [0x94d64ac6,0x4491,0x53ef,0x8b,0xe8,0x36,0x48,0x1f,0x3f,0xf1,0xe8] as IID_AsyncActionWithProgressCompletedHandler_1_System_Double } - #[cfg(feature="windows.web")] RT_PINTERFACE!{ for AsyncActionWithProgressCompletedHandler => [0xf1c031c8,0x90bf,0x5cae,0xad,0xf6,0x15,0x5b,0x4a,0xed,0xfb,0x60] as IID_AsyncActionWithProgressCompletedHandler_1_Windows_Web_Syndication_TransferProgress } - RT_PINTERFACE!{ for AsyncActionWithProgressCompletedHandler => [0xe6ff857b,0xf160,0x571a,0xa9,0x34,0x2c,0x61,0xf9,0x8c,0x86,0x2d] as IID_AsyncActionWithProgressCompletedHandler_1_System_UInt64 } - RT_PINTERFACE!{ for AsyncOperationCompletedHandler => [0xc1d3d1a2,0xae17,0x5a5f,0xb5,0xa2,0xbd,0xcc,0x88,0x44,0x88,0x9a] as IID_AsyncOperationCompletedHandler_1_System_Boolean } - RT_PINTERFACE!{ for AsyncOperationCompletedHandler> => [0x7344f356,0x8399,0x5756,0xa2,0xf8,0xab,0xd5,0x0c,0x41,0x46,0xff] as IID_AsyncOperationCompletedHandler_1_Windows_Foundation_Collections_IMap_2_System_String_System_Object } - RT_PINTERFACE!{ for AsyncOperationCompletedHandler> => [0x89981889,0x1207,0x5ae6,0x9b,0x28,0xcc,0xc5,0x8f,0x3a,0xac,0x6e] as IID_AsyncOperationCompletedHandler_1_Windows_Foundation_Collections_IMapView_2_System_String_System_Object } - #[cfg(feature="windows.perception")] RT_PINTERFACE!{ for AsyncOperationCompletedHandler> => [0x3a950aa3,0x9c65,0x586e,0xaf,0x75,0x1a,0xcf,0x07,0x19,0x0e,0x90] as IID_AsyncOperationCompletedHandler_1_Windows_Foundation_Collections_IMapView_2_System_String_Windows_Perception_Spatial_SpatialAnchor } - #[cfg(feature="windows.storage")] RT_PINTERFACE!{ for AsyncOperationCompletedHandler> => [0xd4cb6b80,0x821a,0x5a7b,0x89,0x8d,0xd5,0x89,0x17,0xb3,0x1a,0x36] as IID_AsyncOperationCompletedHandler_1_Windows_Foundation_Collections_IMapView_2_System_String_Windows_Storage_Streams_RandomAccessStreamReference } + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rfcomm_services_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRfcommServicesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rfcomm_services_with_cache_mode_async(&mut self, cacheMode: BluetoothCacheMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRfcommServicesWithCacheModeAsync)(self, cacheMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rfcomm_services_for_id_async(&mut self, serviceId: &rfcomm::RfcommServiceId) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRfcommServicesForIdAsync)(self, serviceId as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rfcomm_services_for_id_with_cache_mode_async(&mut self, serviceId: &rfcomm::RfcommServiceId, cacheMode: BluetoothCacheMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRfcommServicesForIdWithCacheModeAsync)(self, serviceId as *const _ as *mut _, cacheMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothLEAppearanceCategoriesStatics, 1833784574, 1130, 16773, 170, 182, 130, 76, 240, 97, 8, 97); + RT_INTERFACE!{static interface IBluetoothLEAppearanceCategoriesStatics(IBluetoothLEAppearanceCategoriesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAppearanceCategoriesStatics] { + fn get_Uncategorized(&mut self, out: *mut u16) -> HRESULT, + fn get_Phone(&mut self, out: *mut u16) -> HRESULT, + fn get_Computer(&mut self, out: *mut u16) -> HRESULT, + fn get_Watch(&mut self, out: *mut u16) -> HRESULT, + fn get_Clock(&mut self, out: *mut u16) -> HRESULT, + fn get_Display(&mut self, out: *mut u16) -> HRESULT, + fn get_RemoteControl(&mut self, out: *mut u16) -> HRESULT, + fn get_EyeGlasses(&mut self, out: *mut u16) -> HRESULT, + fn get_Tag(&mut self, out: *mut u16) -> HRESULT, + fn get_Keyring(&mut self, out: *mut u16) -> HRESULT, + fn get_MediaPlayer(&mut self, out: *mut u16) -> HRESULT, + fn get_BarcodeScanner(&mut self, out: *mut u16) -> HRESULT, + fn get_Thermometer(&mut self, out: *mut u16) -> HRESULT, + fn get_HeartRate(&mut self, out: *mut u16) -> HRESULT, + fn get_BloodPressure(&mut self, out: *mut u16) -> HRESULT, + fn get_HumanInterfaceDevice(&mut self, out: *mut u16) -> HRESULT, + fn get_GlucoseMeter(&mut self, out: *mut u16) -> HRESULT, + fn get_RunningWalking(&mut self, out: *mut u16) -> HRESULT, + fn get_Cycling(&mut self, out: *mut u16) -> HRESULT, + fn get_PulseOximeter(&mut self, out: *mut u16) -> HRESULT, + fn get_WeightScale(&mut self, out: *mut u16) -> HRESULT, + fn get_OutdoorSportActivity(&mut self, out: *mut u16) -> HRESULT + }} + impl IBluetoothLEAppearanceCategoriesStatics { + #[inline] pub unsafe fn get_uncategorized(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Uncategorized)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_phone(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Phone)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_computer(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Computer)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_watch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Watch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_clock(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Clock)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_display(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Display)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_control(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RemoteControl)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_eye_glasses(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EyeGlasses)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tag(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_keyring(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Keyring)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_player(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediaPlayer)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_barcode_scanner(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BarcodeScanner)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_thermometer(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Thermometer)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_heart_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HeartRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_blood_pressure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BloodPressure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_human_interface_device(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HumanInterfaceDevice)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_glucose_meter(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GlucoseMeter)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_running_walking(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RunningWalking)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Cycling)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pulse_oximeter(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PulseOximeter)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_weight_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WeightScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_outdoor_sport_activity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutdoorSportActivity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IBluetoothLEAppearanceCategoriesStatics [CLSID_BluetoothLEAppearanceCategories]} + DEFINE_CLSID!(CLSID_BluetoothLEAppearanceCategories = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,76,69,65,112,112,101,97,114,97,110,99,101,67,97,116,101,103,111,114,105,101,115,0]); + DEFINE_IID!(IID_IBluetoothLEAppearanceSubcategoriesStatics, 3850085894, 8516, 16730, 131, 18, 113, 204, 242, 145, 248, 209); + RT_INTERFACE!{static interface IBluetoothLEAppearanceSubcategoriesStatics(IBluetoothLEAppearanceSubcategoriesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAppearanceSubcategoriesStatics] { + fn get_Generic(&mut self, out: *mut u16) -> HRESULT, + fn get_SportsWatch(&mut self, out: *mut u16) -> HRESULT, + fn get_ThermometerEar(&mut self, out: *mut u16) -> HRESULT, + fn get_HeartRateBelt(&mut self, out: *mut u16) -> HRESULT, + fn get_BloodPressureArm(&mut self, out: *mut u16) -> HRESULT, + fn get_BloodPressureWrist(&mut self, out: *mut u16) -> HRESULT, + fn get_Keyboard(&mut self, out: *mut u16) -> HRESULT, + fn get_Mouse(&mut self, out: *mut u16) -> HRESULT, + fn get_Joystick(&mut self, out: *mut u16) -> HRESULT, + fn get_Gamepad(&mut self, out: *mut u16) -> HRESULT, + fn get_DigitizerTablet(&mut self, out: *mut u16) -> HRESULT, + fn get_CardReader(&mut self, out: *mut u16) -> HRESULT, + fn get_DigitalPen(&mut self, out: *mut u16) -> HRESULT, + fn get_BarcodeScanner(&mut self, out: *mut u16) -> HRESULT, + fn get_RunningWalkingInShoe(&mut self, out: *mut u16) -> HRESULT, + fn get_RunningWalkingOnShoe(&mut self, out: *mut u16) -> HRESULT, + fn get_RunningWalkingOnHip(&mut self, out: *mut u16) -> HRESULT, + fn get_CyclingComputer(&mut self, out: *mut u16) -> HRESULT, + fn get_CyclingSpeedSensor(&mut self, out: *mut u16) -> HRESULT, + fn get_CyclingCadenceSensor(&mut self, out: *mut u16) -> HRESULT, + fn get_CyclingPowerSensor(&mut self, out: *mut u16) -> HRESULT, + fn get_CyclingSpeedCadenceSensor(&mut self, out: *mut u16) -> HRESULT, + fn get_OximeterFingertip(&mut self, out: *mut u16) -> HRESULT, + fn get_OximeterWristWorn(&mut self, out: *mut u16) -> HRESULT, + fn get_LocationDisplay(&mut self, out: *mut u16) -> HRESULT, + fn get_LocationNavigationDisplay(&mut self, out: *mut u16) -> HRESULT, + fn get_LocationPod(&mut self, out: *mut u16) -> HRESULT, + fn get_LocationNavigationPod(&mut self, out: *mut u16) -> HRESULT + }} + impl IBluetoothLEAppearanceSubcategoriesStatics { + #[inline] pub unsafe fn get_generic(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Generic)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sports_watch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SportsWatch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_thermometer_ear(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ThermometerEar)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_heart_rate_belt(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HeartRateBelt)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_blood_pressure_arm(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BloodPressureArm)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_blood_pressure_wrist(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BloodPressureWrist)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_keyboard(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Keyboard)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_mouse(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mouse)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_joystick(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Joystick)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gamepad(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gamepad)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_digitizer_tablet(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DigitizerTablet)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_card_reader(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CardReader)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_digital_pen(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DigitalPen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_barcode_scanner(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BarcodeScanner)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_running_walking_in_shoe(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RunningWalkingInShoe)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_running_walking_on_shoe(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RunningWalkingOnShoe)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_running_walking_on_hip(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RunningWalkingOnHip)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling_computer(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CyclingComputer)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling_speed_sensor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CyclingSpeedSensor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling_cadence_sensor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CyclingCadenceSensor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling_power_sensor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CyclingPowerSensor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling_speed_cadence_sensor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CyclingSpeedCadenceSensor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_oximeter_fingertip(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OximeterFingertip)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_oximeter_wrist_worn(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OximeterWristWorn)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_location_display(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LocationDisplay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_location_navigation_display(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LocationNavigationDisplay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_location_pod(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LocationPod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_location_navigation_pod(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LocationNavigationPod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IBluetoothLEAppearanceSubcategoriesStatics [CLSID_BluetoothLEAppearanceSubcategories]} + DEFINE_CLSID!(CLSID_BluetoothLEAppearanceSubcategories = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,76,69,65,112,112,101,97,114,97,110,99,101,83,117,98,99,97,116,101,103,111,114,105,101,115,0]); + DEFINE_IID!(IID_IBluetoothLEAppearance, 1562409458, 26280, 16984, 152, 94, 2, 180, 217, 80, 159, 24); + RT_INTERFACE!{interface IBluetoothLEAppearance(IBluetoothLEAppearanceVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAppearance] { + fn get_RawValue(&mut self, out: *mut u16) -> HRESULT, + fn get_Category(&mut self, out: *mut u16) -> HRESULT, + fn get_SubCategory(&mut self, out: *mut u16) -> HRESULT + }} + impl IBluetoothLEAppearance { + #[inline] pub unsafe fn get_raw_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RawValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_category(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Category)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sub_category(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SubCategory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothLEAppearanceStatics, 2710814919, 17668, 20298, 155, 165, 205, 16, 84, 229, 224, 101); + RT_INTERFACE!{static interface IBluetoothLEAppearanceStatics(IBluetoothLEAppearanceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAppearanceStatics] { + fn FromRawValue(&mut self, rawValue: u16, out: *mut *mut BluetoothLEAppearance) -> HRESULT, + fn FromParts(&mut self, appearanceCategory: u16, appearanceSubCategory: u16, out: *mut *mut BluetoothLEAppearance) -> HRESULT + }} + impl IBluetoothLEAppearanceStatics { + #[inline] pub unsafe fn from_raw_value(&mut self, rawValue: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromRawValue)(self, rawValue, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_parts(&mut self, appearanceCategory: u16, appearanceSubCategory: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromParts)(self, appearanceCategory, appearanceSubCategory, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothLEAppearance: IBluetoothLEAppearance} + RT_ACTIVATABLE!{IBluetoothLEAppearanceStatics [CLSID_BluetoothLEAppearance]} + DEFINE_CLSID!(CLSID_BluetoothLEAppearance = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,76,69,65,112,112,101,97,114,97,110,99,101,0]); + DEFINE_IID!(IID_IBluetoothLEDevice, 3052285819, 19160, 17986, 172, 72, 128, 160, 181, 0, 232, 135); + RT_INTERFACE!{interface IBluetoothLEDevice(IBluetoothLEDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEDevice] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_GattServices(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ConnectionStatus(&mut self, out: *mut BluetoothConnectionStatus) -> HRESULT, + fn get_BluetoothAddress(&mut self, out: *mut u64) -> HRESULT, + fn GetGattService(&mut self, serviceUuid: Guid, out: *mut *mut genericattributeprofile::GattDeviceService) -> HRESULT, + fn add_NameChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NameChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_GattServicesChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_GattServicesChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ConnectionStatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IBluetoothLEDevice { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gatt_services(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GattServices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_connection_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConnectionStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bluetooth_address(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BluetoothAddress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gatt_service(&mut self, serviceUuid: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetGattService)(self, serviceUuid, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_name_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NameChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_name_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NameChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_gatt_services_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_GattServicesChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_gatt_services_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_GattServicesChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_connection_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ConnectionStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_connection_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ConnectionStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothLEDevice: IBluetoothLEDevice} + RT_ACTIVATABLE!{IBluetoothLEDeviceStatics2 [CLSID_BluetoothLEDevice]} + RT_ACTIVATABLE!{IBluetoothLEDeviceStatics [CLSID_BluetoothLEDevice]} + DEFINE_CLSID!(CLSID_BluetoothLEDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,66,108,117,101,116,111,111,116,104,76,69,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_IBluetoothLEDevice2, 653288115, 31470, 19761, 186, 186, 177, 185, 119, 95, 89, 22); + RT_INTERFACE!{interface IBluetoothLEDevice2(IBluetoothLEDevice2Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEDevice2] { + fn get_DeviceInformation(&mut self, out: *mut *mut super::enumeration::DeviceInformation) -> HRESULT, + fn get_Appearance(&mut self, out: *mut *mut BluetoothLEAppearance) -> HRESULT, + fn get_BluetoothAddressType(&mut self, out: *mut BluetoothAddressType) -> HRESULT + }} + impl IBluetoothLEDevice2 { + #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_appearance(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Appearance)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bluetooth_address_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BluetoothAddressType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothLEDeviceStatics, 3369015833, 61622, 19440, 134, 137, 65, 48, 61, 226, 217, 244); + RT_INTERFACE!{static interface IBluetoothLEDeviceStatics(IBluetoothLEDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEDeviceStatics] { + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromBluetoothAddressAsync(&mut self, bluetoothAddress: u64, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IBluetoothLEDeviceStatics { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_bluetooth_address_async(&mut self, bluetoothAddress: u64) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromBluetoothAddressAsync)(self, bluetoothAddress, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothLEDeviceStatics2, 1595064427, 15276, 17384, 173, 22, 86, 50, 113, 189, 65, 194); + RT_INTERFACE!{static interface IBluetoothLEDeviceStatics2(IBluetoothLEDeviceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEDeviceStatics2] { + fn GetDeviceSelectorFromPairingState(&mut self, pairingState: bool, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromConnectionStatus(&mut self, connectionStatus: BluetoothConnectionStatus, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromDeviceName(&mut self, deviceName: HSTRING, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromBluetoothAddress(&mut self, bluetoothAddress: u64, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromBluetoothAddressWithBluetoothAddressType(&mut self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromAppearance(&mut self, appearance: *mut BluetoothLEAppearance, out: *mut HSTRING) -> HRESULT, + fn FromBluetoothAddressWithBluetoothAddressTypeAsync(&mut self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBluetoothLEDeviceStatics2 { + #[inline] pub unsafe fn get_device_selector_from_pairing_state(&mut self, pairingState: bool) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromPairingState)(self, pairingState, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_connection_status(&mut self, connectionStatus: BluetoothConnectionStatus) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromConnectionStatus)(self, connectionStatus, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_device_name(&mut self, deviceName: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromDeviceName)(self, deviceName.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_bluetooth_address(&mut self, bluetoothAddress: u64) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromBluetoothAddress)(self, bluetoothAddress, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_bluetooth_address_with_bluetooth_address_type(&mut self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromBluetoothAddressWithBluetoothAddressType)(self, bluetoothAddress, bluetoothAddressType, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_appearance(&mut self, appearance: &BluetoothLEAppearance) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromAppearance)(self, appearance as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_bluetooth_address_with_bluetooth_address_type_async(&mut self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromBluetoothAddressWithBluetoothAddressTypeAsync)(self, bluetoothAddress, bluetoothAddressType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothClassOfDevice, 3594527358, 55255, 18017, 148, 84, 101, 3, 156, 161, 122, 43); + RT_INTERFACE!{interface IBluetoothClassOfDevice(IBluetoothClassOfDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothClassOfDevice] { + fn get_RawValue(&mut self, out: *mut u32) -> HRESULT, + fn get_MajorClass(&mut self, out: *mut BluetoothMajorClass) -> HRESULT, + fn get_MinorClass(&mut self, out: *mut BluetoothMinorClass) -> HRESULT, + fn get_ServiceCapabilities(&mut self, out: *mut BluetoothServiceCapabilities) -> HRESULT + }} + impl IBluetoothClassOfDevice { + #[inline] pub unsafe fn get_raw_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RawValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_major_class(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MajorClass)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_minor_class(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinorClass)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_capabilities(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceCapabilities)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothClassOfDeviceStatics, 3831575997, 4002, 16748, 145, 180, 193, 228, 140, 160, 97, 193); + RT_INTERFACE!{static interface IBluetoothClassOfDeviceStatics(IBluetoothClassOfDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothClassOfDeviceStatics] { + fn FromRawValue(&mut self, rawValue: u32, out: *mut *mut BluetoothClassOfDevice) -> HRESULT, + fn FromParts(&mut self, majorClass: BluetoothMajorClass, minorClass: BluetoothMinorClass, serviceCapabilities: BluetoothServiceCapabilities, out: *mut *mut BluetoothClassOfDevice) -> HRESULT + }} + impl IBluetoothClassOfDeviceStatics { + #[inline] pub unsafe fn from_raw_value(&mut self, rawValue: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromRawValue)(self, rawValue, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_parts(&mut self, majorClass: BluetoothMajorClass, minorClass: BluetoothMinorClass, serviceCapabilities: BluetoothServiceCapabilities) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromParts)(self, majorClass, minorClass, serviceCapabilities, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothSignalStrengthFilter, 3749409681, 27573, 19710, 144, 177, 93, 115, 36, 237, 207, 127); + RT_INTERFACE!{interface IBluetoothSignalStrengthFilter(IBluetoothSignalStrengthFilterVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothSignalStrengthFilter] { + fn get_InRangeThresholdInDBm(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_InRangeThresholdInDBm(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_OutOfRangeThresholdInDBm(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_OutOfRangeThresholdInDBm(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_OutOfRangeTimeout(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_OutOfRangeTimeout(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_SamplingInterval(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_SamplingInterval(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT + }} + impl IBluetoothSignalStrengthFilter { + #[inline] pub unsafe fn get_in_range_threshold_in_dbm(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InRangeThresholdInDBm)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_in_range_threshold_in_dbm(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_InRangeThresholdInDBm)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_out_of_range_threshold_in_dbm(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutOfRangeThresholdInDBm)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_out_of_range_threshold_in_dbm(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutOfRangeThresholdInDBm)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_out_of_range_timeout(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutOfRangeTimeout)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_out_of_range_timeout(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutOfRangeTimeout)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_sampling_interval(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SamplingInterval)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_sampling_interval(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_SamplingInterval)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothSignalStrengthFilter: IBluetoothSignalStrengthFilter} +pub mod rfcomm { // Windows.Devices.Bluetooth.Rfcomm +use ::prelude::*; + RT_CLASS!{class RfcommDeviceService: IRfcommDeviceService} + RT_ACTIVATABLE!{IRfcommDeviceServiceStatics [CLSID_RfcommDeviceService]} + RT_ACTIVATABLE!{IRfcommDeviceServiceStatics2 [CLSID_RfcommDeviceService]} + DEFINE_CLSID!(CLSID_RfcommDeviceService = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,82,102,99,111,109,109,46,82,102,99,111,109,109,68,101,118,105,99,101,83,101,114,118,105,99,101,0]); + RT_CLASS!{class RfcommDeviceServicesResult: IRfcommDeviceServicesResult} + RT_CLASS!{class RfcommServiceId: IRfcommServiceId} + RT_ACTIVATABLE!{IRfcommServiceIdStatics [CLSID_RfcommServiceId]} + DEFINE_CLSID!(CLSID_RfcommServiceId = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,82,102,99,111,109,109,46,82,102,99,111,109,109,83,101,114,118,105,99,101,73,100,0]); + DEFINE_IID!(IID_IRfcommServiceIdStatics, 706191034, 43381, 18147, 181, 107, 8, 255, 215, 131, 165, 254); + RT_INTERFACE!{static interface IRfcommServiceIdStatics(IRfcommServiceIdStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommServiceIdStatics] { + fn FromUuid(&mut self, uuid: Guid, out: *mut *mut RfcommServiceId) -> HRESULT, + fn FromShortId(&mut self, shortId: u32, out: *mut *mut RfcommServiceId) -> HRESULT, + fn get_SerialPort(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, + fn get_ObexObjectPush(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, + fn get_ObexFileTransfer(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, + fn get_PhoneBookAccessPce(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, + fn get_PhoneBookAccessPse(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, + fn get_GenericFileTransfer(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT + }} + impl IRfcommServiceIdStatics { + #[inline] pub unsafe fn from_uuid(&mut self, uuid: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromUuid)(self, uuid, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_short_id(&mut self, shortId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromShortId)(self, shortId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_serial_port(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SerialPort)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_obex_object_push(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ObexObjectPush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_obex_file_transfer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ObexFileTransfer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_phone_book_access_pce(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhoneBookAccessPce)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_phone_book_access_pse(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhoneBookAccessPse)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_generic_file_transfer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GenericFileTransfer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRfcommServiceId, 576885252, 32258, 16407, 129, 54, 218, 27, 106, 27, 155, 191); + RT_INTERFACE!{interface IRfcommServiceId(IRfcommServiceIdVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommServiceId] { + fn get_Uuid(&mut self, out: *mut Guid) -> HRESULT, + fn AsShortId(&mut self, out: *mut u32) -> HRESULT, + fn AsString(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IRfcommServiceId { + #[inline] pub unsafe fn get_uuid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Uuid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn as_short_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).AsShortId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn as_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AsString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRfcommDeviceServicesResult, 994588812, 31951, 18574, 150, 37, 210, 89, 165, 115, 45, 85); + RT_INTERFACE!{interface IRfcommDeviceServicesResult(IRfcommDeviceServicesResultVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceServicesResult] { + fn get_Error(&mut self, out: *mut super::BluetoothError) -> HRESULT, + fn get_Services(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IRfcommDeviceServicesResult { + #[inline] pub unsafe fn get_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_services(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Services)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRfcommDeviceServiceStatics, 2762033647, 25197, 16812, 178, 83, 135, 172, 92, 39, 226, 138); + RT_INTERFACE!{static interface IRfcommDeviceServiceStatics(IRfcommDeviceServiceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceServiceStatics] { + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, serviceId: *mut RfcommServiceId, out: *mut HSTRING) -> HRESULT + }} + impl IRfcommDeviceServiceStatics { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self, serviceId: &RfcommServiceId) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, serviceId as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRfcommDeviceServiceStatics2, 2861347273, 59277, 19428, 128, 118, 10, 61, 135, 160, 160, 95); + RT_INTERFACE!{static interface IRfcommDeviceServiceStatics2(IRfcommDeviceServiceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceServiceStatics2] { + fn GetDeviceSelectorForBluetoothDevice(&mut self, bluetoothDevice: *mut super::BluetoothDevice, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorForBluetoothDeviceWithCacheMode(&mut self, bluetoothDevice: *mut super::BluetoothDevice, cacheMode: super::BluetoothCacheMode, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorForBluetoothDeviceAndServiceId(&mut self, bluetoothDevice: *mut super::BluetoothDevice, serviceId: *mut RfcommServiceId, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode(&mut self, bluetoothDevice: *mut super::BluetoothDevice, serviceId: *mut RfcommServiceId, cacheMode: super::BluetoothCacheMode, out: *mut HSTRING) -> HRESULT + }} + impl IRfcommDeviceServiceStatics2 { + #[inline] pub unsafe fn get_device_selector_for_bluetooth_device(&mut self, bluetoothDevice: &super::BluetoothDevice) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDevice)(self, bluetoothDevice as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_for_bluetooth_device_with_cache_mode(&mut self, bluetoothDevice: &super::BluetoothDevice, cacheMode: super::BluetoothCacheMode) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceWithCacheMode)(self, bluetoothDevice as *const _ as *mut _, cacheMode, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_for_bluetooth_device_and_service_id(&mut self, bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceAndServiceId)(self, bluetoothDevice as *const _ as *mut _, serviceId as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_for_bluetooth_device_and_service_id_with_cache_mode(&mut self, bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId, cacheMode: super::BluetoothCacheMode) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode)(self, bluetoothDevice as *const _ as *mut _, serviceId as *const _ as *mut _, cacheMode, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRfcommDeviceService, 2927755039, 50593, 19520, 140, 40, 243, 239, 214, 144, 98, 243); + RT_INTERFACE!{interface IRfcommDeviceService(IRfcommDeviceServiceVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceService] { + #[cfg(not(feature="windows.networking"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.networking")] fn get_ConnectionHostName(&mut self, out: *mut *mut ::rt::gen::windows::networking::HostName) -> HRESULT, + fn get_ConnectionServiceName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ServiceId(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, + #[cfg(not(feature="windows.networking"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.networking")] fn get_ProtectionLevel(&mut self, out: *mut ::rt::gen::windows::networking::sockets::SocketProtectionLevel) -> HRESULT, + #[cfg(not(feature="windows.networking"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.networking")] fn get_MaxProtectionLevel(&mut self, out: *mut ::rt::gen::windows::networking::sockets::SocketProtectionLevel) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetSdpRawAttributesAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IMapView>) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetSdpRawAttributesWithCacheModeAsync(&mut self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IMapView>) -> HRESULT + }} + impl IRfcommDeviceService { + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_connection_host_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConnectionHostName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_connection_service_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConnectionServiceName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceId)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_protection_level(&mut self) -> Result<::rt::gen::windows::networking::sockets::SocketProtectionLevel> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtectionLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_max_protection_level(&mut self) -> Result<::rt::gen::windows::networking::sockets::SocketProtectionLevel> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxProtectionLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_sdp_raw_attributes_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSdpRawAttributesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_sdp_raw_attributes_with_cache_mode_async(&mut self, cacheMode: super::BluetoothCacheMode) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSdpRawAttributesWithCacheModeAsync)(self, cacheMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRfcommDeviceService2, 1399647508, 60365, 18942, 191, 159, 64, 239, 198, 137, 178, 13); + RT_INTERFACE!{interface IRfcommDeviceService2(IRfcommDeviceService2Vtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceService2] { + fn get_Device(&mut self, out: *mut *mut super::BluetoothDevice) -> HRESULT + }} + impl IRfcommDeviceService2 { + #[inline] pub unsafe fn get_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Device)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRfcommDeviceService3, 472034534, 56644, 19747, 134, 109, 143, 52, 134, 238, 100, 144); + RT_INTERFACE!{interface IRfcommDeviceService3(IRfcommDeviceService3Vtbl): IInspectable(IInspectableVtbl) [IID_IRfcommDeviceService3] { + fn get_DeviceAccessInformation(&mut self, out: *mut *mut super::super::enumeration::DeviceAccessInformation) -> HRESULT, + fn RequestAccessAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IRfcommDeviceService3 { + #[inline] pub unsafe fn get_device_access_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceAccessInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRfcommServiceProviderStatics, 2559083267, 27082, 16698, 132, 247, 67, 68, 199, 41, 41, 151); + RT_INTERFACE!{static interface IRfcommServiceProviderStatics(IRfcommServiceProviderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommServiceProviderStatics] { + fn CreateAsync(&mut self, serviceId: *mut RfcommServiceId, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IRfcommServiceProviderStatics { + #[inline] pub unsafe fn create_async(&mut self, serviceId: &RfcommServiceId) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAsync)(self, serviceId as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RfcommServiceProvider: IRfcommServiceProvider} + RT_ACTIVATABLE!{IRfcommServiceProviderStatics [CLSID_RfcommServiceProvider]} + DEFINE_CLSID!(CLSID_RfcommServiceProvider = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,82,102,99,111,109,109,46,82,102,99,111,109,109,83,101,114,118,105,99,101,80,114,111,118,105,100,101,114,0]); + DEFINE_IID!(IID_IRfcommServiceProvider, 3940285892, 45558, 17663, 159, 124, 231, 168, 42, 184, 104, 33); + RT_INTERFACE!{interface IRfcommServiceProvider(IRfcommServiceProviderVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommServiceProvider] { + fn get_ServiceId(&mut self, out: *mut *mut RfcommServiceId) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_SdpRawAttributes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT, + #[cfg(not(feature="windows.networking"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.networking")] fn StartAdvertising(&mut self, listener: *mut ::rt::gen::windows::networking::sockets::StreamSocketListener) -> HRESULT, + fn StopAdvertising(&mut self) -> HRESULT + }} + impl IRfcommServiceProvider { + #[inline] pub unsafe fn get_service_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceId)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_sdp_raw_attributes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SdpRawAttributes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn start_advertising(&mut self, listener: &::rt::gen::windows::networking::sockets::StreamSocketListener) -> Result<()> { + let hr = ((*self.lpVtbl).StartAdvertising)(self, listener as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop_advertising(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).StopAdvertising)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRfcommServiceProvider2, 1936449478, 15489, 19742, 186, 242, 221, 187, 129, 40, 69, 18); + RT_INTERFACE!{interface IRfcommServiceProvider2(IRfcommServiceProvider2Vtbl): IInspectable(IInspectableVtbl) [IID_IRfcommServiceProvider2] { + #[cfg(feature="windows.networking")] fn StartAdvertisingWithRadioDiscoverability(&mut self, listener: *mut ::rt::gen::windows::networking::sockets::StreamSocketListener, radioDiscoverable: bool) -> HRESULT + }} + impl IRfcommServiceProvider2 { + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn start_advertising_with_radio_discoverability(&mut self, listener: &::rt::gen::windows::networking::sockets::StreamSocketListener, radioDiscoverable: bool) -> Result<()> { + let hr = ((*self.lpVtbl).StartAdvertisingWithRadioDiscoverability)(self, listener as *const _ as *mut _, radioDiscoverable); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Devices.Bluetooth.Rfcomm +pub mod genericattributeprofile { // Windows.Devices.Bluetooth.GenericAttributeProfile +use ::prelude::*; + RT_CLASS!{class GattDeviceService: IGattDeviceService} + RT_ACTIVATABLE!{IGattDeviceServiceStatics [CLSID_GattDeviceService]} + DEFINE_CLSID!(CLSID_GattDeviceService = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,68,101,118,105,99,101,83,101,114,118,105,99,101,0]); + RT_ENUM! { enum GattCharacteristicProperties: u32 { + None (GattCharacteristicProperties_None) = 0, Broadcast (GattCharacteristicProperties_Broadcast) = 1, Read (GattCharacteristicProperties_Read) = 2, WriteWithoutResponse (GattCharacteristicProperties_WriteWithoutResponse) = 4, Write (GattCharacteristicProperties_Write) = 8, Notify (GattCharacteristicProperties_Notify) = 16, Indicate (GattCharacteristicProperties_Indicate) = 32, AuthenticatedSignedWrites (GattCharacteristicProperties_AuthenticatedSignedWrites) = 64, ExtendedProperties (GattCharacteristicProperties_ExtendedProperties) = 128, ReliableWrites (GattCharacteristicProperties_ReliableWrites) = 256, WritableAuxiliaries (GattCharacteristicProperties_WritableAuxiliaries) = 512, + }} + RT_ENUM! { enum GattClientCharacteristicConfigurationDescriptorValue: i32 { + None (GattClientCharacteristicConfigurationDescriptorValue_None) = 0, Notify (GattClientCharacteristicConfigurationDescriptorValue_Notify) = 1, Indicate (GattClientCharacteristicConfigurationDescriptorValue_Indicate) = 2, + }} + RT_ENUM! { enum GattProtectionLevel: i32 { + Plain (GattProtectionLevel_Plain) = 0, AuthenticationRequired (GattProtectionLevel_AuthenticationRequired) = 1, EncryptionRequired (GattProtectionLevel_EncryptionRequired) = 2, EncryptionAndAuthenticationRequired (GattProtectionLevel_EncryptionAndAuthenticationRequired) = 3, + }} + RT_ENUM! { enum GattWriteOption: i32 { + WriteWithResponse (GattWriteOption_WriteWithResponse) = 0, WriteWithoutResponse (GattWriteOption_WriteWithoutResponse) = 1, + }} + RT_ENUM! { enum GattCommunicationStatus: i32 { + Success (GattCommunicationStatus_Success) = 0, Unreachable (GattCommunicationStatus_Unreachable) = 1, + }} + DEFINE_IID!(IID_IGattDeviceServiceStatics, 426573858, 64173, 17884, 174, 91, 42, 195, 24, 78, 132, 219); + RT_INTERFACE!{static interface IGattDeviceServiceStatics(IGattDeviceServiceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattDeviceServiceStatics] { + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelectorFromUuid(&mut self, serviceUuid: Guid, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromShortId(&mut self, serviceShortId: u16, out: *mut HSTRING) -> HRESULT, + fn ConvertShortIdToUuid(&mut self, shortId: u16, out: *mut Guid) -> HRESULT + }} + impl IGattDeviceServiceStatics { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_uuid(&mut self, serviceUuid: Guid) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromUuid)(self, serviceUuid, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_short_id(&mut self, serviceShortId: u16) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromShortId)(self, serviceShortId, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn convert_short_id_to_uuid(&mut self, shortId: u16) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ConvertShortIdToUuid)(self, shortId, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class GattCharacteristic: IGattCharacteristic} + RT_ACTIVATABLE!{IGattCharacteristicStatics [CLSID_GattCharacteristic]} + DEFINE_CLSID!(CLSID_GattCharacteristic = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,67,104,97,114,97,99,116,101,114,105,115,116,105,99,0]); + DEFINE_IID!(IID_IGattCharacteristicStatics, 1506496707, 22836, 20328, 161, 152, 235, 134, 79, 164, 78, 107); + RT_INTERFACE!{static interface IGattCharacteristicStatics(IGattCharacteristicStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicStatics] { + fn ConvertShortIdToUuid(&mut self, shortId: u16, out: *mut Guid) -> HRESULT + }} + impl IGattCharacteristicStatics { + #[inline] pub unsafe fn convert_short_id_to_uuid(&mut self, shortId: u16) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ConvertShortIdToUuid)(self, shortId, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattCharacteristic, 1506496705, 22836, 20328, 161, 152, 235, 134, 79, 164, 78, 107); + RT_INTERFACE!{interface IGattCharacteristic(IGattCharacteristicVtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristic] { + fn GetDescriptors(&mut self, descriptorUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_CharacteristicProperties(&mut self, out: *mut GattCharacteristicProperties) -> HRESULT, + fn get_ProtectionLevel(&mut self, out: *mut GattProtectionLevel) -> HRESULT, + fn put_ProtectionLevel(&mut self, value: GattProtectionLevel) -> HRESULT, + fn get_UserDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Uuid(&mut self, out: *mut Guid) -> HRESULT, + fn get_AttributeHandle(&mut self, out: *mut u16) -> HRESULT, + fn get_PresentationFormats(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn ReadValueAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn ReadValueWithCacheModeAsync(&mut self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.storage")] fn WriteValueAsync(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy11(&mut self) -> (), + #[cfg(feature="windows.storage")] fn WriteValueWithOptionAsync(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn ReadClientCharacteristicConfigurationDescriptorAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn WriteClientCharacteristicConfigurationDescriptorAsync(&mut self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn add_ValueChanged(&mut self, valueChangedHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ValueChanged(&mut self, valueChangedEventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IGattCharacteristic { + #[inline] pub unsafe fn get_descriptors(&mut self, descriptorUuid: Guid) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDescriptors)(self, descriptorUuid, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_characteristic_properties(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharacteristicProperties)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_protection_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtectionLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_protection_level(&mut self, value: GattProtectionLevel) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProtectionLevel)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uuid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Uuid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_attribute_handle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AttributeHandle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_presentation_formats(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PresentationFormats)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_value_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadValueAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_value_with_cache_mode_async(&mut self, cacheMode: super::BluetoothCacheMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadValueWithCacheModeAsync)(self, cacheMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn write_value_async(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteValueAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn write_value_with_option_async(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteValueWithOptionAsync)(self, value as *const _ as *mut _, writeOption, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_client_characteristic_configuration_descriptor_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadClientCharacteristicConfigurationDescriptorAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_client_characteristic_configuration_descriptor_async(&mut self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteClientCharacteristicConfigurationDescriptorAsync)(self, clientCharacteristicConfigurationDescriptorValue, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_value_changed(&mut self, valueChangedHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ValueChanged)(self, valueChangedHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_value_changed(&mut self, valueChangedEventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ValueChanged)(self, valueChangedEventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class GattDescriptor: IGattDescriptor} + RT_ACTIVATABLE!{IGattDescriptorStatics [CLSID_GattDescriptor]} + DEFINE_CLSID!(CLSID_GattDescriptor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,68,101,115,99,114,105,112,116,111,114,0]); + RT_CLASS!{class GattPresentationFormat: IGattPresentationFormat} + RT_ACTIVATABLE!{IGattPresentationFormatStatics [CLSID_GattPresentationFormat]} + DEFINE_CLSID!(CLSID_GattPresentationFormat = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,80,114,101,115,101,110,116,97,116,105,111,110,70,111,114,109,97,116,0]); + RT_CLASS!{class GattReadResult: IGattReadResult} + RT_CLASS!{class GattReadClientCharacteristicConfigurationDescriptorResult: IGattReadClientCharacteristicConfigurationDescriptorResult} + RT_CLASS!{class GattValueChangedEventArgs: IGattValueChangedEventArgs} + DEFINE_IID!(IID_IGattCharacteristic2, 2920985976, 60422, 18276, 183, 128, 152, 53, 161, 211, 93, 110); + RT_INTERFACE!{interface IGattCharacteristic2(IGattCharacteristic2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristic2] { + fn get_Service(&mut self, out: *mut *mut GattDeviceService) -> HRESULT, + fn GetAllDescriptors(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IGattCharacteristic2 { + #[inline] pub unsafe fn get_service(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Service)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_all_descriptors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAllDescriptors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattDescriptorStatics, 2449825581, 32900, 17220, 180, 194, 40, 77, 225, 154, 133, 6); + RT_INTERFACE!{static interface IGattDescriptorStatics(IGattDescriptorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattDescriptorStatics] { + fn ConvertShortIdToUuid(&mut self, shortId: u16, out: *mut Guid) -> HRESULT + }} + impl IGattDescriptorStatics { + #[inline] pub unsafe fn convert_short_id_to_uuid(&mut self, shortId: u16) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ConvertShortIdToUuid)(self, shortId, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattDescriptor, 2449825579, 32900, 17220, 180, 194, 40, 77, 225, 154, 133, 6); + RT_INTERFACE!{interface IGattDescriptor(IGattDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IGattDescriptor] { + fn get_ProtectionLevel(&mut self, out: *mut GattProtectionLevel) -> HRESULT, + fn put_ProtectionLevel(&mut self, value: GattProtectionLevel) -> HRESULT, + fn get_Uuid(&mut self, out: *mut Guid) -> HRESULT, + fn get_AttributeHandle(&mut self, out: *mut u16) -> HRESULT, + fn ReadValueAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn ReadValueWithCacheModeAsync(&mut self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn WriteValueAsync(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IGattDescriptor { + #[inline] pub unsafe fn get_protection_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtectionLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_protection_level(&mut self, value: GattProtectionLevel) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProtectionLevel)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_uuid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Uuid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_attribute_handle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AttributeHandle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_value_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadValueAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_value_with_cache_mode_async(&mut self, cacheMode: super::BluetoothCacheMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadValueWithCacheModeAsync)(self, cacheMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn write_value_async(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteValueAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattPresentationFormatStatics, 426573856, 64173, 17884, 174, 91, 42, 195, 24, 78, 132, 219); + RT_INTERFACE!{static interface IGattPresentationFormatStatics(IGattPresentationFormatStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattPresentationFormatStatics] { + fn get_BluetoothSigAssignedNumbers(&mut self, out: *mut u8) -> HRESULT + }} + impl IGattPresentationFormatStatics { + #[inline] pub unsafe fn get_bluetooth_sig_assigned_numbers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BluetoothSigAssignedNumbers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattPresentationFormatTypesStatics, 4210145802, 12474, 16540, 190, 247, 207, 251, 109, 3, 184, 251); + RT_INTERFACE!{static interface IGattPresentationFormatTypesStatics(IGattPresentationFormatTypesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattPresentationFormatTypesStatics] { + fn get_Boolean(&mut self, out: *mut u8) -> HRESULT, + fn get_Bit2(&mut self, out: *mut u8) -> HRESULT, + fn get_Nibble(&mut self, out: *mut u8) -> HRESULT, + fn get_UInt8(&mut self, out: *mut u8) -> HRESULT, + fn get_UInt12(&mut self, out: *mut u8) -> HRESULT, + fn get_UInt16(&mut self, out: *mut u8) -> HRESULT, + fn get_UInt24(&mut self, out: *mut u8) -> HRESULT, + fn get_UInt32(&mut self, out: *mut u8) -> HRESULT, + fn get_UInt48(&mut self, out: *mut u8) -> HRESULT, + fn get_UInt64(&mut self, out: *mut u8) -> HRESULT, + fn get_UInt128(&mut self, out: *mut u8) -> HRESULT, + fn get_SInt8(&mut self, out: *mut u8) -> HRESULT, + fn get_SInt12(&mut self, out: *mut u8) -> HRESULT, + fn get_SInt16(&mut self, out: *mut u8) -> HRESULT, + fn get_SInt24(&mut self, out: *mut u8) -> HRESULT, + fn get_SInt32(&mut self, out: *mut u8) -> HRESULT, + fn get_SInt48(&mut self, out: *mut u8) -> HRESULT, + fn get_SInt64(&mut self, out: *mut u8) -> HRESULT, + fn get_SInt128(&mut self, out: *mut u8) -> HRESULT, + fn get_Float32(&mut self, out: *mut u8) -> HRESULT, + fn get_Float64(&mut self, out: *mut u8) -> HRESULT, + fn get_SFloat(&mut self, out: *mut u8) -> HRESULT, + fn get_Float(&mut self, out: *mut u8) -> HRESULT, + fn get_DUInt16(&mut self, out: *mut u8) -> HRESULT, + fn get_Utf8(&mut self, out: *mut u8) -> HRESULT, + fn get_Utf16(&mut self, out: *mut u8) -> HRESULT, + fn get_Struct(&mut self, out: *mut u8) -> HRESULT + }} + impl IGattPresentationFormatTypesStatics { + #[inline] pub unsafe fn get_boolean(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Boolean)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bit2(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bit2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_nibble(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Nibble)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint8(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UInt8)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint12(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UInt12)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint16(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UInt16)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint24(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UInt24)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint32(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UInt32)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint48(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UInt48)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint64(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UInt64)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint128(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UInt128)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sint8(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SInt8)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sint12(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SInt12)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sint16(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SInt16)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sint24(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SInt24)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sint32(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SInt32)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sint48(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SInt48)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sint64(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SInt64)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sint128(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SInt128)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_float32(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Float32)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_float64(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Float64)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sfloat(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SFloat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_float(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Float)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_duint16(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DUInt16)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_utf8(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Utf8)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_utf16(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Utf16)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_struct(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Struct)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattPresentationFormat, 426573857, 64173, 17884, 174, 91, 42, 195, 24, 78, 132, 219); + RT_INTERFACE!{interface IGattPresentationFormat(IGattPresentationFormatVtbl): IInspectable(IInspectableVtbl) [IID_IGattPresentationFormat] { + fn get_FormatType(&mut self, out: *mut u8) -> HRESULT, + fn get_Exponent(&mut self, out: *mut i32) -> HRESULT, + fn get_Unit(&mut self, out: *mut u16) -> HRESULT, + fn get_Namespace(&mut self, out: *mut u8) -> HRESULT, + fn get_Description(&mut self, out: *mut u16) -> HRESULT + }} + impl IGattPresentationFormat { + #[inline] pub unsafe fn get_format_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FormatType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_exponent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Exponent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_unit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Unit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_namespace(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Namespace)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattValueChangedEventArgs, 3525040980, 1763, 20184, 162, 99, 172, 250, 200, 186, 115, 19); + RT_INTERFACE!{interface IGattValueChangedEventArgs(IGattValueChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGattValueChangedEventArgs] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_CharacteristicValue(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + }} + impl IGattValueChangedEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_characteristic_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CharacteristicValue)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattServiceUuidsStatics, 1841655896, 39610, 17431, 184, 242, 220, 224, 22, 211, 78, 226); + RT_INTERFACE!{static interface IGattServiceUuidsStatics(IGattServiceUuidsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattServiceUuidsStatics] { + fn get_Battery(&mut self, out: *mut Guid) -> HRESULT, + fn get_BloodPressure(&mut self, out: *mut Guid) -> HRESULT, + fn get_CyclingSpeedAndCadence(&mut self, out: *mut Guid) -> HRESULT, + fn get_GenericAccess(&mut self, out: *mut Guid) -> HRESULT, + fn get_GenericAttribute(&mut self, out: *mut Guid) -> HRESULT, + fn get_Glucose(&mut self, out: *mut Guid) -> HRESULT, + fn get_HealthThermometer(&mut self, out: *mut Guid) -> HRESULT, + fn get_HeartRate(&mut self, out: *mut Guid) -> HRESULT, + fn get_RunningSpeedAndCadence(&mut self, out: *mut Guid) -> HRESULT + }} + impl IGattServiceUuidsStatics { + #[inline] pub unsafe fn get_battery(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Battery)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_blood_pressure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BloodPressure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling_speed_and_cadence(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CyclingSpeedAndCadence)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_generic_access(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GenericAccess)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_generic_attribute(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GenericAttribute)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_glucose(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Glucose)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_health_thermometer(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HealthThermometer)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_heart_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HeartRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_running_speed_and_cadence(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RunningSpeedAndCadence)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattServiceUuidsStatics2, 3534656757, 15637, 20345, 156, 12, 234, 175, 166, 117, 21, 92); + RT_INTERFACE!{static interface IGattServiceUuidsStatics2(IGattServiceUuidsStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattServiceUuidsStatics2] { + fn get_AlertNotification(&mut self, out: *mut Guid) -> HRESULT, + fn get_CurrentTime(&mut self, out: *mut Guid) -> HRESULT, + fn get_CyclingPower(&mut self, out: *mut Guid) -> HRESULT, + fn get_DeviceInformation(&mut self, out: *mut Guid) -> HRESULT, + fn get_HumanInterfaceDevice(&mut self, out: *mut Guid) -> HRESULT, + fn get_ImmediateAlert(&mut self, out: *mut Guid) -> HRESULT, + fn get_LinkLoss(&mut self, out: *mut Guid) -> HRESULT, + fn get_LocationAndNavigation(&mut self, out: *mut Guid) -> HRESULT, + fn get_NextDstChange(&mut self, out: *mut Guid) -> HRESULT, + fn get_PhoneAlertStatus(&mut self, out: *mut Guid) -> HRESULT, + fn get_ReferenceTimeUpdate(&mut self, out: *mut Guid) -> HRESULT, + fn get_ScanParameters(&mut self, out: *mut Guid) -> HRESULT, + fn get_TxPower(&mut self, out: *mut Guid) -> HRESULT + }} + impl IGattServiceUuidsStatics2 { + #[inline] pub unsafe fn get_alert_notification(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlertNotification)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling_power(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CyclingPower)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_information(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_human_interface_device(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HumanInterfaceDevice)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_immediate_alert(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ImmediateAlert)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_link_loss(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LinkLoss)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_location_and_navigation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LocationAndNavigation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_next_dst_change(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NextDstChange)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_phone_alert_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhoneAlertStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_reference_time_update(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReferenceTimeUpdate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scan_parameters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScanParameters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tx_power(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TxPower)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattCharacteristicUuidsStatics, 1492796806, 45534, 18188, 183, 222, 13, 17, 255, 68, 244, 183); + RT_INTERFACE!{static interface IGattCharacteristicUuidsStatics(IGattCharacteristicUuidsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicUuidsStatics] { + fn get_BatteryLevel(&mut self, out: *mut Guid) -> HRESULT, + fn get_BloodPressureFeature(&mut self, out: *mut Guid) -> HRESULT, + fn get_BloodPressureMeasurement(&mut self, out: *mut Guid) -> HRESULT, + fn get_BodySensorLocation(&mut self, out: *mut Guid) -> HRESULT, + fn get_CscFeature(&mut self, out: *mut Guid) -> HRESULT, + fn get_CscMeasurement(&mut self, out: *mut Guid) -> HRESULT, + fn get_GlucoseFeature(&mut self, out: *mut Guid) -> HRESULT, + fn get_GlucoseMeasurement(&mut self, out: *mut Guid) -> HRESULT, + fn get_GlucoseMeasurementContext(&mut self, out: *mut Guid) -> HRESULT, + fn get_HeartRateControlPoint(&mut self, out: *mut Guid) -> HRESULT, + fn get_HeartRateMeasurement(&mut self, out: *mut Guid) -> HRESULT, + fn get_IntermediateCuffPressure(&mut self, out: *mut Guid) -> HRESULT, + fn get_IntermediateTemperature(&mut self, out: *mut Guid) -> HRESULT, + fn get_MeasurementInterval(&mut self, out: *mut Guid) -> HRESULT, + fn get_RecordAccessControlPoint(&mut self, out: *mut Guid) -> HRESULT, + fn get_RscFeature(&mut self, out: *mut Guid) -> HRESULT, + fn get_RscMeasurement(&mut self, out: *mut Guid) -> HRESULT, + fn get_SCControlPoint(&mut self, out: *mut Guid) -> HRESULT, + fn get_SensorLocation(&mut self, out: *mut Guid) -> HRESULT, + fn get_TemperatureMeasurement(&mut self, out: *mut Guid) -> HRESULT, + fn get_TemperatureType(&mut self, out: *mut Guid) -> HRESULT + }} + impl IGattCharacteristicUuidsStatics { + #[inline] pub unsafe fn get_battery_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BatteryLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_blood_pressure_feature(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BloodPressureFeature)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_blood_pressure_measurement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BloodPressureMeasurement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_body_sensor_location(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BodySensorLocation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_csc_feature(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CscFeature)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_csc_measurement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CscMeasurement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_glucose_feature(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GlucoseFeature)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_glucose_measurement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GlucoseMeasurement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_glucose_measurement_context(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GlucoseMeasurementContext)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_heart_rate_control_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HeartRateControlPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_heart_rate_measurement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HeartRateMeasurement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_intermediate_cuff_pressure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IntermediateCuffPressure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_intermediate_temperature(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IntermediateTemperature)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_measurement_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MeasurementInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_record_access_control_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RecordAccessControlPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsc_feature(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RscFeature)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsc_measurement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RscMeasurement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sccontrol_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SCControlPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sensor_location(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SensorLocation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_temperature_measurement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TemperatureMeasurement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_temperature_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TemperatureType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattCharacteristicUuidsStatics2, 408269861, 54382, 18988, 156, 63, 237, 109, 234, 41, 231, 190); + RT_INTERFACE!{static interface IGattCharacteristicUuidsStatics2(IGattCharacteristicUuidsStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicUuidsStatics2] { + fn get_AlertCategoryId(&mut self, out: *mut Guid) -> HRESULT, + fn get_AlertCategoryIdBitMask(&mut self, out: *mut Guid) -> HRESULT, + fn get_AlertLevel(&mut self, out: *mut Guid) -> HRESULT, + fn get_AlertNotificationControlPoint(&mut self, out: *mut Guid) -> HRESULT, + fn get_AlertStatus(&mut self, out: *mut Guid) -> HRESULT, + fn get_GapAppearance(&mut self, out: *mut Guid) -> HRESULT, + fn get_BootKeyboardInputReport(&mut self, out: *mut Guid) -> HRESULT, + fn get_BootKeyboardOutputReport(&mut self, out: *mut Guid) -> HRESULT, + fn get_BootMouseInputReport(&mut self, out: *mut Guid) -> HRESULT, + fn get_CurrentTime(&mut self, out: *mut Guid) -> HRESULT, + fn get_CyclingPowerControlPoint(&mut self, out: *mut Guid) -> HRESULT, + fn get_CyclingPowerFeature(&mut self, out: *mut Guid) -> HRESULT, + fn get_CyclingPowerMeasurement(&mut self, out: *mut Guid) -> HRESULT, + fn get_CyclingPowerVector(&mut self, out: *mut Guid) -> HRESULT, + fn get_DateTime(&mut self, out: *mut Guid) -> HRESULT, + fn get_DayDateTime(&mut self, out: *mut Guid) -> HRESULT, + fn get_DayOfWeek(&mut self, out: *mut Guid) -> HRESULT, + fn get_GapDeviceName(&mut self, out: *mut Guid) -> HRESULT, + fn get_DstOffset(&mut self, out: *mut Guid) -> HRESULT, + fn get_ExactTime256(&mut self, out: *mut Guid) -> HRESULT, + fn get_FirmwareRevisionString(&mut self, out: *mut Guid) -> HRESULT, + fn get_HardwareRevisionString(&mut self, out: *mut Guid) -> HRESULT, + fn get_HidControlPoint(&mut self, out: *mut Guid) -> HRESULT, + fn get_HidInformation(&mut self, out: *mut Guid) -> HRESULT, + fn get_Ieee1107320601RegulatoryCertificationDataList(&mut self, out: *mut Guid) -> HRESULT, + fn get_LnControlPoint(&mut self, out: *mut Guid) -> HRESULT, + fn get_LnFeature(&mut self, out: *mut Guid) -> HRESULT, + fn get_LocalTimeInformation(&mut self, out: *mut Guid) -> HRESULT, + fn get_LocationAndSpeed(&mut self, out: *mut Guid) -> HRESULT, + fn get_ManufacturerNameString(&mut self, out: *mut Guid) -> HRESULT, + fn get_ModelNumberString(&mut self, out: *mut Guid) -> HRESULT, + fn get_Navigation(&mut self, out: *mut Guid) -> HRESULT, + fn get_NewAlert(&mut self, out: *mut Guid) -> HRESULT, + fn get_GapPeripheralPreferredConnectionParameters(&mut self, out: *mut Guid) -> HRESULT, + fn get_GapPeripheralPrivacyFlag(&mut self, out: *mut Guid) -> HRESULT, + fn get_PnpId(&mut self, out: *mut Guid) -> HRESULT, + fn get_PositionQuality(&mut self, out: *mut Guid) -> HRESULT, + fn get_ProtocolMode(&mut self, out: *mut Guid) -> HRESULT, + fn get_GapReconnectionAddress(&mut self, out: *mut Guid) -> HRESULT, + fn get_ReferenceTimeInformation(&mut self, out: *mut Guid) -> HRESULT, + fn get_Report(&mut self, out: *mut Guid) -> HRESULT, + fn get_ReportMap(&mut self, out: *mut Guid) -> HRESULT, + fn get_RingerControlPoint(&mut self, out: *mut Guid) -> HRESULT, + fn get_RingerSetting(&mut self, out: *mut Guid) -> HRESULT, + fn get_ScanIntervalWindow(&mut self, out: *mut Guid) -> HRESULT, + fn get_ScanRefresh(&mut self, out: *mut Guid) -> HRESULT, + fn get_SerialNumberString(&mut self, out: *mut Guid) -> HRESULT, + fn get_GattServiceChanged(&mut self, out: *mut Guid) -> HRESULT, + fn get_SoftwareRevisionString(&mut self, out: *mut Guid) -> HRESULT, + fn get_SupportedNewAlertCategory(&mut self, out: *mut Guid) -> HRESULT, + fn get_SupportUnreadAlertCategory(&mut self, out: *mut Guid) -> HRESULT, + fn get_SystemId(&mut self, out: *mut Guid) -> HRESULT, + fn get_TimeAccuracy(&mut self, out: *mut Guid) -> HRESULT, + fn get_TimeSource(&mut self, out: *mut Guid) -> HRESULT, + fn get_TimeUpdateControlPoint(&mut self, out: *mut Guid) -> HRESULT, + fn get_TimeUpdateState(&mut self, out: *mut Guid) -> HRESULT, + fn get_TimeWithDst(&mut self, out: *mut Guid) -> HRESULT, + fn get_TimeZone(&mut self, out: *mut Guid) -> HRESULT, + fn get_TxPowerLevel(&mut self, out: *mut Guid) -> HRESULT, + fn get_UnreadAlertStatus(&mut self, out: *mut Guid) -> HRESULT + }} + impl IGattCharacteristicUuidsStatics2 { + #[inline] pub unsafe fn get_alert_category_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlertCategoryId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_alert_category_id_bit_mask(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlertCategoryIdBitMask)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_alert_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlertLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_alert_notification_control_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlertNotificationControlPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_alert_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlertStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gap_appearance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GapAppearance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_boot_keyboard_input_report(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BootKeyboardInputReport)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_boot_keyboard_output_report(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BootKeyboardOutputReport)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_boot_mouse_input_report(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BootMouseInputReport)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling_power_control_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CyclingPowerControlPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling_power_feature(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CyclingPowerFeature)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling_power_measurement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CyclingPowerMeasurement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cycling_power_vector(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CyclingPowerVector)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_date_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DateTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_day_date_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DayDateTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_day_of_week(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DayOfWeek)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gap_device_name(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GapDeviceName)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dst_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DstOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_exact_time256(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExactTime256)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_firmware_revision_string(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FirmwareRevisionString)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_hardware_revision_string(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HardwareRevisionString)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_hid_control_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HidControlPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_hid_information(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HidInformation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ieee1107320601_regulatory_certification_data_list(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ieee1107320601RegulatoryCertificationDataList)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ln_control_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LnControlPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ln_feature(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LnFeature)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_time_information(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LocalTimeInformation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_location_and_speed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LocationAndSpeed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_manufacturer_name_string(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ManufacturerNameString)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_model_number_string(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ModelNumberString)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_navigation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Navigation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_alert(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewAlert)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gap_peripheral_preferred_connection_parameters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GapPeripheralPreferredConnectionParameters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gap_peripheral_privacy_flag(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GapPeripheralPrivacyFlag)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pnp_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PnpId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_quality(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionQuality)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_protocol_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtocolMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gap_reconnection_address(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GapReconnectionAddress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_reference_time_information(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReferenceTimeInformation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_report(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_map(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportMap)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ringer_control_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RingerControlPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ringer_setting(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RingerSetting)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scan_interval_window(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScanIntervalWindow)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scan_refresh(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScanRefresh)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_serial_number_string(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SerialNumberString)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gatt_service_changed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GattServiceChanged)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_software_revision_string(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SoftwareRevisionString)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_new_alert_category(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportedNewAlertCategory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_support_unread_alert_category(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportUnreadAlertCategory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SystemId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_accuracy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeAccuracy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_source(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeSource)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_update_control_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeUpdateControlPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_update_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeUpdateState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_with_dst(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeWithDst)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_zone(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeZone)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tx_power_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TxPowerLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_unread_alert_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UnreadAlertStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattDescriptorUuidsStatics, 2801296078, 40188, 17137, 145, 133, 255, 55, 183, 81, 129, 211); + RT_INTERFACE!{static interface IGattDescriptorUuidsStatics(IGattDescriptorUuidsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattDescriptorUuidsStatics] { + fn get_CharacteristicAggregateFormat(&mut self, out: *mut Guid) -> HRESULT, + fn get_CharacteristicExtendedProperties(&mut self, out: *mut Guid) -> HRESULT, + fn get_CharacteristicPresentationFormat(&mut self, out: *mut Guid) -> HRESULT, + fn get_CharacteristicUserDescription(&mut self, out: *mut Guid) -> HRESULT, + fn get_ClientCharacteristicConfiguration(&mut self, out: *mut Guid) -> HRESULT, + fn get_ServerCharacteristicConfiguration(&mut self, out: *mut Guid) -> HRESULT + }} + impl IGattDescriptorUuidsStatics { + #[inline] pub unsafe fn get_characteristic_aggregate_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharacteristicAggregateFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_characteristic_extended_properties(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharacteristicExtendedProperties)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_characteristic_presentation_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharacteristicPresentationFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_characteristic_user_description(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharacteristicUserDescription)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_client_characteristic_configuration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ClientCharacteristicConfiguration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_server_characteristic_configuration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServerCharacteristicConfiguration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattReliableWriteTransaction, 1671851783, 6890, 19532, 165, 15, 151, 186, 228, 116, 179, 72); + RT_INTERFACE!{interface IGattReliableWriteTransaction(IGattReliableWriteTransactionVtbl): IInspectable(IInspectableVtbl) [IID_IGattReliableWriteTransaction] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn WriteValue(&mut self, characteristic: *mut GattCharacteristic, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn CommitAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IGattReliableWriteTransaction { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn write_value(&mut self, characteristic: &GattCharacteristic, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).WriteValue)(self, characteristic as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn commit_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CommitAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattReadResult, 1671851784, 6890, 19532, 165, 15, 151, 186, 228, 116, 179, 72); + RT_INTERFACE!{interface IGattReadResult(IGattReadResultVtbl): IInspectable(IInspectableVtbl) [IID_IGattReadResult] { + fn get_Status(&mut self, out: *mut GattCommunicationStatus) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Value(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl IGattReadResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattReadClientCharacteristicConfigurationDescriptorResult, 1671851785, 6890, 19532, 165, 15, 151, 186, 228, 116, 179, 72); + RT_INTERFACE!{interface IGattReadClientCharacteristicConfigurationDescriptorResult(IGattReadClientCharacteristicConfigurationDescriptorResultVtbl): IInspectable(IInspectableVtbl) [IID_IGattReadClientCharacteristicConfigurationDescriptorResult] { + fn get_Status(&mut self, out: *mut GattCommunicationStatus) -> HRESULT, + fn get_ClientCharacteristicConfigurationDescriptor(&mut self, out: *mut GattClientCharacteristicConfigurationDescriptorValue) -> HRESULT + }} + impl IGattReadClientCharacteristicConfigurationDescriptorResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_client_characteristic_configuration_descriptor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ClientCharacteristicConfigurationDescriptor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IGattServiceUuidsStatics2 [CLSID_GattServiceUuids]} + RT_ACTIVATABLE!{IGattServiceUuidsStatics [CLSID_GattServiceUuids]} + DEFINE_CLSID!(CLSID_GattServiceUuids = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,83,101,114,118,105,99,101,85,117,105,100,115,0]); + RT_ACTIVATABLE!{IGattCharacteristicUuidsStatics2 [CLSID_GattCharacteristicUuids]} + RT_ACTIVATABLE!{IGattCharacteristicUuidsStatics [CLSID_GattCharacteristicUuids]} + DEFINE_CLSID!(CLSID_GattCharacteristicUuids = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,67,104,97,114,97,99,116,101,114,105,115,116,105,99,85,117,105,100,115,0]); + RT_ACTIVATABLE!{IGattDescriptorUuidsStatics [CLSID_GattDescriptorUuids]} + DEFINE_CLSID!(CLSID_GattDescriptorUuids = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,68,101,115,99,114,105,112,116,111,114,85,117,105,100,115,0]); + RT_CLASS!{class GattReliableWriteTransaction: IGattReliableWriteTransaction} + RT_ACTIVATABLE!{IGattPresentationFormatTypesStatics [CLSID_GattPresentationFormatTypes]} + DEFINE_CLSID!(CLSID_GattPresentationFormatTypes = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,71,101,110,101,114,105,99,65,116,116,114,105,98,117,116,101,80,114,111,102,105,108,101,46,71,97,116,116,80,114,101,115,101,110,116,97,116,105,111,110,70,111,114,109,97,116,84,121,112,101,115,0]); + DEFINE_IID!(IID_IGattDeviceService, 2893773829, 45884, 18383, 153, 15, 107, 143, 85, 119, 223, 113); + RT_INTERFACE!{interface IGattDeviceService(IGattDeviceServiceVtbl): IInspectable(IInspectableVtbl) [IID_IGattDeviceService] { + fn GetCharacteristics(&mut self, characteristicUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetIncludedServices(&mut self, serviceUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Uuid(&mut self, out: *mut Guid) -> HRESULT, + fn get_AttributeHandle(&mut self, out: *mut u16) -> HRESULT + }} + impl IGattDeviceService { + #[inline] pub unsafe fn get_characteristics(&mut self, characteristicUuid: Guid) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCharacteristics)(self, characteristicUuid, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_included_services(&mut self, serviceUuid: Guid) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIncludedServices)(self, serviceUuid, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uuid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Uuid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_attribute_handle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AttributeHandle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGattDeviceService2, 4233384459, 2829, 18184, 186, 224, 159, 253, 148, 137, 188, 89); + RT_INTERFACE!{interface IGattDeviceService2(IGattDeviceService2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattDeviceService2] { + fn get_Device(&mut self, out: *mut *mut super::BluetoothLEDevice) -> HRESULT, + fn get_ParentServices(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetAllCharacteristics(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetAllIncludedServices(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IGattDeviceService2 { + #[inline] pub unsafe fn get_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Device)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_parent_services(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ParentServices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_all_characteristics(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAllCharacteristics)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_all_included_services(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAllIncludedServices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Devices.Bluetooth.GenericAttributeProfile +pub mod advertisement { // Windows.Devices.Bluetooth.Advertisement +use ::prelude::*; + RT_ENUM! { enum BluetoothLEScanningMode: i32 { + Passive (BluetoothLEScanningMode_Passive) = 0, Active (BluetoothLEScanningMode_Active) = 1, + }} + RT_ENUM! { enum BluetoothLEAdvertisementFlags: u32 { + None (BluetoothLEAdvertisementFlags_None) = 0, LimitedDiscoverableMode (BluetoothLEAdvertisementFlags_LimitedDiscoverableMode) = 1, GeneralDiscoverableMode (BluetoothLEAdvertisementFlags_GeneralDiscoverableMode) = 2, ClassicNotSupported (BluetoothLEAdvertisementFlags_ClassicNotSupported) = 4, DualModeControllerCapable (BluetoothLEAdvertisementFlags_DualModeControllerCapable) = 8, DualModeHostCapable (BluetoothLEAdvertisementFlags_DualModeHostCapable) = 16, + }} + RT_ENUM! { enum BluetoothLEAdvertisementType: i32 { + ConnectableUndirected (BluetoothLEAdvertisementType_ConnectableUndirected) = 0, ConnectableDirected (BluetoothLEAdvertisementType_ConnectableDirected) = 1, ScannableUndirected (BluetoothLEAdvertisementType_ScannableUndirected) = 2, NonConnectableUndirected (BluetoothLEAdvertisementType_NonConnectableUndirected) = 3, ScanResponse (BluetoothLEAdvertisementType_ScanResponse) = 4, + }} + RT_ENUM! { enum BluetoothLEAdvertisementWatcherStatus: i32 { + Created (BluetoothLEAdvertisementWatcherStatus_Created) = 0, Started (BluetoothLEAdvertisementWatcherStatus_Started) = 1, Stopping (BluetoothLEAdvertisementWatcherStatus_Stopping) = 2, Stopped (BluetoothLEAdvertisementWatcherStatus_Stopped) = 3, Aborted (BluetoothLEAdvertisementWatcherStatus_Aborted) = 4, + }} + DEFINE_IID!(IID_IBluetoothLEAdvertisement, 107983543, 13265, 20093, 131, 103, 207, 129, 208, 247, 150, 83); + RT_INTERFACE!{interface IBluetoothLEAdvertisement(IBluetoothLEAdvertisementVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisement] { + fn get_Flags(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_Flags(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_LocalName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_LocalName(&mut self, value: HSTRING) -> HRESULT, + fn get_ServiceUuids(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_ManufacturerData(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_DataSections(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn GetManufacturerDataByCompanyId(&mut self, companyId: u16, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetSectionsByType(&mut self, type_: u8, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IBluetoothLEAdvertisement { + #[inline] pub unsafe fn get_flags(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Flags)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_flags(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Flags)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_local_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_LocalName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_uuids(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceUuids)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manufacturer_data(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ManufacturerData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_sections(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataSections)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manufacturer_data_by_company_id(&mut self, companyId: u16) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetManufacturerDataByCompanyId)(self, companyId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sections_by_type(&mut self, type_: u8) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSectionsByType)(self, type_, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothLEManufacturerData: IBluetoothLEManufacturerData [IBluetoothLEManufacturerDataFactory] [CLSID_BluetoothLEManufacturerData]} + DEFINE_CLSID!(CLSID_BluetoothLEManufacturerData = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,77,97,110,117,102,97,99,116,117,114,101,114,68,97,116,97,0]); + RT_CLASS!{class BluetoothLEAdvertisementDataSection: IBluetoothLEAdvertisementDataSection [IBluetoothLEAdvertisementDataSectionFactory] [CLSID_BluetoothLEAdvertisementDataSection]} + DEFINE_CLSID!(CLSID_BluetoothLEAdvertisementDataSection = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,65,100,118,101,114,116,105,115,101,109,101,110,116,68,97,116,97,83,101,99,116,105,111,110,0]); + RT_CLASS!{class BluetoothLEAdvertisement: IBluetoothLEAdvertisement} + DEFINE_IID!(IID_IBluetoothLEAdvertisementFilter, 320778451, 53326, 18353, 131, 126, 73, 64, 91, 246, 248, 15); + RT_INTERFACE!{interface IBluetoothLEAdvertisementFilter(IBluetoothLEAdvertisementFilterVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementFilter] { + fn get_Advertisement(&mut self, out: *mut *mut BluetoothLEAdvertisement) -> HRESULT, + fn put_Advertisement(&mut self, value: *mut BluetoothLEAdvertisement) -> HRESULT, + fn get_BytePatterns(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + }} + impl IBluetoothLEAdvertisementFilter { + #[inline] pub unsafe fn get_advertisement(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Advertisement)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_advertisement(&mut self, value: &BluetoothLEAdvertisement) -> Result<()> { + let hr = ((*self.lpVtbl).put_Advertisement)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_byte_patterns(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BytePatterns)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothLEAdvertisementBytePattern: IBluetoothLEAdvertisementBytePattern [IBluetoothLEAdvertisementBytePatternFactory] [CLSID_BluetoothLEAdvertisementBytePattern]} + DEFINE_CLSID!(CLSID_BluetoothLEAdvertisementBytePattern = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,65,100,118,101,114,116,105,115,101,109,101,110,116,66,121,116,101,80,97,116,116,101,114,110,0]); + RT_CLASS!{class BluetoothLEAdvertisementFilter: IBluetoothLEAdvertisementFilter} + DEFINE_IID!(IID_IBluetoothLEAdvertisementWatcherStoppedEventArgs, 3712022605, 59321, 17379, 156, 4, 6, 133, 208, 133, 253, 140); + RT_INTERFACE!{interface IBluetoothLEAdvertisementWatcherStoppedEventArgs(IBluetoothLEAdvertisementWatcherStoppedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementWatcherStoppedEventArgs] { + fn get_Error(&mut self, out: *mut super::BluetoothError) -> HRESULT + }} + impl IBluetoothLEAdvertisementWatcherStoppedEventArgs { + #[inline] pub unsafe fn get_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothLEAdvertisementWatcherStoppedEventArgs: IBluetoothLEAdvertisementWatcherStoppedEventArgs} + DEFINE_IID!(IID_IBluetoothLEAdvertisementWatcherFactory, 2595171670, 14764, 17726, 179, 42, 133, 198, 87, 224, 23, 241); + RT_INTERFACE!{static interface IBluetoothLEAdvertisementWatcherFactory(IBluetoothLEAdvertisementWatcherFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementWatcherFactory] { + fn Create(&mut self, advertisementFilter: *mut BluetoothLEAdvertisementFilter, out: *mut *mut BluetoothLEAdvertisementWatcher) -> HRESULT + }} + impl IBluetoothLEAdvertisementWatcherFactory { + #[inline] pub unsafe fn create(&mut self, advertisementFilter: &BluetoothLEAdvertisementFilter) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, advertisementFilter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothLEAdvertisementWatcher: IBluetoothLEAdvertisementWatcher [IBluetoothLEAdvertisementWatcherFactory] [CLSID_BluetoothLEAdvertisementWatcher]} + DEFINE_CLSID!(CLSID_BluetoothLEAdvertisementWatcher = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,65,100,118,101,114,116,105,115,101,109,101,110,116,87,97,116,99,104,101,114,0]); + DEFINE_IID!(IID_IBluetoothLEAdvertisementWatcher, 2796303215, 62419, 17047, 141, 108, 200, 30, 166, 98, 63, 64); + RT_INTERFACE!{interface IBluetoothLEAdvertisementWatcher(IBluetoothLEAdvertisementWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementWatcher] { + fn get_MinSamplingInterval(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_MaxSamplingInterval(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_MinOutOfRangeTimeout(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_MaxOutOfRangeTimeout(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Status(&mut self, out: *mut BluetoothLEAdvertisementWatcherStatus) -> HRESULT, + fn get_ScanningMode(&mut self, out: *mut BluetoothLEScanningMode) -> HRESULT, + fn put_ScanningMode(&mut self, value: BluetoothLEScanningMode) -> HRESULT, + fn get_SignalStrengthFilter(&mut self, out: *mut *mut super::BluetoothSignalStrengthFilter) -> HRESULT, + fn put_SignalStrengthFilter(&mut self, value: *mut super::BluetoothSignalStrengthFilter) -> HRESULT, + fn get_AdvertisementFilter(&mut self, out: *mut *mut BluetoothLEAdvertisementFilter) -> HRESULT, + fn put_AdvertisementFilter(&mut self, value: *mut BluetoothLEAdvertisementFilter) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn add_Received(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Received(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IBluetoothLEAdvertisementWatcher { + #[inline] pub unsafe fn get_min_sampling_interval(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinSamplingInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_sampling_interval(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxSamplingInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_out_of_range_timeout(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinOutOfRangeTimeout)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_out_of_range_timeout(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxOutOfRangeTimeout)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scanning_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScanningMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scanning_mode(&mut self, value: BluetoothLEScanningMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ScanningMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_signal_strength_filter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SignalStrengthFilter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_signal_strength_filter(&mut self, value: &super::BluetoothSignalStrengthFilter) -> Result<()> { + let hr = ((*self.lpVtbl).put_SignalStrengthFilter)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_advertisement_filter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AdvertisementFilter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_advertisement_filter(&mut self, value: &BluetoothLEAdvertisementFilter) -> Result<()> { + let hr = ((*self.lpVtbl).put_AdvertisementFilter)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_received(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Received)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_received(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Received)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothLEAdvertisementReceivedEventArgs: IBluetoothLEAdvertisementReceivedEventArgs} + DEFINE_IID!(IID_IBluetoothLEAdvertisementReceivedEventArgs, 664305119, 58774, 16830, 141, 67, 158, 103, 49, 212, 169, 19); + RT_INTERFACE!{interface IBluetoothLEAdvertisementReceivedEventArgs(IBluetoothLEAdvertisementReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementReceivedEventArgs] { + fn get_RawSignalStrengthInDBm(&mut self, out: *mut i16) -> HRESULT, + fn get_BluetoothAddress(&mut self, out: *mut u64) -> HRESULT, + fn get_AdvertisementType(&mut self, out: *mut BluetoothLEAdvertisementType) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_Advertisement(&mut self, out: *mut *mut BluetoothLEAdvertisement) -> HRESULT + }} + impl IBluetoothLEAdvertisementReceivedEventArgs { + #[inline] pub unsafe fn get_raw_signal_strength_in_dbm(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RawSignalStrengthInDBm)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bluetooth_address(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BluetoothAddress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_advertisement_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AdvertisementType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_advertisement(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Advertisement)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothLEAdvertisementDataSectionFactory, 3886287170, 43077, 16453, 191, 126, 62, 153, 113, 219, 138, 107); + RT_INTERFACE!{static interface IBluetoothLEAdvertisementDataSectionFactory(IBluetoothLEAdvertisementDataSectionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementDataSectionFactory] { + #[cfg(feature="windows.storage")] fn Create(&mut self, dataType: u8, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut BluetoothLEAdvertisementDataSection) -> HRESULT + }} + impl IBluetoothLEAdvertisementDataSectionFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create(&mut self, dataType: u8, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, dataType, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothLEAdvertisementDataSection, 3609277204, 14915, 16633, 182, 240, 146, 191, 239, 195, 74, 227); + RT_INTERFACE!{interface IBluetoothLEAdvertisementDataSection(IBluetoothLEAdvertisementDataSectionVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementDataSection] { + fn get_DataType(&mut self, out: *mut u8) -> HRESULT, + fn put_DataType(&mut self, value: u8) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl IBluetoothLEAdvertisementDataSection { + #[inline] pub unsafe fn get_data_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DataType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_data_type(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothLEManufacturerDataFactory, 3231398392, 12698, 17438, 141, 229, 102, 168, 30, 135, 122, 108); + RT_INTERFACE!{static interface IBluetoothLEManufacturerDataFactory(IBluetoothLEManufacturerDataFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEManufacturerDataFactory] { + #[cfg(feature="windows.storage")] fn Create(&mut self, companyId: u16, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut BluetoothLEManufacturerData) -> HRESULT + }} + impl IBluetoothLEManufacturerDataFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create(&mut self, companyId: u16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, companyId, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothLEManufacturerData, 2435693080, 26979, 17715, 176, 97, 70, 148, 218, 251, 52, 229); + RT_INTERFACE!{interface IBluetoothLEManufacturerData(IBluetoothLEManufacturerDataVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEManufacturerData] { + fn get_CompanyId(&mut self, out: *mut u16) -> HRESULT, + fn put_CompanyId(&mut self, value: u16) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl IBluetoothLEManufacturerData { + #[inline] pub unsafe fn get_company_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CompanyId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_company_id(&mut self, value: u16) -> Result<()> { + let hr = ((*self.lpVtbl).put_CompanyId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothLEAdvertisementBytePatternFactory, 3269610867, 64860, 20163, 190, 42, 156, 166, 250, 17, 183, 189); + RT_INTERFACE!{static interface IBluetoothLEAdvertisementBytePatternFactory(IBluetoothLEAdvertisementBytePatternFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementBytePatternFactory] { + #[cfg(feature="windows.storage")] fn Create(&mut self, dataType: u8, offset: i16, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut BluetoothLEAdvertisementBytePattern) -> HRESULT + }} + impl IBluetoothLEAdvertisementBytePatternFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create(&mut self, dataType: u8, offset: i16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, dataType, offset, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothLEAdvertisementBytePattern, 4227520498, 47557, 18952, 188, 81, 80, 47, 142, 246, 138, 121); + RT_INTERFACE!{interface IBluetoothLEAdvertisementBytePattern(IBluetoothLEAdvertisementBytePatternVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementBytePattern] { + fn get_DataType(&mut self, out: *mut u8) -> HRESULT, + fn put_DataType(&mut self, value: u8) -> HRESULT, + fn get_Offset(&mut self, out: *mut i16) -> HRESULT, + fn put_Offset(&mut self, value: i16) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl IBluetoothLEAdvertisementBytePattern { + #[inline] pub unsafe fn get_data_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DataType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_data_type(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Offset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_offset(&mut self, value: i16) -> Result<()> { + let hr = ((*self.lpVtbl).put_Offset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBluetoothLEAdvertisementDataTypesStatics, 1001801519, 1542, 17227, 167, 110, 116, 21, 159, 6, 132, 211); + RT_INTERFACE!{static interface IBluetoothLEAdvertisementDataTypesStatics(IBluetoothLEAdvertisementDataTypesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementDataTypesStatics] { + fn get_Flags(&mut self, out: *mut u8) -> HRESULT, + fn get_IncompleteService16BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_CompleteService16BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_IncompleteService32BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_CompleteService32BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_IncompleteService128BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_CompleteService128BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_ShortenedLocalName(&mut self, out: *mut u8) -> HRESULT, + fn get_CompleteLocalName(&mut self, out: *mut u8) -> HRESULT, + fn get_TxPowerLevel(&mut self, out: *mut u8) -> HRESULT, + fn get_SlaveConnectionIntervalRange(&mut self, out: *mut u8) -> HRESULT, + fn get_ServiceSolicitation16BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_ServiceSolicitation32BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_ServiceSolicitation128BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_ServiceData16BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_ServiceData32BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_ServiceData128BitUuids(&mut self, out: *mut u8) -> HRESULT, + fn get_PublicTargetAddress(&mut self, out: *mut u8) -> HRESULT, + fn get_RandomTargetAddress(&mut self, out: *mut u8) -> HRESULT, + fn get_Appearance(&mut self, out: *mut u8) -> HRESULT, + fn get_AdvertisingInterval(&mut self, out: *mut u8) -> HRESULT, + fn get_ManufacturerSpecificData(&mut self, out: *mut u8) -> HRESULT + }} + impl IBluetoothLEAdvertisementDataTypesStatics { + #[inline] pub unsafe fn get_flags(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Flags)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_incomplete_service16_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncompleteService16BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_complete_service16_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CompleteService16BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_incomplete_service32_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncompleteService32BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_complete_service32_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CompleteService32BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_incomplete_service128_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncompleteService128BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_complete_service128_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CompleteService128BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_shortened_local_name(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShortenedLocalName)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_complete_local_name(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CompleteLocalName)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tx_power_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TxPowerLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_slave_connection_interval_range(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SlaveConnectionIntervalRange)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_solicitation16_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceSolicitation16BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_solicitation32_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceSolicitation32BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_solicitation128_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceSolicitation128BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_data16_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceData16BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_data32_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceData32BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_data128_bit_uuids(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceData128BitUuids)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_public_target_address(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PublicTargetAddress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_random_target_address(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RandomTargetAddress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_appearance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Appearance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_advertising_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AdvertisingInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_manufacturer_specific_data(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ManufacturerSpecificData)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IBluetoothLEAdvertisementDataTypesStatics [CLSID_BluetoothLEAdvertisementDataTypes]} + DEFINE_CLSID!(CLSID_BluetoothLEAdvertisementDataTypes = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,65,100,118,101,114,116,105,115,101,109,101,110,116,68,97,116,97,84,121,112,101,115,0]); + RT_ENUM! { enum BluetoothLEAdvertisementPublisherStatus: i32 { + Created (BluetoothLEAdvertisementPublisherStatus_Created) = 0, Waiting (BluetoothLEAdvertisementPublisherStatus_Waiting) = 1, Started (BluetoothLEAdvertisementPublisherStatus_Started) = 2, Stopping (BluetoothLEAdvertisementPublisherStatus_Stopping) = 3, Stopped (BluetoothLEAdvertisementPublisherStatus_Stopped) = 4, Aborted (BluetoothLEAdvertisementPublisherStatus_Aborted) = 5, + }} + DEFINE_IID!(IID_IBluetoothLEAdvertisementPublisherStatusChangedEventArgs, 163757471, 11775, 19235, 134, 238, 13, 20, 251, 148, 174, 174); + RT_INTERFACE!{interface IBluetoothLEAdvertisementPublisherStatusChangedEventArgs(IBluetoothLEAdvertisementPublisherStatusChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementPublisherStatusChangedEventArgs] { + fn get_Status(&mut self, out: *mut BluetoothLEAdvertisementPublisherStatus) -> HRESULT, + fn get_Error(&mut self, out: *mut super::BluetoothError) -> HRESULT + }} + impl IBluetoothLEAdvertisementPublisherStatusChangedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothLEAdvertisementPublisherStatusChangedEventArgs: IBluetoothLEAdvertisementPublisherStatusChangedEventArgs} + DEFINE_IID!(IID_IBluetoothLEAdvertisementPublisherFactory, 1549731422, 47203, 18817, 161, 175, 28, 84, 77, 139, 12, 13); + RT_INTERFACE!{static interface IBluetoothLEAdvertisementPublisherFactory(IBluetoothLEAdvertisementPublisherFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementPublisherFactory] { + fn Create(&mut self, advertisement: *mut BluetoothLEAdvertisement, out: *mut *mut BluetoothLEAdvertisementPublisher) -> HRESULT + }} + impl IBluetoothLEAdvertisementPublisherFactory { + #[inline] pub unsafe fn create(&mut self, advertisement: &BluetoothLEAdvertisement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, advertisement as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothLEAdvertisementPublisher: IBluetoothLEAdvertisementPublisher [IBluetoothLEAdvertisementPublisherFactory] [CLSID_BluetoothLEAdvertisementPublisher]} + DEFINE_CLSID!(CLSID_BluetoothLEAdvertisementPublisher = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,66,108,117,101,116,111,111,116,104,46,65,100,118,101,114,116,105,115,101,109,101,110,116,46,66,108,117,101,116,111,111,116,104,76,69,65,100,118,101,114,116,105,115,101,109,101,110,116,80,117,98,108,105,115,104,101,114,0]); + DEFINE_IID!(IID_IBluetoothLEAdvertisementPublisher, 3454542073, 55802, 17366, 162, 100, 221, 216, 183, 218, 139, 120); + RT_INTERFACE!{interface IBluetoothLEAdvertisementPublisher(IBluetoothLEAdvertisementPublisherVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementPublisher] { + fn get_Status(&mut self, out: *mut BluetoothLEAdvertisementPublisherStatus) -> HRESULT, + fn get_Advertisement(&mut self, out: *mut *mut BluetoothLEAdvertisement) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn add_StatusChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IBluetoothLEAdvertisementPublisher { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_advertisement(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Advertisement)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_status_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_status_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Devices.Bluetooth.Advertisement +pub mod background { // Windows.Devices.Bluetooth.Background +use ::prelude::*; + RT_CLASS!{class RfcommInboundConnectionInformation: IRfcommInboundConnectionInformation} + RT_CLASS!{class RfcommOutboundConnectionInformation: IRfcommOutboundConnectionInformation} + DEFINE_IID!(IID_IRfcommInboundConnectionInformation, 1832809896, 21545, 16473, 146, 227, 30, 139, 101, 82, 135, 7); + RT_INTERFACE!{interface IRfcommInboundConnectionInformation(IRfcommInboundConnectionInformationVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommInboundConnectionInformation] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_SdpRecord(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_SdpRecord(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn get_LocalServiceId(&mut self, out: *mut *mut super::rfcomm::RfcommServiceId) -> HRESULT, + fn put_LocalServiceId(&mut self, value: *mut super::rfcomm::RfcommServiceId) -> HRESULT, + fn get_ServiceCapabilities(&mut self, out: *mut super::BluetoothServiceCapabilities) -> HRESULT, + fn put_ServiceCapabilities(&mut self, value: super::BluetoothServiceCapabilities) -> HRESULT + }} + impl IRfcommInboundConnectionInformation { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_sdp_record(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SdpRecord)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_sdp_record(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_SdpRecord)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_service_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalServiceId)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_local_service_id(&mut self, value: &super::rfcomm::RfcommServiceId) -> Result<()> { + let hr = ((*self.lpVtbl).put_LocalServiceId)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_capabilities(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceCapabilities)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_service_capabilities(&mut self, value: super::BluetoothServiceCapabilities) -> Result<()> { + let hr = ((*self.lpVtbl).put_ServiceCapabilities)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRfcommOutboundConnectionInformation, 2962301563, 62516, 19632, 153, 177, 74, 184, 206, 218, 237, 215); + RT_INTERFACE!{interface IRfcommOutboundConnectionInformation(IRfcommOutboundConnectionInformationVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommOutboundConnectionInformation] { + fn get_RemoteServiceId(&mut self, out: *mut *mut super::rfcomm::RfcommServiceId) -> HRESULT, + fn put_RemoteServiceId(&mut self, value: *mut super::rfcomm::RfcommServiceId) -> HRESULT + }} + impl IRfcommOutboundConnectionInformation { + #[inline] pub unsafe fn get_remote_service_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteServiceId)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_remote_service_id(&mut self, value: &super::rfcomm::RfcommServiceId) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteServiceId)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRfcommConnectionTriggerDetails, 4179784525, 11836, 20220, 171, 89, 252, 92, 249, 111, 151, 227); + RT_INTERFACE!{interface IRfcommConnectionTriggerDetails(IRfcommConnectionTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommConnectionTriggerDetails] { + #[cfg(not(feature="windows.networking"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.networking")] fn get_Socket(&mut self, out: *mut *mut ::rt::gen::windows::networking::sockets::StreamSocket) -> HRESULT, + fn get_Incoming(&mut self, out: *mut bool) -> HRESULT, + fn get_RemoteDevice(&mut self, out: *mut *mut super::BluetoothDevice) -> HRESULT + }} + impl IRfcommConnectionTriggerDetails { + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_socket(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Socket)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_incoming(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Incoming)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteDevice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RfcommConnectionTriggerDetails: IRfcommConnectionTriggerDetails} + DEFINE_IID!(IID_IGattCharacteristicNotificationTriggerDetails, 2610969368, 4076, 17258, 147, 177, 244, 108, 105, 117, 50, 162); + RT_INTERFACE!{interface IGattCharacteristicNotificationTriggerDetails(IGattCharacteristicNotificationTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicNotificationTriggerDetails] { + fn get_Characteristic(&mut self, out: *mut *mut super::genericattributeprofile::GattCharacteristic) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Value(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl IGattCharacteristicNotificationTriggerDetails { + #[inline] pub unsafe fn get_characteristic(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Characteristic)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GattCharacteristicNotificationTriggerDetails: IGattCharacteristicNotificationTriggerDetails} + DEFINE_IID!(IID_IBluetoothLEAdvertisementWatcherTriggerDetails, 2816170711, 8791, 20073, 151, 132, 254, 230, 69, 193, 220, 224); + RT_INTERFACE!{interface IBluetoothLEAdvertisementWatcherTriggerDetails(IBluetoothLEAdvertisementWatcherTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementWatcherTriggerDetails] { + fn get_Error(&mut self, out: *mut super::BluetoothError) -> HRESULT, + fn get_Advertisements(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_SignalStrengthFilter(&mut self, out: *mut *mut super::BluetoothSignalStrengthFilter) -> HRESULT + }} + impl IBluetoothLEAdvertisementWatcherTriggerDetails { + #[inline] pub unsafe fn get_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_advertisements(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Advertisements)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_signal_strength_filter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SignalStrengthFilter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothLEAdvertisementWatcherTriggerDetails: IBluetoothLEAdvertisementWatcherTriggerDetails} + DEFINE_IID!(IID_IBluetoothLEAdvertisementPublisherTriggerDetails, 1628359302, 13440, 16841, 169, 24, 125, 218, 223, 32, 126, 0); + RT_INTERFACE!{interface IBluetoothLEAdvertisementPublisherTriggerDetails(IBluetoothLEAdvertisementPublisherTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEAdvertisementPublisherTriggerDetails] { + fn get_Status(&mut self, out: *mut super::advertisement::BluetoothLEAdvertisementPublisherStatus) -> HRESULT, + fn get_Error(&mut self, out: *mut super::BluetoothError) -> HRESULT + }} + impl IBluetoothLEAdvertisementPublisherTriggerDetails { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class BluetoothLEAdvertisementPublisherTriggerDetails: IBluetoothLEAdvertisementPublisherTriggerDetails} +} // Windows.Devices.Bluetooth.Background +} // Windows.Devices.Bluetooth +pub mod enumeration { // Windows.Devices.Enumeration +use ::prelude::*; + DEFINE_IID!(IID_IDeviceConnectionChangeTriggerDetails, 3092745228, 48065, 18507, 191, 250, 123, 49, 220, 194, 0, 178); + RT_INTERFACE!{interface IDeviceConnectionChangeTriggerDetails(IDeviceConnectionChangeTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceConnectionChangeTriggerDetails] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IDeviceConnectionChangeTriggerDetails { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DeviceConnectionChangeTriggerDetails: IDeviceConnectionChangeTriggerDetails} + RT_ENUM! { enum DevicePickerDisplayStatusOptions: u32 { + None (DevicePickerDisplayStatusOptions_None) = 0, ShowProgress (DevicePickerDisplayStatusOptions_ShowProgress) = 1, ShowDisconnectButton (DevicePickerDisplayStatusOptions_ShowDisconnectButton) = 2, ShowRetryButton (DevicePickerDisplayStatusOptions_ShowRetryButton) = 4, + }} + DEFINE_IID!(IID_IDevicePickerAppearance, 3868857030, 58919, 20184, 155, 108, 70, 10, 244, 69, 229, 109); + RT_INTERFACE!{interface IDevicePickerAppearance(IDevicePickerAppearanceVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePickerAppearance] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_ForegroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_ForegroundColor(&mut self, value: super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_BackgroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_BackgroundColor(&mut self, value: super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_AccentColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_AccentColor(&mut self, value: super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_SelectedForegroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_SelectedForegroundColor(&mut self, value: super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_SelectedBackgroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_SelectedBackgroundColor(&mut self, value: super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_SelectedAccentColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_SelectedAccentColor(&mut self, value: super::super::ui::Color) -> HRESULT + }} + impl IDevicePickerAppearance { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_foreground_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ForegroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_foreground_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_ForegroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_background_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BackgroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_background_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_BackgroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_accent_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AccentColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_accent_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_AccentColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_selected_foreground_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedForegroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_selected_foreground_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectedForegroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_selected_background_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedBackgroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_selected_background_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectedBackgroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_selected_accent_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedAccentColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_selected_accent_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectedAccentColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DevicePickerAppearance: IDevicePickerAppearance} + DEFINE_IID!(IID_IDeviceSelectedEventArgs, 647944926, 7471, 18752, 132, 2, 65, 86, 184, 29, 60, 119); + RT_INTERFACE!{interface IDeviceSelectedEventArgs(IDeviceSelectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceSelectedEventArgs] { + fn get_SelectedDevice(&mut self, out: *mut *mut DeviceInformation) -> HRESULT + }} + impl IDeviceSelectedEventArgs { + #[inline] pub unsafe fn get_selected_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectedDevice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DeviceSelectedEventArgs: IDeviceSelectedEventArgs} + DEFINE_IID!(IID_IDeviceDisconnectButtonClickedEventArgs, 2386867565, 63746, 18944, 181, 54, 243, 121, 146, 230, 162, 167); + RT_INTERFACE!{interface IDeviceDisconnectButtonClickedEventArgs(IDeviceDisconnectButtonClickedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceDisconnectButtonClickedEventArgs] { + fn get_Device(&mut self, out: *mut *mut DeviceInformation) -> HRESULT + }} + impl IDeviceDisconnectButtonClickedEventArgs { + #[inline] pub unsafe fn get_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Device)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DeviceDisconnectButtonClickedEventArgs: IDeviceDisconnectButtonClickedEventArgs} + DEFINE_IID!(IID_IDevicePickerFilter, 2447086242, 22475, 18673, 155, 89, 165, 155, 122, 31, 2, 162); + RT_INTERFACE!{interface IDevicePickerFilter(IDevicePickerFilterVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePickerFilter] { + fn get_SupportedDeviceClasses(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_SupportedDeviceSelectors(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IDevicePickerFilter { + #[inline] pub unsafe fn get_supported_device_classes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedDeviceClasses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_device_selectors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedDeviceSelectors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DevicePickerFilter: IDevicePickerFilter} + DEFINE_IID!(IID_IDevicePicker, 2224650914, 842, 17472, 136, 19, 125, 11, 212, 121, 191, 90); + RT_INTERFACE!{interface IDevicePicker(IDevicePickerVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePicker] { + fn get_Filter(&mut self, out: *mut *mut DevicePickerFilter) -> HRESULT, + fn get_Appearance(&mut self, out: *mut *mut DevicePickerAppearance) -> HRESULT, + fn get_RequestedProperties(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn add_DeviceSelected(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeviceSelected(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DisconnectButtonClicked(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DisconnectButtonClicked(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DevicePickerDismissed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DevicePickerDismissed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn Show(&mut self, selection: super::super::foundation::Rect) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowWithPlacement(&mut self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement) -> HRESULT, + fn PickSingleDeviceAsync(&mut self, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy12(&mut self) -> (), + #[cfg(feature="windows.ui")] fn PickSingleDeviceAsyncWithPlacement(&mut self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn Hide(&mut self) -> HRESULT, + fn SetDisplayStatus(&mut self, device: *mut DeviceInformation, status: HSTRING, options: DevicePickerDisplayStatusOptions) -> HRESULT + }} + impl IDevicePicker { + #[inline] pub unsafe fn get_filter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Filter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_appearance(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Appearance)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_requested_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RequestedProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_device_selected(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DeviceSelected)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_device_selected(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DeviceSelected)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_disconnect_button_clicked(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DisconnectButtonClicked)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_disconnect_button_clicked(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DisconnectButtonClicked)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_device_picker_dismissed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DevicePickerDismissed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_device_picker_dismissed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DevicePickerDismissed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show(&mut self, selection: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).Show)(self, selection); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_with_placement(&mut self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement) -> Result<()> { + let hr = ((*self.lpVtbl).ShowWithPlacement)(self, selection, placement); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn pick_single_device_async(&mut self, selection: super::super::foundation::Rect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickSingleDeviceAsync)(self, selection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn pick_single_device_async_with_placement(&mut self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickSingleDeviceAsyncWithPlacement)(self, selection, placement, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn hide(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Hide)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_status(&mut self, device: &DeviceInformation, status: &HStringArg, options: DevicePickerDisplayStatusOptions) -> Result<()> { + let hr = ((*self.lpVtbl).SetDisplayStatus)(self, device as *const _ as *mut _, status.get(), options); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DevicePicker: IDevicePicker} + RT_ENUM! { enum DeviceClass: i32 { + All (DeviceClass_All) = 0, AudioCapture (DeviceClass_AudioCapture) = 1, AudioRender (DeviceClass_AudioRender) = 2, PortableStorageDevice (DeviceClass_PortableStorageDevice) = 3, VideoCapture (DeviceClass_VideoCapture) = 4, ImageScanner (DeviceClass_ImageScanner) = 5, Location (DeviceClass_Location) = 6, + }} + RT_ENUM! { enum DeviceWatcherStatus: i32 { + Created (DeviceWatcherStatus_Created) = 0, Started (DeviceWatcherStatus_Started) = 1, EnumerationCompleted (DeviceWatcherStatus_EnumerationCompleted) = 2, Stopping (DeviceWatcherStatus_Stopping) = 3, Stopped (DeviceWatcherStatus_Stopped) = 4, Aborted (DeviceWatcherStatus_Aborted) = 5, + }} + #[cfg(feature="windows.storage")] RT_CLASS!{class DeviceThumbnail: super::super::storage::streams::IRandomAccessStreamWithContentType} + #[cfg(not(feature="windows.storage"))] RT_CLASS!{class DeviceThumbnail: IInspectable} + RT_ENUM! { enum Panel: i32 { + Unknown (Panel_Unknown) = 0, Front (Panel_Front) = 1, Back (Panel_Back) = 2, Top (Panel_Top) = 3, Bottom (Panel_Bottom) = 4, Left (Panel_Left) = 5, Right (Panel_Right) = 6, + }} + DEFINE_IID!(IID_IEnclosureLocation, 1110706727, 22544, 17820, 170, 187, 198, 94, 31, 129, 62, 207); + RT_INTERFACE!{interface IEnclosureLocation(IEnclosureLocationVtbl): IInspectable(IInspectableVtbl) [IID_IEnclosureLocation] { + fn get_InDock(&mut self, out: *mut bool) -> HRESULT, + fn get_InLid(&mut self, out: *mut bool) -> HRESULT, + fn get_Panel(&mut self, out: *mut Panel) -> HRESULT + }} + impl IEnclosureLocation { + #[inline] pub unsafe fn get_in_dock(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InDock)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_in_lid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InLid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_panel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Panel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEnclosureLocation2, 679844187, 57469, 18525, 138, 158, 189, 242, 154, 239, 79, 102); + RT_INTERFACE!{interface IEnclosureLocation2(IEnclosureLocation2Vtbl): IInspectable(IInspectableVtbl) [IID_IEnclosureLocation2] { + fn get_RotationAngleInDegreesClockwise(&mut self, out: *mut u32) -> HRESULT + }} + impl IEnclosureLocation2 { + #[inline] pub unsafe fn get_rotation_angle_in_degrees_clockwise(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RotationAngleInDegreesClockwise)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class EnclosureLocation: IEnclosureLocation} + RT_ENUM! { enum DeviceInformationKind: i32 { + Unknown (DeviceInformationKind_Unknown) = 0, DeviceInterface (DeviceInformationKind_DeviceInterface) = 1, DeviceContainer (DeviceInformationKind_DeviceContainer) = 2, Device (DeviceInformationKind_Device) = 3, DeviceInterfaceClass (DeviceInformationKind_DeviceInterfaceClass) = 4, AssociationEndpoint (DeviceInformationKind_AssociationEndpoint) = 5, AssociationEndpointContainer (DeviceInformationKind_AssociationEndpointContainer) = 6, AssociationEndpointService (DeviceInformationKind_AssociationEndpointService) = 7, + }} + DEFINE_IID!(IID_IDeviceInformationUpdate, 2402374405, 55666, 17591, 163, 126, 158, 130, 44, 120, 33, 59); + RT_INTERFACE!{interface IDeviceInformationUpdate(IDeviceInformationUpdateVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationUpdate] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + }} + impl IDeviceInformationUpdate { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDeviceInformationUpdate2, 1570575500, 43123, 18526, 186, 166, 170, 98, 7, 136, 227, 204); + RT_INTERFACE!{interface IDeviceInformationUpdate2(IDeviceInformationUpdate2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationUpdate2] { + fn get_Kind(&mut self, out: *mut DeviceInformationKind) -> HRESULT + }} + impl IDeviceInformationUpdate2 { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class DeviceInformationUpdate: IDeviceInformationUpdate} + RT_CLASS!{class DeviceInformationCollection: super::super::foundation::collections::IVectorView} + DEFINE_IID!(IID_IDeviceWatcher, 3387603325, 36715, 20374, 169, 244, 171, 200, 20, 226, 34, 113); + RT_INTERFACE!{interface IDeviceWatcher(IDeviceWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceWatcher] { + fn add_Added(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Status(&mut self, out: *mut DeviceWatcherStatus) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IDeviceWatcher { + #[inline] pub unsafe fn add_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Added)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Added)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Updated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Updated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Removed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Removed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DeviceWatcher: IDeviceWatcher} + RT_CLASS!{class DeviceInformation: IDeviceInformation} + RT_ACTIVATABLE!{IDeviceInformationStatics [CLSID_DeviceInformation]} + RT_ACTIVATABLE!{IDeviceInformationStatics2 [CLSID_DeviceInformation]} + DEFINE_CLSID!(CLSID_DeviceInformation = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,69,110,117,109,101,114,97,116,105,111,110,46,68,101,118,105,99,101,73,110,102,111,114,109,97,116,105,111,110,0]); + RT_ENUM! { enum DeviceWatcherEventKind: i32 { + Add (DeviceWatcherEventKind_Add) = 0, Update (DeviceWatcherEventKind_Update) = 1, Remove (DeviceWatcherEventKind_Remove) = 2, + }} + DEFINE_IID!(IID_IDeviceWatcher2, 4278732142, 60692, 18921, 154, 105, 129, 23, 197, 74, 233, 113); + RT_INTERFACE!{interface IDeviceWatcher2(IDeviceWatcher2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceWatcher2] { + #[cfg(feature="windows.applicationmodel")] fn GetBackgroundTrigger(&mut self, requestedEventKinds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::applicationmodel::background::DeviceWatcherTrigger) -> HRESULT + }} + impl IDeviceWatcher2 { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_background_trigger(&mut self, requestedEventKinds: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBackgroundTrigger)(self, requestedEventKinds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDeviceInformationStatics, 3246329870, 14918, 19064, 128, 19, 118, 157, 201, 185, 115, 144); + RT_INTERFACE!{static interface IDeviceInformationStatics(IDeviceInformationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationStatics] { + fn CreateFromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFromIdAsyncAdditionalProperties(&mut self, deviceId: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsyncDeviceClass(&mut self, deviceClass: DeviceClass, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsyncAqsFilter(&mut self, aqsFilter: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsyncAqsFilterAndAdditionalProperties(&mut self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateWatcher(&mut self, out: *mut *mut DeviceWatcher) -> HRESULT, + fn CreateWatcherDeviceClass(&mut self, deviceClass: DeviceClass, out: *mut *mut DeviceWatcher) -> HRESULT, + fn CreateWatcherAqsFilter(&mut self, aqsFilter: HSTRING, out: *mut *mut DeviceWatcher) -> HRESULT, + fn CreateWatcherAqsFilterAndAdditionalProperties(&mut self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut DeviceWatcher) -> HRESULT + }} + impl IDeviceInformationStatics { + #[inline] pub unsafe fn create_from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_id_async_additional_properties(&mut self, deviceId: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromIdAsyncAdditionalProperties)(self, deviceId.get(), additionalProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async_device_class(&mut self, deviceClass: DeviceClass) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsyncDeviceClass)(self, deviceClass, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async_aqs_filter(&mut self, aqsFilter: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsyncAqsFilter)(self, aqsFilter.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async_aqs_filter_and_additional_properties(&mut self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsyncAqsFilterAndAdditionalProperties)(self, aqsFilter.get(), additionalProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_watcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_watcher_device_class(&mut self, deviceClass: DeviceClass) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcherDeviceClass)(self, deviceClass, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_watcher_aqs_filter(&mut self, aqsFilter: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcherAqsFilter)(self, aqsFilter.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_watcher_aqs_filter_and_additional_properties(&mut self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcherAqsFilterAndAdditionalProperties)(self, aqsFilter.get(), additionalProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDeviceInformationStatics2, 1228623668, 43087, 17917, 145, 103, 21, 209, 203, 27, 209, 249); + RT_INTERFACE!{static interface IDeviceInformationStatics2(IDeviceInformationStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationStatics2] { + fn GetAqsFilterFromDeviceClass(&mut self, deviceClass: DeviceClass, out: *mut HSTRING) -> HRESULT, + fn CreateFromIdAsyncWithKindAndAdditionalProperties(&mut self, deviceId: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsyncWithKindAqsFilterAndAdditionalProperties(&mut self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateWatcherWithKindAqsFilterAndAdditionalProperties(&mut self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut DeviceWatcher) -> HRESULT + }} + impl IDeviceInformationStatics2 { + #[inline] pub unsafe fn get_aqs_filter_from_device_class(&mut self, deviceClass: DeviceClass) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAqsFilterFromDeviceClass)(self, deviceClass, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_id_async_with_kind_and_additional_properties(&mut self, deviceId: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromIdAsyncWithKindAndAdditionalProperties)(self, deviceId.get(), additionalProperties as *const _ as *mut _, kind, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async_with_kind_aqs_filter_and_additional_properties(&mut self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsyncWithKindAqsFilterAndAdditionalProperties)(self, aqsFilter.get(), additionalProperties as *const _ as *mut _, kind, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_watcher_with_kind_aqs_filter_and_additional_properties(&mut self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcherWithKindAqsFilterAndAdditionalProperties)(self, aqsFilter.get(), additionalProperties as *const _ as *mut _, kind, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDeviceInformation, 2879454101, 17304, 18589, 142, 68, 230, 19, 9, 39, 1, 31); + RT_INTERFACE!{interface IDeviceInformation(IDeviceInformationVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformation] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDefault(&mut self, out: *mut bool) -> HRESULT, + fn get_EnclosureLocation(&mut self, out: *mut *mut EnclosureLocation) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn Update(&mut self, updateInfo: *mut DeviceInformationUpdate) -> HRESULT, + fn GetThumbnailAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetGlyphThumbnailAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IDeviceInformation { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_default(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDefault)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_enclosure_location(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EnclosureLocation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update(&mut self, updateInfo: &DeviceInformationUpdate) -> Result<()> { + let hr = ((*self.lpVtbl).Update)(self, updateInfo as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetThumbnailAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_glyph_thumbnail_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetGlyphThumbnailAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum DevicePairingKinds: u32 { + None (DevicePairingKinds_None) = 0, ConfirmOnly (DevicePairingKinds_ConfirmOnly) = 1, DisplayPin (DevicePairingKinds_DisplayPin) = 2, ProvidePin (DevicePairingKinds_ProvidePin) = 4, ConfirmPinMatch (DevicePairingKinds_ConfirmPinMatch) = 8, + }} + RT_ENUM! { enum DevicePairingResultStatus: i32 { + Paired (DevicePairingResultStatus_Paired) = 0, NotReadyToPair (DevicePairingResultStatus_NotReadyToPair) = 1, NotPaired (DevicePairingResultStatus_NotPaired) = 2, AlreadyPaired (DevicePairingResultStatus_AlreadyPaired) = 3, ConnectionRejected (DevicePairingResultStatus_ConnectionRejected) = 4, TooManyConnections (DevicePairingResultStatus_TooManyConnections) = 5, HardwareFailure (DevicePairingResultStatus_HardwareFailure) = 6, AuthenticationTimeout (DevicePairingResultStatus_AuthenticationTimeout) = 7, AuthenticationNotAllowed (DevicePairingResultStatus_AuthenticationNotAllowed) = 8, AuthenticationFailure (DevicePairingResultStatus_AuthenticationFailure) = 9, NoSupportedProfiles (DevicePairingResultStatus_NoSupportedProfiles) = 10, ProtectionLevelCouldNotBeMet (DevicePairingResultStatus_ProtectionLevelCouldNotBeMet) = 11, AccessDenied (DevicePairingResultStatus_AccessDenied) = 12, InvalidCeremonyData (DevicePairingResultStatus_InvalidCeremonyData) = 13, PairingCanceled (DevicePairingResultStatus_PairingCanceled) = 14, OperationAlreadyInProgress (DevicePairingResultStatus_OperationAlreadyInProgress) = 15, RequiredHandlerNotRegistered (DevicePairingResultStatus_RequiredHandlerNotRegistered) = 16, RejectedByHandler (DevicePairingResultStatus_RejectedByHandler) = 17, RemoteDeviceHasAssociation (DevicePairingResultStatus_RemoteDeviceHasAssociation) = 18, Failed (DevicePairingResultStatus_Failed) = 19, + }} + RT_ENUM! { enum DeviceUnpairingResultStatus: i32 { + Unpaired (DeviceUnpairingResultStatus_Unpaired) = 0, AlreadyUnpaired (DeviceUnpairingResultStatus_AlreadyUnpaired) = 1, OperationAlreadyInProgress (DeviceUnpairingResultStatus_OperationAlreadyInProgress) = 2, AccessDenied (DeviceUnpairingResultStatus_AccessDenied) = 3, Failed (DeviceUnpairingResultStatus_Failed) = 4, + }} + RT_ENUM! { enum DevicePairingProtectionLevel: i32 { + Default (DevicePairingProtectionLevel_Default) = 0, None (DevicePairingProtectionLevel_None) = 1, Encryption (DevicePairingProtectionLevel_Encryption) = 2, EncryptionAndAuthentication (DevicePairingProtectionLevel_EncryptionAndAuthentication) = 3, + }} + DEFINE_IID!(IID_IDevicePairingResult, 120259263, 56725, 16421, 155, 55, 222, 81, 173, 186, 55, 183); + RT_INTERFACE!{interface IDevicePairingResult(IDevicePairingResultVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePairingResult] { + fn get_Status(&mut self, out: *mut DevicePairingResultStatus) -> HRESULT, + fn get_ProtectionLevelUsed(&mut self, out: *mut DevicePairingProtectionLevel) -> HRESULT + }} + impl IDevicePairingResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_protection_level_used(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtectionLevelUsed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class DevicePairingResult: IDevicePairingResult} + DEFINE_IID!(IID_IDeviceUnpairingResult, 1727285971, 31193, 17483, 146, 207, 169, 46, 247, 37, 113, 199); + RT_INTERFACE!{interface IDeviceUnpairingResult(IDeviceUnpairingResultVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceUnpairingResult] { + fn get_Status(&mut self, out: *mut DeviceUnpairingResultStatus) -> HRESULT + }} + impl IDeviceUnpairingResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class DeviceUnpairingResult: IDeviceUnpairingResult} + DEFINE_IID!(IID_IDevicePairingSettings, 1210888828, 33723, 16910, 190, 81, 102, 2, 178, 34, 222, 84); + RT_INTERFACE!{interface IDevicePairingSettings(IDevicePairingSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePairingSettings] { + + }} + DEFINE_IID!(IID_IDevicePairingRequestedEventArgs, 4145544278, 56939, 18559, 131, 118, 1, 128, 172, 166, 153, 99); + RT_INTERFACE!{interface IDevicePairingRequestedEventArgs(IDevicePairingRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePairingRequestedEventArgs] { + fn get_DeviceInformation(&mut self, out: *mut *mut DeviceInformation) -> HRESULT, + fn get_PairingKind(&mut self, out: *mut DevicePairingKinds) -> HRESULT, + fn get_Pin(&mut self, out: *mut HSTRING) -> HRESULT, + fn Accept(&mut self) -> HRESULT, + fn AcceptWithPin(&mut self, pin: HSTRING) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IDevicePairingRequestedEventArgs { + #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pairing_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PairingKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pin(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pin)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn accept(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Accept)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn accept_with_pin(&mut self, pin: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AcceptWithPin)(self, pin.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DevicePairingRequestedEventArgs: IDevicePairingRequestedEventArgs} + DEFINE_IID!(IID_IDeviceInformationCustomPairing, 2232650754, 20198, 18708, 131, 112, 16, 122, 57, 20, 76, 14); + RT_INTERFACE!{interface IDeviceInformationCustomPairing(IDeviceInformationCustomPairingVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationCustomPairing] { + fn PairAsync(&mut self, pairingKindsSupported: DevicePairingKinds, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PairWithProtectionLevelAsync(&mut self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PairWithProtectionLevelAndSettingsAsync(&mut self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: *mut IDevicePairingSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_PairingRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PairingRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IDeviceInformationCustomPairing { + #[inline] pub unsafe fn pair_async(&mut self, pairingKindsSupported: DevicePairingKinds) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PairAsync)(self, pairingKindsSupported, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pair_with_protection_level_async(&mut self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PairWithProtectionLevelAsync)(self, pairingKindsSupported, minProtectionLevel, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pair_with_protection_level_and_settings_async(&mut self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: &IDevicePairingSettings) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PairWithProtectionLevelAndSettingsAsync)(self, pairingKindsSupported, minProtectionLevel, devicePairingSettings as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_pairing_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PairingRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pairing_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PairingRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DeviceInformationCustomPairing: IDeviceInformationCustomPairing} + DEFINE_IID!(IID_IDeviceInformationPairing, 742877685, 63108, 16597, 132, 105, 232, 219, 170, 183, 4, 133); + RT_INTERFACE!{interface IDeviceInformationPairing(IDeviceInformationPairingVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationPairing] { + fn get_IsPaired(&mut self, out: *mut bool) -> HRESULT, + fn get_CanPair(&mut self, out: *mut bool) -> HRESULT, + fn PairAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PairWithProtectionLevelAsync(&mut self, minProtectionLevel: DevicePairingProtectionLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IDeviceInformationPairing { + #[inline] pub unsafe fn get_is_paired(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPaired)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_pair(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanPair)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn pair_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PairAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pair_with_protection_level_async(&mut self, minProtectionLevel: DevicePairingProtectionLevel) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PairWithProtectionLevelAsync)(self, minProtectionLevel, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDeviceInformationPairing2, 4135981821, 2798, 17192, 133, 204, 28, 116, 43, 177, 121, 13); + RT_INTERFACE!{interface IDeviceInformationPairing2(IDeviceInformationPairing2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationPairing2] { + fn get_ProtectionLevel(&mut self, out: *mut DevicePairingProtectionLevel) -> HRESULT, + fn get_Custom(&mut self, out: *mut *mut DeviceInformationCustomPairing) -> HRESULT, + fn PairWithProtectionLevelAndSettingsAsync(&mut self, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: *mut IDevicePairingSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn UnpairAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IDeviceInformationPairing2 { + #[inline] pub unsafe fn get_protection_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtectionLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Custom)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pair_with_protection_level_and_settings_async(&mut self, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: &IDevicePairingSettings) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PairWithProtectionLevelAndSettingsAsync)(self, minProtectionLevel, devicePairingSettings as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn unpair_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnpairAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDeviceInformationPairingStatics, 3910517768, 14036, 18849, 191, 19, 81, 65, 115, 121, 155, 107); + RT_INTERFACE!{static interface IDeviceInformationPairingStatics(IDeviceInformationPairingStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationPairingStatics] { + fn TryRegisterForAllInboundPairingRequests(&mut self, pairingKindsSupported: DevicePairingKinds, out: *mut bool) -> HRESULT + }} + impl IDeviceInformationPairingStatics { + #[inline] pub unsafe fn try_register_for_all_inbound_pairing_requests(&mut self, pairingKindsSupported: DevicePairingKinds) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryRegisterForAllInboundPairingRequests)(self, pairingKindsSupported, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class DeviceInformationPairing: IDeviceInformationPairing} + RT_ACTIVATABLE!{IDeviceInformationPairingStatics [CLSID_DeviceInformationPairing]} + DEFINE_CLSID!(CLSID_DeviceInformationPairing = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,69,110,117,109,101,114,97,116,105,111,110,46,68,101,118,105,99,101,73,110,102,111,114,109,97,116,105,111,110,80,97,105,114,105,110,103,0]); + DEFINE_IID!(IID_IDeviceInformation2, 4048987704, 31127, 18649, 161, 12, 38, 157, 70, 83, 63, 72); + RT_INTERFACE!{interface IDeviceInformation2(IDeviceInformation2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformation2] { + fn get_Kind(&mut self, out: *mut DeviceInformationKind) -> HRESULT, + fn get_Pairing(&mut self, out: *mut *mut DeviceInformationPairing) -> HRESULT + }} + impl IDeviceInformation2 { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pairing(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pairing)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum DeviceAccessStatus: i32 { + Unspecified (DeviceAccessStatus_Unspecified) = 0, Allowed (DeviceAccessStatus_Allowed) = 1, DeniedByUser (DeviceAccessStatus_DeniedByUser) = 2, DeniedBySystem (DeviceAccessStatus_DeniedBySystem) = 3, + }} + DEFINE_IID!(IID_IDeviceAccessChangedEventArgs, 3738831820, 20381, 20312, 157, 186, 169, 188, 128, 4, 8, 213); + RT_INTERFACE!{interface IDeviceAccessChangedEventArgs(IDeviceAccessChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceAccessChangedEventArgs] { + fn get_Status(&mut self, out: *mut DeviceAccessStatus) -> HRESULT + }} + impl IDeviceAccessChangedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDeviceAccessChangedEventArgs2, 2186424930, 37707, 19248, 161, 120, 173, 195, 159, 47, 43, 227); + RT_INTERFACE!{interface IDeviceAccessChangedEventArgs2(IDeviceAccessChangedEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IDeviceAccessChangedEventArgs2] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IDeviceAccessChangedEventArgs2 { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DeviceAccessChangedEventArgs: IDeviceAccessChangedEventArgs} + DEFINE_IID!(IID_IDeviceAccessInformation, 195730035, 28133, 18709, 141, 221, 154, 5, 84, 166, 245, 69); + RT_INTERFACE!{interface IDeviceAccessInformation(IDeviceAccessInformationVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceAccessInformation] { + fn add_AccessChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccessChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_CurrentStatus(&mut self, out: *mut DeviceAccessStatus) -> HRESULT + }} + impl IDeviceAccessInformation { + #[inline] pub unsafe fn add_access_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AccessChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_access_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AccessChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class DeviceAccessInformation: IDeviceAccessInformation} + RT_ACTIVATABLE!{IDeviceAccessInformationStatics [CLSID_DeviceAccessInformation]} + DEFINE_CLSID!(CLSID_DeviceAccessInformation = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,69,110,117,109,101,114,97,116,105,111,110,46,68,101,118,105,99,101,65,99,99,101,115,115,73,110,102,111,114,109,97,116,105,111,110,0]); + DEFINE_IID!(IID_IDeviceAccessInformationStatics, 1464587219, 24368, 17869, 138, 148, 114, 79, 229, 151, 48, 132); + RT_INTERFACE!{static interface IDeviceAccessInformationStatics(IDeviceAccessInformationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceAccessInformationStatics] { + fn CreateFromId(&mut self, deviceId: HSTRING, out: *mut *mut DeviceAccessInformation) -> HRESULT, + fn CreateFromDeviceClassId(&mut self, deviceClassId: Guid, out: *mut *mut DeviceAccessInformation) -> HRESULT, + fn CreateFromDeviceClass(&mut self, deviceClass: DeviceClass, out: *mut *mut DeviceAccessInformation) -> HRESULT + }} + impl IDeviceAccessInformationStatics { + #[inline] pub unsafe fn create_from_id(&mut self, deviceId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromId)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_device_class_id(&mut self, deviceClassId: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromDeviceClassId)(self, deviceClassId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_device_class(&mut self, deviceClass: DeviceClass) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromDeviceClass)(self, deviceClass, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDeviceWatcherEvent, 1957338123, 7613, 18429, 182, 53, 60, 197, 86, 208, 255, 139); + RT_INTERFACE!{interface IDeviceWatcherEvent(IDeviceWatcherEventVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceWatcherEvent] { + fn get_Kind(&mut self, out: *mut DeviceWatcherEventKind) -> HRESULT, + fn get_DeviceInformation(&mut self, out: *mut *mut DeviceInformation) -> HRESULT, + fn get_DeviceInformationUpdate(&mut self, out: *mut *mut DeviceInformationUpdate) -> HRESULT + }} + impl IDeviceWatcherEvent { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_information_update(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceInformationUpdate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DeviceWatcherEvent: IDeviceWatcherEvent} + DEFINE_IID!(IID_IDeviceWatcherTriggerDetails, 947945753, 19639, 20055, 165, 109, 119, 109, 7, 203, 254, 249); + RT_INTERFACE!{interface IDeviceWatcherTriggerDetails(IDeviceWatcherTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceWatcherTriggerDetails] { + fn get_DeviceWatcherEvents(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IDeviceWatcherTriggerDetails { + #[inline] pub unsafe fn get_device_watcher_events(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceWatcherEvents)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DeviceWatcherTriggerDetails: IDeviceWatcherTriggerDetails} +pub mod pnp { // Windows.Devices.Enumeration.Pnp +use ::prelude::*; + RT_ENUM! { enum PnpObjectType: i32 { + Unknown (PnpObjectType_Unknown) = 0, DeviceInterface (PnpObjectType_DeviceInterface) = 1, DeviceContainer (PnpObjectType_DeviceContainer) = 2, Device (PnpObjectType_Device) = 3, DeviceInterfaceClass (PnpObjectType_DeviceInterfaceClass) = 4, AssociationEndpoint (PnpObjectType_AssociationEndpoint) = 5, AssociationEndpointContainer (PnpObjectType_AssociationEndpointContainer) = 6, AssociationEndpointService (PnpObjectType_AssociationEndpointService) = 7, + }} + DEFINE_IID!(IID_IPnpObjectUpdate, 1868163090, 30, 18500, 188, 198, 67, 40, 134, 133, 106, 23); + RT_INTERFACE!{interface IPnpObjectUpdate(IPnpObjectUpdateVtbl): IInspectable(IInspectableVtbl) [IID_IPnpObjectUpdate] { + fn get_Type(&mut self, out: *mut PnpObjectType) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT + }} + impl IPnpObjectUpdate { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PnpObjectUpdate: IPnpObjectUpdate} + RT_CLASS!{class PnpObjectCollection: ::rt::gen::windows::foundation::collections::IVectorView} + DEFINE_IID!(IID_IPnpObjectWatcher, 2211011752, 18290, 19066, 172, 168, 228, 140, 66, 168, 156, 68); + RT_INTERFACE!{interface IPnpObjectWatcher(IPnpObjectWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IPnpObjectWatcher] { + fn add_Added(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_Status(&mut self, out: *mut super::DeviceWatcherStatus) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IPnpObjectWatcher { + #[inline] pub unsafe fn add_added(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Added)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_added(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Added)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_updated(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Updated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_updated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Updated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_removed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Removed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_removed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Removed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PnpObjectWatcher: IPnpObjectWatcher} + RT_CLASS!{class PnpObject: IPnpObject} + RT_ACTIVATABLE!{IPnpObjectStatics [CLSID_PnpObject]} + DEFINE_CLSID!(CLSID_PnpObject = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,69,110,117,109,101,114,97,116,105,111,110,46,80,110,112,46,80,110,112,79,98,106,101,99,116,0]); + DEFINE_IID!(IID_IPnpObjectStatics, 3015911997, 53608, 18016, 187, 243, 167, 51, 177, 75, 110, 1); + RT_INTERFACE!{static interface IPnpObjectStatics(IPnpObjectStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPnpObjectStatics] { + fn CreateFromIdAsync(&mut self, type_: PnpObjectType, id: HSTRING, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsync(&mut self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsyncAqsFilter(&mut self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, aqsFilter: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn CreateWatcher(&mut self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut PnpObjectWatcher) -> HRESULT, + fn CreateWatcherAqsFilter(&mut self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, aqsFilter: HSTRING, out: *mut *mut PnpObjectWatcher) -> HRESULT + }} + impl IPnpObjectStatics { + #[inline] pub unsafe fn create_from_id_async(&mut self, type_: PnpObjectType, id: &HStringArg, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromIdAsync)(self, type_, id.get(), requestedProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async(&mut self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsync)(self, type_, requestedProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async_aqs_filter(&mut self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsyncAqsFilter)(self, type_, requestedProperties as *const _ as *mut _, aqsFilter.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_watcher(&mut self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcher)(self, type_, requestedProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_watcher_aqs_filter(&mut self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcherAqsFilter)(self, type_, requestedProperties as *const _ as *mut _, aqsFilter.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPnpObject, 2512806488, 29499, 19087, 147, 163, 219, 7, 138, 200, 112, 193); + RT_INTERFACE!{interface IPnpObject(IPnpObjectVtbl): IInspectable(IInspectableVtbl) [IID_IPnpObject] { + fn get_Type(&mut self, out: *mut PnpObjectType) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn Update(&mut self, updateInfo: *mut PnpObjectUpdate) -> HRESULT + }} + impl IPnpObject { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update(&mut self, updateInfo: &PnpObjectUpdate) -> Result<()> { + let hr = ((*self.lpVtbl).Update)(self, updateInfo as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Devices.Enumeration.Pnp +} // Windows.Devices.Enumeration +pub mod geolocation { // Windows.Devices.Geolocation +use ::prelude::*; + RT_ENUM! { enum PositionAccuracy: i32 { + Default (PositionAccuracy_Default) = 0, High (PositionAccuracy_High) = 1, + }} + RT_ENUM! { enum PositionStatus: i32 { + Ready (PositionStatus_Ready) = 0, Initializing (PositionStatus_Initializing) = 1, NoData (PositionStatus_NoData) = 2, Disabled (PositionStatus_Disabled) = 3, NotInitialized (PositionStatus_NotInitialized) = 4, NotAvailable (PositionStatus_NotAvailable) = 5, + }} + RT_ENUM! { enum PositionSource: i32 { + Cellular (PositionSource_Cellular) = 0, Satellite (PositionSource_Satellite) = 1, WiFi (PositionSource_WiFi) = 2, IPAddress (PositionSource_IPAddress) = 3, Unknown (PositionSource_Unknown) = 4, Default (PositionSource_Default) = 5, Obfuscated (PositionSource_Obfuscated) = 6, + }} + RT_ENUM! { enum GeoshapeType: i32 { + Geopoint (GeoshapeType_Geopoint) = 0, Geocircle (GeoshapeType_Geocircle) = 1, Geopath (GeoshapeType_Geopath) = 2, GeoboundingBox (GeoshapeType_GeoboundingBox) = 3, + }} + RT_ENUM! { enum AltitudeReferenceSystem: i32 { + Unspecified (AltitudeReferenceSystem_Unspecified) = 0, Terrain (AltitudeReferenceSystem_Terrain) = 1, Ellipsoid (AltitudeReferenceSystem_Ellipsoid) = 2, Geoid (AltitudeReferenceSystem_Geoid) = 3, Surface (AltitudeReferenceSystem_Surface) = 4, + }} + RT_STRUCT! { struct BasicGeoposition { + Latitude: f64, Longitude: f64, Altitude: f64, + }} + RT_ENUM! { enum GeolocationAccessStatus: i32 { + Unspecified (GeolocationAccessStatus_Unspecified) = 0, Allowed (GeolocationAccessStatus_Allowed) = 1, Denied (GeolocationAccessStatus_Denied) = 2, + }} + DEFINE_IID!(IID_IGeoshape, 3382485679, 50985, 17345, 143, 171, 214, 222, 201, 20, 223, 126); + RT_INTERFACE!{interface IGeoshape(IGeoshapeVtbl): IInspectable(IInspectableVtbl) [IID_IGeoshape] { + fn get_GeoshapeType(&mut self, out: *mut GeoshapeType) -> HRESULT, + fn get_SpatialReferenceId(&mut self, out: *mut u32) -> HRESULT, + fn get_AltitudeReferenceSystem(&mut self, out: *mut AltitudeReferenceSystem) -> HRESULT + }} + impl IGeoshape { + #[inline] pub unsafe fn get_geoshape_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GeoshapeType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_spatial_reference_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpatialReferenceId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_altitude_reference_system(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AltitudeReferenceSystem)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeopoint, 1811546347, 58734, 18875, 156, 175, 203, 170, 120, 168, 188, 239); + RT_INTERFACE!{interface IGeopoint(IGeopointVtbl): IInspectable(IInspectableVtbl) [IID_IGeopoint] { + fn get_Position(&mut self, out: *mut BasicGeoposition) -> HRESULT + }} + impl IGeopoint { + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeopointFactory, 3681258803, 30397, 20016, 138, 247, 168, 68, 220, 55, 183, 160); + RT_INTERFACE!{static interface IGeopointFactory(IGeopointFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGeopointFactory] { + fn Create(&mut self, position: BasicGeoposition, out: *mut *mut Geopoint) -> HRESULT, + fn CreateWithAltitudeReferenceSystem(&mut self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, out: *mut *mut Geopoint) -> HRESULT, + fn CreateWithAltitudeReferenceSystemAndSpatialReferenceId(&mut self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut Geopoint) -> HRESULT + }} + impl IGeopointFactory { + #[inline] pub unsafe fn create(&mut self, position: BasicGeoposition) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, position, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_altitude_reference_system(&mut self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystem)(self, position, altitudeReferenceSystem, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_altitude_reference_system_and_spatial_reference_id(&mut self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystemAndSpatialReferenceId)(self, position, altitudeReferenceSystem, spatialReferenceId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Geopoint: IGeopoint [IGeopointFactory] [CLSID_Geopoint]} + DEFINE_CLSID!(CLSID_Geopoint = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,112,111,105,110,116,0]); + DEFINE_IID!(IID_IGeopath, 3846166457, 11684, 18196, 166, 82, 222, 133, 147, 40, 152, 152); + RT_INTERFACE!{interface IGeopath(IGeopathVtbl): IInspectable(IInspectableVtbl) [IID_IGeopath] { + fn get_Positions(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IGeopath { + #[inline] pub unsafe fn get_positions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Positions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeopathFactory, 666806728, 51175, 17241, 155, 155, 252, 163, 224, 94, 245, 147); + RT_INTERFACE!{static interface IGeopathFactory(IGeopathFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGeopathFactory] { + fn Create(&mut self, positions: *mut super::super::foundation::collections::IIterable, out: *mut *mut Geopath) -> HRESULT, + fn CreateWithAltitudeReference(&mut self, positions: *mut super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, out: *mut *mut Geopath) -> HRESULT, + fn CreateWithAltitudeReferenceAndSpatialReference(&mut self, positions: *mut super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut Geopath) -> HRESULT + }} + impl IGeopathFactory { + #[inline] pub unsafe fn create(&mut self, positions: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, positions as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_altitude_reference(&mut self, positions: &super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithAltitudeReference)(self, positions as *const _ as *mut _, altitudeReferenceSystem, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_altitude_reference_and_spatial_reference(&mut self, positions: &super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceAndSpatialReference)(self, positions as *const _ as *mut _, altitudeReferenceSystem, spatialReferenceId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Geopath: IGeopath [IGeopathFactory] [CLSID_Geopath]} + DEFINE_CLSID!(CLSID_Geopath = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,112,97,116,104,0]); + DEFINE_IID!(IID_IGeoboundingBox, 144099339, 10063, 17370, 154, 6, 203, 252, 218, 235, 78, 194); + RT_INTERFACE!{interface IGeoboundingBox(IGeoboundingBoxVtbl): IInspectable(IInspectableVtbl) [IID_IGeoboundingBox] { + fn get_NorthwestCorner(&mut self, out: *mut BasicGeoposition) -> HRESULT, + fn get_SoutheastCorner(&mut self, out: *mut BasicGeoposition) -> HRESULT, + fn get_Center(&mut self, out: *mut BasicGeoposition) -> HRESULT, + fn get_MinAltitude(&mut self, out: *mut f64) -> HRESULT, + fn get_MaxAltitude(&mut self, out: *mut f64) -> HRESULT + }} + impl IGeoboundingBox { + #[inline] pub unsafe fn get_northwest_corner(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NorthwestCorner)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_southeast_corner(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SoutheastCorner)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_center(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Center)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_altitude(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinAltitude)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_altitude(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxAltitude)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeoboundingBoxFactory, 1308337545, 1041, 19132, 179, 181, 91, 188, 203, 87, 217, 140); + RT_INTERFACE!{static interface IGeoboundingBoxFactory(IGeoboundingBoxFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGeoboundingBoxFactory] { + fn Create(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, out: *mut *mut GeoboundingBox) -> HRESULT, + fn CreateWithAltitudeReference(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, out: *mut *mut GeoboundingBox) -> HRESULT, + fn CreateWithAltitudeReferenceAndSpatialReference(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut GeoboundingBox) -> HRESULT + }} + impl IGeoboundingBoxFactory { + #[inline] pub unsafe fn create(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, northwestCorner, southeastCorner, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_altitude_reference(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithAltitudeReference)(self, northwestCorner, southeastCorner, altitudeReferenceSystem, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_altitude_reference_and_spatial_reference(&mut self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceAndSpatialReference)(self, northwestCorner, southeastCorner, altitudeReferenceSystem, spatialReferenceId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GeoboundingBox: IGeoboundingBox [IGeoboundingBoxFactory] [CLSID_GeoboundingBox]} + RT_ACTIVATABLE!{IGeoboundingBoxStatics [CLSID_GeoboundingBox]} + DEFINE_CLSID!(CLSID_GeoboundingBox = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,98,111,117,110,100,105,110,103,66,111,120,0]); + DEFINE_IID!(IID_IGeoboundingBoxStatics, 1740113672, 58906, 19664, 132, 27, 147, 35, 55, 146, 181, 202); + RT_INTERFACE!{static interface IGeoboundingBoxStatics(IGeoboundingBoxStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGeoboundingBoxStatics] { + fn TryCompute(&mut self, positions: *mut super::super::foundation::collections::IIterable, out: *mut *mut GeoboundingBox) -> HRESULT, + fn TryComputeWithAltitudeReference(&mut self, positions: *mut super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, out: *mut *mut GeoboundingBox) -> HRESULT, + fn TryComputeWithAltitudeReferenceAndSpatialReference(&mut self, positions: *mut super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut GeoboundingBox) -> HRESULT + }} + impl IGeoboundingBoxStatics { + #[inline] pub unsafe fn try_compute(&mut self, positions: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryCompute)(self, positions as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_compute_with_altitude_reference(&mut self, positions: &super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryComputeWithAltitudeReference)(self, positions as *const _ as *mut _, altitudeRefSystem, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_compute_with_altitude_reference_and_spatial_reference(&mut self, positions: &super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryComputeWithAltitudeReferenceAndSpatialReference)(self, positions as *const _ as *mut _, altitudeRefSystem, spatialReferenceId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeocoordinateSatelliteData, 3274339545, 9736, 18252, 145, 44, 6, 221, 73, 15, 74, 247); + RT_INTERFACE!{interface IGeocoordinateSatelliteData(IGeocoordinateSatelliteDataVtbl): IInspectable(IInspectableVtbl) [IID_IGeocoordinateSatelliteData] { + fn get_PositionDilutionOfPrecision(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_HorizontalDilutionOfPrecision(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_VerticalDilutionOfPrecision(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IGeocoordinateSatelliteData { + #[inline] pub unsafe fn get_position_dilution_of_precision(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PositionDilutionOfPrecision)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_horizontal_dilution_of_precision(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HorizontalDilutionOfPrecision)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_dilution_of_precision(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VerticalDilutionOfPrecision)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GeocoordinateSatelliteData: IGeocoordinateSatelliteData} + DEFINE_IID!(IID_IVenueData, 1727238535, 24803, 19247, 181, 39, 79, 83, 241, 195, 198, 119); + RT_INTERFACE!{interface IVenueData(IVenueDataVtbl): IInspectable(IInspectableVtbl) [IID_IVenueData] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Level(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IVenueData { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_level(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Level)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VenueData: IVenueData} + DEFINE_IID!(IID_IGeocoordinate, 3995181994, 38762, 19568, 128, 61, 8, 62, 165, 91, 203, 196); + RT_INTERFACE!{interface IGeocoordinate(IGeocoordinateVtbl): IInspectable(IInspectableVtbl) [IID_IGeocoordinate] { + fn get_Latitude(&mut self, out: *mut f64) -> HRESULT, + fn get_Longitude(&mut self, out: *mut f64) -> HRESULT, + fn get_Altitude(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Accuracy(&mut self, out: *mut f64) -> HRESULT, + fn get_AltitudeAccuracy(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Heading(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Speed(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT + }} + impl IGeocoordinate { + #[inline] pub unsafe fn get_latitude(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Latitude)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_longitude(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Longitude)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_altitude(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Altitude)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_accuracy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Accuracy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_altitude_accuracy(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AltitudeAccuracy)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_heading(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Heading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_speed(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Speed)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeocoordinateWithPositionData, 2514891966, 56278, 16556, 184, 242, 166, 92, 3, 64, 217, 166); + RT_INTERFACE!{interface IGeocoordinateWithPositionData(IGeocoordinateWithPositionDataVtbl): IInspectable(IInspectableVtbl) [IID_IGeocoordinateWithPositionData] { + fn get_PositionSource(&mut self, out: *mut PositionSource) -> HRESULT, + fn get_SatelliteData(&mut self, out: *mut *mut GeocoordinateSatelliteData) -> HRESULT + }} + impl IGeocoordinateWithPositionData { + #[inline] pub unsafe fn get_position_source(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionSource)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_satellite_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SatelliteData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeocoordinateWithPoint, 4276749605, 53804, 19782, 181, 39, 11, 150, 6, 111, 199, 219); + RT_INTERFACE!{interface IGeocoordinateWithPoint(IGeocoordinateWithPointVtbl): IInspectable(IInspectableVtbl) [IID_IGeocoordinateWithPoint] { + fn get_Point(&mut self, out: *mut *mut Geopoint) -> HRESULT + }} + impl IGeocoordinateWithPoint { + #[inline] pub unsafe fn get_point(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Point)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeocoordinateWithPositionSourceTimestamp, 2235825154, 51697, 17936, 175, 224, 139, 195, 166, 168, 112, 54); + RT_INTERFACE!{interface IGeocoordinateWithPositionSourceTimestamp(IGeocoordinateWithPositionSourceTimestampVtbl): IInspectable(IInspectableVtbl) [IID_IGeocoordinateWithPositionSourceTimestamp] { + fn get_PositionSourceTimestamp(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IGeocoordinateWithPositionSourceTimestamp { + #[inline] pub unsafe fn get_position_source_timestamp(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PositionSourceTimestamp)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeoposition, 3247244372, 32065, 20471, 169, 87, 157, 255, 180, 239, 127, 91); + RT_INTERFACE!{interface IGeoposition(IGeopositionVtbl): IInspectable(IInspectableVtbl) [IID_IGeoposition] { + fn get_Coordinate(&mut self, out: *mut *mut Geocoordinate) -> HRESULT, + fn get_CivicAddress(&mut self, out: *mut *mut CivicAddress) -> HRESULT + }} + impl IGeoposition { + #[inline] pub unsafe fn get_coordinate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Coordinate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_civic_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CivicAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeoposition2, 2137192087, 34417, 19213, 134, 248, 71, 74, 132, 150, 24, 124); + RT_INTERFACE!{interface IGeoposition2(IGeoposition2Vtbl): IInspectable(IInspectableVtbl) [IID_IGeoposition2] { + fn get_VenueData(&mut self, out: *mut *mut VenueData) -> HRESULT + }} + impl IGeoposition2 { + #[inline] pub unsafe fn get_venue_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VenueData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Geocoordinate: IGeocoordinate} + RT_CLASS!{class CivicAddress: ICivicAddress} + DEFINE_IID!(IID_ICivicAddress, 2824239642, 25844, 19784, 188, 234, 246, 176, 8, 236, 163, 76); + RT_INTERFACE!{interface ICivicAddress(ICivicAddressVtbl): IInspectable(IInspectableVtbl) [IID_ICivicAddress] { + fn get_Country(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_State(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_City(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PostalCode(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT + }} + impl ICivicAddress { + #[inline] pub unsafe fn get_country(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Country)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_city(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_City)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_postal_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PostalCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class Geoposition: IGeoposition} + DEFINE_IID!(IID_IPositionChangedEventArgs, 931503333, 40222, 18117, 191, 59, 106, 216, 202, 193, 160, 147); + RT_INTERFACE!{interface IPositionChangedEventArgs(IPositionChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPositionChangedEventArgs] { + fn get_Position(&mut self, out: *mut *mut Geoposition) -> HRESULT + }} + impl IPositionChangedEventArgs { + #[inline] pub unsafe fn get_position(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PositionChangedEventArgs: IPositionChangedEventArgs} + DEFINE_IID!(IID_IStatusChangedEventArgs, 877908698, 35987, 16657, 162, 5, 154, 236, 252, 155, 229, 192); + RT_INTERFACE!{interface IStatusChangedEventArgs(IStatusChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IStatusChangedEventArgs] { + fn get_Status(&mut self, out: *mut PositionStatus) -> HRESULT + }} + impl IStatusChangedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class StatusChangedEventArgs: IStatusChangedEventArgs} + DEFINE_IID!(IID_IGeolocator, 2848178018, 17700, 18825, 138, 169, 222, 1, 157, 46, 85, 31); + RT_INTERFACE!{interface IGeolocator(IGeolocatorVtbl): IInspectable(IInspectableVtbl) [IID_IGeolocator] { + fn get_DesiredAccuracy(&mut self, out: *mut PositionAccuracy) -> HRESULT, + fn put_DesiredAccuracy(&mut self, value: PositionAccuracy) -> HRESULT, + fn get_MovementThreshold(&mut self, out: *mut f64) -> HRESULT, + fn put_MovementThreshold(&mut self, value: f64) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_LocationStatus(&mut self, out: *mut PositionStatus) -> HRESULT, + fn GetGeopositionAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetGeopositionAsyncWithAgeAndTimeout(&mut self, maximumAge: super::super::foundation::TimeSpan, timeout: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_PositionChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PositionChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_StatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IGeolocator { + #[inline] pub unsafe fn get_desired_accuracy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredAccuracy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_accuracy(&mut self, value: PositionAccuracy) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredAccuracy)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_movement_threshold(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MovementThreshold)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_movement_threshold(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MovementThreshold)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_location_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LocationStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_geoposition_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetGeopositionAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_geoposition_async_with_age_and_timeout(&mut self, maximumAge: super::super::foundation::TimeSpan, timeout: super::super::foundation::TimeSpan) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetGeopositionAsyncWithAgeAndTimeout)(self, maximumAge, timeout, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_position_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PositionChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_position_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PositionChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Geolocator: IGeolocator} + RT_ACTIVATABLE!{IGeolocatorStatics [CLSID_Geolocator]} + RT_ACTIVATABLE!{IGeolocatorStatics2 [CLSID_Geolocator]} + DEFINE_CLSID!(CLSID_Geolocator = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,108,111,99,97,116,111,114,0]); + DEFINE_IID!(IID_IGeolocatorWithScalarAccuracy, 2532692929, 47119, 17930, 153, 77, 169, 108, 71, 165, 26, 164); + RT_INTERFACE!{interface IGeolocatorWithScalarAccuracy(IGeolocatorWithScalarAccuracyVtbl): IInspectable(IInspectableVtbl) [IID_IGeolocatorWithScalarAccuracy] { + fn get_DesiredAccuracyInMeters(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_DesiredAccuracyInMeters(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT + }} + impl IGeolocatorWithScalarAccuracy { + #[inline] pub unsafe fn get_desired_accuracy_in_meters(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesiredAccuracyInMeters)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_accuracy_in_meters(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredAccuracyInMeters)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeolocator2, 3518246509, 34961, 17332, 173, 54, 39, 198, 254, 154, 151, 177); + RT_INTERFACE!{interface IGeolocator2(IGeolocator2Vtbl): IInspectable(IInspectableVtbl) [IID_IGeolocator2] { + fn AllowFallbackToConsentlessPositions(&mut self) -> HRESULT + }} + impl IGeolocator2 { + #[inline] pub unsafe fn allow_fallback_to_consentless_positions(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).AllowFallbackToConsentlessPositions)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeolocatorStatics, 2593027441, 11765, 17809, 159, 135, 235, 95, 216, 148, 233, 183); + RT_INTERFACE!{static interface IGeolocatorStatics(IGeolocatorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGeolocatorStatics] { + fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetGeopositionHistoryAsync(&mut self, startTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetGeopositionHistoryWithDurationAsync(&mut self, startTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IGeolocatorStatics { + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_geoposition_history_async(&mut self, startTime: super::super::foundation::DateTime) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetGeopositionHistoryAsync)(self, startTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_geoposition_history_with_duration_async(&mut self, startTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetGeopositionHistoryWithDurationAsync)(self, startTime, duration, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeolocatorStatics2, 2570064290, 64028, 17969, 167, 29, 13, 190, 177, 37, 13, 156); + RT_INTERFACE!{static interface IGeolocatorStatics2(IGeolocatorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGeolocatorStatics2] { + fn get_IsDefaultGeopositionRecommended(&mut self, out: *mut bool) -> HRESULT, + fn put_DefaultGeoposition(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_DefaultGeoposition(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IGeolocatorStatics2 { + #[inline] pub unsafe fn get_is_default_geoposition_recommended(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDefaultGeopositionRecommended)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_geoposition(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultGeoposition)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_geoposition(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DefaultGeoposition)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeocircle, 971266115, 43001, 20067, 146, 167, 186, 12, 40, 209, 36, 177); + RT_INTERFACE!{interface IGeocircle(IGeocircleVtbl): IInspectable(IInspectableVtbl) [IID_IGeocircle] { + fn get_Center(&mut self, out: *mut BasicGeoposition) -> HRESULT, + fn get_Radius(&mut self, out: *mut f64) -> HRESULT + }} + impl IGeocircle { + #[inline] pub unsafe fn get_center(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Center)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_radius(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Radius)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeocircleFactory, 2950058783, 29361, 20349, 135, 204, 78, 212, 201, 132, 156, 5); + RT_INTERFACE!{static interface IGeocircleFactory(IGeocircleFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGeocircleFactory] { + fn Create(&mut self, position: BasicGeoposition, radius: f64, out: *mut *mut Geocircle) -> HRESULT, + fn CreateWithAltitudeReferenceSystem(&mut self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem, out: *mut *mut Geocircle) -> HRESULT, + fn CreateWithAltitudeReferenceSystemAndSpatialReferenceId(&mut self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut Geocircle) -> HRESULT + }} + impl IGeocircleFactory { + #[inline] pub unsafe fn create(&mut self, position: BasicGeoposition, radius: f64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, position, radius, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_altitude_reference_system(&mut self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystem)(self, position, radius, altitudeReferenceSystem, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_altitude_reference_system_and_spatial_reference_id(&mut self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystemAndSpatialReferenceId)(self, position, radius, altitudeReferenceSystem, spatialReferenceId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Geocircle: IGeocircle [IGeocircleFactory] [CLSID_Geocircle]} + DEFINE_CLSID!(CLSID_Geocircle = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,99,105,114,99,108,101,0]); +pub mod geofencing { // Windows.Devices.Geolocation.Geofencing +use ::prelude::*; + RT_ENUM! { enum MonitoredGeofenceStates: u32 { + None (MonitoredGeofenceStates_None) = 0, Entered (MonitoredGeofenceStates_Entered) = 1, Exited (MonitoredGeofenceStates_Exited) = 2, Removed (MonitoredGeofenceStates_Removed) = 4, + }} + RT_ENUM! { enum GeofenceState: u32 { + None (GeofenceState_None) = 0, Entered (GeofenceState_Entered) = 1, Exited (GeofenceState_Exited) = 2, Removed (GeofenceState_Removed) = 4, + }} + RT_ENUM! { enum GeofenceMonitorStatus: i32 { + Ready (GeofenceMonitorStatus_Ready) = 0, Initializing (GeofenceMonitorStatus_Initializing) = 1, NoData (GeofenceMonitorStatus_NoData) = 2, Disabled (GeofenceMonitorStatus_Disabled) = 3, NotInitialized (GeofenceMonitorStatus_NotInitialized) = 4, NotAvailable (GeofenceMonitorStatus_NotAvailable) = 5, + }} + RT_ENUM! { enum GeofenceRemovalReason: i32 { + Used (GeofenceRemovalReason_Used) = 0, Expired (GeofenceRemovalReason_Expired) = 1, + }} + DEFINE_IID!(IID_IGeofenceFactory, 2216649291, 12895, 19344, 188, 167, 43, 128, 34, 169, 55, 150); + RT_INTERFACE!{static interface IGeofenceFactory(IGeofenceFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGeofenceFactory] { + fn Create(&mut self, id: HSTRING, geoshape: *mut super::IGeoshape, out: *mut *mut Geofence) -> HRESULT, + fn CreateWithMonitorStates(&mut self, id: HSTRING, geoshape: *mut super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, out: *mut *mut Geofence) -> HRESULT, + fn CreateWithMonitorStatesAndDwellTime(&mut self, id: HSTRING, geoshape: *mut super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: ::rt::gen::windows::foundation::TimeSpan, out: *mut *mut Geofence) -> HRESULT, + fn CreateWithMonitorStatesDwellTimeStartTimeAndDuration(&mut self, id: HSTRING, geoshape: *mut super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: ::rt::gen::windows::foundation::TimeSpan, startTime: ::rt::gen::windows::foundation::DateTime, duration: ::rt::gen::windows::foundation::TimeSpan, out: *mut *mut Geofence) -> HRESULT + }} + impl IGeofenceFactory { + #[inline] pub unsafe fn create(&mut self, id: &HStringArg, geoshape: &super::IGeoshape) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, id.get(), geoshape as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_monitor_states(&mut self, id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithMonitorStates)(self, id.get(), geoshape as *const _ as *mut _, monitoredStates, singleUse, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_monitor_states_and_dwell_time(&mut self, id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: ::rt::gen::windows::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithMonitorStatesAndDwellTime)(self, id.get(), geoshape as *const _ as *mut _, monitoredStates, singleUse, dwellTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_monitor_states_dwell_time_start_time_and_duration(&mut self, id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: ::rt::gen::windows::foundation::TimeSpan, startTime: ::rt::gen::windows::foundation::DateTime, duration: ::rt::gen::windows::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithMonitorStatesDwellTimeStartTimeAndDuration)(self, id.get(), geoshape as *const _ as *mut _, monitoredStates, singleUse, dwellTime, startTime, duration, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Geofence: IGeofence [IGeofenceFactory] [CLSID_Geofence]} + DEFINE_CLSID!(CLSID_Geofence = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,102,101,110,99,105,110,103,46,71,101,111,102,101,110,99,101,0]); + DEFINE_IID!(IID_IGeofence, 2617837603, 60856, 18400, 130, 69, 91, 246, 29, 50, 31, 45); + RT_INTERFACE!{interface IGeofence(IGeofenceVtbl): IInspectable(IInspectableVtbl) [IID_IGeofence] { + fn get_StartTime(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_Duration(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_DwellTime(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MonitoredStates(&mut self, out: *mut MonitoredGeofenceStates) -> HRESULT, + fn get_Geoshape(&mut self, out: *mut *mut super::IGeoshape) -> HRESULT, + fn get_SingleUse(&mut self, out: *mut bool) -> HRESULT + }} + impl IGeofence { + #[inline] pub unsafe fn get_start_time(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dwell_time(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DwellTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_monitored_states(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MonitoredStates)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_geoshape(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Geoshape)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_single_use(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SingleUse)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeofenceStateChangeReport, 2586065944, 9316, 19593, 190, 5, 179, 255, 255, 91, 171, 197); + RT_INTERFACE!{interface IGeofenceStateChangeReport(IGeofenceStateChangeReportVtbl): IInspectable(IInspectableVtbl) [IID_IGeofenceStateChangeReport] { + fn get_NewState(&mut self, out: *mut GeofenceState) -> HRESULT, + fn get_Geofence(&mut self, out: *mut *mut Geofence) -> HRESULT, + fn get_Geoposition(&mut self, out: *mut *mut super::Geoposition) -> HRESULT, + fn get_RemovalReason(&mut self, out: *mut GeofenceRemovalReason) -> HRESULT + }} + impl IGeofenceStateChangeReport { + #[inline] pub unsafe fn get_new_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_geofence(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Geofence)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_geoposition(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Geoposition)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_removal_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RemovalReason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeofenceMonitorStatics, 768815055, 32373, 18585, 172, 227, 43, 208, 166, 92, 206, 6); + RT_INTERFACE!{static interface IGeofenceMonitorStatics(IGeofenceMonitorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGeofenceMonitorStatics] { + fn get_Current(&mut self, out: *mut *mut GeofenceMonitor) -> HRESULT + }} + impl IGeofenceMonitorStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GeofenceMonitor: IGeofenceMonitor} + RT_ACTIVATABLE!{IGeofenceMonitorStatics [CLSID_GeofenceMonitor]} + DEFINE_CLSID!(CLSID_GeofenceMonitor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,71,101,111,108,111,99,97,116,105,111,110,46,71,101,111,102,101,110,99,105,110,103,46,71,101,111,102,101,110,99,101,77,111,110,105,116,111,114,0]); + DEFINE_IID!(IID_IGeofenceMonitor, 1276075896, 7199, 17953, 187, 189, 131, 59, 146, 36, 114, 38); + RT_INTERFACE!{interface IGeofenceMonitor(IGeofenceMonitorVtbl): IInspectable(IInspectableVtbl) [IID_IGeofenceMonitor] { + fn get_Status(&mut self, out: *mut GeofenceMonitorStatus) -> HRESULT, + fn get_Geofences(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_LastKnownGeoposition(&mut self, out: *mut *mut super::Geoposition) -> HRESULT, + fn add_GeofenceStateChanged(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_GeofenceStateChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn ReadReports(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn add_StatusChanged(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IGeofenceMonitor { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_geofences(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Geofences)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_known_geoposition(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LastKnownGeoposition)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_geofence_state_changed(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_GeofenceStateChanged)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_geofence_state_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_GeofenceStateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn read_reports(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadReports)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_status_changed(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StatusChanged)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_status_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class GeofenceStateChangeReport: IGeofenceStateChangeReport} +} // Windows.Devices.Geolocation.Geofencing +} // Windows.Devices.Geolocation +pub mod humaninterfacedevice { // Windows.Devices.HumanInterfaceDevice +use ::prelude::*; + RT_ENUM! { enum HidReportType: i32 { + Input (HidReportType_Input) = 0, Output (HidReportType_Output) = 1, Feature (HidReportType_Feature) = 2, + }} + RT_ENUM! { enum HidCollectionType: i32 { + Physical (HidCollectionType_Physical) = 0, Application (HidCollectionType_Application) = 1, Logical (HidCollectionType_Logical) = 2, Report (HidCollectionType_Report) = 3, NamedArray (HidCollectionType_NamedArray) = 4, UsageSwitch (HidCollectionType_UsageSwitch) = 5, UsageModifier (HidCollectionType_UsageModifier) = 6, Other (HidCollectionType_Other) = 7, + }} + DEFINE_IID!(IID_IHidDeviceStatics, 2656666084, 38998, 16780, 159, 115, 119, 222, 12, 216, 87, 84); + RT_INTERFACE!{static interface IHidDeviceStatics(IHidDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IHidDeviceStatics] { + fn GetDeviceSelector(&mut self, usagePage: u16, usageId: u16, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorVidPid(&mut self, usagePage: u16, usageId: u16, vendorId: u16, productId: u16, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn FromIdAsync(&mut self, deviceId: HSTRING, accessMode: super::super::storage::FileAccessMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IHidDeviceStatics { + #[inline] pub unsafe fn get_device_selector(&mut self, usagePage: u16, usageId: u16) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, usagePage, usageId, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_vid_pid(&mut self, usagePage: u16, usageId: u16, vendorId: u16, productId: u16) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorVidPid)(self, usagePage, usageId, vendorId, productId, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg, accessMode: super::super::storage::FileAccessMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), accessMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class HidDevice: IHidDevice} + RT_ACTIVATABLE!{IHidDeviceStatics [CLSID_HidDevice]} + DEFINE_CLSID!(CLSID_HidDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,72,117,109,97,110,73,110,116,101,114,102,97,99,101,68,101,118,105,99,101,46,72,105,100,68,101,118,105,99,101,0]); + RT_CLASS!{class HidInputReport: IHidInputReport} + RT_CLASS!{class HidFeatureReport: IHidFeatureReport} + RT_CLASS!{class HidOutputReport: IHidOutputReport} + RT_CLASS!{class HidBooleanControlDescription: IHidBooleanControlDescription} + RT_CLASS!{class HidNumericControlDescription: IHidNumericControlDescription} + RT_CLASS!{class HidInputReportReceivedEventArgs: IHidInputReportReceivedEventArgs} + DEFINE_IID!(IID_IHidBooleanControlDescription, 1637279043, 10712, 18986, 134, 131, 132, 158, 32, 123, 190, 49); + RT_INTERFACE!{interface IHidBooleanControlDescription(IHidBooleanControlDescriptionVtbl): IInspectable(IInspectableVtbl) [IID_IHidBooleanControlDescription] { + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_ReportId(&mut self, out: *mut u16) -> HRESULT, + fn get_ReportType(&mut self, out: *mut HidReportType) -> HRESULT, + fn get_UsagePage(&mut self, out: *mut u16) -> HRESULT, + fn get_UsageId(&mut self, out: *mut u16) -> HRESULT, + fn get_ParentCollections(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IHidBooleanControlDescription { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_parent_collections(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ParentCollections)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class HidCollection: IHidCollection} + DEFINE_IID!(IID_IHidBooleanControlDescription2, 3371094762, 35447, 19510, 170, 0, 95, 240, 68, 157, 62, 115); + RT_INTERFACE!{interface IHidBooleanControlDescription2(IHidBooleanControlDescription2Vtbl): IInspectable(IInspectableVtbl) [IID_IHidBooleanControlDescription2] { + fn get_IsAbsolute(&mut self, out: *mut bool) -> HRESULT + }} + impl IHidBooleanControlDescription2 { + #[inline] pub unsafe fn get_is_absolute(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsAbsolute)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHidNumericControlDescription, 1670209158, 7575, 19573, 146, 127, 95, 245, 139, 160, 94, 50); + RT_INTERFACE!{interface IHidNumericControlDescription(IHidNumericControlDescriptionVtbl): IInspectable(IInspectableVtbl) [IID_IHidNumericControlDescription] { + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_ReportId(&mut self, out: *mut u16) -> HRESULT, + fn get_ReportType(&mut self, out: *mut HidReportType) -> HRESULT, + fn get_ReportSize(&mut self, out: *mut u32) -> HRESULT, + fn get_ReportCount(&mut self, out: *mut u32) -> HRESULT, + fn get_UsagePage(&mut self, out: *mut u16) -> HRESULT, + fn get_UsageId(&mut self, out: *mut u16) -> HRESULT, + fn get_LogicalMinimum(&mut self, out: *mut i32) -> HRESULT, + fn get_LogicalMaximum(&mut self, out: *mut i32) -> HRESULT, + fn get_PhysicalMinimum(&mut self, out: *mut i32) -> HRESULT, + fn get_PhysicalMaximum(&mut self, out: *mut i32) -> HRESULT, + fn get_UnitExponent(&mut self, out: *mut u32) -> HRESULT, + fn get_Unit(&mut self, out: *mut u32) -> HRESULT, + fn get_IsAbsolute(&mut self, out: *mut bool) -> HRESULT, + fn get_HasNull(&mut self, out: *mut bool) -> HRESULT, + fn get_ParentCollections(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IHidNumericControlDescription { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_logical_minimum(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LogicalMinimum)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_logical_maximum(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LogicalMaximum)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_physical_minimum(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhysicalMinimum)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_physical_maximum(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhysicalMaximum)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_unit_exponent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UnitExponent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_unit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Unit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_absolute(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsAbsolute)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_null(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasNull)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_parent_collections(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ParentCollections)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHidCollection, 1904866723, 13041, 18147, 190, 253, 68, 210, 102, 59, 126, 106); + RT_INTERFACE!{interface IHidCollection(IHidCollectionVtbl): IInspectable(IInspectableVtbl) [IID_IHidCollection] { + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_Type(&mut self, out: *mut HidCollectionType) -> HRESULT, + fn get_UsagePage(&mut self, out: *mut u32) -> HRESULT, + fn get_UsageId(&mut self, out: *mut u32) -> HRESULT + }} + impl IHidCollection { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHidInputReport, 3277655632, 63463, 20109, 178, 62, 202, 187, 229, 107, 144, 233); + RT_INTERFACE!{interface IHidInputReport(IHidInputReportVtbl): IInspectable(IInspectableVtbl) [IID_IHidInputReport] { + fn get_Id(&mut self, out: *mut u16) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_ActivatedBooleanControls(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_TransitionedBooleanControls(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetBooleanControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidBooleanControl) -> HRESULT, + fn GetBooleanControlByDescription(&mut self, controlDescription: *mut HidBooleanControlDescription, out: *mut *mut HidBooleanControl) -> HRESULT, + fn GetNumericControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidNumericControl) -> HRESULT, + fn GetNumericControlByDescription(&mut self, controlDescription: *mut HidNumericControlDescription, out: *mut *mut HidNumericControl) -> HRESULT + }} + impl IHidInputReport { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_activated_boolean_controls(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActivatedBooleanControls)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transitioned_boolean_controls(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransitionedBooleanControls)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_boolean_control(&mut self, usagePage: u16, usageId: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBooleanControl)(self, usagePage, usageId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_boolean_control_by_description(&mut self, controlDescription: &HidBooleanControlDescription) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBooleanControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeric_control(&mut self, usagePage: u16, usageId: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNumericControl)(self, usagePage, usageId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeric_control_by_description(&mut self, controlDescription: &HidNumericControlDescription) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNumericControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class HidBooleanControl: IHidBooleanControl} + RT_CLASS!{class HidNumericControl: IHidNumericControl} + DEFINE_IID!(IID_IHidOutputReport, 1657480516, 51350, 17507, 147, 193, 223, 157, 176, 83, 196, 80); + RT_INTERFACE!{interface IHidOutputReport(IHidOutputReportVtbl): IInspectable(IInspectableVtbl) [IID_IHidOutputReport] { + fn get_Id(&mut self, out: *mut u16) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn GetBooleanControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidBooleanControl) -> HRESULT, + fn GetBooleanControlByDescription(&mut self, controlDescription: *mut HidBooleanControlDescription, out: *mut *mut HidBooleanControl) -> HRESULT, + fn GetNumericControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidNumericControl) -> HRESULT, + fn GetNumericControlByDescription(&mut self, controlDescription: *mut HidNumericControlDescription, out: *mut *mut HidNumericControl) -> HRESULT + }} + impl IHidOutputReport { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_boolean_control(&mut self, usagePage: u16, usageId: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBooleanControl)(self, usagePage, usageId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_boolean_control_by_description(&mut self, controlDescription: &HidBooleanControlDescription) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBooleanControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeric_control(&mut self, usagePage: u16, usageId: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNumericControl)(self, usagePage, usageId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeric_control_by_description(&mut self, controlDescription: &HidNumericControlDescription) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNumericControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHidFeatureReport, 2216532857, 23269, 18147, 130, 239, 31, 236, 92, 137, 66, 244); + RT_INTERFACE!{interface IHidFeatureReport(IHidFeatureReportVtbl): IInspectable(IInspectableVtbl) [IID_IHidFeatureReport] { + fn get_Id(&mut self, out: *mut u16) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn GetBooleanControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidBooleanControl) -> HRESULT, + fn GetBooleanControlByDescription(&mut self, controlDescription: *mut HidBooleanControlDescription, out: *mut *mut HidBooleanControl) -> HRESULT, + fn GetNumericControl(&mut self, usagePage: u16, usageId: u16, out: *mut *mut HidNumericControl) -> HRESULT, + fn GetNumericControlByDescription(&mut self, controlDescription: *mut HidNumericControlDescription, out: *mut *mut HidNumericControl) -> HRESULT + }} + impl IHidFeatureReport { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_boolean_control(&mut self, usagePage: u16, usageId: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBooleanControl)(self, usagePage, usageId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_boolean_control_by_description(&mut self, controlDescription: &HidBooleanControlDescription) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBooleanControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeric_control(&mut self, usagePage: u16, usageId: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNumericControl)(self, usagePage, usageId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeric_control_by_description(&mut self, controlDescription: &HidNumericControlDescription) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNumericControlByDescription)(self, controlDescription as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHidInputReportReceivedEventArgs, 1884931531, 22962, 19906, 152, 92, 10, 220, 97, 54, 250, 45); + RT_INTERFACE!{interface IHidInputReportReceivedEventArgs(IHidInputReportReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IHidInputReportReceivedEventArgs] { + fn get_Report(&mut self, out: *mut *mut HidInputReport) -> HRESULT + }} + impl IHidInputReportReceivedEventArgs { + #[inline] pub unsafe fn get_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHidBooleanControl, 1380840586, 13973, 16524, 187, 162, 226, 235, 90, 191, 188, 32); + RT_INTERFACE!{interface IHidBooleanControl(IHidBooleanControlVtbl): IInspectable(IInspectableVtbl) [IID_IHidBooleanControl] { + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_UsagePage(&mut self, out: *mut u16) -> HRESULT, + fn get_UsageId(&mut self, out: *mut u16) -> HRESULT, + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn put_IsActive(&mut self, value: bool) -> HRESULT, + fn get_ControlDescription(&mut self, out: *mut *mut HidBooleanControlDescription) -> HRESULT + }} + impl IHidBooleanControl { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_active(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsActive)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_control_description(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ControlDescription)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHidNumericControl, 3817476773, 13735, 19317, 137, 200, 251, 31, 40, 177, 8, 35); + RT_INTERFACE!{interface IHidNumericControl(IHidNumericControlVtbl): IInspectable(IInspectableVtbl) [IID_IHidNumericControl] { + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_IsGrouped(&mut self, out: *mut bool) -> HRESULT, + fn get_UsagePage(&mut self, out: *mut u16) -> HRESULT, + fn get_UsageId(&mut self, out: *mut u16) -> HRESULT, + fn get_Value(&mut self, out: *mut i64) -> HRESULT, + fn put_Value(&mut self, value: i64) -> HRESULT, + fn get_ScaledValue(&mut self, out: *mut i64) -> HRESULT, + fn put_ScaledValue(&mut self, value: i64) -> HRESULT, + fn get_ControlDescription(&mut self, out: *mut *mut HidNumericControlDescription) -> HRESULT + }} + impl IHidNumericControl { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_grouped(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsGrouped)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: i64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scaled_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScaledValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scaled_value(&mut self, value: i64) -> Result<()> { + let hr = ((*self.lpVtbl).put_ScaledValue)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_control_description(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ControlDescription)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHidDevice, 1602884839, 8704, 17198, 149, 218, 208, 155, 135, 213, 116, 168); + RT_INTERFACE!{interface IHidDevice(IHidDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IHidDevice] { + fn get_VendorId(&mut self, out: *mut u16) -> HRESULT, + fn get_ProductId(&mut self, out: *mut u16) -> HRESULT, + fn get_Version(&mut self, out: *mut u16) -> HRESULT, + fn get_UsagePage(&mut self, out: *mut u16) -> HRESULT, + fn get_UsageId(&mut self, out: *mut u16) -> HRESULT, + fn GetInputReportAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetInputReportByIdAsync(&mut self, reportId: u16, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetFeatureReportAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetFeatureReportByIdAsync(&mut self, reportId: u16, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateOutputReport(&mut self, out: *mut *mut HidOutputReport) -> HRESULT, + fn CreateOutputReportById(&mut self, reportId: u16, out: *mut *mut HidOutputReport) -> HRESULT, + fn CreateFeatureReport(&mut self, out: *mut *mut HidFeatureReport) -> HRESULT, + fn CreateFeatureReportById(&mut self, reportId: u16, out: *mut *mut HidFeatureReport) -> HRESULT, + fn SendOutputReportAsync(&mut self, outputReport: *mut HidOutputReport, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SendFeatureReportAsync(&mut self, featureReport: *mut HidFeatureReport, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetBooleanControlDescriptions(&mut self, reportType: HidReportType, usagePage: u16, usageId: u16, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetNumericControlDescriptions(&mut self, reportType: HidReportType, usagePage: u16, usageId: u16, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn add_InputReportReceived(&mut self, reportHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_InputReportReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IHidDevice { + #[inline] pub unsafe fn get_vendor_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VendorId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_product_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProductId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_version(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Version)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_page(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsagePage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsageId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_report_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetInputReportAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_report_by_id_async(&mut self, reportId: u16) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetInputReportByIdAsync)(self, reportId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_feature_report_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFeatureReportAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_feature_report_by_id_async(&mut self, reportId: u16) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFeatureReportByIdAsync)(self, reportId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_output_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateOutputReport)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_output_report_by_id(&mut self, reportId: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateOutputReportById)(self, reportId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_feature_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFeatureReport)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_feature_report_by_id(&mut self, reportId: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFeatureReportById)(self, reportId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn send_output_report_async(&mut self, outputReport: &HidOutputReport) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendOutputReportAsync)(self, outputReport as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn send_feature_report_async(&mut self, featureReport: &HidFeatureReport) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendFeatureReportAsync)(self, featureReport as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_boolean_control_descriptions(&mut self, reportType: HidReportType, usagePage: u16, usageId: u16) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBooleanControlDescriptions)(self, reportType, usagePage, usageId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeric_control_descriptions(&mut self, reportType: HidReportType, usagePage: u16, usageId: u16) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNumericControlDescriptions)(self, reportType, usagePage, usageId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_input_report_received(&mut self, reportHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_InputReportReceived)(self, reportHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_input_report_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_InputReportReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Devices.HumanInterfaceDevice +pub mod input { // Windows.Devices.Input +use ::prelude::*; + RT_ENUM! { enum PointerDeviceType: i32 { + Touch (PointerDeviceType_Touch) = 0, Pen (PointerDeviceType_Pen) = 1, Mouse (PointerDeviceType_Mouse) = 2, + }} + RT_STRUCT! { struct PointerDeviceUsage { + UsagePage: u32, Usage: u32, MinLogical: i32, MaxLogical: i32, MinPhysical: i32, MaxPhysical: i32, Unit: u32, PhysicalMultiplier: f32, + }} + RT_STRUCT! { struct MouseDelta { + X: i32, Y: i32, + }} + DEFINE_IID!(IID_IMouseCapabilities, 3164987427, 32217, 19307, 154, 146, 85, 212, 60, 179, 143, 115); + RT_INTERFACE!{interface IMouseCapabilities(IMouseCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IMouseCapabilities] { + fn get_MousePresent(&mut self, out: *mut i32) -> HRESULT, + fn get_VerticalWheelPresent(&mut self, out: *mut i32) -> HRESULT, + fn get_HorizontalWheelPresent(&mut self, out: *mut i32) -> HRESULT, + fn get_SwapButtons(&mut self, out: *mut i32) -> HRESULT, + fn get_NumberOfButtons(&mut self, out: *mut u32) -> HRESULT + }} + impl IMouseCapabilities { + #[inline] pub unsafe fn get_mouse_present(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MousePresent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_wheel_present(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VerticalWheelPresent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_horizontal_wheel_present(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HorizontalWheelPresent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_swap_buttons(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SwapButtons)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_buttons(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfButtons)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyboardCapabilities, 977247062, 26520, 19388, 131, 62, 15, 52, 177, 124, 101, 255); + RT_INTERFACE!{interface IKeyboardCapabilities(IKeyboardCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IKeyboardCapabilities] { + fn get_KeyboardPresent(&mut self, out: *mut i32) -> HRESULT + }} + impl IKeyboardCapabilities { + #[inline] pub unsafe fn get_keyboard_present(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyboardPresent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITouchCapabilities, 551376377, 5105, 18120, 146, 133, 44, 5, 250, 62, 218, 111); + RT_INTERFACE!{interface ITouchCapabilities(ITouchCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ITouchCapabilities] { + fn get_TouchPresent(&mut self, out: *mut i32) -> HRESULT, + fn get_Contacts(&mut self, out: *mut u32) -> HRESULT + }} + impl ITouchCapabilities { + #[inline] pub unsafe fn get_touch_present(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TouchPresent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_contacts(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Contacts)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPointerDeviceStatics, 3635976865, 53702, 16750, 189, 141, 87, 144, 145, 77, 197, 99); + RT_INTERFACE!{static interface IPointerDeviceStatics(IPointerDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPointerDeviceStatics] { + fn GetPointerDevice(&mut self, pointerId: u32, out: *mut *mut PointerDevice) -> HRESULT, + fn GetPointerDevices(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IPointerDeviceStatics { + #[inline] pub unsafe fn get_pointer_device(&mut self, pointerId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPointerDevice)(self, pointerId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_devices(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPointerDevices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PointerDevice: IPointerDevice} + RT_ACTIVATABLE!{IPointerDeviceStatics [CLSID_PointerDevice]} + DEFINE_CLSID!(CLSID_PointerDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,73,110,112,117,116,46,80,111,105,110,116,101,114,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_IPointerDevice, 2479471356, 60363, 18046, 130, 198, 39, 111, 234, 227, 107, 90); + RT_INTERFACE!{interface IPointerDevice(IPointerDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IPointerDevice] { + fn get_PointerDeviceType(&mut self, out: *mut PointerDeviceType) -> HRESULT, + fn get_IsIntegrated(&mut self, out: *mut bool) -> HRESULT, + fn get_MaxContacts(&mut self, out: *mut u32) -> HRESULT, + fn get_PhysicalDeviceRect(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_ScreenRect(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_SupportedUsages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IPointerDevice { + #[inline] pub unsafe fn get_pointer_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerDeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_integrated(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsIntegrated)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_contacts(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxContacts)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_physical_device_rect(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhysicalDeviceRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_screen_rect(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScreenRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_usages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedUsages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPointerDevice2, 4171682464, 50308, 18591, 174, 62, 48, 210, 238, 31, 253, 62); + RT_INTERFACE!{interface IPointerDevice2(IPointerDevice2Vtbl): IInspectable(IInspectableVtbl) [IID_IPointerDevice2] { + fn get_MaxPointersWithZDistance(&mut self, out: *mut u32) -> HRESULT + }} + impl IPointerDevice2 { + #[inline] pub unsafe fn get_max_pointers_with_zdistance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPointersWithZDistance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMouseEventArgs, 4129663581, 9044, 19655, 146, 48, 150, 148, 28, 150, 159, 222); + RT_INTERFACE!{interface IMouseEventArgs(IMouseEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMouseEventArgs] { + fn get_MouseDelta(&mut self, out: *mut MouseDelta) -> HRESULT + }} + impl IMouseEventArgs { + #[inline] pub unsafe fn get_mouse_delta(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MouseDelta)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMouseDevice, 2297295960, 62152, 18932, 190, 31, 194, 86, 179, 136, 188, 17); + RT_INTERFACE!{interface IMouseDevice(IMouseDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IMouseDevice] { + fn add_MouseMoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MouseMoved(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMouseDevice { + #[inline] pub unsafe fn add_mouse_moved(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MouseMoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_mouse_moved(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MouseMoved)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MouseDevice: IMouseDevice} + RT_ACTIVATABLE!{IMouseDeviceStatics [CLSID_MouseDevice]} + DEFINE_CLSID!(CLSID_MouseDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,73,110,112,117,116,46,77,111,117,115,101,68,101,118,105,99,101,0]); + RT_CLASS!{class MouseEventArgs: IMouseEventArgs} + DEFINE_IID!(IID_IMouseDeviceStatics, 1212846149, 28016, 18907, 142, 104, 70, 255, 189, 23, 211, 141); + RT_INTERFACE!{static interface IMouseDeviceStatics(IMouseDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMouseDeviceStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut MouseDevice) -> HRESULT + }} + impl IMouseDeviceStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MouseCapabilities: IMouseCapabilities} + RT_CLASS!{class KeyboardCapabilities: IKeyboardCapabilities} + RT_CLASS!{class TouchCapabilities: ITouchCapabilities} +} // Windows.Devices.Input +pub mod lights { // Windows.Devices.Lights +use ::prelude::*; + DEFINE_IID!(IID_ILampStatics, 2820817260, 34949, 16414, 184, 33, 142, 139, 56, 168, 232, 236); + RT_INTERFACE!{static interface ILampStatics(ILampStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILampStatics] { + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ILampStatics { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Lamp: ILamp} + RT_ACTIVATABLE!{ILampStatics [CLSID_Lamp]} + DEFINE_CLSID!(CLSID_Lamp = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,76,105,103,104,116,115,46,76,97,109,112,0]); + RT_CLASS!{class LampAvailabilityChangedEventArgs: ILampAvailabilityChangedEventArgs} + DEFINE_IID!(IID_ILampAvailabilityChangedEventArgs, 1332624877, 1954, 18845, 146, 96, 103, 227, 4, 83, 43, 164); + RT_INTERFACE!{interface ILampAvailabilityChangedEventArgs(ILampAvailabilityChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ILampAvailabilityChangedEventArgs] { + fn get_IsAvailable(&mut self, out: *mut bool) -> HRESULT + }} + impl ILampAvailabilityChangedEventArgs { + #[inline] pub unsafe fn get_is_available(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsAvailable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILamp, 75324314, 59973, 19243, 177, 162, 20, 223, 240, 11, 222, 123); + RT_INTERFACE!{interface ILamp(ILampVtbl): IInspectable(IInspectableVtbl) [IID_ILamp] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsEnabled(&mut self, value: bool) -> HRESULT, + fn get_BrightnessLevel(&mut self, out: *mut f32) -> HRESULT, + fn put_BrightnessLevel(&mut self, value: f32) -> HRESULT, + fn get_IsColorSettable(&mut self, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_Color(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_Color(&mut self, value: super::super::ui::Color) -> HRESULT, + fn add_AvailabilityChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AvailabilityChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ILamp { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_brightness_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BrightnessLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_brightness_level(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_BrightnessLevel)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_color_settable(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsColorSettable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_Color)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_availability_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AvailabilityChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_availability_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AvailabilityChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Devices.Lights +pub mod midi { // Windows.Devices.Midi +use ::prelude::*; + RT_ENUM! { enum MidiMessageType: i32 { + None (MidiMessageType_None) = 0, NoteOff (MidiMessageType_NoteOff) = 128, NoteOn (MidiMessageType_NoteOn) = 144, PolyphonicKeyPressure (MidiMessageType_PolyphonicKeyPressure) = 160, ControlChange (MidiMessageType_ControlChange) = 176, ProgramChange (MidiMessageType_ProgramChange) = 192, ChannelPressure (MidiMessageType_ChannelPressure) = 208, PitchBendChange (MidiMessageType_PitchBendChange) = 224, SystemExclusive (MidiMessageType_SystemExclusive) = 240, MidiTimeCode (MidiMessageType_MidiTimeCode) = 241, SongPositionPointer (MidiMessageType_SongPositionPointer) = 242, SongSelect (MidiMessageType_SongSelect) = 243, TuneRequest (MidiMessageType_TuneRequest) = 246, EndSystemExclusive (MidiMessageType_EndSystemExclusive) = 247, TimingClock (MidiMessageType_TimingClock) = 248, Start (MidiMessageType_Start) = 250, Continue (MidiMessageType_Continue) = 251, Stop (MidiMessageType_Stop) = 252, ActiveSensing (MidiMessageType_ActiveSensing) = 254, SystemReset (MidiMessageType_SystemReset) = 255, + }} + DEFINE_IID!(IID_IMidiMessage, 2037807429, 4244, 17027, 155, 224, 40, 159, 192, 238, 131, 52); + RT_INTERFACE!{interface IMidiMessage(IMidiMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiMessage] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_RawData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_Type(&mut self, out: *mut MidiMessageType) -> HRESULT + }} + impl IMidiMessage { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_raw_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RawData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiNoteOffMessage, 385714932, 6542, 19855, 166, 84, 211, 5, 162, 147, 84, 143); + RT_INTERFACE!{interface IMidiNoteOffMessage(IMidiNoteOffMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiNoteOffMessage] { + fn get_Channel(&mut self, out: *mut u8) -> HRESULT, + fn get_Note(&mut self, out: *mut u8) -> HRESULT, + fn get_Velocity(&mut self, out: *mut u8) -> HRESULT + }} + impl IMidiNoteOffMessage { + #[inline] pub unsafe fn get_channel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_note(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Note)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_velocity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Velocity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiNoteOnMessage, 3760343797, 24961, 18141, 175, 162, 65, 0, 4, 192, 87, 170); + RT_INTERFACE!{interface IMidiNoteOnMessage(IMidiNoteOnMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiNoteOnMessage] { + fn get_Channel(&mut self, out: *mut u8) -> HRESULT, + fn get_Note(&mut self, out: *mut u8) -> HRESULT, + fn get_Velocity(&mut self, out: *mut u8) -> HRESULT + }} + impl IMidiNoteOnMessage { + #[inline] pub unsafe fn get_channel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_note(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Note)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_velocity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Velocity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiPolyphonicKeyPressureMessage, 527644670, 44264, 18592, 134, 142, 124, 219, 242, 15, 4, 214); + RT_INTERFACE!{interface IMidiPolyphonicKeyPressureMessage(IMidiPolyphonicKeyPressureMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiPolyphonicKeyPressureMessage] { + fn get_Channel(&mut self, out: *mut u8) -> HRESULT, + fn get_Note(&mut self, out: *mut u8) -> HRESULT, + fn get_Pressure(&mut self, out: *mut u8) -> HRESULT + }} + impl IMidiPolyphonicKeyPressureMessage { + #[inline] pub unsafe fn get_channel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_note(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Note)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pressure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Pressure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiControlChangeMessage, 3085000579, 30733, 16479, 183, 129, 62, 21, 152, 201, 127, 64); + RT_INTERFACE!{interface IMidiControlChangeMessage(IMidiControlChangeMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiControlChangeMessage] { + fn get_Channel(&mut self, out: *mut u8) -> HRESULT, + fn get_Controller(&mut self, out: *mut u8) -> HRESULT, + fn get_ControlValue(&mut self, out: *mut u8) -> HRESULT + }} + impl IMidiControlChangeMessage { + #[inline] pub unsafe fn get_channel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_controller(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Controller)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_control_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ControlValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiProgramChangeMessage, 2629516408, 31294, 17191, 170, 152, 32, 184, 228, 72, 90, 248); + RT_INTERFACE!{interface IMidiProgramChangeMessage(IMidiProgramChangeMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiProgramChangeMessage] { + fn get_Channel(&mut self, out: *mut u8) -> HRESULT, + fn get_Program(&mut self, out: *mut u8) -> HRESULT + }} + impl IMidiProgramChangeMessage { + #[inline] pub unsafe fn get_channel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_program(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Program)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiChannelPressureMessage, 3189745760, 25268, 19794, 163, 126, 146, 229, 77, 53, 185, 9); + RT_INTERFACE!{interface IMidiChannelPressureMessage(IMidiChannelPressureMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiChannelPressureMessage] { + fn get_Channel(&mut self, out: *mut u8) -> HRESULT, + fn get_Pressure(&mut self, out: *mut u8) -> HRESULT + }} + impl IMidiChannelPressureMessage { + #[inline] pub unsafe fn get_channel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pressure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Pressure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiPitchBendChangeMessage, 702500017, 11935, 20399, 140, 43, 156, 184, 42, 144, 121, 202); + RT_INTERFACE!{interface IMidiPitchBendChangeMessage(IMidiPitchBendChangeMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiPitchBendChangeMessage] { + fn get_Channel(&mut self, out: *mut u8) -> HRESULT, + fn get_Bend(&mut self, out: *mut u16) -> HRESULT + }} + impl IMidiPitchBendChangeMessage { + #[inline] pub unsafe fn get_channel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bend(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bend)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiTimeCodeMessage, 200738941, 64099, 18972, 141, 235, 192, 232, 119, 150, 166, 215); + RT_INTERFACE!{interface IMidiTimeCodeMessage(IMidiTimeCodeMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiTimeCodeMessage] { + fn get_FrameType(&mut self, out: *mut u8) -> HRESULT, + fn get_Values(&mut self, out: *mut u8) -> HRESULT + }} + impl IMidiTimeCodeMessage { + #[inline] pub unsafe fn get_frame_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FrameType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_values(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Values)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiSongPositionPointerMessage, 1285885014, 60510, 19172, 161, 21, 136, 220, 87, 204, 43, 121); + RT_INTERFACE!{interface IMidiSongPositionPointerMessage(IMidiSongPositionPointerMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSongPositionPointerMessage] { + fn get_Beats(&mut self, out: *mut u16) -> HRESULT + }} + impl IMidiSongPositionPointerMessage { + #[inline] pub unsafe fn get_beats(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Beats)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiSongSelectMessage, 1240527487, 28035, 18241, 165, 191, 70, 41, 246, 190, 151, 79); + RT_INTERFACE!{interface IMidiSongSelectMessage(IMidiSongSelectMessageVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSongSelectMessage] { + fn get_Song(&mut self, out: *mut u8) -> HRESULT + }} + impl IMidiSongSelectMessage { + #[inline] pub unsafe fn get_song(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Song)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiNoteOffMessageFactory, 2796699872, 42825, 16991, 138, 244, 164, 217, 121, 204, 21, 181); + RT_INTERFACE!{static interface IMidiNoteOffMessageFactory(IMidiNoteOffMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiNoteOffMessageFactory] { + fn CreateMidiNoteOffMessage(&mut self, channel: u8, note: u8, velocity: u8, out: *mut *mut MidiNoteOffMessage) -> HRESULT + }} + impl IMidiNoteOffMessageFactory { + #[inline] pub unsafe fn create_midi_note_off_message(&mut self, channel: u8, note: u8, velocity: u8) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMidiNoteOffMessage)(self, channel, note, velocity, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiNoteOffMessage: IMidiNoteOffMessage [IMidiNoteOffMessageFactory] [CLSID_MidiNoteOffMessage]} + DEFINE_CLSID!(CLSID_MidiNoteOffMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,78,111,116,101,79,102,102,77,101,115,115,97,103,101,0]); + DEFINE_IID!(IID_IMidiNoteOnMessageFactory, 2604826784, 22977, 16910, 181, 23, 21, 161, 10, 169, 96, 107); + RT_INTERFACE!{static interface IMidiNoteOnMessageFactory(IMidiNoteOnMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiNoteOnMessageFactory] { + fn CreateMidiNoteOnMessage(&mut self, channel: u8, note: u8, velocity: u8, out: *mut *mut MidiNoteOnMessage) -> HRESULT + }} + impl IMidiNoteOnMessageFactory { + #[inline] pub unsafe fn create_midi_note_on_message(&mut self, channel: u8, note: u8, velocity: u8) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMidiNoteOnMessage)(self, channel, note, velocity, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiNoteOnMessage: IMidiNoteOnMessage [IMidiNoteOnMessageFactory] [CLSID_MidiNoteOnMessage]} + DEFINE_CLSID!(CLSID_MidiNoteOnMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,78,111,116,101,79,110,77,101,115,115,97,103,101,0]); + DEFINE_IID!(IID_IMidiPolyphonicKeyPressureMessageFactory, 3918481470, 50355, 19922, 145, 124, 227, 73, 129, 90, 27, 59); + RT_INTERFACE!{static interface IMidiPolyphonicKeyPressureMessageFactory(IMidiPolyphonicKeyPressureMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiPolyphonicKeyPressureMessageFactory] { + fn CreateMidiPolyphonicKeyPressureMessage(&mut self, channel: u8, note: u8, pressure: u8, out: *mut *mut MidiPolyphonicKeyPressureMessage) -> HRESULT + }} + impl IMidiPolyphonicKeyPressureMessageFactory { + #[inline] pub unsafe fn create_midi_polyphonic_key_pressure_message(&mut self, channel: u8, note: u8, pressure: u8) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMidiPolyphonicKeyPressureMessage)(self, channel, note, pressure, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiPolyphonicKeyPressureMessage: IMidiPolyphonicKeyPressureMessage [IMidiPolyphonicKeyPressureMessageFactory] [CLSID_MidiPolyphonicKeyPressureMessage]} + DEFINE_CLSID!(CLSID_MidiPolyphonicKeyPressureMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,80,111,108,121,112,104,111,110,105,99,75,101,121,80,114,101,115,115,117,114,101,77,101,115,115,97,103,101,0]); + DEFINE_IID!(IID_IMidiControlChangeMessageFactory, 716260129, 38252, 18093, 151, 82, 248, 127, 85, 5, 47, 227); + RT_INTERFACE!{static interface IMidiControlChangeMessageFactory(IMidiControlChangeMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiControlChangeMessageFactory] { + fn CreateMidiControlChangeMessage(&mut self, channel: u8, controller: u8, controlValue: u8, out: *mut *mut MidiControlChangeMessage) -> HRESULT + }} + impl IMidiControlChangeMessageFactory { + #[inline] pub unsafe fn create_midi_control_change_message(&mut self, channel: u8, controller: u8, controlValue: u8) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMidiControlChangeMessage)(self, channel, controller, controlValue, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiControlChangeMessage: IMidiControlChangeMessage [IMidiControlChangeMessageFactory] [CLSID_MidiControlChangeMessage]} + DEFINE_CLSID!(CLSID_MidiControlChangeMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,67,111,110,116,114,111,108,67,104,97,110,103,101,77,101,115,115,97,103,101,0]); + DEFINE_IID!(IID_IMidiProgramChangeMessageFactory, 3601875847, 21067, 16644, 156, 153, 101, 114, 191, 210, 226, 97); + RT_INTERFACE!{static interface IMidiProgramChangeMessageFactory(IMidiProgramChangeMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiProgramChangeMessageFactory] { + fn CreateMidiProgramChangeMessage(&mut self, channel: u8, program: u8, out: *mut *mut MidiProgramChangeMessage) -> HRESULT + }} + impl IMidiProgramChangeMessageFactory { + #[inline] pub unsafe fn create_midi_program_change_message(&mut self, channel: u8, program: u8) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMidiProgramChangeMessage)(self, channel, program, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiProgramChangeMessage: IMidiProgramChangeMessage [IMidiProgramChangeMessageFactory] [CLSID_MidiProgramChangeMessage]} + DEFINE_CLSID!(CLSID_MidiProgramChangeMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,80,114,111,103,114,97,109,67,104,97,110,103,101,77,101,115,115,97,103,101,0]); + DEFINE_IID!(IID_IMidiChannelPressureMessageFactory, 1645800751, 8836, 16682, 148, 207, 16, 251, 4, 132, 44, 108); + RT_INTERFACE!{static interface IMidiChannelPressureMessageFactory(IMidiChannelPressureMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiChannelPressureMessageFactory] { + fn CreateMidiChannelPressureMessage(&mut self, channel: u8, pressure: u8, out: *mut *mut MidiChannelPressureMessage) -> HRESULT + }} + impl IMidiChannelPressureMessageFactory { + #[inline] pub unsafe fn create_midi_channel_pressure_message(&mut self, channel: u8, pressure: u8) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMidiChannelPressureMessage)(self, channel, pressure, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiChannelPressureMessage: IMidiChannelPressureMessage [IMidiChannelPressureMessageFactory] [CLSID_MidiChannelPressureMessage]} + DEFINE_CLSID!(CLSID_MidiChannelPressureMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,67,104,97,110,110,101,108,80,114,101,115,115,117,114,101,77,101,115,115,97,103,101,0]); + DEFINE_IID!(IID_IMidiPitchBendChangeMessageFactory, 4126072661, 53192, 18726, 179, 14, 163, 98, 35, 147, 48, 108); + RT_INTERFACE!{static interface IMidiPitchBendChangeMessageFactory(IMidiPitchBendChangeMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiPitchBendChangeMessageFactory] { + fn CreateMidiPitchBendChangeMessage(&mut self, channel: u8, bend: u16, out: *mut *mut MidiPitchBendChangeMessage) -> HRESULT + }} + impl IMidiPitchBendChangeMessageFactory { + #[inline] pub unsafe fn create_midi_pitch_bend_change_message(&mut self, channel: u8, bend: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMidiPitchBendChangeMessage)(self, channel, bend, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiPitchBendChangeMessage: IMidiPitchBendChangeMessage [IMidiPitchBendChangeMessageFactory] [CLSID_MidiPitchBendChangeMessage]} + DEFINE_CLSID!(CLSID_MidiPitchBendChangeMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,80,105,116,99,104,66,101,110,100,67,104,97,110,103,101,77,101,115,115,97,103,101,0]); + DEFINE_IID!(IID_IMidiSystemExclusiveMessageFactory, 138273314, 15220, 17184, 155, 66, 12, 168, 84, 95, 138, 36); + RT_INTERFACE!{static interface IMidiSystemExclusiveMessageFactory(IMidiSystemExclusiveMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSystemExclusiveMessageFactory] { + #[cfg(feature="windows.storage")] fn CreateMidiSystemExclusiveMessage(&mut self, rawData: *mut super::super::storage::streams::IBuffer, out: *mut *mut MidiSystemExclusiveMessage) -> HRESULT + }} + impl IMidiSystemExclusiveMessageFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_midi_system_exclusive_message(&mut self, rawData: &super::super::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMidiSystemExclusiveMessage)(self, rawData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiSystemExclusiveMessage: IMidiMessage [IMidiSystemExclusiveMessageFactory] [CLSID_MidiSystemExclusiveMessage]} + DEFINE_CLSID!(CLSID_MidiSystemExclusiveMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,83,121,115,116,101,109,69,120,99,108,117,115,105,118,101,77,101,115,115,97,103,101,0]); + DEFINE_IID!(IID_IMidiTimeCodeMessageFactory, 3945830853, 30492, 16606, 185, 97, 23, 90, 116, 137, 168, 94); + RT_INTERFACE!{static interface IMidiTimeCodeMessageFactory(IMidiTimeCodeMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiTimeCodeMessageFactory] { + fn CreateMidiTimeCodeMessage(&mut self, frameType: u8, values: u8, out: *mut *mut MidiTimeCodeMessage) -> HRESULT + }} + impl IMidiTimeCodeMessageFactory { + #[inline] pub unsafe fn create_midi_time_code_message(&mut self, frameType: u8, values: u8) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMidiTimeCodeMessage)(self, frameType, values, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiTimeCodeMessage: IMidiTimeCodeMessage [IMidiTimeCodeMessageFactory] [CLSID_MidiTimeCodeMessage]} + DEFINE_CLSID!(CLSID_MidiTimeCodeMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,84,105,109,101,67,111,100,101,77,101,115,115,97,103,101,0]); + DEFINE_IID!(IID_IMidiSongPositionPointerMessageFactory, 2617305494, 61707, 20458, 179, 149, 245, 214, 207, 128, 246, 78); + RT_INTERFACE!{static interface IMidiSongPositionPointerMessageFactory(IMidiSongPositionPointerMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSongPositionPointerMessageFactory] { + fn CreateMidiSongPositionPointerMessage(&mut self, beats: u16, out: *mut *mut MidiSongPositionPointerMessage) -> HRESULT + }} + impl IMidiSongPositionPointerMessageFactory { + #[inline] pub unsafe fn create_midi_song_position_pointer_message(&mut self, beats: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMidiSongPositionPointerMessage)(self, beats, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiSongPositionPointerMessage: IMidiSongPositionPointerMessage [IMidiSongPositionPointerMessageFactory] [CLSID_MidiSongPositionPointerMessage]} + DEFINE_CLSID!(CLSID_MidiSongPositionPointerMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,83,111,110,103,80,111,115,105,116,105,111,110,80,111,105,110,116,101,114,77,101,115,115,97,103,101,0]); + DEFINE_IID!(IID_IMidiSongSelectMessageFactory, 2223536356, 34632, 16681, 166, 108, 160, 84, 147, 247, 93, 170); + RT_INTERFACE!{static interface IMidiSongSelectMessageFactory(IMidiSongSelectMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSongSelectMessageFactory] { + fn CreateMidiSongSelectMessage(&mut self, song: u8, out: *mut *mut MidiSongSelectMessage) -> HRESULT + }} + impl IMidiSongSelectMessageFactory { + #[inline] pub unsafe fn create_midi_song_select_message(&mut self, song: u8) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMidiSongSelectMessage)(self, song, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiSongSelectMessage: IMidiSongSelectMessage [IMidiSongSelectMessageFactory] [CLSID_MidiSongSelectMessage]} + DEFINE_CLSID!(CLSID_MidiSongSelectMessage = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,83,111,110,103,83,101,108,101,99,116,77,101,115,115,97,103,101,0]); + RT_CLASS!{class MidiTuneRequestMessage: IMidiMessage} + RT_CLASS!{class MidiTimingClockMessage: IMidiMessage} + RT_CLASS!{class MidiStartMessage: IMidiMessage} + RT_CLASS!{class MidiContinueMessage: IMidiMessage} + RT_CLASS!{class MidiStopMessage: IMidiMessage} + RT_CLASS!{class MidiActiveSensingMessage: IMidiMessage} + RT_CLASS!{class MidiSystemResetMessage: IMidiMessage} + DEFINE_IID!(IID_IMidiMessageReceivedEventArgs, 1985375830, 62248, 19281, 144, 125, 179, 168, 206, 150, 191, 128); + RT_INTERFACE!{interface IMidiMessageReceivedEventArgs(IMidiMessageReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMidiMessageReceivedEventArgs] { + fn get_Message(&mut self, out: *mut *mut IMidiMessage) -> HRESULT + }} + impl IMidiMessageReceivedEventArgs { + #[inline] pub unsafe fn get_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiMessageReceivedEventArgs: IMidiMessageReceivedEventArgs} + DEFINE_IID!(IID_IMidiInPortStatics, 1153710556, 26623, 19054, 139, 172, 253, 182, 97, 12, 242, 150); + RT_INTERFACE!{static interface IMidiInPortStatics(IMidiInPortStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMidiInPortStatics] { + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMidiInPortStatics { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiInPort: IMidiInPort} + RT_ACTIVATABLE!{IMidiInPortStatics [CLSID_MidiInPort]} + DEFINE_CLSID!(CLSID_MidiInPort = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,73,110,80,111,114,116,0]); + DEFINE_IID!(IID_IMidiOutPortStatics, 106742761, 3976, 17547, 155, 100, 169, 88, 38, 198, 91, 143); + RT_INTERFACE!{static interface IMidiOutPortStatics(IMidiOutPortStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMidiOutPortStatics] { + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMidiOutPortStatics { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MidiOutPort: IMidiOutPort} + RT_ACTIVATABLE!{IMidiOutPortStatics [CLSID_MidiOutPort]} + DEFINE_CLSID!(CLSID_MidiOutPort = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,79,117,116,80,111,114,116,0]); + DEFINE_IID!(IID_IMidiSynthesizerStatics, 1109715624, 26153, 19819, 170, 143, 212, 82, 26, 90, 49, 206); + RT_INTERFACE!{static interface IMidiSynthesizerStatics(IMidiSynthesizerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSynthesizerStatics] { + fn CreateAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFromAudioDeviceAsync(&mut self, audioDevice: *mut super::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn IsSynthesizer(&mut self, midiDevice: *mut super::enumeration::DeviceInformation, out: *mut bool) -> HRESULT + }} + impl IMidiSynthesizerStatics { + #[inline] pub unsafe fn create_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_audio_device_async(&mut self, audioDevice: &super::enumeration::DeviceInformation) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromAudioDeviceAsync)(self, audioDevice as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_synthesizer(&mut self, midiDevice: &super::enumeration::DeviceInformation) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsSynthesizer)(self, midiDevice as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MidiSynthesizer: IMidiSynthesizer} + RT_ACTIVATABLE!{IMidiSynthesizerStatics [CLSID_MidiSynthesizer]} + DEFINE_CLSID!(CLSID_MidiSynthesizer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,77,105,100,105,46,77,105,100,105,83,121,110,116,104,101,115,105,122,101,114,0]); + DEFINE_IID!(IID_IMidiOutPort, 2468179359, 22434, 19002, 173, 184, 70, 64, 136, 111, 102, 147); + RT_INTERFACE!{interface IMidiOutPort(IMidiOutPortVtbl): IInspectable(IInspectableVtbl) [IID_IMidiOutPort] { + fn SendMessage(&mut self, midiMessage: *mut IMidiMessage) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SendBuffer(&mut self, midiData: *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMidiOutPort { + #[inline] pub unsafe fn send_message(&mut self, midiMessage: &IMidiMessage) -> Result<()> { + let hr = ((*self.lpVtbl).SendMessage)(self, midiMessage as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_buffer(&mut self, midiData: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).SendBuffer)(self, midiData as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiInPort, 3586251227, 38682, 20143, 162, 61, 234, 25, 254, 96, 127, 249); + RT_INTERFACE!{interface IMidiInPort(IMidiInPortVtbl): IInspectable(IInspectableVtbl) [IID_IMidiInPort] { + fn add_MessageReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMidiInPort { + #[inline] pub unsafe fn add_message_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MessageReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_message_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MessageReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMidiSynthesizer, 4040824158, 56208, 16479, 184, 174, 33, 210, 225, 127, 46, 69); + RT_INTERFACE!{interface IMidiSynthesizer(IMidiSynthesizerVtbl): IInspectable(IInspectableVtbl) [IID_IMidiSynthesizer] { + fn get_AudioDevice(&mut self, out: *mut *mut super::enumeration::DeviceInformation) -> HRESULT, + fn get_Volume(&mut self, out: *mut f64) -> HRESULT, + fn put_Volume(&mut self, value: f64) -> HRESULT + }} + impl IMidiSynthesizer { + #[inline] pub unsafe fn get_audio_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudioDevice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_volume(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Volume)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_volume(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Volume)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Devices.Midi +pub mod perception { // Windows.Devices.Perception +use ::prelude::*; + RT_ENUM! { enum PerceptionFrameSourceAccessStatus: i32 { + Unspecified (PerceptionFrameSourceAccessStatus_Unspecified) = 0, Allowed (PerceptionFrameSourceAccessStatus_Allowed) = 1, DeniedByUser (PerceptionFrameSourceAccessStatus_DeniedByUser) = 2, DeniedBySystem (PerceptionFrameSourceAccessStatus_DeniedBySystem) = 3, + }} + RT_ENUM! { enum PerceptionFrameSourcePropertyChangeStatus: i32 { + Unknown (PerceptionFrameSourcePropertyChangeStatus_Unknown) = 0, Accepted (PerceptionFrameSourcePropertyChangeStatus_Accepted) = 1, LostControl (PerceptionFrameSourcePropertyChangeStatus_LostControl) = 2, PropertyNotSupported (PerceptionFrameSourcePropertyChangeStatus_PropertyNotSupported) = 3, PropertyReadOnly (PerceptionFrameSourcePropertyChangeStatus_PropertyReadOnly) = 4, ValueOutOfRange (PerceptionFrameSourcePropertyChangeStatus_ValueOutOfRange) = 5, + }} + DEFINE_IID!(IID_IPerceptionColorFrameSourceWatcher, 2528973714, 58983, 16580, 137, 249, 20, 98, 222, 166, 169, 204); + RT_INTERFACE!{interface IPerceptionColorFrameSourceWatcher(IPerceptionColorFrameSourceWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSourceWatcher] { + fn add_SourceAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Status(&mut self, out: *mut super::enumeration::DeviceWatcherStatus) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IPerceptionColorFrameSourceWatcher { + #[inline] pub unsafe fn add_source_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceAdded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionColorFrameSourceWatcher: IPerceptionColorFrameSourceWatcher} + RT_CLASS!{class PerceptionColorFrameSourceAddedEventArgs: IPerceptionColorFrameSourceAddedEventArgs} + RT_CLASS!{class PerceptionColorFrameSourceRemovedEventArgs: IPerceptionColorFrameSourceRemovedEventArgs} + DEFINE_IID!(IID_IPerceptionDepthFrameSourceWatcher, 2014222033, 36098, 19755, 173, 164, 91, 166, 36, 160, 235, 16); + RT_INTERFACE!{interface IPerceptionDepthFrameSourceWatcher(IPerceptionDepthFrameSourceWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSourceWatcher] { + fn add_SourceAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Status(&mut self, out: *mut super::enumeration::DeviceWatcherStatus) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IPerceptionDepthFrameSourceWatcher { + #[inline] pub unsafe fn add_source_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceAdded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionDepthFrameSourceWatcher: IPerceptionDepthFrameSourceWatcher} + RT_CLASS!{class PerceptionDepthFrameSourceAddedEventArgs: IPerceptionDepthFrameSourceAddedEventArgs} + RT_CLASS!{class PerceptionDepthFrameSourceRemovedEventArgs: IPerceptionDepthFrameSourceRemovedEventArgs} + DEFINE_IID!(IID_IPerceptionInfraredFrameSourceWatcher, 943521689, 55052, 17485, 168, 176, 114, 12, 46, 102, 254, 59); + RT_INTERFACE!{interface IPerceptionInfraredFrameSourceWatcher(IPerceptionInfraredFrameSourceWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSourceWatcher] { + fn add_SourceAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Status(&mut self, out: *mut super::enumeration::DeviceWatcherStatus) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IPerceptionInfraredFrameSourceWatcher { + #[inline] pub unsafe fn add_source_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceAdded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionInfraredFrameSourceWatcher: IPerceptionInfraredFrameSourceWatcher} + RT_CLASS!{class PerceptionInfraredFrameSourceAddedEventArgs: IPerceptionInfraredFrameSourceAddedEventArgs} + RT_CLASS!{class PerceptionInfraredFrameSourceRemovedEventArgs: IPerceptionInfraredFrameSourceRemovedEventArgs} + DEFINE_IID!(IID_IPerceptionColorFrameSourceAddedEventArgs, 3513513190, 55844, 17452, 187, 213, 85, 84, 155, 91, 148, 243); + RT_INTERFACE!{interface IPerceptionColorFrameSourceAddedEventArgs(IPerceptionColorFrameSourceAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSourceAddedEventArgs] { + fn get_FrameSource(&mut self, out: *mut *mut PerceptionColorFrameSource) -> HRESULT + }} + impl IPerceptionColorFrameSourceAddedEventArgs { + #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionColorFrameSource: IPerceptionColorFrameSource} + RT_ACTIVATABLE!{IPerceptionColorFrameSourceStatics [CLSID_PerceptionColorFrameSource]} + DEFINE_CLSID!(CLSID_PerceptionColorFrameSource = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,101,114,99,101,112,116,105,111,110,67,111,108,111,114,70,114,97,109,101,83,111,117,114,99,101,0]); + DEFINE_IID!(IID_IPerceptionColorFrameSourceRemovedEventArgs, 3531078249, 60236, 17135, 186, 79, 40, 143, 97, 92, 147, 193); + RT_INTERFACE!{interface IPerceptionColorFrameSourceRemovedEventArgs(IPerceptionColorFrameSourceRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSourceRemovedEventArgs] { + fn get_FrameSource(&mut self, out: *mut *mut PerceptionColorFrameSource) -> HRESULT + }} + impl IPerceptionColorFrameSourceRemovedEventArgs { + #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionDepthFrameSourceAddedEventArgs, 2477031784, 35832, 17874, 162, 248, 74, 192, 147, 28, 199, 166); + RT_INTERFACE!{interface IPerceptionDepthFrameSourceAddedEventArgs(IPerceptionDepthFrameSourceAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSourceAddedEventArgs] { + fn get_FrameSource(&mut self, out: *mut *mut PerceptionDepthFrameSource) -> HRESULT + }} + impl IPerceptionDepthFrameSourceAddedEventArgs { + #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionDepthFrameSource: IPerceptionDepthFrameSource} + RT_ACTIVATABLE!{IPerceptionDepthFrameSourceStatics [CLSID_PerceptionDepthFrameSource]} + DEFINE_CLSID!(CLSID_PerceptionDepthFrameSource = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,101,114,99,101,112,116,105,111,110,68,101,112,116,104,70,114,97,109,101,83,111,117,114,99,101,0]); + DEFINE_IID!(IID_IPerceptionDepthFrameSourceRemovedEventArgs, 2696989773, 59756, 19841, 134, 221, 56, 185, 94, 73, 198, 223); + RT_INTERFACE!{interface IPerceptionDepthFrameSourceRemovedEventArgs(IPerceptionDepthFrameSourceRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSourceRemovedEventArgs] { + fn get_FrameSource(&mut self, out: *mut *mut PerceptionDepthFrameSource) -> HRESULT + }} + impl IPerceptionDepthFrameSourceRemovedEventArgs { + #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionInfraredFrameSourceAddedEventArgs, 1832075552, 38350, 18016, 144, 122, 217, 128, 53, 170, 43, 124); + RT_INTERFACE!{interface IPerceptionInfraredFrameSourceAddedEventArgs(IPerceptionInfraredFrameSourceAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSourceAddedEventArgs] { + fn get_FrameSource(&mut self, out: *mut *mut PerceptionInfraredFrameSource) -> HRESULT + }} + impl IPerceptionInfraredFrameSourceAddedEventArgs { + #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionInfraredFrameSource: IPerceptionInfraredFrameSource} + RT_ACTIVATABLE!{IPerceptionInfraredFrameSourceStatics [CLSID_PerceptionInfraredFrameSource]} + DEFINE_CLSID!(CLSID_PerceptionInfraredFrameSource = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,101,114,99,101,112,116,105,111,110,73,110,102,114,97,114,101,100,70,114,97,109,101,83,111,117,114,99,101,0]); + DEFINE_IID!(IID_IPerceptionInfraredFrameSourceRemovedEventArgs, 3927605361, 31344, 19041, 175, 148, 7, 48, 56, 83, 246, 149); + RT_INTERFACE!{interface IPerceptionInfraredFrameSourceRemovedEventArgs(IPerceptionInfraredFrameSourceRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSourceRemovedEventArgs] { + fn get_FrameSource(&mut self, out: *mut *mut PerceptionInfraredFrameSource) -> HRESULT + }} + impl IPerceptionInfraredFrameSourceRemovedEventArgs { + #[inline] pub unsafe fn get_frame_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownPerceptionFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 71); + RT_INTERFACE!{static interface IKnownPerceptionFrameSourcePropertiesStatics(IKnownPerceptionFrameSourcePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionFrameSourcePropertiesStatics] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PhysicalDeviceIds(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FrameKind(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DeviceModelVersion(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EnclosureLocation(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownPerceptionFrameSourcePropertiesStatics { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_physical_device_ids(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhysicalDeviceIds)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_kind(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameKind)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_model_version(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceModelVersion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_enclosure_location(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EnclosureLocation)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownPerceptionFrameSourcePropertiesStatics2, 2848483441, 1500, 19021, 138, 92, 164, 236, 242, 107, 188, 70); + RT_INTERFACE!{static interface IKnownPerceptionFrameSourcePropertiesStatics2(IKnownPerceptionFrameSourcePropertiesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionFrameSourcePropertiesStatics2] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownPerceptionFrameSourcePropertiesStatics2 { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownPerceptionVideoFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 72); + RT_INTERFACE!{static interface IKnownPerceptionVideoFrameSourcePropertiesStatics(IKnownPerceptionVideoFrameSourcePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionVideoFrameSourcePropertiesStatics] { + fn get_VideoProfile(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SupportedVideoProfiles(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AvailableVideoProfiles(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsMirrored(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CameraIntrinsics(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownPerceptionVideoFrameSourcePropertiesStatics { + #[inline] pub unsafe fn get_video_profile(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoProfile)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_video_profiles(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_available_video_profiles(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_mirrored(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsMirrored)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_camera_intrinsics(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownPerceptionInfraredFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 73); + RT_INTERFACE!{static interface IKnownPerceptionInfraredFrameSourcePropertiesStatics(IKnownPerceptionInfraredFrameSourcePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionInfraredFrameSourcePropertiesStatics] { + fn get_Exposure(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AutoExposureEnabled(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ExposureCompensation(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ActiveIlluminationEnabled(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AmbientSubtractionEnabled(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_StructureLightPatternEnabled(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_InterleavedIlluminationEnabled(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownPerceptionInfraredFrameSourcePropertiesStatics { + #[inline] pub unsafe fn get_exposure(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Exposure)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_exposure_enabled(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AutoExposureEnabled)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_exposure_compensation(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExposureCompensation)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_active_illumination_enabled(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActiveIlluminationEnabled)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ambient_subtraction_enabled(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AmbientSubtractionEnabled)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_structure_light_pattern_enabled(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StructureLightPatternEnabled)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_interleaved_illumination_enabled(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InterleavedIlluminationEnabled)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownPerceptionDepthFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 74); + RT_INTERFACE!{static interface IKnownPerceptionDepthFrameSourcePropertiesStatics(IKnownPerceptionDepthFrameSourcePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionDepthFrameSourcePropertiesStatics] { + fn get_MinDepth(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MaxDepth(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownPerceptionDepthFrameSourcePropertiesStatics { + #[inline] pub unsafe fn get_min_depth(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MinDepth)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_depth(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxDepth)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownPerceptionColorFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 75); + RT_INTERFACE!{static interface IKnownPerceptionColorFrameSourcePropertiesStatics(IKnownPerceptionColorFrameSourcePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionColorFrameSourcePropertiesStatics] { + fn get_Exposure(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AutoExposureEnabled(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ExposureCompensation(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownPerceptionColorFrameSourcePropertiesStatics { + #[inline] pub unsafe fn get_exposure(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Exposure)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_exposure_enabled(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AutoExposureEnabled)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_exposure_compensation(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExposureCompensation)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownPerceptionVideoProfilePropertiesStatics, 2399724263, 23158, 17379, 161, 58, 218, 61, 145, 169, 239, 152); + RT_INTERFACE!{static interface IKnownPerceptionVideoProfilePropertiesStatics(IKnownPerceptionVideoProfilePropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionVideoProfilePropertiesStatics] { + fn get_BitmapPixelFormat(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BitmapAlphaMode(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Width(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Height(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FrameDuration(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownPerceptionVideoProfilePropertiesStatics { + #[inline] pub unsafe fn get_bitmap_pixel_format(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BitmapPixelFormat)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitmap_alpha_mode(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BitmapAlphaMode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_duration(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameDuration)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownCameraIntrinsicsPropertiesStatics, 146815352, 17274, 19863, 166, 99, 253, 49, 149, 96, 2, 73); + RT_INTERFACE!{static interface IKnownCameraIntrinsicsPropertiesStatics(IKnownCameraIntrinsicsPropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownCameraIntrinsicsPropertiesStatics] { + fn get_FocalLength(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PrincipalPoint(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RadialDistortion(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TangentialDistortion(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownCameraIntrinsicsPropertiesStatics { + #[inline] pub unsafe fn get_focal_length(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FocalLength)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_principal_point(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrincipalPoint)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_radial_distortion(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RadialDistortion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tangential_distortion(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TangentialDistortion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionFrameSourcePropertyChangeResult, 506673418, 15504, 19746, 184, 152, 244, 43, 186, 100, 24, 255); + RT_INTERFACE!{interface IPerceptionFrameSourcePropertyChangeResult(IPerceptionFrameSourcePropertyChangeResultVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameSourcePropertyChangeResult] { + fn get_Status(&mut self, out: *mut PerceptionFrameSourcePropertyChangeStatus) -> HRESULT, + fn get_NewValue(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IPerceptionFrameSourcePropertyChangeResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NewValue)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionControlSession: IPerceptionControlSession} + RT_CLASS!{class PerceptionFrameSourcePropertyChangeResult: IPerceptionFrameSourcePropertyChangeResult} + DEFINE_IID!(IID_IPerceptionFrameSourcePropertiesChangedEventArgs, 1818812520, 48369, 20172, 184, 145, 118, 37, 209, 36, 75, 107); + RT_INTERFACE!{interface IPerceptionFrameSourcePropertiesChangedEventArgs(IPerceptionFrameSourcePropertiesChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameSourcePropertiesChangedEventArgs] { + fn get_CollectionChange(&mut self, out: *mut super::super::foundation::collections::CollectionChange) -> HRESULT, + fn get_Key(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPerceptionFrameSourcePropertiesChangedEventArgs { + #[inline] pub unsafe fn get_collection_change(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CollectionChange)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_key(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Key)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionInfraredFrameSourceStatics, 1576258722, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 71); + RT_INTERFACE!{static interface IPerceptionInfraredFrameSourceStatics(IPerceptionInfraredFrameSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSourceStatics] { + fn CreateWatcher(&mut self, out: *mut *mut PerceptionInfraredFrameSourceWatcher) -> HRESULT, + fn FindAllAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FromIdAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPerceptionInfraredFrameSourceStatics { + #[inline] pub unsafe fn create_watcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, id: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionDepthFrameSourceStatics, 1576258722, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 72); + RT_INTERFACE!{static interface IPerceptionDepthFrameSourceStatics(IPerceptionDepthFrameSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSourceStatics] { + fn CreateWatcher(&mut self, out: *mut *mut PerceptionDepthFrameSourceWatcher) -> HRESULT, + fn FindAllAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FromIdAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPerceptionDepthFrameSourceStatics { + #[inline] pub unsafe fn create_watcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, id: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionColorFrameSourceStatics, 1576258722, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 73); + RT_INTERFACE!{static interface IPerceptionColorFrameSourceStatics(IPerceptionColorFrameSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSourceStatics] { + fn CreateWatcher(&mut self, out: *mut *mut PerceptionColorFrameSourceWatcher) -> HRESULT, + fn FindAllAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FromIdAsync(&mut self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPerceptionColorFrameSourceStatics { + #[inline] pub unsafe fn create_watcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, id: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionColorFrameSource, 3698178684, 2904, 18061, 156, 161, 109, 176, 76, 192, 71, 124); + RT_INTERFACE!{interface IPerceptionColorFrameSource(IPerceptionColorFrameSourceVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSource] { + fn add_AvailableChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AvailableChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ActiveChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ActiveChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PropertiesChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PropertiesChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoProfileChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoProfileChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CameraIntrinsicsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraIntrinsicsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DeviceKind(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Available(&mut self, out: *mut bool) -> HRESULT, + fn get_Active(&mut self, out: *mut bool) -> HRESULT, + fn get_IsControlled(&mut self, out: *mut bool) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_SupportedVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_AvailableVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_VideoProfile(&mut self, out: *mut *mut PerceptionVideoProfile) -> HRESULT, + #[cfg(not(feature="windows.media"))] fn __Dummy20(&mut self) -> (), + #[cfg(feature="windows.media")] fn get_CameraIntrinsics(&mut self, out: *mut *mut super::super::media::devices::core::CameraIntrinsics) -> HRESULT, + fn AcquireControlSession(&mut self, out: *mut *mut PerceptionControlSession) -> HRESULT, + fn CanControlIndependentlyFrom(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, + fn IsCorrelatedWith(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, + fn TryGetTransformTo(&mut self, targetId: HSTRING, result: *mut super::super::foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, + fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&mut self, correlatedDepthFrameSource: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryGetDepthCorrelatedCoordinateMapperAsync(&mut self, targetSourceId: HSTRING, correlatedDepthFrameSource: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TrySetVideoProfileAsync(&mut self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn OpenReader(&mut self, out: *mut *mut PerceptionColorFrameReader) -> HRESULT + }} + impl IPerceptionColorFrameSource { + #[inline] pub unsafe fn add_available_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AvailableChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_available_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AvailableChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_active_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ActiveChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_active_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ActiveChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_properties_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PropertiesChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_properties_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PropertiesChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_video_profile_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VideoProfileChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_video_profile_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VideoProfileChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_camera_intrinsics_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CameraIntrinsicsChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_camera_intrinsics_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CameraIntrinsicsChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_kind(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceKind)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_available(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Available)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Active)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_controlled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsControlled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_video_profiles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_available_video_profiles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_profile(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoProfile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_camera_intrinsics(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn acquire_control_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AcquireControlSession)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn can_control_independently_from(&mut self, targetId: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanControlIndependentlyFrom)(self, targetId.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_correlated_with(&mut self, targetId: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsCorrelatedWith)(self, targetId.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_transform_to(&mut self, targetId: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix4x4, bool)> { + let mut result = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetTransformTo)(self, targetId.get(), &mut result, &mut out); + if hr == S_OK { Ok((result, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_depth_correlated_camera_intrinsics_async(&mut self, correlatedDepthFrameSource: &PerceptionDepthFrameSource) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCameraIntrinsicsAsync)(self, correlatedDepthFrameSource as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_depth_correlated_coordinate_mapper_async(&mut self, targetSourceId: &HStringArg, correlatedDepthFrameSource: &PerceptionDepthFrameSource) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCoordinateMapperAsync)(self, targetSourceId.get(), correlatedDepthFrameSource as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_video_profile_async(&mut self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TrySetVideoProfileAsync)(self, controlSession as *const _ as *mut _, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn open_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionFrameSourcePropertiesChangedEventArgs: IPerceptionFrameSourcePropertiesChangedEventArgs} + RT_CLASS!{class PerceptionVideoProfile: IPerceptionVideoProfile} + RT_CLASS!{class PerceptionDepthCorrelatedCameraIntrinsics: IPerceptionDepthCorrelatedCameraIntrinsics} + RT_CLASS!{class PerceptionDepthCorrelatedCoordinateMapper: IPerceptionDepthCorrelatedCoordinateMapper} + RT_CLASS!{class PerceptionColorFrameReader: IPerceptionColorFrameReader} + DEFINE_IID!(IID_IPerceptionColorFrameSource2, 4169140453, 22065, 17901, 173, 152, 140, 106, 160, 76, 251, 145); + RT_INTERFACE!{interface IPerceptionColorFrameSource2(IPerceptionColorFrameSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameSource2] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPerceptionColorFrameSource2 { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionDepthFrameSource, 2043950038, 18427, 19953, 191, 201, 240, 29, 64, 189, 153, 66); + RT_INTERFACE!{interface IPerceptionDepthFrameSource(IPerceptionDepthFrameSourceVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSource] { + fn add_AvailableChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AvailableChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ActiveChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ActiveChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PropertiesChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PropertiesChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoProfileChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoProfileChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CameraIntrinsicsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraIntrinsicsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DeviceKind(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Available(&mut self, out: *mut bool) -> HRESULT, + fn get_Active(&mut self, out: *mut bool) -> HRESULT, + fn get_IsControlled(&mut self, out: *mut bool) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_SupportedVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_AvailableVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_VideoProfile(&mut self, out: *mut *mut PerceptionVideoProfile) -> HRESULT, + #[cfg(not(feature="windows.media"))] fn __Dummy20(&mut self) -> (), + #[cfg(feature="windows.media")] fn get_CameraIntrinsics(&mut self, out: *mut *mut super::super::media::devices::core::CameraIntrinsics) -> HRESULT, + fn AcquireControlSession(&mut self, out: *mut *mut PerceptionControlSession) -> HRESULT, + fn CanControlIndependentlyFrom(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, + fn IsCorrelatedWith(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, + fn TryGetTransformTo(&mut self, targetId: HSTRING, result: *mut super::super::foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, + fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&mut self, target: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryGetDepthCorrelatedCoordinateMapperAsync(&mut self, targetId: HSTRING, depthFrameSourceToMapWith: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TrySetVideoProfileAsync(&mut self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn OpenReader(&mut self, out: *mut *mut PerceptionDepthFrameReader) -> HRESULT + }} + impl IPerceptionDepthFrameSource { + #[inline] pub unsafe fn add_available_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AvailableChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_available_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AvailableChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_active_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ActiveChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_active_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ActiveChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_properties_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PropertiesChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_properties_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PropertiesChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_video_profile_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VideoProfileChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_video_profile_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VideoProfileChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_camera_intrinsics_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CameraIntrinsicsChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_camera_intrinsics_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CameraIntrinsicsChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_kind(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceKind)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_available(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Available)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Active)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_controlled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsControlled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_video_profiles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_available_video_profiles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_profile(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoProfile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_camera_intrinsics(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn acquire_control_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AcquireControlSession)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn can_control_independently_from(&mut self, targetId: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanControlIndependentlyFrom)(self, targetId.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_correlated_with(&mut self, targetId: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsCorrelatedWith)(self, targetId.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_transform_to(&mut self, targetId: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix4x4, bool)> { + let mut result = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetTransformTo)(self, targetId.get(), &mut result, &mut out); + if hr == S_OK { Ok((result, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_depth_correlated_camera_intrinsics_async(&mut self, target: &PerceptionDepthFrameSource) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCameraIntrinsicsAsync)(self, target as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_depth_correlated_coordinate_mapper_async(&mut self, targetId: &HStringArg, depthFrameSourceToMapWith: &PerceptionDepthFrameSource) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCoordinateMapperAsync)(self, targetId.get(), depthFrameSourceToMapWith as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_video_profile_async(&mut self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TrySetVideoProfileAsync)(self, controlSession as *const _ as *mut _, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn open_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionDepthFrameReader: IPerceptionDepthFrameReader} + DEFINE_IID!(IID_IPerceptionDepthFrameSource2, 3822206254, 28204, 20077, 145, 217, 112, 76, 216, 223, 247, 157); + RT_INTERFACE!{interface IPerceptionDepthFrameSource2(IPerceptionDepthFrameSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameSource2] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPerceptionDepthFrameSource2 { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionInfraredFrameSource, 1437632322, 6152, 18766, 158, 48, 157, 42, 123, 232, 247, 0); + RT_INTERFACE!{interface IPerceptionInfraredFrameSource(IPerceptionInfraredFrameSourceVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSource] { + fn add_AvailableChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AvailableChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ActiveChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ActiveChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PropertiesChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PropertiesChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoProfileChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoProfileChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CameraIntrinsicsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraIntrinsicsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DeviceKind(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Available(&mut self, out: *mut bool) -> HRESULT, + fn get_Active(&mut self, out: *mut bool) -> HRESULT, + fn get_IsControlled(&mut self, out: *mut bool) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_SupportedVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_AvailableVideoProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_VideoProfile(&mut self, out: *mut *mut PerceptionVideoProfile) -> HRESULT, + #[cfg(not(feature="windows.media"))] fn __Dummy20(&mut self) -> (), + #[cfg(feature="windows.media")] fn get_CameraIntrinsics(&mut self, out: *mut *mut super::super::media::devices::core::CameraIntrinsics) -> HRESULT, + fn AcquireControlSession(&mut self, out: *mut *mut PerceptionControlSession) -> HRESULT, + fn CanControlIndependentlyFrom(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, + fn IsCorrelatedWith(&mut self, targetId: HSTRING, out: *mut bool) -> HRESULT, + fn TryGetTransformTo(&mut self, targetId: HSTRING, result: *mut super::super::foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, + fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&mut self, target: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryGetDepthCorrelatedCoordinateMapperAsync(&mut self, targetId: HSTRING, depthFrameSourceToMapWith: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TrySetVideoProfileAsync(&mut self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn OpenReader(&mut self, out: *mut *mut PerceptionInfraredFrameReader) -> HRESULT + }} + impl IPerceptionInfraredFrameSource { + #[inline] pub unsafe fn add_available_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AvailableChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_available_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AvailableChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_active_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ActiveChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_active_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ActiveChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_properties_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PropertiesChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_properties_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PropertiesChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_video_profile_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VideoProfileChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_video_profile_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VideoProfileChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_camera_intrinsics_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CameraIntrinsicsChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_camera_intrinsics_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CameraIntrinsicsChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_kind(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceKind)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_available(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Available)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Active)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_controlled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsControlled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_video_profiles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_available_video_profiles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_profile(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoProfile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_camera_intrinsics(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn acquire_control_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AcquireControlSession)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn can_control_independently_from(&mut self, targetId: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanControlIndependentlyFrom)(self, targetId.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_correlated_with(&mut self, targetId: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsCorrelatedWith)(self, targetId.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_transform_to(&mut self, targetId: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix4x4, bool)> { + let mut result = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetTransformTo)(self, targetId.get(), &mut result, &mut out); + if hr == S_OK { Ok((result, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_depth_correlated_camera_intrinsics_async(&mut self, target: &PerceptionDepthFrameSource) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCameraIntrinsicsAsync)(self, target as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_depth_correlated_coordinate_mapper_async(&mut self, targetId: &HStringArg, depthFrameSourceToMapWith: &PerceptionDepthFrameSource) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCoordinateMapperAsync)(self, targetId.get(), depthFrameSourceToMapWith as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_video_profile_async(&mut self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TrySetVideoProfileAsync)(self, controlSession as *const _ as *mut _, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn open_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionInfraredFrameReader: IPerceptionInfraredFrameReader} + DEFINE_IID!(IID_IPerceptionInfraredFrameSource2, 3704936344, 19211, 17152, 141, 133, 65, 8, 23, 250, 160, 50); + RT_INTERFACE!{interface IPerceptionInfraredFrameSource2(IPerceptionInfraredFrameSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameSource2] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPerceptionInfraredFrameSource2 { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionVideoProfile, 1970683555, 282, 18190, 130, 37, 111, 5, 173, 226, 86, 72); + RT_INTERFACE!{interface IPerceptionVideoProfile(IPerceptionVideoProfileVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionVideoProfile] { + #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_BitmapPixelFormat(&mut self, out: *mut super::super::graphics::imaging::BitmapPixelFormat) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_BitmapAlphaMode(&mut self, out: *mut super::super::graphics::imaging::BitmapAlphaMode) -> HRESULT, + fn get_Width(&mut self, out: *mut i32) -> HRESULT, + fn get_Height(&mut self, out: *mut i32) -> HRESULT, + fn get_FrameDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn IsEqual(&mut self, other: *mut PerceptionVideoProfile, out: *mut bool) -> HRESULT + }} + impl IPerceptionVideoProfile { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_bitmap_pixel_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BitmapPixelFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_bitmap_alpha_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BitmapAlphaMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FrameDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_equal(&mut self, other: &PerceptionVideoProfile) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEqual)(self, other as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionColorFrameArrivedEventArgs: IPerceptionColorFrameArrivedEventArgs} + RT_CLASS!{class PerceptionColorFrame: IPerceptionColorFrame} + RT_CLASS!{class PerceptionDepthFrameArrivedEventArgs: IPerceptionDepthFrameArrivedEventArgs} + RT_CLASS!{class PerceptionDepthFrame: IPerceptionDepthFrame} + RT_CLASS!{class PerceptionInfraredFrameArrivedEventArgs: IPerceptionInfraredFrameArrivedEventArgs} + RT_CLASS!{class PerceptionInfraredFrame: IPerceptionInfraredFrame} + DEFINE_IID!(IID_IPerceptionColorFrameArrivedEventArgs, 2410480341, 34551, 19853, 185, 102, 90, 55, 97, 186, 159, 89); + RT_INTERFACE!{interface IPerceptionColorFrameArrivedEventArgs(IPerceptionColorFrameArrivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameArrivedEventArgs] { + fn get_RelativeTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn TryOpenFrame(&mut self, out: *mut *mut PerceptionColorFrame) -> HRESULT + }} + impl IPerceptionColorFrameArrivedEventArgs { + #[inline] pub unsafe fn get_relative_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RelativeTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_open_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryOpenFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionDepthFrameArrivedEventArgs, 1144858034, 45698, 17975, 145, 115, 172, 151, 132, 53, 201, 133); + RT_INTERFACE!{interface IPerceptionDepthFrameArrivedEventArgs(IPerceptionDepthFrameArrivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameArrivedEventArgs] { + fn get_RelativeTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn TryOpenFrame(&mut self, out: *mut *mut PerceptionDepthFrame) -> HRESULT + }} + impl IPerceptionDepthFrameArrivedEventArgs { + #[inline] pub unsafe fn get_relative_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RelativeTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_open_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryOpenFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionInfraredFrameArrivedEventArgs, 2675440327, 46269, 18519, 157, 80, 190, 142, 240, 117, 218, 239); + RT_INTERFACE!{interface IPerceptionInfraredFrameArrivedEventArgs(IPerceptionInfraredFrameArrivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameArrivedEventArgs] { + fn get_RelativeTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn TryOpenFrame(&mut self, out: *mut *mut PerceptionInfraredFrame) -> HRESULT + }} + impl IPerceptionInfraredFrameArrivedEventArgs { + #[inline] pub unsafe fn get_relative_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RelativeTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_open_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryOpenFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionDepthCorrelatedCameraIntrinsics, 1699269121, 34526, 23521, 101, 130, 128, 127, 207, 76, 149, 207); + RT_INTERFACE!{interface IPerceptionDepthCorrelatedCameraIntrinsics(IPerceptionDepthCorrelatedCameraIntrinsicsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthCorrelatedCameraIntrinsics] { + fn UnprojectPixelAtCorrelatedDepth(&mut self, pixelCoordinate: super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn UnprojectPixelsAtCorrelatedDepth(&mut self, sourceCoordinatesSize: u32, sourceCoordinates: *mut super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn UnprojectRegionPixelsAtCorrelatedDepthAsync(&mut self, region: super::super::foundation::Rect, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn UnprojectAllPixelsAtCorrelatedDepthAsync(&mut self, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IPerceptionDepthCorrelatedCameraIntrinsics { + #[inline] pub unsafe fn unproject_pixel_at_correlated_depth(&mut self, pixelCoordinate: super::super::foundation::Point, depthFrame: &PerceptionDepthFrame) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).UnprojectPixelAtCorrelatedDepth)(self, pixelCoordinate, depthFrame as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn unproject_pixels_at_correlated_depth(&mut self, sourceCoordinates: &[super::super::foundation::Point], depthFrame: &PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).UnprojectPixelsAtCorrelatedDepth)(self, sourceCoordinates.len() as u32, sourceCoordinates.as_ptr() as *mut _, depthFrame as *const _ as *mut _, resultsSize, results); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn unproject_region_pixels_at_correlated_depth_async(&mut self, region: super::super::foundation::Rect, depthFrame: &PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnprojectRegionPixelsAtCorrelatedDepthAsync)(self, region, depthFrame as *const _ as *mut _, resultsSize, results, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn unproject_all_pixels_at_correlated_depth_async(&mut self, depthFrame: &PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnprojectAllPixelsAtCorrelatedDepthAsync)(self, depthFrame as *const _ as *mut _, resultsSize, results, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionDepthCorrelatedCoordinateMapper, 1531813149, 46582, 18076, 184, 194, 185, 122, 69, 230, 134, 59); + RT_INTERFACE!{interface IPerceptionDepthCorrelatedCoordinateMapper(IPerceptionDepthCorrelatedCoordinateMapperVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthCorrelatedCoordinateMapper] { + fn MapPixelToTarget(&mut self, sourcePixelCoordinate: super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, out: *mut super::super::foundation::Point) -> HRESULT, + fn MapPixelsToTarget(&mut self, sourceCoordinatesSize: u32, sourceCoordinates: *mut super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::Point) -> HRESULT, + fn MapRegionOfPixelsToTargetAsync(&mut self, region: super::super::foundation::Rect, depthFrame: *mut PerceptionDepthFrame, targetCoordinatesSize: u32, targetCoordinates: *mut super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn MapAllPixelsToTargetAsync(&mut self, depthFrame: *mut PerceptionDepthFrame, targetCoordinatesSize: u32, targetCoordinates: *mut super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IPerceptionDepthCorrelatedCoordinateMapper { + #[inline] pub unsafe fn map_pixel_to_target(&mut self, sourcePixelCoordinate: super::super::foundation::Point, depthFrame: &PerceptionDepthFrame) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).MapPixelToTarget)(self, sourcePixelCoordinate, depthFrame as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn map_pixels_to_target(&mut self, sourceCoordinates: &[super::super::foundation::Point], depthFrame: &PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).MapPixelsToTarget)(self, sourceCoordinates.len() as u32, sourceCoordinates.as_ptr() as *mut _, depthFrame as *const _ as *mut _, resultsSize, results); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn map_region_of_pixels_to_target_async(&mut self, region: super::super::foundation::Rect, depthFrame: &PerceptionDepthFrame, targetCoordinatesSize: u32, targetCoordinates: *mut super::super::foundation::Point) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MapRegionOfPixelsToTargetAsync)(self, region, depthFrame as *const _ as *mut _, targetCoordinatesSize, targetCoordinates, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn map_all_pixels_to_target_async(&mut self, depthFrame: &PerceptionDepthFrame, targetCoordinatesSize: u32, targetCoordinates: *mut super::super::foundation::Point) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MapAllPixelsToTargetAsync)(self, depthFrame as *const _ as *mut _, targetCoordinatesSize, targetCoordinates, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKnownPerceptionFrameSourcePropertiesStatics [CLSID_KnownPerceptionFrameSourceProperties]} + RT_ACTIVATABLE!{IKnownPerceptionFrameSourcePropertiesStatics2 [CLSID_KnownPerceptionFrameSourceProperties]} + DEFINE_CLSID!(CLSID_KnownPerceptionFrameSourceProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,70,114,97,109,101,83,111,117,114,99,101,80,114,111,112,101,114,116,105,101,115,0]); + RT_ACTIVATABLE!{IKnownPerceptionVideoFrameSourcePropertiesStatics [CLSID_KnownPerceptionVideoFrameSourceProperties]} + DEFINE_CLSID!(CLSID_KnownPerceptionVideoFrameSourceProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,86,105,100,101,111,70,114,97,109,101,83,111,117,114,99,101,80,114,111,112,101,114,116,105,101,115,0]); + RT_ACTIVATABLE!{IKnownPerceptionInfraredFrameSourcePropertiesStatics [CLSID_KnownPerceptionInfraredFrameSourceProperties]} + DEFINE_CLSID!(CLSID_KnownPerceptionInfraredFrameSourceProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,73,110,102,114,97,114,101,100,70,114,97,109,101,83,111,117,114,99,101,80,114,111,112,101,114,116,105,101,115,0]); + RT_ACTIVATABLE!{IKnownPerceptionDepthFrameSourcePropertiesStatics [CLSID_KnownPerceptionDepthFrameSourceProperties]} + DEFINE_CLSID!(CLSID_KnownPerceptionDepthFrameSourceProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,68,101,112,116,104,70,114,97,109,101,83,111,117,114,99,101,80,114,111,112,101,114,116,105,101,115,0]); + RT_ACTIVATABLE!{IKnownPerceptionColorFrameSourcePropertiesStatics [CLSID_KnownPerceptionColorFrameSourceProperties]} + DEFINE_CLSID!(CLSID_KnownPerceptionColorFrameSourceProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,67,111,108,111,114,70,114,97,109,101,83,111,117,114,99,101,80,114,111,112,101,114,116,105,101,115,0]); + RT_ACTIVATABLE!{IKnownPerceptionVideoProfilePropertiesStatics [CLSID_KnownPerceptionVideoProfileProperties]} + DEFINE_CLSID!(CLSID_KnownPerceptionVideoProfileProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,86,105,100,101,111,80,114,111,102,105,108,101,80,114,111,112,101,114,116,105,101,115,0]); + RT_ACTIVATABLE!{IKnownCameraIntrinsicsPropertiesStatics [CLSID_KnownCameraIntrinsicsProperties]} + DEFINE_CLSID!(CLSID_KnownCameraIntrinsicsProperties = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,75,110,111,119,110,67,97,109,101,114,97,73,110,116,114,105,110,115,105,99,115,80,114,111,112,101,114,116,105,101,115,0]); + DEFINE_IID!(IID_IPerceptionControlSession, 2576975443, 23101, 16767, 146, 57, 241, 136, 158, 84, 139, 72); + RT_INTERFACE!{interface IPerceptionControlSession(IPerceptionControlSessionVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionControlSession] { + fn add_ControlLost(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ControlLost(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn TrySetPropertyAsync(&mut self, name: HSTRING, value: *mut IInspectable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPerceptionControlSession { + #[inline] pub unsafe fn add_control_lost(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ControlLost)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_control_lost(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ControlLost)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_property_async(&mut self, name: &HStringArg, value: &IInspectable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TrySetPropertyAsync)(self, name.get(), value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionColorFrameReader, 1985017198, 47605, 17947, 131, 173, 242, 34, 175, 42, 170, 220); + RT_INTERFACE!{interface IPerceptionColorFrameReader(IPerceptionColorFrameReaderVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrameReader] { + fn add_FrameArrived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FrameArrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Source(&mut self, out: *mut *mut PerceptionColorFrameSource) -> HRESULT, + fn get_IsPaused(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPaused(&mut self, value: bool) -> HRESULT, + fn TryReadLatestFrame(&mut self, out: *mut *mut PerceptionColorFrame) -> HRESULT + }} + impl IPerceptionColorFrameReader { + #[inline] pub unsafe fn add_frame_arrived(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FrameArrived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_frame_arrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FrameArrived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_paused(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPaused)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_paused(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPaused)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_read_latest_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryReadLatestFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionDepthFrameReader, 2980298911, 10651, 17938, 164, 247, 39, 15, 37, 160, 150, 236); + RT_INTERFACE!{interface IPerceptionDepthFrameReader(IPerceptionDepthFrameReaderVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrameReader] { + fn add_FrameArrived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FrameArrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Source(&mut self, out: *mut *mut PerceptionDepthFrameSource) -> HRESULT, + fn get_IsPaused(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPaused(&mut self, value: bool) -> HRESULT, + fn TryReadLatestFrame(&mut self, out: *mut *mut PerceptionDepthFrame) -> HRESULT + }} + impl IPerceptionDepthFrameReader { + #[inline] pub unsafe fn add_frame_arrived(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FrameArrived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_frame_arrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FrameArrived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_paused(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPaused)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_paused(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPaused)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_read_latest_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryReadLatestFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionInfraredFrameReader, 2036387352, 54171, 20424, 160, 74, 146, 151, 52, 198, 117, 108); + RT_INTERFACE!{interface IPerceptionInfraredFrameReader(IPerceptionInfraredFrameReaderVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrameReader] { + fn add_FrameArrived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FrameArrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Source(&mut self, out: *mut *mut PerceptionInfraredFrameSource) -> HRESULT, + fn get_IsPaused(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPaused(&mut self, value: bool) -> HRESULT, + fn TryReadLatestFrame(&mut self, out: *mut *mut PerceptionInfraredFrame) -> HRESULT + }} + impl IPerceptionInfraredFrameReader { + #[inline] pub unsafe fn add_frame_arrived(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FrameArrived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_frame_arrived(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FrameArrived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_paused(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPaused)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_paused(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPaused)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_read_latest_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryReadLatestFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionColorFrame, 4267840841, 11455, 20372, 152, 97, 248, 23, 234, 49, 119, 71); + RT_INTERFACE!{interface IPerceptionColorFrame(IPerceptionColorFrameVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionColorFrame] { + #[cfg(feature="windows.media")] fn get_VideoFrame(&mut self, out: *mut *mut super::super::media::VideoFrame) -> HRESULT + }} + impl IPerceptionColorFrame { + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_video_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionDepthFrame, 2742780412, 39174, 20477, 145, 97, 0, 36, 179, 96, 182, 87); + RT_INTERFACE!{interface IPerceptionDepthFrame(IPerceptionDepthFrameVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionDepthFrame] { + #[cfg(feature="windows.media")] fn get_VideoFrame(&mut self, out: *mut *mut super::super::media::VideoFrame) -> HRESULT + }} + impl IPerceptionDepthFrame { + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_video_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionInfraredFrame, 2961728118, 33950, 19578, 138, 230, 181, 96, 100, 83, 33, 83); + RT_INTERFACE!{interface IPerceptionInfraredFrame(IPerceptionInfraredFrameVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionInfraredFrame] { + #[cfg(feature="windows.media")] fn get_VideoFrame(&mut self, out: *mut *mut super::super::media::VideoFrame) -> HRESULT + }} + impl IPerceptionInfraredFrame { + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_video_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +pub mod provider { // Windows.Devices.Perception.Provider +use ::prelude::*; + DEFINE_IID!(IID_IKnownPerceptionFrameKindStatics, 988172758, 38505, 16646, 159, 174, 72, 53, 193, 185, 97, 4); + RT_INTERFACE!{static interface IKnownPerceptionFrameKindStatics(IKnownPerceptionFrameKindStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownPerceptionFrameKindStatics] { + fn get_Color(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Depth(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Infrared(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownPerceptionFrameKindStatics { + #[inline] pub unsafe fn get_color(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_depth(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Depth)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_infrared(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Infrared)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionFrameProviderManagerServiceStatics, 2927855334, 51929, 17241, 143, 150, 142, 174, 81, 129, 5, 38); + RT_INTERFACE!{static interface IPerceptionFrameProviderManagerServiceStatics(IPerceptionFrameProviderManagerServiceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameProviderManagerServiceStatics] { + fn RegisterFrameProviderInfo(&mut self, manager: *mut IPerceptionFrameProviderManager, frameProviderInfo: *mut PerceptionFrameProviderInfo) -> HRESULT, + fn UnregisterFrameProviderInfo(&mut self, manager: *mut IPerceptionFrameProviderManager, frameProviderInfo: *mut PerceptionFrameProviderInfo) -> HRESULT, + fn RegisterFaceAuthenticationGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, faceAuthenticationGroup: *mut PerceptionFaceAuthenticationGroup) -> HRESULT, + fn UnregisterFaceAuthenticationGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, faceAuthenticationGroup: *mut PerceptionFaceAuthenticationGroup) -> HRESULT, + fn RegisterControlGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, controlGroup: *mut PerceptionControlGroup) -> HRESULT, + fn UnregisterControlGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, controlGroup: *mut PerceptionControlGroup) -> HRESULT, + fn RegisterCorrelationGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, correlationGroup: *mut PerceptionCorrelationGroup) -> HRESULT, + fn UnregisterCorrelationGroup(&mut self, manager: *mut IPerceptionFrameProviderManager, correlationGroup: *mut PerceptionCorrelationGroup) -> HRESULT, + fn UpdateAvailabilityForProvider(&mut self, provider: *mut IPerceptionFrameProvider, available: bool) -> HRESULT, + fn PublishFrameForProvider(&mut self, provider: *mut IPerceptionFrameProvider, frame: *mut PerceptionFrame) -> HRESULT + }} + impl IPerceptionFrameProviderManagerServiceStatics { + #[inline] pub unsafe fn register_frame_provider_info(&mut self, manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterFrameProviderInfo)(self, manager as *const _ as *mut _, frameProviderInfo as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn unregister_frame_provider_info(&mut self, manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { + let hr = ((*self.lpVtbl).UnregisterFrameProviderInfo)(self, manager as *const _ as *mut _, frameProviderInfo as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_face_authentication_group(&mut self, manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterFaceAuthenticationGroup)(self, manager as *const _ as *mut _, faceAuthenticationGroup as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn unregister_face_authentication_group(&mut self, manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { + let hr = ((*self.lpVtbl).UnregisterFaceAuthenticationGroup)(self, manager as *const _ as *mut _, faceAuthenticationGroup as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_control_group(&mut self, manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterControlGroup)(self, manager as *const _ as *mut _, controlGroup as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn unregister_control_group(&mut self, manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { + let hr = ((*self.lpVtbl).UnregisterControlGroup)(self, manager as *const _ as *mut _, controlGroup as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_correlation_group(&mut self, manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterCorrelationGroup)(self, manager as *const _ as *mut _, correlationGroup as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn unregister_correlation_group(&mut self, manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { + let hr = ((*self.lpVtbl).UnregisterCorrelationGroup)(self, manager as *const _ as *mut _, correlationGroup as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn update_availability_for_provider(&mut self, provider: &IPerceptionFrameProvider, available: bool) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateAvailabilityForProvider)(self, provider as *const _ as *mut _, available); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn publish_frame_for_provider(&mut self, provider: &IPerceptionFrameProvider, frame: &PerceptionFrame) -> Result<()> { + let hr = ((*self.lpVtbl).PublishFrameForProvider)(self, provider as *const _ as *mut _, frame as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionFrameProviderInfo: IPerceptionFrameProviderInfo} + RT_CLASS!{class PerceptionPropertyChangeRequest: IPerceptionPropertyChangeRequest} + RT_CLASS!{class PerceptionFaceAuthenticationGroup: IPerceptionFaceAuthenticationGroup [IPerceptionFaceAuthenticationGroupFactory] [CLSID_PerceptionFaceAuthenticationGroup]} + DEFINE_CLSID!(CLSID_PerceptionFaceAuthenticationGroup = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,70,97,99,101,65,117,116,104,101,110,116,105,99,97,116,105,111,110,71,114,111,117,112,0]); + RT_CLASS!{class PerceptionControlGroup: IPerceptionControlGroup [IPerceptionControlGroupFactory] [CLSID_PerceptionControlGroup]} + DEFINE_CLSID!(CLSID_PerceptionControlGroup = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,67,111,110,116,114,111,108,71,114,111,117,112,0]); + RT_CLASS!{class PerceptionCorrelationGroup: IPerceptionCorrelationGroup [IPerceptionCorrelationGroupFactory] [CLSID_PerceptionCorrelationGroup]} + DEFINE_CLSID!(CLSID_PerceptionCorrelationGroup = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,67,111,114,114,101,108,97,116,105,111,110,71,114,111,117,112,0]); + RT_CLASS!{class PerceptionFrame: IPerceptionFrame} + DEFINE_IID!(IID_IPerceptionFrameProviderInfo, 3433650664, 31102, 20099, 155, 135, 3, 106, 116, 20, 47, 196); + RT_INTERFACE!{interface IPerceptionFrameProviderInfo(IPerceptionFrameProviderInfoVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameProviderInfo] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Id(&mut self, value: HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_DeviceKind(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DeviceKind(&mut self, value: HSTRING) -> HRESULT, + fn get_FrameKind(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_FrameKind(&mut self, value: HSTRING) -> HRESULT, + fn get_Hidden(&mut self, out: *mut bool) -> HRESULT, + fn put_Hidden(&mut self, value: bool) -> HRESULT + }} + impl IPerceptionFrameProviderInfo { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Id)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_kind(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceKind)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_device_kind(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DeviceKind)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_kind(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameKind)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_frame_kind(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_FrameKind)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hidden(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Hidden)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_hidden(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Hidden)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionControlGroupFactory, 790295264, 47857, 17723, 190, 212, 205, 157, 70, 25, 21, 76); + RT_INTERFACE!{static interface IPerceptionControlGroupFactory(IPerceptionControlGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionControlGroupFactory] { + fn Create(&mut self, ids: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut PerceptionControlGroup) -> HRESULT + }} + impl IPerceptionControlGroupFactory { + #[inline] pub unsafe fn create(&mut self, ids: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, ids as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionControlGroup, 388778114, 12249, 19534, 186, 52, 253, 242, 10, 115, 221, 229); + RT_INTERFACE!{interface IPerceptionControlGroup(IPerceptionControlGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionControlGroup] { + fn get_FrameProviderIds(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IPerceptionControlGroup { + #[inline] pub unsafe fn get_frame_provider_ids(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameProviderIds)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_PerceptionStartFaceAuthenticationHandler, 1954639146, 8336, 18032, 140, 72, 239, 57, 231, 255, 124, 38); + RT_DELEGATE!{delegate PerceptionStartFaceAuthenticationHandler(PerceptionStartFaceAuthenticationHandlerVtbl, PerceptionStartFaceAuthenticationHandlerImpl) [IID_PerceptionStartFaceAuthenticationHandler] { + fn Invoke(&mut self, sender: *mut PerceptionFaceAuthenticationGroup, out: *mut bool) -> HRESULT + }} + impl PerceptionStartFaceAuthenticationHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &PerceptionFaceAuthenticationGroup) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_PerceptionStopFaceAuthenticationHandler, 947840682, 35277, 18462, 170, 222, 221, 146, 247, 11, 42, 215); + RT_DELEGATE!{delegate PerceptionStopFaceAuthenticationHandler(PerceptionStopFaceAuthenticationHandlerVtbl, PerceptionStopFaceAuthenticationHandlerImpl) [IID_PerceptionStopFaceAuthenticationHandler] { + fn Invoke(&mut self, sender: *mut PerceptionFaceAuthenticationGroup) -> HRESULT + }} + impl PerceptionStopFaceAuthenticationHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &PerceptionFaceAuthenticationGroup) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionFaceAuthenticationGroupFactory, 3867805140, 46604, 16628, 188, 185, 242, 77, 70, 70, 115, 32); + RT_INTERFACE!{static interface IPerceptionFaceAuthenticationGroupFactory(IPerceptionFaceAuthenticationGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFaceAuthenticationGroupFactory] { + fn Create(&mut self, ids: *mut ::rt::gen::windows::foundation::collections::IIterable, startHandler: *mut PerceptionStartFaceAuthenticationHandler, stopHandler: *mut PerceptionStopFaceAuthenticationHandler, out: *mut *mut PerceptionFaceAuthenticationGroup) -> HRESULT + }} + impl IPerceptionFaceAuthenticationGroupFactory { + #[inline] pub unsafe fn create(&mut self, ids: &::rt::gen::windows::foundation::collections::IIterable, startHandler: &PerceptionStartFaceAuthenticationHandler, stopHandler: &PerceptionStopFaceAuthenticationHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, ids as *const _ as *mut _, startHandler as *const _ as *mut _, stopHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionFaceAuthenticationGroup, 3892418580, 19089, 16816, 131, 166, 136, 26, 23, 117, 53, 62); + RT_INTERFACE!{interface IPerceptionFaceAuthenticationGroup(IPerceptionFaceAuthenticationGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFaceAuthenticationGroup] { + fn get_FrameProviderIds(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IPerceptionFaceAuthenticationGroup { + #[inline] pub unsafe fn get_frame_provider_ids(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameProviderIds)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionCorrelationFactory, 3567698981, 10372, 19087, 129, 52, 40, 53, 215, 40, 108, 191); + RT_INTERFACE!{static interface IPerceptionCorrelationFactory(IPerceptionCorrelationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionCorrelationFactory] { + fn Create(&mut self, targetId: HSTRING, position: ::rt::gen::windows::foundation::numerics::Vector3, orientation: ::rt::gen::windows::foundation::numerics::Quaternion, out: *mut *mut PerceptionCorrelation) -> HRESULT + }} + impl IPerceptionCorrelationFactory { + #[inline] pub unsafe fn create(&mut self, targetId: &HStringArg, position: ::rt::gen::windows::foundation::numerics::Vector3, orientation: ::rt::gen::windows::foundation::numerics::Quaternion) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, targetId.get(), position, orientation, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionCorrelation: IPerceptionCorrelation [IPerceptionCorrelationFactory] [CLSID_PerceptionCorrelation]} + DEFINE_CLSID!(CLSID_PerceptionCorrelation = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,67,111,114,114,101,108,97,116,105,111,110,0]); + DEFINE_IID!(IID_IPerceptionCorrelation, 3021150850, 57333, 16455, 138, 25, 59, 77, 128, 95, 113, 118); + RT_INTERFACE!{interface IPerceptionCorrelation(IPerceptionCorrelationVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionCorrelation] { + fn get_TargetId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Position(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_Orientation(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Quaternion) -> HRESULT + }} + impl IPerceptionCorrelation { + #[inline] pub unsafe fn get_target_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TargetId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Quaternion> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionCorrelationGroupFactory, 2113806472, 25567, 18669, 131, 177, 74, 184, 41, 19, 41, 149); + RT_INTERFACE!{static interface IPerceptionCorrelationGroupFactory(IPerceptionCorrelationGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionCorrelationGroupFactory] { + fn Create(&mut self, relativeLocations: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut PerceptionCorrelationGroup) -> HRESULT + }} + impl IPerceptionCorrelationGroupFactory { + #[inline] pub unsafe fn create(&mut self, relativeLocations: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, relativeLocations as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionCorrelationGroup, 1965689094, 13991, 18363, 155, 121, 86, 204, 107, 116, 103, 112); + RT_INTERFACE!{interface IPerceptionCorrelationGroup(IPerceptionCorrelationGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionCorrelationGroup] { + fn get_RelativeLocations(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IPerceptionCorrelationGroup { + #[inline] pub unsafe fn get_relative_locations(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RelativeLocations)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionFrame, 2097051685, 21691, 19869, 190, 197, 142, 246, 97, 81, 210, 172); + RT_INTERFACE!{interface IPerceptionFrame(IPerceptionFrameVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrame] { + fn get_RelativeTime(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn put_RelativeTime(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::ValueSet) -> HRESULT, + fn get_FrameData(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IMemoryBuffer) -> HRESULT + }} + impl IPerceptionFrame { + #[inline] pub unsafe fn get_relative_time(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RelativeTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_relative_time(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_RelativeTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionVideoFrameAllocatorFactory, 442020065, 59674, 18462, 184, 118, 168, 158, 43, 188, 107, 51); + RT_INTERFACE!{static interface IPerceptionVideoFrameAllocatorFactory(IPerceptionVideoFrameAllocatorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionVideoFrameAllocatorFactory] { + #[cfg(feature="windows.graphics")] fn Create(&mut self, maxOutstandingFrameCountForWrite: u32, format: ::rt::gen::windows::graphics::imaging::BitmapPixelFormat, resolution: ::rt::gen::windows::foundation::Size, alpha: ::rt::gen::windows::graphics::imaging::BitmapAlphaMode, out: *mut *mut PerceptionVideoFrameAllocator) -> HRESULT + }} + impl IPerceptionVideoFrameAllocatorFactory { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn create(&mut self, maxOutstandingFrameCountForWrite: u32, format: ::rt::gen::windows::graphics::imaging::BitmapPixelFormat, resolution: ::rt::gen::windows::foundation::Size, alpha: ::rt::gen::windows::graphics::imaging::BitmapAlphaMode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, maxOutstandingFrameCountForWrite, format, resolution, alpha, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionVideoFrameAllocator: IPerceptionVideoFrameAllocator [IPerceptionVideoFrameAllocatorFactory] [CLSID_PerceptionVideoFrameAllocator]} + DEFINE_CLSID!(CLSID_PerceptionVideoFrameAllocator = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,86,105,100,101,111,70,114,97,109,101,65,108,108,111,99,97,116,111,114,0]); + DEFINE_IID!(IID_IPerceptionPropertyChangeRequest, 1012591441, 13579, 19960, 148, 20, 89, 224, 152, 21, 81, 11); + RT_INTERFACE!{interface IPerceptionPropertyChangeRequest(IPerceptionPropertyChangeRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionPropertyChangeRequest] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_Status(&mut self, out: *mut super::PerceptionFrameSourcePropertyChangeStatus) -> HRESULT, + fn put_Status(&mut self, value: super::PerceptionFrameSourcePropertyChangeStatus) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl IPerceptionPropertyChangeRequest { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_status(&mut self, value: super::PerceptionFrameSourcePropertyChangeStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_Status)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPerceptionFrameProviderManagerServiceStatics [CLSID_PerceptionFrameProviderManagerService]} + DEFINE_CLSID!(CLSID_PerceptionFrameProviderManagerService = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,80,101,114,99,101,112,116,105,111,110,70,114,97,109,101,80,114,111,118,105,100,101,114,77,97,110,97,103,101,114,83,101,114,118,105,99,101,0]); + RT_ACTIVATABLE!{IKnownPerceptionFrameKindStatics [CLSID_KnownPerceptionFrameKind]} + DEFINE_CLSID!(CLSID_KnownPerceptionFrameKind = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,101,114,99,101,112,116,105,111,110,46,80,114,111,118,105,100,101,114,46,75,110,111,119,110,80,101,114,99,101,112,116,105,111,110,70,114,97,109,101,75,105,110,100,0]); + DEFINE_IID!(IID_IPerceptionFrameProviderManager, 2841234951, 60115, 13279, 142, 193, 185, 36, 171, 224, 25, 196); + RT_INTERFACE!{interface IPerceptionFrameProviderManager(IPerceptionFrameProviderManagerVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameProviderManager] { + fn GetFrameProvider(&mut self, frameProviderInfo: *mut PerceptionFrameProviderInfo, out: *mut *mut IPerceptionFrameProvider) -> HRESULT + }} + impl IPerceptionFrameProviderManager { + #[inline] pub unsafe fn get_frame_provider(&mut self, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFrameProvider)(self, frameProviderInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionFrameProvider, 2035251897, 45949, 15155, 161, 13, 48, 98, 100, 25, 206, 101); + RT_INTERFACE!{interface IPerceptionFrameProvider(IPerceptionFrameProviderVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameProvider] { + fn get_FrameProviderInfo(&mut self, out: *mut *mut PerceptionFrameProviderInfo) -> HRESULT, + fn get_Available(&mut self, out: *mut bool) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IPropertySet) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn SetProperty(&mut self, value: *mut PerceptionPropertyChangeRequest) -> HRESULT + }} + impl IPerceptionFrameProvider { + #[inline] pub unsafe fn get_frame_provider_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameProviderInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_available(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Available)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_property(&mut self, value: &PerceptionPropertyChangeRequest) -> Result<()> { + let hr = ((*self.lpVtbl).SetProperty)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPerceptionVideoFrameAllocator, 1278781402, 64984, 20180, 160, 57, 42, 111, 155, 35, 80, 56); + RT_INTERFACE!{interface IPerceptionVideoFrameAllocator(IPerceptionVideoFrameAllocatorVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionVideoFrameAllocator] { + fn AllocateFrame(&mut self, out: *mut *mut PerceptionFrame) -> HRESULT, + #[cfg(feature="windows.media")] fn CopyFromVideoFrame(&mut self, frame: *mut ::rt::gen::windows::media::VideoFrame, out: *mut *mut PerceptionFrame) -> HRESULT + }} + impl IPerceptionVideoFrameAllocator { + #[inline] pub unsafe fn allocate_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AllocateFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.media")] #[inline] pub unsafe fn copy_from_video_frame(&mut self, frame: &::rt::gen::windows::media::VideoFrame) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyFromVideoFrame)(self, frame as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Devices.Perception.Provider +} // Windows.Devices.Perception +pub mod pointofservice { // Windows.Devices.PointOfService +use ::prelude::*; + RT_ENUM! { enum UnifiedPosErrorSeverity: i32 { + UnknownErrorSeverity (UnifiedPosErrorSeverity_UnknownErrorSeverity) = 0, Warning (UnifiedPosErrorSeverity_Warning) = 1, Recoverable (UnifiedPosErrorSeverity_Recoverable) = 2, Unrecoverable (UnifiedPosErrorSeverity_Unrecoverable) = 3, AssistanceRequired (UnifiedPosErrorSeverity_AssistanceRequired) = 4, Fatal (UnifiedPosErrorSeverity_Fatal) = 5, + }} + RT_ENUM! { enum UnifiedPosPowerReportingType: i32 { + UnknownPowerReportingType (UnifiedPosPowerReportingType_UnknownPowerReportingType) = 0, Standard (UnifiedPosPowerReportingType_Standard) = 1, Advanced (UnifiedPosPowerReportingType_Advanced) = 2, + }} + RT_ENUM! { enum UnifiedPosHealthCheckLevel: i32 { + UnknownHealthCheckLevel (UnifiedPosHealthCheckLevel_UnknownHealthCheckLevel) = 0, POSInternal (UnifiedPosHealthCheckLevel_POSInternal) = 1, External (UnifiedPosHealthCheckLevel_External) = 2, Interactive (UnifiedPosHealthCheckLevel_Interactive) = 3, + }} + RT_ENUM! { enum UnifiedPosErrorReason: i32 { + UnknownErrorReason (UnifiedPosErrorReason_UnknownErrorReason) = 0, NoService (UnifiedPosErrorReason_NoService) = 1, Disabled (UnifiedPosErrorReason_Disabled) = 2, Illegal (UnifiedPosErrorReason_Illegal) = 3, NoHardware (UnifiedPosErrorReason_NoHardware) = 4, Closed (UnifiedPosErrorReason_Closed) = 5, Offline (UnifiedPosErrorReason_Offline) = 6, Failure (UnifiedPosErrorReason_Failure) = 7, Timeout (UnifiedPosErrorReason_Timeout) = 8, Busy (UnifiedPosErrorReason_Busy) = 9, Extended (UnifiedPosErrorReason_Extended) = 10, + }} + RT_ENUM! { enum MagneticStripeReaderAuthenticationLevel: i32 { + NotSupported (MagneticStripeReaderAuthenticationLevel_NotSupported) = 0, Optional (MagneticStripeReaderAuthenticationLevel_Optional) = 1, Required (MagneticStripeReaderAuthenticationLevel_Required) = 2, + }} + RT_ENUM! { enum PosPrinterMapMode: i32 { + Dots (PosPrinterMapMode_Dots) = 0, Twips (PosPrinterMapMode_Twips) = 1, English (PosPrinterMapMode_English) = 2, Metric (PosPrinterMapMode_Metric) = 3, + }} + RT_ENUM! { enum PosPrinterCartridgeSensors: u32 { + None (PosPrinterCartridgeSensors_None) = 0, Removed (PosPrinterCartridgeSensors_Removed) = 1, Empty (PosPrinterCartridgeSensors_Empty) = 2, HeadCleaning (PosPrinterCartridgeSensors_HeadCleaning) = 4, NearEnd (PosPrinterCartridgeSensors_NearEnd) = 8, + }} + RT_ENUM! { enum PosPrinterColorCapabilities: u32 { + None (PosPrinterColorCapabilities_None) = 0, Primary (PosPrinterColorCapabilities_Primary) = 1, Custom1 (PosPrinterColorCapabilities_Custom1) = 2, Custom2 (PosPrinterColorCapabilities_Custom2) = 4, Custom3 (PosPrinterColorCapabilities_Custom3) = 8, Custom4 (PosPrinterColorCapabilities_Custom4) = 16, Custom5 (PosPrinterColorCapabilities_Custom5) = 32, Custom6 (PosPrinterColorCapabilities_Custom6) = 64, Cyan (PosPrinterColorCapabilities_Cyan) = 128, Magenta (PosPrinterColorCapabilities_Magenta) = 256, Yellow (PosPrinterColorCapabilities_Yellow) = 512, Full (PosPrinterColorCapabilities_Full) = 1024, + }} + RT_ENUM! { enum PosPrinterColorCartridge: i32 { + Unknown (PosPrinterColorCartridge_Unknown) = 0, Primary (PosPrinterColorCartridge_Primary) = 1, Custom1 (PosPrinterColorCartridge_Custom1) = 2, Custom2 (PosPrinterColorCartridge_Custom2) = 3, Custom3 (PosPrinterColorCartridge_Custom3) = 4, Custom4 (PosPrinterColorCartridge_Custom4) = 5, Custom5 (PosPrinterColorCartridge_Custom5) = 6, Custom6 (PosPrinterColorCartridge_Custom6) = 7, Cyan (PosPrinterColorCartridge_Cyan) = 8, Magenta (PosPrinterColorCartridge_Magenta) = 9, Yellow (PosPrinterColorCartridge_Yellow) = 10, + }} + RT_ENUM! { enum PosPrinterMarkFeedCapabilities: u32 { + None (PosPrinterMarkFeedCapabilities_None) = 0, ToTakeUp (PosPrinterMarkFeedCapabilities_ToTakeUp) = 1, ToCutter (PosPrinterMarkFeedCapabilities_ToCutter) = 2, ToCurrentTopOfForm (PosPrinterMarkFeedCapabilities_ToCurrentTopOfForm) = 4, ToNextTopOfForm (PosPrinterMarkFeedCapabilities_ToNextTopOfForm) = 8, + }} + RT_ENUM! { enum PosPrinterRuledLineCapabilities: u32 { + None (PosPrinterRuledLineCapabilities_None) = 0, Horizontal (PosPrinterRuledLineCapabilities_Horizontal) = 1, Vertical (PosPrinterRuledLineCapabilities_Vertical) = 2, + }} + RT_ENUM! { enum PosPrinterPrintSide: i32 { + Unknown (PosPrinterPrintSide_Unknown) = 0, Side1 (PosPrinterPrintSide_Side1) = 1, Side2 (PosPrinterPrintSide_Side2) = 2, + }} + RT_ENUM! { enum PosPrinterLineDirection: i32 { + Horizontal (PosPrinterLineDirection_Horizontal) = 0, Vertical (PosPrinterLineDirection_Vertical) = 1, + }} + RT_ENUM! { enum PosPrinterLineStyle: i32 { + SingleSolid (PosPrinterLineStyle_SingleSolid) = 0, DoubleSolid (PosPrinterLineStyle_DoubleSolid) = 1, Broken (PosPrinterLineStyle_Broken) = 2, Chain (PosPrinterLineStyle_Chain) = 3, + }} + RT_ENUM! { enum PosPrinterMarkFeedKind: i32 { + ToTakeUp (PosPrinterMarkFeedKind_ToTakeUp) = 0, ToCutter (PosPrinterMarkFeedKind_ToCutter) = 1, ToCurrentTopOfForm (PosPrinterMarkFeedKind_ToCurrentTopOfForm) = 2, ToNextTopOfForm (PosPrinterMarkFeedKind_ToNextTopOfForm) = 3, + }} + RT_ENUM! { enum PosPrinterAlignment: i32 { + Left (PosPrinterAlignment_Left) = 0, Center (PosPrinterAlignment_Center) = 1, Right (PosPrinterAlignment_Right) = 2, + }} + RT_ENUM! { enum PosPrinterBarcodeTextPosition: i32 { + None (PosPrinterBarcodeTextPosition_None) = 0, Above (PosPrinterBarcodeTextPosition_Above) = 1, Below (PosPrinterBarcodeTextPosition_Below) = 2, + }} + RT_ENUM! { enum PosPrinterRotation: i32 { + Normal (PosPrinterRotation_Normal) = 0, Right90 (PosPrinterRotation_Right90) = 1, Left90 (PosPrinterRotation_Left90) = 2, Rotate180 (PosPrinterRotation_Rotate180) = 3, + }} + RT_ENUM! { enum PosPrinterStatusKind: i32 { + Online (PosPrinterStatusKind_Online) = 0, Off (PosPrinterStatusKind_Off) = 1, Offline (PosPrinterStatusKind_Offline) = 2, OffOrOffline (PosPrinterStatusKind_OffOrOffline) = 3, Extended (PosPrinterStatusKind_Extended) = 4, + }} + RT_ENUM! { enum CashDrawerStatusKind: i32 { + Online (CashDrawerStatusKind_Online) = 0, Off (CashDrawerStatusKind_Off) = 1, Offline (CashDrawerStatusKind_Offline) = 2, OffOrOffline (CashDrawerStatusKind_OffOrOffline) = 3, Extended (CashDrawerStatusKind_Extended) = 4, + }} + RT_ENUM! { enum BarcodeScannerStatus: i32 { + Online (BarcodeScannerStatus_Online) = 0, Off (BarcodeScannerStatus_Off) = 1, Offline (BarcodeScannerStatus_Offline) = 2, OffOrOffline (BarcodeScannerStatus_OffOrOffline) = 3, Extended (BarcodeScannerStatus_Extended) = 4, + }} + DEFINE_IID!(IID_IUnifiedPosErrorData, 731483194, 21852, 18569, 142, 216, 197, 153, 187, 58, 113, 42); + RT_INTERFACE!{interface IUnifiedPosErrorData(IUnifiedPosErrorDataVtbl): IInspectable(IInspectableVtbl) [IID_IUnifiedPosErrorData] { + fn get_Message(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Severity(&mut self, out: *mut UnifiedPosErrorSeverity) -> HRESULT, + fn get_Reason(&mut self, out: *mut UnifiedPosErrorReason) -> HRESULT, + fn get_ExtendedReason(&mut self, out: *mut u32) -> HRESULT + }} + impl IUnifiedPosErrorData { + #[inline] pub unsafe fn get_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_severity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Severity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedReason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class UnifiedPosErrorData: IUnifiedPosErrorData} + DEFINE_IID!(IID_IBarcodeScannerStatusUpdatedEventArgs, 895321478, 40003, 17963, 169, 26, 129, 109, 201, 127, 69, 44); + RT_INTERFACE!{interface IBarcodeScannerStatusUpdatedEventArgs(IBarcodeScannerStatusUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerStatusUpdatedEventArgs] { + fn get_Status(&mut self, out: *mut BarcodeScannerStatus) -> HRESULT, + fn get_ExtendedStatus(&mut self, out: *mut u32) -> HRESULT + }} + impl IBarcodeScannerStatusUpdatedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class BarcodeScannerStatusUpdatedEventArgs: IBarcodeScannerStatusUpdatedEventArgs} + DEFINE_IID!(IID_IBarcodeSymbologiesStatics, 3397732795, 1746, 17396, 164, 75, 198, 32, 103, 159, 216, 208); + RT_INTERFACE!{static interface IBarcodeSymbologiesStatics(IBarcodeSymbologiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeSymbologiesStatics] { + fn get_Unknown(&mut self, out: *mut u32) -> HRESULT, + fn get_Ean8(&mut self, out: *mut u32) -> HRESULT, + fn get_Ean8Add2(&mut self, out: *mut u32) -> HRESULT, + fn get_Ean8Add5(&mut self, out: *mut u32) -> HRESULT, + fn get_Eanv(&mut self, out: *mut u32) -> HRESULT, + fn get_EanvAdd2(&mut self, out: *mut u32) -> HRESULT, + fn get_EanvAdd5(&mut self, out: *mut u32) -> HRESULT, + fn get_Ean13(&mut self, out: *mut u32) -> HRESULT, + fn get_Ean13Add2(&mut self, out: *mut u32) -> HRESULT, + fn get_Ean13Add5(&mut self, out: *mut u32) -> HRESULT, + fn get_Isbn(&mut self, out: *mut u32) -> HRESULT, + fn get_IsbnAdd5(&mut self, out: *mut u32) -> HRESULT, + fn get_Ismn(&mut self, out: *mut u32) -> HRESULT, + fn get_IsmnAdd2(&mut self, out: *mut u32) -> HRESULT, + fn get_IsmnAdd5(&mut self, out: *mut u32) -> HRESULT, + fn get_Issn(&mut self, out: *mut u32) -> HRESULT, + fn get_IssnAdd2(&mut self, out: *mut u32) -> HRESULT, + fn get_IssnAdd5(&mut self, out: *mut u32) -> HRESULT, + fn get_Ean99(&mut self, out: *mut u32) -> HRESULT, + fn get_Ean99Add2(&mut self, out: *mut u32) -> HRESULT, + fn get_Ean99Add5(&mut self, out: *mut u32) -> HRESULT, + fn get_Upca(&mut self, out: *mut u32) -> HRESULT, + fn get_UpcaAdd2(&mut self, out: *mut u32) -> HRESULT, + fn get_UpcaAdd5(&mut self, out: *mut u32) -> HRESULT, + fn get_Upce(&mut self, out: *mut u32) -> HRESULT, + fn get_UpceAdd2(&mut self, out: *mut u32) -> HRESULT, + fn get_UpceAdd5(&mut self, out: *mut u32) -> HRESULT, + fn get_UpcCoupon(&mut self, out: *mut u32) -> HRESULT, + fn get_TfStd(&mut self, out: *mut u32) -> HRESULT, + fn get_TfDis(&mut self, out: *mut u32) -> HRESULT, + fn get_TfInt(&mut self, out: *mut u32) -> HRESULT, + fn get_TfInd(&mut self, out: *mut u32) -> HRESULT, + fn get_TfMat(&mut self, out: *mut u32) -> HRESULT, + fn get_TfIata(&mut self, out: *mut u32) -> HRESULT, + fn get_Gs1DatabarType1(&mut self, out: *mut u32) -> HRESULT, + fn get_Gs1DatabarType2(&mut self, out: *mut u32) -> HRESULT, + fn get_Gs1DatabarType3(&mut self, out: *mut u32) -> HRESULT, + fn get_Code39(&mut self, out: *mut u32) -> HRESULT, + fn get_Code39Ex(&mut self, out: *mut u32) -> HRESULT, + fn get_Trioptic39(&mut self, out: *mut u32) -> HRESULT, + fn get_Code32(&mut self, out: *mut u32) -> HRESULT, + fn get_Pzn(&mut self, out: *mut u32) -> HRESULT, + fn get_Code93(&mut self, out: *mut u32) -> HRESULT, + fn get_Code93Ex(&mut self, out: *mut u32) -> HRESULT, + fn get_Code128(&mut self, out: *mut u32) -> HRESULT, + fn get_Gs1128(&mut self, out: *mut u32) -> HRESULT, + fn get_Gs1128Coupon(&mut self, out: *mut u32) -> HRESULT, + fn get_UccEan128(&mut self, out: *mut u32) -> HRESULT, + fn get_Sisac(&mut self, out: *mut u32) -> HRESULT, + fn get_Isbt(&mut self, out: *mut u32) -> HRESULT, + fn get_Codabar(&mut self, out: *mut u32) -> HRESULT, + fn get_Code11(&mut self, out: *mut u32) -> HRESULT, + fn get_Msi(&mut self, out: *mut u32) -> HRESULT, + fn get_Plessey(&mut self, out: *mut u32) -> HRESULT, + fn get_Telepen(&mut self, out: *mut u32) -> HRESULT, + fn get_Code16k(&mut self, out: *mut u32) -> HRESULT, + fn get_CodablockA(&mut self, out: *mut u32) -> HRESULT, + fn get_CodablockF(&mut self, out: *mut u32) -> HRESULT, + fn get_Codablock128(&mut self, out: *mut u32) -> HRESULT, + fn get_Code49(&mut self, out: *mut u32) -> HRESULT, + fn get_Aztec(&mut self, out: *mut u32) -> HRESULT, + fn get_DataCode(&mut self, out: *mut u32) -> HRESULT, + fn get_DataMatrix(&mut self, out: *mut u32) -> HRESULT, + fn get_HanXin(&mut self, out: *mut u32) -> HRESULT, + fn get_Maxicode(&mut self, out: *mut u32) -> HRESULT, + fn get_MicroPdf417(&mut self, out: *mut u32) -> HRESULT, + fn get_MicroQr(&mut self, out: *mut u32) -> HRESULT, + fn get_Pdf417(&mut self, out: *mut u32) -> HRESULT, + fn get_Qr(&mut self, out: *mut u32) -> HRESULT, + fn get_MsTag(&mut self, out: *mut u32) -> HRESULT, + fn get_Ccab(&mut self, out: *mut u32) -> HRESULT, + fn get_Ccc(&mut self, out: *mut u32) -> HRESULT, + fn get_Tlc39(&mut self, out: *mut u32) -> HRESULT, + fn get_AusPost(&mut self, out: *mut u32) -> HRESULT, + fn get_CanPost(&mut self, out: *mut u32) -> HRESULT, + fn get_ChinaPost(&mut self, out: *mut u32) -> HRESULT, + fn get_DutchKix(&mut self, out: *mut u32) -> HRESULT, + fn get_InfoMail(&mut self, out: *mut u32) -> HRESULT, + fn get_ItalianPost25(&mut self, out: *mut u32) -> HRESULT, + fn get_ItalianPost39(&mut self, out: *mut u32) -> HRESULT, + fn get_JapanPost(&mut self, out: *mut u32) -> HRESULT, + fn get_KoreanPost(&mut self, out: *mut u32) -> HRESULT, + fn get_SwedenPost(&mut self, out: *mut u32) -> HRESULT, + fn get_UkPost(&mut self, out: *mut u32) -> HRESULT, + fn get_UsIntelligent(&mut self, out: *mut u32) -> HRESULT, + fn get_UsIntelligentPkg(&mut self, out: *mut u32) -> HRESULT, + fn get_UsPlanet(&mut self, out: *mut u32) -> HRESULT, + fn get_UsPostNet(&mut self, out: *mut u32) -> HRESULT, + fn get_Us4StateFics(&mut self, out: *mut u32) -> HRESULT, + fn get_OcrA(&mut self, out: *mut u32) -> HRESULT, + fn get_OcrB(&mut self, out: *mut u32) -> HRESULT, + fn get_Micr(&mut self, out: *mut u32) -> HRESULT, + fn get_ExtendedBase(&mut self, out: *mut u32) -> HRESULT, + fn GetName(&mut self, scanDataType: u32, out: *mut HSTRING) -> HRESULT + }} + impl IBarcodeSymbologiesStatics { + #[inline] pub unsafe fn get_unknown(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Unknown)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ean8(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ean8)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ean8_add2(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ean8Add2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ean8_add5(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ean8Add5)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_eanv(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Eanv)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_eanv_add2(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EanvAdd2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_eanv_add5(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EanvAdd5)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ean13(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ean13)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ean13_add2(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ean13Add2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ean13_add5(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ean13Add5)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_isbn(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Isbn)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_isbn_add5(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsbnAdd5)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ismn(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ismn)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ismn_add2(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsmnAdd2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ismn_add5(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsmnAdd5)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_issn(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Issn)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_issn_add2(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IssnAdd2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_issn_add5(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IssnAdd5)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ean99(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ean99)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ean99_add2(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ean99Add2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ean99_add5(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ean99Add5)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_upca(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Upca)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_upca_add2(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UpcaAdd2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_upca_add5(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UpcaAdd5)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_upce(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Upce)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_upce_add2(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UpceAdd2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_upce_add5(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UpceAdd5)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_upc_coupon(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UpcCoupon)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tf_std(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TfStd)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tf_dis(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TfDis)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tf_int(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TfInt)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tf_ind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TfInd)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tf_mat(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TfMat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tf_iata(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TfIata)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gs1_databar_type1(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gs1DatabarType1)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gs1_databar_type2(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gs1DatabarType2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gs1_databar_type3(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gs1DatabarType3)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_code39(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code39)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_code39_ex(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code39Ex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_trioptic39(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Trioptic39)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_code32(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code32)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pzn(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Pzn)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_code93(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code93)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_code93_ex(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code93Ex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_code128(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code128)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gs1128(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gs1128)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gs1128_coupon(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gs1128Coupon)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ucc_ean128(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UccEan128)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sisac(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Sisac)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_isbt(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Isbt)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_codabar(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Codabar)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_code11(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code11)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_msi(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Msi)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_plessey(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Plessey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_telepen(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Telepen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_code16k(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code16k)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_codablock_a(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CodablockA)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_codablock_f(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CodablockF)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_codablock128(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Codablock128)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_code49(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code49)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_aztec(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Aztec)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DataCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_matrix(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DataMatrix)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_han_xin(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HanXin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_maxicode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Maxicode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_micro_pdf417(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MicroPdf417)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_micro_qr(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MicroQr)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pdf417(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Pdf417)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_qr(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Qr)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ms_tag(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MsTag)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ccab(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ccab)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ccc(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ccc)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tlc39(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Tlc39)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_aus_post(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AusPost)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_post(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanPost)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_china_post(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ChinaPost)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dutch_kix(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DutchKix)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_info_mail(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InfoMail)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_italian_post25(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ItalianPost25)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_italian_post39(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ItalianPost39)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_japan_post(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_JapanPost)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_korean_post(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KoreanPost)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sweden_post(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SwedenPost)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uk_post(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UkPost)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_us_intelligent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsIntelligent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_us_intelligent_pkg(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsIntelligentPkg)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_us_planet(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsPlanet)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_us_post_net(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsPostNet)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_us4_state_fics(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Us4StateFics)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ocr_a(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OcrA)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ocr_b(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OcrB)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_micr(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Micr)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_base(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedBase)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self, scanDataType: u32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetName)(self, scanDataType, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IBarcodeSymbologiesStatics [CLSID_BarcodeSymbologies]} + DEFINE_CLSID!(CLSID_BarcodeSymbologies = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,66,97,114,99,111,100,101,83,121,109,98,111,108,111,103,105,101,115,0]); + DEFINE_IID!(IID_IBarcodeScannerDataReceivedEventArgs, 1110747106, 60823, 18045, 173, 43, 1, 228, 67, 19, 169, 41); + RT_INTERFACE!{interface IBarcodeScannerDataReceivedEventArgs(IBarcodeScannerDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerDataReceivedEventArgs] { + fn get_Report(&mut self, out: *mut *mut BarcodeScannerReport) -> HRESULT + }} + impl IBarcodeScannerDataReceivedEventArgs { + #[inline] pub unsafe fn get_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BarcodeScannerReport: IBarcodeScannerReport} + RT_CLASS!{class BarcodeScannerDataReceivedEventArgs: IBarcodeScannerDataReceivedEventArgs} + DEFINE_IID!(IID_IBarcodeScannerReport, 1558501552, 42121, 19350, 134, 196, 240, 191, 138, 55, 117, 61); + RT_INTERFACE!{interface IBarcodeScannerReport(IBarcodeScannerReportVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerReport] { + fn get_ScanDataType(&mut self, out: *mut u32) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_ScanData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_ScanDataLabel(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IBarcodeScannerReport { + #[inline] pub unsafe fn get_scan_data_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScanDataType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_scan_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ScanData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_scan_data_label(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ScanDataLabel)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBarcodeScannerErrorOccurredEventArgs, 751984687, 53050, 16386, 167, 90, 197, 236, 70, 143, 10, 32); + RT_INTERFACE!{interface IBarcodeScannerErrorOccurredEventArgs(IBarcodeScannerErrorOccurredEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerErrorOccurredEventArgs] { + fn get_PartialInputData(&mut self, out: *mut *mut BarcodeScannerReport) -> HRESULT, + fn get_IsRetriable(&mut self, out: *mut bool) -> HRESULT, + fn get_ErrorData(&mut self, out: *mut *mut UnifiedPosErrorData) -> HRESULT + }} + impl IBarcodeScannerErrorOccurredEventArgs { + #[inline] pub unsafe fn get_partial_input_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PartialInputData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_retriable(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsRetriable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ErrorData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BarcodeScannerErrorOccurredEventArgs: IBarcodeScannerErrorOccurredEventArgs} + DEFINE_IID!(IID_IBarcodeScannerImagePreviewReceivedEventArgs, 4088913541, 28299, 17230, 159, 88, 6, 239, 38, 188, 75, 175); + RT_INTERFACE!{interface IBarcodeScannerImagePreviewReceivedEventArgs(IBarcodeScannerImagePreviewReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerImagePreviewReceivedEventArgs] { + #[cfg(feature="windows.storage")] fn get_Preview(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamWithContentType) -> HRESULT + }} + impl IBarcodeScannerImagePreviewReceivedEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_preview(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Preview)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BarcodeScannerImagePreviewReceivedEventArgs: IBarcodeScannerImagePreviewReceivedEventArgs} + DEFINE_IID!(IID_IBarcodeScannerCapabilities, 3322319332, 62152, 17440, 163, 7, 177, 46, 246, 98, 40, 87); + RT_INTERFACE!{interface IBarcodeScannerCapabilities(IBarcodeScannerCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerCapabilities] { + fn get_PowerReportingType(&mut self, out: *mut UnifiedPosPowerReportingType) -> HRESULT, + fn get_IsStatisticsReportingSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsStatisticsUpdatingSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsImagePreviewSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IBarcodeScannerCapabilities { + #[inline] pub unsafe fn get_power_reporting_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerReportingType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_statistics_reporting_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_statistics_updating_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_image_preview_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsImagePreviewSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBarcodeScannerCapabilities1, 2388308969, 3628, 18223, 161, 204, 238, 128, 84, 182, 166, 132); + RT_INTERFACE!{interface IBarcodeScannerCapabilities1(IBarcodeScannerCapabilities1Vtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerCapabilities1] { + fn get_IsSoftwareTriggerSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IBarcodeScannerCapabilities1 { + #[inline] pub unsafe fn get_is_software_trigger_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSoftwareTriggerSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class BarcodeScannerCapabilities: IBarcodeScannerCapabilities} + DEFINE_IID!(IID_IBarcodeScannerStatics, 1561419631, 55881, 16872, 140, 140, 240, 203, 98, 169, 196, 252); + RT_INTERFACE!{static interface IBarcodeScannerStatics(IBarcodeScannerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerStatics] { + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IBarcodeScannerStatics { + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BarcodeScanner: IBarcodeScanner} + RT_ACTIVATABLE!{IBarcodeScannerStatics [CLSID_BarcodeScanner]} + DEFINE_CLSID!(CLSID_BarcodeScanner = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,66,97,114,99,111,100,101,83,99,97,110,110,101,114,0]); + DEFINE_IID!(IID_IBarcodeScanner, 3198369286, 45668, 20227, 169, 193, 69, 178, 15, 1, 19, 79); + RT_INTERFACE!{interface IBarcodeScanner(IBarcodeScannerVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScanner] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Capabilities(&mut self, out: *mut *mut BarcodeScannerCapabilities) -> HRESULT, + fn ClaimScannerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CheckHealthAsync(&mut self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetSupportedSymbologiesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn IsSymbologySupportedAsync(&mut self, barcodeSymbology: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RetrieveStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetSupportedProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn IsProfileSupported(&mut self, profile: HSTRING, out: *mut bool) -> HRESULT, + fn add_StatusUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IBarcodeScanner { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capabilities(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Capabilities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn claim_scanner_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClaimScannerAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn check_health_async(&mut self, level: UnifiedPosHealthCheckLevel) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CheckHealthAsync)(self, level, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_symbologies_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSupportedSymbologiesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_symbology_supported_async(&mut self, barcodeSymbology: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).IsSymbologySupportedAsync)(self, barcodeSymbology, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn retrieve_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RetrieveStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_profiles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSupportedProfiles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_profile_supported(&mut self, profile: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsProfileSupported)(self, profile.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_status_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StatusUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_status_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StatusUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ClaimedBarcodeScanner: IClaimedBarcodeScanner} + DEFINE_IID!(IID_IBarcodeScanner2, 2300662119, 36078, 17261, 137, 171, 141, 251, 67, 187, 66, 134); + RT_INTERFACE!{interface IBarcodeScanner2(IBarcodeScanner2Vtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScanner2] { + fn get_VideoDeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IBarcodeScanner2 { + #[inline] pub unsafe fn get_video_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum MagneticStripeReaderStatus: i32 { + Unauthenticated (MagneticStripeReaderStatus_Unauthenticated) = 0, Authenticated (MagneticStripeReaderStatus_Authenticated) = 1, Extended (MagneticStripeReaderStatus_Extended) = 2, + }} + RT_ENUM! { enum MagneticStripeReaderAuthenticationProtocol: i32 { + None (MagneticStripeReaderAuthenticationProtocol_None) = 0, ChallengeResponse (MagneticStripeReaderAuthenticationProtocol_ChallengeResponse) = 1, + }} + RT_ENUM! { enum MagneticStripeReaderTrackIds: i32 { + None (MagneticStripeReaderTrackIds_None) = 0, Track1 (MagneticStripeReaderTrackIds_Track1) = 1, Track2 (MagneticStripeReaderTrackIds_Track2) = 2, Track3 (MagneticStripeReaderTrackIds_Track3) = 4, Track4 (MagneticStripeReaderTrackIds_Track4) = 8, + }} + RT_ENUM! { enum MagneticStripeReaderErrorReportingType: i32 { + CardLevel (MagneticStripeReaderErrorReportingType_CardLevel) = 0, TrackLevel (MagneticStripeReaderErrorReportingType_TrackLevel) = 1, + }} + RT_ENUM! { enum MagneticStripeReaderTrackErrorType: i32 { + None (MagneticStripeReaderTrackErrorType_None) = 0, StartSentinelError (MagneticStripeReaderTrackErrorType_StartSentinelError) = 1, EndSentinelError (MagneticStripeReaderTrackErrorType_EndSentinelError) = 2, ParityError (MagneticStripeReaderTrackErrorType_ParityError) = 3, LrcError (MagneticStripeReaderTrackErrorType_LrcError) = 4, Unknown (MagneticStripeReaderTrackErrorType_Unknown) = -1, + }} + DEFINE_IID!(IID_IMagneticStripeReaderEncryptionAlgorithmsStatics, 1404400464, 50139, 18260, 156, 0, 65, 57, 35, 116, 161, 9); + RT_INTERFACE!{static interface IMagneticStripeReaderEncryptionAlgorithmsStatics(IMagneticStripeReaderEncryptionAlgorithmsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderEncryptionAlgorithmsStatics] { + fn get_None(&mut self, out: *mut u32) -> HRESULT, + fn get_TripleDesDukpt(&mut self, out: *mut u32) -> HRESULT, + fn get_ExtendedBase(&mut self, out: *mut u32) -> HRESULT + }} + impl IMagneticStripeReaderEncryptionAlgorithmsStatics { + #[inline] pub unsafe fn get_none(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_None)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_triple_des_dukpt(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TripleDesDukpt)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_base(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedBase)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IMagneticStripeReaderEncryptionAlgorithmsStatics [CLSID_MagneticStripeReaderEncryptionAlgorithms]} + DEFINE_CLSID!(CLSID_MagneticStripeReaderEncryptionAlgorithms = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,77,97,103,110,101,116,105,99,83,116,114,105,112,101,82,101,97,100,101,114,69,110,99,114,121,112,116,105,111,110,65,108,103,111,114,105,116,104,109,115,0]); + DEFINE_IID!(IID_IMagneticStripeReaderCardTypesStatics, 1385114717, 10630, 18255, 132, 84, 124, 205, 5, 146, 141, 95); + RT_INTERFACE!{static interface IMagneticStripeReaderCardTypesStatics(IMagneticStripeReaderCardTypesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderCardTypesStatics] { + fn get_Unknown(&mut self, out: *mut u32) -> HRESULT, + fn get_Bank(&mut self, out: *mut u32) -> HRESULT, + fn get_Aamva(&mut self, out: *mut u32) -> HRESULT, + fn get_ExtendedBase(&mut self, out: *mut u32) -> HRESULT + }} + impl IMagneticStripeReaderCardTypesStatics { + #[inline] pub unsafe fn get_unknown(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Unknown)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bank(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bank)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_aamva(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Aamva)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_base(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedBase)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IMagneticStripeReaderCardTypesStatics [CLSID_MagneticStripeReaderCardTypes]} + DEFINE_CLSID!(CLSID_MagneticStripeReaderCardTypes = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,77,97,103,110,101,116,105,99,83,116,114,105,112,101,82,101,97,100,101,114,67,97,114,100,84,121,112,101,115,0]); + DEFINE_IID!(IID_IMagneticStripeReaderTrackData, 273479281, 19101, 17518, 171, 197, 32, 64, 35, 7, 186, 54); + RT_INTERFACE!{interface IMagneticStripeReaderTrackData(IMagneticStripeReaderTrackDataVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderTrackData] { + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_DiscretionaryData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_EncryptedData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IMagneticStripeReaderTrackData { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_discretionary_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DiscretionaryData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_encrypted_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EncryptedData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMagneticStripeReaderReport, 1784373319, 39344, 16776, 190, 241, 237, 223, 121, 247, 143, 230); + RT_INTERFACE!{interface IMagneticStripeReaderReport(IMagneticStripeReaderReportVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderReport] { + fn get_CardType(&mut self, out: *mut u32) -> HRESULT, + fn get_Track1(&mut self, out: *mut *mut MagneticStripeReaderTrackData) -> HRESULT, + fn get_Track2(&mut self, out: *mut *mut MagneticStripeReaderTrackData) -> HRESULT, + fn get_Track3(&mut self, out: *mut *mut MagneticStripeReaderTrackData) -> HRESULT, + fn get_Track4(&mut self, out: *mut *mut MagneticStripeReaderTrackData) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_CardAuthenticationData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_CardAuthenticationDataLength(&mut self, out: *mut u32) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_AdditionalSecurityInformation(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IMagneticStripeReaderReport { + #[inline] pub unsafe fn get_card_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CardType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_track1(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Track1)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_track2(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Track2)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_track3(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Track3)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_track4(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Track4)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_card_authentication_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CardAuthenticationData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_card_authentication_data_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CardAuthenticationDataLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_additional_security_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AdditionalSecurityInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MagneticStripeReaderTrackData: IMagneticStripeReaderTrackData} + DEFINE_IID!(IID_IMagneticStripeReaderBankCardDataReceivedEventArgs, 781551651, 41754, 18275, 136, 44, 35, 114, 94, 57, 176, 142); + RT_INTERFACE!{interface IMagneticStripeReaderBankCardDataReceivedEventArgs(IMagneticStripeReaderBankCardDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderBankCardDataReceivedEventArgs] { + fn get_Report(&mut self, out: *mut *mut MagneticStripeReaderReport) -> HRESULT, + fn get_AccountNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ExpirationDate(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ServiceCode(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FirstName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MiddleInitial(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Surname(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Suffix(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMagneticStripeReaderBankCardDataReceivedEventArgs { + #[inline] pub unsafe fn get_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_account_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccountNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FirstName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_middle_initial(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MiddleInitial)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_surname(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Surname)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_suffix(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Suffix)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MagneticStripeReaderReport: IMagneticStripeReaderReport} + DEFINE_IID!(IID_IMagneticStripeReaderAamvaCardDataReceivedEventArgs, 172735825, 49942, 18704, 135, 243, 122, 98, 186, 134, 45, 49); + RT_INTERFACE!{interface IMagneticStripeReaderAamvaCardDataReceivedEventArgs(IMagneticStripeReaderAamvaCardDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderAamvaCardDataReceivedEventArgs] { + fn get_Report(&mut self, out: *mut *mut MagneticStripeReaderReport) -> HRESULT, + fn get_LicenseNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ExpirationDate(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Restrictions(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Class(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Endorsements(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BirthDate(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FirstName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Surname(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Suffix(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Gender(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HairColor(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EyeColor(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Height(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Weight(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Address(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_City(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_State(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PostalCode(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMagneticStripeReaderAamvaCardDataReceivedEventArgs { + #[inline] pub unsafe fn get_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_license_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LicenseNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_restrictions(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Restrictions)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_class(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Class)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_endorsements(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Endorsements)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_birth_date(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BirthDate)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FirstName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_surname(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Surname)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_suffix(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Suffix)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gender(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gender)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hair_color(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HairColor)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_eye_color(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EyeColor)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_weight(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Weight)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Address)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_city(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_City)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_postal_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PostalCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs, 2936689940, 22988, 19040, 153, 232, 153, 165, 61, 172, 229, 170); + RT_INTERFACE!{interface IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs(IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs] { + fn get_Report(&mut self, out: *mut *mut MagneticStripeReaderReport) -> HRESULT + }} + impl IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { + #[inline] pub unsafe fn get_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Report)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMagneticStripeReaderErrorOccurredEventArgs, 535689565, 11396, 16813, 183, 120, 242, 53, 106, 120, 154, 177); + RT_INTERFACE!{interface IMagneticStripeReaderErrorOccurredEventArgs(IMagneticStripeReaderErrorOccurredEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderErrorOccurredEventArgs] { + fn get_Track1Status(&mut self, out: *mut MagneticStripeReaderTrackErrorType) -> HRESULT, + fn get_Track2Status(&mut self, out: *mut MagneticStripeReaderTrackErrorType) -> HRESULT, + fn get_Track3Status(&mut self, out: *mut MagneticStripeReaderTrackErrorType) -> HRESULT, + fn get_Track4Status(&mut self, out: *mut MagneticStripeReaderTrackErrorType) -> HRESULT, + fn get_ErrorData(&mut self, out: *mut *mut UnifiedPosErrorData) -> HRESULT, + fn get_PartialInputData(&mut self, out: *mut *mut MagneticStripeReaderReport) -> HRESULT + }} + impl IMagneticStripeReaderErrorOccurredEventArgs { + #[inline] pub unsafe fn get_track1_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Track1Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_track2_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Track2Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_track3_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Track3Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_track4_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Track4Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ErrorData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_partial_input_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PartialInputData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMagneticStripeReaderStatusUpdatedEventArgs, 164391856, 12898, 16413, 158, 138, 232, 13, 99, 88, 144, 107); + RT_INTERFACE!{interface IMagneticStripeReaderStatusUpdatedEventArgs(IMagneticStripeReaderStatusUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderStatusUpdatedEventArgs] { + fn get_Status(&mut self, out: *mut MagneticStripeReaderStatus) -> HRESULT, + fn get_ExtendedStatus(&mut self, out: *mut u32) -> HRESULT + }} + impl IMagneticStripeReaderStatusUpdatedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MagneticStripeReaderBankCardDataReceivedEventArgs: IMagneticStripeReaderBankCardDataReceivedEventArgs} + RT_CLASS!{class MagneticStripeReaderAamvaCardDataReceivedEventArgs: IMagneticStripeReaderAamvaCardDataReceivedEventArgs} + RT_CLASS!{class MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs: IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs} + RT_CLASS!{class MagneticStripeReaderErrorOccurredEventArgs: IMagneticStripeReaderErrorOccurredEventArgs} + RT_CLASS!{class MagneticStripeReaderStatusUpdatedEventArgs: IMagneticStripeReaderStatusUpdatedEventArgs} + DEFINE_IID!(IID_IMagneticStripeReaderCapabilities, 1898479772, 50240, 17570, 164, 103, 70, 145, 117, 208, 40, 150); + RT_INTERFACE!{interface IMagneticStripeReaderCapabilities(IMagneticStripeReaderCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderCapabilities] { + fn get_CardAuthentication(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SupportedEncryptionAlgorithms(&mut self, out: *mut u32) -> HRESULT, + fn get_AuthenticationLevel(&mut self, out: *mut MagneticStripeReaderAuthenticationLevel) -> HRESULT, + fn get_IsIsoSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsJisOneSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsJisTwoSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_PowerReportingType(&mut self, out: *mut UnifiedPosPowerReportingType) -> HRESULT, + fn get_IsStatisticsReportingSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsStatisticsUpdatingSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsTrackDataMaskingSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsTransmitSentinelsSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IMagneticStripeReaderCapabilities { + #[inline] pub unsafe fn get_card_authentication(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CardAuthentication)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_encryption_algorithms(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportedEncryptionAlgorithms)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_authentication_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AuthenticationLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_iso_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsIsoSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_jis_one_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsJisOneSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_jis_two_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsJisTwoSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_power_reporting_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerReportingType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_statistics_reporting_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_statistics_updating_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_track_data_masking_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTrackDataMaskingSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_transmit_sentinels_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTransmitSentinelsSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MagneticStripeReaderCapabilities: IMagneticStripeReaderCapabilities} + RT_CLASS!{class ClaimedMagneticStripeReader: IClaimedMagneticStripeReader} + DEFINE_IID!(IID_IMagneticStripeReaderStatics, 3294604106, 61399, 18272, 165, 206, 21, 176, 228, 126, 148, 235); + RT_INTERFACE!{static interface IMagneticStripeReaderStatics(IMagneticStripeReaderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderStatics] { + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMagneticStripeReaderStatics { + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MagneticStripeReader: IMagneticStripeReader} + RT_ACTIVATABLE!{IMagneticStripeReaderStatics [CLSID_MagneticStripeReader]} + DEFINE_CLSID!(CLSID_MagneticStripeReader = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,77,97,103,110,101,116,105,99,83,116,114,105,112,101,82,101,97,100,101,114,0]); + DEFINE_IID!(IID_IMagneticStripeReader, 445820949, 18371, 18058, 147, 51, 12, 101, 23, 87, 72, 131); + RT_INTERFACE!{interface IMagneticStripeReader(IMagneticStripeReaderVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReader] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Capabilities(&mut self, out: *mut *mut MagneticStripeReaderCapabilities) -> HRESULT, + fn get_SupportedCardTypes(&mut self, outSize: *mut u32, out: *mut *mut u32) -> HRESULT, + fn get_DeviceAuthenticationProtocol(&mut self, out: *mut MagneticStripeReaderAuthenticationProtocol) -> HRESULT, + fn CheckHealthAsync(&mut self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ClaimReaderAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RetrieveStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetErrorReportingType(&mut self, out: *mut MagneticStripeReaderErrorReportingType) -> HRESULT, + fn add_StatusUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMagneticStripeReader { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capabilities(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Capabilities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_card_types(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedCardTypes)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_authentication_protocol(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeviceAuthenticationProtocol)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn check_health_async(&mut self, level: UnifiedPosHealthCheckLevel) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CheckHealthAsync)(self, level, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn claim_reader_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClaimReaderAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn retrieve_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RetrieveStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_reporting_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetErrorReportingType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_status_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StatusUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_status_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StatusUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPosPrinterCharacterSetIdsStatics, 1550884607, 28826, 20455, 178, 21, 6, 167, 72, 163, 139, 57); + RT_INTERFACE!{static interface IPosPrinterCharacterSetIdsStatics(IPosPrinterCharacterSetIdsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterCharacterSetIdsStatics] { + fn get_Utf16LE(&mut self, out: *mut u32) -> HRESULT, + fn get_Ascii(&mut self, out: *mut u32) -> HRESULT, + fn get_Ansi(&mut self, out: *mut u32) -> HRESULT + }} + impl IPosPrinterCharacterSetIdsStatics { + #[inline] pub unsafe fn get_utf16_le(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Utf16LE)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ascii(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ascii)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ansi(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ansi)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPosPrinterCharacterSetIdsStatics [CLSID_PosPrinterCharacterSetIds]} + DEFINE_CLSID!(CLSID_PosPrinterCharacterSetIds = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,80,111,115,80,114,105,110,116,101,114,67,104,97,114,97,99,116,101,114,83,101,116,73,100,115,0]); + DEFINE_IID!(IID_ICommonPosPrintStationCapabilities, 3730526922, 57390, 16617, 158, 94, 27, 72, 142, 106, 172, 252); + RT_INTERFACE!{interface ICommonPosPrintStationCapabilities(ICommonPosPrintStationCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ICommonPosPrintStationCapabilities] { + fn get_IsPrinterPresent(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDualColorSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_ColorCartridgeCapabilities(&mut self, out: *mut PosPrinterColorCapabilities) -> HRESULT, + fn get_CartridgeSensors(&mut self, out: *mut PosPrinterCartridgeSensors) -> HRESULT, + fn get_IsBoldSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsItalicSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsUnderlineSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDoubleHighPrintSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDoubleWidePrintSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDoubleHighDoubleWidePrintSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsPaperEmptySensorSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsPaperNearEndSensorSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportedCharactersPerLine(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl ICommonPosPrintStationCapabilities { + #[inline] pub unsafe fn get_is_printer_present(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPrinterPresent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_dual_color_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDualColorSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_color_cartridge_capabilities(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ColorCartridgeCapabilities)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cartridge_sensors(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CartridgeSensors)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_bold_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsBoldSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_italic_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsItalicSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_underline_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsUnderlineSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_double_high_print_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDoubleHighPrintSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_double_wide_print_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDoubleWidePrintSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_double_high_double_wide_print_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDoubleHighDoubleWidePrintSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_paper_empty_sensor_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPaperEmptySensorSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_paper_near_end_sensor_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPaperNearEndSensorSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_characters_per_line(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedCharactersPerLine)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICommonReceiptSlipCapabilities, 153643915, 39027, 19717, 191, 190, 71, 39, 166, 3, 143, 105); + RT_INTERFACE!{interface ICommonReceiptSlipCapabilities(ICommonReceiptSlipCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ICommonReceiptSlipCapabilities] { + fn get_IsBarcodeSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsBitmapSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsLeft90RotationSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsRight90RotationSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_Is180RotationSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsPrintAreaSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_RuledLineCapabilities(&mut self, out: *mut PosPrinterRuledLineCapabilities) -> HRESULT, + fn get_SupportedBarcodeRotations(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedBitmapRotations(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl ICommonReceiptSlipCapabilities { + #[inline] pub unsafe fn get_is_barcode_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsBarcodeSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_bitmap_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsBitmapSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_left90_rotation_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsLeft90RotationSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_right90_rotation_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsRight90RotationSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is180_rotation_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Is180RotationSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_print_area_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPrintAreaSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ruled_line_capabilities(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RuledLineCapabilities)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_barcode_rotations(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedBarcodeRotations)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_bitmap_rotations(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedBitmapRotations)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IReceiptPrinterCapabilities, 3102782863, 20904, 17404, 155, 213, 141, 226, 114, 166, 65, 91); + RT_INTERFACE!{interface IReceiptPrinterCapabilities(IReceiptPrinterCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IReceiptPrinterCapabilities] { + fn get_CanCutPaper(&mut self, out: *mut bool) -> HRESULT, + fn get_IsStampSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_MarkFeedCapabilities(&mut self, out: *mut PosPrinterMarkFeedCapabilities) -> HRESULT + }} + impl IReceiptPrinterCapabilities { + #[inline] pub unsafe fn get_can_cut_paper(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanCutPaper)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_stamp_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStampSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_mark_feed_capabilities(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MarkFeedCapabilities)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class ReceiptPrinterCapabilities: IReceiptPrinterCapabilities} + DEFINE_IID!(IID_ISlipPrinterCapabilities, 2578539417, 18572, 16727, 138, 194, 159, 87, 247, 8, 211, 219); + RT_INTERFACE!{interface ISlipPrinterCapabilities(ISlipPrinterCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ISlipPrinterCapabilities] { + fn get_IsFullLengthSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsBothSidesPrintingSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl ISlipPrinterCapabilities { + #[inline] pub unsafe fn get_is_full_length_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFullLengthSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_both_sides_printing_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsBothSidesPrintingSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SlipPrinterCapabilities: ISlipPrinterCapabilities} + DEFINE_IID!(IID_IJournalPrinterCapabilities, 995937347, 57415, 17507, 187, 88, 23, 181, 186, 29, 128, 86); + RT_INTERFACE!{interface IJournalPrinterCapabilities(IJournalPrinterCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IJournalPrinterCapabilities] { + + }} + RT_CLASS!{class JournalPrinterCapabilities: IJournalPrinterCapabilities} + DEFINE_IID!(IID_IPosPrinterCapabilities, 3454621473, 17280, 18821, 173, 197, 57, 219, 48, 205, 147, 188); + RT_INTERFACE!{interface IPosPrinterCapabilities(IPosPrinterCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterCapabilities] { + fn get_PowerReportingType(&mut self, out: *mut UnifiedPosPowerReportingType) -> HRESULT, + fn get_IsStatisticsReportingSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsStatisticsUpdatingSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_DefaultCharacterSet(&mut self, out: *mut u32) -> HRESULT, + fn get_HasCoverSensor(&mut self, out: *mut bool) -> HRESULT, + fn get_CanMapCharacterSet(&mut self, out: *mut bool) -> HRESULT, + fn get_IsTransactionSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_Receipt(&mut self, out: *mut *mut ReceiptPrinterCapabilities) -> HRESULT, + fn get_Slip(&mut self, out: *mut *mut SlipPrinterCapabilities) -> HRESULT, + fn get_Journal(&mut self, out: *mut *mut JournalPrinterCapabilities) -> HRESULT + }} + impl IPosPrinterCapabilities { + #[inline] pub unsafe fn get_power_reporting_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerReportingType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_statistics_reporting_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_statistics_updating_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_character_set(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DefaultCharacterSet)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_cover_sensor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasCoverSensor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_map_character_set(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanMapCharacterSet)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_transaction_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTransactionSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_receipt(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Receipt)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_slip(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Slip)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_journal(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Journal)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PosPrinterCapabilities: IPosPrinterCapabilities} + DEFINE_IID!(IID_IPosPrinterStatus, 3522217776, 55872, 17192, 191, 118, 81, 86, 250, 51, 183, 71); + RT_INTERFACE!{interface IPosPrinterStatus(IPosPrinterStatusVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterStatus] { + fn get_StatusKind(&mut self, out: *mut PosPrinterStatusKind) -> HRESULT, + fn get_ExtendedStatus(&mut self, out: *mut u32) -> HRESULT + }} + impl IPosPrinterStatus { + #[inline] pub unsafe fn get_status_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StatusKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PosPrinterStatus: IPosPrinterStatus} + DEFINE_IID!(IID_IPosPrinterStatusUpdatedEventArgs, 786139103, 5030, 17037, 186, 129, 176, 231, 195, 229, 163, 205); + RT_INTERFACE!{interface IPosPrinterStatusUpdatedEventArgs(IPosPrinterStatusUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterStatusUpdatedEventArgs] { + fn get_Status(&mut self, out: *mut *mut PosPrinterStatus) -> HRESULT + }} + impl IPosPrinterStatusUpdatedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PosPrinterStatusUpdatedEventArgs: IPosPrinterStatusUpdatedEventArgs} + DEFINE_IID!(IID_IPosPrinterReleaseDeviceRequestedEventArgs, 734765913, 7407, 16562, 158, 203, 249, 39, 248, 86, 174, 60); + RT_INTERFACE!{interface IPosPrinterReleaseDeviceRequestedEventArgs(IPosPrinterReleaseDeviceRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterReleaseDeviceRequestedEventArgs] { + + }} + RT_CLASS!{class PosPrinterReleaseDeviceRequestedEventArgs: IPosPrinterReleaseDeviceRequestedEventArgs} + DEFINE_IID!(IID_IPosPrinterStatics, 2363544810, 4911, 19679, 166, 74, 45, 13, 124, 150, 168, 91); + RT_INTERFACE!{static interface IPosPrinterStatics(IPosPrinterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterStatics] { + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPosPrinterStatics { + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PosPrinter: IPosPrinter} + RT_ACTIVATABLE!{IPosPrinterStatics [CLSID_PosPrinter]} + DEFINE_CLSID!(CLSID_PosPrinter = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,80,111,115,80,114,105,110,116,101,114,0]); + DEFINE_IID!(IID_IPosPrinter, 704889102, 39449, 18945, 153, 79, 18, 223, 173, 106, 220, 191); + RT_INTERFACE!{interface IPosPrinter(IPosPrinterVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinter] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Capabilities(&mut self, out: *mut *mut PosPrinterCapabilities) -> HRESULT, + fn get_SupportedCharacterSets(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedTypeFaces(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Status(&mut self, out: *mut *mut PosPrinterStatus) -> HRESULT, + fn ClaimPrinterAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CheckHealthAsync(&mut self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_StatusUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPosPrinter { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capabilities(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Capabilities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_character_sets(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedCharacterSets)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_type_faces(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedTypeFaces)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn claim_printer_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClaimPrinterAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn check_health_async(&mut self, level: UnifiedPosHealthCheckLevel) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CheckHealthAsync)(self, level, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_status_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StatusUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_status_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StatusUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ClaimedPosPrinter: IClaimedPosPrinter} + DEFINE_IID!(IID_IPosPrinterJob, 2593390684, 1557, 17809, 165, 143, 48, 248, 126, 223, 226, 228); + RT_INTERFACE!{interface IPosPrinterJob(IPosPrinterJobVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterJob] { + fn Print(&mut self, data: HSTRING) -> HRESULT, + fn PrintLine(&mut self, data: HSTRING) -> HRESULT, + fn PrintNewline(&mut self) -> HRESULT, + fn ExecuteAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPosPrinterJob { + #[inline] pub unsafe fn print(&mut self, data: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).Print)(self, data.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn print_line(&mut self, data: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).PrintLine)(self, data.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn print_newline(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).PrintNewline)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn execute_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ExecuteAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IReceiptOrSlipJob, 1394710974, 51395, 19906, 137, 233, 92, 74, 55, 179, 77, 220); + RT_INTERFACE!{interface IReceiptOrSlipJob(IReceiptOrSlipJobVtbl): IInspectable(IInspectableVtbl) [IID_IReceiptOrSlipJob] { + fn SetBarcodeRotation(&mut self, value: PosPrinterRotation) -> HRESULT, + fn SetPrintRotation(&mut self, value: PosPrinterRotation, includeBitmaps: bool) -> HRESULT, + fn SetPrintArea(&mut self, value: super::super::foundation::Rect) -> HRESULT, + #[cfg(feature="windows.graphics")] fn SetBitmap(&mut self, bitmapNumber: u32, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> HRESULT, + #[cfg(feature="windows.graphics")] fn SetBitmapCustomWidthStandardAlign(&mut self, bitmapNumber: u32, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> HRESULT, + #[cfg(feature="windows.graphics")] fn SetCustomAlignedBitmap(&mut self, bitmapNumber: u32, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> HRESULT, + #[cfg(feature="windows.graphics")] fn SetBitmapCustomWidthCustomAlign(&mut self, bitmapNumber: u32, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> HRESULT, + fn PrintSavedBitmap(&mut self, bitmapNumber: u32) -> HRESULT, + fn DrawRuledLine(&mut self, positionList: HSTRING, lineDirection: PosPrinterLineDirection, lineWidth: u32, lineStyle: PosPrinterLineStyle, lineColor: u32) -> HRESULT, + fn PrintBarcode(&mut self, data: HSTRING, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> HRESULT, + fn PrintBarcodeCustomAlign(&mut self, data: HSTRING, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignmentDistance: u32) -> HRESULT, + #[cfg(feature="windows.graphics")] fn PrintBitmap(&mut self, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> HRESULT, + #[cfg(feature="windows.graphics")] fn PrintBitmapCustomWidthStandardAlign(&mut self, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> HRESULT, + #[cfg(feature="windows.graphics")] fn PrintCustomAlignedBitmap(&mut self, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> HRESULT, + #[cfg(feature="windows.graphics")] fn PrintBitmapCustomWidthCustomAlign(&mut self, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> HRESULT + }} + impl IReceiptOrSlipJob { + #[inline] pub unsafe fn set_barcode_rotation(&mut self, value: PosPrinterRotation) -> Result<()> { + let hr = ((*self.lpVtbl).SetBarcodeRotation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_print_rotation(&mut self, value: PosPrinterRotation, includeBitmaps: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetPrintRotation)(self, value, includeBitmaps); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_print_area(&mut self, value: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).SetPrintArea)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_bitmap(&mut self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).SetBitmap)(self, bitmapNumber, bitmap as *const _ as *mut _, alignment); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_bitmap_custom_width_standard_align(&mut self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> Result<()> { + let hr = ((*self.lpVtbl).SetBitmapCustomWidthStandardAlign)(self, bitmapNumber, bitmap as *const _ as *mut _, alignment, width); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_custom_aligned_bitmap(&mut self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> Result<()> { + let hr = ((*self.lpVtbl).SetCustomAlignedBitmap)(self, bitmapNumber, bitmap as *const _ as *mut _, alignmentDistance); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_bitmap_custom_width_custom_align(&mut self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> Result<()> { + let hr = ((*self.lpVtbl).SetBitmapCustomWidthCustomAlign)(self, bitmapNumber, bitmap as *const _ as *mut _, alignmentDistance, width); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn print_saved_bitmap(&mut self, bitmapNumber: u32) -> Result<()> { + let hr = ((*self.lpVtbl).PrintSavedBitmap)(self, bitmapNumber); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn draw_ruled_line(&mut self, positionList: &HStringArg, lineDirection: PosPrinterLineDirection, lineWidth: u32, lineStyle: PosPrinterLineStyle, lineColor: u32) -> Result<()> { + let hr = ((*self.lpVtbl).DrawRuledLine)(self, positionList.get(), lineDirection, lineWidth, lineStyle, lineColor); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn print_barcode(&mut self, data: &HStringArg, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).PrintBarcode)(self, data.get(), symbology, height, width, textPosition, alignment); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn print_barcode_custom_align(&mut self, data: &HStringArg, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignmentDistance: u32) -> Result<()> { + let hr = ((*self.lpVtbl).PrintBarcodeCustomAlign)(self, data.get(), symbology, height, width, textPosition, alignmentDistance); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn print_bitmap(&mut self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).PrintBitmap)(self, bitmap as *const _ as *mut _, alignment); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn print_bitmap_custom_width_standard_align(&mut self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> Result<()> { + let hr = ((*self.lpVtbl).PrintBitmapCustomWidthStandardAlign)(self, bitmap as *const _ as *mut _, alignment, width); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn print_custom_aligned_bitmap(&mut self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> Result<()> { + let hr = ((*self.lpVtbl).PrintCustomAlignedBitmap)(self, bitmap as *const _ as *mut _, alignmentDistance); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn print_bitmap_custom_width_custom_align(&mut self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> Result<()> { + let hr = ((*self.lpVtbl).PrintBitmapCustomWidthCustomAlign)(self, bitmap as *const _ as *mut _, alignmentDistance, width); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IReceiptPrintJob, 2861958766, 44205, 19321, 157, 15, 192, 207, 192, 141, 199, 123); + RT_INTERFACE!{interface IReceiptPrintJob(IReceiptPrintJobVtbl): IInspectable(IInspectableVtbl) [IID_IReceiptPrintJob] { + fn MarkFeed(&mut self, kind: PosPrinterMarkFeedKind) -> HRESULT, + fn CutPaper(&mut self, percentage: f64) -> HRESULT, + fn CutPaperDefault(&mut self) -> HRESULT + }} + impl IReceiptPrintJob { + #[inline] pub unsafe fn mark_feed(&mut self, kind: PosPrinterMarkFeedKind) -> Result<()> { + let hr = ((*self.lpVtbl).MarkFeed)(self, kind); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn cut_paper(&mut self, percentage: f64) -> Result<()> { + let hr = ((*self.lpVtbl).CutPaper)(self, percentage); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn cut_paper_default(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).CutPaperDefault)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ReceiptPrintJob: IReceiptPrintJob} + RT_CLASS!{class SlipPrintJob: IReceiptOrSlipJob} + RT_CLASS!{class JournalPrintJob: IPosPrinterJob} + DEFINE_IID!(IID_ICommonClaimedPosPrinterStation, 3085657768, 65162, 19707, 139, 66, 227, 91, 40, 12, 178, 124); + RT_INTERFACE!{interface ICommonClaimedPosPrinterStation(ICommonClaimedPosPrinterStationVtbl): IInspectable(IInspectableVtbl) [IID_ICommonClaimedPosPrinterStation] { + fn put_CharactersPerLine(&mut self, value: u32) -> HRESULT, + fn get_CharactersPerLine(&mut self, out: *mut u32) -> HRESULT, + fn put_LineHeight(&mut self, value: u32) -> HRESULT, + fn get_LineHeight(&mut self, out: *mut u32) -> HRESULT, + fn put_LineSpacing(&mut self, value: u32) -> HRESULT, + fn get_LineSpacing(&mut self, out: *mut u32) -> HRESULT, + fn get_LineWidth(&mut self, out: *mut u32) -> HRESULT, + fn put_IsLetterQuality(&mut self, value: bool) -> HRESULT, + fn get_IsLetterQuality(&mut self, out: *mut bool) -> HRESULT, + fn get_IsPaperNearEnd(&mut self, out: *mut bool) -> HRESULT, + fn put_ColorCartridge(&mut self, value: PosPrinterColorCartridge) -> HRESULT, + fn get_ColorCartridge(&mut self, out: *mut PosPrinterColorCartridge) -> HRESULT, + fn get_IsCoverOpen(&mut self, out: *mut bool) -> HRESULT, + fn get_IsCartridgeRemoved(&mut self, out: *mut bool) -> HRESULT, + fn get_IsCartridgeEmpty(&mut self, out: *mut bool) -> HRESULT, + fn get_IsHeadCleaning(&mut self, out: *mut bool) -> HRESULT, + fn get_IsPaperEmpty(&mut self, out: *mut bool) -> HRESULT, + fn get_IsReadyToPrint(&mut self, out: *mut bool) -> HRESULT, + fn ValidateData(&mut self, data: HSTRING, out: *mut bool) -> HRESULT + }} + impl ICommonClaimedPosPrinterStation { + #[inline] pub unsafe fn set_characters_per_line(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CharactersPerLine)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_characters_per_line(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharactersPerLine)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_height(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_spacing(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineSpacing)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_spacing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineSpacing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_letter_quality(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsLetterQuality)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_letter_quality(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsLetterQuality)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_paper_near_end(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPaperNearEnd)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_color_cartridge(&mut self, value: PosPrinterColorCartridge) -> Result<()> { + let hr = ((*self.lpVtbl).put_ColorCartridge)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_color_cartridge(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ColorCartridge)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_cover_open(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCoverOpen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_cartridge_removed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCartridgeRemoved)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_cartridge_empty(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCartridgeEmpty)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_head_cleaning(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsHeadCleaning)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_paper_empty(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPaperEmpty)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_ready_to_print(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsReadyToPrint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn validate_data(&mut self, data: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ValidateData)(self, data.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IClaimedReceiptPrinter, 2597485172, 56673, 20194, 152, 55, 91, 93, 114, 213, 56, 185); + RT_INTERFACE!{interface IClaimedReceiptPrinter(IClaimedReceiptPrinterVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedReceiptPrinter] { + fn get_SidewaysMaxLines(&mut self, out: *mut u32) -> HRESULT, + fn get_SidewaysMaxChars(&mut self, out: *mut u32) -> HRESULT, + fn get_LinesToPaperCut(&mut self, out: *mut u32) -> HRESULT, + fn get_PageSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_PrintArea(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn CreateJob(&mut self, out: *mut *mut ReceiptPrintJob) -> HRESULT + }} + impl IClaimedReceiptPrinter { + #[inline] pub unsafe fn get_sideways_max_lines(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SidewaysMaxLines)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sideways_max_chars(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SidewaysMaxChars)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_lines_to_paper_cut(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LinesToPaperCut)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_page_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PageSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_print_area(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrintArea)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn create_job(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateJob)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ClaimedReceiptPrinter: IClaimedReceiptPrinter} + DEFINE_IID!(IID_IClaimedSlipPrinter, 3177050098, 44944, 20106, 183, 123, 227, 174, 156, 166, 58, 127); + RT_INTERFACE!{interface IClaimedSlipPrinter(IClaimedSlipPrinterVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedSlipPrinter] { + fn get_SidewaysMaxLines(&mut self, out: *mut u32) -> HRESULT, + fn get_SidewaysMaxChars(&mut self, out: *mut u32) -> HRESULT, + fn get_MaxLines(&mut self, out: *mut u32) -> HRESULT, + fn get_LinesNearEndToEnd(&mut self, out: *mut u32) -> HRESULT, + fn get_PrintSide(&mut self, out: *mut PosPrinterPrintSide) -> HRESULT, + fn get_PageSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_PrintArea(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn OpenJaws(&mut self) -> HRESULT, + fn CloseJaws(&mut self) -> HRESULT, + fn InsertSlipAsync(&mut self, timeout: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RemoveSlipAsync(&mut self, timeout: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ChangePrintSide(&mut self, printSide: PosPrinterPrintSide) -> HRESULT, + fn CreateJob(&mut self, out: *mut *mut SlipPrintJob) -> HRESULT + }} + impl IClaimedSlipPrinter { + #[inline] pub unsafe fn get_sideways_max_lines(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SidewaysMaxLines)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sideways_max_chars(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SidewaysMaxChars)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_lines(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxLines)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_lines_near_end_to_end(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LinesNearEndToEnd)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_print_side(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrintSide)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_page_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PageSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_print_area(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrintArea)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn open_jaws(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).OpenJaws)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn close_jaws(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).CloseJaws)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_slip_async(&mut self, timeout: super::super::foundation::TimeSpan) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).InsertSlipAsync)(self, timeout, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn remove_slip_async(&mut self, timeout: super::super::foundation::TimeSpan) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RemoveSlipAsync)(self, timeout, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn change_print_side(&mut self, printSide: PosPrinterPrintSide) -> Result<()> { + let hr = ((*self.lpVtbl).ChangePrintSide)(self, printSide); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn create_job(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateJob)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ClaimedSlipPrinter: IClaimedSlipPrinter} + DEFINE_IID!(IID_IClaimedJournalPrinter, 1743390256, 20861, 18559, 159, 223, 210, 224, 160, 162, 100, 165); + RT_INTERFACE!{interface IClaimedJournalPrinter(IClaimedJournalPrinterVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedJournalPrinter] { + fn CreateJob(&mut self, out: *mut *mut JournalPrintJob) -> HRESULT + }} + impl IClaimedJournalPrinter { + #[inline] pub unsafe fn create_job(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateJob)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ClaimedJournalPrinter: IClaimedJournalPrinter} + DEFINE_IID!(IID_ICashDrawerStatusUpdatedEventArgs, 816507274, 3440, 17820, 149, 83, 135, 225, 36, 197, 36, 136); + RT_INTERFACE!{interface ICashDrawerStatusUpdatedEventArgs(ICashDrawerStatusUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerStatusUpdatedEventArgs] { + fn get_Status(&mut self, out: *mut *mut CashDrawerStatus) -> HRESULT + }} + impl ICashDrawerStatusUpdatedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CashDrawerStatus: ICashDrawerStatus} + RT_CLASS!{class CashDrawerStatusUpdatedEventArgs: ICashDrawerStatusUpdatedEventArgs} + DEFINE_IID!(IID_ICashDrawerStatus, 1807579327, 56481, 19974, 153, 235, 90, 246, 165, 174, 193, 8); + RT_INTERFACE!{interface ICashDrawerStatus(ICashDrawerStatusVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerStatus] { + fn get_StatusKind(&mut self, out: *mut CashDrawerStatusKind) -> HRESULT, + fn get_ExtendedStatus(&mut self, out: *mut u32) -> HRESULT + }} + impl ICashDrawerStatus { + #[inline] pub unsafe fn get_status_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StatusKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICashDrawerCapabilities, 197582347, 59623, 19231, 177, 209, 62, 80, 26, 208, 130, 71); + RT_INTERFACE!{interface ICashDrawerCapabilities(ICashDrawerCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerCapabilities] { + fn get_PowerReportingType(&mut self, out: *mut UnifiedPosPowerReportingType) -> HRESULT, + fn get_IsStatisticsReportingSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsStatisticsUpdatingSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsStatusReportingSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsStatusMultiDrawerDetectSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDrawerOpenSensorAvailable(&mut self, out: *mut bool) -> HRESULT + }} + impl ICashDrawerCapabilities { + #[inline] pub unsafe fn get_power_reporting_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerReportingType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_statistics_reporting_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_statistics_updating_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_status_reporting_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStatusReportingSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_status_multi_drawer_detect_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStatusMultiDrawerDetectSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_drawer_open_sensor_available(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDrawerOpenSensorAvailable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CashDrawerCapabilities: ICashDrawerCapabilities} + DEFINE_IID!(IID_ICashDrawerEventSourceEventArgs, 1774926785, 5247, 16924, 156, 35, 9, 1, 35, 187, 120, 108); + RT_INTERFACE!{interface ICashDrawerEventSourceEventArgs(ICashDrawerEventSourceEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerEventSourceEventArgs] { + fn get_CashDrawer(&mut self, out: *mut *mut CashDrawer) -> HRESULT + }} + impl ICashDrawerEventSourceEventArgs { + #[inline] pub unsafe fn get_cash_drawer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CashDrawer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CashDrawer: ICashDrawer} + RT_ACTIVATABLE!{ICashDrawerStatics [CLSID_CashDrawer]} + DEFINE_CLSID!(CLSID_CashDrawer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,105,110,116,79,102,83,101,114,118,105,99,101,46,67,97,115,104,68,114,97,119,101,114,0]); + RT_CLASS!{class CashDrawerClosedEventArgs: ICashDrawerEventSourceEventArgs} + RT_CLASS!{class CashDrawerOpenedEventArgs: ICashDrawerEventSourceEventArgs} + DEFINE_IID!(IID_ICashDrawerEventSource, 3758548076, 62201, 17455, 141, 214, 6, 193, 10, 66, 39, 186); + RT_INTERFACE!{interface ICashDrawerEventSource(ICashDrawerEventSourceVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerEventSource] { + fn add_DrawerClosed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DrawerClosed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DrawerOpened(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DrawerOpened(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICashDrawerEventSource { + #[inline] pub unsafe fn add_drawer_closed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DrawerClosed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_drawer_closed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DrawerClosed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_drawer_opened(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DrawerOpened)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_drawer_opened(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DrawerOpened)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CashDrawerEventSource: ICashDrawerEventSource} + DEFINE_IID!(IID_ICashDrawerStatics, 3751843162, 54327, 20479, 181, 71, 221, 169, 105, 164, 248, 131); + RT_INTERFACE!{static interface ICashDrawerStatics(ICashDrawerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerStatics] { + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICashDrawerStatics { + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICashDrawer, 2676553160, 56916, 19182, 168, 144, 146, 11, 203, 254, 48, 252); + RT_INTERFACE!{interface ICashDrawer(ICashDrawerVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawer] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Capabilities(&mut self, out: *mut *mut CashDrawerCapabilities) -> HRESULT, + fn get_Status(&mut self, out: *mut *mut CashDrawerStatus) -> HRESULT, + fn get_IsDrawerOpen(&mut self, out: *mut bool) -> HRESULT, + fn get_DrawerEventSource(&mut self, out: *mut *mut CashDrawerEventSource) -> HRESULT, + fn ClaimDrawerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CheckHealthAsync(&mut self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_StatusUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICashDrawer { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capabilities(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Capabilities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_drawer_open(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDrawerOpen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_drawer_event_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DrawerEventSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn claim_drawer_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClaimDrawerAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn check_health_async(&mut self, level: UnifiedPosHealthCheckLevel) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CheckHealthAsync)(self, level, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_status_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StatusUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_status_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StatusUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ClaimedCashDrawer: IClaimedCashDrawer} + DEFINE_IID!(IID_ICashDrawerCloseAlarm, 1811451079, 28515, 17166, 171, 59, 149, 215, 95, 251, 232, 127); + RT_INTERFACE!{interface ICashDrawerCloseAlarm(ICashDrawerCloseAlarmVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerCloseAlarm] { + fn put_AlarmTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_AlarmTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_BeepFrequency(&mut self, value: u32) -> HRESULT, + fn get_BeepFrequency(&mut self, out: *mut u32) -> HRESULT, + fn put_BeepDuration(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_BeepDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_BeepDelay(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_BeepDelay(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn add_AlarmTimeoutExpired(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AlarmTimeoutExpired(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn StartAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICashDrawerCloseAlarm { + #[inline] pub unsafe fn set_alarm_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_AlarmTimeout)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_alarm_timeout(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlarmTimeout)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_beep_frequency(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_BeepFrequency)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_beep_frequency(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BeepFrequency)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_beep_duration(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_BeepDuration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_beep_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BeepDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_beep_delay(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_BeepDelay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_beep_delay(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BeepDelay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_alarm_timeout_expired(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AlarmTimeoutExpired)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_alarm_timeout_expired(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AlarmTimeoutExpired)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CashDrawerCloseAlarm: ICashDrawerCloseAlarm} + DEFINE_IID!(IID_IClaimedBarcodeScanner, 1248048284, 36772, 17202, 187, 38, 148, 93, 17, 216, 30, 15); + RT_INTERFACE!{interface IClaimedBarcodeScanner(IClaimedBarcodeScannerVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedBarcodeScanner] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsDisabledOnDataReceived(&mut self, value: bool) -> HRESULT, + fn get_IsDisabledOnDataReceived(&mut self, out: *mut bool) -> HRESULT, + fn put_IsDecodeDataEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsDecodeDataEnabled(&mut self, out: *mut bool) -> HRESULT, + fn EnableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DisableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RetainDevice(&mut self) -> HRESULT, + fn SetActiveSymbologiesAsync(&mut self, symbologies: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ResetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn UpdateStatisticsAsync(&mut self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SetActiveProfileAsync(&mut self, profile: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn add_DataReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_TriggerPressed(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TriggerPressed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_TriggerReleased(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TriggerReleased(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ReleaseDeviceRequested(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReleaseDeviceRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ImagePreviewReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ImagePreviewReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ErrorOccurred(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ErrorOccurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IClaimedBarcodeScanner { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_disabled_on_data_received(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDisabledOnDataReceived)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_disabled_on_data_received(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDisabledOnDataReceived)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_decode_data_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDecodeDataEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_decode_data_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDecodeDataEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn enable_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EnableAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn disable_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DisableAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn retain_device(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RetainDevice)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_active_symbologies_async(&mut self, symbologies: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetActiveSymbologiesAsync)(self, symbologies as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn reset_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_statistics_async(&mut self, statistics: &super::super::foundation::collections::IIterable>) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self, statistics as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_active_profile_async(&mut self, profile: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetActiveProfileAsync)(self, profile.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_data_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DataReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_data_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DataReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_trigger_pressed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TriggerPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_trigger_pressed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TriggerPressed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_trigger_released(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TriggerReleased)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_trigger_released(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TriggerReleased)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_release_device_requested(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_release_device_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_image_preview_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ImagePreviewReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_image_preview_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ImagePreviewReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_error_occurred(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ErrorOccurred)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_error_occurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ErrorOccurred)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IClaimedBarcodeScanner1, 4128943372, 34129, 17076, 153, 140, 151, 12, 32, 33, 10, 34); + RT_INTERFACE!{interface IClaimedBarcodeScanner1(IClaimedBarcodeScanner1Vtbl): IInspectable(IInspectableVtbl) [IID_IClaimedBarcodeScanner1] { + fn StartSoftwareTriggerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StopSoftwareTriggerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IClaimedBarcodeScanner1 { + #[inline] pub unsafe fn start_software_trigger_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartSoftwareTriggerAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_software_trigger_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopSoftwareTriggerAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IClaimedMagneticStripeReader, 1197254899, 37911, 18620, 185, 215, 65, 99, 167, 132, 76, 2); + RT_INTERFACE!{interface IClaimedMagneticStripeReader(IClaimedMagneticStripeReaderVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedMagneticStripeReader] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsDisabledOnDataReceived(&mut self, value: bool) -> HRESULT, + fn get_IsDisabledOnDataReceived(&mut self, out: *mut bool) -> HRESULT, + fn put_IsDecodeDataEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsDecodeDataEnabled(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDeviceAuthenticated(&mut self, out: *mut bool) -> HRESULT, + fn put_DataEncryptionAlgorithm(&mut self, value: u32) -> HRESULT, + fn get_DataEncryptionAlgorithm(&mut self, out: *mut u32) -> HRESULT, + fn put_TracksToRead(&mut self, value: MagneticStripeReaderTrackIds) -> HRESULT, + fn get_TracksToRead(&mut self, out: *mut MagneticStripeReaderTrackIds) -> HRESULT, + fn put_IsTransmitSentinelsEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsTransmitSentinelsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn EnableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DisableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RetainDevice(&mut self) -> HRESULT, + fn SetErrorReportingType(&mut self, value: MagneticStripeReaderErrorReportingType) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy17(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RetrieveDeviceAuthenticationDataAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn AuthenticateDeviceAsync(&mut self, responseTokenSize: u32, responseToken: *mut u8, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeAuthenticateDeviceAsync(&mut self, responseTokenSize: u32, responseToken: *mut u8, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn UpdateKeyAsync(&mut self, key: HSTRING, keyName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ResetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn UpdateStatisticsAsync(&mut self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn add_BankCardDataReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BankCardDataReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AamvaCardDataReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AamvaCardDataReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VendorSpecificDataReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VendorSpecificDataReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ReleaseDeviceRequested(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReleaseDeviceRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ErrorOccurred(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ErrorOccurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IClaimedMagneticStripeReader { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_disabled_on_data_received(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDisabledOnDataReceived)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_disabled_on_data_received(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDisabledOnDataReceived)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_decode_data_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDecodeDataEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_decode_data_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDecodeDataEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_device_authenticated(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDeviceAuthenticated)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_data_encryption_algorithm(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataEncryptionAlgorithm)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_encryption_algorithm(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DataEncryptionAlgorithm)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_tracks_to_read(&mut self, value: MagneticStripeReaderTrackIds) -> Result<()> { + let hr = ((*self.lpVtbl).put_TracksToRead)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tracks_to_read(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TracksToRead)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_transmit_sentinels_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTransmitSentinelsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_transmit_sentinels_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTransmitSentinelsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn enable_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EnableAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn disable_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DisableAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn retain_device(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RetainDevice)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_error_reporting_type(&mut self, value: MagneticStripeReaderErrorReportingType) -> Result<()> { + let hr = ((*self.lpVtbl).SetErrorReportingType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn retrieve_device_authentication_data_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RetrieveDeviceAuthenticationDataAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn authenticate_device_async(&mut self, responseToken: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AuthenticateDeviceAsync)(self, responseToken.len() as u32, responseToken.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn de_authenticate_device_async(&mut self, responseToken: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeAuthenticateDeviceAsync)(self, responseToken.len() as u32, responseToken.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_key_async(&mut self, key: &HStringArg, keyName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateKeyAsync)(self, key.get(), keyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn reset_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_statistics_async(&mut self, statistics: &super::super::foundation::collections::IIterable>) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self, statistics as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_bank_card_data_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BankCardDataReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_bank_card_data_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BankCardDataReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_aamva_card_data_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AamvaCardDataReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_aamva_card_data_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AamvaCardDataReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_vendor_specific_data_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VendorSpecificDataReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_vendor_specific_data_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VendorSpecificDataReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_release_device_requested(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_release_device_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_error_occurred(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ErrorOccurred)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_error_occurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ErrorOccurred)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IClaimedPosPrinter, 1835322892, 57406, 19220, 163, 142, 194, 140, 52, 184, 99, 83); + RT_INTERFACE!{interface IClaimedPosPrinter(IClaimedPosPrinterVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedPosPrinter] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_CharacterSet(&mut self, value: u32) -> HRESULT, + fn get_CharacterSet(&mut self, out: *mut u32) -> HRESULT, + fn get_IsCoverOpen(&mut self, out: *mut bool) -> HRESULT, + fn put_IsCharacterSetMappingEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsCharacterSetMappingEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_MapMode(&mut self, value: PosPrinterMapMode) -> HRESULT, + fn get_MapMode(&mut self, out: *mut PosPrinterMapMode) -> HRESULT, + fn get_Receipt(&mut self, out: *mut *mut ClaimedReceiptPrinter) -> HRESULT, + fn get_Slip(&mut self, out: *mut *mut ClaimedSlipPrinter) -> HRESULT, + fn get_Journal(&mut self, out: *mut *mut ClaimedJournalPrinter) -> HRESULT, + fn EnableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DisableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RetainDeviceAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ResetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn UpdateStatisticsAsync(&mut self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_ReleaseDeviceRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReleaseDeviceRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IClaimedPosPrinter { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_character_set(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CharacterSet)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_set(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharacterSet)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_cover_open(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCoverOpen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_character_set_mapping_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsCharacterSetMappingEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_character_set_mapping_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCharacterSetMappingEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_map_mode(&mut self, value: PosPrinterMapMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_MapMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_map_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MapMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_receipt(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Receipt)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_slip(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Slip)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_journal(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Journal)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn enable_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EnableAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn disable_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DisableAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn retain_device_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RetainDeviceAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn reset_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_statistics_async(&mut self, statistics: &super::super::foundation::collections::IIterable>) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self, statistics as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_release_device_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_release_device_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IClaimedCashDrawer, 3393165743, 43960, 17089, 138, 132, 92, 102, 81, 47, 90, 117); + RT_INTERFACE!{interface IClaimedCashDrawer(IClaimedCashDrawerVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedCashDrawer] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDrawerOpen(&mut self, out: *mut bool) -> HRESULT, + fn get_CloseAlarm(&mut self, out: *mut *mut CashDrawerCloseAlarm) -> HRESULT, + fn OpenDrawerAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn EnableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DisableAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RetainDeviceAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ResetStatisticsAsync(&mut self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn UpdateStatisticsAsync(&mut self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_ReleaseDeviceRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReleaseDeviceRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IClaimedCashDrawer { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_drawer_open(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDrawerOpen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_close_alarm(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CloseAlarm)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn open_drawer_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenDrawerAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn enable_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EnableAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn disable_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DisableAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn retain_device_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RetainDeviceAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn reset_statistics_async(&mut self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self, statisticsCategories as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_statistics_async(&mut self, statistics: &super::super::foundation::collections::IIterable>) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self, statistics as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_release_device_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_release_device_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Devices.PointOfService +pub mod radios { // Windows.Devices.Radios +use ::prelude::*; + RT_ENUM! { enum RadioState: i32 { + Unknown (RadioState_Unknown) = 0, On (RadioState_On) = 1, Off (RadioState_Off) = 2, Disabled (RadioState_Disabled) = 3, + }} + RT_ENUM! { enum RadioKind: i32 { + Other (RadioKind_Other) = 0, WiFi (RadioKind_WiFi) = 1, MobileBroadband (RadioKind_MobileBroadband) = 2, Bluetooth (RadioKind_Bluetooth) = 3, FM (RadioKind_FM) = 4, + }} + RT_ENUM! { enum RadioAccessStatus: i32 { + Unspecified (RadioAccessStatus_Unspecified) = 0, Allowed (RadioAccessStatus_Allowed) = 1, DeniedByUser (RadioAccessStatus_DeniedByUser) = 2, DeniedBySystem (RadioAccessStatus_DeniedBySystem) = 3, + }} + DEFINE_IID!(IID_IRadioStatics, 1605804334, 26571, 18094, 170, 233, 101, 145, 159, 134, 239, 244); + RT_INTERFACE!{static interface IRadioStatics(IRadioStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRadioStatics] { + fn GetRadiosAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IRadioStatics { + #[inline] pub unsafe fn get_radios_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRadiosAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Radio: IRadio} + RT_ACTIVATABLE!{IRadioStatics [CLSID_Radio]} + DEFINE_CLSID!(CLSID_Radio = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,82,97,100,105,111,115,46,82,97,100,105,111,0]); + DEFINE_IID!(IID_IRadio, 622926047, 45886, 16746, 135, 95, 28, 243, 138, 226, 216, 62); + RT_INTERFACE!{interface IRadio(IRadioVtbl): IInspectable(IInspectableVtbl) [IID_IRadio] { + fn SetStateAsync(&mut self, value: RadioState, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_StateChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_State(&mut self, out: *mut RadioState) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Kind(&mut self, out: *mut RadioKind) -> HRESULT + }} + impl IRadio { + #[inline] pub unsafe fn set_state_async(&mut self, value: RadioState) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetStateAsync)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_state_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StateChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_state_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StateChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Devices.Radios +pub mod sensors { // Windows.Devices.Sensors +use ::prelude::*; + RT_ENUM! { enum MagnetometerAccuracy: i32 { + Unknown (MagnetometerAccuracy_Unknown) = 0, Unreliable (MagnetometerAccuracy_Unreliable) = 1, Approximate (MagnetometerAccuracy_Approximate) = 2, High (MagnetometerAccuracy_High) = 3, + }} + RT_ENUM! { enum ActivityType: i32 { + Unknown (ActivityType_Unknown) = 0, Idle (ActivityType_Idle) = 1, Stationary (ActivityType_Stationary) = 2, Fidgeting (ActivityType_Fidgeting) = 3, Walking (ActivityType_Walking) = 4, Running (ActivityType_Running) = 5, InVehicle (ActivityType_InVehicle) = 6, Biking (ActivityType_Biking) = 7, + }} + RT_ENUM! { enum ActivitySensorReadingConfidence: i32 { + High (ActivitySensorReadingConfidence_High) = 0, Low (ActivitySensorReadingConfidence_Low) = 1, + }} + RT_ENUM! { enum SensorReadingType: i32 { + Absolute (SensorReadingType_Absolute) = 0, Relative (SensorReadingType_Relative) = 1, + }} + RT_ENUM! { enum AccelerometerReadingType: i32 { + Standard (AccelerometerReadingType_Standard) = 0, Linear (AccelerometerReadingType_Linear) = 1, Gravity (AccelerometerReadingType_Gravity) = 2, + }} + RT_ENUM! { enum SensorOptimizationGoal: i32 { + Precision (SensorOptimizationGoal_Precision) = 0, PowerEfficiency (SensorOptimizationGoal_PowerEfficiency) = 1, + }} + RT_ENUM! { enum SensorType: i32 { + Accelerometer (SensorType_Accelerometer) = 0, ActivitySensor (SensorType_ActivitySensor) = 1, Barometer (SensorType_Barometer) = 2, Compass (SensorType_Compass) = 3, CustomSensor (SensorType_CustomSensor) = 4, Gyroscope (SensorType_Gyroscope) = 5, ProximitySensor (SensorType_ProximitySensor) = 6, Inclinometer (SensorType_Inclinometer) = 7, LightSensor (SensorType_LightSensor) = 8, OrientationSensor (SensorType_OrientationSensor) = 9, Pedometer (SensorType_Pedometer) = 10, RelativeInclinometer (SensorType_RelativeInclinometer) = 11, RelativeOrientationSensor (SensorType_RelativeOrientationSensor) = 12, SimpleOrientationSensor (SensorType_SimpleOrientationSensor) = 13, + }} + DEFINE_IID!(IID_ISensorDataThreshold, 1423633505, 65099, 19975, 178, 96, 58, 76, 223, 190, 57, 110); + RT_INTERFACE!{interface ISensorDataThreshold(ISensorDataThresholdVtbl): IInspectable(IInspectableVtbl) [IID_ISensorDataThreshold] { + + }} + DEFINE_IID!(IID_ISensorDataThresholdTriggerDetails, 2433151415, 59533, 18609, 188, 144, 97, 156, 123, 52, 147, 145); + RT_INTERFACE!{interface ISensorDataThresholdTriggerDetails(ISensorDataThresholdTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ISensorDataThresholdTriggerDetails] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SensorType(&mut self, out: *mut SensorType) -> HRESULT + }} + impl ISensorDataThresholdTriggerDetails { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sensor_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SensorType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SensorDataThresholdTriggerDetails: ISensorDataThresholdTriggerDetails} + DEFINE_IID!(IID_IAccelerometerDeviceId, 2125227177, 38869, 17517, 171, 90, 145, 125, 249, 185, 106, 44); + RT_INTERFACE!{interface IAccelerometerDeviceId(IAccelerometerDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerDeviceId] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAccelerometerDeviceId { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAccelerometerStatics, 2783087476, 23175, 18989, 190, 204, 15, 144, 110, 160, 97, 221); + RT_INTERFACE!{static interface IAccelerometerStatics(IAccelerometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerStatics] { + fn GetDefault(&mut self, out: *mut *mut Accelerometer) -> HRESULT + }} + impl IAccelerometerStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Accelerometer: IAccelerometer} + RT_ACTIVATABLE!{IAccelerometerStatics [CLSID_Accelerometer]} + RT_ACTIVATABLE!{IAccelerometerStatics2 [CLSID_Accelerometer]} + DEFINE_CLSID!(CLSID_Accelerometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,65,99,99,101,108,101,114,111,109,101,116,101,114,0]); + DEFINE_IID!(IID_IAccelerometerStatics2, 3301213231, 55403, 18053, 178, 215, 51, 150, 247, 152, 213, 123); + RT_INTERFACE!{static interface IAccelerometerStatics2(IAccelerometerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerStatics2] { + fn GetDefaultWithAccelerometerReadingType(&mut self, readingType: AccelerometerReadingType, out: *mut *mut Accelerometer) -> HRESULT + }} + impl IAccelerometerStatics2 { + #[inline] pub unsafe fn get_default_with_accelerometer_reading_type(&mut self, readingType: AccelerometerReadingType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultWithAccelerometerReadingType)(self, readingType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAccelerometer, 3742909768, 10001, 19879, 128, 152, 75, 130, 32, 93, 60, 125); + RT_INTERFACE!{interface IAccelerometer(IAccelerometerVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometer] { + fn GetCurrentReading(&mut self, out: *mut *mut AccelerometerReading) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Shaken(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Shaken(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAccelerometer { + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_shaken(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Shaken)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_shaken(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Shaken)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AccelerometerReading: IAccelerometerReading} + RT_CLASS!{class AccelerometerReadingChangedEventArgs: IAccelerometerReadingChangedEventArgs} + RT_CLASS!{class AccelerometerShakenEventArgs: IAccelerometerShakenEventArgs} + DEFINE_IID!(IID_IAccelerometer2, 3908080366, 18788, 16410, 182, 2, 34, 13, 113, 83, 198, 10); + RT_INTERFACE!{interface IAccelerometer2(IAccelerometer2Vtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometer2] { + #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT + }} + impl IAccelerometer2 { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAccelerometer3, 2279604778, 60800, 18923, 191, 138, 164, 234, 49, 229, 205, 132); + RT_INTERFACE!{interface IAccelerometer3(IAccelerometer3Vtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometer3] { + fn put_ReportLatency(&mut self, value: u32) -> HRESULT, + fn get_ReportLatency(&mut self, out: *mut u32) -> HRESULT, + fn get_MaxBatchSize(&mut self, out: *mut u32) -> HRESULT + }} + impl IAccelerometer3 { + #[inline] pub unsafe fn set_report_latency(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportLatency)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_latency(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportLatency)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_batch_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxBatchSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAccelerometer4, 490159183, 17107, 17842, 129, 68, 171, 127, 182, 101, 235, 89); + RT_INTERFACE!{interface IAccelerometer4(IAccelerometer4Vtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometer4] { + fn get_ReadingType(&mut self, out: *mut AccelerometerReadingType) -> HRESULT + }} + impl IAccelerometer4 { + #[inline] pub unsafe fn get_reading_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadingType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAccelerometerReading, 3120462539, 54097, 16559, 139, 182, 122, 169, 174, 100, 31, 183); + RT_INTERFACE!{interface IAccelerometerReading(IAccelerometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerReading] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_AccelerationX(&mut self, out: *mut f64) -> HRESULT, + fn get_AccelerationY(&mut self, out: *mut f64) -> HRESULT, + fn get_AccelerationZ(&mut self, out: *mut f64) -> HRESULT + }} + impl IAccelerometerReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_acceleration_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AccelerationX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_acceleration_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AccelerationY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_acceleration_z(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AccelerationZ)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAccelerometerReadingChangedEventArgs, 9815643, 46764, 18266, 159, 68, 139, 50, 211, 90, 63, 37); + RT_INTERFACE!{interface IAccelerometerReadingChangedEventArgs(IAccelerometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut AccelerometerReading) -> HRESULT + }} + impl IAccelerometerReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAccelerometerShakenEventArgs, 2516517329, 18984, 20277, 152, 232, 129, 120, 170, 228, 8, 74); + RT_INTERFACE!{interface IAccelerometerShakenEventArgs(IAccelerometerShakenEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerShakenEventArgs] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT + }} + impl IAccelerometerShakenEventArgs { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInclinometerDeviceId, 32053634, 16895, 17414, 174, 131, 98, 33, 15, 241, 111, 227); + RT_INTERFACE!{interface IInclinometerDeviceId(IInclinometerDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerDeviceId] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IInclinometerDeviceId { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInclinometerStatics, 4063151441, 39984, 17722, 139, 73, 60, 62, 235, 51, 203, 97); + RT_INTERFACE!{static interface IInclinometerStatics(IInclinometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerStatics] { + fn GetDefault(&mut self, out: *mut *mut Inclinometer) -> HRESULT + }} + impl IInclinometerStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Inclinometer: IInclinometer} + RT_ACTIVATABLE!{IInclinometerStatics2 [CLSID_Inclinometer]} + RT_ACTIVATABLE!{IInclinometerStatics [CLSID_Inclinometer]} + RT_ACTIVATABLE!{IInclinometerStatics3 [CLSID_Inclinometer]} + DEFINE_CLSID!(CLSID_Inclinometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,73,110,99,108,105,110,111,109,101,116,101,114,0]); + DEFINE_IID!(IID_IInclinometerStatics2, 71276405, 27166, 18844, 134, 224, 99, 140, 26, 134, 75, 0); + RT_INTERFACE!{static interface IInclinometerStatics2(IInclinometerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerStatics2] { + fn GetDefaultForRelativeReadings(&mut self, out: *mut *mut Inclinometer) -> HRESULT + }} + impl IInclinometerStatics2 { + #[inline] pub unsafe fn get_default_for_relative_readings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultForRelativeReadings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInclinometerStatics3, 3181003392, 47386, 18473, 147, 146, 171, 192, 182, 189, 242, 180); + RT_INTERFACE!{static interface IInclinometerStatics3(IInclinometerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerStatics3] { + fn GetDefaultWithSensorReadingType(&mut self, sensorReadingtype: SensorReadingType, out: *mut *mut Inclinometer) -> HRESULT + }} + impl IInclinometerStatics3 { + #[inline] pub unsafe fn get_default_with_sensor_reading_type(&mut self, sensorReadingtype: SensorReadingType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultWithSensorReadingType)(self, sensorReadingtype, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInclinometer, 642304623, 8838, 16495, 145, 97, 240, 196, 189, 128, 110, 191); + RT_INTERFACE!{interface IInclinometer(IInclinometerVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometer] { + fn GetCurrentReading(&mut self, out: *mut *mut InclinometerReading) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IInclinometer { + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class InclinometerReading: IInclinometerReading} + RT_CLASS!{class InclinometerReadingChangedEventArgs: IInclinometerReadingChangedEventArgs} + DEFINE_IID!(IID_IInclinometer2, 43987859, 10418, 17912, 187, 22, 97, 232, 106, 127, 174, 110); + RT_INTERFACE!{interface IInclinometer2(IInclinometer2Vtbl): IInspectable(IInspectableVtbl) [IID_IInclinometer2] { + #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT, + fn get_ReadingType(&mut self, out: *mut SensorReadingType) -> HRESULT + }} + impl IInclinometer2 { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_reading_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadingType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInclinometerReading, 2672095317, 46838, 18815, 177, 39, 26, 119, 94, 80, 20, 88); + RT_INTERFACE!{interface IInclinometerReading(IInclinometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerReading] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_PitchDegrees(&mut self, out: *mut f32) -> HRESULT, + fn get_RollDegrees(&mut self, out: *mut f32) -> HRESULT, + fn get_YawDegrees(&mut self, out: *mut f32) -> HRESULT + }} + impl IInclinometerReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pitch_degrees(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PitchDegrees)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_roll_degrees(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RollDegrees)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_yaw_degrees(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_YawDegrees)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInclinometerReadingYawAccuracy, 3025397888, 8163, 18822, 162, 87, 230, 236, 226, 114, 57, 73); + RT_INTERFACE!{interface IInclinometerReadingYawAccuracy(IInclinometerReadingYawAccuracyVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerReadingYawAccuracy] { + fn get_YawAccuracy(&mut self, out: *mut MagnetometerAccuracy) -> HRESULT + }} + impl IInclinometerReadingYawAccuracy { + #[inline] pub unsafe fn get_yaw_accuracy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_YawAccuracy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInclinometerReadingChangedEventArgs, 1256791489, 59371, 18744, 133, 17, 174, 13, 107, 68, 4, 56); + RT_INTERFACE!{interface IInclinometerReadingChangedEventArgs(IInclinometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut InclinometerReading) -> HRESULT + }} + impl IInclinometerReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGyrometerDeviceId, 518383992, 35234, 17013, 158, 149, 113, 38, 244, 112, 135, 96); + RT_INTERFACE!{interface IGyrometerDeviceId(IGyrometerDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_IGyrometerDeviceId] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IGyrometerDeviceId { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGyrometerStatics, 2209802185, 58525, 19257, 134, 230, 205, 85, 75, 228, 197, 193); + RT_INTERFACE!{static interface IGyrometerStatics(IGyrometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGyrometerStatics] { + fn GetDefault(&mut self, out: *mut *mut Gyrometer) -> HRESULT + }} + impl IGyrometerStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Gyrometer: IGyrometer} + RT_ACTIVATABLE!{IGyrometerStatics [CLSID_Gyrometer]} + DEFINE_CLSID!(CLSID_Gyrometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,71,121,114,111,109,101,116,101,114,0]); + DEFINE_IID!(IID_IGyrometer, 4256803268, 33969, 19618, 151, 99, 155, 88, 149, 6, 199, 12); + RT_INTERFACE!{interface IGyrometer(IGyrometerVtbl): IInspectable(IInspectableVtbl) [IID_IGyrometer] { + fn GetCurrentReading(&mut self, out: *mut *mut GyrometerReading) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IGyrometer { + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class GyrometerReading: IGyrometerReading} + RT_CLASS!{class GyrometerReadingChangedEventArgs: IGyrometerReadingChangedEventArgs} + DEFINE_IID!(IID_IGyrometer2, 1675568195, 36072, 16835, 172, 68, 134, 152, 129, 11, 85, 127); + RT_INTERFACE!{interface IGyrometer2(IGyrometer2Vtbl): IInspectable(IInspectableVtbl) [IID_IGyrometer2] { + #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT + }} + impl IGyrometer2 { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGyrometerReading, 3017203292, 7908, 17775, 157, 231, 226, 73, 59, 92, 142, 3); + RT_INTERFACE!{interface IGyrometerReading(IGyrometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IGyrometerReading] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_AngularVelocityX(&mut self, out: *mut f64) -> HRESULT, + fn get_AngularVelocityY(&mut self, out: *mut f64) -> HRESULT, + fn get_AngularVelocityZ(&mut self, out: *mut f64) -> HRESULT + }} + impl IGyrometerReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_angular_velocity_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AngularVelocityX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_angular_velocity_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AngularVelocityY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_angular_velocity_z(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AngularVelocityZ)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGyrometerReadingChangedEventArgs, 266279061, 28574, 17102, 141, 88, 56, 140, 10, 184, 53, 109); + RT_INTERFACE!{interface IGyrometerReadingChangedEventArgs(IGyrometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGyrometerReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut GyrometerReading) -> HRESULT + }} + impl IGyrometerReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompassDeviceId, 3514944041, 45189, 19229, 135, 10, 79, 245, 123, 167, 79, 212); + RT_INTERFACE!{interface ICompassDeviceId(ICompassDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_ICompassDeviceId] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICompassDeviceId { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompassStatics, 2596050911, 22252, 19493, 181, 77, 64, 166, 139, 181, 178, 105); + RT_INTERFACE!{static interface ICompassStatics(ICompassStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICompassStatics] { + fn GetDefault(&mut self, out: *mut *mut Compass) -> HRESULT + }} + impl ICompassStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Compass: ICompass} + RT_ACTIVATABLE!{ICompassStatics [CLSID_Compass]} + DEFINE_CLSID!(CLSID_Compass = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,67,111,109,112,97,115,115,0]); + DEFINE_IID!(IID_ICompass, 691010196, 6981, 16444, 186, 6, 177, 6, 219, 166, 154, 100); + RT_INTERFACE!{interface ICompass(ICompassVtbl): IInspectable(IInspectableVtbl) [IID_ICompass] { + fn GetCurrentReading(&mut self, out: *mut *mut CompassReading) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICompass { + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CompassReading: ICompassReading} + RT_CLASS!{class CompassReadingChangedEventArgs: ICompassReadingChangedEventArgs} + DEFINE_IID!(IID_ICompass2, 921857289, 51159, 17231, 180, 97, 151, 157, 223, 194, 50, 47); + RT_INTERFACE!{interface ICompass2(ICompass2Vtbl): IInspectable(IInspectableVtbl) [IID_ICompass2] { + #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT + }} + impl ICompass2 { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompassReading, 2190545192, 20797, 19913, 183, 129, 94, 237, 251, 240, 45, 12); + RT_INTERFACE!{interface ICompassReading(ICompassReadingVtbl): IInspectable(IInspectableVtbl) [IID_ICompassReading] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_HeadingMagneticNorth(&mut self, out: *mut f64) -> HRESULT, + fn get_HeadingTrueNorth(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl ICompassReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_heading_magnetic_north(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HeadingMagneticNorth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_heading_true_north(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeadingTrueNorth)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompassReadingHeadingAccuracy, 3881907534, 35089, 16631, 158, 22, 110, 204, 125, 174, 197, 222); + RT_INTERFACE!{interface ICompassReadingHeadingAccuracy(ICompassReadingHeadingAccuracyVtbl): IInspectable(IInspectableVtbl) [IID_ICompassReadingHeadingAccuracy] { + fn get_HeadingAccuracy(&mut self, out: *mut MagnetometerAccuracy) -> HRESULT + }} + impl ICompassReadingHeadingAccuracy { + #[inline] pub unsafe fn get_heading_accuracy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HeadingAccuracy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompassReadingChangedEventArgs, 2400537008, 59580, 19582, 176, 9, 78, 65, 223, 19, 112, 114); + RT_INTERFACE!{interface ICompassReadingChangedEventArgs(ICompassReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICompassReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut CompassReading) -> HRESULT + }} + impl ICompassReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILightSensorDeviceId, 2146322936, 2811, 20305, 135, 240, 108, 38, 55, 92, 233, 79); + RT_INTERFACE!{interface ILightSensorDeviceId(ILightSensorDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_ILightSensorDeviceId] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ILightSensorDeviceId { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILightSensorStatics, 1172016260, 50088, 18206, 154, 83, 100, 87, 250, 216, 124, 14); + RT_INTERFACE!{static interface ILightSensorStatics(ILightSensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILightSensorStatics] { + fn GetDefault(&mut self, out: *mut *mut LightSensor) -> HRESULT + }} + impl ILightSensorStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LightSensor: ILightSensor} + RT_ACTIVATABLE!{ILightSensorStatics [CLSID_LightSensor]} + DEFINE_CLSID!(CLSID_LightSensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,76,105,103,104,116,83,101,110,115,111,114,0]); + DEFINE_IID!(IID_ILightSensor, 4165732120, 3156, 18350, 146, 46, 120, 159, 87, 251, 3, 160); + RT_INTERFACE!{interface ILightSensor(ILightSensorVtbl): IInspectable(IInspectableVtbl) [IID_ILightSensor] { + fn GetCurrentReading(&mut self, out: *mut *mut LightSensorReading) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ILightSensor { + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class LightSensorReading: ILightSensorReading} + RT_CLASS!{class LightSensorReadingChangedEventArgs: ILightSensorReadingChangedEventArgs} + DEFINE_IID!(IID_ILightSensorReading, 4292829952, 8828, 19755, 179, 2, 252, 1, 66, 72, 92, 104); + RT_INTERFACE!{interface ILightSensorReading(ILightSensorReadingVtbl): IInspectable(IInspectableVtbl) [IID_ILightSensorReading] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_IlluminanceInLux(&mut self, out: *mut f32) -> HRESULT + }} + impl ILightSensorReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_illuminance_in_lux(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IlluminanceInLux)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILightSensorReadingChangedEventArgs, 2745365711, 9611, 16908, 184, 171, 142, 221, 96, 30, 207, 80); + RT_INTERFACE!{interface ILightSensorReadingChangedEventArgs(ILightSensorReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ILightSensorReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut LightSensorReading) -> HRESULT + }} + impl ILightSensorReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISensorRotationMatrix, 171792999, 8948, 17298, 149, 56, 101, 208, 189, 6, 74, 166); + RT_INTERFACE!{interface ISensorRotationMatrix(ISensorRotationMatrixVtbl): IInspectable(IInspectableVtbl) [IID_ISensorRotationMatrix] { + fn get_M11(&mut self, out: *mut f32) -> HRESULT, + fn get_M12(&mut self, out: *mut f32) -> HRESULT, + fn get_M13(&mut self, out: *mut f32) -> HRESULT, + fn get_M21(&mut self, out: *mut f32) -> HRESULT, + fn get_M22(&mut self, out: *mut f32) -> HRESULT, + fn get_M23(&mut self, out: *mut f32) -> HRESULT, + fn get_M31(&mut self, out: *mut f32) -> HRESULT, + fn get_M32(&mut self, out: *mut f32) -> HRESULT, + fn get_M33(&mut self, out: *mut f32) -> HRESULT + }} + impl ISensorRotationMatrix { + #[inline] pub unsafe fn get_m11(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_M11)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_m12(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_M12)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_m13(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_M13)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_m21(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_M21)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_m22(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_M22)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_m23(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_M23)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_m31(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_M31)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_m32(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_M32)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_m33(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_M33)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISensorQuaternion, 3385182247, 50972, 18151, 157, 163, 54, 161, 147, 178, 50, 188); + RT_INTERFACE!{interface ISensorQuaternion(ISensorQuaternionVtbl): IInspectable(IInspectableVtbl) [IID_ISensorQuaternion] { + fn get_W(&mut self, out: *mut f32) -> HRESULT, + fn get_X(&mut self, out: *mut f32) -> HRESULT, + fn get_Y(&mut self, out: *mut f32) -> HRESULT, + fn get_Z(&mut self, out: *mut f32) -> HRESULT + }} + impl ISensorQuaternion { + #[inline] pub unsafe fn get_w(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_W)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_X)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Y)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_z(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Z)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SensorRotationMatrix: ISensorRotationMatrix} + RT_CLASS!{class SensorQuaternion: ISensorQuaternion} + DEFINE_IID!(IID_IOrientationSensorDeviceId, 1516877384, 19497, 18924, 178, 143, 234, 29, 17, 123, 102, 240); + RT_INTERFACE!{interface IOrientationSensorDeviceId(IOrientationSensorDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorDeviceId] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IOrientationSensorDeviceId { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IOrientationSensorStatics, 284133138, 64332, 17034, 137, 139, 39, 101, 228, 9, 230, 105); + RT_INTERFACE!{static interface IOrientationSensorStatics(IOrientationSensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorStatics] { + fn GetDefault(&mut self, out: *mut *mut OrientationSensor) -> HRESULT + }} + impl IOrientationSensorStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class OrientationSensor: IOrientationSensor} + RT_ACTIVATABLE!{IOrientationSensorStatics [CLSID_OrientationSensor]} + RT_ACTIVATABLE!{IOrientationSensorStatics3 [CLSID_OrientationSensor]} + RT_ACTIVATABLE!{IOrientationSensorStatics2 [CLSID_OrientationSensor]} + DEFINE_CLSID!(CLSID_OrientationSensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,79,114,105,101,110,116,97,116,105,111,110,83,101,110,115,111,114,0]); + DEFINE_IID!(IID_IOrientationSensorStatics2, 1507462411, 54282, 19569, 146, 118, 138, 39, 42, 10, 102, 25); + RT_INTERFACE!{static interface IOrientationSensorStatics2(IOrientationSensorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorStatics2] { + fn GetDefaultForRelativeReadings(&mut self, out: *mut *mut OrientationSensor) -> HRESULT + }} + impl IOrientationSensorStatics2 { + #[inline] pub unsafe fn get_default_for_relative_readings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultForRelativeReadings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IOrientationSensorStatics3, 3626821920, 10103, 16639, 159, 89, 214, 84, 176, 133, 241, 47); + RT_INTERFACE!{static interface IOrientationSensorStatics3(IOrientationSensorStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorStatics3] { + fn GetDefaultWithSensorReadingType(&mut self, sensorReadingtype: SensorReadingType, out: *mut *mut OrientationSensor) -> HRESULT, + fn GetDefaultWithSensorReadingTypeAndSensorOptimizationGoal(&mut self, sensorReadingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal, out: *mut *mut OrientationSensor) -> HRESULT + }} + impl IOrientationSensorStatics3 { + #[inline] pub unsafe fn get_default_with_sensor_reading_type(&mut self, sensorReadingtype: SensorReadingType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultWithSensorReadingType)(self, sensorReadingtype, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_with_sensor_reading_type_and_sensor_optimization_goal(&mut self, sensorReadingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultWithSensorReadingTypeAndSensorOptimizationGoal)(self, sensorReadingType, optimizationGoal, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IOrientationSensor, 1580549685, 53099, 19555, 171, 216, 16, 37, 43, 11, 246, 236); + RT_INTERFACE!{interface IOrientationSensor(IOrientationSensorVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensor] { + fn GetCurrentReading(&mut self, out: *mut *mut OrientationSensorReading) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IOrientationSensor { + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class OrientationSensorReading: IOrientationSensorReading} + RT_CLASS!{class OrientationSensorReadingChangedEventArgs: IOrientationSensorReadingChangedEventArgs} + DEFINE_IID!(IID_IOrientationSensor2, 227691769, 12063, 18889, 128, 66, 74, 24, 19, 214, 119, 96); + RT_INTERFACE!{interface IOrientationSensor2(IOrientationSensor2Vtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensor2] { + #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT, + fn get_ReadingType(&mut self, out: *mut SensorReadingType) -> HRESULT + }} + impl IOrientationSensor2 { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_reading_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadingType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IOrientationSensorReading, 1196870035, 26005, 18583, 188, 198, 213, 55, 238, 117, 117, 100); + RT_INTERFACE!{interface IOrientationSensorReading(IOrientationSensorReadingVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorReading] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_RotationMatrix(&mut self, out: *mut *mut SensorRotationMatrix) -> HRESULT, + fn get_Quaternion(&mut self, out: *mut *mut SensorQuaternion) -> HRESULT + }} + impl IOrientationSensorReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation_matrix(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RotationMatrix)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_quaternion(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Quaternion)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IOrientationSensorReadingYawAccuracy, 3517749284, 16218, 18850, 188, 123, 17, 128, 188, 56, 205, 43); + RT_INTERFACE!{interface IOrientationSensorReadingYawAccuracy(IOrientationSensorReadingYawAccuracyVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorReadingYawAccuracy] { + fn get_YawAccuracy(&mut self, out: *mut MagnetometerAccuracy) -> HRESULT + }} + impl IOrientationSensorReadingYawAccuracy { + #[inline] pub unsafe fn get_yaw_accuracy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_YawAccuracy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IOrientationSensorReadingChangedEventArgs, 19665286, 50106, 18108, 174, 101, 122, 152, 153, 108, 191, 184); + RT_INTERFACE!{interface IOrientationSensorReadingChangedEventArgs(IOrientationSensorReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut OrientationSensorReading) -> HRESULT + }} + impl IOrientationSensorReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum SimpleOrientation: i32 { + NotRotated (SimpleOrientation_NotRotated) = 0, Rotated90DegreesCounterclockwise (SimpleOrientation_Rotated90DegreesCounterclockwise) = 1, Rotated180DegreesCounterclockwise (SimpleOrientation_Rotated180DegreesCounterclockwise) = 2, Rotated270DegreesCounterclockwise (SimpleOrientation_Rotated270DegreesCounterclockwise) = 3, Faceup (SimpleOrientation_Faceup) = 4, Facedown (SimpleOrientation_Facedown) = 5, + }} + DEFINE_IID!(IID_ISimpleOrientationSensorDeviceId, 4223666891, 15222, 16886, 128, 145, 48, 239, 230, 70, 211, 207); + RT_INTERFACE!{interface ISimpleOrientationSensorDeviceId(ISimpleOrientationSensorDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_ISimpleOrientationSensorDeviceId] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISimpleOrientationSensorDeviceId { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISimpleOrientationSensorStatics, 1928136303, 28842, 16582, 155, 27, 52, 51, 247, 69, 155, 78); + RT_INTERFACE!{static interface ISimpleOrientationSensorStatics(ISimpleOrientationSensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISimpleOrientationSensorStatics] { + fn GetDefault(&mut self, out: *mut *mut SimpleOrientationSensor) -> HRESULT + }} + impl ISimpleOrientationSensorStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SimpleOrientationSensor: ISimpleOrientationSensor} + RT_ACTIVATABLE!{ISimpleOrientationSensorStatics [CLSID_SimpleOrientationSensor]} + DEFINE_CLSID!(CLSID_SimpleOrientationSensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,83,105,109,112,108,101,79,114,105,101,110,116,97,116,105,111,110,83,101,110,115,111,114,0]); + DEFINE_IID!(IID_ISimpleOrientationSensor, 1609906262, 8522, 19950, 163, 249, 97, 111, 26, 176, 111, 253); + RT_INTERFACE!{interface ISimpleOrientationSensor(ISimpleOrientationSensorVtbl): IInspectable(IInspectableVtbl) [IID_ISimpleOrientationSensor] { + fn GetCurrentOrientation(&mut self, out: *mut SimpleOrientation) -> HRESULT, + fn add_OrientationChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_OrientationChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISimpleOrientationSensor { + #[inline] pub unsafe fn get_current_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCurrentOrientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_orientation_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_OrientationChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_orientation_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_OrientationChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SimpleOrientationSensorOrientationChangedEventArgs: ISimpleOrientationSensorOrientationChangedEventArgs} + DEFINE_IID!(IID_ISimpleOrientationSensor2, 2725750680, 34928, 17726, 139, 214, 184, 245, 216, 215, 148, 27); + RT_INTERFACE!{interface ISimpleOrientationSensor2(ISimpleOrientationSensor2Vtbl): IInspectable(IInspectableVtbl) [IID_ISimpleOrientationSensor2] { + #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT + }} + impl ISimpleOrientationSensor2 { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISimpleOrientationSensorOrientationChangedEventArgs, 3168126560, 9172, 19276, 162, 46, 186, 129, 173, 224, 198, 1); + RT_INTERFACE!{interface ISimpleOrientationSensorOrientationChangedEventArgs(ISimpleOrientationSensorOrientationChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISimpleOrientationSensorOrientationChangedEventArgs] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Orientation(&mut self, out: *mut SimpleOrientation) -> HRESULT + }} + impl ISimpleOrientationSensorOrientationChangedEventArgs { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMagnetometerDeviceId, 1488230594, 32331, 16460, 159, 197, 93, 232, 180, 14, 186, 227); + RT_INTERFACE!{interface IMagnetometerDeviceId(IMagnetometerDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometerDeviceId] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMagnetometerDeviceId { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMagnetometerStatics, 2235327692, 1688, 19930, 166, 223, 156, 185, 204, 74, 180, 10); + RT_INTERFACE!{static interface IMagnetometerStatics(IMagnetometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometerStatics] { + fn GetDefault(&mut self, out: *mut *mut Magnetometer) -> HRESULT + }} + impl IMagnetometerStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Magnetometer: IMagnetometer} + RT_ACTIVATABLE!{IMagnetometerStatics [CLSID_Magnetometer]} + DEFINE_CLSID!(CLSID_Magnetometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,77,97,103,110,101,116,111,109,101,116,101,114,0]); + DEFINE_IID!(IID_IMagnetometer, 1213162094, 54217, 16657, 179, 246, 44, 241, 250, 164, 24, 213); + RT_INTERFACE!{interface IMagnetometer(IMagnetometerVtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometer] { + fn GetCurrentReading(&mut self, out: *mut *mut MagnetometerReading) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMagnetometer { + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MagnetometerReading: IMagnetometerReading} + RT_CLASS!{class MagnetometerReadingChangedEventArgs: IMagnetometerReadingChangedEventArgs} + DEFINE_IID!(IID_IMagnetometer2, 3026545797, 9974, 17483, 169, 226, 162, 63, 150, 108, 211, 104); + RT_INTERFACE!{interface IMagnetometer2(IMagnetometer2Vtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometer2] { + #[cfg(feature="windows.graphics")] fn put_ReadingTransform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_ReadingTransform(&mut self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT + }} + impl IMagnetometer2 { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_reading_transform(&mut self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReadingTransform)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_reading_transform(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadingTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMagnetometerReading, 204260365, 60413, 20060, 187, 17, 175, 194, 155, 60, 174, 97); + RT_INTERFACE!{interface IMagnetometerReading(IMagnetometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometerReading] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_MagneticFieldX(&mut self, out: *mut f32) -> HRESULT, + fn get_MagneticFieldY(&mut self, out: *mut f32) -> HRESULT, + fn get_MagneticFieldZ(&mut self, out: *mut f32) -> HRESULT, + fn get_DirectionalAccuracy(&mut self, out: *mut MagnetometerAccuracy) -> HRESULT + }} + impl IMagnetometerReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_magnetic_field_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MagneticFieldX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_magnetic_field_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MagneticFieldY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_magnetic_field_z(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MagneticFieldZ)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_directional_accuracy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DirectionalAccuracy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMagnetometerReadingChangedEventArgs, 401270898, 11961, 20199, 138, 208, 49, 39, 83, 125, 148, 155); + RT_INTERFACE!{interface IMagnetometerReadingChangedEventArgs(IMagnetometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometerReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut MagnetometerReading) -> HRESULT + }} + impl IMagnetometerReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IActivitySensorStatics, 2803764893, 61067, 17873, 178, 91, 8, 204, 13, 249, 42, 182); + RT_INTERFACE!{static interface IActivitySensorStatics(IActivitySensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorStatics] { + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetSystemHistoryAsync(&mut self, fromTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetSystemHistoryWithDurationAsync(&mut self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IActivitySensorStatics { + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_history_async(&mut self, fromTime: super::super::foundation::DateTime) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSystemHistoryAsync)(self, fromTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_history_with_duration_async(&mut self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSystemHistoryWithDurationAsync)(self, fromTime, duration, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ActivitySensor: IActivitySensor} + RT_ACTIVATABLE!{IActivitySensorStatics [CLSID_ActivitySensor]} + DEFINE_CLSID!(CLSID_ActivitySensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,65,99,116,105,118,105,116,121,83,101,110,115,111,114,0]); + RT_CLASS!{class ActivitySensorReading: IActivitySensorReading} + DEFINE_IID!(IID_IActivitySensor, 3447350028, 64351, 18667, 176, 155, 162, 112, 141, 28, 97, 239); + RT_INTERFACE!{interface IActivitySensor(IActivitySensorVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensor] { + fn GetCurrentReadingAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_SubscribedActivities(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_PowerInMilliwatts(&mut self, out: *mut f64) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SupportedActivities(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IActivitySensor { + #[inline] pub unsafe fn get_current_reading_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReadingAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subscribed_activities(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SubscribedActivities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_power_in_milliwatts(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerInMilliwatts)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_activities(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedActivities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ActivitySensorReadingChangedEventArgs: IActivitySensorReadingChangedEventArgs} + DEFINE_IID!(IID_IActivitySensorReading, 2232572566, 5234, 16546, 178, 174, 225, 239, 41, 34, 108, 120); + RT_INTERFACE!{interface IActivitySensorReading(IActivitySensorReadingVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorReading] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Activity(&mut self, out: *mut ActivityType) -> HRESULT, + fn get_Confidence(&mut self, out: *mut ActivitySensorReadingConfidence) -> HRESULT + }} + impl IActivitySensorReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_activity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Activity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_confidence(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Confidence)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IActivitySensorReadingChangedEventArgs, 3728238359, 44726, 20167, 148, 106, 217, 204, 25, 185, 81, 236); + RT_INTERFACE!{interface IActivitySensorReadingChangedEventArgs(IActivitySensorReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut ActivitySensorReading) -> HRESULT + }} + impl IActivitySensorReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IActivitySensorReadingChangeReport, 1329342741, 55611, 18365, 150, 10, 242, 15, 178, 243, 34, 185); + RT_INTERFACE!{interface IActivitySensorReadingChangeReport(IActivitySensorReadingChangeReportVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorReadingChangeReport] { + fn get_Reading(&mut self, out: *mut *mut ActivitySensorReading) -> HRESULT + }} + impl IActivitySensorReadingChangeReport { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IActivitySensorTriggerDetails, 748578322, 47562, 18039, 178, 99, 36, 50, 151, 247, 157, 58); + RT_INTERFACE!{interface IActivitySensorTriggerDetails(IActivitySensorTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IActivitySensorTriggerDetails] { + fn ReadReports(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IActivitySensorTriggerDetails { + #[inline] pub unsafe fn read_reports(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadReports)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ActivitySensorReadingChangeReport: IActivitySensorReadingChangeReport} + RT_CLASS!{class ActivitySensorTriggerDetails: IActivitySensorTriggerDetails} + DEFINE_IID!(IID_IBarometerStatics, 678110986, 739, 20358, 132, 252, 253, 216, 146, 181, 148, 15); + RT_INTERFACE!{static interface IBarometerStatics(IBarometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBarometerStatics] { + fn GetDefault(&mut self, out: *mut *mut Barometer) -> HRESULT + }} + impl IBarometerStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Barometer: IBarometer} + RT_ACTIVATABLE!{IBarometerStatics [CLSID_Barometer]} + DEFINE_CLSID!(CLSID_Barometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,66,97,114,111,109,101,116,101,114,0]); + DEFINE_IID!(IID_IBarometer, 2470737320, 30911, 17711, 176, 23, 240, 32, 156, 230, 218, 180); + RT_INTERFACE!{interface IBarometer(IBarometerVtbl): IInspectable(IInspectableVtbl) [IID_IBarometer] { + fn GetCurrentReading(&mut self, out: *mut *mut BarometerReading) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IBarometer { + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class BarometerReading: IBarometerReading} + RT_CLASS!{class BarometerReadingChangedEventArgs: IBarometerReadingChangedEventArgs} + DEFINE_IID!(IID_IBarometerReading, 4122596070, 7670, 18970, 167, 173, 50, 29, 79, 93, 178, 71); + RT_INTERFACE!{interface IBarometerReading(IBarometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IBarometerReading] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_StationPressureInHectopascals(&mut self, out: *mut f64) -> HRESULT + }} + impl IBarometerReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_station_pressure_in_hectopascals(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StationPressureInHectopascals)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBarometerReadingChangedEventArgs, 1032098911, 891, 16463, 155, 187, 98, 50, 214, 149, 67, 195); + RT_INTERFACE!{interface IBarometerReadingChangedEventArgs(IBarometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBarometerReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut BarometerReading) -> HRESULT + }} + impl IBarometerReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum PedometerStepKind: i32 { + Unknown (PedometerStepKind_Unknown) = 0, Walking (PedometerStepKind_Walking) = 1, Running (PedometerStepKind_Running) = 2, + }} + DEFINE_IID!(IID_IPedometerReading, 575003892, 43233, 17199, 137, 106, 190, 13, 217, 176, 45, 36); + RT_INTERFACE!{interface IPedometerReading(IPedometerReadingVtbl): IInspectable(IInspectableVtbl) [IID_IPedometerReading] { + fn get_StepKind(&mut self, out: *mut PedometerStepKind) -> HRESULT, + fn get_CumulativeSteps(&mut self, out: *mut i32) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_CumulativeStepsDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IPedometerReading { + #[inline] pub unsafe fn get_step_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StepKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cumulative_steps(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CumulativeSteps)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cumulative_steps_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CumulativeStepsDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPedometerReadingChangedEventArgs, 4166378622, 43964, 17494, 134, 168, 37, 207, 43, 51, 55, 66); + RT_INTERFACE!{interface IPedometerReadingChangedEventArgs(IPedometerReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPedometerReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut PedometerReading) -> HRESULT + }} + impl IPedometerReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PedometerReading: IPedometerReading} + DEFINE_IID!(IID_IPedometerStatics, 2191002159, 16515, 19963, 180, 17, 147, 142, 160, 244, 185, 70); + RT_INTERFACE!{static interface IPedometerStatics(IPedometerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPedometerStatics] { + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetSystemHistoryAsync(&mut self, fromTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetSystemHistoryWithDurationAsync(&mut self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IPedometerStatics { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_history_async(&mut self, fromTime: super::super::foundation::DateTime) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSystemHistoryAsync)(self, fromTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_history_with_duration_async(&mut self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSystemHistoryWithDurationAsync)(self, fromTime, duration, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Pedometer: IPedometer} + RT_ACTIVATABLE!{IPedometerStatics2 [CLSID_Pedometer]} + RT_ACTIVATABLE!{IPedometerStatics [CLSID_Pedometer]} + DEFINE_CLSID!(CLSID_Pedometer = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,80,101,100,111,109,101,116,101,114,0]); + DEFINE_IID!(IID_IPedometerStatics2, 2046150331, 52750, 16691, 180, 126, 134, 39, 234, 114, 246, 119); + RT_INTERFACE!{static interface IPedometerStatics2(IPedometerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IPedometerStatics2] { + fn GetReadingsFromTriggerDetails(&mut self, triggerDetails: *mut SensorDataThresholdTriggerDetails, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IPedometerStatics2 { + #[inline] pub unsafe fn get_readings_from_trigger_details(&mut self, triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetReadingsFromTriggerDetails)(self, triggerDetails as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPedometer2, 3852732127, 11137, 19165, 178, 255, 119, 171, 108, 152, 186, 25); + RT_INTERFACE!{interface IPedometer2(IPedometer2Vtbl): IInspectable(IInspectableVtbl) [IID_IPedometer2] { + fn GetCurrentReadings(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + }} + impl IPedometer2 { + #[inline] pub unsafe fn get_current_readings(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReadings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPedometer, 2585657661, 15768, 17912, 137, 32, 142, 78, 202, 202, 95, 151); + RT_INTERFACE!{interface IPedometer(IPedometerVtbl): IInspectable(IInspectableVtbl) [IID_IPedometer] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PowerInMilliwatts(&mut self, out: *mut f64) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPedometer { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_power_in_milliwatts(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerInMilliwatts)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PedometerReadingChangedEventArgs: IPedometerReadingChangedEventArgs} + DEFINE_IID!(IID_IPedometerDataThresholdFactory, 3417149264, 31316, 18027, 144, 16, 119, 161, 98, 252, 165, 215); + RT_INTERFACE!{static interface IPedometerDataThresholdFactory(IPedometerDataThresholdFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPedometerDataThresholdFactory] { + fn Create(&mut self, sensor: *mut Pedometer, stepGoal: i32, out: *mut *mut PedometerDataThreshold) -> HRESULT + }} + impl IPedometerDataThresholdFactory { + #[inline] pub unsafe fn create(&mut self, sensor: &Pedometer, stepGoal: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, sensor as *const _ as *mut _, stepGoal, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PedometerDataThreshold: ISensorDataThreshold [IPedometerDataThresholdFactory] [CLSID_PedometerDataThreshold]} + DEFINE_CLSID!(CLSID_PedometerDataThreshold = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,80,101,100,111,109,101,116,101,114,68,97,116,97,84,104,114,101,115,104,111,108,100,0]); + DEFINE_IID!(IID_IProximitySensorStatics, 689464905, 25193, 20055, 165, 173, 130, 190, 128, 129, 51, 146); + RT_INTERFACE!{static interface IProximitySensorStatics(IProximitySensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensorStatics] { + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn FromId(&mut self, sensorId: HSTRING, out: *mut *mut ProximitySensor) -> HRESULT + }} + impl IProximitySensorStatics { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id(&mut self, sensorId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromId)(self, sensorId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProximitySensor: IProximitySensor} + RT_ACTIVATABLE!{IProximitySensorStatics2 [CLSID_ProximitySensor]} + RT_ACTIVATABLE!{IProximitySensorStatics [CLSID_ProximitySensor]} + DEFINE_CLSID!(CLSID_ProximitySensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,80,114,111,120,105,109,105,116,121,83,101,110,115,111,114,0]); + DEFINE_IID!(IID_IProximitySensor, 1421899448, 60667, 18756, 185, 40, 116, 252, 80, 77, 71, 238); + RT_INTERFACE!{interface IProximitySensor(IProximitySensorVtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensor] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MaxDistanceInMillimeters(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_MinDistanceInMillimeters(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn GetCurrentReading(&mut self, out: *mut *mut ProximitySensorReading) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn CreateDisplayOnOffController(&mut self, out: *mut *mut ProximitySensorDisplayOnOffController) -> HRESULT + }} + impl IProximitySensor { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_distance_in_millimeters(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxDistanceInMillimeters)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_distance_in_millimeters(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MinDistanceInMillimeters)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn create_display_on_off_controller(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDisplayOnOffController)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProximitySensorReading: IProximitySensorReading} + RT_CLASS!{class ProximitySensorReadingChangedEventArgs: IProximitySensorReadingChangedEventArgs} + RT_CLASS!{class ProximitySensorDisplayOnOffController: super::super::foundation::IClosable} + DEFINE_IID!(IID_IProximitySensorReadingChangedEventArgs, 3485660006, 50152, 16637, 140, 195, 103, 226, 137, 0, 73, 56); + RT_INTERFACE!{interface IProximitySensorReadingChangedEventArgs(IProximitySensorReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensorReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut ProximitySensorReading) -> HRESULT + }} + impl IProximitySensorReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProximitySensorReading, 1898089817, 4909, 19807, 143, 249, 47, 13, 184, 117, 28, 237); + RT_INTERFACE!{interface IProximitySensorReading(IProximitySensorReadingVtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensorReading] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_IsDetected(&mut self, out: *mut bool) -> HRESULT, + fn get_DistanceInMillimeters(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IProximitySensorReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_detected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDetected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_distance_in_millimeters(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DistanceInMillimeters)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProximitySensorDataThresholdFactory, 2421866785, 27943, 19155, 157, 181, 100, 103, 242, 165, 173, 157); + RT_INTERFACE!{static interface IProximitySensorDataThresholdFactory(IProximitySensorDataThresholdFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensorDataThresholdFactory] { + fn Create(&mut self, sensor: *mut ProximitySensor, out: *mut *mut ProximitySensorDataThreshold) -> HRESULT + }} + impl IProximitySensorDataThresholdFactory { + #[inline] pub unsafe fn create(&mut self, sensor: &ProximitySensor) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, sensor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProximitySensorDataThreshold: ISensorDataThreshold [IProximitySensorDataThresholdFactory] [CLSID_ProximitySensorDataThreshold]} + DEFINE_CLSID!(CLSID_ProximitySensorDataThreshold = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,80,114,111,120,105,109,105,116,121,83,101,110,115,111,114,68,97,116,97,84,104,114,101,115,104,111,108,100,0]); + DEFINE_IID!(IID_IProximitySensorStatics2, 3421795246, 59850, 16943, 173, 103, 76, 61, 37, 223, 53, 12); + RT_INTERFACE!{static interface IProximitySensorStatics2(IProximitySensorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IProximitySensorStatics2] { + fn GetReadingsFromTriggerDetails(&mut self, triggerDetails: *mut SensorDataThresholdTriggerDetails, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IProximitySensorStatics2 { + #[inline] pub unsafe fn get_readings_from_trigger_details(&mut self, triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetReadingsFromTriggerDetails)(self, triggerDetails as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAltimeterStatics, 2662651843, 58796, 18382, 142, 239, 211, 113, 129, 104, 192, 31); + RT_INTERFACE!{static interface IAltimeterStatics(IAltimeterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAltimeterStatics] { + fn GetDefault(&mut self, out: *mut *mut Altimeter) -> HRESULT + }} + impl IAltimeterStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Altimeter: IAltimeter} + RT_ACTIVATABLE!{IAltimeterStatics [CLSID_Altimeter]} + DEFINE_CLSID!(CLSID_Altimeter = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,65,108,116,105,109,101,116,101,114,0]); + DEFINE_IID!(IID_IAltimeter, 1928353789, 36612, 18929, 180, 167, 244, 227, 99, 183, 1, 162); + RT_INTERFACE!{interface IAltimeter(IAltimeterVtbl): IInspectable(IInspectableVtbl) [IID_IAltimeter] { + fn GetCurrentReading(&mut self, out: *mut *mut AltimeterReading) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAltimeter { + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AltimeterReading: IAltimeterReading} + RT_CLASS!{class AltimeterReadingChangedEventArgs: IAltimeterReadingChangedEventArgs} + DEFINE_IID!(IID_IAltimeterReading, 4226346867, 32606, 18632, 170, 26, 241, 243, 190, 252, 17, 68); + RT_INTERFACE!{interface IAltimeterReading(IAltimeterReadingVtbl): IInspectable(IInspectableVtbl) [IID_IAltimeterReading] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_AltitudeChangeInMeters(&mut self, out: *mut f64) -> HRESULT + }} + impl IAltimeterReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_altitude_change_in_meters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AltitudeChangeInMeters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAltimeterReadingChangedEventArgs, 1885982839, 17517, 18423, 153, 140, 235, 194, 59, 69, 228, 162); + RT_INTERFACE!{interface IAltimeterReadingChangedEventArgs(IAltimeterReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAltimeterReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut AltimeterReading) -> HRESULT + }} + impl IAltimeterReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +pub mod custom { // Windows.Devices.Sensors.Custom +use ::prelude::*; + DEFINE_IID!(IID_ICustomSensorStatics, 2569032399, 62498, 19581, 131, 107, 231, 220, 116, 167, 18, 75); + RT_INTERFACE!{static interface ICustomSensorStatics(ICustomSensorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICustomSensorStatics] { + fn GetDeviceSelector(&mut self, interfaceId: Guid, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, sensorId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl ICustomSensorStatics { + #[inline] pub unsafe fn get_device_selector(&mut self, interfaceId: Guid) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, interfaceId, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, sensorId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, sensorId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CustomSensor: ICustomSensor} + RT_ACTIVATABLE!{ICustomSensorStatics [CLSID_CustomSensor]} + DEFINE_CLSID!(CLSID_CustomSensor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,110,115,111,114,115,46,67,117,115,116,111,109,46,67,117,115,116,111,109,83,101,110,115,111,114,0]); + DEFINE_IID!(IID_ICustomSensor, 2704734637, 16436, 19277, 153, 221, 83, 26, 172, 100, 156, 9); + RT_INTERFACE!{interface ICustomSensor(ICustomSensorVtbl): IInspectable(IInspectableVtbl) [IID_ICustomSensor] { + fn GetCurrentReading(&mut self, out: *mut *mut CustomSensorReading) -> HRESULT, + fn get_MinimumReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn put_ReportInterval(&mut self, value: u32) -> HRESULT, + fn get_ReportInterval(&mut self, out: *mut u32) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn add_ReadingChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICustomSensor { + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minimum_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_report_interval(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReportInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_report_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReportInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_reading_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReadingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reading_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReadingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CustomSensorReading: ICustomSensorReading} + RT_CLASS!{class CustomSensorReadingChangedEventArgs: ICustomSensorReadingChangedEventArgs} + DEFINE_IID!(IID_ICustomSensorReading, 1677741901, 17514, 17254, 168, 122, 95, 150, 50, 104, 236, 83); + RT_INTERFACE!{interface ICustomSensorReading(ICustomSensorReadingVtbl): IInspectable(IInspectableVtbl) [IID_ICustomSensorReading] { + fn get_Timestamp(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT + }} + impl ICustomSensorReading { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICustomSensorReadingChangedEventArgs, 1797267491, 53245, 19649, 143, 240, 226, 24, 35, 215, 111, 204); + RT_INTERFACE!{interface ICustomSensorReadingChangedEventArgs(ICustomSensorReadingChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICustomSensorReadingChangedEventArgs] { + fn get_Reading(&mut self, out: *mut *mut CustomSensorReading) -> HRESULT + }} + impl ICustomSensorReadingChangedEventArgs { + #[inline] pub unsafe fn get_reading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Devices.Sensors.Custom +} // Windows.Devices.Sensors +pub mod serialcommunication { // Windows.Devices.SerialCommunication +use ::prelude::*; + RT_ENUM! { enum SerialParity: i32 { + None (SerialParity_None) = 0, Odd (SerialParity_Odd) = 1, Even (SerialParity_Even) = 2, Mark (SerialParity_Mark) = 3, Space (SerialParity_Space) = 4, + }} + RT_ENUM! { enum SerialHandshake: i32 { + None (SerialHandshake_None) = 0, RequestToSend (SerialHandshake_RequestToSend) = 1, XOnXOff (SerialHandshake_XOnXOff) = 2, RequestToSendXOnXOff (SerialHandshake_RequestToSendXOnXOff) = 3, + }} + RT_ENUM! { enum SerialStopBitCount: i32 { + One (SerialStopBitCount_One) = 0, OnePointFive (SerialStopBitCount_OnePointFive) = 1, Two (SerialStopBitCount_Two) = 2, + }} + RT_ENUM! { enum SerialError: i32 { + Frame (SerialError_Frame) = 0, BufferOverrun (SerialError_BufferOverrun) = 1, ReceiveFull (SerialError_ReceiveFull) = 2, ReceiveParity (SerialError_ReceiveParity) = 3, TransmitFull (SerialError_TransmitFull) = 4, + }} + RT_ENUM! { enum SerialPinChange: i32 { + BreakSignal (SerialPinChange_BreakSignal) = 0, CarrierDetect (SerialPinChange_CarrierDetect) = 1, ClearToSend (SerialPinChange_ClearToSend) = 2, DataSetReady (SerialPinChange_DataSetReady) = 3, RingIndicator (SerialPinChange_RingIndicator) = 4, + }} + DEFINE_IID!(IID_ISerialDeviceStatics, 93080176, 2102, 18835, 174, 26, 182, 26, 227, 190, 5, 107); + RT_INTERFACE!{static interface ISerialDeviceStatics(ISerialDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISerialDeviceStatics] { + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromPortName(&mut self, portName: HSTRING, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromUsbVidPid(&mut self, vendorId: u16, productId: u16, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISerialDeviceStatics { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_port_name(&mut self, portName: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromPortName)(self, portName.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_usb_vid_pid(&mut self, vendorId: u16, productId: u16) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromUsbVidPid)(self, vendorId, productId, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SerialDevice: ISerialDevice} + RT_ACTIVATABLE!{ISerialDeviceStatics [CLSID_SerialDevice]} + DEFINE_CLSID!(CLSID_SerialDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,101,114,105,97,108,67,111,109,109,117,110,105,99,97,116,105,111,110,46,83,101,114,105,97,108,68,101,118,105,99,101,0]); + RT_CLASS!{class ErrorReceivedEventArgs: IErrorReceivedEventArgs} + RT_CLASS!{class PinChangedEventArgs: IPinChangedEventArgs} + DEFINE_IID!(IID_IErrorReceivedEventArgs, 4240883545, 4739, 19850, 191, 223, 86, 107, 51, 221, 178, 143); + RT_INTERFACE!{interface IErrorReceivedEventArgs(IErrorReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IErrorReceivedEventArgs] { + fn get_Error(&mut self, out: *mut SerialError) -> HRESULT + }} + impl IErrorReceivedEventArgs { + #[inline] pub unsafe fn get_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPinChangedEventArgs, 2730433968, 64668, 17927, 147, 208, 250, 94, 131, 67, 238, 34); + RT_INTERFACE!{interface IPinChangedEventArgs(IPinChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPinChangedEventArgs] { + fn get_PinChange(&mut self, out: *mut SerialPinChange) -> HRESULT + }} + impl IPinChangedEventArgs { + #[inline] pub unsafe fn get_pin_change(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PinChange)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISerialDevice, 3783773382, 8720, 16719, 182, 90, 245, 85, 58, 3, 55, 42); + RT_INTERFACE!{interface ISerialDevice(ISerialDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ISerialDevice] { + fn get_BaudRate(&mut self, out: *mut u32) -> HRESULT, + fn put_BaudRate(&mut self, value: u32) -> HRESULT, + fn get_BreakSignalState(&mut self, out: *mut bool) -> HRESULT, + fn put_BreakSignalState(&mut self, value: bool) -> HRESULT, + fn get_BytesReceived(&mut self, out: *mut u32) -> HRESULT, + fn get_CarrierDetectState(&mut self, out: *mut bool) -> HRESULT, + fn get_ClearToSendState(&mut self, out: *mut bool) -> HRESULT, + fn get_DataBits(&mut self, out: *mut u16) -> HRESULT, + fn put_DataBits(&mut self, value: u16) -> HRESULT, + fn get_DataSetReadyState(&mut self, out: *mut bool) -> HRESULT, + fn get_Handshake(&mut self, out: *mut SerialHandshake) -> HRESULT, + fn put_Handshake(&mut self, value: SerialHandshake) -> HRESULT, + fn get_IsDataTerminalReadyEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsDataTerminalReadyEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsRequestToSendEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsRequestToSendEnabled(&mut self, value: bool) -> HRESULT, + fn get_Parity(&mut self, out: *mut SerialParity) -> HRESULT, + fn put_Parity(&mut self, value: SerialParity) -> HRESULT, + fn get_PortName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ReadTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_ReadTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_StopBits(&mut self, out: *mut SerialStopBitCount) -> HRESULT, + fn put_StopBits(&mut self, value: SerialStopBitCount) -> HRESULT, + fn get_UsbVendorId(&mut self, out: *mut u16) -> HRESULT, + fn get_UsbProductId(&mut self, out: *mut u16) -> HRESULT, + fn get_WriteTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_WriteTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy27(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_InputStream(&mut self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy28(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_OutputStream(&mut self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, + fn add_ErrorReceived(&mut self, reportHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ErrorReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PinChanged(&mut self, reportHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PinChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISerialDevice { + #[inline] pub unsafe fn get_baud_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BaudRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_baud_rate(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_BaudRate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_break_signal_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BreakSignalState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_break_signal_state(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_BreakSignalState)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bytes_received(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BytesReceived)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_carrier_detect_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CarrierDetectState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_clear_to_send_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ClearToSendState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_bits(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DataBits)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_data_bits(&mut self, value: u16) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataBits)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_set_ready_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DataSetReadyState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_handshake(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handshake)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handshake(&mut self, value: SerialHandshake) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handshake)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_data_terminal_ready_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDataTerminalReadyEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_data_terminal_ready_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDataTerminalReadyEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_request_to_send_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsRequestToSendEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_request_to_send_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsRequestToSendEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_parity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Parity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_parity(&mut self, value: SerialParity) -> Result<()> { + let hr = ((*self.lpVtbl).put_Parity)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_port_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PortName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_read_timeout(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadTimeout)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_read_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReadTimeout)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stop_bits(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StopBits)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stop_bits(&mut self, value: SerialStopBitCount) -> Result<()> { + let hr = ((*self.lpVtbl).put_StopBits)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_usb_vendor_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsbVendorId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usb_product_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsbProductId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_write_timeout(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WriteTimeout)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_write_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_WriteTimeout)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_input_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutputStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_error_received(&mut self, reportHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ErrorReceived)(self, reportHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_error_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ErrorReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pin_changed(&mut self, reportHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PinChanged)(self, reportHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pin_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PinChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Devices.SerialCommunication +pub mod smartcards { // Windows.Devices.SmartCards +use ::prelude::*; + RT_ENUM! { enum SmartCardReaderKind: i32 { + Any (SmartCardReaderKind_Any) = 0, Generic (SmartCardReaderKind_Generic) = 1, Tpm (SmartCardReaderKind_Tpm) = 2, Nfc (SmartCardReaderKind_Nfc) = 3, Uicc (SmartCardReaderKind_Uicc) = 4, EmbeddedSE (SmartCardReaderKind_EmbeddedSE) = 5, + }} + RT_ENUM! { enum SmartCardReaderStatus: i32 { + Disconnected (SmartCardReaderStatus_Disconnected) = 0, Ready (SmartCardReaderStatus_Ready) = 1, Exclusive (SmartCardReaderStatus_Exclusive) = 2, + }} + RT_ENUM! { enum SmartCardStatus: i32 { + Disconnected (SmartCardStatus_Disconnected) = 0, Ready (SmartCardStatus_Ready) = 1, Shared (SmartCardStatus_Shared) = 2, Exclusive (SmartCardStatus_Exclusive) = 3, Unresponsive (SmartCardStatus_Unresponsive) = 4, + }} + RT_ENUM! { enum SmartCardPinCharacterPolicyOption: i32 { + Allow (SmartCardPinCharacterPolicyOption_Allow) = 0, RequireAtLeastOne (SmartCardPinCharacterPolicyOption_RequireAtLeastOne) = 1, Disallow (SmartCardPinCharacterPolicyOption_Disallow) = 2, + }} + DEFINE_IID!(IID_ISmartCardReaderStatics, 272368865, 41418, 18674, 162, 129, 91, 111, 102, 154, 241, 7); + RT_INTERFACE!{static interface ISmartCardReaderStatics(ISmartCardReaderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardReaderStatics] { + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorWithKind(&mut self, kind: SmartCardReaderKind, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISmartCardReaderStatics { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_with_kind(&mut self, kind: SmartCardReaderKind) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorWithKind)(self, kind, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SmartCardReader: ISmartCardReader} + RT_ACTIVATABLE!{ISmartCardReaderStatics [CLSID_SmartCardReader]} + DEFINE_CLSID!(CLSID_SmartCardReader = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,97,114,116,67,97,114,100,115,46,83,109,97,114,116,67,97,114,100,82,101,97,100,101,114,0]); + DEFINE_IID!(IID_ISmartCardReader, 276083936, 21698, 19952, 129, 122, 20, 193, 67, 120, 240, 108); + RT_INTERFACE!{interface ISmartCardReader(ISmartCardReaderVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardReader] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Kind(&mut self, out: *mut SmartCardReaderKind) -> HRESULT, + fn GetStatusAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindAllCardsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn add_CardAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CardAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CardRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CardRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISmartCardReader { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_status_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStatusAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_cards_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllCardsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_card_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CardAdded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_card_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CardAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_card_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CardRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_card_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CardRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SmartCard: ISmartCard} + RT_CLASS!{class CardAddedEventArgs: ICardAddedEventArgs} + RT_CLASS!{class CardRemovedEventArgs: ICardRemovedEventArgs} + DEFINE_IID!(IID_ICardAddedEventArgs, 414969752, 61835, 19923, 177, 24, 223, 178, 200, 226, 60, 198); + RT_INTERFACE!{interface ICardAddedEventArgs(ICardAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICardAddedEventArgs] { + fn get_SmartCard(&mut self, out: *mut *mut SmartCard) -> HRESULT + }} + impl ICardAddedEventArgs { + #[inline] pub unsafe fn get_smart_card(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SmartCard)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICardRemovedEventArgs, 355670703, 8919, 18757, 175, 201, 3, 180, 111, 66, 166, 205); + RT_INTERFACE!{interface ICardRemovedEventArgs(ICardRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICardRemovedEventArgs] { + fn get_SmartCard(&mut self, out: *mut *mut SmartCard) -> HRESULT + }} + impl ICardRemovedEventArgs { + #[inline] pub unsafe fn get_smart_card(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SmartCard)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISmartCard, 460425329, 25652, 17396, 181, 90, 106, 41, 98, 56, 112, 170); + RT_INTERFACE!{interface ISmartCard(ISmartCardVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCard] { + fn get_Reader(&mut self, out: *mut *mut SmartCardReader) -> HRESULT, + fn GetStatusAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetAnswerToResetAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISmartCard { + #[inline] pub unsafe fn get_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStatusAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_answer_to_reset_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAnswerToResetAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISmartCardProvisioningStatics, 327690312, 3347, 20080, 151, 53, 81, 218, 236, 165, 37, 79); + RT_INTERFACE!{static interface ISmartCardProvisioningStatics(ISmartCardProvisioningStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardProvisioningStatics] { + fn FromSmartCardAsync(&mut self, card: *mut SmartCard, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RequestVirtualSmartCardCreationAsync(&mut self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RequestVirtualSmartCardCreationAsyncWithCardId(&mut self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, cardId: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestVirtualSmartCardDeletionAsync(&mut self, card: *mut SmartCard, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISmartCardProvisioningStatics { + #[inline] pub unsafe fn from_smart_card_async(&mut self, card: &SmartCard) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromSmartCardAsync)(self, card as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn request_virtual_smart_card_creation_async(&mut self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestVirtualSmartCardCreationAsync)(self, friendlyName.get(), administrativeKey as *const _ as *mut _, pinPolicy as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn request_virtual_smart_card_creation_async_with_card_id(&mut self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestVirtualSmartCardCreationAsyncWithCardId)(self, friendlyName.get(), administrativeKey as *const _ as *mut _, pinPolicy as *const _ as *mut _, cardId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_virtual_smart_card_deletion_async(&mut self, card: &SmartCard) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestVirtualSmartCardDeletionAsync)(self, card as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SmartCardProvisioning: ISmartCardProvisioning} + RT_ACTIVATABLE!{ISmartCardProvisioningStatics2 [CLSID_SmartCardProvisioning]} + RT_ACTIVATABLE!{ISmartCardProvisioningStatics [CLSID_SmartCardProvisioning]} + DEFINE_CLSID!(CLSID_SmartCardProvisioning = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,97,114,116,67,97,114,100,115,46,83,109,97,114,116,67,97,114,100,80,114,111,118,105,115,105,111,110,105,110,103,0]); + RT_CLASS!{class SmartCardPinPolicy: ISmartCardPinPolicy} + DEFINE_IID!(IID_ISmartCardProvisioningStatics2, 877119144, 51616, 19414, 181, 13, 37, 31, 78, 141, 58, 98); + RT_INTERFACE!{static interface ISmartCardProvisioningStatics2(ISmartCardProvisioningStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardProvisioningStatics2] { + #[cfg(feature="windows.storage")] fn RequestAttestedVirtualSmartCardCreationAsync(&mut self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn RequestAttestedVirtualSmartCardCreationAsyncWithCardId(&mut self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, cardId: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISmartCardProvisioningStatics2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn request_attested_virtual_smart_card_creation_async(&mut self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAttestedVirtualSmartCardCreationAsync)(self, friendlyName.get(), administrativeKey as *const _ as *mut _, pinPolicy as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn request_attested_virtual_smart_card_creation_async_with_card_id(&mut self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAttestedVirtualSmartCardCreationAsyncWithCardId)(self, friendlyName.get(), administrativeKey as *const _ as *mut _, pinPolicy as *const _ as *mut _, cardId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISmartCardProvisioning, 435088829, 8107, 18300, 183, 18, 26, 44, 90, 241, 253, 110); + RT_INTERFACE!{interface ISmartCardProvisioning(ISmartCardProvisioningVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardProvisioning] { + fn get_SmartCard(&mut self, out: *mut *mut SmartCard) -> HRESULT, + fn GetIdAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetNameAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetChallengeContextAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestPinChangeAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestPinResetAsync(&mut self, handler: *mut SmartCardPinResetHandler, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISmartCardProvisioning { + #[inline] pub unsafe fn get_smart_card(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SmartCard)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_id_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIdAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNameAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_challenge_context_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetChallengeContextAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_pin_change_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestPinChangeAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_pin_reset_async(&mut self, handler: &SmartCardPinResetHandler) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestPinResetAsync)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SmartCardChallengeContext: ISmartCardChallengeContext} + DEFINE_IID!(IID_SmartCardPinResetHandler, 328031808, 62396, 19036, 180, 29, 75, 78, 246, 132, 226, 55); + RT_DELEGATE!{delegate SmartCardPinResetHandler(SmartCardPinResetHandlerVtbl, SmartCardPinResetHandlerImpl) [IID_SmartCardPinResetHandler] { + fn Invoke(&mut self, sender: *mut SmartCardProvisioning, request: *mut SmartCardPinResetRequest) -> HRESULT + }} + impl SmartCardPinResetHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &SmartCardProvisioning, request: &SmartCardPinResetRequest) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, request as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SmartCardPinResetRequest: ISmartCardPinResetRequest} + DEFINE_IID!(IID_ISmartCardProvisioning2, 285026539, 16249, 19302, 155, 124, 17, 193, 73, 183, 208, 188); + RT_INTERFACE!{interface ISmartCardProvisioning2(ISmartCardProvisioning2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardProvisioning2] { + fn GetAuthorityKeyContainerNameAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISmartCardProvisioning2 { + #[inline] pub unsafe fn get_authority_key_container_name_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAuthorityKeyContainerNameAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISmartCardPinResetRequest, 318651469, 24505, 20110, 159, 246, 97, 244, 117, 18, 79, 239); + RT_INTERFACE!{interface ISmartCardPinResetRequest(ISmartCardPinResetRequestVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardPinResetRequest] { + #[cfg(feature="windows.storage")] fn get_Challenge(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_Deadline(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut SmartCardPinResetDeferral) -> HRESULT, + #[cfg(feature="windows.storage")] fn SetResponse(&mut self, response: *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl ISmartCardPinResetRequest { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_challenge(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Challenge)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deadline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_response(&mut self, response: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).SetResponse)(self, response as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SmartCardPinResetDeferral: ISmartCardPinResetDeferral} + DEFINE_IID!(IID_ISmartCardPinResetDeferral, 415845036, 30725, 16388, 133, 228, 187, 239, 172, 143, 104, 132); + RT_INTERFACE!{interface ISmartCardPinResetDeferral(ISmartCardPinResetDeferralVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardPinResetDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl ISmartCardPinResetDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISmartCardPinPolicy, 406643076, 19894, 18497, 172, 158, 42, 193, 243, 155, 115, 4); + RT_INTERFACE!{interface ISmartCardPinPolicy(ISmartCardPinPolicyVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardPinPolicy] { + fn get_MinLength(&mut self, out: *mut u32) -> HRESULT, + fn put_MinLength(&mut self, value: u32) -> HRESULT, + fn get_MaxLength(&mut self, out: *mut u32) -> HRESULT, + fn put_MaxLength(&mut self, value: u32) -> HRESULT, + fn get_UppercaseLetters(&mut self, out: *mut SmartCardPinCharacterPolicyOption) -> HRESULT, + fn put_UppercaseLetters(&mut self, value: SmartCardPinCharacterPolicyOption) -> HRESULT, + fn get_LowercaseLetters(&mut self, out: *mut SmartCardPinCharacterPolicyOption) -> HRESULT, + fn put_LowercaseLetters(&mut self, value: SmartCardPinCharacterPolicyOption) -> HRESULT, + fn get_Digits(&mut self, out: *mut SmartCardPinCharacterPolicyOption) -> HRESULT, + fn put_Digits(&mut self, value: SmartCardPinCharacterPolicyOption) -> HRESULT, + fn get_SpecialCharacters(&mut self, out: *mut SmartCardPinCharacterPolicyOption) -> HRESULT, + fn put_SpecialCharacters(&mut self, value: SmartCardPinCharacterPolicyOption) -> HRESULT + }} + impl ISmartCardPinPolicy { + #[inline] pub unsafe fn get_min_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_length(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinLength)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_length(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxLength)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_uppercase_letters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UppercaseLetters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_uppercase_letters(&mut self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { + let hr = ((*self.lpVtbl).put_UppercaseLetters)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_lowercase_letters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LowercaseLetters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_lowercase_letters(&mut self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { + let hr = ((*self.lpVtbl).put_LowercaseLetters)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_digits(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Digits)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_digits(&mut self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { + let hr = ((*self.lpVtbl).put_Digits)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_special_characters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpecialCharacters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_special_characters(&mut self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { + let hr = ((*self.lpVtbl).put_SpecialCharacters)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISmartCardConnect, 803178469, 653, 18718, 160, 88, 51, 130, 195, 152, 111, 64); + RT_INTERFACE!{interface ISmartCardConnect(ISmartCardConnectVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardConnect] { + fn ConnectAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISmartCardConnect { + #[inline] pub unsafe fn connect_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SmartCardConnection: ISmartCardConnection} + DEFINE_IID!(IID_ISmartCardChallengeContext, 422204185, 51652, 18759, 129, 204, 68, 121, 74, 97, 239, 145); + RT_INTERFACE!{interface ISmartCardChallengeContext(ISmartCardChallengeContextVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardChallengeContext] { + #[cfg(feature="windows.storage")] fn get_Challenge(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn VerifyResponseAsync(&mut self, response: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn ProvisionAsync(&mut self, response: *mut super::super::storage::streams::IBuffer, formatCard: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows.storage")] fn ProvisionAsyncWithNewCardId(&mut self, response: *mut super::super::storage::streams::IBuffer, formatCard: bool, newCardId: Guid, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows.storage")] fn ChangeAdministrativeKeyAsync(&mut self, response: *mut super::super::storage::streams::IBuffer, newAdministrativeKey: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl ISmartCardChallengeContext { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_challenge(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Challenge)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn verify_response_async(&mut self, response: &super::super::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).VerifyResponseAsync)(self, response as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn provision_async(&mut self, response: &super::super::storage::streams::IBuffer, formatCard: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProvisionAsync)(self, response as *const _ as *mut _, formatCard, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn provision_async_with_new_card_id(&mut self, response: &super::super::storage::streams::IBuffer, formatCard: bool, newCardId: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProvisionAsyncWithNewCardId)(self, response as *const _ as *mut _, formatCard, newCardId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn change_administrative_key_async(&mut self, response: &super::super::storage::streams::IBuffer, newAdministrativeKey: &super::super::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ChangeAdministrativeKeyAsync)(self, response as *const _ as *mut _, newAdministrativeKey as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISmartCardConnection, 2128320794, 43034, 18364, 166, 73, 21, 107, 230, 183, 242, 49); + RT_INTERFACE!{interface ISmartCardConnection(ISmartCardConnectionVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardConnection] { + #[cfg(feature="windows.storage")] fn TransmitAsync(&mut self, command: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISmartCardConnection { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn transmit_async(&mut self, command: &super::super::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TransmitAsync)(self, command as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Devices.SmartCards +pub mod usb { // Windows.Devices.Usb +use ::prelude::*; + RT_ENUM! { enum UsbTransferDirection: i32 { + Out (UsbTransferDirection_Out) = 0, In (UsbTransferDirection_In) = 1, + }} + RT_ENUM! { enum UsbEndpointType: i32 { + Control (UsbEndpointType_Control) = 0, Isochronous (UsbEndpointType_Isochronous) = 1, Bulk (UsbEndpointType_Bulk) = 2, Interrupt (UsbEndpointType_Interrupt) = 3, + }} + RT_ENUM! { enum UsbControlRecipient: i32 { + Device (UsbControlRecipient_Device) = 0, SpecifiedInterface (UsbControlRecipient_SpecifiedInterface) = 1, Endpoint (UsbControlRecipient_Endpoint) = 2, Other (UsbControlRecipient_Other) = 3, DefaultInterface (UsbControlRecipient_DefaultInterface) = 4, + }} + RT_ENUM! { enum UsbControlTransferType: i32 { + Standard (UsbControlTransferType_Standard) = 0, Class (UsbControlTransferType_Class) = 1, Vendor (UsbControlTransferType_Vendor) = 2, + }} + DEFINE_IID!(IID_IUsbControlRequestType, 2392090022, 55101, 18142, 148, 190, 170, 231, 240, 124, 15, 92); + RT_INTERFACE!{interface IUsbControlRequestType(IUsbControlRequestTypeVtbl): IInspectable(IInspectableVtbl) [IID_IUsbControlRequestType] { + fn get_Direction(&mut self, out: *mut UsbTransferDirection) -> HRESULT, + fn put_Direction(&mut self, value: UsbTransferDirection) -> HRESULT, + fn get_ControlTransferType(&mut self, out: *mut UsbControlTransferType) -> HRESULT, + fn put_ControlTransferType(&mut self, value: UsbControlTransferType) -> HRESULT, + fn get_Recipient(&mut self, out: *mut UsbControlRecipient) -> HRESULT, + fn put_Recipient(&mut self, value: UsbControlRecipient) -> HRESULT, + fn get_AsByte(&mut self, out: *mut u8) -> HRESULT, + fn put_AsByte(&mut self, value: u8) -> HRESULT + }} + impl IUsbControlRequestType { + #[inline] pub unsafe fn get_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Direction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_direction(&mut self, value: UsbTransferDirection) -> Result<()> { + let hr = ((*self.lpVtbl).put_Direction)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_control_transfer_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ControlTransferType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_control_transfer_type(&mut self, value: UsbControlTransferType) -> Result<()> { + let hr = ((*self.lpVtbl).put_ControlTransferType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_recipient(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Recipient)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_recipient(&mut self, value: UsbControlRecipient) -> Result<()> { + let hr = ((*self.lpVtbl).put_Recipient)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_as_byte(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AsByte)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_as_byte(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_AsByte)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class UsbControlRequestType: IUsbControlRequestType} + DEFINE_IID!(IID_IUsbSetupPacketFactory, 3374677328, 6958, 19009, 162, 167, 51, 143, 12, 239, 60, 20); + RT_INTERFACE!{static interface IUsbSetupPacketFactory(IUsbSetupPacketFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IUsbSetupPacketFactory] { + #[cfg(feature="windows.storage")] fn CreateWithEightByteBuffer(&mut self, eightByteBuffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut UsbSetupPacket) -> HRESULT + }} + impl IUsbSetupPacketFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_with_eight_byte_buffer(&mut self, eightByteBuffer: &super::super::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithEightByteBuffer)(self, eightByteBuffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UsbSetupPacket: IUsbSetupPacket [IUsbSetupPacketFactory] [CLSID_UsbSetupPacket]} + DEFINE_CLSID!(CLSID_UsbSetupPacket = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,83,101,116,117,112,80,97,99,107,101,116,0]); + DEFINE_IID!(IID_IUsbSetupPacket, 273391922, 51087, 19537, 182, 84, 228, 157, 2, 242, 203, 3); + RT_INTERFACE!{interface IUsbSetupPacket(IUsbSetupPacketVtbl): IInspectable(IInspectableVtbl) [IID_IUsbSetupPacket] { + fn get_RequestType(&mut self, out: *mut *mut UsbControlRequestType) -> HRESULT, + fn put_RequestType(&mut self, value: *mut UsbControlRequestType) -> HRESULT, + fn get_Request(&mut self, out: *mut u8) -> HRESULT, + fn put_Request(&mut self, value: u8) -> HRESULT, + fn get_Value(&mut self, out: *mut u32) -> HRESULT, + fn put_Value(&mut self, value: u32) -> HRESULT, + fn get_Index(&mut self, out: *mut u32) -> HRESULT, + fn put_Index(&mut self, value: u32) -> HRESULT, + fn get_Length(&mut self, out: *mut u32) -> HRESULT, + fn put_Length(&mut self, value: u32) -> HRESULT + }} + impl IUsbSetupPacket { + #[inline] pub unsafe fn get_request_type(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RequestType)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_request_type(&mut self, value: &UsbControlRequestType) -> Result<()> { + let hr = ((*self.lpVtbl).put_RequestType)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_request(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_request(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_Request)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Index)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_index(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Index)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_length(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Length)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbDeviceClass, 85541625, 33886, 18411, 177, 42, 56, 242, 246, 23, 175, 231); + RT_INTERFACE!{interface IUsbDeviceClass(IUsbDeviceClassVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDeviceClass] { + fn get_ClassCode(&mut self, out: *mut u8) -> HRESULT, + fn put_ClassCode(&mut self, value: u8) -> HRESULT, + fn get_SubclassCode(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_SubclassCode(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ProtocolCode(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ProtocolCode(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT + }} + impl IUsbDeviceClass { + #[inline] pub unsafe fn get_class_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ClassCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_class_code(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_ClassCode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_subclass_code(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SubclassCode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_subclass_code(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_SubclassCode)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_protocol_code(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProtocolCode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_protocol_code(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProtocolCode)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class UsbDeviceClass: IUsbDeviceClass} + DEFINE_IID!(IID_IUsbDeviceClassesStatics, 2987066663, 50560, 17817, 161, 101, 152, 27, 79, 208, 50, 48); + RT_INTERFACE!{static interface IUsbDeviceClassesStatics(IUsbDeviceClassesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDeviceClassesStatics] { + fn get_CdcControl(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, + fn get_Physical(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, + fn get_PersonalHealthcare(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, + fn get_ActiveSync(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, + fn get_PalmSync(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, + fn get_DeviceFirmwareUpdate(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, + fn get_Irda(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, + fn get_Measurement(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT, + fn get_VendorSpecific(&mut self, out: *mut *mut UsbDeviceClass) -> HRESULT + }} + impl IUsbDeviceClassesStatics { + #[inline] pub unsafe fn get_cdc_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CdcControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_physical(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Physical)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_personal_healthcare(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PersonalHealthcare)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_active_sync(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActiveSync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_palm_sync(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PalmSync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_firmware_update(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceFirmwareUpdate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_irda(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Irda)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_measurement(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Measurement)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vendor_specific(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VendorSpecific)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbDeviceClasses, 1752143197, 39826, 19248, 151, 129, 194, 44, 85, 172, 53, 203); + RT_INTERFACE!{interface IUsbDeviceClasses(IUsbDeviceClassesVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDeviceClasses] { + + }} + RT_CLASS!{class UsbDeviceClasses: IUsbDeviceClasses} + RT_ACTIVATABLE!{IUsbDeviceClassesStatics [CLSID_UsbDeviceClasses]} + DEFINE_CLSID!(CLSID_UsbDeviceClasses = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,68,101,118,105,99,101,67,108,97,115,115,101,115,0]); + DEFINE_IID!(IID_IUsbDeviceStatics, 107709858, 2487, 17478, 133, 2, 111, 230, 220, 170, 115, 9); + RT_INTERFACE!{static interface IUsbDeviceStatics(IUsbDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDeviceStatics] { + fn GetDeviceSelector(&mut self, vendorId: u32, productId: u32, winUsbInterfaceClass: Guid, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorGuidOnly(&mut self, winUsbInterfaceClass: Guid, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorVidPidOnly(&mut self, vendorId: u32, productId: u32, out: *mut HSTRING) -> HRESULT, + fn GetDeviceClassSelector(&mut self, usbClass: *mut UsbDeviceClass, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IUsbDeviceStatics { + #[inline] pub unsafe fn get_device_selector(&mut self, vendorId: u32, productId: u32, winUsbInterfaceClass: Guid) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, vendorId, productId, winUsbInterfaceClass, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_guid_only(&mut self, winUsbInterfaceClass: Guid) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorGuidOnly)(self, winUsbInterfaceClass, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_vid_pid_only(&mut self, vendorId: u32, productId: u32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorVidPidOnly)(self, vendorId, productId, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_class_selector(&mut self, usbClass: &UsbDeviceClass) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceClassSelector)(self, usbClass as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UsbDevice: IUsbDevice} + RT_ACTIVATABLE!{IUsbDeviceStatics [CLSID_UsbDevice]} + DEFINE_CLSID!(CLSID_UsbDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,68,101,118,105,99,101,0]); + RT_CLASS!{class UsbInterface: IUsbInterface} + RT_CLASS!{class UsbDeviceDescriptor: IUsbDeviceDescriptor} + RT_CLASS!{class UsbConfiguration: IUsbConfiguration} + DEFINE_IID!(IID_IUsbDeviceDescriptor, 524866038, 47767, 17186, 185, 44, 181, 177, 137, 33, 101, 136); + RT_INTERFACE!{interface IUsbDeviceDescriptor(IUsbDeviceDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDeviceDescriptor] { + fn get_BcdUsb(&mut self, out: *mut u32) -> HRESULT, + fn get_MaxPacketSize0(&mut self, out: *mut u8) -> HRESULT, + fn get_VendorId(&mut self, out: *mut u32) -> HRESULT, + fn get_ProductId(&mut self, out: *mut u32) -> HRESULT, + fn get_BcdDeviceRevision(&mut self, out: *mut u32) -> HRESULT, + fn get_NumberOfConfigurations(&mut self, out: *mut u8) -> HRESULT + }} + impl IUsbDeviceDescriptor { + #[inline] pub unsafe fn get_bcd_usb(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BcdUsb)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_packet_size0(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPacketSize0)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_vendor_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VendorId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_product_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProductId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bcd_device_revision(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BcdDeviceRevision)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_configurations(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfConfigurations)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbConfigurationDescriptor, 4061621650, 46146, 16506, 130, 7, 125, 100, 108, 3, 133, 243); + RT_INTERFACE!{interface IUsbConfigurationDescriptor(IUsbConfigurationDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbConfigurationDescriptor] { + fn get_ConfigurationValue(&mut self, out: *mut u8) -> HRESULT, + fn get_MaxPowerMilliamps(&mut self, out: *mut u32) -> HRESULT, + fn get_SelfPowered(&mut self, out: *mut bool) -> HRESULT, + fn get_RemoteWakeup(&mut self, out: *mut bool) -> HRESULT + }} + impl IUsbConfigurationDescriptor { + #[inline] pub unsafe fn get_configuration_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConfigurationValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_power_milliamps(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPowerMilliamps)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_self_powered(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelfPowered)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_wakeup(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RemoteWakeup)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbConfigurationDescriptorStatics, 1112337811, 59200, 16545, 146, 189, 218, 18, 14, 160, 73, 20); + RT_INTERFACE!{static interface IUsbConfigurationDescriptorStatics(IUsbConfigurationDescriptorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbConfigurationDescriptorStatics] { + fn TryParse(&mut self, descriptor: *mut UsbDescriptor, parsed: *mut *mut UsbConfigurationDescriptor, out: *mut bool) -> HRESULT, + fn Parse(&mut self, descriptor: *mut UsbDescriptor, out: *mut *mut UsbConfigurationDescriptor) -> HRESULT + }} + impl IUsbConfigurationDescriptorStatics { + #[inline] pub unsafe fn try_parse(&mut self, descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { + let mut parsed = null_mut(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryParse)(self, descriptor as *const _ as *mut _, &mut parsed, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(parsed), out)) } else { err(hr) } + } + #[inline] pub unsafe fn parse(&mut self, descriptor: &UsbDescriptor) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Parse)(self, descriptor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UsbDescriptor: IUsbDescriptor} + RT_CLASS!{class UsbConfigurationDescriptor: IUsbConfigurationDescriptor} + RT_ACTIVATABLE!{IUsbConfigurationDescriptorStatics [CLSID_UsbConfigurationDescriptor]} + DEFINE_CLSID!(CLSID_UsbConfigurationDescriptor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,67,111,110,102,105,103,117,114,97,116,105,111,110,68,101,115,99,114,105,112,116,111,114,0]); + DEFINE_IID!(IID_IUsbInterfaceDescriptor, 429289671, 47086, 20368, 140, 213, 148, 162, 226, 87, 89, 138); + RT_INTERFACE!{interface IUsbInterfaceDescriptor(IUsbInterfaceDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterfaceDescriptor] { + fn get_ClassCode(&mut self, out: *mut u8) -> HRESULT, + fn get_SubclassCode(&mut self, out: *mut u8) -> HRESULT, + fn get_ProtocolCode(&mut self, out: *mut u8) -> HRESULT, + fn get_AlternateSettingNumber(&mut self, out: *mut u8) -> HRESULT, + fn get_InterfaceNumber(&mut self, out: *mut u8) -> HRESULT + }} + impl IUsbInterfaceDescriptor { + #[inline] pub unsafe fn get_class_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ClassCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_subclass_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SubclassCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_protocol_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtocolCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_alternate_setting_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlternateSettingNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_interface_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InterfaceNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbInterfaceDescriptorStatics, 3813318645, 30678, 18614, 176, 190, 22, 198, 66, 35, 22, 254); + RT_INTERFACE!{static interface IUsbInterfaceDescriptorStatics(IUsbInterfaceDescriptorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterfaceDescriptorStatics] { + fn TryParse(&mut self, descriptor: *mut UsbDescriptor, parsed: *mut *mut UsbInterfaceDescriptor, out: *mut bool) -> HRESULT, + fn Parse(&mut self, descriptor: *mut UsbDescriptor, out: *mut *mut UsbInterfaceDescriptor) -> HRESULT + }} + impl IUsbInterfaceDescriptorStatics { + #[inline] pub unsafe fn try_parse(&mut self, descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { + let mut parsed = null_mut(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryParse)(self, descriptor as *const _ as *mut _, &mut parsed, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(parsed), out)) } else { err(hr) } + } + #[inline] pub unsafe fn parse(&mut self, descriptor: &UsbDescriptor) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Parse)(self, descriptor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UsbInterfaceDescriptor: IUsbInterfaceDescriptor} + RT_ACTIVATABLE!{IUsbInterfaceDescriptorStatics [CLSID_UsbInterfaceDescriptor]} + DEFINE_CLSID!(CLSID_UsbInterfaceDescriptor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,73,110,116,101,114,102,97,99,101,68,101,115,99,114,105,112,116,111,114,0]); + DEFINE_IID!(IID_IUsbEndpointDescriptor, 1799906009, 36343, 19264, 172, 131, 87, 143, 19, 159, 5, 117); + RT_INTERFACE!{interface IUsbEndpointDescriptor(IUsbEndpointDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbEndpointDescriptor] { + fn get_EndpointNumber(&mut self, out: *mut u8) -> HRESULT, + fn get_Direction(&mut self, out: *mut UsbTransferDirection) -> HRESULT, + fn get_EndpointType(&mut self, out: *mut UsbEndpointType) -> HRESULT, + fn get_AsBulkInEndpointDescriptor(&mut self, out: *mut *mut UsbBulkInEndpointDescriptor) -> HRESULT, + fn get_AsInterruptInEndpointDescriptor(&mut self, out: *mut *mut UsbInterruptInEndpointDescriptor) -> HRESULT, + fn get_AsBulkOutEndpointDescriptor(&mut self, out: *mut *mut UsbBulkOutEndpointDescriptor) -> HRESULT, + fn get_AsInterruptOutEndpointDescriptor(&mut self, out: *mut *mut UsbInterruptOutEndpointDescriptor) -> HRESULT + }} + impl IUsbEndpointDescriptor { + #[inline] pub unsafe fn get_endpoint_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndpointNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Direction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_endpoint_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndpointType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_as_bulk_in_endpoint_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AsBulkInEndpointDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_as_interrupt_in_endpoint_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AsInterruptInEndpointDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_as_bulk_out_endpoint_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AsBulkOutEndpointDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_as_interrupt_out_endpoint_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AsInterruptOutEndpointDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UsbBulkInEndpointDescriptor: IUsbBulkInEndpointDescriptor} + RT_CLASS!{class UsbInterruptInEndpointDescriptor: IUsbInterruptInEndpointDescriptor} + RT_CLASS!{class UsbBulkOutEndpointDescriptor: IUsbBulkOutEndpointDescriptor} + RT_CLASS!{class UsbInterruptOutEndpointDescriptor: IUsbInterruptOutEndpointDescriptor} + DEFINE_IID!(IID_IUsbEndpointDescriptorStatics, 3364925953, 39530, 18782, 168, 44, 41, 91, 158, 112, 129, 6); + RT_INTERFACE!{static interface IUsbEndpointDescriptorStatics(IUsbEndpointDescriptorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbEndpointDescriptorStatics] { + fn TryParse(&mut self, descriptor: *mut UsbDescriptor, parsed: *mut *mut UsbEndpointDescriptor, out: *mut bool) -> HRESULT, + fn Parse(&mut self, descriptor: *mut UsbDescriptor, out: *mut *mut UsbEndpointDescriptor) -> HRESULT + }} + impl IUsbEndpointDescriptorStatics { + #[inline] pub unsafe fn try_parse(&mut self, descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { + let mut parsed = null_mut(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryParse)(self, descriptor as *const _ as *mut _, &mut parsed, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(parsed), out)) } else { err(hr) } + } + #[inline] pub unsafe fn parse(&mut self, descriptor: &UsbDescriptor) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Parse)(self, descriptor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UsbEndpointDescriptor: IUsbEndpointDescriptor} + RT_ACTIVATABLE!{IUsbEndpointDescriptorStatics [CLSID_UsbEndpointDescriptor]} + DEFINE_CLSID!(CLSID_UsbEndpointDescriptor = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,85,115,98,46,85,115,98,69,110,100,112,111,105,110,116,68,101,115,99,114,105,112,116,111,114,0]); + DEFINE_IID!(IID_IUsbDescriptor, 176812566, 24477, 18548, 137, 4, 218, 154, 211, 245, 82, 143); + RT_INTERFACE!{interface IUsbDescriptor(IUsbDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDescriptor] { + fn get_Length(&mut self, out: *mut u8) -> HRESULT, + fn get_DescriptorType(&mut self, out: *mut u8) -> HRESULT, + #[cfg(feature="windows.storage")] fn ReadDescriptorBuffer(&mut self, buffer: *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IUsbDescriptor { + #[inline] pub unsafe fn get_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_descriptor_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DescriptorType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn read_descriptor_buffer(&mut self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).ReadDescriptorBuffer)(self, buffer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbInterruptInEventArgs, 3081781394, 5144, 18742, 130, 9, 41, 156, 245, 96, 85, 131); + RT_INTERFACE!{interface IUsbInterruptInEventArgs(IUsbInterruptInEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterruptInEventArgs] { + #[cfg(feature="windows.storage")] fn get_InterruptData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IUsbInterruptInEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_interrupt_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InterruptData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UsbInterruptInEventArgs: IUsbInterruptInEventArgs} + RT_ENUM! { enum UsbReadOptions: u32 { + None (UsbReadOptions_None) = 0, AutoClearStall (UsbReadOptions_AutoClearStall) = 1, OverrideAutomaticBufferManagement (UsbReadOptions_OverrideAutomaticBufferManagement) = 2, IgnoreShortPacket (UsbReadOptions_IgnoreShortPacket) = 4, AllowPartialReads (UsbReadOptions_AllowPartialReads) = 8, + }} + RT_ENUM! { enum UsbWriteOptions: u32 { + None (UsbWriteOptions_None) = 0, AutoClearStall (UsbWriteOptions_AutoClearStall) = 1, ShortPacketTerminate (UsbWriteOptions_ShortPacketTerminate) = 2, + }} + DEFINE_IID!(IID_IUsbBulkInPipe, 4028443963, 17736, 19792, 179, 38, 216, 44, 218, 190, 18, 32); + RT_INTERFACE!{interface IUsbBulkInPipe(IUsbBulkInPipeVtbl): IInspectable(IInspectableVtbl) [IID_IUsbBulkInPipe] { + fn get_MaxTransferSizeBytes(&mut self, out: *mut u32) -> HRESULT, + fn get_EndpointDescriptor(&mut self, out: *mut *mut UsbBulkInEndpointDescriptor) -> HRESULT, + fn ClearStallAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn put_ReadOptions(&mut self, value: UsbReadOptions) -> HRESULT, + fn get_ReadOptions(&mut self, out: *mut UsbReadOptions) -> HRESULT, + fn FlushBuffer(&mut self) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_InputStream(&mut self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT + }} + impl IUsbBulkInPipe { + #[inline] pub unsafe fn get_max_transfer_size_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxTransferSizeBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_endpoint_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_stall_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearStallAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_read_options(&mut self, value: UsbReadOptions) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReadOptions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_read_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadOptions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn flush_buffer(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).FlushBuffer)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_input_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbInterruptInPipe, 4194332950, 34007, 18631, 138, 63, 76, 11, 35, 95, 46, 166); + RT_INTERFACE!{interface IUsbInterruptInPipe(IUsbInterruptInPipeVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterruptInPipe] { + fn get_EndpointDescriptor(&mut self, out: *mut *mut UsbInterruptInEndpointDescriptor) -> HRESULT, + fn ClearStallAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn add_DataReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IUsbInterruptInPipe { + #[inline] pub unsafe fn get_endpoint_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_stall_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearStallAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_data_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DataReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_data_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DataReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class UsbInterruptInPipe: IUsbInterruptInPipe} + DEFINE_IID!(IID_IUsbBulkOutPipe, 2833903214, 277, 17834, 139, 33, 55, 178, 37, 188, 206, 231); + RT_INTERFACE!{interface IUsbBulkOutPipe(IUsbBulkOutPipeVtbl): IInspectable(IInspectableVtbl) [IID_IUsbBulkOutPipe] { + fn get_EndpointDescriptor(&mut self, out: *mut *mut UsbBulkOutEndpointDescriptor) -> HRESULT, + fn ClearStallAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn put_WriteOptions(&mut self, value: UsbWriteOptions) -> HRESULT, + fn get_WriteOptions(&mut self, out: *mut UsbWriteOptions) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_OutputStream(&mut self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT + }} + impl IUsbBulkOutPipe { + #[inline] pub unsafe fn get_endpoint_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_stall_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearStallAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_write_options(&mut self, value: UsbWriteOptions) -> Result<()> { + let hr = ((*self.lpVtbl).put_WriteOptions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_write_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WriteOptions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutputStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbInterruptOutPipe, 3917793449, 43769, 18896, 185, 108, 246, 97, 171, 74, 127, 149); + RT_INTERFACE!{interface IUsbInterruptOutPipe(IUsbInterruptOutPipeVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterruptOutPipe] { + fn get_EndpointDescriptor(&mut self, out: *mut *mut UsbInterruptOutEndpointDescriptor) -> HRESULT, + fn ClearStallAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn put_WriteOptions(&mut self, value: UsbWriteOptions) -> HRESULT, + fn get_WriteOptions(&mut self, out: *mut UsbWriteOptions) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_OutputStream(&mut self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT + }} + impl IUsbInterruptOutPipe { + #[inline] pub unsafe fn get_endpoint_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_stall_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearStallAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_write_options(&mut self, value: UsbWriteOptions) -> Result<()> { + let hr = ((*self.lpVtbl).put_WriteOptions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_write_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WriteOptions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutputStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UsbBulkInPipe: IUsbBulkInPipe} + RT_CLASS!{class UsbBulkOutPipe: IUsbBulkOutPipe} + RT_CLASS!{class UsbInterruptOutPipe: IUsbInterruptOutPipe} + DEFINE_IID!(IID_IUsbConfiguration, 1746367529, 13993, 18135, 184, 115, 252, 104, 146, 81, 236, 48); + RT_INTERFACE!{interface IUsbConfiguration(IUsbConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IUsbConfiguration] { + fn get_UsbInterfaces(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ConfigurationDescriptor(&mut self, out: *mut *mut UsbConfigurationDescriptor) -> HRESULT, + fn get_Descriptors(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IUsbConfiguration { + #[inline] pub unsafe fn get_usb_interfaces(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UsbInterfaces)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_configuration_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConfigurationDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_descriptors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Descriptors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbInterface, 2687642517, 32583, 18603, 167, 39, 103, 140, 37, 190, 33, 18); + RT_INTERFACE!{interface IUsbInterface(IUsbInterfaceVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterface] { + fn get_BulkInPipes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_InterruptInPipes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_BulkOutPipes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_InterruptOutPipes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_InterfaceSettings(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_InterfaceNumber(&mut self, out: *mut u8) -> HRESULT, + fn get_Descriptors(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IUsbInterface { + #[inline] pub unsafe fn get_bulk_in_pipes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BulkInPipes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_interrupt_in_pipes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InterruptInPipes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bulk_out_pipes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BulkOutPipes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_interrupt_out_pipes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InterruptOutPipes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_interface_settings(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InterfaceSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_interface_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InterfaceNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_descriptors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Descriptors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UsbInterfaceSetting: IUsbInterfaceSetting} + DEFINE_IID!(IID_IUsbInterfaceSetting, 405257127, 36263, 19191, 143, 76, 127, 48, 50, 231, 129, 245); + RT_INTERFACE!{interface IUsbInterfaceSetting(IUsbInterfaceSettingVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterfaceSetting] { + fn get_BulkInEndpoints(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_InterruptInEndpoints(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_BulkOutEndpoints(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_InterruptOutEndpoints(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Selected(&mut self, out: *mut bool) -> HRESULT, + fn SelectSettingAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_InterfaceDescriptor(&mut self, out: *mut *mut UsbInterfaceDescriptor) -> HRESULT, + fn get_Descriptors(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IUsbInterfaceSetting { + #[inline] pub unsafe fn get_bulk_in_endpoints(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BulkInEndpoints)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_interrupt_in_endpoints(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InterruptInEndpoints)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bulk_out_endpoints(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BulkOutEndpoints)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_interrupt_out_endpoints(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InterruptOutEndpoints)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Selected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn select_setting_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectSettingAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_interface_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InterfaceDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_descriptors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Descriptors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbBulkInEndpointDescriptor, 1013860422, 1743, 17065, 157, 194, 151, 28, 27, 20, 182, 227); + RT_INTERFACE!{interface IUsbBulkInEndpointDescriptor(IUsbBulkInEndpointDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbBulkInEndpointDescriptor] { + fn get_MaxPacketSize(&mut self, out: *mut u32) -> HRESULT, + fn get_EndpointNumber(&mut self, out: *mut u8) -> HRESULT, + fn get_Pipe(&mut self, out: *mut *mut UsbBulkInPipe) -> HRESULT + }} + impl IUsbBulkInEndpointDescriptor { + #[inline] pub unsafe fn get_max_packet_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPacketSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_endpoint_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndpointNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pipe(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pipe)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbInterruptInEndpointDescriptor, 3226634599, 51473, 19514, 134, 178, 65, 156, 45, 168, 144, 57); + RT_INTERFACE!{interface IUsbInterruptInEndpointDescriptor(IUsbInterruptInEndpointDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterruptInEndpointDescriptor] { + fn get_MaxPacketSize(&mut self, out: *mut u32) -> HRESULT, + fn get_EndpointNumber(&mut self, out: *mut u8) -> HRESULT, + fn get_Interval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Pipe(&mut self, out: *mut *mut UsbInterruptInPipe) -> HRESULT + }} + impl IUsbInterruptInEndpointDescriptor { + #[inline] pub unsafe fn get_max_packet_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPacketSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_endpoint_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndpointNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Interval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pipe(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pipe)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbBulkOutEndpointDescriptor, 673219706, 65518, 20320, 155, 225, 149, 108, 172, 62, 203, 101); + RT_INTERFACE!{interface IUsbBulkOutEndpointDescriptor(IUsbBulkOutEndpointDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbBulkOutEndpointDescriptor] { + fn get_MaxPacketSize(&mut self, out: *mut u32) -> HRESULT, + fn get_EndpointNumber(&mut self, out: *mut u8) -> HRESULT, + fn get_Pipe(&mut self, out: *mut *mut UsbBulkOutPipe) -> HRESULT + }} + impl IUsbBulkOutEndpointDescriptor { + #[inline] pub unsafe fn get_max_packet_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPacketSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_endpoint_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndpointNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pipe(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pipe)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbInterruptOutEndpointDescriptor, 3433033089, 4298, 17715, 149, 45, 158, 39, 131, 65, 232, 15); + RT_INTERFACE!{interface IUsbInterruptOutEndpointDescriptor(IUsbInterruptOutEndpointDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbInterruptOutEndpointDescriptor] { + fn get_MaxPacketSize(&mut self, out: *mut u32) -> HRESULT, + fn get_EndpointNumber(&mut self, out: *mut u8) -> HRESULT, + fn get_Interval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Pipe(&mut self, out: *mut *mut UsbInterruptOutPipe) -> HRESULT + }} + impl IUsbInterruptOutEndpointDescriptor { + #[inline] pub unsafe fn get_max_packet_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPacketSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_endpoint_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndpointNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Interval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pipe(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pipe)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUsbDevice, 1380563346, 50262, 17621, 173, 94, 36, 245, 160, 137, 246, 59); + RT_INTERFACE!{interface IUsbDevice(IUsbDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDevice] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SendControlOutTransferAsync(&mut self, setupPacket: *mut UsbSetupPacket, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SendControlOutTransferAsyncNoBuffer(&mut self, setupPacket: *mut UsbSetupPacket, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SendControlInTransferAsync(&mut self, setupPacket: *mut UsbSetupPacket, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SendControlInTransferAsyncNoBuffer(&mut self, setupPacket: *mut UsbSetupPacket, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_DefaultInterface(&mut self, out: *mut *mut UsbInterface) -> HRESULT, + fn get_DeviceDescriptor(&mut self, out: *mut *mut UsbDeviceDescriptor) -> HRESULT, + fn get_Configuration(&mut self, out: *mut *mut UsbConfiguration) -> HRESULT + }} + impl IUsbDevice { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_control_out_transfer_async(&mut self, setupPacket: &UsbSetupPacket, buffer: &super::super::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendControlOutTransferAsync)(self, setupPacket as *const _ as *mut _, buffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn send_control_out_transfer_async_no_buffer(&mut self, setupPacket: &UsbSetupPacket) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendControlOutTransferAsyncNoBuffer)(self, setupPacket as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_control_in_transfer_async(&mut self, setupPacket: &UsbSetupPacket, buffer: &super::super::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendControlInTransferAsync)(self, setupPacket as *const _ as *mut _, buffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_control_in_transfer_async_no_buffer(&mut self, setupPacket: &UsbSetupPacket) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendControlInTransferAsyncNoBuffer)(self, setupPacket as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_interface(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DefaultInterface)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_configuration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Configuration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Devices.Usb +pub mod wifi { // Windows.Devices.WiFi +use ::prelude::*; + RT_ENUM! { enum WiFiNetworkKind: i32 { + Any (WiFiNetworkKind_Any) = 0, Infrastructure (WiFiNetworkKind_Infrastructure) = 1, Adhoc (WiFiNetworkKind_Adhoc) = 2, + }} + RT_ENUM! { enum WiFiPhyKind: i32 { + Unknown (WiFiPhyKind_Unknown) = 0, Fhss (WiFiPhyKind_Fhss) = 1, Dsss (WiFiPhyKind_Dsss) = 2, IRBaseband (WiFiPhyKind_IRBaseband) = 3, Ofdm (WiFiPhyKind_Ofdm) = 4, Hrdsss (WiFiPhyKind_Hrdsss) = 5, Erp (WiFiPhyKind_Erp) = 6, HT (WiFiPhyKind_HT) = 7, Vht (WiFiPhyKind_Vht) = 8, Dmg (WiFiPhyKind_Dmg) = 9, + }} + RT_ENUM! { enum WiFiAccessStatus: i32 { + Unspecified (WiFiAccessStatus_Unspecified) = 0, Allowed (WiFiAccessStatus_Allowed) = 1, DeniedByUser (WiFiAccessStatus_DeniedByUser) = 2, DeniedBySystem (WiFiAccessStatus_DeniedBySystem) = 3, + }} + RT_ENUM! { enum WiFiReconnectionKind: i32 { + Automatic (WiFiReconnectionKind_Automatic) = 0, Manual (WiFiReconnectionKind_Manual) = 1, + }} + RT_ENUM! { enum WiFiConnectionStatus: i32 { + UnspecifiedFailure (WiFiConnectionStatus_UnspecifiedFailure) = 0, Success (WiFiConnectionStatus_Success) = 1, AccessRevoked (WiFiConnectionStatus_AccessRevoked) = 2, InvalidCredential (WiFiConnectionStatus_InvalidCredential) = 3, NetworkNotAvailable (WiFiConnectionStatus_NetworkNotAvailable) = 4, Timeout (WiFiConnectionStatus_Timeout) = 5, UnsupportedAuthenticationProtocol (WiFiConnectionStatus_UnsupportedAuthenticationProtocol) = 6, + }} + DEFINE_IID!(IID_IWiFiAdapterStatics, 3659922909, 53836, 17379, 170, 189, 196, 101, 159, 115, 15, 153); + RT_INTERFACE!{static interface IWiFiAdapterStatics(IWiFiAdapterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiAdapterStatics] { + fn FindAllAdaptersAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IWiFiAdapterStatics { + #[inline] pub unsafe fn find_all_adapters_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAdaptersAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WiFiAdapter: IWiFiAdapter} + RT_ACTIVATABLE!{IWiFiAdapterStatics [CLSID_WiFiAdapter]} + DEFINE_CLSID!(CLSID_WiFiAdapter = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,46,87,105,70,105,65,100,97,112,116,101,114,0]); + DEFINE_IID!(IID_IWiFiAdapter, 2797921315, 15733, 17316, 185, 222, 17, 226, 107, 114, 217, 176); + RT_INTERFACE!{interface IWiFiAdapter(IWiFiAdapterVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiAdapter] { + #[cfg(not(feature="windows.networking"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.networking")] fn get_NetworkAdapter(&mut self, out: *mut *mut super::super::networking::connectivity::NetworkAdapter) -> HRESULT, + fn ScanAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_NetworkReport(&mut self, out: *mut *mut WiFiNetworkReport) -> HRESULT, + fn add_AvailableNetworksChanged(&mut self, args: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AvailableNetworksChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn ConnectAsync(&mut self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.security")] fn ConnectWithPasswordCredentialAsync(&mut self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: *mut super::super::security::credentials::PasswordCredential, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.security")] fn ConnectWithPasswordCredentialAndSsidAsync(&mut self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: *mut super::super::security::credentials::PasswordCredential, ssid: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn Disconnect(&mut self) -> HRESULT + }} + impl IWiFiAdapter { + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_network_adapter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkAdapter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn scan_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ScanAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkReport)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_available_networks_changed(&mut self, args: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AvailableNetworksChanged)(self, args as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_available_networks_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AvailableNetworksChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn connect_async(&mut self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectAsync)(self, availableNetwork as *const _ as *mut _, reconnectionKind, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn connect_with_password_credential_async(&mut self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectWithPasswordCredentialAsync)(self, availableNetwork as *const _ as *mut _, reconnectionKind, passwordCredential as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn connect_with_password_credential_and_ssid_async(&mut self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: &super::super::security::credentials::PasswordCredential, ssid: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectWithPasswordCredentialAndSsidAsync)(self, availableNetwork as *const _ as *mut _, reconnectionKind, passwordCredential as *const _ as *mut _, ssid.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn disconnect(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Disconnect)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class WiFiNetworkReport: IWiFiNetworkReport} + RT_CLASS!{class WiFiAvailableNetwork: IWiFiAvailableNetwork} + RT_CLASS!{class WiFiConnectionResult: IWiFiConnectionResult} + DEFINE_IID!(IID_IWiFiNetworkReport, 2502221522, 22801, 17502, 129, 148, 190, 79, 26, 112, 72, 149); + RT_INTERFACE!{interface IWiFiNetworkReport(IWiFiNetworkReportVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiNetworkReport] { + fn get_Timestamp(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_AvailableNetworks(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IWiFiNetworkReport { + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_available_networks(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AvailableNetworks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWiFiAvailableNetwork, 652829254, 6206, 18180, 152, 38, 113, 180, 162, 240, 246, 104); + RT_INTERFACE!{interface IWiFiAvailableNetwork(IWiFiAvailableNetworkVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiAvailableNetwork] { + fn get_Uptime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Ssid(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Bssid(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ChannelCenterFrequencyInKilohertz(&mut self, out: *mut i32) -> HRESULT, + fn get_NetworkRssiInDecibelMilliwatts(&mut self, out: *mut f64) -> HRESULT, + fn get_SignalBars(&mut self, out: *mut u8) -> HRESULT, + fn get_NetworkKind(&mut self, out: *mut WiFiNetworkKind) -> HRESULT, + fn get_PhyKind(&mut self, out: *mut WiFiPhyKind) -> HRESULT, + #[cfg(not(feature="windows.networking"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.networking")] fn get_SecuritySettings(&mut self, out: *mut *mut super::super::networking::connectivity::NetworkSecuritySettings) -> HRESULT, + fn get_BeaconInterval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_IsWiFiDirect(&mut self, out: *mut bool) -> HRESULT + }} + impl IWiFiAvailableNetwork { + #[inline] pub unsafe fn get_uptime(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Uptime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ssid(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ssid)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bssid(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Bssid)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_channel_center_frequency_in_kilohertz(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ChannelCenterFrequencyInKilohertz)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_rssi_in_decibel_milliwatts(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkRssiInDecibelMilliwatts)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_signal_bars(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SignalBars)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_phy_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhyKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_security_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecuritySettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_beacon_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BeaconInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_wi_fi_direct(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsWiFiDirect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWiFiConnectionResult, 339468249, 50045, 16574, 165, 200, 133, 123, 206, 133, 169, 49); + RT_INTERFACE!{interface IWiFiConnectionResult(IWiFiConnectionResultVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiConnectionResult] { + fn get_ConnectionStatus(&mut self, out: *mut WiFiConnectionStatus) -> HRESULT + }} + impl IWiFiConnectionResult { + #[inline] pub unsafe fn get_connection_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConnectionStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Devices.WiFi +pub mod wifidirect { // Windows.Devices.WiFiDirect +use ::prelude::*; + RT_ENUM! { enum WiFiDirectConnectionStatus: i32 { + Disconnected (WiFiDirectConnectionStatus_Disconnected) = 0, Connected (WiFiDirectConnectionStatus_Connected) = 1, + }} + RT_ENUM! { enum WiFiDirectError: i32 { + Success (WiFiDirectError_Success) = 0, RadioNotAvailable (WiFiDirectError_RadioNotAvailable) = 1, ResourceInUse (WiFiDirectError_ResourceInUse) = 2, + }} + RT_ENUM! { enum WiFiDirectDeviceSelectorType: i32 { + DeviceInterface (WiFiDirectDeviceSelectorType_DeviceInterface) = 0, AssociationEndpoint (WiFiDirectDeviceSelectorType_AssociationEndpoint) = 1, + }} + RT_ENUM! { enum WiFiDirectAdvertisementListenStateDiscoverability: i32 { + None (WiFiDirectAdvertisementListenStateDiscoverability_None) = 0, Normal (WiFiDirectAdvertisementListenStateDiscoverability_Normal) = 1, Intensive (WiFiDirectAdvertisementListenStateDiscoverability_Intensive) = 2, + }} + RT_ENUM! { enum WiFiDirectAdvertisementPublisherStatus: i32 { + Created (WiFiDirectAdvertisementPublisherStatus_Created) = 0, Started (WiFiDirectAdvertisementPublisherStatus_Started) = 1, Stopped (WiFiDirectAdvertisementPublisherStatus_Stopped) = 2, Aborted (WiFiDirectAdvertisementPublisherStatus_Aborted) = 3, + }} + RT_ENUM! { enum WiFiDirectConfigurationMethod: i32 { + ProvidePin (WiFiDirectConfigurationMethod_ProvidePin) = 0, DisplayPin (WiFiDirectConfigurationMethod_DisplayPin) = 1, PushButton (WiFiDirectConfigurationMethod_PushButton) = 2, + }} + RT_ENUM! { enum WiFiDirectPairingProcedure: i32 { + GroupOwnerNegotiation (WiFiDirectPairingProcedure_GroupOwnerNegotiation) = 0, Invitation (WiFiDirectPairingProcedure_Invitation) = 1, + }} + DEFINE_IID!(IID_IWiFiDirectDeviceStatics, 3899438460, 15020, 18513, 167, 146, 72, 42, 175, 147, 27, 4); + RT_INTERFACE!{static interface IWiFiDirectDeviceStatics(IWiFiDirectDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectDeviceStatics] { + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IWiFiDirectDeviceStatics { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectDevice: IWiFiDirectDevice} + RT_ACTIVATABLE!{IWiFiDirectDeviceStatics2 [CLSID_WiFiDirectDevice]} + RT_ACTIVATABLE!{IWiFiDirectDeviceStatics [CLSID_WiFiDirectDevice]} + DEFINE_CLSID!(CLSID_WiFiDirectDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,46,87,105,70,105,68,105,114,101,99,116,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_IWiFiDirectDeviceStatics2, 445988425, 45315, 17278, 146, 38, 171, 103, 151, 19, 66, 249); + RT_INTERFACE!{static interface IWiFiDirectDeviceStatics2(IWiFiDirectDeviceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectDeviceStatics2] { + fn GetDeviceSelector(&mut self, type_: WiFiDirectDeviceSelectorType, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, connectionParameters: *mut WiFiDirectConnectionParameters, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IWiFiDirectDeviceStatics2 { + #[inline] pub unsafe fn get_device_selector(&mut self, type_: WiFiDirectDeviceSelectorType) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, type_, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg, connectionParameters: &WiFiDirectConnectionParameters) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), connectionParameters as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectConnectionParameters: IWiFiDirectConnectionParameters} + RT_ACTIVATABLE!{IWiFiDirectConnectionParametersStatics [CLSID_WiFiDirectConnectionParameters]} + DEFINE_CLSID!(CLSID_WiFiDirectConnectionParameters = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,46,87,105,70,105,68,105,114,101,99,116,67,111,110,110,101,99,116,105,111,110,80,97,114,97,109,101,116,101,114,115,0]); + DEFINE_IID!(IID_IWiFiDirectInformationElementStatics, 3687853846, 4517, 20064, 140, 170, 52, 119, 33, 72, 55, 138); + RT_INTERFACE!{static interface IWiFiDirectInformationElementStatics(IWiFiDirectInformationElementStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectInformationElementStatics] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFromBuffer(&mut self, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn CreateFromDeviceInformation(&mut self, deviceInformation: *mut super::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IWiFiDirectInformationElementStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_buffer(&mut self, buffer: &super::super::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromBuffer)(self, buffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_device_information(&mut self, deviceInformation: &super::enumeration::DeviceInformation) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromDeviceInformation)(self, deviceInformation as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectInformationElement: IWiFiDirectInformationElement} + RT_ACTIVATABLE!{IWiFiDirectInformationElementStatics [CLSID_WiFiDirectInformationElement]} + DEFINE_CLSID!(CLSID_WiFiDirectInformationElement = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,46,87,105,70,105,68,105,114,101,99,116,73,110,102,111,114,109,97,116,105,111,110,69,108,101,109,101,110,116,0]); + DEFINE_IID!(IID_IWiFiDirectInformationElement, 2952491734, 30395, 18814, 172, 139, 220, 114, 131, 139, 195, 9); + RT_INTERFACE!{interface IWiFiDirectInformationElement(IWiFiDirectInformationElementVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectInformationElement] { + #[cfg(feature="windows.storage")] fn get_Oui(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn put_Oui(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_OuiType(&mut self, out: *mut u8) -> HRESULT, + fn put_OuiType(&mut self, value: u8) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Value(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn put_Value(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IWiFiDirectInformationElement { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_oui(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Oui)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_oui(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_Oui)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_oui_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OuiType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_oui_type(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_OuiType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_value(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWiFiDirectLegacySettings, 2790251450, 62205, 17767, 169, 27, 245, 194, 245, 50, 16, 87); + RT_INTERFACE!{interface IWiFiDirectLegacySettings(IWiFiDirectLegacySettingsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectLegacySettings] { + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsEnabled(&mut self, value: bool) -> HRESULT, + fn get_Ssid(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Ssid(&mut self, value: HSTRING) -> HRESULT, + #[cfg(feature="windows.security")] fn get_Passphrase(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(feature="windows.security")] fn put_Passphrase(&mut self, value: *mut super::super::security::credentials::PasswordCredential) -> HRESULT + }} + impl IWiFiDirectLegacySettings { + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ssid(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ssid)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_ssid(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Ssid)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_passphrase(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Passphrase)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_passphrase(&mut self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { + let hr = ((*self.lpVtbl).put_Passphrase)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectLegacySettings: IWiFiDirectLegacySettings} + DEFINE_IID!(IID_IWiFiDirectAdvertisement, 2874219053, 10758, 18849, 165, 132, 97, 67, 92, 121, 5, 166); + RT_INTERFACE!{interface IWiFiDirectAdvertisement(IWiFiDirectAdvertisementVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectAdvertisement] { + fn get_InformationElements(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_InformationElements(&mut self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ListenStateDiscoverability(&mut self, out: *mut WiFiDirectAdvertisementListenStateDiscoverability) -> HRESULT, + fn put_ListenStateDiscoverability(&mut self, value: WiFiDirectAdvertisementListenStateDiscoverability) -> HRESULT, + fn get_IsAutonomousGroupOwnerEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsAutonomousGroupOwnerEnabled(&mut self, value: bool) -> HRESULT, + fn get_LegacySettings(&mut self, out: *mut *mut WiFiDirectLegacySettings) -> HRESULT + }} + impl IWiFiDirectAdvertisement { + #[inline] pub unsafe fn get_information_elements(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InformationElements)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_information_elements(&mut self, value: &super::super::foundation::collections::IVector) -> Result<()> { + let hr = ((*self.lpVtbl).put_InformationElements)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_listen_state_discoverability(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ListenStateDiscoverability)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_listen_state_discoverability(&mut self, value: WiFiDirectAdvertisementListenStateDiscoverability) -> Result<()> { + let hr = ((*self.lpVtbl).put_ListenStateDiscoverability)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_autonomous_group_owner_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsAutonomousGroupOwnerEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_autonomous_group_owner_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsAutonomousGroupOwnerEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_legacy_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LegacySettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWiFiDirectAdvertisement2, 3076106822, 55318, 18715, 145, 122, 180, 13, 125, 196, 3, 162); + RT_INTERFACE!{interface IWiFiDirectAdvertisement2(IWiFiDirectAdvertisement2Vtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectAdvertisement2] { + fn get_SupportedConfigurationMethods(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IWiFiDirectAdvertisement2 { + #[inline] pub unsafe fn get_supported_configuration_methods(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedConfigurationMethods)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectAdvertisement: IWiFiDirectAdvertisement} + DEFINE_IID!(IID_IWiFiDirectAdvertisementPublisherStatusChangedEventArgs, 2868766012, 21633, 18150, 144, 221, 50, 17, 101, 24, 241, 146); + RT_INTERFACE!{interface IWiFiDirectAdvertisementPublisherStatusChangedEventArgs(IWiFiDirectAdvertisementPublisherStatusChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectAdvertisementPublisherStatusChangedEventArgs] { + fn get_Status(&mut self, out: *mut WiFiDirectAdvertisementPublisherStatus) -> HRESULT, + fn get_Error(&mut self, out: *mut WiFiDirectError) -> HRESULT + }} + impl IWiFiDirectAdvertisementPublisherStatusChangedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectAdvertisementPublisherStatusChangedEventArgs: IWiFiDirectAdvertisementPublisherStatusChangedEventArgs} + DEFINE_IID!(IID_IWiFiDirectAdvertisementPublisher, 3009031450, 39711, 17881, 146, 90, 105, 77, 102, 223, 104, 239); + RT_INTERFACE!{interface IWiFiDirectAdvertisementPublisher(IWiFiDirectAdvertisementPublisherVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectAdvertisementPublisher] { + fn get_Advertisement(&mut self, out: *mut *mut WiFiDirectAdvertisement) -> HRESULT, + fn get_Status(&mut self, out: *mut WiFiDirectAdvertisementPublisherStatus) -> HRESULT, + fn add_StatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IWiFiDirectAdvertisementPublisher { + #[inline] pub unsafe fn get_advertisement(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Advertisement)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectAdvertisementPublisher: IWiFiDirectAdvertisementPublisher} + DEFINE_IID!(IID_IWiFiDirectConnectionParametersStatics, 1502278803, 30274, 17775, 185, 216, 232, 169, 235, 31, 64, 26); + RT_INTERFACE!{static interface IWiFiDirectConnectionParametersStatics(IWiFiDirectConnectionParametersStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionParametersStatics] { + fn GetDevicePairingKinds(&mut self, configurationMethod: WiFiDirectConfigurationMethod, out: *mut super::enumeration::DevicePairingKinds) -> HRESULT + }} + impl IWiFiDirectConnectionParametersStatics { + #[inline] pub unsafe fn get_device_pairing_kinds(&mut self, configurationMethod: WiFiDirectConfigurationMethod) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetDevicePairingKinds)(self, configurationMethod, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWiFiDirectConnectionParameters, 3001373701, 22274, 19222, 160, 44, 187, 205, 33, 239, 96, 152); + RT_INTERFACE!{interface IWiFiDirectConnectionParameters(IWiFiDirectConnectionParametersVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionParameters] { + fn get_GroupOwnerIntent(&mut self, out: *mut i16) -> HRESULT, + fn put_GroupOwnerIntent(&mut self, value: i16) -> HRESULT + }} + impl IWiFiDirectConnectionParameters { + #[inline] pub unsafe fn get_group_owner_intent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GroupOwnerIntent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_group_owner_intent(&mut self, value: i16) -> Result<()> { + let hr = ((*self.lpVtbl).put_GroupOwnerIntent)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWiFiDirectConnectionParameters2, 2872774590, 43650, 17588, 136, 200, 227, 5, 107, 137, 128, 29); + RT_INTERFACE!{interface IWiFiDirectConnectionParameters2(IWiFiDirectConnectionParameters2Vtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionParameters2] { + fn get_PreferenceOrderedConfigurationMethods(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_PreferredPairingProcedure(&mut self, out: *mut WiFiDirectPairingProcedure) -> HRESULT, + fn put_PreferredPairingProcedure(&mut self, value: WiFiDirectPairingProcedure) -> HRESULT + }} + impl IWiFiDirectConnectionParameters2 { + #[inline] pub unsafe fn get_preference_ordered_configuration_methods(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreferenceOrderedConfigurationMethods)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_preferred_pairing_procedure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreferredPairingProcedure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_preferred_pairing_procedure(&mut self, value: WiFiDirectPairingProcedure) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreferredPairingProcedure)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectConnectionRequest: IWiFiDirectConnectionRequest} + DEFINE_IID!(IID_IWiFiDirectConnectionRequestedEventArgs, 4187824318, 54157, 18511, 130, 21, 231, 182, 90, 191, 36, 76); + RT_INTERFACE!{interface IWiFiDirectConnectionRequestedEventArgs(IWiFiDirectConnectionRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionRequestedEventArgs] { + fn GetConnectionRequest(&mut self, out: *mut *mut WiFiDirectConnectionRequest) -> HRESULT + }} + impl IWiFiDirectConnectionRequestedEventArgs { + #[inline] pub unsafe fn get_connection_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConnectionRequest)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectConnectionRequestedEventArgs: IWiFiDirectConnectionRequestedEventArgs} + DEFINE_IID!(IID_IWiFiDirectConnectionListener, 1771838221, 36115, 20201, 185, 236, 156, 114, 248, 37, 31, 125); + RT_INTERFACE!{interface IWiFiDirectConnectionListener(IWiFiDirectConnectionListenerVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionListener] { + fn add_ConnectionRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IWiFiDirectConnectionListener { + #[inline] pub unsafe fn add_connection_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ConnectionRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_connection_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ConnectionRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectConnectionListener: IWiFiDirectConnectionListener} + DEFINE_IID!(IID_IWiFiDirectDevice, 1927195304, 29419, 19886, 138, 40, 133, 19, 53, 93, 39, 119); + RT_INTERFACE!{interface IWiFiDirectDevice(IWiFiDirectDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectDevice] { + fn get_ConnectionStatus(&mut self, out: *mut WiFiDirectConnectionStatus) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn add_ConnectionStatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(feature="windows.networking")] fn GetConnectionEndpointPairs(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IWiFiDirectDevice { + #[inline] pub unsafe fn get_connection_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConnectionStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_connection_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ConnectionStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_connection_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ConnectionStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_connection_endpoint_pairs(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConnectionEndpointPairs)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWiFiDirectConnectionRequest, 2394527237, 37199, 18883, 166, 20, 209, 141, 197, 177, 155, 67); + RT_INTERFACE!{interface IWiFiDirectConnectionRequest(IWiFiDirectConnectionRequestVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectConnectionRequest] { + fn get_DeviceInformation(&mut self, out: *mut *mut super::enumeration::DeviceInformation) -> HRESULT + }} + impl IWiFiDirectConnectionRequest { + #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +pub mod services { // Windows.Devices.WiFiDirect.Services +use ::prelude::*; + RT_ENUM! { enum WiFiDirectServiceConfigurationMethod: i32 { + Default (WiFiDirectServiceConfigurationMethod_Default) = 0, PinDisplay (WiFiDirectServiceConfigurationMethod_PinDisplay) = 1, PinEntry (WiFiDirectServiceConfigurationMethod_PinEntry) = 2, + }} + RT_ENUM! { enum WiFiDirectServiceStatus: i32 { + Available (WiFiDirectServiceStatus_Available) = 0, Busy (WiFiDirectServiceStatus_Busy) = 1, Custom (WiFiDirectServiceStatus_Custom) = 2, + }} + RT_ENUM! { enum WiFiDirectServiceSessionStatus: i32 { + Closed (WiFiDirectServiceSessionStatus_Closed) = 0, Initiated (WiFiDirectServiceSessionStatus_Initiated) = 1, Requested (WiFiDirectServiceSessionStatus_Requested) = 2, Open (WiFiDirectServiceSessionStatus_Open) = 3, + }} + RT_ENUM! { enum WiFiDirectServiceSessionErrorStatus: i32 { + Ok (WiFiDirectServiceSessionErrorStatus_Ok) = 0, Disassociated (WiFiDirectServiceSessionErrorStatus_Disassociated) = 1, LocalClose (WiFiDirectServiceSessionErrorStatus_LocalClose) = 2, RemoteClose (WiFiDirectServiceSessionErrorStatus_RemoteClose) = 3, SystemFailure (WiFiDirectServiceSessionErrorStatus_SystemFailure) = 4, NoResponseFromRemote (WiFiDirectServiceSessionErrorStatus_NoResponseFromRemote) = 5, + }} + RT_ENUM! { enum WiFiDirectServiceAdvertisementStatus: i32 { + Created (WiFiDirectServiceAdvertisementStatus_Created) = 0, Started (WiFiDirectServiceAdvertisementStatus_Started) = 1, Stopped (WiFiDirectServiceAdvertisementStatus_Stopped) = 2, Aborted (WiFiDirectServiceAdvertisementStatus_Aborted) = 3, + }} + RT_ENUM! { enum WiFiDirectServiceError: i32 { + Success (WiFiDirectServiceError_Success) = 0, RadioNotAvailable (WiFiDirectServiceError_RadioNotAvailable) = 1, ResourceInUse (WiFiDirectServiceError_ResourceInUse) = 2, UnsupportedHardware (WiFiDirectServiceError_UnsupportedHardware) = 3, NoHardware (WiFiDirectServiceError_NoHardware) = 4, + }} + RT_ENUM! { enum WiFiDirectServiceIPProtocol: i32 { + Tcp (WiFiDirectServiceIPProtocol_Tcp) = 6, Udp (WiFiDirectServiceIPProtocol_Udp) = 17, + }} + DEFINE_IID!(IID_IWiFiDirectServiceProvisioningInfo, 2346417406, 38873, 17826, 142, 153, 219, 80, 145, 15, 182, 166); + RT_INTERFACE!{interface IWiFiDirectServiceProvisioningInfo(IWiFiDirectServiceProvisioningInfoVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceProvisioningInfo] { + fn get_SelectedConfigurationMethod(&mut self, out: *mut WiFiDirectServiceConfigurationMethod) -> HRESULT, + fn get_IsGroupFormationNeeded(&mut self, out: *mut bool) -> HRESULT + }} + impl IWiFiDirectServiceProvisioningInfo { + #[inline] pub unsafe fn get_selected_configuration_method(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedConfigurationMethod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_group_formation_needed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsGroupFormationNeeded)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectServiceProvisioningInfo: IWiFiDirectServiceProvisioningInfo} + DEFINE_IID!(IID_IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs, 3705266206, 33759, 17381, 143, 67, 203, 232, 71, 158, 132, 235); + RT_INTERFACE!{interface IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs(IWiFiDirectServiceAutoAcceptSessionConnectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs] { + fn get_Session(&mut self, out: *mut *mut WiFiDirectServiceSession) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_SessionInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs { + #[inline] pub unsafe fn get_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Session)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_session_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SessionInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectServiceSession: IWiFiDirectServiceSession} + RT_CLASS!{class WiFiDirectServiceAutoAcceptSessionConnectedEventArgs: IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs} + DEFINE_IID!(IID_IWiFiDirectServiceRemotePortAddedEventArgs, 3570318017, 16339, 20238, 183, 189, 120, 41, 6, 244, 68, 17); + RT_INTERFACE!{interface IWiFiDirectServiceRemotePortAddedEventArgs(IWiFiDirectServiceRemotePortAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceRemotePortAddedEventArgs] { + #[cfg(not(feature="windows.networking"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.networking")] fn get_EndpointPairs(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::networking::EndpointPair>) -> HRESULT, + fn get_Protocol(&mut self, out: *mut WiFiDirectServiceIPProtocol) -> HRESULT + }} + impl IWiFiDirectServiceRemotePortAddedEventArgs { + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_endpoint_pairs(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EndpointPairs)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_protocol(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Protocol)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectServiceRemotePortAddedEventArgs: IWiFiDirectServiceRemotePortAddedEventArgs} + DEFINE_IID!(IID_IWiFiDirectServiceSessionDeferredEventArgs, 2382109055, 4609, 20255, 182, 244, 93, 241, 183, 185, 251, 46); + RT_INTERFACE!{interface IWiFiDirectServiceSessionDeferredEventArgs(IWiFiDirectServiceSessionDeferredEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceSessionDeferredEventArgs] { + #[cfg(feature="windows.storage")] fn get_DeferredSessionInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl IWiFiDirectServiceSessionDeferredEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_deferred_session_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeferredSessionInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectServiceSessionDeferredEventArgs: IWiFiDirectServiceSessionDeferredEventArgs} + DEFINE_IID!(IID_IWiFiDirectServiceSessionRequestedEventArgs, 1958595601, 21462, 18841, 180, 248, 108, 142, 204, 23, 113, 231); + RT_INTERFACE!{interface IWiFiDirectServiceSessionRequestedEventArgs(IWiFiDirectServiceSessionRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceSessionRequestedEventArgs] { + fn GetSessionRequest(&mut self, out: *mut *mut WiFiDirectServiceSessionRequest) -> HRESULT + }} + impl IWiFiDirectServiceSessionRequestedEventArgs { + #[inline] pub unsafe fn get_session_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSessionRequest)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectServiceSessionRequest: IWiFiDirectServiceSessionRequest} + RT_CLASS!{class WiFiDirectServiceSessionRequestedEventArgs: IWiFiDirectServiceSessionRequestedEventArgs} + DEFINE_IID!(IID_IWiFiDirectServiceAdvertiserFactory, 822520845, 46150, 20243, 159, 154, 138, 233, 37, 254, 186, 43); + RT_INTERFACE!{static interface IWiFiDirectServiceAdvertiserFactory(IWiFiDirectServiceAdvertiserFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceAdvertiserFactory] { + fn CreateWiFiDirectServiceAdvertiser(&mut self, serviceName: HSTRING, out: *mut *mut WiFiDirectServiceAdvertiser) -> HRESULT + }} + impl IWiFiDirectServiceAdvertiserFactory { + #[inline] pub unsafe fn create_wi_fi_direct_service_advertiser(&mut self, serviceName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWiFiDirectServiceAdvertiser)(self, serviceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectServiceAdvertiser: IWiFiDirectServiceAdvertiser [IWiFiDirectServiceAdvertiserFactory] [CLSID_WiFiDirectServiceAdvertiser]} + DEFINE_CLSID!(CLSID_WiFiDirectServiceAdvertiser = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,46,83,101,114,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,83,101,114,118,105,99,101,65,100,118,101,114,116,105,115,101,114,0]); + DEFINE_IID!(IID_IWiFiDirectServiceAdvertiser, 2762612449, 40335, 20303, 147, 238, 125, 222, 162, 227, 127, 70); + RT_INTERFACE!{interface IWiFiDirectServiceAdvertiser(IWiFiDirectServiceAdvertiserVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceAdvertiser] { + fn get_ServiceName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ServiceNamePrefixes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_ServiceInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_ServiceInfo(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn get_AutoAcceptSession(&mut self, out: *mut bool) -> HRESULT, + fn put_AutoAcceptSession(&mut self, value: bool) -> HRESULT, + fn get_PreferGroupOwnerMode(&mut self, out: *mut bool) -> HRESULT, + fn put_PreferGroupOwnerMode(&mut self, value: bool) -> HRESULT, + fn get_PreferredConfigurationMethods(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_ServiceStatus(&mut self, out: *mut WiFiDirectServiceStatus) -> HRESULT, + fn put_ServiceStatus(&mut self, value: WiFiDirectServiceStatus) -> HRESULT, + fn get_CustomServiceStatusCode(&mut self, out: *mut u32) -> HRESULT, + fn put_CustomServiceStatusCode(&mut self, value: u32) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy13(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_DeferredSessionInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy14(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_DeferredSessionInfo(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn get_AdvertisementStatus(&mut self, out: *mut WiFiDirectServiceAdvertisementStatus) -> HRESULT, + fn get_ServiceError(&mut self, out: *mut WiFiDirectServiceError) -> HRESULT, + fn add_SessionRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SessionRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_AutoAcceptSessionConnected(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AutoAcceptSessionConnected(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_AdvertisementStatusChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AdvertisementStatusChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn ConnectAsync(&mut self, deviceInfo: *mut super::super::enumeration::DeviceInformation, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn ConnectAsyncWithPin(&mut self, deviceInfo: *mut super::super::enumeration::DeviceInformation, pin: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IWiFiDirectServiceAdvertiser { + #[inline] pub unsafe fn get_service_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_name_prefixes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceNamePrefixes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_service_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_service_info(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_ServiceInfo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_accept_session(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoAcceptSession)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_accept_session(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoAcceptSession)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_prefer_group_owner_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreferGroupOwnerMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_prefer_group_owner_mode(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreferGroupOwnerMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_preferred_configuration_methods(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreferredConfigurationMethods)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_service_status(&mut self, value: WiFiDirectServiceStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_ServiceStatus)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_service_status_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CustomServiceStatusCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_custom_service_status_code(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CustomServiceStatusCode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_deferred_session_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeferredSessionInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_deferred_session_info(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_DeferredSessionInfo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_advertisement_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AdvertisementStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_session_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SessionRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_session_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SessionRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_auto_accept_session_connected(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AutoAcceptSessionConnected)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_auto_accept_session_connected(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AutoAcceptSessionConnected)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_advertisement_status_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AdvertisementStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_advertisement_status_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AdvertisementStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn connect_async(&mut self, deviceInfo: &super::super::enumeration::DeviceInformation) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectAsync)(self, deviceInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_async_with_pin(&mut self, deviceInfo: &super::super::enumeration::DeviceInformation, pin: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectAsyncWithPin)(self, deviceInfo as *const _ as *mut _, pin.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWiFiDirectServiceStatics, 2108948549, 64884, 18056, 183, 37, 93, 206, 134, 172, 242, 51); + RT_INTERFACE!{static interface IWiFiDirectServiceStatics(IWiFiDirectServiceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceStatics] { + fn GetSelector(&mut self, serviceName: HSTRING, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetSelectorWithFilter(&mut self, serviceName: HSTRING, serviceInfoFilter: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IWiFiDirectServiceStatics { + #[inline] pub unsafe fn get_selector(&mut self, serviceName: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSelector)(self, serviceName.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_selector_with_filter(&mut self, serviceName: &HStringArg, serviceInfoFilter: &::rt::gen::windows::storage::streams::IBuffer) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSelectorWithFilter)(self, serviceName.get(), serviceInfoFilter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WiFiDirectService: IWiFiDirectService} + RT_ACTIVATABLE!{IWiFiDirectServiceStatics [CLSID_WiFiDirectService]} + DEFINE_CLSID!(CLSID_WiFiDirectService = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,46,83,101,114,118,105,99,101,115,46,87,105,70,105,68,105,114,101,99,116,83,101,114,118,105,99,101,0]); + DEFINE_IID!(IID_IWiFiDirectService, 1353366456, 24433, 17900, 132, 241, 161, 228, 252, 120, 121, 163); + RT_INTERFACE!{interface IWiFiDirectService(IWiFiDirectServiceVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectService] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_RemoteServiceInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn get_SupportedConfigurationMethods(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_PreferGroupOwnerMode(&mut self, out: *mut bool) -> HRESULT, + fn put_PreferGroupOwnerMode(&mut self, value: bool) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_SessionInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_SessionInfo(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn get_ServiceError(&mut self, out: *mut WiFiDirectServiceError) -> HRESULT, + fn add_SessionDeferred(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SessionDeferred(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn GetProvisioningInfoAsync(&mut self, selectedConfigurationMethod: WiFiDirectServiceConfigurationMethod, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn ConnectAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn ConnectAsyncWithPin(&mut self, pin: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IWiFiDirectService { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_remote_service_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteServiceInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_configuration_methods(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedConfigurationMethods)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_prefer_group_owner_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreferGroupOwnerMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_prefer_group_owner_mode(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreferGroupOwnerMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_session_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SessionInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_session_info(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_SessionInfo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_session_deferred(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SessionDeferred)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_session_deferred(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SessionDeferred)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_provisioning_info_async(&mut self, selectedConfigurationMethod: WiFiDirectServiceConfigurationMethod) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetProvisioningInfoAsync)(self, selectedConfigurationMethod, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_async_with_pin(&mut self, pin: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectAsyncWithPin)(self, pin.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWiFiDirectServiceSessionRequest, 2699197579, 20683, 19032, 155, 207, 228, 114, 185, 159, 186, 4); + RT_INTERFACE!{interface IWiFiDirectServiceSessionRequest(IWiFiDirectServiceSessionRequestVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceSessionRequest] { + fn get_DeviceInformation(&mut self, out: *mut *mut super::super::enumeration::DeviceInformation) -> HRESULT, + fn get_ProvisioningInfo(&mut self, out: *mut *mut WiFiDirectServiceProvisioningInfo) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_SessionInfo(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl IWiFiDirectServiceSessionRequest { + #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_provisioning_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProvisioningInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_session_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SessionInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWiFiDirectServiceSession, 2165580131, 58406, 18379, 134, 64, 225, 179, 88, 139, 242, 111); + RT_INTERFACE!{interface IWiFiDirectServiceSession(IWiFiDirectServiceSessionVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceSession] { + fn get_ServiceName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Status(&mut self, out: *mut WiFiDirectServiceSessionStatus) -> HRESULT, + fn get_ErrorStatus(&mut self, out: *mut WiFiDirectServiceSessionErrorStatus) -> HRESULT, + fn get_SessionId(&mut self, out: *mut u32) -> HRESULT, + fn get_AdvertisementId(&mut self, out: *mut u32) -> HRESULT, + fn get_ServiceAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SessionAddress(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.networking"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.networking")] fn GetConnectionEndpointPairs(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::networking::EndpointPair>) -> HRESULT, + fn add_SessionStatusChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SessionStatusChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(not(feature="windows.networking"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.networking")] fn AddStreamSocketListenerAsync(&mut self, value: *mut ::rt::gen::windows::networking::sockets::StreamSocketListener, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.networking"))] fn __Dummy11(&mut self) -> (), + #[cfg(feature="windows.networking")] fn AddDatagramSocketAsync(&mut self, value: *mut ::rt::gen::windows::networking::sockets::DatagramSocket, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn add_RemotePortAdded(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemotePortAdded(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IWiFiDirectServiceSession { + #[inline] pub unsafe fn get_service_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_session_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SessionId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_advertisement_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AdvertisementId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_session_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SessionAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_connection_endpoint_pairs(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConnectionEndpointPairs)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_session_status_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SessionStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_session_status_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SessionStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn add_stream_socket_listener_async(&mut self, value: &::rt::gen::windows::networking::sockets::StreamSocketListener) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddStreamSocketListenerAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn add_datagram_socket_async(&mut self, value: &::rt::gen::windows::networking::sockets::DatagramSocket) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddDatagramSocketAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_remote_port_added(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RemotePortAdded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_remote_port_added(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RemotePortAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Devices.WiFiDirect.Services +} // Windows.Devices.WiFiDirect +pub mod portable { // Windows.Devices.Portable +use ::prelude::*; + RT_STRUCT! { struct PortableDeviceContract { + + }} + RT_ENUM! { enum ServiceDeviceType: i32 { + CalendarService (ServiceDeviceType_CalendarService) = 0, ContactsService (ServiceDeviceType_ContactsService) = 1, DeviceStatusService (ServiceDeviceType_DeviceStatusService) = 2, NotesService (ServiceDeviceType_NotesService) = 3, RingtonesService (ServiceDeviceType_RingtonesService) = 4, SmsService (ServiceDeviceType_SmsService) = 5, TasksService (ServiceDeviceType_TasksService) = 6, + }} + DEFINE_IID!(IID_IStorageDeviceStatics, 1590576366, 6947, 19922, 134, 82, 188, 22, 79, 0, 49, 40); + RT_INTERFACE!{static interface IStorageDeviceStatics(IStorageDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStorageDeviceStatics] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn FromId(&mut self, deviceId: HSTRING, out: *mut *mut super::super::storage::StorageFolder) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStorageDeviceStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn from_id(&mut self, deviceId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromId)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IServiceDeviceStatics, 2827097313, 22983, 18976, 171, 166, 159, 103, 7, 147, 114, 48); + RT_INTERFACE!{static interface IServiceDeviceStatics(IServiceDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IServiceDeviceStatics] { + fn GetDeviceSelector(&mut self, serviceType: ServiceDeviceType, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromServiceId(&mut self, serviceId: Guid, out: *mut HSTRING) -> HRESULT + }} + impl IServiceDeviceStatics { + #[inline] pub unsafe fn get_device_selector(&mut self, serviceType: ServiceDeviceType) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, serviceType, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_service_id(&mut self, serviceId: Guid) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromServiceId)(self, serviceId, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IStorageDeviceStatics [CLSID_StorageDevice]} + DEFINE_CLSID!(CLSID_StorageDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,114,116,97,98,108,101,46,83,116,111,114,97,103,101,68,101,118,105,99,101,0]); + RT_ACTIVATABLE!{IServiceDeviceStatics [CLSID_ServiceDevice]} + DEFINE_CLSID!(CLSID_ServiceDevice = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,80,111,114,116,97,98,108,101,46,83,101,114,118,105,99,101,68,101,118,105,99,101,0]); +} // Windows.Devices.Portable +pub mod scanners { // Windows.Devices.Scanners +use ::prelude::*; + RT_STRUCT! { struct ScannerDeviceContract { + + }} + RT_ENUM! { enum ImageScannerFormat: i32 { + Jpeg (ImageScannerFormat_Jpeg) = 0, Png (ImageScannerFormat_Png) = 1, DeviceIndependentBitmap (ImageScannerFormat_DeviceIndependentBitmap) = 2, Tiff (ImageScannerFormat_Tiff) = 3, Xps (ImageScannerFormat_Xps) = 4, OpenXps (ImageScannerFormat_OpenXps) = 5, Pdf (ImageScannerFormat_Pdf) = 6, + }} + DEFINE_IID!(IID_IImageScannerFormatConfiguration, 2921815313, 56031, 16400, 191, 16, 204, 165, 200, 61, 203, 176); + RT_INTERFACE!{interface IImageScannerFormatConfiguration(IImageScannerFormatConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerFormatConfiguration] { + fn get_DefaultFormat(&mut self, out: *mut ImageScannerFormat) -> HRESULT, + fn get_Format(&mut self, out: *mut ImageScannerFormat) -> HRESULT, + fn put_Format(&mut self, value: ImageScannerFormat) -> HRESULT, + fn IsFormatSupported(&mut self, value: ImageScannerFormat, out: *mut bool) -> HRESULT + }} + impl IImageScannerFormatConfiguration { + #[inline] pub unsafe fn get_default_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DefaultFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Format)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_format(&mut self, value: ImageScannerFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_Format)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn is_format_supported(&mut self, value: ImageScannerFormat) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsFormatSupported)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class ImageScannerAutoConfiguration: IImageScannerFormatConfiguration} + RT_ENUM! { enum ImageScannerAutoCroppingMode: i32 { + Disabled (ImageScannerAutoCroppingMode_Disabled) = 0, SingleRegion (ImageScannerAutoCroppingMode_SingleRegion) = 1, MultipleRegion (ImageScannerAutoCroppingMode_MultipleRegion) = 2, + }} + RT_ENUM! { enum ImageScannerColorMode: i32 { + Color (ImageScannerColorMode_Color) = 0, Grayscale (ImageScannerColorMode_Grayscale) = 1, Monochrome (ImageScannerColorMode_Monochrome) = 2, AutoColor (ImageScannerColorMode_AutoColor) = 3, + }} + RT_STRUCT! { struct ImageScannerResolution { + DpiX: f32, DpiY: f32, + }} + DEFINE_IID!(IID_IImageScannerSourceConfiguration, 3216310357, 2884, 19586, 158, 137, 32, 95, 156, 35, 78, 89); + RT_INTERFACE!{interface IImageScannerSourceConfiguration(IImageScannerSourceConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerSourceConfiguration] { + fn get_MinScanArea(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_MaxScanArea(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_SelectedScanRegion(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn put_SelectedScanRegion(&mut self, value: super::super::foundation::Rect) -> HRESULT, + fn get_AutoCroppingMode(&mut self, out: *mut ImageScannerAutoCroppingMode) -> HRESULT, + fn put_AutoCroppingMode(&mut self, value: ImageScannerAutoCroppingMode) -> HRESULT, + fn IsAutoCroppingModeSupported(&mut self, value: ImageScannerAutoCroppingMode, out: *mut bool) -> HRESULT, + fn get_MinResolution(&mut self, out: *mut ImageScannerResolution) -> HRESULT, + fn get_MaxResolution(&mut self, out: *mut ImageScannerResolution) -> HRESULT, + fn get_OpticalResolution(&mut self, out: *mut ImageScannerResolution) -> HRESULT, + fn get_DesiredResolution(&mut self, out: *mut ImageScannerResolution) -> HRESULT, + fn put_DesiredResolution(&mut self, value: ImageScannerResolution) -> HRESULT, + fn get_ActualResolution(&mut self, out: *mut ImageScannerResolution) -> HRESULT, + fn get_DefaultColorMode(&mut self, out: *mut ImageScannerColorMode) -> HRESULT, + fn get_ColorMode(&mut self, out: *mut ImageScannerColorMode) -> HRESULT, + fn put_ColorMode(&mut self, value: ImageScannerColorMode) -> HRESULT, + fn IsColorModeSupported(&mut self, value: ImageScannerColorMode, out: *mut bool) -> HRESULT, + fn get_MinBrightness(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxBrightness(&mut self, out: *mut i32) -> HRESULT, + fn get_BrightnessStep(&mut self, out: *mut u32) -> HRESULT, + fn get_DefaultBrightness(&mut self, out: *mut i32) -> HRESULT, + fn get_Brightness(&mut self, out: *mut i32) -> HRESULT, + fn put_Brightness(&mut self, value: i32) -> HRESULT, + fn get_MinContrast(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxContrast(&mut self, out: *mut i32) -> HRESULT, + fn get_ContrastStep(&mut self, out: *mut u32) -> HRESULT, + fn get_DefaultContrast(&mut self, out: *mut i32) -> HRESULT, + fn get_Contrast(&mut self, out: *mut i32) -> HRESULT, + fn put_Contrast(&mut self, value: i32) -> HRESULT + }} + impl IImageScannerSourceConfiguration { + #[inline] pub unsafe fn get_min_scan_area(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinScanArea)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_scan_area(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxScanArea)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_scan_region(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedScanRegion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_selected_scan_region(&mut self, value: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectedScanRegion)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_cropping_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoCroppingMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_cropping_mode(&mut self, value: ImageScannerAutoCroppingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoCroppingMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn is_auto_cropping_mode_supported(&mut self, value: ImageScannerAutoCroppingMode) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsAutoCroppingModeSupported)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_resolution(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinResolution)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_resolution(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxResolution)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_optical_resolution(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OpticalResolution)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_resolution(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredResolution)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_resolution(&mut self, value: ImageScannerResolution) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredResolution)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_actual_resolution(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActualResolution)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_color_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DefaultColorMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_color_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ColorMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_color_mode(&mut self, value: ImageScannerColorMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ColorMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn is_color_mode_supported(&mut self, value: ImageScannerColorMode) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsColorModeSupported)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_brightness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinBrightness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_brightness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxBrightness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_brightness_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BrightnessStep)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_brightness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DefaultBrightness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_brightness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Brightness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_brightness(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Brightness)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_contrast(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinContrast)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_contrast(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxContrast)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_contrast_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ContrastStep)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_contrast(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DefaultContrast)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_contrast(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Contrast)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_contrast(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Contrast)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ImageScannerFlatbedConfiguration: IImageScannerFormatConfiguration} + DEFINE_IID!(IID_IImageScannerFeederConfiguration, 1958587630, 64151, 19479, 130, 128, 64, 227, 156, 109, 204, 103); + RT_INTERFACE!{interface IImageScannerFeederConfiguration(IImageScannerFeederConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerFeederConfiguration] { + fn get_CanAutoDetectPageSize(&mut self, out: *mut bool) -> HRESULT, + fn get_AutoDetectPageSize(&mut self, out: *mut bool) -> HRESULT, + fn put_AutoDetectPageSize(&mut self, value: bool) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_PageSize(&mut self, out: *mut super::super::graphics::printing::PrintMediaSize) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn put_PageSize(&mut self, value: super::super::graphics::printing::PrintMediaSize) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_PageOrientation(&mut self, out: *mut super::super::graphics::printing::PrintOrientation) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn put_PageOrientation(&mut self, value: super::super::graphics::printing::PrintOrientation) -> HRESULT, + fn get_PageSizeDimensions(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn IsPageSizeSupported(&mut self, pageSize: super::super::graphics::printing::PrintMediaSize, pageOrientation: super::super::graphics::printing::PrintOrientation, out: *mut bool) -> HRESULT, + fn get_MaxNumberOfPages(&mut self, out: *mut u32) -> HRESULT, + fn put_MaxNumberOfPages(&mut self, value: u32) -> HRESULT, + fn get_CanScanDuplex(&mut self, out: *mut bool) -> HRESULT, + fn get_Duplex(&mut self, out: *mut bool) -> HRESULT, + fn put_Duplex(&mut self, value: bool) -> HRESULT, + fn get_CanScanAhead(&mut self, out: *mut bool) -> HRESULT, + fn get_ScanAhead(&mut self, out: *mut bool) -> HRESULT, + fn put_ScanAhead(&mut self, value: bool) -> HRESULT + }} + impl IImageScannerFeederConfiguration { + #[inline] pub unsafe fn get_can_auto_detect_page_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanAutoDetectPageSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_detect_page_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoDetectPageSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_detect_page_size(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoDetectPageSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_page_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PageSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_page_size(&mut self, value: super::super::graphics::printing::PrintMediaSize) -> Result<()> { + let hr = ((*self.lpVtbl).put_PageSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_page_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PageOrientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_page_orientation(&mut self, value: super::super::graphics::printing::PrintOrientation) -> Result<()> { + let hr = ((*self.lpVtbl).put_PageOrientation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_page_size_dimensions(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PageSizeDimensions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn is_page_size_supported(&mut self, pageSize: super::super::graphics::printing::PrintMediaSize, pageOrientation: super::super::graphics::printing::PrintOrientation) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsPageSizeSupported)(self, pageSize, pageOrientation, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_number_of_pages(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxNumberOfPages)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_number_of_pages(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxNumberOfPages)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_scan_duplex(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanScanDuplex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_duplex(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duplex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_duplex(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Duplex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_scan_ahead(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanScanAhead)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scan_ahead(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScanAhead)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scan_ahead(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ScanAhead)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ImageScannerFeederConfiguration: IImageScannerFormatConfiguration} + DEFINE_IID!(IID_IImageScannerScanResult, 3373671629, 36919, 20040, 132, 193, 172, 9, 117, 7, 107, 197); + RT_INTERFACE!{interface IImageScannerScanResult(IImageScannerScanResultVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerScanResult] { + #[cfg(feature="windows.storage")] fn get_ScannedFiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IImageScannerScanResult { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_scanned_files(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ScannedFiles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ImageScannerScanResult: IImageScannerScanResult} + DEFINE_IID!(IID_IImageScannerPreviewResult, 146275982, 34961, 17437, 190, 156, 23, 111, 161, 9, 200, 187); + RT_INTERFACE!{interface IImageScannerPreviewResult(IImageScannerPreviewResultVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerPreviewResult] { + fn get_Succeeded(&mut self, out: *mut bool) -> HRESULT, + fn get_Format(&mut self, out: *mut ImageScannerFormat) -> HRESULT + }} + impl IImageScannerPreviewResult { + #[inline] pub unsafe fn get_succeeded(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Succeeded)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Format)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class ImageScannerPreviewResult: IImageScannerPreviewResult} + RT_ENUM! { enum ImageScannerScanSource: i32 { + Default (ImageScannerScanSource_Default) = 0, Flatbed (ImageScannerScanSource_Flatbed) = 1, Feeder (ImageScannerScanSource_Feeder) = 2, AutoConfigured (ImageScannerScanSource_AutoConfigured) = 3, + }} + DEFINE_IID!(IID_IImageScanner, 1403555704, 21144, 18592, 141, 163, 128, 135, 81, 150, 101, 224); + RT_INTERFACE!{interface IImageScanner(IImageScannerVtbl): IInspectable(IInspectableVtbl) [IID_IImageScanner] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DefaultScanSource(&mut self, out: *mut ImageScannerScanSource) -> HRESULT, + fn IsScanSourceSupported(&mut self, value: ImageScannerScanSource, out: *mut bool) -> HRESULT, + fn get_FlatbedConfiguration(&mut self, out: *mut *mut ImageScannerFlatbedConfiguration) -> HRESULT, + fn get_FeederConfiguration(&mut self, out: *mut *mut ImageScannerFeederConfiguration) -> HRESULT, + fn get_AutoConfiguration(&mut self, out: *mut *mut ImageScannerAutoConfiguration) -> HRESULT, + fn IsPreviewSupported(&mut self, scanSource: ImageScannerScanSource, out: *mut bool) -> HRESULT, + #[cfg(feature="windows.storage")] fn ScanPreviewToStreamAsync(&mut self, scanSource: ImageScannerScanSource, targetStream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn ScanFilesToFolderAsync(&mut self, scanSource: ImageScannerScanSource, storageFolder: *mut super::super::storage::StorageFolder, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IImageScanner { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_scan_source(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DefaultScanSource)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_scan_source_supported(&mut self, value: ImageScannerScanSource) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsScanSourceSupported)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_flatbed_configuration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FlatbedConfiguration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_feeder_configuration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FeederConfiguration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_configuration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AutoConfiguration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_preview_supported(&mut self, scanSource: ImageScannerScanSource) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsPreviewSupported)(self, scanSource, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn scan_preview_to_stream_async(&mut self, scanSource: ImageScannerScanSource, targetStream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ScanPreviewToStreamAsync)(self, scanSource, targetStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn scan_files_to_folder_async(&mut self, scanSource: ImageScannerScanSource, storageFolder: &super::super::storage::StorageFolder) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ScanFilesToFolderAsync)(self, scanSource, storageFolder as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IImageScannerStatics, 3159877390, 55300, 17527, 159, 181, 185, 17, 181, 71, 56, 151); + RT_INTERFACE!{static interface IImageScannerStatics(IImageScannerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerStatics] { + fn FromIdAsync(&mut self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IImageScannerStatics { + #[inline] pub unsafe fn from_id_async(&mut self, deviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ImageScanner: IImageScanner} + RT_ACTIVATABLE!{IImageScannerStatics [CLSID_ImageScanner]} + DEFINE_CLSID!(CLSID_ImageScanner = &[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,99,97,110,110,101,114,115,46,73,109,97,103,101,83,99,97,110,110,101,114,0]); +} // Windows.Devices.Scanners +} // Windows.Devices +pub mod foundation { // Windows.Foundation +use ::prelude::*; + DEFINE_IID!(IID_IClosable, 819308585, 32676, 16422, 131, 187, 215, 91, 174, 78, 169, 158); + RT_INTERFACE!{interface IClosable(IClosableVtbl): IInspectable(IInspectableVtbl) [IID_IClosable] { + fn Close(&mut self) -> HRESULT + }} + impl IClosable { + #[inline] pub unsafe fn close(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Close)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum PropertyType: i32 { + Empty (PropertyType_Empty) = 0, UInt8 (PropertyType_UInt8) = 1, Int16 (PropertyType_Int16) = 2, UInt16 (PropertyType_UInt16) = 3, Int32 (PropertyType_Int32) = 4, UInt32 (PropertyType_UInt32) = 5, Int64 (PropertyType_Int64) = 6, UInt64 (PropertyType_UInt64) = 7, Single (PropertyType_Single) = 8, Double (PropertyType_Double) = 9, Char16 (PropertyType_Char16) = 10, Boolean (PropertyType_Boolean) = 11, String (PropertyType_String) = 12, Inspectable (PropertyType_Inspectable) = 13, DateTime (PropertyType_DateTime) = 14, TimeSpan (PropertyType_TimeSpan) = 15, Guid (PropertyType_Guid) = 16, Point (PropertyType_Point) = 17, Size (PropertyType_Size) = 18, Rect (PropertyType_Rect) = 19, OtherType (PropertyType_OtherType) = 20, UInt8Array (PropertyType_UInt8Array) = 1025, Int16Array (PropertyType_Int16Array) = 1026, UInt16Array (PropertyType_UInt16Array) = 1027, Int32Array (PropertyType_Int32Array) = 1028, UInt32Array (PropertyType_UInt32Array) = 1029, Int64Array (PropertyType_Int64Array) = 1030, UInt64Array (PropertyType_UInt64Array) = 1031, SingleArray (PropertyType_SingleArray) = 1032, DoubleArray (PropertyType_DoubleArray) = 1033, Char16Array (PropertyType_Char16Array) = 1034, BooleanArray (PropertyType_BooleanArray) = 1035, StringArray (PropertyType_StringArray) = 1036, InspectableArray (PropertyType_InspectableArray) = 1037, DateTimeArray (PropertyType_DateTimeArray) = 1038, TimeSpanArray (PropertyType_TimeSpanArray) = 1039, GuidArray (PropertyType_GuidArray) = 1040, PointArray (PropertyType_PointArray) = 1041, SizeArray (PropertyType_SizeArray) = 1042, RectArray (PropertyType_RectArray) = 1043, OtherTypeArray (PropertyType_OtherTypeArray) = 1044, + }} + RT_STRUCT! { struct Point { + X: f32, Y: f32, + }} + RT_STRUCT! { struct Size { + Width: f32, Height: f32, + }} + RT_STRUCT! { struct Rect { + X: f32, Y: f32, Width: f32, Height: f32, + }} + RT_STRUCT! { struct DateTime { + UniversalTime: i64, + }} + RT_STRUCT! { struct TimeSpan { + Duration: i64, + }} + DEFINE_IID!(IID_IPropertyValue, 1272349405, 30036, 16617, 154, 155, 130, 101, 78, 222, 126, 98); + RT_INTERFACE!{interface IPropertyValue(IPropertyValueVtbl): IInspectable(IInspectableVtbl) [IID_IPropertyValue] { + fn get_Type(&mut self, out: *mut PropertyType) -> HRESULT, + fn get_IsNumericScalar(&mut self, out: *mut bool) -> HRESULT, + fn GetUInt8(&mut self, out: *mut u8) -> HRESULT, + fn GetInt16(&mut self, out: *mut i16) -> HRESULT, + fn GetUInt16(&mut self, out: *mut u16) -> HRESULT, + fn GetInt32(&mut self, out: *mut i32) -> HRESULT, + fn GetUInt32(&mut self, out: *mut u32) -> HRESULT, + fn GetInt64(&mut self, out: *mut i64) -> HRESULT, + fn GetUInt64(&mut self, out: *mut u64) -> HRESULT, + fn GetSingle(&mut self, out: *mut f32) -> HRESULT, + fn GetDouble(&mut self, out: *mut f64) -> HRESULT, + fn GetChar16(&mut self, out: *mut Char) -> HRESULT, + fn GetBoolean(&mut self, out: *mut bool) -> HRESULT, + fn GetString(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetGuid(&mut self, out: *mut Guid) -> HRESULT, + fn GetDateTime(&mut self, out: *mut DateTime) -> HRESULT, + fn GetTimeSpan(&mut self, out: *mut TimeSpan) -> HRESULT, + fn GetPoint(&mut self, out: *mut Point) -> HRESULT, + fn GetSize(&mut self, out: *mut Size) -> HRESULT, + fn GetRect(&mut self, out: *mut Rect) -> HRESULT, + fn GetUInt8Array(&mut self, valueSize: *mut u32, value: *mut *mut u8) -> HRESULT, + fn GetInt16Array(&mut self, valueSize: *mut u32, value: *mut *mut i16) -> HRESULT, + fn GetUInt16Array(&mut self, valueSize: *mut u32, value: *mut *mut u16) -> HRESULT, + fn GetInt32Array(&mut self, valueSize: *mut u32, value: *mut *mut i32) -> HRESULT, + fn GetUInt32Array(&mut self, valueSize: *mut u32, value: *mut *mut u32) -> HRESULT, + fn GetInt64Array(&mut self, valueSize: *mut u32, value: *mut *mut i64) -> HRESULT, + fn GetUInt64Array(&mut self, valueSize: *mut u32, value: *mut *mut u64) -> HRESULT, + fn GetSingleArray(&mut self, valueSize: *mut u32, value: *mut *mut f32) -> HRESULT, + fn GetDoubleArray(&mut self, valueSize: *mut u32, value: *mut *mut f64) -> HRESULT, + fn GetChar16Array(&mut self, valueSize: *mut u32, value: *mut *mut Char) -> HRESULT, + fn GetBooleanArray(&mut self, valueSize: *mut u32, value: *mut *mut bool) -> HRESULT, + fn GetStringArray(&mut self, valueSize: *mut u32, value: *mut *mut HSTRING) -> HRESULT, + fn GetInspectableArray(&mut self, valueSize: *mut u32, value: *mut *mut *mut IInspectable) -> HRESULT, + fn GetGuidArray(&mut self, valueSize: *mut u32, value: *mut *mut Guid) -> HRESULT, + fn GetDateTimeArray(&mut self, valueSize: *mut u32, value: *mut *mut DateTime) -> HRESULT, + fn GetTimeSpanArray(&mut self, valueSize: *mut u32, value: *mut *mut TimeSpan) -> HRESULT, + fn GetPointArray(&mut self, valueSize: *mut u32, value: *mut *mut Point) -> HRESULT, + fn GetSizeArray(&mut self, valueSize: *mut u32, value: *mut *mut Size) -> HRESULT, + fn GetRectArray(&mut self, valueSize: *mut u32, value: *mut *mut Rect) -> HRESULT + }} + impl IPropertyValue { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_numeric_scalar(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsNumericScalar)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint8(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetUInt8)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_int16(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetInt16)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint16(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetUInt16)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_int32(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetInt32)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint32(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetUInt32)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_int64(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetInt64)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint64(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetUInt64)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_single(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetSingle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_double(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetDouble)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_char16(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetChar16)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_boolean(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetBoolean)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_guid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetGuid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_date_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetDateTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_span(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetTimeSpan)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_rect(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint8_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetUInt8Array)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_int16_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetInt16Array)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint16_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetUInt16Array)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_int32_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetInt32Array)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint32_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetUInt32Array)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_int64_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetInt64Array)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uint64_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetUInt64Array)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_single_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetSingleArray)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_double_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetDoubleArray)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_char16_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetChar16Array)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_boolean_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetBooleanArray)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_string_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetStringArray)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_inspectable_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetInspectableArray)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_guid_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetGuidArray)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_date_time_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetDateTimeArray)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_span_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetTimeSpanArray)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_point_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetPointArray)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_size_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetSizeArray)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rect_array(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetRectArray)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPropertyValueStatics, 1654381512, 55602, 20468, 150, 185, 141, 150, 197, 193, 232, 88); + RT_INTERFACE!{static interface IPropertyValueStatics(IPropertyValueStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPropertyValueStatics] { + fn CreateEmpty(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn CreateUInt8(&mut self, value: u8, out: *mut *mut IInspectable) -> HRESULT, + fn CreateInt16(&mut self, value: i16, out: *mut *mut IInspectable) -> HRESULT, + fn CreateUInt16(&mut self, value: u16, out: *mut *mut IInspectable) -> HRESULT, + fn CreateInt32(&mut self, value: i32, out: *mut *mut IInspectable) -> HRESULT, + fn CreateUInt32(&mut self, value: u32, out: *mut *mut IInspectable) -> HRESULT, + fn CreateInt64(&mut self, value: i64, out: *mut *mut IInspectable) -> HRESULT, + fn CreateUInt64(&mut self, value: u64, out: *mut *mut IInspectable) -> HRESULT, + fn CreateSingle(&mut self, value: f32, out: *mut *mut IInspectable) -> HRESULT, + fn CreateDouble(&mut self, value: f64, out: *mut *mut IInspectable) -> HRESULT, + fn CreateChar16(&mut self, value: Char, out: *mut *mut IInspectable) -> HRESULT, + fn CreateBoolean(&mut self, value: bool, out: *mut *mut IInspectable) -> HRESULT, + fn CreateString(&mut self, value: HSTRING, out: *mut *mut IInspectable) -> HRESULT, + fn CreateInspectable(&mut self, value: *mut IInspectable, out: *mut *mut IInspectable) -> HRESULT, + fn CreateGuid(&mut self, value: Guid, out: *mut *mut IInspectable) -> HRESULT, + fn CreateDateTime(&mut self, value: DateTime, out: *mut *mut IInspectable) -> HRESULT, + fn CreateTimeSpan(&mut self, value: TimeSpan, out: *mut *mut IInspectable) -> HRESULT, + fn CreatePoint(&mut self, value: Point, out: *mut *mut IInspectable) -> HRESULT, + fn CreateSize(&mut self, value: Size, out: *mut *mut IInspectable) -> HRESULT, + fn CreateRect(&mut self, value: Rect, out: *mut *mut IInspectable) -> HRESULT, + fn CreateUInt8Array(&mut self, valueSize: u32, value: *mut u8, out: *mut *mut IInspectable) -> HRESULT, + fn CreateInt16Array(&mut self, valueSize: u32, value: *mut i16, out: *mut *mut IInspectable) -> HRESULT, + fn CreateUInt16Array(&mut self, valueSize: u32, value: *mut u16, out: *mut *mut IInspectable) -> HRESULT, + fn CreateInt32Array(&mut self, valueSize: u32, value: *mut i32, out: *mut *mut IInspectable) -> HRESULT, + fn CreateUInt32Array(&mut self, valueSize: u32, value: *mut u32, out: *mut *mut IInspectable) -> HRESULT, + fn CreateInt64Array(&mut self, valueSize: u32, value: *mut i64, out: *mut *mut IInspectable) -> HRESULT, + fn CreateUInt64Array(&mut self, valueSize: u32, value: *mut u64, out: *mut *mut IInspectable) -> HRESULT, + fn CreateSingleArray(&mut self, valueSize: u32, value: *mut f32, out: *mut *mut IInspectable) -> HRESULT, + fn CreateDoubleArray(&mut self, valueSize: u32, value: *mut f64, out: *mut *mut IInspectable) -> HRESULT, + fn CreateChar16Array(&mut self, valueSize: u32, value: *mut Char, out: *mut *mut IInspectable) -> HRESULT, + fn CreateBooleanArray(&mut self, valueSize: u32, value: *mut bool, out: *mut *mut IInspectable) -> HRESULT, + fn CreateStringArray(&mut self, valueSize: u32, value: *mut HSTRING, out: *mut *mut IInspectable) -> HRESULT, + fn CreateInspectableArray(&mut self, valueSize: u32, value: *mut *mut IInspectable, out: *mut *mut IInspectable) -> HRESULT, + fn CreateGuidArray(&mut self, valueSize: u32, value: *mut Guid, out: *mut *mut IInspectable) -> HRESULT, + fn CreateDateTimeArray(&mut self, valueSize: u32, value: *mut DateTime, out: *mut *mut IInspectable) -> HRESULT, + fn CreateTimeSpanArray(&mut self, valueSize: u32, value: *mut TimeSpan, out: *mut *mut IInspectable) -> HRESULT, + fn CreatePointArray(&mut self, valueSize: u32, value: *mut Point, out: *mut *mut IInspectable) -> HRESULT, + fn CreateSizeArray(&mut self, valueSize: u32, value: *mut Size, out: *mut *mut IInspectable) -> HRESULT, + fn CreateRectArray(&mut self, valueSize: u32, value: *mut Rect, out: *mut *mut IInspectable) -> HRESULT + }} + impl IPropertyValueStatics { + #[inline] pub unsafe fn create_empty(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateEmpty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_uint8(&mut self, value: u8) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUInt8)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_int16(&mut self, value: i16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInt16)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_uint16(&mut self, value: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUInt16)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_int32(&mut self, value: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInt32)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_uint32(&mut self, value: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUInt32)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_int64(&mut self, value: i64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInt64)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_uint64(&mut self, value: u64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUInt64)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_single(&mut self, value: f32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSingle)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_double(&mut self, value: f64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDouble)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_char16(&mut self, value: Char) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateChar16)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_boolean(&mut self, value: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBoolean)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_string(&mut self, value: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateString)(self, value.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_inspectable(&mut self, value: &IInspectable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInspectable)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_guid(&mut self, value: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateGuid)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_date_time(&mut self, value: DateTime) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDateTime)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_time_span(&mut self, value: TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTimeSpan)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_point(&mut self, value: Point) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePoint)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_size(&mut self, value: Size) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSize)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_rect(&mut self, value: Rect) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateRect)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_uint8_array(&mut self, value: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUInt8Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_int16_array(&mut self, value: &[i16]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInt16Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_uint16_array(&mut self, value: &[u16]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUInt16Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_int32_array(&mut self, value: &[i32]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInt32Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_uint32_array(&mut self, value: &[u32]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUInt32Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_int64_array(&mut self, value: &[i64]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInt64Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_uint64_array(&mut self, value: &[u64]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUInt64Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_single_array(&mut self, value: &[f32]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSingleArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_double_array(&mut self, value: &[f64]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDoubleArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_char16_array(&mut self, value: &[Char]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateChar16Array)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_boolean_array(&mut self, value: &[bool]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBooleanArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_string_array(&mut self, value: &[&HStringArg]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStringArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_inspectable_array(&mut self, value: &[&IInspectable]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInspectableArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_guid_array(&mut self, value: &[Guid]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateGuidArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_date_time_array(&mut self, value: &[DateTime]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDateTimeArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_time_span_array(&mut self, value: &[TimeSpan]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTimeSpanArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_point_array(&mut self, value: &[Point]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePointArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_size_array(&mut self, value: &[Size]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSizeArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_rect_array(&mut self, value: &[Rect]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateRectArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPropertyValueStatics [CLSID_PropertyValue]} + DEFINE_CLSID!(CLSID_PropertyValue = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,80,114,111,112,101,114,116,121,86,97,108,117,101,0]); + DEFINE_IID!(IID_IStringable, 2520162132, 36534, 18672, 171, 206, 193, 178, 17, 230, 39, 195); + RT_INTERFACE!{interface IStringable(IStringableVtbl): IInspectable(IInspectableVtbl) [IID_IStringable] { + fn ToString(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStringable { + #[inline] pub unsafe fn to_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ToString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_AsyncActionCompletedHandler, 2767019137, 30409, 16573, 139, 230, 177, 217, 15, 178, 10, 231); + RT_DELEGATE!{delegate AsyncActionCompletedHandler(AsyncActionCompletedHandlerVtbl, AsyncActionCompletedHandlerImpl) [IID_AsyncActionCompletedHandler] { + fn Invoke(&mut self, asyncInfo: *mut IAsyncAction, asyncStatus: AsyncStatus) -> HRESULT + }} + impl AsyncActionCompletedHandler { + #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncAction, asyncStatus: AsyncStatus) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, asyncStatus); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDeferral, 3592853298, 15231, 18087, 180, 11, 79, 220, 162, 162, 198, 147); + RT_INTERFACE!{interface IDeferral(IDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_DeferralCompletedHandler, 3979518834, 62408, 20394, 156, 251, 71, 1, 72, 218, 56, 136); + RT_DELEGATE!{delegate DeferralCompletedHandler(DeferralCompletedHandlerVtbl, DeferralCompletedHandlerImpl) [IID_DeferralCompletedHandler] { + fn Invoke(&mut self) -> HRESULT + }} + impl DeferralCompletedHandler { + #[inline] pub unsafe fn invoke(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDeferralFactory, 1705110725, 16309, 18482, 140, 169, 240, 97, 178, 129, 209, 58); + RT_INTERFACE!{static interface IDeferralFactory(IDeferralFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDeferralFactory] { + fn Create(&mut self, handler: *mut DeferralCompletedHandler, out: *mut *mut Deferral) -> HRESULT + }} + impl IDeferralFactory { + #[inline] pub unsafe fn create(&mut self, handler: &DeferralCompletedHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Deferral: IDeferral [IDeferralFactory] [CLSID_Deferral]} + DEFINE_CLSID!(CLSID_Deferral = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,68,101,102,101,114,114,97,108,0]); + RT_ENUM! { enum AsyncStatus: i32 { + Canceled (AsyncStatus_Canceled) = 2, Completed (AsyncStatus_Completed) = 1, Error (AsyncStatus_Error) = 3, Started (AsyncStatus_Started) = 0, + }} + RT_STRUCT! { struct EventRegistrationToken { + Value: i64, + }} + RT_STRUCT! { struct HResult { + Value: i32, + }} + DEFINE_IID!(IID_IAsyncInfo, 54, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70); + RT_INTERFACE!{interface IAsyncInfo(IAsyncInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncInfo] { + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_Status(&mut self, out: *mut AsyncStatus) -> HRESULT, + fn get_ErrorCode(&mut self, out: *mut HResult) -> HRESULT, + fn Cancel(&mut self) -> HRESULT, + fn Close(&mut self) -> HRESULT + }} + impl IAsyncInfo { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn cancel(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Cancel)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn close(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Close)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAsyncAction, 1516535814, 33850, 19881, 134, 91, 157, 38, 229, 223, 173, 123); + RT_INTERFACE!{interface IAsyncAction(IAsyncActionVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncAction] { + fn put_Completed(&mut self, handler: *mut AsyncActionCompletedHandler) -> HRESULT, + fn get_Completed(&mut self, out: *mut *mut AsyncActionCompletedHandler) -> HRESULT, + fn GetResults(&mut self) -> HRESULT + }} + impl IAsyncAction { + #[inline] pub unsafe fn set_completed(&mut self, handler: &AsyncActionCompletedHandler) -> Result<()> { + let hr = ((*self.lpVtbl).put_Completed)(self, handler as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_completed(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Completed)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_results(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).GetResults)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_AsyncOperationWithProgressCompletedHandler, 3898471453, 27303, 18147, 168, 226, 240, 9, 216, 64, 198, 39); + RT_DELEGATE!{delegate AsyncOperationWithProgressCompletedHandler(AsyncOperationWithProgressCompletedHandlerVtbl, AsyncOperationWithProgressCompletedHandlerImpl) [IID_AsyncOperationWithProgressCompletedHandler] { + fn Invoke(&mut self, asyncInfo: *mut IAsyncOperationWithProgress, asyncStatus: AsyncStatus) -> HRESULT + }} + impl AsyncOperationWithProgressCompletedHandler { + #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncOperationWithProgress, asyncStatus: AsyncStatus) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, asyncStatus); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAsyncOperationWithProgress, 3050321623, 58007, 18831, 186, 96, 2, 137, 231, 110, 35, 221); + RT_INTERFACE!{interface IAsyncOperationWithProgress(IAsyncOperationWithProgressVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncOperationWithProgress] { + fn put_Progress(&mut self, handler: *mut AsyncOperationProgressHandler) -> HRESULT, + fn get_Progress(&mut self, out: *mut *mut AsyncOperationProgressHandler) -> HRESULT, + fn put_Completed(&mut self, handler: *mut AsyncOperationWithProgressCompletedHandler) -> HRESULT, + fn get_Completed(&mut self, out: *mut *mut AsyncOperationWithProgressCompletedHandler) -> HRESULT, + fn GetResults(&mut self, out: *mut TResult::Abi) -> HRESULT + }} + impl IAsyncOperationWithProgress { + #[inline] pub unsafe fn set_progress(&mut self, handler: &AsyncOperationProgressHandler) -> Result<()> { + let hr = ((*self.lpVtbl).put_Progress)(self, handler as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_progress(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_completed(&mut self, handler: &AsyncOperationWithProgressCompletedHandler) -> Result<()> { + let hr = ((*self.lpVtbl).put_Completed)(self, handler as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_completed(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Completed)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_results(&mut self) -> Result { + let mut out = TResult::uninitialized(); + let hr = ((*self.lpVtbl).GetResults)(self, &mut out); + if hr == S_OK { Ok(TResult::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_AsyncOperationCompletedHandler, 4242337836, 58840, 17528, 145, 90, 77, 144, 183, 75, 131, 165); + RT_DELEGATE!{delegate AsyncOperationCompletedHandler(AsyncOperationCompletedHandlerVtbl, AsyncOperationCompletedHandlerImpl) [IID_AsyncOperationCompletedHandler] { + fn Invoke(&mut self, asyncInfo: *mut IAsyncOperation, asyncStatus: AsyncStatus) -> HRESULT + }} + impl AsyncOperationCompletedHandler { + #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncOperation, asyncStatus: AsyncStatus) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, asyncStatus); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAsyncOperation, 2680336571, 58438, 17634, 170, 97, 156, 171, 143, 99, 106, 242); + RT_INTERFACE!{interface IAsyncOperation(IAsyncOperationVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncOperation] { + fn put_Completed(&mut self, handler: *mut AsyncOperationCompletedHandler) -> HRESULT, + fn get_Completed(&mut self, out: *mut *mut AsyncOperationCompletedHandler) -> HRESULT, + fn GetResults(&mut self, out: *mut TResult::Abi) -> HRESULT + }} + impl IAsyncOperation { + #[inline] pub unsafe fn set_completed(&mut self, handler: &AsyncOperationCompletedHandler) -> Result<()> { + let hr = ((*self.lpVtbl).put_Completed)(self, handler as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_completed(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Completed)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_results(&mut self) -> Result { + let mut out = TResult::uninitialized(); + let hr = ((*self.lpVtbl).GetResults)(self, &mut out); + if hr == S_OK { Ok(TResult::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_AsyncActionWithProgressCompletedHandler, 2617417617, 52356, 17661, 172, 38, 10, 108, 78, 85, 82, 129); + RT_DELEGATE!{delegate AsyncActionWithProgressCompletedHandler(AsyncActionWithProgressCompletedHandlerVtbl, AsyncActionWithProgressCompletedHandlerImpl) [IID_AsyncActionWithProgressCompletedHandler] { + fn Invoke(&mut self, asyncInfo: *mut IAsyncActionWithProgress, asyncStatus: AsyncStatus) -> HRESULT + }} + impl AsyncActionWithProgressCompletedHandler { + #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncActionWithProgress, asyncStatus: AsyncStatus) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, asyncStatus); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAsyncActionWithProgress, 527282776, 59395, 18593, 149, 70, 235, 115, 83, 57, 136, 132); + RT_INTERFACE!{interface IAsyncActionWithProgress(IAsyncActionWithProgressVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncActionWithProgress] { + fn put_Progress(&mut self, handler: *mut AsyncActionProgressHandler) -> HRESULT, + fn get_Progress(&mut self, out: *mut *mut AsyncActionProgressHandler) -> HRESULT, + fn put_Completed(&mut self, handler: *mut AsyncActionWithProgressCompletedHandler) -> HRESULT, + fn get_Completed(&mut self, out: *mut *mut AsyncActionWithProgressCompletedHandler) -> HRESULT, + fn GetResults(&mut self) -> HRESULT + }} + impl IAsyncActionWithProgress { + #[inline] pub unsafe fn set_progress(&mut self, handler: &AsyncActionProgressHandler) -> Result<()> { + let hr = ((*self.lpVtbl).put_Progress)(self, handler as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_progress(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_completed(&mut self, handler: &AsyncActionWithProgressCompletedHandler) -> Result<()> { + let hr = ((*self.lpVtbl).put_Completed)(self, handler as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_completed(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Completed)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_results(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).GetResults)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_AsyncOperationProgressHandler, 1432946946, 2731, 16922, 135, 120, 248, 206, 80, 38, 215, 88); + RT_DELEGATE!{delegate AsyncOperationProgressHandler(AsyncOperationProgressHandlerVtbl, AsyncOperationProgressHandlerImpl) [IID_AsyncOperationProgressHandler] { + fn Invoke(&mut self, asyncInfo: *mut IAsyncOperationWithProgress, progressInfo: TProgress::Abi) -> HRESULT + }} + impl AsyncOperationProgressHandler { + #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncOperationWithProgress, progressInfo: &TProgress::In) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, TProgress::unwrap(progressInfo)); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_AsyncActionProgressHandler, 1837385816, 3327, 17808, 174, 137, 149, 165, 165, 200, 180, 184); + RT_DELEGATE!{delegate AsyncActionProgressHandler(AsyncActionProgressHandlerVtbl, AsyncActionProgressHandlerImpl) [IID_AsyncActionProgressHandler] { + fn Invoke(&mut self, asyncInfo: *mut IAsyncActionWithProgress, progressInfo: TProgress::Abi) -> HRESULT + }} + impl AsyncActionProgressHandler { + #[inline] pub unsafe fn invoke(&mut self, asyncInfo: &IAsyncActionWithProgress, progressInfo: &TProgress::In) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, asyncInfo as *const _ as *mut _, TProgress::unwrap(progressInfo)); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IReference, 1640068870, 11621, 4576, 154, 232, 212, 133, 100, 1, 84, 114); + RT_INTERFACE!{interface IReference(IReferenceVtbl): IInspectable(IInspectableVtbl) [IID_IReference] { + fn get_Value(&mut self, out: *mut T::Abi) -> HRESULT + }} + impl IReference { + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = T::uninitialized(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(T::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IReferenceArray, 1640068871, 11621, 4576, 154, 232, 212, 133, 100, 1, 84, 114); + RT_INTERFACE!{interface IReferenceArray(IReferenceArrayVtbl): IInspectable(IInspectableVtbl) [IID_IReferenceArray] { + fn get_Value(&mut self, outSize: *mut u32, out: *mut *mut T::Abi) -> HRESULT + }} + impl IReferenceArray { + #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_TypedEventHandler, 2648818996, 27361, 4576, 132, 225, 24, 169, 5, 188, 197, 63); + RT_DELEGATE!{delegate TypedEventHandler(TypedEventHandlerVtbl, TypedEventHandlerImpl) [IID_TypedEventHandler] { + fn Invoke(&mut self, sender: TSender::Abi, args: TResult::Abi) -> HRESULT + }} + impl TypedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &TSender::In, args: &TResult::In) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, TSender::unwrap(sender), TResult::unwrap(args)); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_EventHandler, 2648818997, 27361, 4576, 132, 225, 24, 169, 5, 188, 197, 63); + RT_DELEGATE!{delegate EventHandler(EventHandlerVtbl, EventHandlerImpl) [IID_EventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, args: T::Abi) -> HRESULT + }} + impl EventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, args: &T::In) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, T::unwrap(args)); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_STRUCT! { struct FoundationContract { + + }} + DEFINE_IID!(IID_IUriRuntimeClass, 2654363223, 18610, 16736, 149, 111, 199, 56, 81, 32, 187, 252); + RT_INTERFACE!{interface IUriRuntimeClass(IUriRuntimeClassVtbl): IInspectable(IInspectableVtbl) [IID_IUriRuntimeClass] { + fn get_AbsoluteUri(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayUri(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Domain(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Extension(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Fragment(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Host(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Password(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Path(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Query(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_QueryParsed(&mut self, out: *mut *mut WwwFormUrlDecoder) -> HRESULT, + fn get_RawUri(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SchemeName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UserName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Port(&mut self, out: *mut i32) -> HRESULT, + fn get_Suspicious(&mut self, out: *mut bool) -> HRESULT, + fn Equals(&mut self, pUri: *mut Uri, out: *mut bool) -> HRESULT, + fn CombineUri(&mut self, relativeUri: HSTRING, out: *mut *mut Uri) -> HRESULT + }} + impl IUriRuntimeClass { + #[inline] pub unsafe fn get_absolute_uri(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AbsoluteUri)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_uri(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayUri)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Domain)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extension(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Extension)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_fragment(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Fragment)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_host(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Host)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_password(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Password)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_path(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Path)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_query(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Query)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_query_parsed(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_QueryParsed)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_raw_uri(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RawUri)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_scheme_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SchemeName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_port(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Port)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_suspicious(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Suspicious)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn equals(&mut self, pUri: &Uri) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Equals)(self, pUri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn combine_uri(&mut self, relativeUri: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CombineUri)(self, relativeUri.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WwwFormUrlDecoder: IWwwFormUrlDecoderRuntimeClass [IWwwFormUrlDecoderRuntimeClassFactory] [CLSID_WwwFormUrlDecoder]} + DEFINE_CLSID!(CLSID_WwwFormUrlDecoder = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,87,119,119,70,111,114,109,85,114,108,68,101,99,111,100,101,114,0]); + RT_CLASS!{class Uri: IUriRuntimeClass [IUriRuntimeClassFactory] [CLSID_Uri]} + RT_ACTIVATABLE!{IUriEscapeStatics [CLSID_Uri]} + DEFINE_CLSID!(CLSID_Uri = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,85,114,105,0]); + DEFINE_IID!(IID_IUriRuntimeClassWithAbsoluteCanonicalUri, 1972213345, 8732, 18447, 163, 57, 80, 101, 102, 115, 244, 111); + RT_INTERFACE!{interface IUriRuntimeClassWithAbsoluteCanonicalUri(IUriRuntimeClassWithAbsoluteCanonicalUriVtbl): IInspectable(IInspectableVtbl) [IID_IUriRuntimeClassWithAbsoluteCanonicalUri] { + fn get_AbsoluteCanonicalUri(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayIri(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IUriRuntimeClassWithAbsoluteCanonicalUri { + #[inline] pub unsafe fn get_absolute_canonical_uri(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AbsoluteCanonicalUri)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_iri(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayIri)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUriEscapeStatics, 3251909306, 51236, 17490, 167, 253, 81, 43, 195, 187, 233, 161); + RT_INTERFACE!{static interface IUriEscapeStatics(IUriEscapeStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUriEscapeStatics] { + fn UnescapeComponent(&mut self, toUnescape: HSTRING, out: *mut HSTRING) -> HRESULT, + fn EscapeComponent(&mut self, toEscape: HSTRING, out: *mut HSTRING) -> HRESULT + }} + impl IUriEscapeStatics { + #[inline] pub unsafe fn unescape_component(&mut self, toUnescape: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnescapeComponent)(self, toUnescape.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn escape_component(&mut self, toEscape: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EscapeComponent)(self, toEscape.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUriRuntimeClassFactory, 1151957359, 29246, 20447, 162, 24, 3, 62, 117, 176, 192, 132); + RT_INTERFACE!{static interface IUriRuntimeClassFactory(IUriRuntimeClassFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IUriRuntimeClassFactory] { + fn CreateUri(&mut self, uri: HSTRING, out: *mut *mut Uri) -> HRESULT, + fn CreateWithRelativeUri(&mut self, baseUri: HSTRING, relativeUri: HSTRING, out: *mut *mut Uri) -> HRESULT + }} + impl IUriRuntimeClassFactory { + #[inline] pub unsafe fn create_uri(&mut self, uri: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUri)(self, uri.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_relative_uri(&mut self, baseUri: &HStringArg, relativeUri: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithRelativeUri)(self, baseUri.get(), relativeUri.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWwwFormUrlDecoderEntry, 308180017, 63096, 20110, 182, 112, 32, 169, 176, 108, 81, 45); + RT_INTERFACE!{interface IWwwFormUrlDecoderEntry(IWwwFormUrlDecoderEntryVtbl): IInspectable(IInspectableVtbl) [IID_IWwwFormUrlDecoderEntry] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Value(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IWwwFormUrlDecoderEntry { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWwwFormUrlDecoderRuntimeClass, 3562669137, 61989, 17730, 146, 150, 14, 29, 245, 210, 84, 223); + RT_INTERFACE!{interface IWwwFormUrlDecoderRuntimeClass(IWwwFormUrlDecoderRuntimeClassVtbl): IInspectable(IInspectableVtbl) [IID_IWwwFormUrlDecoderRuntimeClass] { + fn GetFirstValueByName(&mut self, name: HSTRING, out: *mut HSTRING) -> HRESULT + }} + impl IWwwFormUrlDecoderRuntimeClass { + #[inline] pub unsafe fn get_first_value_by_name(&mut self, name: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFirstValueByName)(self, name.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWwwFormUrlDecoderRuntimeClassFactory, 1535929149, 9390, 16821, 161, 191, 240, 195, 213, 68, 132, 91); + RT_INTERFACE!{static interface IWwwFormUrlDecoderRuntimeClassFactory(IWwwFormUrlDecoderRuntimeClassFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWwwFormUrlDecoderRuntimeClassFactory] { + fn CreateWwwFormUrlDecoder(&mut self, query: HSTRING, out: *mut *mut WwwFormUrlDecoder) -> HRESULT + }} + impl IWwwFormUrlDecoderRuntimeClassFactory { + #[inline] pub unsafe fn create_www_form_url_decoder(&mut self, query: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWwwFormUrlDecoder)(self, query.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WwwFormUrlDecoderEntry: IWwwFormUrlDecoderEntry} + DEFINE_IID!(IID_IGetActivationFactory, 1323011810, 38621, 18855, 148, 247, 70, 7, 221, 171, 142, 60); + RT_INTERFACE!{interface IGetActivationFactory(IGetActivationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGetActivationFactory] { + fn GetActivationFactory(&mut self, activatableClassId: HSTRING, out: *mut *mut IInspectable) -> HRESULT + }} + impl IGetActivationFactory { + #[inline] pub unsafe fn get_activation_factory(&mut self, activatableClassId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetActivationFactory)(self, activatableClassId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMemoryBufferReference, 4223982889, 9307, 4580, 175, 152, 104, 148, 35, 38, 12, 248); + RT_INTERFACE!{interface IMemoryBufferReference(IMemoryBufferReferenceVtbl): IInspectable(IInspectableVtbl) [IID_IMemoryBufferReference] { + fn get_Capacity(&mut self, out: *mut u32) -> HRESULT, + fn add_Closed(&mut self, handler: *mut TypedEventHandler, out: *mut EventRegistrationToken) -> HRESULT, + fn remove_Closed(&mut self, cookie: EventRegistrationToken) -> HRESULT + }} + impl IMemoryBufferReference { + #[inline] pub unsafe fn get_capacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Capacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_closed(&mut self, handler: &TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Closed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closed(&mut self, cookie: EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Closed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMemoryBuffer, 4223982890, 9307, 4580, 175, 152, 104, 148, 35, 38, 12, 248); + RT_INTERFACE!{interface IMemoryBuffer(IMemoryBufferVtbl): IInspectable(IInspectableVtbl) [IID_IMemoryBuffer] { + fn CreateReference(&mut self, out: *mut *mut IMemoryBufferReference) -> HRESULT + }} + impl IMemoryBuffer { + #[inline] pub unsafe fn create_reference(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateReference)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMemoryBufferFactory, 4223982891, 9307, 4580, 175, 152, 104, 148, 35, 38, 12, 248); + RT_INTERFACE!{static interface IMemoryBufferFactory(IMemoryBufferFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMemoryBufferFactory] { + fn Create(&mut self, capacity: u32, out: *mut *mut MemoryBuffer) -> HRESULT + }} + impl IMemoryBufferFactory { + #[inline] pub unsafe fn create(&mut self, capacity: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, capacity, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MemoryBuffer: IMemoryBuffer [IMemoryBufferFactory] [CLSID_MemoryBuffer]} + DEFINE_CLSID!(CLSID_MemoryBuffer = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,77,101,109,111,114,121,66,117,102,102,101,114,0]); + RT_STRUCT! { struct UniversalApiContract { + + }} + RT_PINTERFACE!{ for AsyncActionProgressHandler => [0x44825c7c,0x0da9,0x5691,0xb2,0xb4,0x91,0x4f,0x23,0x1e,0xec,0xed] as IID_AsyncActionProgressHandler_1_System_Double } + #[cfg(feature="windows.web")] RT_PINTERFACE!{ for AsyncActionProgressHandler => [0xc1610085,0x94d0,0x5706,0x9a,0xc6,0x10,0x17,0x9d,0x7d,0xeb,0x92] as IID_AsyncActionProgressHandler_1_Windows_Web_Syndication_TransferProgress } + RT_PINTERFACE!{ for AsyncActionProgressHandler => [0x55e233ca,0xf243,0x5ae2,0x85,0x3b,0xf9,0xcc,0x7c,0x0a,0xe0,0xcf] as IID_AsyncActionProgressHandler_1_System_UInt64 } + RT_PINTERFACE!{ for AsyncActionWithProgressCompletedHandler => [0x94d64ac6,0x4491,0x53ef,0x8b,0xe8,0x36,0x48,0x1f,0x3f,0xf1,0xe8] as IID_AsyncActionWithProgressCompletedHandler_1_System_Double } + #[cfg(feature="windows.web")] RT_PINTERFACE!{ for AsyncActionWithProgressCompletedHandler => [0xf1c031c8,0x90bf,0x5cae,0xad,0xf6,0x15,0x5b,0x4a,0xed,0xfb,0x60] as IID_AsyncActionWithProgressCompletedHandler_1_Windows_Web_Syndication_TransferProgress } + RT_PINTERFACE!{ for AsyncActionWithProgressCompletedHandler => [0xe6ff857b,0xf160,0x571a,0xa9,0x34,0x2c,0x61,0xf9,0x8c,0x86,0x2d] as IID_AsyncActionWithProgressCompletedHandler_1_System_UInt64 } + RT_PINTERFACE!{ for AsyncOperationCompletedHandler => [0xc1d3d1a2,0xae17,0x5a5f,0xb5,0xa2,0xbd,0xcc,0x88,0x44,0x88,0x9a] as IID_AsyncOperationCompletedHandler_1_System_Boolean } + RT_PINTERFACE!{ for AsyncOperationCompletedHandler> => [0x7344f356,0x8399,0x5756,0xa2,0xf8,0xab,0xd5,0x0c,0x41,0x46,0xff] as IID_AsyncOperationCompletedHandler_1_Windows_Foundation_Collections_IMap_2_System_String_System_Object } + RT_PINTERFACE!{ for AsyncOperationCompletedHandler> => [0x89981889,0x1207,0x5ae6,0x9b,0x28,0xcc,0xc5,0x8f,0x3a,0xac,0x6e] as IID_AsyncOperationCompletedHandler_1_Windows_Foundation_Collections_IMapView_2_System_String_System_Object } + #[cfg(feature="windows.perception")] RT_PINTERFACE!{ for AsyncOperationCompletedHandler> => [0x3a950aa3,0x9c65,0x586e,0xaf,0x75,0x1a,0xcf,0x07,0x19,0x0e,0x90] as IID_AsyncOperationCompletedHandler_1_Windows_Foundation_Collections_IMapView_2_System_String_Windows_Perception_Spatial_SpatialAnchor } + #[cfg(feature="windows.storage")] RT_PINTERFACE!{ for AsyncOperationCompletedHandler> => [0xd4cb6b80,0x821a,0x5a7b,0x89,0x8d,0xd5,0x89,0x17,0xb3,0x1a,0x36] as IID_AsyncOperationCompletedHandler_1_Windows_Foundation_Collections_IMapView_2_System_String_Windows_Storage_Streams_RandomAccessStreamReference } #[cfg(feature="windows.storage")] RT_PINTERFACE!{ for AsyncOperationCompletedHandler> => [0x92c2e4d0,0x7c25,0x596b,0x91,0x35,0x10,0xd1,0x47,0x2e,0x69,0x68] as IID_AsyncOperationCompletedHandler_1_Windows_Foundation_Collections_IMapView_2_System_UInt32_Windows_Storage_Streams_IBuffer } RT_PINTERFACE!{ for AsyncOperationCompletedHandler => [0x5075a55f,0x68ba,0x56f2,0x97,0xe6,0x9b,0x1c,0xbf,0xa2,0xc5,0xf2] as IID_AsyncOperationCompletedHandler_1_Windows_Foundation_Collections_IPropertySet } RT_PINTERFACE!{ for AsyncOperationCompletedHandler> => [0xfae4b396,0x97c8,0x5cc3,0xbf,0x88,0xea,0x30,0x98,0xed,0xf6,0xb2] as IID_AsyncOperationCompletedHandler_1_Windows_Foundation_Collections_IVector_1_System_String } @@ -25674,1293 +49410,120481 @@ use ::prelude::*; } // Windows.Foundation.Collections pub mod metadata { // Windows.Foundation.Metadata use ::prelude::*; - RT_ENUM! { enum GCPressureAmount: i32 { - Low (GCPressureAmount_Low) = 0, Medium (GCPressureAmount_Medium) = 1, High (GCPressureAmount_High) = 2, + RT_ENUM! { enum GCPressureAmount: i32 { + Low (GCPressureAmount_Low) = 0, Medium (GCPressureAmount_Medium) = 1, High (GCPressureAmount_High) = 2, + }} + DEFINE_IID!(IID_IApiInformationStatics, 2574531070, 63105, 18961, 180, 22, 193, 58, 71, 232, 186, 54); + RT_INTERFACE!{static interface IApiInformationStatics(IApiInformationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApiInformationStatics] { + fn IsTypePresent(&mut self, typeName: HSTRING, out: *mut bool) -> HRESULT, + fn IsMethodPresent(&mut self, typeName: HSTRING, methodName: HSTRING, out: *mut bool) -> HRESULT, + fn IsMethodPresentWithArity(&mut self, typeName: HSTRING, methodName: HSTRING, inputParameterCount: u32, out: *mut bool) -> HRESULT, + fn IsEventPresent(&mut self, typeName: HSTRING, eventName: HSTRING, out: *mut bool) -> HRESULT, + fn IsPropertyPresent(&mut self, typeName: HSTRING, propertyName: HSTRING, out: *mut bool) -> HRESULT, + fn IsReadOnlyPropertyPresent(&mut self, typeName: HSTRING, propertyName: HSTRING, out: *mut bool) -> HRESULT, + fn IsWriteablePropertyPresent(&mut self, typeName: HSTRING, propertyName: HSTRING, out: *mut bool) -> HRESULT, + fn IsEnumNamedValuePresent(&mut self, enumTypeName: HSTRING, valueName: HSTRING, out: *mut bool) -> HRESULT, + fn IsApiContractPresentByMajor(&mut self, contractName: HSTRING, majorVersion: u16, out: *mut bool) -> HRESULT, + fn IsApiContractPresentByMajorAndMinor(&mut self, contractName: HSTRING, majorVersion: u16, minorVersion: u16, out: *mut bool) -> HRESULT + }} + impl IApiInformationStatics { + #[inline] pub unsafe fn is_type_present(&mut self, typeName: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsTypePresent)(self, typeName.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_method_present(&mut self, typeName: &HStringArg, methodName: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsMethodPresent)(self, typeName.get(), methodName.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_method_present_with_arity(&mut self, typeName: &HStringArg, methodName: &HStringArg, inputParameterCount: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsMethodPresentWithArity)(self, typeName.get(), methodName.get(), inputParameterCount, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_event_present(&mut self, typeName: &HStringArg, eventName: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEventPresent)(self, typeName.get(), eventName.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_property_present(&mut self, typeName: &HStringArg, propertyName: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsPropertyPresent)(self, typeName.get(), propertyName.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_read_only_property_present(&mut self, typeName: &HStringArg, propertyName: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsReadOnlyPropertyPresent)(self, typeName.get(), propertyName.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_writeable_property_present(&mut self, typeName: &HStringArg, propertyName: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsWriteablePropertyPresent)(self, typeName.get(), propertyName.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_enum_named_value_present(&mut self, enumTypeName: &HStringArg, valueName: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEnumNamedValuePresent)(self, enumTypeName.get(), valueName.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_api_contract_present_by_major(&mut self, contractName: &HStringArg, majorVersion: u16) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsApiContractPresentByMajor)(self, contractName.get(), majorVersion, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_api_contract_present_by_major_and_minor(&mut self, contractName: &HStringArg, majorVersion: u16, minorVersion: u16) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsApiContractPresentByMajorAndMinor)(self, contractName.get(), majorVersion, minorVersion, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IApiInformationStatics [CLSID_ApiInformation]} + DEFINE_CLSID!(CLSID_ApiInformation = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,77,101,116,97,100,97,116,97,46,65,112,105,73,110,102,111,114,109,97,116,105,111,110,0]); + RT_ENUM! { enum Platform: i32 { + Windows (Platform_Windows) = 0, WindowsPhone (Platform_WindowsPhone) = 1, + }} + RT_ENUM! { enum AttributeTargets: u32 { + All (AttributeTargets_All) = 4294967295, Delegate (AttributeTargets_Delegate) = 1, Enum (AttributeTargets_Enum) = 2, Event (AttributeTargets_Event) = 4, Field (AttributeTargets_Field) = 8, Interface (AttributeTargets_Interface) = 16, Method (AttributeTargets_Method) = 64, Parameter (AttributeTargets_Parameter) = 128, Property (AttributeTargets_Property) = 256, RuntimeClass (AttributeTargets_RuntimeClass) = 512, Struct (AttributeTargets_Struct) = 1024, InterfaceImpl (AttributeTargets_InterfaceImpl) = 2048, ApiContract (AttributeTargets_ApiContract) = 8192, + }} + RT_ENUM! { enum CompositionType: i32 { + Protected (CompositionType_Protected) = 1, Public (CompositionType_Public) = 2, + }} + RT_ENUM! { enum ThreadingModel: i32 { + STA (ThreadingModel_STA) = 1, MTA (ThreadingModel_MTA) = 2, Both (ThreadingModel_Both) = 3, InvalidThreading (ThreadingModel_InvalidThreading) = 0, + }} + RT_ENUM! { enum MarshalingType: i32 { + None (MarshalingType_None) = 1, Agile (MarshalingType_Agile) = 2, Standard (MarshalingType_Standard) = 3, InvalidMarshaling (MarshalingType_InvalidMarshaling) = 0, + }} + RT_ENUM! { enum DeprecationType: i32 { + Deprecate (DeprecationType_Deprecate) = 0, Remove (DeprecationType_Remove) = 1, + }} +} // Windows.Foundation.Metadata +pub mod diagnostics { // Windows.Foundation.Diagnostics +use ::prelude::*; + RT_ENUM! { enum CausalityTraceLevel: i32 { + Required (CausalityTraceLevel_Required) = 0, Important (CausalityTraceLevel_Important) = 1, Verbose (CausalityTraceLevel_Verbose) = 2, + }} + RT_ENUM! { enum CausalitySource: i32 { + Application (CausalitySource_Application) = 0, Library (CausalitySource_Library) = 1, System (CausalitySource_System) = 2, + }} + RT_ENUM! { enum CausalityRelation: i32 { + AssignDelegate (CausalityRelation_AssignDelegate) = 0, Join (CausalityRelation_Join) = 1, Choice (CausalityRelation_Choice) = 2, Cancel (CausalityRelation_Cancel) = 3, Error (CausalityRelation_Error) = 4, + }} + RT_ENUM! { enum CausalitySynchronousWork: i32 { + CompletionNotification (CausalitySynchronousWork_CompletionNotification) = 0, ProgressNotification (CausalitySynchronousWork_ProgressNotification) = 1, Execution (CausalitySynchronousWork_Execution) = 2, + }} + DEFINE_IID!(IID_ITracingStatusChangedEventArgs, 1091270417, 65339, 18303, 156, 154, 210, 239, 218, 48, 45, 195); + RT_INTERFACE!{interface ITracingStatusChangedEventArgs(ITracingStatusChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITracingStatusChangedEventArgs] { + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT, + fn get_TraceLevel(&mut self, out: *mut CausalityTraceLevel) -> HRESULT + }} + impl ITracingStatusChangedEventArgs { + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_trace_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TraceLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAsyncCausalityTracerStatics, 1350896422, 9854, 17691, 168, 144, 171, 106, 55, 2, 69, 238); + RT_INTERFACE!{static interface IAsyncCausalityTracerStatics(IAsyncCausalityTracerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncCausalityTracerStatics] { + fn TraceOperationCreation(&mut self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, operationName: HSTRING, relatedContext: u64) -> HRESULT, + fn TraceOperationCompletion(&mut self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, status: super::AsyncStatus) -> HRESULT, + fn TraceOperationRelation(&mut self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, relation: CausalityRelation) -> HRESULT, + fn TraceSynchronousWorkStart(&mut self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, work: CausalitySynchronousWork) -> HRESULT, + fn TraceSynchronousWorkCompletion(&mut self, traceLevel: CausalityTraceLevel, source: CausalitySource, work: CausalitySynchronousWork) -> HRESULT, + fn add_TracingStatusChanged(&mut self, handler: *mut super::EventHandler, out: *mut super::EventRegistrationToken) -> HRESULT, + fn remove_TracingStatusChanged(&mut self, cookie: super::EventRegistrationToken) -> HRESULT + }} + impl IAsyncCausalityTracerStatics { + #[inline] pub unsafe fn trace_operation_creation(&mut self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, operationName: &HStringArg, relatedContext: u64) -> Result<()> { + let hr = ((*self.lpVtbl).TraceOperationCreation)(self, traceLevel, source, platformId, operationId, operationName.get(), relatedContext); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn trace_operation_completion(&mut self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, status: super::AsyncStatus) -> Result<()> { + let hr = ((*self.lpVtbl).TraceOperationCompletion)(self, traceLevel, source, platformId, operationId, status); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn trace_operation_relation(&mut self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, relation: CausalityRelation) -> Result<()> { + let hr = ((*self.lpVtbl).TraceOperationRelation)(self, traceLevel, source, platformId, operationId, relation); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn trace_synchronous_work_start(&mut self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, work: CausalitySynchronousWork) -> Result<()> { + let hr = ((*self.lpVtbl).TraceSynchronousWorkStart)(self, traceLevel, source, platformId, operationId, work); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn trace_synchronous_work_completion(&mut self, traceLevel: CausalityTraceLevel, source: CausalitySource, work: CausalitySynchronousWork) -> Result<()> { + let hr = ((*self.lpVtbl).TraceSynchronousWorkCompletion)(self, traceLevel, source, work); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_tracing_status_changed(&mut self, handler: &super::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TracingStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_tracing_status_changed(&mut self, cookie: super::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TracingStatusChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class TracingStatusChangedEventArgs: ITracingStatusChangedEventArgs} + RT_ACTIVATABLE!{IAsyncCausalityTracerStatics [CLSID_AsyncCausalityTracer]} + DEFINE_CLSID!(CLSID_AsyncCausalityTracer = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,68,105,97,103,110,111,115,116,105,99,115,46,65,115,121,110,99,67,97,117,115,97,108,105,116,121,84,114,97,99,101,114,0]); + RT_ENUM! { enum ErrorOptions: u32 { + None (ErrorOptions_None) = 0, SuppressExceptions (ErrorOptions_SuppressExceptions) = 1, ForceExceptions (ErrorOptions_ForceExceptions) = 2, UseSetErrorInfo (ErrorOptions_UseSetErrorInfo) = 4, SuppressSetErrorInfo (ErrorOptions_SuppressSetErrorInfo) = 8, + }} + DEFINE_IID!(IID_IErrorReportingSettings, 372676498, 45118, 19361, 139, 184, 210, 143, 74, 180, 210, 192); + RT_INTERFACE!{interface IErrorReportingSettings(IErrorReportingSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IErrorReportingSettings] { + fn SetErrorOptions(&mut self, value: ErrorOptions) -> HRESULT, + fn GetErrorOptions(&mut self, out: *mut ErrorOptions) -> HRESULT + }} + impl IErrorReportingSettings { + #[inline] pub unsafe fn set_error_options(&mut self, value: ErrorOptions) -> Result<()> { + let hr = ((*self.lpVtbl).SetErrorOptions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetErrorOptions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class RuntimeBrokerErrorSettings: IErrorReportingSettings} + DEFINE_IID!(IID_IErrorDetailsStatics, 3077584720, 2845, 18120, 170, 14, 75, 129, 120, 228, 252, 233); + RT_INTERFACE!{static interface IErrorDetailsStatics(IErrorDetailsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IErrorDetailsStatics] { + fn CreateFromHResultAsync(&mut self, errorCode: i32, out: *mut *mut super::IAsyncOperation) -> HRESULT + }} + impl IErrorDetailsStatics { + #[inline] pub unsafe fn create_from_hresult_async(&mut self, errorCode: i32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromHResultAsync)(self, errorCode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ErrorDetails: IErrorDetails} + RT_ACTIVATABLE!{IErrorDetailsStatics [CLSID_ErrorDetails]} + DEFINE_CLSID!(CLSID_ErrorDetails = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,68,105,97,103,110,111,115,116,105,99,115,46,69,114,114,111,114,68,101,116,97,105,108,115,0]); + DEFINE_IID!(IID_IErrorDetails, 931969793, 11465, 17039, 140, 85, 44, 153, 13, 70, 62, 143); + RT_INTERFACE!{interface IErrorDetails(IErrorDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IErrorDetails] { + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LongDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HelpUri(&mut self, out: *mut *mut super::Uri) -> HRESULT + }} + impl IErrorDetails { + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_long_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LongDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_help_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HelpUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum LoggingLevel: i32 { + Verbose (LoggingLevel_Verbose) = 0, Information (LoggingLevel_Information) = 1, Warning (LoggingLevel_Warning) = 2, Error (LoggingLevel_Error) = 3, Critical (LoggingLevel_Critical) = 4, + }} + RT_ENUM! { enum LoggingOpcode: i32 { + Info (LoggingOpcode_Info) = 0, Start (LoggingOpcode_Start) = 1, Stop (LoggingOpcode_Stop) = 2, Reply (LoggingOpcode_Reply) = 6, Resume (LoggingOpcode_Resume) = 7, Suspend (LoggingOpcode_Suspend) = 8, Send (LoggingOpcode_Send) = 9, + }} + RT_ENUM! { enum LoggingFieldFormat: i32 { + Default (LoggingFieldFormat_Default) = 0, Hidden (LoggingFieldFormat_Hidden) = 1, String (LoggingFieldFormat_String) = 2, Boolean (LoggingFieldFormat_Boolean) = 3, Hexadecimal (LoggingFieldFormat_Hexadecimal) = 4, ProcessId (LoggingFieldFormat_ProcessId) = 5, ThreadId (LoggingFieldFormat_ThreadId) = 6, Port (LoggingFieldFormat_Port) = 7, Ipv4Address (LoggingFieldFormat_Ipv4Address) = 8, Ipv6Address (LoggingFieldFormat_Ipv6Address) = 9, SocketAddress (LoggingFieldFormat_SocketAddress) = 10, Xml (LoggingFieldFormat_Xml) = 11, Json (LoggingFieldFormat_Json) = 12, Win32Error (LoggingFieldFormat_Win32Error) = 13, NTStatus (LoggingFieldFormat_NTStatus) = 14, HResult (LoggingFieldFormat_HResult) = 15, FileTime (LoggingFieldFormat_FileTime) = 16, Signed (LoggingFieldFormat_Signed) = 17, Unsigned (LoggingFieldFormat_Unsigned) = 18, + }} + DEFINE_IID!(IID_ILoggingOptions, 2428270672, 402, 20317, 172, 38, 0, 106, 218, 202, 18, 216); + RT_INTERFACE!{interface ILoggingOptions(ILoggingOptionsVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingOptions] { + fn get_Keywords(&mut self, out: *mut i64) -> HRESULT, + fn put_Keywords(&mut self, value: i64) -> HRESULT, + fn get_Tags(&mut self, out: *mut i32) -> HRESULT, + fn put_Tags(&mut self, value: i32) -> HRESULT, + fn get_Task(&mut self, out: *mut i16) -> HRESULT, + fn put_Task(&mut self, value: i16) -> HRESULT, + fn get_Opcode(&mut self, out: *mut LoggingOpcode) -> HRESULT, + fn put_Opcode(&mut self, value: LoggingOpcode) -> HRESULT, + fn get_ActivityId(&mut self, out: *mut Guid) -> HRESULT, + fn put_ActivityId(&mut self, value: Guid) -> HRESULT, + fn get_RelatedActivityId(&mut self, out: *mut Guid) -> HRESULT, + fn put_RelatedActivityId(&mut self, value: Guid) -> HRESULT + }} + impl ILoggingOptions { + #[inline] pub unsafe fn get_keywords(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Keywords)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_keywords(&mut self, value: i64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Keywords)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tags(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Tags)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_tags(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Tags)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_task(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Task)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_task(&mut self, value: i16) -> Result<()> { + let hr = ((*self.lpVtbl).put_Task)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_opcode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Opcode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_opcode(&mut self, value: LoggingOpcode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Opcode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_activity_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActivityId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_activity_id(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).put_ActivityId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_related_activity_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RelatedActivityId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_related_activity_id(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).put_RelatedActivityId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILoggingOptionsFactory, 3608397515, 39083, 17995, 159, 34, 163, 38, 132, 120, 54, 138); + RT_INTERFACE!{static interface ILoggingOptionsFactory(ILoggingOptionsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingOptionsFactory] { + fn CreateWithKeywords(&mut self, keywords: i64, out: *mut *mut LoggingOptions) -> HRESULT + }} + impl ILoggingOptionsFactory { + #[inline] pub unsafe fn create_with_keywords(&mut self, keywords: i64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithKeywords)(self, keywords, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LoggingOptions: ILoggingOptions [ILoggingOptionsFactory] [CLSID_LoggingOptions]} + DEFINE_CLSID!(CLSID_LoggingOptions = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,68,105,97,103,110,111,115,116,105,99,115,46,76,111,103,103,105,110,103,79,112,116,105,111,110,115,0]); + DEFINE_IID!(IID_ILoggingChannelOptions, 3286779903, 3771, 19027, 140, 84, 222, 194, 73, 38, 203, 44); + RT_INTERFACE!{interface ILoggingChannelOptions(ILoggingChannelOptionsVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingChannelOptions] { + fn get_Group(&mut self, out: *mut Guid) -> HRESULT, + fn put_Group(&mut self, value: Guid) -> HRESULT + }} + impl ILoggingChannelOptions { + #[inline] pub unsafe fn get_group(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Group)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_group(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).put_Group)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILoggingChannelOptionsFactory, 2838581722, 32687, 16785, 135, 85, 94, 134, 220, 101, 216, 150); + RT_INTERFACE!{static interface ILoggingChannelOptionsFactory(ILoggingChannelOptionsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingChannelOptionsFactory] { + fn Create(&mut self, group: Guid, out: *mut *mut LoggingChannelOptions) -> HRESULT + }} + impl ILoggingChannelOptionsFactory { + #[inline] pub unsafe fn create(&mut self, group: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, group, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LoggingChannelOptions: ILoggingChannelOptions [ILoggingChannelOptionsFactory] [CLSID_LoggingChannelOptions]} + DEFINE_CLSID!(CLSID_LoggingChannelOptions = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,68,105,97,103,110,111,115,116,105,99,115,46,76,111,103,103,105,110,103,67,104,97,110,110,101,108,79,112,116,105,111,110,115,0]); + DEFINE_IID!(IID_ILoggingFields, 3623270319, 30253, 17785, 131, 189, 82, 194, 59, 195, 51, 188); + RT_INTERFACE!{interface ILoggingFields(ILoggingFieldsVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingFields] { + fn Clear(&mut self) -> HRESULT, + fn BeginStruct(&mut self, name: HSTRING) -> HRESULT, + fn BeginStructWithTags(&mut self, name: HSTRING, tags: i32) -> HRESULT, + fn EndStruct(&mut self) -> HRESULT, + fn AddEmpty(&mut self, name: HSTRING) -> HRESULT, + fn AddEmptyWithFormat(&mut self, name: HSTRING, format: LoggingFieldFormat) -> HRESULT, + fn AddEmptyWithFormatAndTags(&mut self, name: HSTRING, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddUInt8(&mut self, name: HSTRING, value: u8) -> HRESULT, + fn AddUInt8WithFormat(&mut self, name: HSTRING, value: u8, format: LoggingFieldFormat) -> HRESULT, + fn AddUInt8WithFormatAndTags(&mut self, name: HSTRING, value: u8, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddUInt8Array(&mut self, name: HSTRING, valueSize: u32, value: *mut u8) -> HRESULT, + fn AddUInt8ArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut u8, format: LoggingFieldFormat) -> HRESULT, + fn AddUInt8ArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut u8, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddInt16(&mut self, name: HSTRING, value: i16) -> HRESULT, + fn AddInt16WithFormat(&mut self, name: HSTRING, value: i16, format: LoggingFieldFormat) -> HRESULT, + fn AddInt16WithFormatAndTags(&mut self, name: HSTRING, value: i16, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddInt16Array(&mut self, name: HSTRING, valueSize: u32, value: *mut i16) -> HRESULT, + fn AddInt16ArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut i16, format: LoggingFieldFormat) -> HRESULT, + fn AddInt16ArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut i16, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddUInt16(&mut self, name: HSTRING, value: u16) -> HRESULT, + fn AddUInt16WithFormat(&mut self, name: HSTRING, value: u16, format: LoggingFieldFormat) -> HRESULT, + fn AddUInt16WithFormatAndTags(&mut self, name: HSTRING, value: u16, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddUInt16Array(&mut self, name: HSTRING, valueSize: u32, value: *mut u16) -> HRESULT, + fn AddUInt16ArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut u16, format: LoggingFieldFormat) -> HRESULT, + fn AddUInt16ArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut u16, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddInt32(&mut self, name: HSTRING, value: i32) -> HRESULT, + fn AddInt32WithFormat(&mut self, name: HSTRING, value: i32, format: LoggingFieldFormat) -> HRESULT, + fn AddInt32WithFormatAndTags(&mut self, name: HSTRING, value: i32, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddInt32Array(&mut self, name: HSTRING, valueSize: u32, value: *mut i32) -> HRESULT, + fn AddInt32ArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut i32, format: LoggingFieldFormat) -> HRESULT, + fn AddInt32ArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut i32, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddUInt32(&mut self, name: HSTRING, value: u32) -> HRESULT, + fn AddUInt32WithFormat(&mut self, name: HSTRING, value: u32, format: LoggingFieldFormat) -> HRESULT, + fn AddUInt32WithFormatAndTags(&mut self, name: HSTRING, value: u32, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddUInt32Array(&mut self, name: HSTRING, valueSize: u32, value: *mut u32) -> HRESULT, + fn AddUInt32ArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut u32, format: LoggingFieldFormat) -> HRESULT, + fn AddUInt32ArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut u32, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddInt64(&mut self, name: HSTRING, value: i64) -> HRESULT, + fn AddInt64WithFormat(&mut self, name: HSTRING, value: i64, format: LoggingFieldFormat) -> HRESULT, + fn AddInt64WithFormatAndTags(&mut self, name: HSTRING, value: i64, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddInt64Array(&mut self, name: HSTRING, valueSize: u32, value: *mut i64) -> HRESULT, + fn AddInt64ArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut i64, format: LoggingFieldFormat) -> HRESULT, + fn AddInt64ArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut i64, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddUInt64(&mut self, name: HSTRING, value: u64) -> HRESULT, + fn AddUInt64WithFormat(&mut self, name: HSTRING, value: u64, format: LoggingFieldFormat) -> HRESULT, + fn AddUInt64WithFormatAndTags(&mut self, name: HSTRING, value: u64, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddUInt64Array(&mut self, name: HSTRING, valueSize: u32, value: *mut u64) -> HRESULT, + fn AddUInt64ArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut u64, format: LoggingFieldFormat) -> HRESULT, + fn AddUInt64ArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut u64, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddSingle(&mut self, name: HSTRING, value: f32) -> HRESULT, + fn AddSingleWithFormat(&mut self, name: HSTRING, value: f32, format: LoggingFieldFormat) -> HRESULT, + fn AddSingleWithFormatAndTags(&mut self, name: HSTRING, value: f32, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddSingleArray(&mut self, name: HSTRING, valueSize: u32, value: *mut f32) -> HRESULT, + fn AddSingleArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut f32, format: LoggingFieldFormat) -> HRESULT, + fn AddSingleArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut f32, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddDouble(&mut self, name: HSTRING, value: f64) -> HRESULT, + fn AddDoubleWithFormat(&mut self, name: HSTRING, value: f64, format: LoggingFieldFormat) -> HRESULT, + fn AddDoubleWithFormatAndTags(&mut self, name: HSTRING, value: f64, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddDoubleArray(&mut self, name: HSTRING, valueSize: u32, value: *mut f64) -> HRESULT, + fn AddDoubleArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut f64, format: LoggingFieldFormat) -> HRESULT, + fn AddDoubleArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut f64, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddChar16(&mut self, name: HSTRING, value: Char) -> HRESULT, + fn AddChar16WithFormat(&mut self, name: HSTRING, value: Char, format: LoggingFieldFormat) -> HRESULT, + fn AddChar16WithFormatAndTags(&mut self, name: HSTRING, value: Char, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddChar16Array(&mut self, name: HSTRING, valueSize: u32, value: *mut Char) -> HRESULT, + fn AddChar16ArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut Char, format: LoggingFieldFormat) -> HRESULT, + fn AddChar16ArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut Char, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddBoolean(&mut self, name: HSTRING, value: bool) -> HRESULT, + fn AddBooleanWithFormat(&mut self, name: HSTRING, value: bool, format: LoggingFieldFormat) -> HRESULT, + fn AddBooleanWithFormatAndTags(&mut self, name: HSTRING, value: bool, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddBooleanArray(&mut self, name: HSTRING, valueSize: u32, value: *mut bool) -> HRESULT, + fn AddBooleanArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut bool, format: LoggingFieldFormat) -> HRESULT, + fn AddBooleanArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut bool, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddString(&mut self, name: HSTRING, value: HSTRING) -> HRESULT, + fn AddStringWithFormat(&mut self, name: HSTRING, value: HSTRING, format: LoggingFieldFormat) -> HRESULT, + fn AddStringWithFormatAndTags(&mut self, name: HSTRING, value: HSTRING, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddStringArray(&mut self, name: HSTRING, valueSize: u32, value: *mut HSTRING) -> HRESULT, + fn AddStringArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut HSTRING, format: LoggingFieldFormat) -> HRESULT, + fn AddStringArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut HSTRING, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddGuid(&mut self, name: HSTRING, value: Guid) -> HRESULT, + fn AddGuidWithFormat(&mut self, name: HSTRING, value: Guid, format: LoggingFieldFormat) -> HRESULT, + fn AddGuidWithFormatAndTags(&mut self, name: HSTRING, value: Guid, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddGuidArray(&mut self, name: HSTRING, valueSize: u32, value: *mut Guid) -> HRESULT, + fn AddGuidArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut Guid, format: LoggingFieldFormat) -> HRESULT, + fn AddGuidArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut Guid, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddDateTime(&mut self, name: HSTRING, value: super::DateTime) -> HRESULT, + fn AddDateTimeWithFormat(&mut self, name: HSTRING, value: super::DateTime, format: LoggingFieldFormat) -> HRESULT, + fn AddDateTimeWithFormatAndTags(&mut self, name: HSTRING, value: super::DateTime, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddDateTimeArray(&mut self, name: HSTRING, valueSize: u32, value: *mut super::DateTime) -> HRESULT, + fn AddDateTimeArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut super::DateTime, format: LoggingFieldFormat) -> HRESULT, + fn AddDateTimeArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut super::DateTime, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddTimeSpan(&mut self, name: HSTRING, value: super::TimeSpan) -> HRESULT, + fn AddTimeSpanWithFormat(&mut self, name: HSTRING, value: super::TimeSpan, format: LoggingFieldFormat) -> HRESULT, + fn AddTimeSpanWithFormatAndTags(&mut self, name: HSTRING, value: super::TimeSpan, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddTimeSpanArray(&mut self, name: HSTRING, valueSize: u32, value: *mut super::TimeSpan) -> HRESULT, + fn AddTimeSpanArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut super::TimeSpan, format: LoggingFieldFormat) -> HRESULT, + fn AddTimeSpanArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut super::TimeSpan, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddPoint(&mut self, name: HSTRING, value: super::Point) -> HRESULT, + fn AddPointWithFormat(&mut self, name: HSTRING, value: super::Point, format: LoggingFieldFormat) -> HRESULT, + fn AddPointWithFormatAndTags(&mut self, name: HSTRING, value: super::Point, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddPointArray(&mut self, name: HSTRING, valueSize: u32, value: *mut super::Point) -> HRESULT, + fn AddPointArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut super::Point, format: LoggingFieldFormat) -> HRESULT, + fn AddPointArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut super::Point, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddSize(&mut self, name: HSTRING, value: super::Size) -> HRESULT, + fn AddSizeWithFormat(&mut self, name: HSTRING, value: super::Size, format: LoggingFieldFormat) -> HRESULT, + fn AddSizeWithFormatAndTags(&mut self, name: HSTRING, value: super::Size, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddSizeArray(&mut self, name: HSTRING, valueSize: u32, value: *mut super::Size) -> HRESULT, + fn AddSizeArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut super::Size, format: LoggingFieldFormat) -> HRESULT, + fn AddSizeArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut super::Size, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddRect(&mut self, name: HSTRING, value: super::Rect) -> HRESULT, + fn AddRectWithFormat(&mut self, name: HSTRING, value: super::Rect, format: LoggingFieldFormat) -> HRESULT, + fn AddRectWithFormatAndTags(&mut self, name: HSTRING, value: super::Rect, format: LoggingFieldFormat, tags: i32) -> HRESULT, + fn AddRectArray(&mut self, name: HSTRING, valueSize: u32, value: *mut super::Rect) -> HRESULT, + fn AddRectArrayWithFormat(&mut self, name: HSTRING, valueSize: u32, value: *mut super::Rect, format: LoggingFieldFormat) -> HRESULT, + fn AddRectArrayWithFormatAndTags(&mut self, name: HSTRING, valueSize: u32, value: *mut super::Rect, format: LoggingFieldFormat, tags: i32) -> HRESULT + }} + impl ILoggingFields { + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn begin_struct(&mut self, name: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).BeginStruct)(self, name.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn begin_struct_with_tags(&mut self, name: &HStringArg, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).BeginStructWithTags)(self, name.get(), tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn end_struct(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).EndStruct)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_empty(&mut self, name: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AddEmpty)(self, name.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_empty_with_format(&mut self, name: &HStringArg, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddEmptyWithFormat)(self, name.get(), format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_empty_with_format_and_tags(&mut self, name: &HStringArg, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddEmptyWithFormatAndTags)(self, name.get(), format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint8(&mut self, name: &HStringArg, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt8)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint8_with_format(&mut self, name: &HStringArg, value: u8, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt8WithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint8_with_format_and_tags(&mut self, name: &HStringArg, value: u8, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt8WithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint8_array(&mut self, name: &HStringArg, value: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt8Array)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint8_array_with_format(&mut self, name: &HStringArg, value: &[u8], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt8ArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint8_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[u8], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt8ArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int16(&mut self, name: &HStringArg, value: i16) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt16)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int16_with_format(&mut self, name: &HStringArg, value: i16, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt16WithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int16_with_format_and_tags(&mut self, name: &HStringArg, value: i16, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt16WithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int16_array(&mut self, name: &HStringArg, value: &[i16]) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt16Array)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int16_array_with_format(&mut self, name: &HStringArg, value: &[i16], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt16ArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int16_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[i16], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt16ArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint16(&mut self, name: &HStringArg, value: u16) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt16)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint16_with_format(&mut self, name: &HStringArg, value: u16, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt16WithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint16_with_format_and_tags(&mut self, name: &HStringArg, value: u16, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt16WithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint16_array(&mut self, name: &HStringArg, value: &[u16]) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt16Array)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint16_array_with_format(&mut self, name: &HStringArg, value: &[u16], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt16ArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint16_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[u16], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt16ArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int32(&mut self, name: &HStringArg, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt32)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int32_with_format(&mut self, name: &HStringArg, value: i32, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt32WithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int32_with_format_and_tags(&mut self, name: &HStringArg, value: i32, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt32WithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int32_array(&mut self, name: &HStringArg, value: &[i32]) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt32Array)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int32_array_with_format(&mut self, name: &HStringArg, value: &[i32], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt32ArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int32_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[i32], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt32ArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint32(&mut self, name: &HStringArg, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt32)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint32_with_format(&mut self, name: &HStringArg, value: u32, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt32WithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint32_with_format_and_tags(&mut self, name: &HStringArg, value: u32, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt32WithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint32_array(&mut self, name: &HStringArg, value: &[u32]) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt32Array)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint32_array_with_format(&mut self, name: &HStringArg, value: &[u32], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt32ArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint32_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[u32], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt32ArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int64(&mut self, name: &HStringArg, value: i64) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt64)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int64_with_format(&mut self, name: &HStringArg, value: i64, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt64WithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int64_with_format_and_tags(&mut self, name: &HStringArg, value: i64, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt64WithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int64_array(&mut self, name: &HStringArg, value: &[i64]) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt64Array)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int64_array_with_format(&mut self, name: &HStringArg, value: &[i64], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt64ArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_int64_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[i64], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddInt64ArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint64(&mut self, name: &HStringArg, value: u64) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt64)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint64_with_format(&mut self, name: &HStringArg, value: u64, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt64WithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint64_with_format_and_tags(&mut self, name: &HStringArg, value: u64, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt64WithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint64_array(&mut self, name: &HStringArg, value: &[u64]) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt64Array)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint64_array_with_format(&mut self, name: &HStringArg, value: &[u64], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt64ArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uint64_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[u64], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddUInt64ArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_single(&mut self, name: &HStringArg, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).AddSingle)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_single_with_format(&mut self, name: &HStringArg, value: f32, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddSingleWithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_single_with_format_and_tags(&mut self, name: &HStringArg, value: f32, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddSingleWithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_single_array(&mut self, name: &HStringArg, value: &[f32]) -> Result<()> { + let hr = ((*self.lpVtbl).AddSingleArray)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_single_array_with_format(&mut self, name: &HStringArg, value: &[f32], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddSingleArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_single_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[f32], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddSingleArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_double(&mut self, name: &HStringArg, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).AddDouble)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_double_with_format(&mut self, name: &HStringArg, value: f64, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddDoubleWithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_double_with_format_and_tags(&mut self, name: &HStringArg, value: f64, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddDoubleWithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_double_array(&mut self, name: &HStringArg, value: &[f64]) -> Result<()> { + let hr = ((*self.lpVtbl).AddDoubleArray)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_double_array_with_format(&mut self, name: &HStringArg, value: &[f64], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddDoubleArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_double_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[f64], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddDoubleArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_char16(&mut self, name: &HStringArg, value: Char) -> Result<()> { + let hr = ((*self.lpVtbl).AddChar16)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_char16_with_format(&mut self, name: &HStringArg, value: Char, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddChar16WithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_char16_with_format_and_tags(&mut self, name: &HStringArg, value: Char, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddChar16WithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_char16_array(&mut self, name: &HStringArg, value: &[Char]) -> Result<()> { + let hr = ((*self.lpVtbl).AddChar16Array)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_char16_array_with_format(&mut self, name: &HStringArg, value: &[Char], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddChar16ArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_char16_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[Char], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddChar16ArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_boolean(&mut self, name: &HStringArg, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).AddBoolean)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_boolean_with_format(&mut self, name: &HStringArg, value: bool, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddBooleanWithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_boolean_with_format_and_tags(&mut self, name: &HStringArg, value: bool, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddBooleanWithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_boolean_array(&mut self, name: &HStringArg, value: &[bool]) -> Result<()> { + let hr = ((*self.lpVtbl).AddBooleanArray)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_boolean_array_with_format(&mut self, name: &HStringArg, value: &[bool], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddBooleanArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_boolean_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[bool], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddBooleanArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_string(&mut self, name: &HStringArg, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AddString)(self, name.get(), value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_string_with_format(&mut self, name: &HStringArg, value: &HStringArg, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddStringWithFormat)(self, name.get(), value.get(), format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_string_with_format_and_tags(&mut self, name: &HStringArg, value: &HStringArg, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddStringWithFormatAndTags)(self, name.get(), value.get(), format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_string_array(&mut self, name: &HStringArg, value: &[&HStringArg]) -> Result<()> { + let hr = ((*self.lpVtbl).AddStringArray)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_string_array_with_format(&mut self, name: &HStringArg, value: &[&HStringArg], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddStringArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_string_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[&HStringArg], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddStringArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_guid(&mut self, name: &HStringArg, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).AddGuid)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_guid_with_format(&mut self, name: &HStringArg, value: Guid, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddGuidWithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_guid_with_format_and_tags(&mut self, name: &HStringArg, value: Guid, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddGuidWithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_guid_array(&mut self, name: &HStringArg, value: &[Guid]) -> Result<()> { + let hr = ((*self.lpVtbl).AddGuidArray)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_guid_array_with_format(&mut self, name: &HStringArg, value: &[Guid], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddGuidArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_guid_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[Guid], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddGuidArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_date_time(&mut self, name: &HStringArg, value: super::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).AddDateTime)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_date_time_with_format(&mut self, name: &HStringArg, value: super::DateTime, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddDateTimeWithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_date_time_with_format_and_tags(&mut self, name: &HStringArg, value: super::DateTime, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddDateTimeWithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_date_time_array(&mut self, name: &HStringArg, value: &[super::DateTime]) -> Result<()> { + let hr = ((*self.lpVtbl).AddDateTimeArray)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_date_time_array_with_format(&mut self, name: &HStringArg, value: &[super::DateTime], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddDateTimeArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_date_time_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[super::DateTime], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddDateTimeArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_time_span(&mut self, name: &HStringArg, value: super::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).AddTimeSpan)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_time_span_with_format(&mut self, name: &HStringArg, value: super::TimeSpan, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddTimeSpanWithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_time_span_with_format_and_tags(&mut self, name: &HStringArg, value: super::TimeSpan, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddTimeSpanWithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_time_span_array(&mut self, name: &HStringArg, value: &[super::TimeSpan]) -> Result<()> { + let hr = ((*self.lpVtbl).AddTimeSpanArray)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_time_span_array_with_format(&mut self, name: &HStringArg, value: &[super::TimeSpan], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddTimeSpanArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_time_span_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[super::TimeSpan], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddTimeSpanArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_point(&mut self, name: &HStringArg, value: super::Point) -> Result<()> { + let hr = ((*self.lpVtbl).AddPoint)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_point_with_format(&mut self, name: &HStringArg, value: super::Point, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddPointWithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_point_with_format_and_tags(&mut self, name: &HStringArg, value: super::Point, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddPointWithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_point_array(&mut self, name: &HStringArg, value: &[super::Point]) -> Result<()> { + let hr = ((*self.lpVtbl).AddPointArray)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_point_array_with_format(&mut self, name: &HStringArg, value: &[super::Point], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddPointArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_point_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[super::Point], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddPointArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_size(&mut self, name: &HStringArg, value: super::Size) -> Result<()> { + let hr = ((*self.lpVtbl).AddSize)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_size_with_format(&mut self, name: &HStringArg, value: super::Size, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddSizeWithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_size_with_format_and_tags(&mut self, name: &HStringArg, value: super::Size, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddSizeWithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_size_array(&mut self, name: &HStringArg, value: &[super::Size]) -> Result<()> { + let hr = ((*self.lpVtbl).AddSizeArray)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_size_array_with_format(&mut self, name: &HStringArg, value: &[super::Size], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddSizeArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_size_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[super::Size], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddSizeArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rect(&mut self, name: &HStringArg, value: super::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).AddRect)(self, name.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rect_with_format(&mut self, name: &HStringArg, value: super::Rect, format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddRectWithFormat)(self, name.get(), value, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rect_with_format_and_tags(&mut self, name: &HStringArg, value: super::Rect, format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddRectWithFormatAndTags)(self, name.get(), value, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rect_array(&mut self, name: &HStringArg, value: &[super::Rect]) -> Result<()> { + let hr = ((*self.lpVtbl).AddRectArray)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rect_array_with_format(&mut self, name: &HStringArg, value: &[super::Rect], format: LoggingFieldFormat) -> Result<()> { + let hr = ((*self.lpVtbl).AddRectArrayWithFormat)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rect_array_with_format_and_tags(&mut self, name: &HStringArg, value: &[super::Rect], format: LoggingFieldFormat, tags: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddRectArrayWithFormatAndTags)(self, name.get(), value.len() as u32, value.as_ptr() as *mut _, format, tags); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class LoggingFields: ILoggingFields} + DEFINE_IID!(IID_ILoggingTarget, 1710320693, 58248, 20006, 177, 122, 245, 28, 211, 168, 57, 22); + RT_INTERFACE!{interface ILoggingTarget(ILoggingTargetVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingTarget] { + fn IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn IsEnabledWithLevel(&mut self, level: LoggingLevel, out: *mut bool) -> HRESULT, + fn IsEnabledWithLevelAndKeywords(&mut self, level: LoggingLevel, keywords: i64, out: *mut bool) -> HRESULT, + fn LogEvent(&mut self, eventName: HSTRING) -> HRESULT, + fn LogEventWithFields(&mut self, eventName: HSTRING, fields: *mut LoggingFields) -> HRESULT, + fn LogEventWithFieldsAndLevel(&mut self, eventName: HSTRING, fields: *mut LoggingFields, level: LoggingLevel) -> HRESULT, + fn LogEventWithFieldsAndOptions(&mut self, eventName: HSTRING, fields: *mut LoggingFields, level: LoggingLevel, options: *mut LoggingOptions) -> HRESULT, + fn StartActivity(&mut self, startEventName: HSTRING, out: *mut *mut LoggingActivity) -> HRESULT, + fn StartActivityWithFields(&mut self, startEventName: HSTRING, fields: *mut LoggingFields, out: *mut *mut LoggingActivity) -> HRESULT, + fn StartActivityWithFieldsAndLevel(&mut self, startEventName: HSTRING, fields: *mut LoggingFields, level: LoggingLevel, out: *mut *mut LoggingActivity) -> HRESULT, + fn StartActivityWithFieldsAndOptions(&mut self, startEventName: HSTRING, fields: *mut LoggingFields, level: LoggingLevel, options: *mut LoggingOptions, out: *mut *mut LoggingActivity) -> HRESULT + }} + impl ILoggingTarget { + #[inline] pub unsafe fn is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_enabled_with_level(&mut self, level: LoggingLevel) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEnabledWithLevel)(self, level, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_enabled_with_level_and_keywords(&mut self, level: LoggingLevel, keywords: i64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEnabledWithLevelAndKeywords)(self, level, keywords, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn log_event(&mut self, eventName: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).LogEvent)(self, eventName.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn log_event_with_fields(&mut self, eventName: &HStringArg, fields: &LoggingFields) -> Result<()> { + let hr = ((*self.lpVtbl).LogEventWithFields)(self, eventName.get(), fields as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn log_event_with_fields_and_level(&mut self, eventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel) -> Result<()> { + let hr = ((*self.lpVtbl).LogEventWithFieldsAndLevel)(self, eventName.get(), fields as *const _ as *mut _, level); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn log_event_with_fields_and_options(&mut self, eventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> Result<()> { + let hr = ((*self.lpVtbl).LogEventWithFieldsAndOptions)(self, eventName.get(), fields as *const _ as *mut _, level, options as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_activity(&mut self, startEventName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartActivity)(self, startEventName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_activity_with_fields(&mut self, startEventName: &HStringArg, fields: &LoggingFields) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartActivityWithFields)(self, startEventName.get(), fields as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_activity_with_fields_and_level(&mut self, startEventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartActivityWithFieldsAndLevel)(self, startEventName.get(), fields as *const _ as *mut _, level, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_activity_with_fields_and_options(&mut self, startEventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartActivityWithFieldsAndOptions)(self, startEventName.get(), fields as *const _ as *mut _, level, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LoggingActivity: ILoggingActivity [ILoggingActivityFactory] [CLSID_LoggingActivity]} + DEFINE_CLSID!(CLSID_LoggingActivity = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,68,105,97,103,110,111,115,116,105,99,115,46,76,111,103,103,105,110,103,65,99,116,105,118,105,116,121,0]); + DEFINE_IID!(IID_ILoggingChannel, 3919905603, 4567, 20225, 181, 202, 207, 73, 82, 120, 192, 168); + RT_INTERFACE!{interface ILoggingChannel(ILoggingChannelVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingChannel] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT, + fn get_Level(&mut self, out: *mut LoggingLevel) -> HRESULT, + fn LogMessage(&mut self, eventString: HSTRING) -> HRESULT, + fn LogMessageWithLevel(&mut self, eventString: HSTRING, level: LoggingLevel) -> HRESULT, + fn LogValuePair(&mut self, value1: HSTRING, value2: i32) -> HRESULT, + fn LogValuePairWithLevel(&mut self, value1: HSTRING, value2: i32, level: LoggingLevel) -> HRESULT, + fn add_LoggingEnabled(&mut self, handler: *mut super::TypedEventHandler, out: *mut super::EventRegistrationToken) -> HRESULT, + fn remove_LoggingEnabled(&mut self, token: super::EventRegistrationToken) -> HRESULT + }} + impl ILoggingChannel { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Level)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn log_message(&mut self, eventString: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).LogMessage)(self, eventString.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn log_message_with_level(&mut self, eventString: &HStringArg, level: LoggingLevel) -> Result<()> { + let hr = ((*self.lpVtbl).LogMessageWithLevel)(self, eventString.get(), level); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn log_value_pair(&mut self, value1: &HStringArg, value2: i32) -> Result<()> { + let hr = ((*self.lpVtbl).LogValuePair)(self, value1.get(), value2); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn log_value_pair_with_level(&mut self, value1: &HStringArg, value2: i32, level: LoggingLevel) -> Result<()> { + let hr = ((*self.lpVtbl).LogValuePairWithLevel)(self, value1.get(), value2, level); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_logging_enabled(&mut self, handler: &super::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LoggingEnabled)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_logging_enabled(&mut self, token: super::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LoggingEnabled)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILoggingChannel2, 2672573683, 2988, 17829, 158, 51, 186, 243, 243, 162, 70, 165); + RT_INTERFACE!{interface ILoggingChannel2(ILoggingChannel2Vtbl): IInspectable(IInspectableVtbl) [IID_ILoggingChannel2] { + fn get_Id(&mut self, out: *mut Guid) -> HRESULT + }} + impl ILoggingChannel2 { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILoggingChannelFactory, 1323064220, 44928, 19099, 176, 220, 57, 143, 154, 229, 32, 123); + RT_INTERFACE!{static interface ILoggingChannelFactory(ILoggingChannelFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingChannelFactory] { + fn Create(&mut self, name: HSTRING, out: *mut *mut LoggingChannel) -> HRESULT + }} + impl ILoggingChannelFactory { + #[inline] pub unsafe fn create(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LoggingChannel: ILoggingChannel [ILoggingChannelFactory] [CLSID_LoggingChannel]} + DEFINE_CLSID!(CLSID_LoggingChannel = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,68,105,97,103,110,111,115,116,105,99,115,46,76,111,103,103,105,110,103,67,104,97,110,110,101,108,0]); + DEFINE_IID!(IID_ILoggingChannelFactory2, 1282340317, 15143, 19913, 153, 240, 41, 156, 110, 70, 3, 161); + RT_INTERFACE!{interface ILoggingChannelFactory2(ILoggingChannelFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_ILoggingChannelFactory2] { + fn CreateWithOptions(&mut self, name: HSTRING, options: *mut LoggingChannelOptions, out: *mut *mut LoggingChannel) -> HRESULT, + fn CreateWithOptionsAndId(&mut self, name: HSTRING, options: *mut LoggingChannelOptions, id: Guid, out: *mut *mut LoggingChannel) -> HRESULT + }} + impl ILoggingChannelFactory2 { + #[inline] pub unsafe fn create_with_options(&mut self, name: &HStringArg, options: &LoggingChannelOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithOptions)(self, name.get(), options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_options_and_id(&mut self, name: &HStringArg, options: &LoggingChannelOptions, id: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithOptionsAndId)(self, name.get(), options as *const _ as *mut _, id, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILoggingActivity, 3154323777, 46950, 19637, 152, 72, 151, 172, 107, 166, 214, 12); + RT_INTERFACE!{interface ILoggingActivity(ILoggingActivityVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingActivity] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Id(&mut self, out: *mut Guid) -> HRESULT + }} + impl ILoggingActivity { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILoggingActivity2, 650287112, 25378, 17770, 175, 130, 128, 200, 100, 47, 23, 139); + RT_INTERFACE!{interface ILoggingActivity2(ILoggingActivity2Vtbl): IInspectable(IInspectableVtbl) [IID_ILoggingActivity2] { + fn get_Channel(&mut self, out: *mut *mut LoggingChannel) -> HRESULT, + fn StopActivity(&mut self, stopEventName: HSTRING) -> HRESULT, + fn StopActivityWithFields(&mut self, stopEventName: HSTRING, fields: *mut LoggingFields) -> HRESULT, + fn StopActivityWithFieldsAndOptions(&mut self, stopEventName: HSTRING, fields: *mut LoggingFields, options: *mut LoggingOptions) -> HRESULT + }} + impl ILoggingActivity2 { + #[inline] pub unsafe fn get_channel(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Channel)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_activity(&mut self, stopEventName: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).StopActivity)(self, stopEventName.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop_activity_with_fields(&mut self, stopEventName: &HStringArg, fields: &LoggingFields) -> Result<()> { + let hr = ((*self.lpVtbl).StopActivityWithFields)(self, stopEventName.get(), fields as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop_activity_with_fields_and_options(&mut self, stopEventName: &HStringArg, fields: &LoggingFields, options: &LoggingOptions) -> Result<()> { + let hr = ((*self.lpVtbl).StopActivityWithFieldsAndOptions)(self, stopEventName.get(), fields as *const _ as *mut _, options as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILoggingActivityFactory, 1798550659, 57610, 19544, 151, 213, 16, 251, 69, 16, 116, 251); + RT_INTERFACE!{static interface ILoggingActivityFactory(ILoggingActivityFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingActivityFactory] { + fn CreateLoggingActivity(&mut self, activityName: HSTRING, loggingChannel: *mut ILoggingChannel, out: *mut *mut LoggingActivity) -> HRESULT, + fn CreateLoggingActivityWithLevel(&mut self, activityName: HSTRING, loggingChannel: *mut ILoggingChannel, level: LoggingLevel, out: *mut *mut LoggingActivity) -> HRESULT + }} + impl ILoggingActivityFactory { + #[inline] pub unsafe fn create_logging_activity(&mut self, activityName: &HStringArg, loggingChannel: &ILoggingChannel) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateLoggingActivity)(self, activityName.get(), loggingChannel as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_logging_activity_with_level(&mut self, activityName: &HStringArg, loggingChannel: &ILoggingChannel, level: LoggingLevel) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateLoggingActivityWithLevel)(self, activityName.get(), loggingChannel as *const _ as *mut _, level, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILoggingSession, 1646392070, 37760, 19159, 186, 245, 65, 234, 147, 16, 215, 104); + RT_INTERFACE!{interface ILoggingSession(ILoggingSessionVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingSession] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SaveToFileAsync(&mut self, folder: *mut super::super::storage::IStorageFolder, fileName: HSTRING, out: *mut *mut super::IAsyncOperation) -> HRESULT, + fn AddLoggingChannel(&mut self, loggingChannel: *mut ILoggingChannel) -> HRESULT, + fn AddLoggingChannelWithLevel(&mut self, loggingChannel: *mut ILoggingChannel, maxLevel: LoggingLevel) -> HRESULT, + fn RemoveLoggingChannel(&mut self, loggingChannel: *mut ILoggingChannel) -> HRESULT + }} + impl ILoggingSession { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn save_to_file_async(&mut self, folder: &super::super::storage::IStorageFolder, fileName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveToFileAsync)(self, folder as *const _ as *mut _, fileName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_logging_channel(&mut self, loggingChannel: &ILoggingChannel) -> Result<()> { + let hr = ((*self.lpVtbl).AddLoggingChannel)(self, loggingChannel as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_logging_channel_with_level(&mut self, loggingChannel: &ILoggingChannel, maxLevel: LoggingLevel) -> Result<()> { + let hr = ((*self.lpVtbl).AddLoggingChannelWithLevel)(self, loggingChannel as *const _ as *mut _, maxLevel); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_logging_channel(&mut self, loggingChannel: &ILoggingChannel) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveLoggingChannel)(self, loggingChannel as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILoggingSessionFactory, 1318289125, 22781, 17888, 140, 47, 161, 50, 239, 249, 92, 30); + RT_INTERFACE!{static interface ILoggingSessionFactory(ILoggingSessionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingSessionFactory] { + fn Create(&mut self, name: HSTRING, out: *mut *mut LoggingSession) -> HRESULT + }} + impl ILoggingSessionFactory { + #[inline] pub unsafe fn create(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LoggingSession: ILoggingSession [ILoggingSessionFactory] [CLSID_LoggingSession]} + DEFINE_CLSID!(CLSID_LoggingSession = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,68,105,97,103,110,111,115,116,105,99,115,46,76,111,103,103,105,110,103,83,101,115,115,105,111,110,0]); + DEFINE_IID!(IID_ILogFileGeneratedEventArgs, 647927663, 3384, 19482, 181, 63, 179, 149, 216, 129, 223, 132); + RT_INTERFACE!{interface ILogFileGeneratedEventArgs(ILogFileGeneratedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ILogFileGeneratedEventArgs] { + #[cfg(feature="windows.storage")] fn get_File(&mut self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT + }} + impl ILogFileGeneratedEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_File)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LogFileGeneratedEventArgs: ILogFileGeneratedEventArgs} + DEFINE_IID!(IID_IFileLoggingSession, 617038358, 65234, 16460, 137, 95, 31, 150, 153, 203, 2, 247); + RT_INTERFACE!{interface IFileLoggingSession(IFileLoggingSessionVtbl): IInspectable(IInspectableVtbl) [IID_IFileLoggingSession] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn AddLoggingChannel(&mut self, loggingChannel: *mut ILoggingChannel) -> HRESULT, + fn AddLoggingChannelWithLevel(&mut self, loggingChannel: *mut ILoggingChannel, maxLevel: LoggingLevel) -> HRESULT, + fn RemoveLoggingChannel(&mut self, loggingChannel: *mut ILoggingChannel) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CloseAndSaveToFileAsync(&mut self, out: *mut *mut super::IAsyncOperation) -> HRESULT, + fn add_LogFileGenerated(&mut self, handler: *mut super::TypedEventHandler, out: *mut super::EventRegistrationToken) -> HRESULT, + fn remove_LogFileGenerated(&mut self, token: super::EventRegistrationToken) -> HRESULT + }} + impl IFileLoggingSession { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_logging_channel(&mut self, loggingChannel: &ILoggingChannel) -> Result<()> { + let hr = ((*self.lpVtbl).AddLoggingChannel)(self, loggingChannel as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_logging_channel_with_level(&mut self, loggingChannel: &ILoggingChannel, maxLevel: LoggingLevel) -> Result<()> { + let hr = ((*self.lpVtbl).AddLoggingChannelWithLevel)(self, loggingChannel as *const _ as *mut _, maxLevel); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_logging_channel(&mut self, loggingChannel: &ILoggingChannel) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveLoggingChannel)(self, loggingChannel as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn close_and_save_to_file_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CloseAndSaveToFileAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_log_file_generated(&mut self, handler: &super::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LogFileGenerated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_log_file_generated(&mut self, token: super::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LogFileGenerated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileLoggingSessionFactory, 4003499470, 33863, 19882, 145, 51, 18, 235, 70, 246, 151, 212); + RT_INTERFACE!{static interface IFileLoggingSessionFactory(IFileLoggingSessionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IFileLoggingSessionFactory] { + fn Create(&mut self, name: HSTRING, out: *mut *mut FileLoggingSession) -> HRESULT + }} + impl IFileLoggingSessionFactory { + #[inline] pub unsafe fn create(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FileLoggingSession: IFileLoggingSession [IFileLoggingSessionFactory] [CLSID_FileLoggingSession]} + DEFINE_CLSID!(CLSID_FileLoggingSession = &[87,105,110,100,111,119,115,46,70,111,117,110,100,97,116,105,111,110,46,68,105,97,103,110,111,115,116,105,99,115,46,70,105,108,101,76,111,103,103,105,110,103,83,101,115,115,105,111,110,0]); +} // Windows.Foundation.Diagnostics +pub mod numerics { // Windows.Foundation.Numerics +use ::prelude::*; + RT_STRUCT! { struct Vector2 { + X: f32, Y: f32, + }} + RT_STRUCT! { struct Vector3 { + X: f32, Y: f32, Z: f32, + }} + RT_STRUCT! { struct Vector4 { + X: f32, Y: f32, Z: f32, W: f32, + }} + RT_STRUCT! { struct Matrix3x2 { + M11: f32, M12: f32, M21: f32, M22: f32, M31: f32, M32: f32, + }} + RT_STRUCT! { struct Matrix4x4 { + M11: f32, M12: f32, M13: f32, M14: f32, M21: f32, M22: f32, M23: f32, M24: f32, M31: f32, M32: f32, M33: f32, M34: f32, M41: f32, M42: f32, M43: f32, M44: f32, + }} + RT_STRUCT! { struct Plane { + Normal: Vector3, D: f32, + }} + RT_STRUCT! { struct Quaternion { + X: f32, Y: f32, Z: f32, W: f32, + }} +} // Windows.Foundation.Numerics +} // Windows.Foundation +#[cfg(feature="windows.gaming")] +pub mod gaming { // Windows.Gaming +pub mod input { // Windows.Gaming.Input +use ::prelude::*; + RT_ENUM! { enum ArcadeStickButtons: u32 { + None (ArcadeStickButtons_None) = 0, StickUp (ArcadeStickButtons_StickUp) = 1, StickDown (ArcadeStickButtons_StickDown) = 2, StickLeft (ArcadeStickButtons_StickLeft) = 4, StickRight (ArcadeStickButtons_StickRight) = 8, Action1 (ArcadeStickButtons_Action1) = 16, Action2 (ArcadeStickButtons_Action2) = 32, Action3 (ArcadeStickButtons_Action3) = 64, Action4 (ArcadeStickButtons_Action4) = 128, Action5 (ArcadeStickButtons_Action5) = 256, Action6 (ArcadeStickButtons_Action6) = 512, Special1 (ArcadeStickButtons_Special1) = 1024, Special2 (ArcadeStickButtons_Special2) = 2048, + }} + RT_ENUM! { enum GameControllerButtonLabel: i32 { + None (GameControllerButtonLabel_None) = 0, XboxBack (GameControllerButtonLabel_XboxBack) = 1, XboxStart (GameControllerButtonLabel_XboxStart) = 2, XboxMenu (GameControllerButtonLabel_XboxMenu) = 3, XboxView (GameControllerButtonLabel_XboxView) = 4, XboxUp (GameControllerButtonLabel_XboxUp) = 5, XboxDown (GameControllerButtonLabel_XboxDown) = 6, XboxLeft (GameControllerButtonLabel_XboxLeft) = 7, XboxRight (GameControllerButtonLabel_XboxRight) = 8, XboxA (GameControllerButtonLabel_XboxA) = 9, XboxB (GameControllerButtonLabel_XboxB) = 10, XboxX (GameControllerButtonLabel_XboxX) = 11, XboxY (GameControllerButtonLabel_XboxY) = 12, XboxLeftBumper (GameControllerButtonLabel_XboxLeftBumper) = 13, XboxLeftTrigger (GameControllerButtonLabel_XboxLeftTrigger) = 14, XboxLeftStickButton (GameControllerButtonLabel_XboxLeftStickButton) = 15, XboxRightBumper (GameControllerButtonLabel_XboxRightBumper) = 16, XboxRightTrigger (GameControllerButtonLabel_XboxRightTrigger) = 17, XboxRightStickButton (GameControllerButtonLabel_XboxRightStickButton) = 18, XboxPaddle1 (GameControllerButtonLabel_XboxPaddle1) = 19, XboxPaddle2 (GameControllerButtonLabel_XboxPaddle2) = 20, XboxPaddle3 (GameControllerButtonLabel_XboxPaddle3) = 21, XboxPaddle4 (GameControllerButtonLabel_XboxPaddle4) = 22, Mode (GameControllerButtonLabel_Mode) = 23, Select (GameControllerButtonLabel_Select) = 24, Menu (GameControllerButtonLabel_Menu) = 25, View (GameControllerButtonLabel_View) = 26, Back (GameControllerButtonLabel_Back) = 27, Start (GameControllerButtonLabel_Start) = 28, Options (GameControllerButtonLabel_Options) = 29, Share (GameControllerButtonLabel_Share) = 30, Up (GameControllerButtonLabel_Up) = 31, Down (GameControllerButtonLabel_Down) = 32, Left (GameControllerButtonLabel_Left) = 33, Right (GameControllerButtonLabel_Right) = 34, LetterA (GameControllerButtonLabel_LetterA) = 35, LetterB (GameControllerButtonLabel_LetterB) = 36, LetterC (GameControllerButtonLabel_LetterC) = 37, LetterL (GameControllerButtonLabel_LetterL) = 38, LetterR (GameControllerButtonLabel_LetterR) = 39, LetterX (GameControllerButtonLabel_LetterX) = 40, LetterY (GameControllerButtonLabel_LetterY) = 41, LetterZ (GameControllerButtonLabel_LetterZ) = 42, Cross (GameControllerButtonLabel_Cross) = 43, Circle (GameControllerButtonLabel_Circle) = 44, Square (GameControllerButtonLabel_Square) = 45, Triangle (GameControllerButtonLabel_Triangle) = 46, LeftBumper (GameControllerButtonLabel_LeftBumper) = 47, LeftTrigger (GameControllerButtonLabel_LeftTrigger) = 48, LeftStickButton (GameControllerButtonLabel_LeftStickButton) = 49, Left1 (GameControllerButtonLabel_Left1) = 50, Left2 (GameControllerButtonLabel_Left2) = 51, Left3 (GameControllerButtonLabel_Left3) = 52, RightBumper (GameControllerButtonLabel_RightBumper) = 53, RightTrigger (GameControllerButtonLabel_RightTrigger) = 54, RightStickButton (GameControllerButtonLabel_RightStickButton) = 55, Right1 (GameControllerButtonLabel_Right1) = 56, Right2 (GameControllerButtonLabel_Right2) = 57, Right3 (GameControllerButtonLabel_Right3) = 58, Paddle1 (GameControllerButtonLabel_Paddle1) = 59, Paddle2 (GameControllerButtonLabel_Paddle2) = 60, Paddle3 (GameControllerButtonLabel_Paddle3) = 61, Paddle4 (GameControllerButtonLabel_Paddle4) = 62, Plus (GameControllerButtonLabel_Plus) = 63, Minus (GameControllerButtonLabel_Minus) = 64, DownLeftArrow (GameControllerButtonLabel_DownLeftArrow) = 65, DialLeft (GameControllerButtonLabel_DialLeft) = 66, DialRight (GameControllerButtonLabel_DialRight) = 67, Suspension (GameControllerButtonLabel_Suspension) = 68, + }} + RT_ENUM! { enum GamepadButtons: u32 { + None (GamepadButtons_None) = 0, Menu (GamepadButtons_Menu) = 1, View (GamepadButtons_View) = 2, A (GamepadButtons_A) = 4, B (GamepadButtons_B) = 8, X (GamepadButtons_X) = 16, Y (GamepadButtons_Y) = 32, DPadUp (GamepadButtons_DPadUp) = 64, DPadDown (GamepadButtons_DPadDown) = 128, DPadLeft (GamepadButtons_DPadLeft) = 256, DPadRight (GamepadButtons_DPadRight) = 512, LeftShoulder (GamepadButtons_LeftShoulder) = 1024, RightShoulder (GamepadButtons_RightShoulder) = 2048, LeftThumbstick (GamepadButtons_LeftThumbstick) = 4096, RightThumbstick (GamepadButtons_RightThumbstick) = 8192, Paddle1 (GamepadButtons_Paddle1) = 16384, Paddle2 (GamepadButtons_Paddle2) = 32768, Paddle3 (GamepadButtons_Paddle3) = 65536, Paddle4 (GamepadButtons_Paddle4) = 131072, + }} + RT_ENUM! { enum RacingWheelButtons: u32 { + None (RacingWheelButtons_None) = 0, PreviousGear (RacingWheelButtons_PreviousGear) = 1, NextGear (RacingWheelButtons_NextGear) = 2, DPadUp (RacingWheelButtons_DPadUp) = 4, DPadDown (RacingWheelButtons_DPadDown) = 8, DPadLeft (RacingWheelButtons_DPadLeft) = 16, DPadRight (RacingWheelButtons_DPadRight) = 32, Button1 (RacingWheelButtons_Button1) = 64, Button2 (RacingWheelButtons_Button2) = 128, Button3 (RacingWheelButtons_Button3) = 256, Button4 (RacingWheelButtons_Button4) = 512, Button5 (RacingWheelButtons_Button5) = 1024, Button6 (RacingWheelButtons_Button6) = 2048, Button7 (RacingWheelButtons_Button7) = 4096, Button8 (RacingWheelButtons_Button8) = 8192, Button9 (RacingWheelButtons_Button9) = 16384, Button10 (RacingWheelButtons_Button10) = 32768, Button11 (RacingWheelButtons_Button11) = 65536, Button12 (RacingWheelButtons_Button12) = 131072, Button13 (RacingWheelButtons_Button13) = 262144, Button14 (RacingWheelButtons_Button14) = 524288, Button15 (RacingWheelButtons_Button15) = 1048576, Button16 (RacingWheelButtons_Button16) = 2097152, + }} + RT_ENUM! { enum RequiredUINavigationButtons: u32 { + None (RequiredUINavigationButtons_None) = 0, Menu (RequiredUINavigationButtons_Menu) = 1, View (RequiredUINavigationButtons_View) = 2, Accept (RequiredUINavigationButtons_Accept) = 4, Cancel (RequiredUINavigationButtons_Cancel) = 8, Up (RequiredUINavigationButtons_Up) = 16, Down (RequiredUINavigationButtons_Down) = 32, Left (RequiredUINavigationButtons_Left) = 64, Right (RequiredUINavigationButtons_Right) = 128, + }} + RT_ENUM! { enum OptionalUINavigationButtons: u32 { + None (OptionalUINavigationButtons_None) = 0, Context1 (OptionalUINavigationButtons_Context1) = 1, Context2 (OptionalUINavigationButtons_Context2) = 2, Context3 (OptionalUINavigationButtons_Context3) = 4, Context4 (OptionalUINavigationButtons_Context4) = 8, PageUp (OptionalUINavigationButtons_PageUp) = 16, PageDown (OptionalUINavigationButtons_PageDown) = 32, PageLeft (OptionalUINavigationButtons_PageLeft) = 64, PageRight (OptionalUINavigationButtons_PageRight) = 128, ScrollUp (OptionalUINavigationButtons_ScrollUp) = 256, ScrollDown (OptionalUINavigationButtons_ScrollDown) = 512, ScrollLeft (OptionalUINavigationButtons_ScrollLeft) = 1024, ScrollRight (OptionalUINavigationButtons_ScrollRight) = 2048, + }} + RT_STRUCT! { struct ArcadeStickReading { + Timestamp: u64, Buttons: ArcadeStickButtons, + }} + RT_STRUCT! { struct GamepadReading { + Timestamp: u64, Buttons: GamepadButtons, LeftTrigger: f64, RightTrigger: f64, LeftThumbstickX: f64, LeftThumbstickY: f64, RightThumbstickX: f64, RightThumbstickY: f64, + }} + RT_STRUCT! { struct GamepadVibration { + LeftMotor: f64, RightMotor: f64, LeftTrigger: f64, RightTrigger: f64, + }} + RT_STRUCT! { struct RacingWheelReading { + Timestamp: u64, Buttons: RacingWheelButtons, PatternShifterGear: i32, Wheel: f64, Throttle: f64, Brake: f64, Clutch: f64, Handbrake: f64, + }} + RT_STRUCT! { struct UINavigationReading { + Timestamp: u64, RequiredButtons: RequiredUINavigationButtons, OptionalButtons: OptionalUINavigationButtons, + }} + DEFINE_IID!(IID_IGameController, 464479522, 24420, 17093, 130, 103, 185, 254, 34, 21, 191, 189); + RT_INTERFACE!{interface IGameController(IGameControllerVtbl): IInspectable(IInspectableVtbl) [IID_IGameController] { + fn add_HeadsetConnected(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_HeadsetConnected(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_HeadsetDisconnected(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_HeadsetDisconnected(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(feature="windows.system")] fn add_UserChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UserChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Headset(&mut self, out: *mut *mut Headset) -> HRESULT, + fn get_IsWireless(&mut self, out: *mut bool) -> HRESULT, + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT + }} + impl IGameController { + #[inline] pub unsafe fn add_headset_connected(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_HeadsetConnected)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_headset_connected(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_HeadsetConnected)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_headset_disconnected(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_HeadsetDisconnected)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_headset_disconnected(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_HeadsetDisconnected)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn add_user_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UserChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_user_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UserChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_headset(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Headset)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_wireless(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsWireless)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Headset: IHeadset} + DEFINE_IID!(IID_IArcadeStick, 2974438301, 48891, 19585, 128, 81, 21, 236, 243, 177, 48, 54); + RT_INTERFACE!{interface IArcadeStick(IArcadeStickVtbl): IInspectable(IInspectableVtbl) [IID_IArcadeStick] { + fn GetButtonLabel(&mut self, button: ArcadeStickButtons, out: *mut GameControllerButtonLabel) -> HRESULT, + fn GetCurrentReading(&mut self, out: *mut ArcadeStickReading) -> HRESULT + }} + impl IArcadeStick { + #[inline] pub unsafe fn get_button_label(&mut self, button: ArcadeStickButtons) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetButtonLabel)(self, button, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IArcadeStickStatics, 1547155656, 14257, 19160, 148, 88, 32, 15, 26, 48, 1, 142); + RT_INTERFACE!{static interface IArcadeStickStatics(IArcadeStickStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IArcadeStickStatics] { + fn add_ArcadeStickAdded(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ArcadeStickAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ArcadeStickRemoved(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ArcadeStickRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_ArcadeSticks(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IArcadeStickStatics { + #[inline] pub unsafe fn add_arcade_stick_added(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ArcadeStickAdded)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_arcade_stick_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ArcadeStickAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_arcade_stick_removed(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ArcadeStickRemoved)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_arcade_stick_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ArcadeStickRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_arcade_sticks(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ArcadeSticks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ArcadeStick: IArcadeStick} + RT_ACTIVATABLE!{IArcadeStickStatics [CLSID_ArcadeStick]} + DEFINE_CLSID!(CLSID_ArcadeStick = &[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,73,110,112,117,116,46,65,114,99,97,100,101,83,116,105,99,107,0]); + DEFINE_IID!(IID_IGamepad, 3162223676, 2665, 14595, 158, 157, 165, 15, 134, 164, 93, 229); + RT_INTERFACE!{interface IGamepad(IGamepadVtbl): IInspectable(IInspectableVtbl) [IID_IGamepad] { + fn get_Vibration(&mut self, out: *mut GamepadVibration) -> HRESULT, + fn put_Vibration(&mut self, value: GamepadVibration) -> HRESULT, + fn GetCurrentReading(&mut self, out: *mut GamepadReading) -> HRESULT + }} + impl IGamepad { + #[inline] pub unsafe fn get_vibration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Vibration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_vibration(&mut self, value: GamepadVibration) -> Result<()> { + let hr = ((*self.lpVtbl).put_Vibration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGamepad2, 1008110013, 22805, 16965, 176, 192, 200, 159, 174, 3, 8, 255); + RT_INTERFACE!{interface IGamepad2(IGamepad2Vtbl): IInspectable(IInspectableVtbl) [IID_IGamepad2] { + fn GetButtonLabel(&mut self, button: GamepadButtons, out: *mut GameControllerButtonLabel) -> HRESULT + }} + impl IGamepad2 { + #[inline] pub unsafe fn get_button_label(&mut self, button: GamepadButtons) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetButtonLabel)(self, button, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGamepadStatics, 2344412457, 54428, 14825, 149, 96, 228, 125, 222, 150, 183, 200); + RT_INTERFACE!{static interface IGamepadStatics(IGamepadStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGamepadStatics] { + fn add_GamepadAdded(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_GamepadAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_GamepadRemoved(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_GamepadRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Gamepads(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IGamepadStatics { + #[inline] pub unsafe fn add_gamepad_added(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_GamepadAdded)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_gamepad_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_GamepadAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_gamepad_removed(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_GamepadRemoved)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_gamepad_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_GamepadRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_gamepads(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gamepads)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Gamepad: IGamepad} + RT_ACTIVATABLE!{IGamepadStatics [CLSID_Gamepad]} + DEFINE_CLSID!(CLSID_Gamepad = &[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,73,110,112,117,116,46,71,97,109,101,112,97,100,0]); + DEFINE_IID!(IID_IHeadset, 1070683887, 26917, 16296, 145, 129, 2, 156, 82, 35, 174, 59); + RT_INTERFACE!{interface IHeadset(IHeadsetVtbl): IInspectable(IInspectableVtbl) [IID_IHeadset] { + fn get_CaptureDeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RenderDeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IHeadset { + #[inline] pub unsafe fn get_capture_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CaptureDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_render_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RenderDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRacingWheel, 4115031407, 57606, 19586, 169, 15, 85, 64, 18, 144, 75, 133); + RT_INTERFACE!{interface IRacingWheel(IRacingWheelVtbl): IInspectable(IInspectableVtbl) [IID_IRacingWheel] { + fn get_HasClutch(&mut self, out: *mut bool) -> HRESULT, + fn get_HasHandbrake(&mut self, out: *mut bool) -> HRESULT, + fn get_HasPatternShifter(&mut self, out: *mut bool) -> HRESULT, + fn get_MaxPatternShifterGear(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxWheelAngle(&mut self, out: *mut f64) -> HRESULT, + fn get_WheelMotor(&mut self, out: *mut *mut forcefeedback::ForceFeedbackMotor) -> HRESULT, + fn GetButtonLabel(&mut self, button: RacingWheelButtons, out: *mut GameControllerButtonLabel) -> HRESULT, + fn GetCurrentReading(&mut self, out: *mut RacingWheelReading) -> HRESULT + }} + impl IRacingWheel { + #[inline] pub unsafe fn get_has_clutch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasClutch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_handbrake(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasHandbrake)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_pattern_shifter(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasPatternShifter)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_pattern_shifter_gear(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPatternShifterGear)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_wheel_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxWheelAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_wheel_motor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WheelMotor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_button_label(&mut self, button: RacingWheelButtons) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetButtonLabel)(self, button, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRacingWheelStatics, 985738453, 22555, 18742, 159, 148, 105, 241, 230, 81, 76, 125); + RT_INTERFACE!{static interface IRacingWheelStatics(IRacingWheelStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRacingWheelStatics] { + fn add_RacingWheelAdded(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RacingWheelAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RacingWheelRemoved(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RacingWheelRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_RacingWheels(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IRacingWheelStatics { + #[inline] pub unsafe fn add_racing_wheel_added(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RacingWheelAdded)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_racing_wheel_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RacingWheelAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_racing_wheel_removed(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RacingWheelRemoved)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_racing_wheel_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RacingWheelRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_racing_wheels(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RacingWheels)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RacingWheel: IRacingWheel} + RT_ACTIVATABLE!{IRacingWheelStatics [CLSID_RacingWheel]} + DEFINE_CLSID!(CLSID_RacingWheel = &[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,73,110,112,117,116,46,82,97,99,105,110,103,87,104,101,101,108,0]); + DEFINE_IID!(IID_IUINavigationController, 3853447133, 62734, 19029, 140, 220, 211, 50, 41, 84, 129, 117); + RT_INTERFACE!{interface IUINavigationController(IUINavigationControllerVtbl): IInspectable(IInspectableVtbl) [IID_IUINavigationController] { + fn GetCurrentReading(&mut self, out: *mut UINavigationReading) -> HRESULT, + fn GetOptionalButtonLabel(&mut self, button: OptionalUINavigationButtons, out: *mut GameControllerButtonLabel) -> HRESULT, + fn GetRequiredButtonLabel(&mut self, button: RequiredUINavigationButtons, out: *mut GameControllerButtonLabel) -> HRESULT + }} + impl IUINavigationController { + #[inline] pub unsafe fn get_current_reading(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCurrentReading)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_optional_button_label(&mut self, button: OptionalUINavigationButtons) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetOptionalButtonLabel)(self, button, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_required_button_label(&mut self, button: RequiredUINavigationButtons) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetRequiredButtonLabel)(self, button, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUINavigationControllerStatics, 789877514, 63224, 19016, 141, 137, 148, 120, 108, 202, 12, 46); + RT_INTERFACE!{static interface IUINavigationControllerStatics(IUINavigationControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUINavigationControllerStatics] { + fn add_UINavigationControllerAdded(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UINavigationControllerAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_UINavigationControllerRemoved(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UINavigationControllerRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_UINavigationControllers(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IUINavigationControllerStatics { + #[inline] pub unsafe fn add_uinavigation_controller_added(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UINavigationControllerAdded)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_uinavigation_controller_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UINavigationControllerAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uinavigation_controller_removed(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UINavigationControllerRemoved)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_uinavigation_controller_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UINavigationControllerRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_uinavigation_controllers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UINavigationControllers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UINavigationController: IUINavigationController} + RT_ACTIVATABLE!{IUINavigationControllerStatics [CLSID_UINavigationController]} + DEFINE_CLSID!(CLSID_UINavigationController = &[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,73,110,112,117,116,46,85,73,78,97,118,105,103,97,116,105,111,110,67,111,110,116,114,111,108,108,101,114,0]); +pub mod custom { // Windows.Gaming.Input.Custom +use ::prelude::*; + RT_ENUM! { enum GipFirmwareUpdateStatus: i32 { + Completed (GipFirmwareUpdateStatus_Completed) = 0, UpToDate (GipFirmwareUpdateStatus_UpToDate) = 1, Failed (GipFirmwareUpdateStatus_Failed) = 2, + }} + RT_ENUM! { enum GipMessageClass: i32 { + Command (GipMessageClass_Command) = 0, LowLatency (GipMessageClass_LowLatency) = 1, StandardLatency (GipMessageClass_StandardLatency) = 2, + }} + RT_ENUM! { enum XusbDeviceType: i32 { + Unknown (XusbDeviceType_Unknown) = 0, Gamepad (XusbDeviceType_Gamepad) = 1, + }} + RT_ENUM! { enum XusbDeviceSubtype: i32 { + Unknown (XusbDeviceSubtype_Unknown) = 0, Gamepad (XusbDeviceSubtype_Gamepad) = 1, ArcadePad (XusbDeviceSubtype_ArcadePad) = 2, ArcadeStick (XusbDeviceSubtype_ArcadeStick) = 3, FlightStick (XusbDeviceSubtype_FlightStick) = 4, Wheel (XusbDeviceSubtype_Wheel) = 5, Guitar (XusbDeviceSubtype_Guitar) = 6, GuitarAlternate (XusbDeviceSubtype_GuitarAlternate) = 7, GuitarBass (XusbDeviceSubtype_GuitarBass) = 8, DrumKit (XusbDeviceSubtype_DrumKit) = 9, DancePad (XusbDeviceSubtype_DancePad) = 10, + }} + RT_STRUCT! { struct GameControllerVersionInfo { + Major: u16, Minor: u16, Build: u16, Revision: u16, + }} + RT_STRUCT! { struct GipFirmwareUpdateProgress { + PercentCompleted: f64, CurrentComponentId: u32, + }} + DEFINE_IID!(IID_IGameControllerInputSink, 536279330, 50752, 19576, 168, 32, 154, 113, 92, 85, 139, 203); + RT_INTERFACE!{interface IGameControllerInputSink(IGameControllerInputSinkVtbl): IInspectable(IInspectableVtbl) [IID_IGameControllerInputSink] { + fn OnInputResumed(&mut self, timestamp: u64) -> HRESULT, + fn OnInputSuspended(&mut self, timestamp: u64) -> HRESULT + }} + impl IGameControllerInputSink { + #[inline] pub unsafe fn on_input_resumed(&mut self, timestamp: u64) -> Result<()> { + let hr = ((*self.lpVtbl).OnInputResumed)(self, timestamp); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_input_suspended(&mut self, timestamp: u64) -> Result<()> { + let hr = ((*self.lpVtbl).OnInputSuspended)(self, timestamp); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGipGameControllerInputSink, 2718993087, 2545, 17340, 161, 64, 128, 248, 153, 236, 54, 251); + RT_INTERFACE!{interface IGipGameControllerInputSink(IGipGameControllerInputSinkVtbl): IInspectable(IInspectableVtbl) [IID_IGipGameControllerInputSink] { + fn OnKeyReceived(&mut self, timestamp: u64, keyCode: u8, isPressed: bool) -> HRESULT, + fn OnMessageReceived(&mut self, timestamp: u64, messageClass: GipMessageClass, messageId: u8, sequenceId: u8, messageBufferSize: u32, messageBuffer: *mut u8) -> HRESULT + }} + impl IGipGameControllerInputSink { + #[inline] pub unsafe fn on_key_received(&mut self, timestamp: u64, keyCode: u8, isPressed: bool) -> Result<()> { + let hr = ((*self.lpVtbl).OnKeyReceived)(self, timestamp, keyCode, isPressed); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_message_received(&mut self, timestamp: u64, messageClass: GipMessageClass, messageId: u8, sequenceId: u8, messageBuffer: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).OnMessageReceived)(self, timestamp, messageClass, messageId, sequenceId, messageBuffer.len() as u32, messageBuffer.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IXusbGameControllerInputSink, 2997624213, 28363, 17075, 138, 171, 2, 84, 1, 202, 71, 18); + RT_INTERFACE!{interface IXusbGameControllerInputSink(IXusbGameControllerInputSinkVtbl): IInspectable(IInspectableVtbl) [IID_IXusbGameControllerInputSink] { + fn OnInputReceived(&mut self, timestamp: u64, reportId: u8, inputBufferSize: u32, inputBuffer: *mut u8) -> HRESULT + }} + impl IXusbGameControllerInputSink { + #[inline] pub unsafe fn on_input_received(&mut self, timestamp: u64, reportId: u8, inputBuffer: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).OnInputReceived)(self, timestamp, reportId, inputBuffer.len() as u32, inputBuffer.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGipFirmwareUpdateResult, 1803111730, 34131, 17042, 142, 3, 225, 102, 81, 162, 248, 188); + RT_INTERFACE!{interface IGipFirmwareUpdateResult(IGipFirmwareUpdateResultVtbl): IInspectable(IInspectableVtbl) [IID_IGipFirmwareUpdateResult] { + fn get_ExtendedErrorCode(&mut self, out: *mut u32) -> HRESULT, + fn get_FinalComponentId(&mut self, out: *mut u32) -> HRESULT, + fn get_Status(&mut self, out: *mut GipFirmwareUpdateStatus) -> HRESULT + }} + impl IGipFirmwareUpdateResult { + #[inline] pub unsafe fn get_extended_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_final_component_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FinalComponentId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGameControllerProvider, 3872864642, 10646, 17753, 177, 108, 62, 87, 212, 110, 88, 214); + RT_INTERFACE!{interface IGameControllerProvider(IGameControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_IGameControllerProvider] { + fn get_FirmwareVersionInfo(&mut self, out: *mut GameControllerVersionInfo) -> HRESULT, + fn get_HardwareProductId(&mut self, out: *mut u16) -> HRESULT, + fn get_HardwareVendorId(&mut self, out: *mut u16) -> HRESULT, + fn get_HardwareVersionInfo(&mut self, out: *mut GameControllerVersionInfo) -> HRESULT, + fn get_IsConnected(&mut self, out: *mut bool) -> HRESULT + }} + impl IGameControllerProvider { + #[inline] pub unsafe fn get_firmware_version_info(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FirmwareVersionInfo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_hardware_product_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HardwareProductId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_hardware_vendor_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HardwareVendorId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_hardware_version_info(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HardwareVersionInfo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_connected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsConnected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGipGameControllerProvider, 3687783961, 6901, 17832, 191, 2, 160, 238, 80, 200, 35, 252); + RT_INTERFACE!{interface IGipGameControllerProvider(IGipGameControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_IGipGameControllerProvider] { + fn SendMessage(&mut self, messageClass: GipMessageClass, messageId: u8, messageBufferSize: u32, messageBuffer: *mut u8) -> HRESULT, + fn SendReceiveMessage(&mut self, messageClass: GipMessageClass, messageId: u8, requestMessageBufferSize: u32, requestMessageBuffer: *mut u8, responseMessageBufferSize: u32, responseMessageBuffer: *mut u8) -> HRESULT, + #[cfg(feature="windows.storage")] fn UpdateFirmwareAsync(&mut self, firmwareImage: *mut ::rt::gen::windows::storage::streams::IInputStream, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IGipGameControllerProvider { + #[inline] pub unsafe fn send_message(&mut self, messageClass: GipMessageClass, messageId: u8, messageBuffer: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).SendMessage)(self, messageClass, messageId, messageBuffer.len() as u32, messageBuffer.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn send_receive_message(&mut self, messageClass: GipMessageClass, messageId: u8, requestMessageBuffer: &[u8], responseMessageBufferSize: u32, responseMessageBuffer: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).SendReceiveMessage)(self, messageClass, messageId, requestMessageBuffer.len() as u32, requestMessageBuffer.as_ptr() as *mut _, responseMessageBufferSize, responseMessageBuffer); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn update_firmware_async(&mut self, firmwareImage: &::rt::gen::windows::storage::streams::IInputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateFirmwareAsync)(self, firmwareImage as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GipFirmwareUpdateResult: IGipFirmwareUpdateResult} + DEFINE_IID!(IID_IXusbGameControllerProvider, 1848209899, 3835, 18612, 128, 139, 131, 118, 67, 178, 242, 22); + RT_INTERFACE!{interface IXusbGameControllerProvider(IXusbGameControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_IXusbGameControllerProvider] { + fn SetVibration(&mut self, lowFrequencyMotorSpeed: f64, highFrequencyMotorSpeed: f64) -> HRESULT + }} + impl IXusbGameControllerProvider { + #[inline] pub unsafe fn set_vibration(&mut self, lowFrequencyMotorSpeed: f64, highFrequencyMotorSpeed: f64) -> Result<()> { + let hr = ((*self.lpVtbl).SetVibration)(self, lowFrequencyMotorSpeed, highFrequencyMotorSpeed); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICustomGameControllerFactory, 1772138078, 30094, 19646, 172, 230, 98, 21, 95, 233, 18, 111); + RT_INTERFACE!{interface ICustomGameControllerFactory(ICustomGameControllerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICustomGameControllerFactory] { + fn CreateGameController(&mut self, provider: *mut IGameControllerProvider, out: *mut *mut IInspectable) -> HRESULT, + fn OnGameControllerAdded(&mut self, value: *mut super::IGameController) -> HRESULT, + fn OnGameControllerRemoved(&mut self, value: *mut super::IGameController) -> HRESULT + }} + impl ICustomGameControllerFactory { + #[inline] pub unsafe fn create_game_controller(&mut self, provider: &IGameControllerProvider) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateGameController)(self, provider as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn on_game_controller_added(&mut self, value: &super::IGameController) -> Result<()> { + let hr = ((*self.lpVtbl).OnGameControllerAdded)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_game_controller_removed(&mut self, value: &super::IGameController) -> Result<()> { + let hr = ((*self.lpVtbl).OnGameControllerRemoved)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGameControllerFactoryManagerStatics, 919299811, 53409, 18822, 162, 76, 64, 177, 55, 222, 186, 158); + RT_INTERFACE!{static interface IGameControllerFactoryManagerStatics(IGameControllerFactoryManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGameControllerFactoryManagerStatics] { + fn RegisterCustomFactoryForGipInterface(&mut self, factory: *mut ICustomGameControllerFactory, interfaceId: Guid) -> HRESULT, + fn RegisterCustomFactoryForHardwareId(&mut self, factory: *mut ICustomGameControllerFactory, hardwareVendorId: u16, hardwareProductId: u16) -> HRESULT, + fn RegisterCustomFactoryForXusbType(&mut self, factory: *mut ICustomGameControllerFactory, xusbType: XusbDeviceType, xusbSubtype: XusbDeviceSubtype) -> HRESULT + }} + impl IGameControllerFactoryManagerStatics { + #[inline] pub unsafe fn register_custom_factory_for_gip_interface(&mut self, factory: &ICustomGameControllerFactory, interfaceId: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterCustomFactoryForGipInterface)(self, factory as *const _ as *mut _, interfaceId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_custom_factory_for_hardware_id(&mut self, factory: &ICustomGameControllerFactory, hardwareVendorId: u16, hardwareProductId: u16) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterCustomFactoryForHardwareId)(self, factory as *const _ as *mut _, hardwareVendorId, hardwareProductId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_custom_factory_for_xusb_type(&mut self, factory: &ICustomGameControllerFactory, xusbType: XusbDeviceType, xusbSubtype: XusbDeviceSubtype) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterCustomFactoryForXusbType)(self, factory as *const _ as *mut _, xusbType, xusbSubtype); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class GipGameControllerProvider: IGipGameControllerProvider} + RT_CLASS!{class XusbGameControllerProvider: IXusbGameControllerProvider} + RT_ACTIVATABLE!{IGameControllerFactoryManagerStatics [CLSID_GameControllerFactoryManager]} + DEFINE_CLSID!(CLSID_GameControllerFactoryManager = &[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,73,110,112,117,116,46,67,117,115,116,111,109,46,71,97,109,101,67,111,110,116,114,111,108,108,101,114,70,97,99,116,111,114,121,77,97,110,97,103,101,114,0]); +} // Windows.Gaming.Input.Custom +pub mod forcefeedback { // Windows.Gaming.Input.ForceFeedback +use ::prelude::*; + RT_ENUM! { enum ConditionForceEffectKind: i32 { + Spring (ConditionForceEffectKind_Spring) = 0, Damper (ConditionForceEffectKind_Damper) = 1, Inertia (ConditionForceEffectKind_Inertia) = 2, Friction (ConditionForceEffectKind_Friction) = 3, + }} + RT_ENUM! { enum ForceFeedbackEffectAxes: u32 { + None (ForceFeedbackEffectAxes_None) = 0, X (ForceFeedbackEffectAxes_X) = 1, Y (ForceFeedbackEffectAxes_Y) = 2, Z (ForceFeedbackEffectAxes_Z) = 4, + }} + RT_ENUM! { enum ForceFeedbackEffectState: i32 { + Stopped (ForceFeedbackEffectState_Stopped) = 0, Running (ForceFeedbackEffectState_Running) = 1, Paused (ForceFeedbackEffectState_Paused) = 2, Faulted (ForceFeedbackEffectState_Faulted) = 3, + }} + RT_ENUM! { enum ForceFeedbackLoadEffectResult: i32 { + Succeeded (ForceFeedbackLoadEffectResult_Succeeded) = 0, EffectStorageFull (ForceFeedbackLoadEffectResult_EffectStorageFull) = 1, EffectNotSupported (ForceFeedbackLoadEffectResult_EffectNotSupported) = 2, + }} + RT_ENUM! { enum PeriodicForceEffectKind: i32 { + SquareWave (PeriodicForceEffectKind_SquareWave) = 0, SineWave (PeriodicForceEffectKind_SineWave) = 1, TriangleWave (PeriodicForceEffectKind_TriangleWave) = 2, SawtoothWaveUp (PeriodicForceEffectKind_SawtoothWaveUp) = 3, SawtoothWaveDown (PeriodicForceEffectKind_SawtoothWaveDown) = 4, + }} + DEFINE_IID!(IID_IForceFeedbackEffect, 2709502476, 10980, 18626, 128, 99, 234, 189, 7, 119, 203, 137); + RT_INTERFACE!{interface IForceFeedbackEffect(IForceFeedbackEffectVtbl): IInspectable(IInspectableVtbl) [IID_IForceFeedbackEffect] { + fn get_Gain(&mut self, out: *mut f64) -> HRESULT, + fn put_Gain(&mut self, value: f64) -> HRESULT, + fn get_State(&mut self, out: *mut ForceFeedbackEffectState) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IForceFeedbackEffect { + #[inline] pub unsafe fn get_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_gain(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Gain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IConditionForceEffect, 852617832, 13973, 20073, 133, 192, 205, 25, 68, 24, 145, 64); + RT_INTERFACE!{interface IConditionForceEffect(IConditionForceEffectVtbl): IInspectable(IInspectableVtbl) [IID_IConditionForceEffect] { + fn get_Kind(&mut self, out: *mut ConditionForceEffectKind) -> HRESULT, + fn SetParameters(&mut self, direction: ::rt::gen::windows::foundation::numerics::Vector3, positiveCoefficient: f32, negativeCoefficient: f32, maxPositiveMagnitude: f32, maxNegativeMagnitude: f32, deadZone: f32, bias: f32) -> HRESULT + }} + impl IConditionForceEffect { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_parameters(&mut self, direction: ::rt::gen::windows::foundation::numerics::Vector3, positiveCoefficient: f32, negativeCoefficient: f32, maxPositiveMagnitude: f32, maxNegativeMagnitude: f32, deadZone: f32, bias: f32) -> Result<()> { + let hr = ((*self.lpVtbl).SetParameters)(self, direction, positiveCoefficient, negativeCoefficient, maxPositiveMagnitude, maxNegativeMagnitude, deadZone, bias); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IConditionForceEffectFactory, 2443809380, 6160, 20150, 167, 115, 191, 211, 184, 205, 219, 171); + RT_INTERFACE!{static interface IConditionForceEffectFactory(IConditionForceEffectFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IConditionForceEffectFactory] { + fn CreateInstance(&mut self, effectKind: ConditionForceEffectKind, out: *mut *mut ConditionForceEffect) -> HRESULT + }} + impl IConditionForceEffectFactory { + #[inline] pub unsafe fn create_instance(&mut self, effectKind: ConditionForceEffectKind) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, effectKind, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ConditionForceEffect: IForceFeedbackEffect [IConditionForceEffectFactory] [CLSID_ConditionForceEffect]} + DEFINE_CLSID!(CLSID_ConditionForceEffect = &[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,73,110,112,117,116,46,70,111,114,99,101,70,101,101,100,98,97,99,107,46,67,111,110,100,105,116,105,111,110,70,111,114,99,101,69,102,102,101,99,116,0]); + DEFINE_IID!(IID_IConstantForceEffect, 2616852800, 62407, 16732, 176, 104, 15, 6, 135, 52, 188, 224); + RT_INTERFACE!{interface IConstantForceEffect(IConstantForceEffectVtbl): IInspectable(IInspectableVtbl) [IID_IConstantForceEffect] { + fn SetParameters(&mut self, vector: ::rt::gen::windows::foundation::numerics::Vector3, duration: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn SetParametersWithEnvelope(&mut self, vector: ::rt::gen::windows::foundation::numerics::Vector3, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: ::rt::gen::windows::foundation::TimeSpan, attackDuration: ::rt::gen::windows::foundation::TimeSpan, sustainDuration: ::rt::gen::windows::foundation::TimeSpan, releaseDuration: ::rt::gen::windows::foundation::TimeSpan, repeatCount: u32) -> HRESULT + }} + impl IConstantForceEffect { + #[inline] pub unsafe fn set_parameters(&mut self, vector: ::rt::gen::windows::foundation::numerics::Vector3, duration: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).SetParameters)(self, vector, duration); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_parameters_with_envelope(&mut self, vector: ::rt::gen::windows::foundation::numerics::Vector3, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: ::rt::gen::windows::foundation::TimeSpan, attackDuration: ::rt::gen::windows::foundation::TimeSpan, sustainDuration: ::rt::gen::windows::foundation::TimeSpan, releaseDuration: ::rt::gen::windows::foundation::TimeSpan, repeatCount: u32) -> Result<()> { + let hr = ((*self.lpVtbl).SetParametersWithEnvelope)(self, vector, attackGain, sustainGain, releaseGain, startDelay, attackDuration, sustainDuration, releaseDuration, repeatCount); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPeriodicForceEffect, 1548826839, 64629, 19794, 154, 10, 239, 228, 202, 181, 254, 100); + RT_INTERFACE!{interface IPeriodicForceEffect(IPeriodicForceEffectVtbl): IInspectable(IInspectableVtbl) [IID_IPeriodicForceEffect] { + fn get_Kind(&mut self, out: *mut PeriodicForceEffectKind) -> HRESULT, + fn SetParameters(&mut self, vector: ::rt::gen::windows::foundation::numerics::Vector3, frequency: f32, phase: f32, bias: f32, duration: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn SetParametersWithEnvelope(&mut self, vector: ::rt::gen::windows::foundation::numerics::Vector3, frequency: f32, phase: f32, bias: f32, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: ::rt::gen::windows::foundation::TimeSpan, attackDuration: ::rt::gen::windows::foundation::TimeSpan, sustainDuration: ::rt::gen::windows::foundation::TimeSpan, releaseDuration: ::rt::gen::windows::foundation::TimeSpan, repeatCount: u32) -> HRESULT + }} + impl IPeriodicForceEffect { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_parameters(&mut self, vector: ::rt::gen::windows::foundation::numerics::Vector3, frequency: f32, phase: f32, bias: f32, duration: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).SetParameters)(self, vector, frequency, phase, bias, duration); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_parameters_with_envelope(&mut self, vector: ::rt::gen::windows::foundation::numerics::Vector3, frequency: f32, phase: f32, bias: f32, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: ::rt::gen::windows::foundation::TimeSpan, attackDuration: ::rt::gen::windows::foundation::TimeSpan, sustainDuration: ::rt::gen::windows::foundation::TimeSpan, releaseDuration: ::rt::gen::windows::foundation::TimeSpan, repeatCount: u32) -> Result<()> { + let hr = ((*self.lpVtbl).SetParametersWithEnvelope)(self, vector, frequency, phase, bias, attackGain, sustainGain, releaseGain, startDelay, attackDuration, sustainDuration, releaseDuration, repeatCount); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPeriodicForceEffectFactory, 1868753690, 38993, 18299, 179, 24, 53, 236, 170, 21, 7, 15); + RT_INTERFACE!{static interface IPeriodicForceEffectFactory(IPeriodicForceEffectFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPeriodicForceEffectFactory] { + fn CreateInstance(&mut self, effectKind: PeriodicForceEffectKind, out: *mut *mut PeriodicForceEffect) -> HRESULT + }} + impl IPeriodicForceEffectFactory { + #[inline] pub unsafe fn create_instance(&mut self, effectKind: PeriodicForceEffectKind) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, effectKind, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PeriodicForceEffect: IForceFeedbackEffect [IPeriodicForceEffectFactory] [CLSID_PeriodicForceEffect]} + DEFINE_CLSID!(CLSID_PeriodicForceEffect = &[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,73,110,112,117,116,46,70,111,114,99,101,70,101,101,100,98,97,99,107,46,80,101,114,105,111,100,105,99,70,111,114,99,101,69,102,102,101,99,116,0]); + DEFINE_IID!(IID_IRampForceEffect, 4059566681, 7334, 16512, 181, 109, 180, 63, 51, 84, 208, 82); + RT_INTERFACE!{interface IRampForceEffect(IRampForceEffectVtbl): IInspectable(IInspectableVtbl) [IID_IRampForceEffect] { + fn SetParameters(&mut self, startVector: ::rt::gen::windows::foundation::numerics::Vector3, endVector: ::rt::gen::windows::foundation::numerics::Vector3, duration: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn SetParametersWithEnvelope(&mut self, startVector: ::rt::gen::windows::foundation::numerics::Vector3, endVector: ::rt::gen::windows::foundation::numerics::Vector3, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: ::rt::gen::windows::foundation::TimeSpan, attackDuration: ::rt::gen::windows::foundation::TimeSpan, sustainDuration: ::rt::gen::windows::foundation::TimeSpan, releaseDuration: ::rt::gen::windows::foundation::TimeSpan, repeatCount: u32) -> HRESULT + }} + impl IRampForceEffect { + #[inline] pub unsafe fn set_parameters(&mut self, startVector: ::rt::gen::windows::foundation::numerics::Vector3, endVector: ::rt::gen::windows::foundation::numerics::Vector3, duration: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).SetParameters)(self, startVector, endVector, duration); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_parameters_with_envelope(&mut self, startVector: ::rt::gen::windows::foundation::numerics::Vector3, endVector: ::rt::gen::windows::foundation::numerics::Vector3, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: ::rt::gen::windows::foundation::TimeSpan, attackDuration: ::rt::gen::windows::foundation::TimeSpan, sustainDuration: ::rt::gen::windows::foundation::TimeSpan, releaseDuration: ::rt::gen::windows::foundation::TimeSpan, repeatCount: u32) -> Result<()> { + let hr = ((*self.lpVtbl).SetParametersWithEnvelope)(self, startVector, endVector, attackGain, sustainGain, releaseGain, startDelay, attackDuration, sustainDuration, releaseDuration, repeatCount); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IForceFeedbackMotor, 2369601916, 42474, 17686, 128, 38, 43, 0, 247, 78, 246, 229); + RT_INTERFACE!{interface IForceFeedbackMotor(IForceFeedbackMotorVtbl): IInspectable(IInspectableVtbl) [IID_IForceFeedbackMotor] { + fn get_AreEffectsPaused(&mut self, out: *mut bool) -> HRESULT, + fn get_MasterGain(&mut self, out: *mut f64) -> HRESULT, + fn put_MasterGain(&mut self, value: f64) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportedAxes(&mut self, out: *mut ForceFeedbackEffectAxes) -> HRESULT, + fn LoadEffectAsync(&mut self, effect: *mut IForceFeedbackEffect, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn PauseAllEffects(&mut self) -> HRESULT, + fn ResumeAllEffects(&mut self) -> HRESULT, + fn StopAllEffects(&mut self) -> HRESULT, + fn TryDisableAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn TryEnableAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn TryResetAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn TryUnloadEffectAsync(&mut self, effect: *mut IForceFeedbackEffect, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IForceFeedbackMotor { + #[inline] pub unsafe fn get_are_effects_paused(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AreEffectsPaused)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_master_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MasterGain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_master_gain(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MasterGain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_axes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportedAxes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn load_effect_async(&mut self, effect: &IForceFeedbackEffect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadEffectAsync)(self, effect as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pause_all_effects(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).PauseAllEffects)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn resume_all_effects(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ResumeAllEffects)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop_all_effects(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).StopAllEffects)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_disable_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryDisableAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_enable_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryEnableAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_reset_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryResetAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_unload_effect_async(&mut self, effect: &IForceFeedbackEffect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryUnloadEffectAsync)(self, effect as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ConstantForceEffect: IForceFeedbackEffect} + RT_CLASS!{class RampForceEffect: IForceFeedbackEffect} + RT_CLASS!{class ForceFeedbackMotor: IForceFeedbackMotor} +} // Windows.Gaming.Input.ForceFeedback +} // Windows.Gaming.Input +pub mod ui { // Windows.Gaming.UI +use ::prelude::*; + DEFINE_IID!(IID_IGameBarStatics, 498705042, 52344, 16755, 190, 69, 182, 30, 103, 40, 62, 167); + RT_INTERFACE!{static interface IGameBarStatics(IGameBarStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGameBarStatics] { + fn add_VisibilityChanged(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisibilityChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_IsInputRedirectedChanged(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsInputRedirectedChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Visible(&mut self, out: *mut bool) -> HRESULT, + fn get_IsInputRedirected(&mut self, out: *mut bool) -> HRESULT + }} + impl IGameBarStatics { + #[inline] pub unsafe fn add_visibility_changed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VisibilityChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_visibility_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VisibilityChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_is_input_redirected_changed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_IsInputRedirectedChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_is_input_redirected_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_IsInputRedirectedChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Visible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_input_redirected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInputRedirected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IGameBarStatics [CLSID_GameBar]} + DEFINE_CLSID!(CLSID_GameBar = &[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,85,73,46,71,97,109,101,66,97,114,0]); +} // Windows.Gaming.UI +pub mod xboxlive { // Windows.Gaming.XboxLive +use ::prelude::*; + RT_STRUCT! { struct StorageApiContract { + + }} +pub mod storage { // Windows.Gaming.XboxLive.Storage +use ::prelude::*; + RT_ENUM! { enum GameSaveErrorStatus: i32 { + Ok (GameSaveErrorStatus_Ok) = 0, Abort (GameSaveErrorStatus_Abort) = -2147467260, InvalidContainerName (GameSaveErrorStatus_InvalidContainerName) = -2138898431, NoAccess (GameSaveErrorStatus_NoAccess) = -2138898430, OutOfLocalStorage (GameSaveErrorStatus_OutOfLocalStorage) = -2138898429, UserCanceled (GameSaveErrorStatus_UserCanceled) = -2138898428, UpdateTooBig (GameSaveErrorStatus_UpdateTooBig) = -2138898427, QuotaExceeded (GameSaveErrorStatus_QuotaExceeded) = -2138898426, ProvidedBufferTooSmall (GameSaveErrorStatus_ProvidedBufferTooSmall) = -2138898425, BlobNotFound (GameSaveErrorStatus_BlobNotFound) = -2138898424, NoXboxLiveInfo (GameSaveErrorStatus_NoXboxLiveInfo) = -2138898423, ContainerNotInSync (GameSaveErrorStatus_ContainerNotInSync) = -2138898422, ContainerSyncFailed (GameSaveErrorStatus_ContainerSyncFailed) = -2138898421, UserHasNoXboxLiveInfo (GameSaveErrorStatus_UserHasNoXboxLiveInfo) = -2138898420, ObjectExpired (GameSaveErrorStatus_ObjectExpired) = -2138898419, + }} + DEFINE_IID!(IID_IGameSaveProvider, 2426798996, 33022, 16913, 151, 248, 165, 222, 20, 221, 149, 210); + RT_INTERFACE!{interface IGameSaveProvider(IGameSaveProviderVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveProvider] { + #[cfg(not(feature="windows.system"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut ::rt::gen::windows::system::User) -> HRESULT, + fn CreateContainer(&mut self, name: HSTRING, out: *mut *mut GameSaveContainer) -> HRESULT, + fn DeleteContainerAsync(&mut self, name: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn CreateContainerInfoQuery(&mut self, out: *mut *mut GameSaveContainerInfoQuery) -> HRESULT, + fn CreateContainerInfoQueryWithName(&mut self, containerNamePrefix: HSTRING, out: *mut *mut GameSaveContainerInfoQuery) -> HRESULT, + fn GetRemainingBytesInQuotaAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn get_ContainersChangedSinceLastSync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IGameSaveProvider { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_container(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateContainer)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_container_async(&mut self, name: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteContainerAsync)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_container_info_query(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateContainerInfoQuery)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_container_info_query_with_name(&mut self, containerNamePrefix: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateContainerInfoQueryWithName)(self, containerNamePrefix.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remaining_bytes_in_quota_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRemainingBytesInQuotaAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_containers_changed_since_last_sync(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContainersChangedSinceLastSync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GameSaveContainer: IGameSaveContainer} + RT_CLASS!{class GameSaveOperationResult: IGameSaveOperationResult} + RT_CLASS!{class GameSaveContainerInfoQuery: IGameSaveContainerInfoQuery} + DEFINE_IID!(IID_IGameSaveProviderStatics, 3491577552, 31491, 17565, 140, 189, 52, 2, 132, 42, 16, 72); + RT_INTERFACE!{static interface IGameSaveProviderStatics(IGameSaveProviderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveProviderStatics] { + #[cfg(feature="windows.system")] fn GetForUserAsync(&mut self, user: *mut ::rt::gen::windows::system::User, serviceConfigId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.system")] fn GetSyncOnDemandForUserAsync(&mut self, user: *mut ::rt::gen::windows::system::User, serviceConfigId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IGameSaveProviderStatics { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user_async(&mut self, user: &::rt::gen::windows::system::User, serviceConfigId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForUserAsync)(self, user as *const _ as *mut _, serviceConfigId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_sync_on_demand_for_user_async(&mut self, user: &::rt::gen::windows::system::User, serviceConfigId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSyncOnDemandForUserAsync)(self, user as *const _ as *mut _, serviceConfigId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GameSaveProviderGetResult: IGameSaveProviderGetResult} + RT_CLASS!{class GameSaveProvider: IGameSaveProvider} + RT_ACTIVATABLE!{IGameSaveProviderStatics [CLSID_GameSaveProvider]} + DEFINE_CLSID!(CLSID_GameSaveProvider = &[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,88,98,111,120,76,105,118,101,46,83,116,111,114,97,103,101,46,71,97,109,101,83,97,118,101,80,114,111,118,105,100,101,114,0]); + DEFINE_IID!(IID_IGameSaveProviderGetResult, 985204758, 54163, 19813, 172, 22, 65, 195, 230, 122, 185, 69); + RT_INTERFACE!{interface IGameSaveProviderGetResult(IGameSaveProviderGetResultVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveProviderGetResult] { + fn get_Status(&mut self, out: *mut GameSaveErrorStatus) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut GameSaveProvider) -> HRESULT + }} + impl IGameSaveProviderGetResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGameSaveContainer, 3284176777, 22079, 20173, 156, 111, 51, 253, 14, 50, 61, 16); + RT_INTERFACE!{interface IGameSaveContainer(IGameSaveContainerVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveContainer] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Provider(&mut self, out: *mut *mut GameSaveProvider) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SubmitUpdatesAsync(&mut self, blobsToWrite: *mut ::rt::gen::windows::foundation::collections::IMapView, blobsToDelete: *mut ::rt::gen::windows::foundation::collections::IIterable, displayName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn ReadAsync(&mut self, blobsToRead: *mut ::rt::gen::windows::foundation::collections::IMapView, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetAsync(&mut self, blobsToRead: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn SubmitPropertySetUpdatesAsync(&mut self, blobsToWrite: *mut ::rt::gen::windows::foundation::collections::IPropertySet, blobsToDelete: *mut ::rt::gen::windows::foundation::collections::IIterable, displayName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn CreateBlobInfoQuery(&mut self, blobNamePrefix: HSTRING, out: *mut *mut GameSaveBlobInfoQuery) -> HRESULT + }} + impl IGameSaveContainer { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_provider(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Provider)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn submit_updates_async(&mut self, blobsToWrite: &::rt::gen::windows::foundation::collections::IMapView, blobsToDelete: &::rt::gen::windows::foundation::collections::IIterable, displayName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SubmitUpdatesAsync)(self, blobsToWrite as *const _ as *mut _, blobsToDelete as *const _ as *mut _, displayName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn read_async(&mut self, blobsToRead: &::rt::gen::windows::foundation::collections::IMapView) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadAsync)(self, blobsToRead as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_async(&mut self, blobsToRead: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAsync)(self, blobsToRead as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn submit_property_set_updates_async(&mut self, blobsToWrite: &::rt::gen::windows::foundation::collections::IPropertySet, blobsToDelete: &::rt::gen::windows::foundation::collections::IIterable, displayName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SubmitPropertySetUpdatesAsync)(self, blobsToWrite as *const _ as *mut _, blobsToDelete as *const _ as *mut _, displayName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_blob_info_query(&mut self, blobNamePrefix: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBlobInfoQuery)(self, blobNamePrefix.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GameSaveBlobGetResult: IGameSaveBlobGetResult} + RT_CLASS!{class GameSaveBlobInfoQuery: IGameSaveBlobInfoQuery} + DEFINE_IID!(IID_IGameSaveBlobGetResult, 2440200672, 29185, 18771, 170, 44, 64, 8, 240, 58, 239, 69); + RT_INTERFACE!{interface IGameSaveBlobGetResult(IGameSaveBlobGetResultVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveBlobGetResult] { + fn get_Status(&mut self, out: *mut GameSaveErrorStatus) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Value(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT + }} + impl IGameSaveBlobGetResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_value(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGameSaveContainerInfo, 3085071104, 5469, 19380, 178, 186, 147, 3, 6, 243, 145, 181); + RT_INTERFACE!{interface IGameSaveContainerInfo(IGameSaveContainerInfoVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveContainerInfo] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TotalSize(&mut self, out: *mut u64) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LastModifiedTime(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_NeedsSync(&mut self, out: *mut bool) -> HRESULT + }} + impl IGameSaveContainerInfo { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_total_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TotalSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_modified_time(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastModifiedTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_needs_sync(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NeedsSync)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class GameSaveContainerInfo: IGameSaveContainerInfo} + DEFINE_IID!(IID_IGameSaveBlobInfo, 2916319284, 47856, 17989, 182, 208, 70, 237, 175, 251, 60, 43); + RT_INTERFACE!{interface IGameSaveBlobInfo(IGameSaveBlobInfoVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveBlobInfo] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Size(&mut self, out: *mut u32) -> HRESULT + }} + impl IGameSaveBlobInfo { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class GameSaveBlobInfo: IGameSaveBlobInfo} + DEFINE_IID!(IID_IGameSaveContainerInfoQuery, 1016391779, 28544, 17191, 147, 39, 255, 193, 26, 253, 66, 179); + RT_INTERFACE!{interface IGameSaveContainerInfoQuery(IGameSaveContainerInfoQueryVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveContainerInfoQuery] { + fn GetContainerInfoAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetContainerInfoWithIndexAndMaxAsync(&mut self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetItemCountAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IGameSaveContainerInfoQuery { + #[inline] pub unsafe fn get_container_info_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetContainerInfoAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_container_info_with_index_and_max_async(&mut self, startIndex: u32, maxNumberOfItems: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetContainerInfoWithIndexAndMaxAsync)(self, startIndex, maxNumberOfItems, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_count_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemCountAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GameSaveContainerInfoGetResult: IGameSaveContainerInfoGetResult} + DEFINE_IID!(IID_IGameSaveContainerInfoGetResult, 4291104116, 50561, 20381, 158, 57, 48, 161, 12, 30, 76, 80); + RT_INTERFACE!{interface IGameSaveContainerInfoGetResult(IGameSaveContainerInfoGetResultVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveContainerInfoGetResult] { + fn get_Status(&mut self, out: *mut GameSaveErrorStatus) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IGameSaveContainerInfoGetResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGameSaveBlobInfoQuery, 2682090674, 61166, 17531, 169, 210, 127, 150, 192, 248, 50, 8); + RT_INTERFACE!{interface IGameSaveBlobInfoQuery(IGameSaveBlobInfoQueryVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveBlobInfoQuery] { + fn GetBlobInfoAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetBlobInfoWithIndexAndMaxAsync(&mut self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetItemCountAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IGameSaveBlobInfoQuery { + #[inline] pub unsafe fn get_blob_info_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBlobInfoAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_blob_info_with_index_and_max_async(&mut self, startIndex: u32, maxNumberOfItems: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBlobInfoWithIndexAndMaxAsync)(self, startIndex, maxNumberOfItems, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_count_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemCountAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GameSaveBlobInfoGetResult: IGameSaveBlobInfoGetResult} + DEFINE_IID!(IID_IGameSaveBlobInfoGetResult, 3344401794, 13975, 17087, 152, 156, 102, 93, 146, 59, 82, 49); + RT_INTERFACE!{interface IGameSaveBlobInfoGetResult(IGameSaveBlobInfoGetResultVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveBlobInfoGetResult] { + fn get_Status(&mut self, out: *mut GameSaveErrorStatus) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IGameSaveBlobInfoGetResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGameSaveOperationResult, 3473873413, 9376, 17794, 154, 85, 177, 187, 187, 147, 136, 216); + RT_INTERFACE!{interface IGameSaveOperationResult(IGameSaveOperationResultVtbl): IInspectable(IInspectableVtbl) [IID_IGameSaveOperationResult] { + fn get_Status(&mut self, out: *mut GameSaveErrorStatus) -> HRESULT + }} + impl IGameSaveOperationResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Gaming.XboxLive.Storage +} // Windows.Gaming.XboxLive +pub mod preview { // Windows.Gaming.Preview +use ::prelude::*; + RT_STRUCT! { struct GamesEnumerationContract { + + }} +pub mod gamesenumeration { // Windows.Gaming.Preview.GamesEnumeration +use ::prelude::*; + RT_ENUM! { enum GameListCategory: i32 { + Candidate (GameListCategory_Candidate) = 0, ConfirmedBySystem (GameListCategory_ConfirmedBySystem) = 1, ConfirmedByUser (GameListCategory_ConfirmedByUser) = 2, + }} + DEFINE_IID!(IID_IGameListEntry, 1935221971, 33055, 17556, 182, 156, 198, 65, 160, 198, 21, 67); + RT_INTERFACE!{interface IGameListEntry(IGameListEntryVtbl): IInspectable(IInspectableVtbl) [IID_IGameListEntry] { + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_DisplayInfo(&mut self, out: *mut *mut ::rt::gen::windows::applicationmodel::AppDisplayInfo) -> HRESULT, + fn LaunchAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn get_Category(&mut self, out: *mut GameListCategory) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn SetCategoryAsync(&mut self, value: GameListCategory, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IGameListEntry { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_display_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_category(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Category)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_category_async(&mut self, value: GameListCategory) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetCategoryAsync)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GameListEntry: IGameListEntry} + DEFINE_IID!(IID_GameListChangedEventHandler, 636920865, 55541, 19857, 180, 14, 83, 213, 232, 111, 222, 100); + RT_DELEGATE!{delegate GameListChangedEventHandler(GameListChangedEventHandlerVtbl, GameListChangedEventHandlerImpl) [IID_GameListChangedEventHandler] { + fn Invoke(&mut self, game: *mut GameListEntry) -> HRESULT + }} + impl GameListChangedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, game: &GameListEntry) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, game as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_GameListRemovedEventHandler, 281371791, 27791, 18194, 155, 56, 71, 75, 194, 46, 118, 216); + RT_DELEGATE!{delegate GameListRemovedEventHandler(GameListRemovedEventHandlerVtbl, GameListRemovedEventHandlerImpl) [IID_GameListRemovedEventHandler] { + fn Invoke(&mut self, identifier: HSTRING) -> HRESULT + }} + impl GameListRemovedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, identifier: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, identifier.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGameListStatics, 769462127, 40038, 19205, 148, 92, 214, 237, 120, 73, 27, 140); + RT_INTERFACE!{static interface IGameListStatics(IGameListStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGameListStatics] { + fn FindAllAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn FindAllAsyncPackageFamilyName(&mut self, packageFamilyName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn add_GameAdded(&mut self, handler: *mut GameListChangedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_GameAdded(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_GameRemoved(&mut self, handler: *mut GameListRemovedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_GameRemoved(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_GameUpdated(&mut self, handler: *mut GameListChangedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_GameUpdated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IGameListStatics { + #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async_package_family_name(&mut self, packageFamilyName: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsyncPackageFamilyName)(self, packageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_game_added(&mut self, handler: &GameListChangedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_GameAdded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_game_added(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_GameAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_game_removed(&mut self, handler: &GameListRemovedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_GameRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_game_removed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_GameRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_game_updated(&mut self, handler: &GameListChangedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_GameUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_game_updated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_GameUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IGameListStatics [CLSID_GameList]} + DEFINE_CLSID!(CLSID_GameList = &[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,80,114,101,118,105,101,119,46,71,97,109,101,115,69,110,117,109,101,114,97,116,105,111,110,46,71,97,109,101,76,105,115,116,0]); +} // Windows.Gaming.Preview.GamesEnumeration +} // Windows.Gaming.Preview +} // Windows.Gaming +#[cfg(feature="windows.globalization")] +pub mod globalization { // Windows.Globalization +use ::prelude::*; + RT_STRUCT! { struct GlobalizationJapanesePhoneticAnalyzerContract { + + }} + DEFINE_IID!(IID_IJapanesePhoneticAnalyzerStatics, 2292948624, 37854, 16818, 180, 213, 142, 219, 34, 127, 209, 194); + RT_INTERFACE!{static interface IJapanesePhoneticAnalyzerStatics(IJapanesePhoneticAnalyzerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IJapanesePhoneticAnalyzerStatics] { + fn GetWords(&mut self, input: HSTRING, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, + fn GetWordsWithMonoRubyOption(&mut self, input: HSTRING, monoRuby: bool, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT + }} + impl IJapanesePhoneticAnalyzerStatics { + #[inline] pub unsafe fn get_words(&mut self, input: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetWords)(self, input.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_words_with_mono_ruby_option(&mut self, input: &HStringArg, monoRuby: bool) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetWordsWithMonoRubyOption)(self, input.get(), monoRuby, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class JapanesePhoneme: IJapanesePhoneme} + RT_ACTIVATABLE!{IJapanesePhoneticAnalyzerStatics [CLSID_JapanesePhoneticAnalyzer]} + DEFINE_CLSID!(CLSID_JapanesePhoneticAnalyzer = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,74,97,112,97,110,101,115,101,80,104,111,110,101,116,105,99,65,110,97,108,121,122,101,114,0]); + DEFINE_IID!(IID_IJapanesePhoneme, 795513600, 59483, 17382, 137, 125, 93, 130, 248, 98, 223, 33); + RT_INTERFACE!{interface IJapanesePhoneme(IJapanesePhonemeVtbl): IInspectable(IInspectableVtbl) [IID_IJapanesePhoneme] { + fn get_DisplayText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_YomiText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsPhraseStart(&mut self, out: *mut bool) -> HRESULT + }} + impl IJapanesePhoneme { + #[inline] pub unsafe fn get_display_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_yomi_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_YomiText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_phrase_start(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPhraseStart)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum DayOfWeek: i32 { + Sunday (DayOfWeek_Sunday) = 0, Monday (DayOfWeek_Monday) = 1, Tuesday (DayOfWeek_Tuesday) = 2, Wednesday (DayOfWeek_Wednesday) = 3, Thursday (DayOfWeek_Thursday) = 4, Friday (DayOfWeek_Friday) = 5, Saturday (DayOfWeek_Saturday) = 6, + }} + DEFINE_IID!(IID_ICalendarIdentifiersStatics, 2154119016, 11442, 19487, 181, 144, 240, 245, 43, 244, 253, 26); + RT_INTERFACE!{static interface ICalendarIdentifiersStatics(ICalendarIdentifiersStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICalendarIdentifiersStatics] { + fn get_Gregorian(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Hebrew(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Hijri(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Japanese(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Julian(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Korean(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Taiwan(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Thai(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UmAlQura(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICalendarIdentifiersStatics { + #[inline] pub unsafe fn get_gregorian(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gregorian)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hebrew(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Hebrew)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hijri(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Hijri)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_japanese(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Japanese)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_julian(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Julian)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_korean(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Korean)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_taiwan(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Taiwan)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thai(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thai)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_um_al_qura(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UmAlQura)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICalendarIdentifiersStatics2, 2113197192, 24528, 17063, 149, 181, 125, 152, 216, 35, 7, 95); + RT_INTERFACE!{static interface ICalendarIdentifiersStatics2(ICalendarIdentifiersStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ICalendarIdentifiersStatics2] { + fn get_Persian(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICalendarIdentifiersStatics2 { + #[inline] pub unsafe fn get_persian(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Persian)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICalendarIdentifiersStatics3, 740447267, 8109, 16576, 147, 52, 168, 235, 144, 219, 4, 245); + RT_INTERFACE!{static interface ICalendarIdentifiersStatics3(ICalendarIdentifiersStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_ICalendarIdentifiersStatics3] { + fn get_ChineseLunar(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_JapaneseLunar(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KoreanLunar(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TaiwanLunar(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_VietnameseLunar(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICalendarIdentifiersStatics3 { + #[inline] pub unsafe fn get_chinese_lunar(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChineseLunar)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_japanese_lunar(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_JapaneseLunar)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_korean_lunar(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KoreanLunar)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_taiwan_lunar(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TaiwanLunar)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vietnamese_lunar(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VietnameseLunar)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ICalendarIdentifiersStatics [CLSID_CalendarIdentifiers]} + RT_ACTIVATABLE!{ICalendarIdentifiersStatics3 [CLSID_CalendarIdentifiers]} + RT_ACTIVATABLE!{ICalendarIdentifiersStatics2 [CLSID_CalendarIdentifiers]} + DEFINE_CLSID!(CLSID_CalendarIdentifiers = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,67,97,108,101,110,100,97,114,73,100,101,110,116,105,102,105,101,114,115,0]); + DEFINE_IID!(IID_IClockIdentifiersStatics, 1379403195, 4844, 20355, 188, 49, 177, 180, 55, 107, 8, 8); + RT_INTERFACE!{static interface IClockIdentifiersStatics(IClockIdentifiersStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IClockIdentifiersStatics] { + fn get_TwelveHour(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TwentyFourHour(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IClockIdentifiersStatics { + #[inline] pub unsafe fn get_twelve_hour(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TwelveHour)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_twenty_four_hour(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TwentyFourHour)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IClockIdentifiersStatics [CLSID_ClockIdentifiers]} + DEFINE_CLSID!(CLSID_ClockIdentifiers = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,67,108,111,99,107,73,100,101,110,116,105,102,105,101,114,115,0]); + DEFINE_IID!(IID_INumeralSystemIdentifiersStatics, 2781242051, 26825, 19773, 183, 101, 151, 32, 41, 226, 29, 236); + RT_INTERFACE!{static interface INumeralSystemIdentifiersStatics(INumeralSystemIdentifiersStaticsVtbl): IInspectable(IInspectableVtbl) [IID_INumeralSystemIdentifiersStatics] { + fn get_Arab(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ArabExt(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Bali(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Beng(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Cham(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Deva(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FullWide(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Gujr(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Guru(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HaniDec(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Java(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Kali(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Khmr(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Knda(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Lana(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LanaTham(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Laoo(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Latn(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Lepc(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Limb(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Mlym(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Mong(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Mtei(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Mymr(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MymrShan(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Nkoo(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Olck(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Orya(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Saur(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sund(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Talu(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TamlDec(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Telu(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Thai(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Tibt(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Vaii(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl INumeralSystemIdentifiersStatics { + #[inline] pub unsafe fn get_arab(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Arab)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_arab_ext(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ArabExt)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bali(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Bali)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_beng(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Beng)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cham(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Cham)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deva(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Deva)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_full_wide(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FullWide)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gujr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gujr)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_guru(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Guru)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hani_dec(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HaniDec)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_java(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Java)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kali(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Kali)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_khmr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Khmr)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_knda(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Knda)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_lana(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Lana)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_lana_tham(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LanaTham)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_laoo(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Laoo)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_latn(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Latn)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_lepc(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Lepc)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_limb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Limb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mlym(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mlym)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mong(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mong)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mtei(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mtei)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mymr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mymr)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mymr_shan(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MymrShan)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nkoo(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Nkoo)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_olck(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Olck)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_orya(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Orya)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_saur(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Saur)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sund(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sund)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_talu(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Talu)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_taml_dec(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TamlDec)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_telu(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Telu)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thai(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thai)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tibt(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tibt)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vaii(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Vaii)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INumeralSystemIdentifiersStatics2, 2130719272, 40411, 18996, 145, 4, 2, 96, 192, 145, 167, 199); + RT_INTERFACE!{static interface INumeralSystemIdentifiersStatics2(INumeralSystemIdentifiersStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_INumeralSystemIdentifiersStatics2] { + fn get_Brah(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Osma(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MathBold(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MathDbl(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MathSans(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MathSanb(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MathMono(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ZmthBold(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ZmthDbl(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ZmthSans(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ZmthSanb(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ZmthMono(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl INumeralSystemIdentifiersStatics2 { + #[inline] pub unsafe fn get_brah(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Brah)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_osma(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Osma)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_math_bold(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MathBold)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_math_dbl(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MathDbl)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_math_sans(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MathSans)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_math_sanb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MathSanb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_math_mono(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MathMono)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zmth_bold(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZmthBold)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zmth_dbl(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZmthDbl)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zmth_sans(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZmthSans)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zmth_sanb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZmthSanb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zmth_mono(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZmthMono)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{INumeralSystemIdentifiersStatics2 [CLSID_NumeralSystemIdentifiers]} + RT_ACTIVATABLE!{INumeralSystemIdentifiersStatics [CLSID_NumeralSystemIdentifiers]} + DEFINE_CLSID!(CLSID_NumeralSystemIdentifiers = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,78,117,109,101,114,97,108,83,121,115,116,101,109,73,100,101,110,116,105,102,105,101,114,115,0]); + DEFINE_IID!(IID_ICurrencyIdentifiersStatics, 2669480219, 54662, 18707, 155, 106, 169, 189, 45, 193, 40, 116); + RT_INTERFACE!{static interface ICurrencyIdentifiersStatics(ICurrencyIdentifiersStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICurrencyIdentifiersStatics] { + fn get_AED(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AFN(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ALL(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AMD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ANG(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AOA(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ARS(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AUD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AWG(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AZN(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BAM(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BBD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BDT(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BGN(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BHD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BIF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BMD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BND(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BOB(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BRL(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BSD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BTN(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BWP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BYR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BZD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CAD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CDF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CHF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CLP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CNY(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_COP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CRC(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CUP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CVE(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CZK(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DJF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DKK(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DOP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DZD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EGP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ERN(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ETB(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EUR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FJD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FKP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_GBP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_GEL(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_GHS(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_GIP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_GMD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_GNF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_GTQ(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_GYD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HKD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HNL(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HRK(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HTG(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HUF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IDR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ILS(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_INR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IQD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IRR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ISK(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_JMD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_JOD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_JPY(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KES(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KGS(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KHR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KMF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KPW(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KRW(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KWD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KYD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KZT(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LAK(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LBP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LKR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LRD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LSL(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LTL(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LVL(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LYD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MAD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MDL(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MGA(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MKD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MMK(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MNT(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MOP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MRO(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MUR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MVR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MWK(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MXN(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MYR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MZN(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NAD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NGN(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NIO(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NOK(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NPR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NZD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_OMR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PAB(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PEN(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PGK(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PHP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PKR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PLN(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PYG(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_QAR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RON(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RSD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RUB(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RWF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SAR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SBD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SCR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SDG(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SEK(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SGD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SHP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SLL(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SOS(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SRD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_STD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SYP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SZL(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_THB(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TJS(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TMT(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TND(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TOP(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TRY(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TTD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TWD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TZS(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UAH(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UGX(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_USD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UYU(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UZS(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_VEF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_VND(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_VUV(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_WST(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_XAF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_XCD(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_XOF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_XPF(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_XXX(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_YER(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ZAR(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ZMW(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ZWL(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICurrencyIdentifiersStatics { + #[inline] pub unsafe fn get_aed(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AED)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_afn(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AFN)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_all(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ALL)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_amd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AMD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ang(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ANG)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_aoa(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AOA)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ars(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ARS)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_aud(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AUD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_awg(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AWG)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_azn(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AZN)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bam(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BAM)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bbd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BBD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bdt(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BDT)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bgn(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BGN)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bhd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BHD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bif(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BIF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bmd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BMD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bnd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BND)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bob(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BOB)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brl(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BRL)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bsd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BSD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_btn(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BTN)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bwp(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BWP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_byr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BYR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bzd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BZD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cad(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CAD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cdf(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CDF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_chf(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CHF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_clp(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CLP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cny(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CNY)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cop(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_COP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_crc(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CRC)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cup(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CUP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cve(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CVE)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_czk(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CZK)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_djf(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DJF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_dkk(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DKK)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_dop(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DOP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_dzd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DZD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_egp(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EGP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ern(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ERN)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_etb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ETB)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_eur(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EUR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_fjd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FJD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_fkp(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FKP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gbp(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GBP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gel(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GEL)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ghs(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GHS)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gip(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GIP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gmd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GMD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gnf(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GNF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gtq(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GTQ)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gyd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GYD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hkd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HKD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hnl(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HNL)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hrk(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HRK)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_htg(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HTG)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_huf(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HUF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_idr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IDR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ils(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ILS)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_inr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_INR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_iqd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IQD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_irr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IRR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_isk(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ISK)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_jmd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_JMD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_jod(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_JOD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_jpy(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_JPY)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kes(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KES)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kgs(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KGS)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_khr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KHR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kmf(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KMF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kpw(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KPW)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_krw(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KRW)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kwd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KWD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kyd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KYD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kzt(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KZT)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_lak(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LAK)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_lbp(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LBP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_lkr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LKR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_lrd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LRD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_lsl(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LSL)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ltl(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LTL)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_lvl(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LVL)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_lyd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LYD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mad(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MAD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mdl(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MDL)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mga(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MGA)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mkd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MKD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mmk(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MMK)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mnt(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MNT)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mop(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MOP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mro(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MRO)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mur(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MUR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mvr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MVR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mwk(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MWK)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mxn(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MXN)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_myr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MYR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mzn(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MZN)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nad(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NAD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ngn(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NGN)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nio(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NIO)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nok(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NOK)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_npr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NPR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nzd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NZD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_omr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OMR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pab(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PAB)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pen(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PEN)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pgk(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PGK)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_php(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PHP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pkr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PKR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pln(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PLN)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pyg(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PYG)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_qar(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_QAR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ron(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RON)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RSD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rub(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RUB)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rwf(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RWF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sar(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SAR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sbd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SBD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_scr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SCR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sdg(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SDG)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sek(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SEK)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sgd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SGD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_shp(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SHP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sll(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SLL)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sos(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SOS)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_srd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SRD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_std(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_STD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_syp(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SYP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_szl(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SZL)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_THB)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tjs(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TJS)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tmt(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TMT)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tnd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TND)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_top(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TOP)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_try(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TRY)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ttd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TTD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_twd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TWD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tzs(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TZS)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uah(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UAH)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ugx(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UGX)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_usd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_USD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uyu(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UYU)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uzs(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UZS)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vef(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VEF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vnd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VND)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vuv(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VUV)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_wst(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WST)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_xaf(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XAF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_xcd(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XCD)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_xof(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XOF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_xpf(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XPF)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_xxx(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XXX)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_yer(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_YER)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zar(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZAR)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zmw(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZMW)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zwl(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZWL)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ICurrencyIdentifiersStatics [CLSID_CurrencyIdentifiers]} + DEFINE_CLSID!(CLSID_CurrencyIdentifiers = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,67,117,114,114,101,110,99,121,73,100,101,110,116,105,102,105,101,114,115,0]); + DEFINE_IID!(IID_IGeographicRegion, 32089633, 19044, 20185, 149, 79, 158, 222, 176, 123, 217, 3); + RT_INTERFACE!{interface IGeographicRegion(IGeographicRegionVtbl): IInspectable(IInspectableVtbl) [IID_IGeographicRegion] { + fn get_Code(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CodeTwoLetter(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CodeThreeLetter(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CodeThreeDigit(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NativeName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CurrenciesInUse(&mut self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT + }} + impl IGeographicRegion { + #[inline] pub unsafe fn get_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Code)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_code_two_letter(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CodeTwoLetter)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_code_three_letter(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CodeThreeLetter)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_code_three_digit(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CodeThreeDigit)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_native_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NativeName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_currencies_in_use(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrenciesInUse)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGeographicRegionFactory, 1396855408, 30644, 17003, 133, 159, 129, 225, 157, 81, 37, 70); + RT_INTERFACE!{static interface IGeographicRegionFactory(IGeographicRegionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGeographicRegionFactory] { + fn CreateGeographicRegion(&mut self, geographicRegionCode: HSTRING, out: *mut *mut GeographicRegion) -> HRESULT + }} + impl IGeographicRegionFactory { + #[inline] pub unsafe fn create_geographic_region(&mut self, geographicRegionCode: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateGeographicRegion)(self, geographicRegionCode.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GeographicRegion: IGeographicRegion [IGeographicRegionFactory] [CLSID_GeographicRegion]} + RT_ACTIVATABLE!{IGeographicRegionStatics [CLSID_GeographicRegion]} + DEFINE_CLSID!(CLSID_GeographicRegion = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,71,101,111,103,114,97,112,104,105,99,82,101,103,105,111,110,0]); + DEFINE_IID!(IID_IGeographicRegionStatics, 702712180, 31449, 20212, 135, 153, 179, 180, 79, 173, 236, 8); + RT_INTERFACE!{static interface IGeographicRegionStatics(IGeographicRegionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGeographicRegionStatics] { + fn IsSupported(&mut self, geographicRegionCode: HSTRING, out: *mut bool) -> HRESULT + }} + impl IGeographicRegionStatics { + #[inline] pub unsafe fn is_supported(&mut self, geographicRegionCode: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsSupported)(self, geographicRegionCode.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILanguage, 3933841234, 63426, 16997, 177, 189, 196, 222, 196, 228, 240, 128); + RT_INTERFACE!{interface ILanguage(ILanguageVtbl): IInspectable(IInspectableVtbl) [IID_ILanguage] { + fn get_LanguageTag(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NativeName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Script(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ILanguage { + #[inline] pub unsafe fn get_language_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LanguageTag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_native_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NativeName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_script(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Script)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILanguageExtensionSubtags, 2105388869, 13965, 17252, 133, 43, 222, 201, 39, 3, 123, 133); + RT_INTERFACE!{interface ILanguageExtensionSubtags(ILanguageExtensionSubtagsVtbl): IInspectable(IInspectableVtbl) [IID_ILanguageExtensionSubtags] { + fn GetExtensionSubtags(&mut self, singleton: HSTRING, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT + }} + impl ILanguageExtensionSubtags { + #[inline] pub unsafe fn get_extension_subtags(&mut self, singleton: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetExtensionSubtags)(self, singleton.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILanguageFactory, 2600620716, 3111, 17656, 183, 146, 151, 147, 251, 102, 198, 62); + RT_INTERFACE!{static interface ILanguageFactory(ILanguageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ILanguageFactory] { + fn CreateLanguage(&mut self, languageTag: HSTRING, out: *mut *mut Language) -> HRESULT + }} + impl ILanguageFactory { + #[inline] pub unsafe fn create_language(&mut self, languageTag: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateLanguage)(self, languageTag.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Language: ILanguage [ILanguageFactory] [CLSID_Language]} + RT_ACTIVATABLE!{ILanguageStatics [CLSID_Language]} + RT_ACTIVATABLE!{ILanguageStatics2 [CLSID_Language]} + DEFINE_CLSID!(CLSID_Language = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,76,97,110,103,117,97,103,101,0]); + DEFINE_IID!(IID_ILanguageStatics, 2990331223, 2149, 18132, 137, 184, 213, 155, 232, 153, 15, 13); + RT_INTERFACE!{static interface ILanguageStatics(ILanguageStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILanguageStatics] { + fn IsWellFormed(&mut self, languageTag: HSTRING, out: *mut bool) -> HRESULT, + fn get_CurrentInputMethodLanguageTag(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ILanguageStatics { + #[inline] pub unsafe fn is_well_formed(&mut self, languageTag: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsWellFormed)(self, languageTag.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_input_method_language_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentInputMethodLanguageTag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILanguageStatics2, 806985582, 37195, 19242, 157, 110, 227, 176, 226, 125, 190, 79); + RT_INTERFACE!{static interface ILanguageStatics2(ILanguageStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ILanguageStatics2] { + fn TrySetInputMethodLanguageTag(&mut self, languageTag: HSTRING, out: *mut bool) -> HRESULT + }} + impl ILanguageStatics2 { + #[inline] pub unsafe fn try_set_input_method_language_tag(&mut self, languageTag: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySetInputMethodLanguageTag)(self, languageTag.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICalendar, 3392152093, 34521, 16635, 162, 107, 212, 78, 183, 207, 8, 234); + RT_INTERFACE!{interface ICalendar(ICalendarVtbl): IInspectable(IInspectableVtbl) [IID_ICalendar] { + fn Clone(&mut self, out: *mut *mut Calendar) -> HRESULT, + fn SetToMin(&mut self) -> HRESULT, + fn SetToMax(&mut self) -> HRESULT, + fn get_Languages(&mut self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, + fn get_NumeralSystem(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_NumeralSystem(&mut self, value: HSTRING) -> HRESULT, + fn GetCalendarSystem(&mut self, out: *mut HSTRING) -> HRESULT, + fn ChangeCalendarSystem(&mut self, value: HSTRING) -> HRESULT, + fn GetClock(&mut self, out: *mut HSTRING) -> HRESULT, + fn ChangeClock(&mut self, value: HSTRING) -> HRESULT, + fn GetDateTime(&mut self, out: *mut super::foundation::DateTime) -> HRESULT, + fn SetDateTime(&mut self, value: super::foundation::DateTime) -> HRESULT, + fn SetToNow(&mut self) -> HRESULT, + fn get_FirstEra(&mut self, out: *mut i32) -> HRESULT, + fn get_LastEra(&mut self, out: *mut i32) -> HRESULT, + fn get_NumberOfEras(&mut self, out: *mut i32) -> HRESULT, + fn get_Era(&mut self, out: *mut i32) -> HRESULT, + fn put_Era(&mut self, value: i32) -> HRESULT, + fn AddEras(&mut self, eras: i32) -> HRESULT, + fn EraAsFullString(&mut self, out: *mut HSTRING) -> HRESULT, + fn EraAsString(&mut self, idealLength: i32, out: *mut HSTRING) -> HRESULT, + fn get_FirstYearInThisEra(&mut self, out: *mut i32) -> HRESULT, + fn get_LastYearInThisEra(&mut self, out: *mut i32) -> HRESULT, + fn get_NumberOfYearsInThisEra(&mut self, out: *mut i32) -> HRESULT, + fn get_Year(&mut self, out: *mut i32) -> HRESULT, + fn put_Year(&mut self, value: i32) -> HRESULT, + fn AddYears(&mut self, years: i32) -> HRESULT, + fn YearAsString(&mut self, out: *mut HSTRING) -> HRESULT, + fn YearAsTruncatedString(&mut self, remainingDigits: i32, out: *mut HSTRING) -> HRESULT, + fn YearAsPaddedString(&mut self, minDigits: i32, out: *mut HSTRING) -> HRESULT, + fn get_FirstMonthInThisYear(&mut self, out: *mut i32) -> HRESULT, + fn get_LastMonthInThisYear(&mut self, out: *mut i32) -> HRESULT, + fn get_NumberOfMonthsInThisYear(&mut self, out: *mut i32) -> HRESULT, + fn get_Month(&mut self, out: *mut i32) -> HRESULT, + fn put_Month(&mut self, value: i32) -> HRESULT, + fn AddMonths(&mut self, months: i32) -> HRESULT, + fn MonthAsFullString(&mut self, out: *mut HSTRING) -> HRESULT, + fn MonthAsString(&mut self, idealLength: i32, out: *mut HSTRING) -> HRESULT, + fn MonthAsFullSoloString(&mut self, out: *mut HSTRING) -> HRESULT, + fn MonthAsSoloString(&mut self, idealLength: i32, out: *mut HSTRING) -> HRESULT, + fn MonthAsNumericString(&mut self, out: *mut HSTRING) -> HRESULT, + fn MonthAsPaddedNumericString(&mut self, minDigits: i32, out: *mut HSTRING) -> HRESULT, + fn AddWeeks(&mut self, weeks: i32) -> HRESULT, + fn get_FirstDayInThisMonth(&mut self, out: *mut i32) -> HRESULT, + fn get_LastDayInThisMonth(&mut self, out: *mut i32) -> HRESULT, + fn get_NumberOfDaysInThisMonth(&mut self, out: *mut i32) -> HRESULT, + fn get_Day(&mut self, out: *mut i32) -> HRESULT, + fn put_Day(&mut self, value: i32) -> HRESULT, + fn AddDays(&mut self, days: i32) -> HRESULT, + fn DayAsString(&mut self, out: *mut HSTRING) -> HRESULT, + fn DayAsPaddedString(&mut self, minDigits: i32, out: *mut HSTRING) -> HRESULT, + fn get_DayOfWeek(&mut self, out: *mut DayOfWeek) -> HRESULT, + fn DayOfWeekAsFullString(&mut self, out: *mut HSTRING) -> HRESULT, + fn DayOfWeekAsString(&mut self, idealLength: i32, out: *mut HSTRING) -> HRESULT, + fn DayOfWeekAsFullSoloString(&mut self, out: *mut HSTRING) -> HRESULT, + fn DayOfWeekAsSoloString(&mut self, idealLength: i32, out: *mut HSTRING) -> HRESULT, + fn get_FirstPeriodInThisDay(&mut self, out: *mut i32) -> HRESULT, + fn get_LastPeriodInThisDay(&mut self, out: *mut i32) -> HRESULT, + fn get_NumberOfPeriodsInThisDay(&mut self, out: *mut i32) -> HRESULT, + fn get_Period(&mut self, out: *mut i32) -> HRESULT, + fn put_Period(&mut self, value: i32) -> HRESULT, + fn AddPeriods(&mut self, periods: i32) -> HRESULT, + fn PeriodAsFullString(&mut self, out: *mut HSTRING) -> HRESULT, + fn PeriodAsString(&mut self, idealLength: i32, out: *mut HSTRING) -> HRESULT, + fn get_FirstHourInThisPeriod(&mut self, out: *mut i32) -> HRESULT, + fn get_LastHourInThisPeriod(&mut self, out: *mut i32) -> HRESULT, + fn get_NumberOfHoursInThisPeriod(&mut self, out: *mut i32) -> HRESULT, + fn get_Hour(&mut self, out: *mut i32) -> HRESULT, + fn put_Hour(&mut self, value: i32) -> HRESULT, + fn AddHours(&mut self, hours: i32) -> HRESULT, + fn HourAsString(&mut self, out: *mut HSTRING) -> HRESULT, + fn HourAsPaddedString(&mut self, minDigits: i32, out: *mut HSTRING) -> HRESULT, + fn get_Minute(&mut self, out: *mut i32) -> HRESULT, + fn put_Minute(&mut self, value: i32) -> HRESULT, + fn AddMinutes(&mut self, minutes: i32) -> HRESULT, + fn MinuteAsString(&mut self, out: *mut HSTRING) -> HRESULT, + fn MinuteAsPaddedString(&mut self, minDigits: i32, out: *mut HSTRING) -> HRESULT, + fn get_Second(&mut self, out: *mut i32) -> HRESULT, + fn put_Second(&mut self, value: i32) -> HRESULT, + fn AddSeconds(&mut self, seconds: i32) -> HRESULT, + fn SecondAsString(&mut self, out: *mut HSTRING) -> HRESULT, + fn SecondAsPaddedString(&mut self, minDigits: i32, out: *mut HSTRING) -> HRESULT, + fn get_Nanosecond(&mut self, out: *mut i32) -> HRESULT, + fn put_Nanosecond(&mut self, value: i32) -> HRESULT, + fn AddNanoseconds(&mut self, nanoseconds: i32) -> HRESULT, + fn NanosecondAsString(&mut self, out: *mut HSTRING) -> HRESULT, + fn NanosecondAsPaddedString(&mut self, minDigits: i32, out: *mut HSTRING) -> HRESULT, + fn Compare(&mut self, other: *mut Calendar, out: *mut i32) -> HRESULT, + fn CompareDateTime(&mut self, other: super::foundation::DateTime, out: *mut i32) -> HRESULT, + fn CopyTo(&mut self, other: *mut Calendar) -> HRESULT, + fn get_FirstMinuteInThisHour(&mut self, out: *mut i32) -> HRESULT, + fn get_LastMinuteInThisHour(&mut self, out: *mut i32) -> HRESULT, + fn get_NumberOfMinutesInThisHour(&mut self, out: *mut i32) -> HRESULT, + fn get_FirstSecondInThisMinute(&mut self, out: *mut i32) -> HRESULT, + fn get_LastSecondInThisMinute(&mut self, out: *mut i32) -> HRESULT, + fn get_NumberOfSecondsInThisMinute(&mut self, out: *mut i32) -> HRESULT, + fn get_ResolvedLanguage(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsDaylightSavingTime(&mut self, out: *mut bool) -> HRESULT + }} + impl ICalendar { + #[inline] pub unsafe fn clone(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Clone)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_to_min(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SetToMin)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_to_max(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SetToMax)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_languages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Languages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeral_system(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NumeralSystem)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_numeral_system(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_NumeralSystem)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_calendar_system(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCalendarSystem)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn change_calendar_system(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ChangeCalendarSystem)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_clock(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetClock)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn change_clock(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ChangeClock)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_date_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetDateTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_date_time(&mut self, value: super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).SetDateTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_to_now(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SetToNow)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_era(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FirstEra)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_era(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastEra)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_eras(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfEras)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_era(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Era)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_era(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Era)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_eras(&mut self, eras: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddEras)(self, eras); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn era_as_full_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EraAsFullString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn era_as_string(&mut self, idealLength: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EraAsString)(self, idealLength, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_year_in_this_era(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FirstYearInThisEra)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_year_in_this_era(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastYearInThisEra)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_years_in_this_era(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfYearsInThisEra)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_year(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Year)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_year(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Year)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_years(&mut self, years: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddYears)(self, years); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn year_as_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).YearAsString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn year_as_truncated_string(&mut self, remainingDigits: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).YearAsTruncatedString)(self, remainingDigits, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn year_as_padded_string(&mut self, minDigits: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).YearAsPaddedString)(self, minDigits, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_month_in_this_year(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FirstMonthInThisYear)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_month_in_this_year(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastMonthInThisYear)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_months_in_this_year(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfMonthsInThisYear)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_month(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Month)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_month(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Month)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_months(&mut self, months: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddMonths)(self, months); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn month_as_full_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MonthAsFullString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn month_as_string(&mut self, idealLength: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MonthAsString)(self, idealLength, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn month_as_full_solo_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MonthAsFullSoloString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn month_as_solo_string(&mut self, idealLength: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MonthAsSoloString)(self, idealLength, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn month_as_numeric_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MonthAsNumericString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn month_as_padded_numeric_string(&mut self, minDigits: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MonthAsPaddedNumericString)(self, minDigits, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_weeks(&mut self, weeks: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddWeeks)(self, weeks); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_day_in_this_month(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FirstDayInThisMonth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_day_in_this_month(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastDayInThisMonth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_days_in_this_month(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfDaysInThisMonth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_day(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Day)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_day(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Day)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_days(&mut self, days: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddDays)(self, days); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn day_as_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DayAsString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn day_as_padded_string(&mut self, minDigits: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DayAsPaddedString)(self, minDigits, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_day_of_week(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DayOfWeek)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn day_of_week_as_full_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DayOfWeekAsFullString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn day_of_week_as_string(&mut self, idealLength: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DayOfWeekAsString)(self, idealLength, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn day_of_week_as_full_solo_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DayOfWeekAsFullSoloString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn day_of_week_as_solo_string(&mut self, idealLength: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DayOfWeekAsSoloString)(self, idealLength, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_period_in_this_day(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FirstPeriodInThisDay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_period_in_this_day(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastPeriodInThisDay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_periods_in_this_day(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfPeriodsInThisDay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_period(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Period)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_period(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Period)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_periods(&mut self, periods: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddPeriods)(self, periods); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn period_as_full_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PeriodAsFullString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn period_as_string(&mut self, idealLength: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PeriodAsString)(self, idealLength, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_hour_in_this_period(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FirstHourInThisPeriod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_hour_in_this_period(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastHourInThisPeriod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_hours_in_this_period(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfHoursInThisPeriod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_hour(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Hour)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_hour(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Hour)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_hours(&mut self, hours: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddHours)(self, hours); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn hour_as_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).HourAsString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn hour_as_padded_string(&mut self, minDigits: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).HourAsPaddedString)(self, minDigits, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_minute(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Minute)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_minute(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Minute)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_minutes(&mut self, minutes: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddMinutes)(self, minutes); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn minute_as_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MinuteAsString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn minute_as_padded_string(&mut self, minDigits: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MinuteAsPaddedString)(self, minDigits, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_second(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Second)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_second(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Second)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_seconds(&mut self, seconds: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddSeconds)(self, seconds); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn second_as_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SecondAsString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn second_as_padded_string(&mut self, minDigits: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SecondAsPaddedString)(self, minDigits, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nanosecond(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Nanosecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_nanosecond(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Nanosecond)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_nanoseconds(&mut self, nanoseconds: i32) -> Result<()> { + let hr = ((*self.lpVtbl).AddNanoseconds)(self, nanoseconds); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn nanosecond_as_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).NanosecondAsString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn nanosecond_as_padded_string(&mut self, minDigits: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).NanosecondAsPaddedString)(self, minDigits, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn compare(&mut self, other: &Calendar) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Compare)(self, other as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn compare_date_time(&mut self, other: super::foundation::DateTime) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CompareDateTime)(self, other, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn copy_to(&mut self, other: &Calendar) -> Result<()> { + let hr = ((*self.lpVtbl).CopyTo)(self, other as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_minute_in_this_hour(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FirstMinuteInThisHour)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_minute_in_this_hour(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastMinuteInThisHour)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_minutes_in_this_hour(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfMinutesInThisHour)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_second_in_this_minute(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FirstSecondInThisMinute)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_second_in_this_minute(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastSecondInThisMinute)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_seconds_in_this_minute(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfSecondsInThisMinute)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_resolved_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_daylight_saving_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDaylightSavingTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class Calendar: ICalendar [ICalendarFactory2] [CLSID_Calendar]} + DEFINE_CLSID!(CLSID_Calendar = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,67,97,108,101,110,100,97,114,0]); + DEFINE_IID!(IID_ICalendarFactory2, 3024828300, 51838, 17808, 158, 114, 234, 43, 236, 26, 81, 21); + RT_INTERFACE!{static interface ICalendarFactory2(ICalendarFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_ICalendarFactory2] { + fn CreateCalendarWithTimeZone(&mut self, languages: *mut super::foundation::collections::IIterable, calendar: HSTRING, clock: HSTRING, timeZoneId: HSTRING, out: *mut *mut Calendar) -> HRESULT + }} + impl ICalendarFactory2 { + #[inline] pub unsafe fn create_calendar_with_time_zone(&mut self, languages: &super::foundation::collections::IIterable, calendar: &HStringArg, clock: &HStringArg, timeZoneId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCalendarWithTimeZone)(self, languages as *const _ as *mut _, calendar.get(), clock.get(), timeZoneId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITimeZoneOnCalendar, 3141281253, 18127, 17175, 163, 245, 2, 98, 26, 213, 68, 120); + RT_INTERFACE!{interface ITimeZoneOnCalendar(ITimeZoneOnCalendarVtbl): IInspectable(IInspectableVtbl) [IID_ITimeZoneOnCalendar] { + fn GetTimeZone(&mut self, out: *mut HSTRING) -> HRESULT, + fn ChangeTimeZone(&mut self, timeZoneId: HSTRING) -> HRESULT, + fn TimeZoneAsFullString(&mut self, out: *mut HSTRING) -> HRESULT, + fn TimeZoneAsString(&mut self, idealLength: i32, out: *mut HSTRING) -> HRESULT + }} + impl ITimeZoneOnCalendar { + #[inline] pub unsafe fn get_time_zone(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTimeZone)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn change_time_zone(&mut self, timeZoneId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ChangeTimeZone)(self, timeZoneId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn time_zone_as_full_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TimeZoneAsFullString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn time_zone_as_string(&mut self, idealLength: i32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TimeZoneAsString)(self, idealLength, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICalendarFactory, 2213905426, 58731, 19573, 166, 110, 15, 99, 213, 119, 88, 166); + RT_INTERFACE!{interface ICalendarFactory(ICalendarFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICalendarFactory] { + fn CreateCalendarDefaultCalendarAndClock(&mut self, languages: *mut super::foundation::collections::IIterable, out: *mut *mut Calendar) -> HRESULT, + fn CreateCalendar(&mut self, languages: *mut super::foundation::collections::IIterable, calendar: HSTRING, clock: HSTRING, out: *mut *mut Calendar) -> HRESULT + }} + impl ICalendarFactory { + #[inline] pub unsafe fn create_calendar_default_calendar_and_clock(&mut self, languages: &super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCalendarDefaultCalendarAndClock)(self, languages as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_calendar(&mut self, languages: &super::foundation::collections::IIterable, calendar: &HStringArg, clock: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCalendar)(self, languages as *const _ as *mut _, calendar.get(), clock.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationLanguagesStatics, 1974732871, 2636, 19090, 149, 101, 253, 99, 201, 95, 122, 237); + RT_INTERFACE!{static interface IApplicationLanguagesStatics(IApplicationLanguagesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationLanguagesStatics] { + fn get_PrimaryLanguageOverride(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PrimaryLanguageOverride(&mut self, value: HSTRING) -> HRESULT, + fn get_Languages(&mut self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, + fn get_ManifestLanguages(&mut self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT + }} + impl IApplicationLanguagesStatics { + #[inline] pub unsafe fn get_primary_language_override(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrimaryLanguageOverride)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_primary_language_override(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PrimaryLanguageOverride)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_languages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Languages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manifest_languages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ManifestLanguages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IApplicationLanguagesStatics [CLSID_ApplicationLanguages]} + DEFINE_CLSID!(CLSID_ApplicationLanguages = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,65,112,112,108,105,99,97,116,105,111,110,76,97,110,103,117,97,103,101,115,0]); +pub mod fonts { // Windows.Globalization.Fonts +use ::prelude::*; + DEFINE_IID!(IID_ILanguageFontGroup, 4080697283, 14940, 19178, 185, 255, 179, 159, 178, 66, 247, 246); + RT_INTERFACE!{interface ILanguageFontGroup(ILanguageFontGroupVtbl): IInspectable(IInspectableVtbl) [IID_ILanguageFontGroup] { + fn get_UITextFont(&mut self, out: *mut *mut LanguageFont) -> HRESULT, + fn get_UIHeadingFont(&mut self, out: *mut *mut LanguageFont) -> HRESULT, + fn get_UITitleFont(&mut self, out: *mut *mut LanguageFont) -> HRESULT, + fn get_UICaptionFont(&mut self, out: *mut *mut LanguageFont) -> HRESULT, + fn get_UINotificationHeadingFont(&mut self, out: *mut *mut LanguageFont) -> HRESULT, + fn get_TraditionalDocumentFont(&mut self, out: *mut *mut LanguageFont) -> HRESULT, + fn get_ModernDocumentFont(&mut self, out: *mut *mut LanguageFont) -> HRESULT, + fn get_DocumentHeadingFont(&mut self, out: *mut *mut LanguageFont) -> HRESULT, + fn get_FixedWidthTextFont(&mut self, out: *mut *mut LanguageFont) -> HRESULT, + fn get_DocumentAlternate1Font(&mut self, out: *mut *mut LanguageFont) -> HRESULT, + fn get_DocumentAlternate2Font(&mut self, out: *mut *mut LanguageFont) -> HRESULT + }} + impl ILanguageFontGroup { + #[inline] pub unsafe fn get_uitext_font(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UITextFont)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uiheading_font(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UIHeadingFont)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uititle_font(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UITitleFont)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uicaption_font(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UICaptionFont)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uinotification_heading_font(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UINotificationHeadingFont)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_traditional_document_font(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TraditionalDocumentFont)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_modern_document_font(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ModernDocumentFont)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_document_heading_font(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DocumentHeadingFont)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_fixed_width_text_font(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FixedWidthTextFont)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_document_alternate1_font(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DocumentAlternate1Font)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_document_alternate2_font(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DocumentAlternate2Font)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LanguageFont: ILanguageFont} + DEFINE_IID!(IID_ILanguageFontGroupFactory, 4239305831, 20087, 18887, 184, 86, 221, 233, 52, 252, 115, 91); + RT_INTERFACE!{static interface ILanguageFontGroupFactory(ILanguageFontGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ILanguageFontGroupFactory] { + fn CreateLanguageFontGroup(&mut self, languageTag: HSTRING, out: *mut *mut LanguageFontGroup) -> HRESULT + }} + impl ILanguageFontGroupFactory { + #[inline] pub unsafe fn create_language_font_group(&mut self, languageTag: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateLanguageFontGroup)(self, languageTag.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LanguageFontGroup: ILanguageFontGroup [ILanguageFontGroupFactory] [CLSID_LanguageFontGroup]} + DEFINE_CLSID!(CLSID_LanguageFontGroup = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,70,111,110,116,115,46,76,97,110,103,117,97,103,101,70,111,110,116,71,114,111,117,112,0]); + DEFINE_IID!(IID_ILanguageFont, 2972605498, 46957, 17819, 190, 235, 144, 17, 81, 205, 119, 209); + RT_INTERFACE!{interface ILanguageFont(ILanguageFontVtbl): IInspectable(IInspectableVtbl) [IID_ILanguageFont] { + fn get_FontFamily(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontWeight(&mut self, out: *mut super::super::ui::text::FontWeight) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontStretch(&mut self, out: *mut super::super::ui::text::FontStretch) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontStyle(&mut self, out: *mut super::super::ui::text::FontStyle) -> HRESULT, + fn get_ScaleFactor(&mut self, out: *mut f64) -> HRESULT + }} + impl ILanguageFont { + #[inline] pub unsafe fn get_font_family(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontFamily)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_weight(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontWeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_stretch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStretch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_style(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStyle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scale_factor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScaleFactor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Globalization.Fonts +pub mod phonenumberformatting { // Windows.Globalization.PhoneNumberFormatting +use ::prelude::*; + RT_ENUM! { enum PhoneNumberFormat: i32 { + E164 (PhoneNumberFormat_E164) = 0, International (PhoneNumberFormat_International) = 1, National (PhoneNumberFormat_National) = 2, Rfc3966 (PhoneNumberFormat_Rfc3966) = 3, + }} + RT_ENUM! { enum PredictedPhoneNumberKind: i32 { + FixedLine (PredictedPhoneNumberKind_FixedLine) = 0, Mobile (PredictedPhoneNumberKind_Mobile) = 1, FixedLineOrMobile (PredictedPhoneNumberKind_FixedLineOrMobile) = 2, TollFree (PredictedPhoneNumberKind_TollFree) = 3, PremiumRate (PredictedPhoneNumberKind_PremiumRate) = 4, SharedCost (PredictedPhoneNumberKind_SharedCost) = 5, Voip (PredictedPhoneNumberKind_Voip) = 6, PersonalNumber (PredictedPhoneNumberKind_PersonalNumber) = 7, Pager (PredictedPhoneNumberKind_Pager) = 8, UniversalAccountNumber (PredictedPhoneNumberKind_UniversalAccountNumber) = 9, Voicemail (PredictedPhoneNumberKind_Voicemail) = 10, Unknown (PredictedPhoneNumberKind_Unknown) = 11, + }} + RT_ENUM! { enum PhoneNumberParseResult: i32 { + Valid (PhoneNumberParseResult_Valid) = 0, NotANumber (PhoneNumberParseResult_NotANumber) = 1, InvalidCountryCode (PhoneNumberParseResult_InvalidCountryCode) = 2, TooShort (PhoneNumberParseResult_TooShort) = 3, TooLong (PhoneNumberParseResult_TooLong) = 4, + }} + RT_ENUM! { enum PhoneNumberMatchResult: i32 { + NoMatch (PhoneNumberMatchResult_NoMatch) = 0, ShortNationalSignificantNumberMatch (PhoneNumberMatchResult_ShortNationalSignificantNumberMatch) = 1, NationalSignificantNumberMatch (PhoneNumberMatchResult_NationalSignificantNumberMatch) = 2, ExactMatch (PhoneNumberMatchResult_ExactMatch) = 3, + }} + DEFINE_IID!(IID_IPhoneNumberInfo, 477947101, 51380, 20131, 154, 239, 179, 66, 226, 197, 180, 23); + RT_INTERFACE!{interface IPhoneNumberInfo(IPhoneNumberInfoVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneNumberInfo] { + fn get_CountryCode(&mut self, out: *mut i32) -> HRESULT, + fn get_PhoneNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetLengthOfGeographicalAreaCode(&mut self, out: *mut i32) -> HRESULT, + fn GetNationalSignificantNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetLengthOfNationalDestinationCode(&mut self, out: *mut i32) -> HRESULT, + fn PredictNumberKind(&mut self, out: *mut PredictedPhoneNumberKind) -> HRESULT, + fn GetGeographicRegionCode(&mut self, out: *mut HSTRING) -> HRESULT, + fn CheckNumberMatch(&mut self, otherNumber: *mut PhoneNumberInfo, out: *mut PhoneNumberMatchResult) -> HRESULT + }} + impl IPhoneNumberInfo { + #[inline] pub unsafe fn get_country_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CountryCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_phone_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhoneNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_length_of_geographical_area_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetLengthOfGeographicalAreaCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_national_significant_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNationalSignificantNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_length_of_national_destination_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetLengthOfNationalDestinationCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn predict_number_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).PredictNumberKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_geographic_region_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetGeographicRegionCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn check_number_match(&mut self, otherNumber: &PhoneNumberInfo) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CheckNumberMatch)(self, otherNumber as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PhoneNumberInfo: IPhoneNumberInfo [IPhoneNumberInfoFactory] [CLSID_PhoneNumberInfo]} + RT_ACTIVATABLE!{IPhoneNumberInfoStatics [CLSID_PhoneNumberInfo]} + DEFINE_CLSID!(CLSID_PhoneNumberInfo = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,80,104,111,110,101,78,117,109,98,101,114,70,111,114,109,97,116,116,105,110,103,46,80,104,111,110,101,78,117,109,98,101,114,73,110,102,111,0]); + DEFINE_IID!(IID_IPhoneNumberFormatter, 358003870, 47828, 19274, 144, 13, 68, 7, 173, 183, 201, 129); + RT_INTERFACE!{interface IPhoneNumberFormatter(IPhoneNumberFormatterVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneNumberFormatter] { + fn Format(&mut self, number: *mut PhoneNumberInfo, out: *mut HSTRING) -> HRESULT, + fn FormatWithOutputFormat(&mut self, number: *mut PhoneNumberInfo, numberFormat: PhoneNumberFormat, out: *mut HSTRING) -> HRESULT, + fn FormatPartialString(&mut self, number: HSTRING, out: *mut HSTRING) -> HRESULT, + fn FormatString(&mut self, number: HSTRING, out: *mut HSTRING) -> HRESULT, + fn FormatStringWithLeftToRightMarkers(&mut self, number: HSTRING, out: *mut HSTRING) -> HRESULT + }} + impl IPhoneNumberFormatter { + #[inline] pub unsafe fn format(&mut self, number: &PhoneNumberInfo) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Format)(self, number as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn format_with_output_format(&mut self, number: &PhoneNumberInfo, numberFormat: PhoneNumberFormat) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FormatWithOutputFormat)(self, number as *const _ as *mut _, numberFormat, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn format_partial_string(&mut self, number: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FormatPartialString)(self, number.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn format_string(&mut self, number: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FormatString)(self, number.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn format_string_with_left_to_right_markers(&mut self, number: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FormatStringWithLeftToRightMarkers)(self, number.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhoneNumberInfoFactory, 2181216612, 44458, 19711, 143, 207, 23, 231, 81, 106, 40, 255); + RT_INTERFACE!{static interface IPhoneNumberInfoFactory(IPhoneNumberInfoFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneNumberInfoFactory] { + fn Create(&mut self, number: HSTRING, out: *mut *mut PhoneNumberInfo) -> HRESULT + }} + impl IPhoneNumberInfoFactory { + #[inline] pub unsafe fn create(&mut self, number: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, number.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhoneNumberInfoStatics, 1530875754, 34473, 16617, 134, 73, 109, 97, 22, 25, 40, 212); + RT_INTERFACE!{static interface IPhoneNumberInfoStatics(IPhoneNumberInfoStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneNumberInfoStatics] { + fn TryParse(&mut self, input: HSTRING, phoneNumber: *mut *mut PhoneNumberInfo, out: *mut PhoneNumberParseResult) -> HRESULT, + fn TryParseWithRegion(&mut self, input: HSTRING, regionCode: HSTRING, phoneNumber: *mut *mut PhoneNumberInfo, out: *mut PhoneNumberParseResult) -> HRESULT + }} + impl IPhoneNumberInfoStatics { + #[inline] pub unsafe fn try_parse(&mut self, input: &HStringArg) -> Result<(ComPtr, PhoneNumberParseResult)> { + let mut phoneNumber = null_mut(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryParse)(self, input.get(), &mut phoneNumber, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(phoneNumber), out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_parse_with_region(&mut self, input: &HStringArg, regionCode: &HStringArg) -> Result<(ComPtr, PhoneNumberParseResult)> { + let mut phoneNumber = null_mut(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryParseWithRegion)(self, input.get(), regionCode.get(), &mut phoneNumber, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(phoneNumber), out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhoneNumberFormatterStatics, 1554446641, 34009, 16715, 171, 78, 160, 85, 44, 135, 134, 2); + RT_INTERFACE!{static interface IPhoneNumberFormatterStatics(IPhoneNumberFormatterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneNumberFormatterStatics] { + fn TryCreate(&mut self, regionCode: HSTRING, phoneNumber: *mut *mut PhoneNumberFormatter) -> HRESULT, + fn GetCountryCodeForRegion(&mut self, regionCode: HSTRING, out: *mut i32) -> HRESULT, + fn GetNationalDirectDialingPrefixForRegion(&mut self, regionCode: HSTRING, stripNonDigit: bool, out: *mut HSTRING) -> HRESULT, + fn WrapWithLeftToRightMarkers(&mut self, number: HSTRING, out: *mut HSTRING) -> HRESULT + }} + impl IPhoneNumberFormatterStatics { + #[inline] pub unsafe fn try_create(&mut self, regionCode: &HStringArg) -> Result> { + let mut phoneNumber = null_mut(); + let hr = ((*self.lpVtbl).TryCreate)(self, regionCode.get(), &mut phoneNumber); + if hr == S_OK { Ok(ComPtr::wrap(phoneNumber)) } else { err(hr) } + } + #[inline] pub unsafe fn get_country_code_for_region(&mut self, regionCode: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCountryCodeForRegion)(self, regionCode.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_national_direct_dialing_prefix_for_region(&mut self, regionCode: &HStringArg, stripNonDigit: bool) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNationalDirectDialingPrefixForRegion)(self, regionCode.get(), stripNonDigit, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn wrap_with_left_to_right_markers(&mut self, number: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WrapWithLeftToRightMarkers)(self, number.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PhoneNumberFormatter: IPhoneNumberFormatter} + RT_ACTIVATABLE!{IPhoneNumberFormatterStatics [CLSID_PhoneNumberFormatter]} + DEFINE_CLSID!(CLSID_PhoneNumberFormatter = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,80,104,111,110,101,78,117,109,98,101,114,70,111,114,109,97,116,116,105,110,103,46,80,104,111,110,101,78,117,109,98,101,114,70,111,114,109,97,116,116,101,114,0]); +} // Windows.Globalization.PhoneNumberFormatting +pub mod datetimeformatting { // Windows.Globalization.DateTimeFormatting +use ::prelude::*; + RT_ENUM! { enum YearFormat: i32 { + None (YearFormat_None) = 0, Default (YearFormat_Default) = 1, Abbreviated (YearFormat_Abbreviated) = 2, Full (YearFormat_Full) = 3, + }} + RT_ENUM! { enum MonthFormat: i32 { + None (MonthFormat_None) = 0, Default (MonthFormat_Default) = 1, Abbreviated (MonthFormat_Abbreviated) = 2, Full (MonthFormat_Full) = 3, Numeric (MonthFormat_Numeric) = 4, + }} + RT_ENUM! { enum DayOfWeekFormat: i32 { + None (DayOfWeekFormat_None) = 0, Default (DayOfWeekFormat_Default) = 1, Abbreviated (DayOfWeekFormat_Abbreviated) = 2, Full (DayOfWeekFormat_Full) = 3, + }} + RT_ENUM! { enum DayFormat: i32 { + None (DayFormat_None) = 0, Default (DayFormat_Default) = 1, + }} + RT_ENUM! { enum HourFormat: i32 { + None (HourFormat_None) = 0, Default (HourFormat_Default) = 1, + }} + RT_ENUM! { enum MinuteFormat: i32 { + None (MinuteFormat_None) = 0, Default (MinuteFormat_Default) = 1, + }} + RT_ENUM! { enum SecondFormat: i32 { + None (SecondFormat_None) = 0, Default (SecondFormat_Default) = 1, + }} + DEFINE_IID!(IID_IDateTimeFormatter, 2515454480, 29664, 20043, 161, 131, 61, 106, 208, 186, 53, 236); + RT_INTERFACE!{interface IDateTimeFormatter(IDateTimeFormatterVtbl): IInspectable(IInspectableVtbl) [IID_IDateTimeFormatter] { + fn get_Languages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_GeographicRegion(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Calendar(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Clock(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NumeralSystem(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_NumeralSystem(&mut self, value: HSTRING) -> HRESULT, + fn get_Patterns(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Template(&mut self, out: *mut HSTRING) -> HRESULT, + fn Format(&mut self, value: super::super::foundation::DateTime, out: *mut HSTRING) -> HRESULT, + fn get_IncludeYear(&mut self, out: *mut YearFormat) -> HRESULT, + fn get_IncludeMonth(&mut self, out: *mut MonthFormat) -> HRESULT, + fn get_IncludeDayOfWeek(&mut self, out: *mut DayOfWeekFormat) -> HRESULT, + fn get_IncludeDay(&mut self, out: *mut DayFormat) -> HRESULT, + fn get_IncludeHour(&mut self, out: *mut HourFormat) -> HRESULT, + fn get_IncludeMinute(&mut self, out: *mut MinuteFormat) -> HRESULT, + fn get_IncludeSecond(&mut self, out: *mut SecondFormat) -> HRESULT, + fn get_ResolvedLanguage(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ResolvedGeographicRegion(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IDateTimeFormatter { + #[inline] pub unsafe fn get_languages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Languages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_geographic_region(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GeographicRegion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_calendar(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Calendar)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_clock(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Clock)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeral_system(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NumeralSystem)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_numeral_system(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_NumeralSystem)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_patterns(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Patterns)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_template(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Template)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn format(&mut self, value: super::super::foundation::DateTime) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Format)(self, value, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_include_year(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncludeYear)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_include_month(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncludeMonth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_include_day_of_week(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncludeDayOfWeek)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_include_day(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncludeDay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_include_hour(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncludeHour)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_include_minute(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncludeMinute)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_include_second(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncludeSecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_resolved_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_resolved_geographic_region(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResolvedGeographicRegion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDateTimeFormatterFactory, 3968698963, 6702, 16685, 136, 21, 59, 116, 95, 177, 162, 160); + RT_INTERFACE!{static interface IDateTimeFormatterFactory(IDateTimeFormatterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDateTimeFormatterFactory] { + fn CreateDateTimeFormatter(&mut self, formatTemplate: HSTRING, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn CreateDateTimeFormatterLanguages(&mut self, formatTemplate: HSTRING, languages: *mut super::super::foundation::collections::IIterable, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn CreateDateTimeFormatterContext(&mut self, formatTemplate: HSTRING, languages: *mut super::super::foundation::collections::IIterable, geographicRegion: HSTRING, calendar: HSTRING, clock: HSTRING, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn CreateDateTimeFormatterDate(&mut self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn CreateDateTimeFormatterTime(&mut self, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn CreateDateTimeFormatterDateTimeLanguages(&mut self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: *mut super::super::foundation::collections::IIterable, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn CreateDateTimeFormatterDateTimeContext(&mut self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: *mut super::super::foundation::collections::IIterable, geographicRegion: HSTRING, calendar: HSTRING, clock: HSTRING, out: *mut *mut DateTimeFormatter) -> HRESULT + }} + impl IDateTimeFormatterFactory { + #[inline] pub unsafe fn create_date_time_formatter(&mut self, formatTemplate: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDateTimeFormatter)(self, formatTemplate.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_date_time_formatter_languages(&mut self, formatTemplate: &HStringArg, languages: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDateTimeFormatterLanguages)(self, formatTemplate.get(), languages as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_date_time_formatter_context(&mut self, formatTemplate: &HStringArg, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg, calendar: &HStringArg, clock: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDateTimeFormatterContext)(self, formatTemplate.get(), languages as *const _ as *mut _, geographicRegion.get(), calendar.get(), clock.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_date_time_formatter_date(&mut self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDateTimeFormatterDate)(self, yearFormat, monthFormat, dayFormat, dayOfWeekFormat, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_date_time_formatter_time(&mut self, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDateTimeFormatterTime)(self, hourFormat, minuteFormat, secondFormat, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_date_time_formatter_date_time_languages(&mut self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDateTimeFormatterDateTimeLanguages)(self, yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, languages as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_date_time_formatter_date_time_context(&mut self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg, calendar: &HStringArg, clock: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDateTimeFormatterDateTimeContext)(self, yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, languages as *const _ as *mut _, geographicRegion.get(), calendar.get(), clock.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DateTimeFormatter: IDateTimeFormatter [IDateTimeFormatterFactory] [CLSID_DateTimeFormatter]} + RT_ACTIVATABLE!{IDateTimeFormatterStatics [CLSID_DateTimeFormatter]} + DEFINE_CLSID!(CLSID_DateTimeFormatter = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,68,97,116,101,84,105,109,101,70,111,114,109,97,116,116,105,110,103,46,68,97,116,101,84,105,109,101,70,111,114,109,97,116,116,101,114,0]); + DEFINE_IID!(IID_IDateTimeFormatterStatics, 3217942464, 57164, 18990, 144, 18, 244, 125, 175, 63, 18, 18); + RT_INTERFACE!{static interface IDateTimeFormatterStatics(IDateTimeFormatterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDateTimeFormatterStatics] { + fn get_LongDate(&mut self, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn get_LongTime(&mut self, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn get_ShortDate(&mut self, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn get_ShortTime(&mut self, out: *mut *mut DateTimeFormatter) -> HRESULT + }} + impl IDateTimeFormatterStatics { + #[inline] pub unsafe fn get_long_date(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LongDate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_long_time(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LongTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_short_date(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ShortDate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_short_time(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ShortTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDateTimeFormatter2, 667490950, 48554, 20432, 158, 54, 103, 29, 90, 165, 238, 3); + RT_INTERFACE!{interface IDateTimeFormatter2(IDateTimeFormatter2Vtbl): IInspectable(IInspectableVtbl) [IID_IDateTimeFormatter2] { + fn FormatUsingTimeZone(&mut self, datetime: super::super::foundation::DateTime, timeZoneId: HSTRING, out: *mut HSTRING) -> HRESULT + }} + impl IDateTimeFormatter2 { + #[inline] pub unsafe fn format_using_time_zone(&mut self, datetime: super::super::foundation::DateTime, timeZoneId: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FormatUsingTimeZone)(self, datetime, timeZoneId.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } +} // Windows.Globalization.DateTimeFormatting +pub mod numberformatting { // Windows.Globalization.NumberFormatting +use ::prelude::*; + DEFINE_IID!(IID_INumberRounder, 1416872821, 14573, 17969, 184, 12, 239, 52, 252, 72, 183, 245); + RT_INTERFACE!{interface INumberRounder(INumberRounderVtbl): IInspectable(IInspectableVtbl) [IID_INumberRounder] { + fn RoundInt32(&mut self, value: i32, out: *mut i32) -> HRESULT, + fn RoundUInt32(&mut self, value: u32, out: *mut u32) -> HRESULT, + fn RoundInt64(&mut self, value: i64, out: *mut i64) -> HRESULT, + fn RoundUInt64(&mut self, value: u64, out: *mut u64) -> HRESULT, + fn RoundSingle(&mut self, value: f32, out: *mut f32) -> HRESULT, + fn RoundDouble(&mut self, value: f64, out: *mut f64) -> HRESULT + }} + impl INumberRounder { + #[inline] pub unsafe fn round_int32(&mut self, value: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).RoundInt32)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn round_uint32(&mut self, value: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).RoundUInt32)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn round_int64(&mut self, value: i64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).RoundInt64)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn round_uint64(&mut self, value: u64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).RoundUInt64)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn round_single(&mut self, value: f32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).RoundSingle)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn round_double(&mut self, value: f64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).RoundDouble)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum RoundingAlgorithm: i32 { + None (RoundingAlgorithm_None) = 0, RoundDown (RoundingAlgorithm_RoundDown) = 1, RoundUp (RoundingAlgorithm_RoundUp) = 2, RoundTowardsZero (RoundingAlgorithm_RoundTowardsZero) = 3, RoundAwayFromZero (RoundingAlgorithm_RoundAwayFromZero) = 4, RoundHalfDown (RoundingAlgorithm_RoundHalfDown) = 5, RoundHalfUp (RoundingAlgorithm_RoundHalfUp) = 6, RoundHalfTowardsZero (RoundingAlgorithm_RoundHalfTowardsZero) = 7, RoundHalfAwayFromZero (RoundingAlgorithm_RoundHalfAwayFromZero) = 8, RoundHalfToEven (RoundingAlgorithm_RoundHalfToEven) = 9, RoundHalfToOdd (RoundingAlgorithm_RoundHalfToOdd) = 10, + }} + DEFINE_IID!(IID_ISignificantDigitsNumberRounder, 4120124362, 26182, 18707, 140, 118, 27, 25, 31, 249, 77, 253); + RT_INTERFACE!{interface ISignificantDigitsNumberRounder(ISignificantDigitsNumberRounderVtbl): IInspectable(IInspectableVtbl) [IID_ISignificantDigitsNumberRounder] { + fn get_RoundingAlgorithm(&mut self, out: *mut RoundingAlgorithm) -> HRESULT, + fn put_RoundingAlgorithm(&mut self, value: RoundingAlgorithm) -> HRESULT, + fn get_SignificantDigits(&mut self, out: *mut u32) -> HRESULT, + fn put_SignificantDigits(&mut self, value: u32) -> HRESULT + }} + impl ISignificantDigitsNumberRounder { + #[inline] pub unsafe fn get_rounding_algorithm(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoundingAlgorithm)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rounding_algorithm(&mut self, value: RoundingAlgorithm) -> Result<()> { + let hr = ((*self.lpVtbl).put_RoundingAlgorithm)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_significant_digits(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SignificantDigits)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_significant_digits(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SignificantDigits)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IIncrementNumberRounder, 1889947640, 26283, 16725, 157, 161, 115, 158, 70, 118, 69, 67); + RT_INTERFACE!{interface IIncrementNumberRounder(IIncrementNumberRounderVtbl): IInspectable(IInspectableVtbl) [IID_IIncrementNumberRounder] { + fn get_RoundingAlgorithm(&mut self, out: *mut RoundingAlgorithm) -> HRESULT, + fn put_RoundingAlgorithm(&mut self, value: RoundingAlgorithm) -> HRESULT, + fn get_Increment(&mut self, out: *mut f64) -> HRESULT, + fn put_Increment(&mut self, value: f64) -> HRESULT + }} + impl IIncrementNumberRounder { + #[inline] pub unsafe fn get_rounding_algorithm(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoundingAlgorithm)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rounding_algorithm(&mut self, value: RoundingAlgorithm) -> Result<()> { + let hr = ((*self.lpVtbl).put_RoundingAlgorithm)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_increment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Increment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_increment(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Increment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SignificantDigitsNumberRounder: INumberRounder} + RT_CLASS!{class IncrementNumberRounder: INumberRounder} + DEFINE_IID!(IID_INumberFormatter, 2768272457, 30326, 19895, 134, 49, 27, 111, 242, 101, 202, 169); + RT_INTERFACE!{interface INumberFormatter(INumberFormatterVtbl): IInspectable(IInspectableVtbl) [IID_INumberFormatter] { + fn FormatInt(&mut self, value: i64, out: *mut HSTRING) -> HRESULT, + fn FormatUInt(&mut self, value: u64, out: *mut HSTRING) -> HRESULT, + fn FormatDouble(&mut self, value: f64, out: *mut HSTRING) -> HRESULT + }} + impl INumberFormatter { + #[inline] pub unsafe fn format_int(&mut self, value: i64) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FormatInt)(self, value, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn format_uint(&mut self, value: u64) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FormatUInt)(self, value, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn format_double(&mut self, value: f64) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FormatDouble)(self, value, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INumberFormatter2, 3567829488, 32976, 19213, 168, 158, 136, 44, 30, 143, 131, 16); + RT_INTERFACE!{interface INumberFormatter2(INumberFormatter2Vtbl): IInspectable(IInspectableVtbl) [IID_INumberFormatter2] { + fn FormatInt(&mut self, value: i64, out: *mut HSTRING) -> HRESULT, + fn FormatUInt(&mut self, value: u64, out: *mut HSTRING) -> HRESULT, + fn FormatDouble(&mut self, value: f64, out: *mut HSTRING) -> HRESULT + }} + impl INumberFormatter2 { + #[inline] pub unsafe fn format_int(&mut self, value: i64) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FormatInt)(self, value, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn format_uint(&mut self, value: u64) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FormatUInt)(self, value, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn format_double(&mut self, value: f64) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FormatDouble)(self, value, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INumberParser, 3865416722, 18963, 19027, 131, 161, 57, 47, 190, 76, 255, 159); + RT_INTERFACE!{interface INumberParser(INumberParserVtbl): IInspectable(IInspectableVtbl) [IID_INumberParser] { + fn ParseInt(&mut self, text: HSTRING, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn ParseUInt(&mut self, text: HSTRING, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn ParseDouble(&mut self, text: HSTRING, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl INumberParser { + #[inline] pub unsafe fn parse_int(&mut self, text: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ParseInt)(self, text.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn parse_uint(&mut self, text: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ParseUInt)(self, text.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn parse_double(&mut self, text: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ParseDouble)(self, text.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INumberFormatterOptions, 2150837537, 44769, 19001, 186, 162, 7, 237, 140, 150, 218, 246); + RT_INTERFACE!{interface INumberFormatterOptions(INumberFormatterOptionsVtbl): IInspectable(IInspectableVtbl) [IID_INumberFormatterOptions] { + fn get_Languages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_GeographicRegion(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IntegerDigits(&mut self, out: *mut i32) -> HRESULT, + fn put_IntegerDigits(&mut self, value: i32) -> HRESULT, + fn get_FractionDigits(&mut self, out: *mut i32) -> HRESULT, + fn put_FractionDigits(&mut self, value: i32) -> HRESULT, + fn get_IsGrouped(&mut self, out: *mut bool) -> HRESULT, + fn put_IsGrouped(&mut self, value: bool) -> HRESULT, + fn get_IsDecimalPointAlwaysDisplayed(&mut self, out: *mut bool) -> HRESULT, + fn put_IsDecimalPointAlwaysDisplayed(&mut self, value: bool) -> HRESULT, + fn get_NumeralSystem(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_NumeralSystem(&mut self, value: HSTRING) -> HRESULT, + fn get_ResolvedLanguage(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ResolvedGeographicRegion(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl INumberFormatterOptions { + #[inline] pub unsafe fn get_languages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Languages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_geographic_region(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GeographicRegion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_integer_digits(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IntegerDigits)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_integer_digits(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_IntegerDigits)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_fraction_digits(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FractionDigits)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_fraction_digits(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_FractionDigits)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_grouped(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsGrouped)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_grouped(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsGrouped)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_decimal_point_always_displayed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDecimalPointAlwaysDisplayed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_decimal_point_always_displayed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDecimalPointAlwaysDisplayed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeral_system(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NumeralSystem)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_numeral_system(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_NumeralSystem)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_resolved_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_resolved_geographic_region(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResolvedGeographicRegion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISignificantDigitsOption, 491650269, 11587, 20200, 187, 241, 193, 178, 106, 113, 26, 88); + RT_INTERFACE!{interface ISignificantDigitsOption(ISignificantDigitsOptionVtbl): IInspectable(IInspectableVtbl) [IID_ISignificantDigitsOption] { + fn get_SignificantDigits(&mut self, out: *mut i32) -> HRESULT, + fn put_SignificantDigits(&mut self, value: i32) -> HRESULT + }} + impl ISignificantDigitsOption { + #[inline] pub unsafe fn get_significant_digits(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SignificantDigits)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_significant_digits(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SignificantDigits)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_INumberRounderOption, 990413875, 25711, 20222, 141, 72, 102, 235, 46, 73, 231, 54); + RT_INTERFACE!{interface INumberRounderOption(INumberRounderOptionVtbl): IInspectable(IInspectableVtbl) [IID_INumberRounderOption] { + fn get_NumberRounder(&mut self, out: *mut *mut INumberRounder) -> HRESULT, + fn put_NumberRounder(&mut self, value: *mut INumberRounder) -> HRESULT + }} + impl INumberRounderOption { + #[inline] pub unsafe fn get_number_rounder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NumberRounder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_number_rounder(&mut self, value: &INumberRounder) -> Result<()> { + let hr = ((*self.lpVtbl).put_NumberRounder)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISignedZeroOption, 4246527281, 2620, 18884, 166, 66, 150, 161, 86, 79, 79, 48); + RT_INTERFACE!{interface ISignedZeroOption(ISignedZeroOptionVtbl): IInspectable(IInspectableVtbl) [IID_ISignedZeroOption] { + fn get_IsZeroSigned(&mut self, out: *mut bool) -> HRESULT, + fn put_IsZeroSigned(&mut self, value: bool) -> HRESULT + }} + impl ISignedZeroOption { + #[inline] pub unsafe fn get_is_zero_signed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsZeroSigned)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_zero_signed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsZeroSigned)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDecimalFormatterFactory, 218205338, 58259, 18104, 184, 48, 122, 105, 200, 248, 159, 187); + RT_INTERFACE!{static interface IDecimalFormatterFactory(IDecimalFormatterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDecimalFormatterFactory] { + fn CreateDecimalFormatter(&mut self, languages: *mut super::super::foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut DecimalFormatter) -> HRESULT + }} + impl IDecimalFormatterFactory { + #[inline] pub unsafe fn create_decimal_formatter(&mut self, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDecimalFormatter)(self, languages as *const _ as *mut _, geographicRegion.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DecimalFormatter: INumberFormatterOptions [IDecimalFormatterFactory] [CLSID_DecimalFormatter]} + DEFINE_CLSID!(CLSID_DecimalFormatter = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,78,117,109,98,101,114,70,111,114,109,97,116,116,105,110,103,46,68,101,99,105,109,97,108,70,111,114,109,97,116,116,101,114,0]); + DEFINE_IID!(IID_IPercentFormatterFactory, 3078785775, 65236, 16408, 166, 226, 224, 153, 97, 224, 55, 101); + RT_INTERFACE!{static interface IPercentFormatterFactory(IPercentFormatterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPercentFormatterFactory] { + fn CreatePercentFormatter(&mut self, languages: *mut super::super::foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut PercentFormatter) -> HRESULT + }} + impl IPercentFormatterFactory { + #[inline] pub unsafe fn create_percent_formatter(&mut self, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePercentFormatter)(self, languages as *const _ as *mut _, geographicRegion.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PercentFormatter: INumberFormatterOptions [IPercentFormatterFactory] [CLSID_PercentFormatter]} + DEFINE_CLSID!(CLSID_PercentFormatter = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,78,117,109,98,101,114,70,111,114,109,97,116,116,105,110,103,46,80,101,114,99,101,110,116,70,111,114,109,97,116,116,101,114,0]); + DEFINE_IID!(IID_IPermilleFormatterFactory, 725071020, 58936, 20181, 169, 152, 98, 246, 176, 106, 73, 174); + RT_INTERFACE!{static interface IPermilleFormatterFactory(IPermilleFormatterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPermilleFormatterFactory] { + fn CreatePermilleFormatter(&mut self, languages: *mut super::super::foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut PermilleFormatter) -> HRESULT + }} + impl IPermilleFormatterFactory { + #[inline] pub unsafe fn create_permille_formatter(&mut self, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePermilleFormatter)(self, languages as *const _ as *mut _, geographicRegion.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PermilleFormatter: INumberFormatterOptions [IPermilleFormatterFactory] [CLSID_PermilleFormatter]} + DEFINE_CLSID!(CLSID_PermilleFormatter = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,78,117,109,98,101,114,70,111,114,109,97,116,116,105,110,103,46,80,101,114,109,105,108,108,101,70,111,114,109,97,116,116,101,114,0]); + RT_ENUM! { enum CurrencyFormatterMode: i32 { + UseSymbol (CurrencyFormatterMode_UseSymbol) = 0, UseCurrencyCode (CurrencyFormatterMode_UseCurrencyCode) = 1, + }} + DEFINE_IID!(IID_ICurrencyFormatterFactory, 2261209982, 47416, 19106, 132, 176, 44, 51, 220, 91, 20, 80); + RT_INTERFACE!{static interface ICurrencyFormatterFactory(ICurrencyFormatterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICurrencyFormatterFactory] { + fn CreateCurrencyFormatterCode(&mut self, currencyCode: HSTRING, out: *mut *mut CurrencyFormatter) -> HRESULT, + fn CreateCurrencyFormatterCodeContext(&mut self, currencyCode: HSTRING, languages: *mut super::super::foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut CurrencyFormatter) -> HRESULT + }} + impl ICurrencyFormatterFactory { + #[inline] pub unsafe fn create_currency_formatter_code(&mut self, currencyCode: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCurrencyFormatterCode)(self, currencyCode.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_currency_formatter_code_context(&mut self, currencyCode: &HStringArg, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCurrencyFormatterCodeContext)(self, currencyCode.get(), languages as *const _ as *mut _, geographicRegion.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CurrencyFormatter: ICurrencyFormatter [ICurrencyFormatterFactory] [CLSID_CurrencyFormatter]} + DEFINE_CLSID!(CLSID_CurrencyFormatter = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,78,117,109,98,101,114,70,111,114,109,97,116,116,105,110,103,46,67,117,114,114,101,110,99,121,70,111,114,109,97,116,116,101,114,0]); + DEFINE_IID!(IID_ICurrencyFormatter, 292752549, 19200, 16818, 179, 50, 115, 177, 42, 73, 125, 84); + RT_INTERFACE!{interface ICurrencyFormatter(ICurrencyFormatterVtbl): IInspectable(IInspectableVtbl) [IID_ICurrencyFormatter] { + fn get_Currency(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Currency(&mut self, value: HSTRING) -> HRESULT + }} + impl ICurrencyFormatter { + #[inline] pub unsafe fn get_currency(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Currency)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_currency(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Currency)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICurrencyFormatter2, 120336157, 59322, 16791, 146, 14, 36, 124, 146, 247, 222, 166); + RT_INTERFACE!{interface ICurrencyFormatter2(ICurrencyFormatter2Vtbl): IInspectable(IInspectableVtbl) [IID_ICurrencyFormatter2] { + fn get_Mode(&mut self, out: *mut CurrencyFormatterMode) -> HRESULT, + fn put_Mode(&mut self, value: CurrencyFormatterMode) -> HRESULT, + fn ApplyRoundingForCurrency(&mut self, roundingAlgorithm: RoundingAlgorithm) -> HRESULT + }} + impl ICurrencyFormatter2 { + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mode(&mut self, value: CurrencyFormatterMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn apply_rounding_for_currency(&mut self, roundingAlgorithm: RoundingAlgorithm) -> Result<()> { + let hr = ((*self.lpVtbl).ApplyRoundingForCurrency)(self, roundingAlgorithm); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_INumeralSystemTranslatorFactory, 2519779546, 14063, 19848, 168, 92, 111, 13, 152, 214, 32, 166); + RT_INTERFACE!{static interface INumeralSystemTranslatorFactory(INumeralSystemTranslatorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_INumeralSystemTranslatorFactory] { + fn Create(&mut self, languages: *mut super::super::foundation::collections::IIterable, out: *mut *mut NumeralSystemTranslator) -> HRESULT + }} + impl INumeralSystemTranslatorFactory { + #[inline] pub unsafe fn create(&mut self, languages: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, languages as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NumeralSystemTranslator: INumeralSystemTranslator [INumeralSystemTranslatorFactory] [CLSID_NumeralSystemTranslator]} + DEFINE_CLSID!(CLSID_NumeralSystemTranslator = &[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,78,117,109,98,101,114,70,111,114,109,97,116,116,105,110,103,46,78,117,109,101,114,97,108,83,121,115,116,101,109,84,114,97,110,115,108,97,116,111,114,0]); + DEFINE_IID!(IID_INumeralSystemTranslator, 687193132, 35875, 16948, 173, 46, 250, 90, 58, 66, 110, 155); + RT_INTERFACE!{interface INumeralSystemTranslator(INumeralSystemTranslatorVtbl): IInspectable(IInspectableVtbl) [IID_INumeralSystemTranslator] { + fn get_Languages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ResolvedLanguage(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NumeralSystem(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_NumeralSystem(&mut self, value: HSTRING) -> HRESULT, + fn TranslateNumerals(&mut self, value: HSTRING, out: *mut HSTRING) -> HRESULT + }} + impl INumeralSystemTranslator { + #[inline] pub unsafe fn get_languages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Languages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_resolved_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeral_system(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NumeralSystem)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_numeral_system(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_NumeralSystem)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn translate_numerals(&mut self, value: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TranslateNumerals)(self, value.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } +} // Windows.Globalization.NumberFormatting +pub mod collation { // Windows.Globalization.Collation +use ::prelude::*; + DEFINE_IID!(IID_ICharacterGrouping, 4209467835, 32861, 19376, 149, 187, 193, 247, 195, 232, 235, 142); + RT_INTERFACE!{interface ICharacterGrouping(ICharacterGroupingVtbl): IInspectable(IInspectableVtbl) [IID_ICharacterGrouping] { + fn get_First(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Label(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICharacterGrouping { + #[inline] pub unsafe fn get_first(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_First)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_label(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Label)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CharacterGrouping: ICharacterGrouping} + DEFINE_IID!(IID_ICharacterGroupings, 3100772981, 54479, 16469, 128, 229, 206, 22, 156, 34, 100, 150); + RT_INTERFACE!{interface ICharacterGroupings(ICharacterGroupingsVtbl): IInspectable(IInspectableVtbl) [IID_ICharacterGroupings] { + fn Lookup(&mut self, text: HSTRING, out: *mut HSTRING) -> HRESULT + }} + impl ICharacterGroupings { + #[inline] pub unsafe fn lookup(&mut self, text: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Lookup)(self, text.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CharacterGroupings: ICharacterGroupings} +} // Windows.Globalization.Collation +} // Windows.Globalization +#[cfg(feature="windows.graphics")] +pub mod graphics { // Windows.Graphics +pub mod printing3d { // Windows.Graphics.Printing3D +use ::prelude::*; + RT_ENUM! { enum Print3DTaskDetail: i32 { + Unknown (Print3DTaskDetail_Unknown) = 0, ModelExceedsPrintBed (Print3DTaskDetail_ModelExceedsPrintBed) = 1, UploadFailed (Print3DTaskDetail_UploadFailed) = 2, InvalidMaterialSelection (Print3DTaskDetail_InvalidMaterialSelection) = 3, InvalidModel (Print3DTaskDetail_InvalidModel) = 4, ModelNotManifold (Print3DTaskDetail_ModelNotManifold) = 5, InvalidPrintTicket (Print3DTaskDetail_InvalidPrintTicket) = 6, + }} + RT_ENUM! { enum Print3DTaskCompletion: i32 { + Abandoned (Print3DTaskCompletion_Abandoned) = 0, Canceled (Print3DTaskCompletion_Canceled) = 1, Failed (Print3DTaskCompletion_Failed) = 2, Slicing (Print3DTaskCompletion_Slicing) = 3, Submitted (Print3DTaskCompletion_Submitted) = 4, + }} + DEFINE_IID!(IID_IPrint3DTaskCompletedEventArgs, 3424195759, 9748, 20253, 172, 204, 214, 252, 79, 218, 84, 85); + RT_INTERFACE!{interface IPrint3DTaskCompletedEventArgs(IPrint3DTaskCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DTaskCompletedEventArgs] { + fn get_Completion(&mut self, out: *mut Print3DTaskCompletion) -> HRESULT, + fn get_ExtendedStatus(&mut self, out: *mut Print3DTaskDetail) -> HRESULT + }} + impl IPrint3DTaskCompletedEventArgs { + #[inline] pub unsafe fn get_completion(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Completion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class Print3DTaskCompletedEventArgs: IPrint3DTaskCompletedEventArgs} + DEFINE_IID!(IID_IPrint3DTaskSourceChangedEventArgs, 1540175023, 9449, 19472, 141, 7, 20, 195, 70, 186, 63, 207); + RT_INTERFACE!{interface IPrint3DTaskSourceChangedEventArgs(IPrint3DTaskSourceChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DTaskSourceChangedEventArgs] { + fn get_Source(&mut self, out: *mut *mut Printing3D3MFPackage) -> HRESULT + }} + impl IPrint3DTaskSourceChangedEventArgs { + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Print3DTaskSourceChangedEventArgs: IPrint3DTaskSourceChangedEventArgs} + DEFINE_IID!(IID_IPrint3DTask, 2363740288, 8472, 19496, 128, 222, 244, 38, 215, 1, 145, 174); + RT_INTERFACE!{interface IPrint3DTask(IPrint3DTaskVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DTask] { + fn get_Source(&mut self, out: *mut *mut Printing3D3MFPackage) -> HRESULT, + fn add_Submitting(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Submitting(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Completed(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceChanged(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPrint3DTask { + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_submitting(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Submitting)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_submitting(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Submitting)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_completed(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Completed)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_completed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Completed)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_changed(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceChanged)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Print3DTask: IPrint3DTask} + DEFINE_IID!(IID_IPrint3DTaskSourceRequestedArgs, 3346832058, 9391, 16973, 163, 191, 146, 37, 12, 53, 86, 2); + RT_INTERFACE!{interface IPrint3DTaskSourceRequestedArgs(IPrint3DTaskSourceRequestedArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DTaskSourceRequestedArgs] { + fn SetSource(&mut self, source: *mut Printing3D3MFPackage) -> HRESULT + }} + impl IPrint3DTaskSourceRequestedArgs { + #[inline] pub unsafe fn set_source(&mut self, source: &Printing3D3MFPackage) -> Result<()> { + let hr = ((*self.lpVtbl).SetSource)(self, source as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Print3DTaskSourceRequestedArgs: IPrint3DTaskSourceRequestedArgs} + DEFINE_IID!(IID_Print3DTaskSourceRequestedHandler, 3910622832, 51479, 18142, 187, 81, 217, 169, 77, 179, 113, 31); + RT_DELEGATE!{delegate Print3DTaskSourceRequestedHandler(Print3DTaskSourceRequestedHandlerVtbl, Print3DTaskSourceRequestedHandlerImpl) [IID_Print3DTaskSourceRequestedHandler] { + fn Invoke(&mut self, args: *mut Print3DTaskSourceRequestedArgs) -> HRESULT + }} + impl Print3DTaskSourceRequestedHandler { + #[inline] pub unsafe fn invoke(&mut self, args: &Print3DTaskSourceRequestedArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrint3DTaskRequest, 630572143, 8773, 19546, 135, 49, 13, 96, 77, 198, 188, 60); + RT_INTERFACE!{interface IPrint3DTaskRequest(IPrint3DTaskRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DTaskRequest] { + fn CreateTask(&mut self, title: HSTRING, printerId: HSTRING, handler: *mut Print3DTaskSourceRequestedHandler, out: *mut *mut Print3DTask) -> HRESULT + }} + impl IPrint3DTaskRequest { + #[inline] pub unsafe fn create_task(&mut self, title: &HStringArg, printerId: &HStringArg, handler: &Print3DTaskSourceRequestedHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTask)(self, title.get(), printerId.get(), handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Print3DTaskRequest: IPrint3DTaskRequest} + DEFINE_IID!(IID_IPrint3DTaskRequestedEventArgs, 353154943, 6341, 16599, 159, 64, 250, 179, 9, 110, 5, 169); + RT_INTERFACE!{interface IPrint3DTaskRequestedEventArgs(IPrint3DTaskRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DTaskRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut Print3DTaskRequest) -> HRESULT + }} + impl IPrint3DTaskRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Print3DTaskRequestedEventArgs: IPrint3DTaskRequestedEventArgs} + DEFINE_IID!(IID_IPrint3DManagerStatics, 250727166, 43437, 19464, 169, 23, 29, 31, 134, 62, 171, 203); + RT_INTERFACE!{static interface IPrint3DManagerStatics(IPrint3DManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DManagerStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut Print3DManager) -> HRESULT, + fn ShowPrintUIAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPrint3DManagerStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_print_uiasync(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowPrintUIAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Print3DManager: IPrint3DManager} + RT_ACTIVATABLE!{IPrint3DManagerStatics [CLSID_Print3DManager]} + DEFINE_CLSID!(CLSID_Print3DManager = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,80,114,105,110,116,105,110,103,51,68,46,80,114,105,110,116,51,68,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IPrint3DManager, 1294977802, 29542, 18801, 139, 213, 23, 196, 227, 232, 198, 192); + RT_INTERFACE!{interface IPrint3DManager(IPrint3DManagerVtbl): IInspectable(IInspectableVtbl) [IID_IPrint3DManager] { + fn add_TaskRequested(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TaskRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPrint3DManager { + #[inline] pub unsafe fn add_task_requested(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TaskRequested)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_task_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TaskRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_STRUCT! { struct Printing3DContract { + + }} + RT_ENUM! { enum Printing3DBufferFormat: i32 { + Unknown (Printing3DBufferFormat_Unknown) = 0, R32G32B32A32Float (Printing3DBufferFormat_R32G32B32A32Float) = 2, R32G32B32A32UInt (Printing3DBufferFormat_R32G32B32A32UInt) = 3, R32G32B32Float (Printing3DBufferFormat_R32G32B32Float) = 6, R32G32B32UInt (Printing3DBufferFormat_R32G32B32UInt) = 7, Printing3DDouble (Printing3DBufferFormat_Printing3DDouble) = 500, Printing3DUInt (Printing3DBufferFormat_Printing3DUInt) = 501, + }} + RT_STRUCT! { struct Printing3DBufferDescription { + Format: Printing3DBufferFormat, Stride: u32, + }} + RT_ENUM! { enum Printing3DMeshVerificationMode: i32 { + FindFirstError (Printing3DMeshVerificationMode_FindFirstError) = 0, FindAllErrors (Printing3DMeshVerificationMode_FindAllErrors) = 1, + }} + RT_ENUM! { enum Printing3DModelUnit: i32 { + Meter (Printing3DModelUnit_Meter) = 0, Micron (Printing3DModelUnit_Micron) = 1, Millimeter (Printing3DModelUnit_Millimeter) = 2, Centimeter (Printing3DModelUnit_Centimeter) = 3, Inch (Printing3DModelUnit_Inch) = 4, Foot (Printing3DModelUnit_Foot) = 5, + }} + RT_ENUM! { enum Printing3DTextureEdgeBehavior: i32 { + None (Printing3DTextureEdgeBehavior_None) = 0, Wrap (Printing3DTextureEdgeBehavior_Wrap) = 1, Mirror (Printing3DTextureEdgeBehavior_Mirror) = 2, Clamp (Printing3DTextureEdgeBehavior_Clamp) = 3, + }} + RT_ENUM! { enum Printing3DObjectType: i32 { + Model (Printing3DObjectType_Model) = 0, Support (Printing3DObjectType_Support) = 1, Others (Printing3DObjectType_Others) = 2, + }} + DEFINE_IID!(IID_IPrinting3DMesh, 422482140, 552, 11777, 188, 32, 197, 41, 12, 191, 50, 196); + RT_INTERFACE!{interface IPrinting3DMesh(IPrinting3DMeshVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DMesh] { + fn get_VertexCount(&mut self, out: *mut u32) -> HRESULT, + fn put_VertexCount(&mut self, value: u32) -> HRESULT, + fn get_IndexCount(&mut self, out: *mut u32) -> HRESULT, + fn put_IndexCount(&mut self, value: u32) -> HRESULT, + fn get_VertexPositionsDescription(&mut self, out: *mut Printing3DBufferDescription) -> HRESULT, + fn put_VertexPositionsDescription(&mut self, value: Printing3DBufferDescription) -> HRESULT, + fn get_VertexNormalsDescription(&mut self, out: *mut Printing3DBufferDescription) -> HRESULT, + fn put_VertexNormalsDescription(&mut self, value: Printing3DBufferDescription) -> HRESULT, + fn get_TriangleIndicesDescription(&mut self, out: *mut Printing3DBufferDescription) -> HRESULT, + fn put_TriangleIndicesDescription(&mut self, value: Printing3DBufferDescription) -> HRESULT, + fn get_TriangleMaterialIndicesDescription(&mut self, out: *mut Printing3DBufferDescription) -> HRESULT, + fn put_TriangleMaterialIndicesDescription(&mut self, value: Printing3DBufferDescription) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy12(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetVertexPositions(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn CreateVertexPositions(&mut self, value: u32) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy14(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetVertexNormals(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn CreateVertexNormals(&mut self, value: u32) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy16(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetTriangleIndices(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn CreateTriangleIndices(&mut self, value: u32) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy18(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetTriangleMaterialIndices(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn CreateTriangleMaterialIndices(&mut self, value: u32) -> HRESULT, + fn get_BufferDescriptionSet(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn get_BufferSet(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn VerifyAsync(&mut self, value: Printing3DMeshVerificationMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPrinting3DMesh { + #[inline] pub unsafe fn get_vertex_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VertexCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_vertex_count(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_VertexCount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_index_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IndexCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_index_count(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_IndexCount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertex_positions_description(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VertexPositionsDescription)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_vertex_positions_description(&mut self, value: Printing3DBufferDescription) -> Result<()> { + let hr = ((*self.lpVtbl).put_VertexPositionsDescription)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertex_normals_description(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VertexNormalsDescription)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_vertex_normals_description(&mut self, value: Printing3DBufferDescription) -> Result<()> { + let hr = ((*self.lpVtbl).put_VertexNormalsDescription)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_triangle_indices_description(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TriangleIndicesDescription)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_triangle_indices_description(&mut self, value: Printing3DBufferDescription) -> Result<()> { + let hr = ((*self.lpVtbl).put_TriangleIndicesDescription)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_triangle_material_indices_description(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TriangleMaterialIndicesDescription)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_triangle_material_indices_description(&mut self, value: Printing3DBufferDescription) -> Result<()> { + let hr = ((*self.lpVtbl).put_TriangleMaterialIndicesDescription)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_vertex_positions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVertexPositions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_vertex_positions(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).CreateVertexPositions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_vertex_normals(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVertexNormals)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_vertex_normals(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).CreateVertexNormals)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_triangle_indices(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTriangleIndices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_triangle_indices(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).CreateTriangleIndices)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_triangle_material_indices(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTriangleMaterialIndices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_triangle_material_indices(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).CreateTriangleMaterialIndices)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_buffer_description_set(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BufferDescriptionSet)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_buffer_set(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BufferSet)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn verify_async(&mut self, value: Printing3DMeshVerificationMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).VerifyAsync)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DMeshVerificationResult: IPrinting3DMeshVerificationResult} + DEFINE_IID!(IID_IPrinting3DModelTexture, 1571802881, 46493, 18492, 151, 187, 164, 213, 70, 209, 199, 92); + RT_INTERFACE!{interface IPrinting3DModelTexture(IPrinting3DModelTextureVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DModelTexture] { + fn get_TextureResource(&mut self, out: *mut *mut Printing3DTextureResource) -> HRESULT, + fn put_TextureResource(&mut self, value: *mut Printing3DTextureResource) -> HRESULT, + fn get_TileStyleU(&mut self, out: *mut Printing3DTextureEdgeBehavior) -> HRESULT, + fn put_TileStyleU(&mut self, value: Printing3DTextureEdgeBehavior) -> HRESULT, + fn get_TileStyleV(&mut self, out: *mut Printing3DTextureEdgeBehavior) -> HRESULT, + fn put_TileStyleV(&mut self, value: Printing3DTextureEdgeBehavior) -> HRESULT + }} + impl IPrinting3DModelTexture { + #[inline] pub unsafe fn get_texture_resource(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextureResource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_texture_resource(&mut self, value: &Printing3DTextureResource) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextureResource)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tile_style_u(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TileStyleU)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_tile_style_u(&mut self, value: Printing3DTextureEdgeBehavior) -> Result<()> { + let hr = ((*self.lpVtbl).put_TileStyleU)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tile_style_v(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TileStyleV)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_tile_style_v(&mut self, value: Printing3DTextureEdgeBehavior) -> Result<()> { + let hr = ((*self.lpVtbl).put_TileStyleV)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DTextureResource: IPrinting3DTextureResource} + DEFINE_IID!(IID_IPrinting3DTextureResource, 2802709293, 27313, 17582, 188, 69, 162, 115, 130, 192, 211, 140); + RT_INTERFACE!{interface IPrinting3DTextureResource(IPrinting3DTextureResourceVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DTextureResource] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_TextureData(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamWithContentType) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_TextureData(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamWithContentType) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT + }} + impl IPrinting3DTextureResource { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_texture_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextureData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_texture_data(&mut self, value: &super::super::storage::streams::IRandomAccessStreamWithContentType) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextureData)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DComponentWithMatrix, 846852917, 3824, 17771, 154, 33, 73, 190, 190, 139, 81, 194); + RT_INTERFACE!{interface IPrinting3DComponentWithMatrix(IPrinting3DComponentWithMatrixVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DComponentWithMatrix] { + fn get_Component(&mut self, out: *mut *mut Printing3DComponent) -> HRESULT, + fn put_Component(&mut self, value: *mut Printing3DComponent) -> HRESULT, + fn get_Matrix(&mut self, out: *mut super::super::foundation::numerics::Matrix4x4) -> HRESULT, + fn put_Matrix(&mut self, value: super::super::foundation::numerics::Matrix4x4) -> HRESULT + }} + impl IPrinting3DComponentWithMatrix { + #[inline] pub unsafe fn get_component(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Component)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_component(&mut self, value: &Printing3DComponent) -> Result<()> { + let hr = ((*self.lpVtbl).put_Component)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_matrix(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Matrix)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_matrix(&mut self, value: super::super::foundation::numerics::Matrix4x4) -> Result<()> { + let hr = ((*self.lpVtbl).put_Matrix)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DComponent: IPrinting3DComponent} + DEFINE_IID!(IID_IPrinting3DComponent, 2116581445, 49023, 19675, 162, 127, 48, 160, 20, 55, 254, 222); + RT_INTERFACE!{interface IPrinting3DComponent(IPrinting3DComponentVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DComponent] { + fn get_Mesh(&mut self, out: *mut *mut Printing3DMesh) -> HRESULT, + fn put_Mesh(&mut self, value: *mut Printing3DMesh) -> HRESULT, + fn get_Components(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Thumbnail(&mut self, out: *mut *mut Printing3DTextureResource) -> HRESULT, + fn put_Thumbnail(&mut self, value: *mut Printing3DTextureResource) -> HRESULT, + fn get_Type(&mut self, out: *mut Printing3DObjectType) -> HRESULT, + fn put_Type(&mut self, value: Printing3DObjectType) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_PartNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PartNumber(&mut self, value: HSTRING) -> HRESULT + }} + impl IPrinting3DComponent { + #[inline] pub unsafe fn get_mesh(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mesh)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_mesh(&mut self, value: &Printing3DMesh) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mesh)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_components(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Components)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_thumbnail(&mut self, value: &Printing3DTextureResource) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbnail)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_type(&mut self, value: Printing3DObjectType) -> Result<()> { + let hr = ((*self.lpVtbl).put_Type)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_part_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PartNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_part_number(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PartNumber)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DMesh: IPrinting3DMesh} + RT_CLASS!{class Printing3DComponentWithMatrix: IPrinting3DComponentWithMatrix} + DEFINE_IID!(IID_IPrinting3DBaseMaterialStatics, 2170177468, 14154, 18285, 190, 146, 62, 207, 209, 203, 151, 118); + RT_INTERFACE!{static interface IPrinting3DBaseMaterialStatics(IPrinting3DBaseMaterialStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DBaseMaterialStatics] { + fn get_Abs(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Pla(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPrinting3DBaseMaterialStatics { + #[inline] pub unsafe fn get_abs(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Abs)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pla(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pla)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DBaseMaterial, 3505448771, 50444, 19403, 157, 4, 252, 22, 173, 206, 162, 201); + RT_INTERFACE!{interface IPrinting3DBaseMaterial(IPrinting3DBaseMaterialVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DBaseMaterial] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_Color(&mut self, out: *mut *mut Printing3DColorMaterial) -> HRESULT, + fn put_Color(&mut self, value: *mut Printing3DColorMaterial) -> HRESULT + }} + impl IPrinting3DBaseMaterial { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_color(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_color(&mut self, value: &Printing3DColorMaterial) -> Result<()> { + let hr = ((*self.lpVtbl).put_Color)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DColorMaterial: IPrinting3DColorMaterial} + DEFINE_IID!(IID_IPrinting3DColorMaterial, 3783891240, 31975, 17029, 163, 93, 241, 69, 201, 81, 12, 123); + RT_INTERFACE!{interface IPrinting3DColorMaterial(IPrinting3DColorMaterialVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DColorMaterial] { + fn get_Value(&mut self, out: *mut u32) -> HRESULT, + fn put_Value(&mut self, value: u32) -> HRESULT + }} + impl IPrinting3DColorMaterial { + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DColorMaterial2, 4205897810, 2799, 17641, 157, 221, 54, 238, 234, 90, 205, 68); + RT_INTERFACE!{interface IPrinting3DColorMaterial2(IPrinting3DColorMaterial2Vtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DColorMaterial2] { + #[cfg(feature="windows.ui")] fn get_Color(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_Color(&mut self, value: super::super::ui::Color) -> HRESULT + }} + impl IPrinting3DColorMaterial2 { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_Color)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DTexture2CoordMaterial, 2374257659, 2025, 18822, 152, 51, 141, 211, 212, 140, 104, 89); + RT_INTERFACE!{interface IPrinting3DTexture2CoordMaterial(IPrinting3DTexture2CoordMaterialVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DTexture2CoordMaterial] { + fn get_Texture(&mut self, out: *mut *mut Printing3DModelTexture) -> HRESULT, + fn put_Texture(&mut self, value: *mut Printing3DModelTexture) -> HRESULT, + fn get_U(&mut self, out: *mut f64) -> HRESULT, + fn put_U(&mut self, value: f64) -> HRESULT, + fn get_V(&mut self, out: *mut f64) -> HRESULT, + fn put_V(&mut self, value: f64) -> HRESULT + }} + impl IPrinting3DTexture2CoordMaterial { + #[inline] pub unsafe fn get_texture(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Texture)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_texture(&mut self, value: &Printing3DModelTexture) -> Result<()> { + let hr = ((*self.lpVtbl).put_Texture)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_u(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_U)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_u(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_U)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_v(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_V)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_v(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_V)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DModelTexture: IPrinting3DModelTexture} + DEFINE_IID!(IID_IPrinting3DCompositeMaterial, 1176647901, 22062, 20332, 136, 45, 244, 216, 65, 253, 99, 199); + RT_INTERFACE!{interface IPrinting3DCompositeMaterial(IPrinting3DCompositeMaterialVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DCompositeMaterial] { + fn get_Values(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IPrinting3DCompositeMaterial { + #[inline] pub unsafe fn get_values(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Values)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DMultiplePropertyMaterial, 631645515, 50921, 18509, 162, 20, 162, 94, 87, 118, 186, 98); + RT_INTERFACE!{interface IPrinting3DMultiplePropertyMaterial(IPrinting3DMultiplePropertyMaterialVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DMultiplePropertyMaterial] { + fn get_MaterialIndices(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IPrinting3DMultiplePropertyMaterial { + #[inline] pub unsafe fn get_material_indices(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaterialIndices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DBaseMaterialGroupFactory, 1544898268, 34455, 16787, 151, 107, 132, 187, 65, 22, 229, 191); + RT_INTERFACE!{static interface IPrinting3DBaseMaterialGroupFactory(IPrinting3DBaseMaterialGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DBaseMaterialGroupFactory] { + fn Create(&mut self, materialGroupId: u32, out: *mut *mut Printing3DBaseMaterialGroup) -> HRESULT + }} + impl IPrinting3DBaseMaterialGroupFactory { + #[inline] pub unsafe fn create(&mut self, materialGroupId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, materialGroupId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DBaseMaterialGroup: IPrinting3DBaseMaterialGroup [IPrinting3DBaseMaterialGroupFactory] [CLSID_Printing3DBaseMaterialGroup]} + DEFINE_CLSID!(CLSID_Printing3DBaseMaterialGroup = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,80,114,105,110,116,105,110,103,51,68,46,80,114,105,110,116,105,110,103,51,68,66,97,115,101,77,97,116,101,114,105,97,108,71,114,111,117,112,0]); + DEFINE_IID!(IID_IPrinting3DBaseMaterialGroup, 2498785464, 9493, 19085, 161, 240, 208, 252, 19, 208, 96, 33); + RT_INTERFACE!{interface IPrinting3DBaseMaterialGroup(IPrinting3DBaseMaterialGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DBaseMaterialGroup] { + fn get_Bases(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_MaterialGroupId(&mut self, out: *mut u32) -> HRESULT + }} + impl IPrinting3DBaseMaterialGroup { + #[inline] pub unsafe fn get_bases(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Bases)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_material_group_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaterialGroupId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DBaseMaterial: IPrinting3DBaseMaterial} + RT_ACTIVATABLE!{IPrinting3DBaseMaterialStatics [CLSID_Printing3DBaseMaterial]} + DEFINE_CLSID!(CLSID_Printing3DBaseMaterial = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,80,114,105,110,116,105,110,103,51,68,46,80,114,105,110,116,105,110,103,51,68,66,97,115,101,77,97,116,101,114,105,97,108,0]); + DEFINE_IID!(IID_IPrinting3DColorMaterialGroupFactory, 1909689709, 45546, 19035, 188, 84, 25, 198, 95, 61, 240, 68); + RT_INTERFACE!{static interface IPrinting3DColorMaterialGroupFactory(IPrinting3DColorMaterialGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DColorMaterialGroupFactory] { + fn Create(&mut self, materialGroupId: u32, out: *mut *mut Printing3DColorMaterialGroup) -> HRESULT + }} + impl IPrinting3DColorMaterialGroupFactory { + #[inline] pub unsafe fn create(&mut self, materialGroupId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, materialGroupId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DColorMaterialGroup: IPrinting3DColorMaterialGroup [IPrinting3DColorMaterialGroupFactory] [CLSID_Printing3DColorMaterialGroup]} + DEFINE_CLSID!(CLSID_Printing3DColorMaterialGroup = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,80,114,105,110,116,105,110,103,51,68,46,80,114,105,110,116,105,110,103,51,68,67,111,108,111,114,77,97,116,101,114,105,97,108,71,114,111,117,112,0]); + DEFINE_IID!(IID_IPrinting3DColorMaterialGroup, 1731536, 43743, 16934, 175, 233, 243, 105, 160, 180, 80, 4); + RT_INTERFACE!{interface IPrinting3DColorMaterialGroup(IPrinting3DColorMaterialGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DColorMaterialGroup] { + fn get_Colors(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_MaterialGroupId(&mut self, out: *mut u32) -> HRESULT + }} + impl IPrinting3DColorMaterialGroup { + #[inline] pub unsafe fn get_colors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Colors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_material_group_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaterialGroupId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DTexture2CoordMaterialGroupFactory, 3417328048, 18058, 19567, 178, 162, 142, 184, 186, 141, 234, 72); + RT_INTERFACE!{static interface IPrinting3DTexture2CoordMaterialGroupFactory(IPrinting3DTexture2CoordMaterialGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DTexture2CoordMaterialGroupFactory] { + fn Create(&mut self, materialGroupId: u32, out: *mut *mut Printing3DTexture2CoordMaterialGroup) -> HRESULT + }} + impl IPrinting3DTexture2CoordMaterialGroupFactory { + #[inline] pub unsafe fn create(&mut self, materialGroupId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, materialGroupId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DTexture2CoordMaterialGroup: IPrinting3DTexture2CoordMaterialGroup [IPrinting3DTexture2CoordMaterialGroupFactory] [CLSID_Printing3DTexture2CoordMaterialGroup]} + DEFINE_CLSID!(CLSID_Printing3DTexture2CoordMaterialGroup = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,80,114,105,110,116,105,110,103,51,68,46,80,114,105,110,116,105,110,103,51,68,84,101,120,116,117,114,101,50,67,111,111,114,100,77,97,116,101,114,105,97,108,71,114,111,117,112,0]); + DEFINE_IID!(IID_IPrinting3DTexture2CoordMaterialGroup, 1652391079, 28048, 20409, 159, 196, 159, 239, 243, 223, 168, 146); + RT_INTERFACE!{interface IPrinting3DTexture2CoordMaterialGroup(IPrinting3DTexture2CoordMaterialGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DTexture2CoordMaterialGroup] { + fn get_Texture2Coords(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_MaterialGroupId(&mut self, out: *mut u32) -> HRESULT + }} + impl IPrinting3DTexture2CoordMaterialGroup { + #[inline] pub unsafe fn get_texture2_coords(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Texture2Coords)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_material_group_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaterialGroupId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DTexture2CoordMaterial: IPrinting3DTexture2CoordMaterial} + DEFINE_IID!(IID_IPrinting3DTexture2CoordMaterialGroup2, 1778113466, 45358, 17051, 131, 134, 223, 82, 132, 246, 232, 15); + RT_INTERFACE!{interface IPrinting3DTexture2CoordMaterialGroup2(IPrinting3DTexture2CoordMaterialGroup2Vtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DTexture2CoordMaterialGroup2] { + fn get_Texture(&mut self, out: *mut *mut Printing3DModelTexture) -> HRESULT, + fn put_Texture(&mut self, value: *mut Printing3DModelTexture) -> HRESULT + }} + impl IPrinting3DTexture2CoordMaterialGroup2 { + #[inline] pub unsafe fn get_texture(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Texture)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_texture(&mut self, value: &Printing3DModelTexture) -> Result<()> { + let hr = ((*self.lpVtbl).put_Texture)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DCompositeMaterialGroupFactory, 3499019539, 37631, 17322, 166, 39, 141, 67, 194, 44, 129, 126); + RT_INTERFACE!{static interface IPrinting3DCompositeMaterialGroupFactory(IPrinting3DCompositeMaterialGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DCompositeMaterialGroupFactory] { + fn Create(&mut self, materialGroupId: u32, out: *mut *mut Printing3DCompositeMaterialGroup) -> HRESULT + }} + impl IPrinting3DCompositeMaterialGroupFactory { + #[inline] pub unsafe fn create(&mut self, materialGroupId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, materialGroupId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DCompositeMaterialGroup: IPrinting3DCompositeMaterialGroup [IPrinting3DCompositeMaterialGroupFactory] [CLSID_Printing3DCompositeMaterialGroup]} + DEFINE_CLSID!(CLSID_Printing3DCompositeMaterialGroup = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,80,114,105,110,116,105,110,103,51,68,46,80,114,105,110,116,105,110,103,51,68,67,111,109,112,111,115,105,116,101,77,97,116,101,114,105,97,108,71,114,111,117,112,0]); + DEFINE_IID!(IID_IPrinting3DCompositeMaterialGroup2, 115895650, 32059, 16865, 148, 76, 186, 253, 228, 85, 84, 131); + RT_INTERFACE!{interface IPrinting3DCompositeMaterialGroup2(IPrinting3DCompositeMaterialGroup2Vtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DCompositeMaterialGroup2] { + fn get_BaseMaterialGroup(&mut self, out: *mut *mut Printing3DBaseMaterialGroup) -> HRESULT, + fn put_BaseMaterialGroup(&mut self, value: *mut Printing3DBaseMaterialGroup) -> HRESULT + }} + impl IPrinting3DCompositeMaterialGroup2 { + #[inline] pub unsafe fn get_base_material_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BaseMaterialGroup)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_base_material_group(&mut self, value: &Printing3DBaseMaterialGroup) -> Result<()> { + let hr = ((*self.lpVtbl).put_BaseMaterialGroup)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DCompositeMaterialGroup, 2375314011, 16625, 18797, 165, 251, 52, 10, 90, 103, 142, 48); + RT_INTERFACE!{interface IPrinting3DCompositeMaterialGroup(IPrinting3DCompositeMaterialGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DCompositeMaterialGroup] { + fn get_Composites(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_MaterialGroupId(&mut self, out: *mut u32) -> HRESULT, + fn get_MaterialIndices(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IPrinting3DCompositeMaterialGroup { + #[inline] pub unsafe fn get_composites(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Composites)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_material_group_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaterialGroupId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_material_indices(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaterialIndices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DCompositeMaterial: IPrinting3DCompositeMaterial} + DEFINE_IID!(IID_IPrinting3DMultiplePropertyMaterialGroupFactory, 842930542, 54470, 17694, 168, 20, 77, 120, 162, 16, 254, 83); + RT_INTERFACE!{static interface IPrinting3DMultiplePropertyMaterialGroupFactory(IPrinting3DMultiplePropertyMaterialGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DMultiplePropertyMaterialGroupFactory] { + fn Create(&mut self, materialGroupId: u32, out: *mut *mut Printing3DMultiplePropertyMaterialGroup) -> HRESULT + }} + impl IPrinting3DMultiplePropertyMaterialGroupFactory { + #[inline] pub unsafe fn create(&mut self, materialGroupId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, materialGroupId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DMultiplePropertyMaterialGroup: IPrinting3DMultiplePropertyMaterialGroup [IPrinting3DMultiplePropertyMaterialGroupFactory] [CLSID_Printing3DMultiplePropertyMaterialGroup]} + DEFINE_CLSID!(CLSID_Printing3DMultiplePropertyMaterialGroup = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,80,114,105,110,116,105,110,103,51,68,46,80,114,105,110,116,105,110,103,51,68,77,117,108,116,105,112,108,101,80,114,111,112,101,114,116,121,77,97,116,101,114,105,97,108,71,114,111,117,112,0]); + DEFINE_IID!(IID_IPrinting3DMultiplePropertyMaterialGroup, 4036298009, 44729, 17685, 163, 155, 160, 136, 251, 187, 39, 124); + RT_INTERFACE!{interface IPrinting3DMultiplePropertyMaterialGroup(IPrinting3DMultiplePropertyMaterialGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DMultiplePropertyMaterialGroup] { + fn get_MultipleProperties(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_MaterialGroupIndices(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_MaterialGroupId(&mut self, out: *mut u32) -> HRESULT + }} + impl IPrinting3DMultiplePropertyMaterialGroup { + #[inline] pub unsafe fn get_multiple_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MultipleProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_material_group_indices(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaterialGroupIndices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_material_group_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaterialGroupId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DMultiplePropertyMaterial: IPrinting3DMultiplePropertyMaterial} + DEFINE_IID!(IID_IPrinting3DMaterial, 932033110, 60770, 18770, 184, 91, 3, 86, 125, 124, 70, 94); + RT_INTERFACE!{interface IPrinting3DMaterial(IPrinting3DMaterialVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DMaterial] { + fn get_BaseGroups(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ColorGroups(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Texture2CoordGroups(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_CompositeGroups(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_MultiplePropertyGroups(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IPrinting3DMaterial { + #[inline] pub unsafe fn get_base_groups(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BaseGroups)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_color_groups(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ColorGroups)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_texture2_coord_groups(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Texture2CoordGroups)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_composite_groups(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CompositeGroups)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_multiple_property_groups(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MultiplePropertyGroups)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DMeshVerificationResult, 425095610, 59706, 20106, 164, 111, 222, 168, 232, 82, 25, 126); + RT_INTERFACE!{interface IPrinting3DMeshVerificationResult(IPrinting3DMeshVerificationResultVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DMeshVerificationResult] { + fn get_IsValid(&mut self, out: *mut bool) -> HRESULT, + fn get_NonmanifoldTriangles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ReversedNormalTriangles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IPrinting3DMeshVerificationResult { + #[inline] pub unsafe fn get_is_valid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsValid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_nonmanifold_triangles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NonmanifoldTriangles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_reversed_normal_triangles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ReversedNormalTriangles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DModel, 755052272, 21243, 37274, 119, 176, 75, 26, 59, 128, 50, 79); + RT_INTERFACE!{interface IPrinting3DModel(IPrinting3DModelVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DModel] { + fn get_Unit(&mut self, out: *mut Printing3DModelUnit) -> HRESULT, + fn put_Unit(&mut self, value: Printing3DModelUnit) -> HRESULT, + fn get_Textures(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Meshes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Components(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Material(&mut self, out: *mut *mut Printing3DMaterial) -> HRESULT, + fn put_Material(&mut self, value: *mut Printing3DMaterial) -> HRESULT, + fn get_Build(&mut self, out: *mut *mut Printing3DComponent) -> HRESULT, + fn put_Build(&mut self, value: *mut Printing3DComponent) -> HRESULT, + fn get_Version(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Version(&mut self, value: HSTRING) -> HRESULT, + fn get_RequiredExtensions(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Metadata(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn RepairAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn Clone(&mut self, out: *mut *mut Printing3DModel) -> HRESULT + }} + impl IPrinting3DModel { + #[inline] pub unsafe fn get_unit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Unit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_unit(&mut self, value: Printing3DModelUnit) -> Result<()> { + let hr = ((*self.lpVtbl).put_Unit)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_textures(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Textures)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_meshes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Meshes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_components(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Components)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_material(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Material)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_material(&mut self, value: &Printing3DMaterial) -> Result<()> { + let hr = ((*self.lpVtbl).put_Material)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_build(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Build)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_build(&mut self, value: &Printing3DComponent) -> Result<()> { + let hr = ((*self.lpVtbl).put_Build)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_version(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Version)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_version(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Version)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_required_extensions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RequiredExtensions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_metadata(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Metadata)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn repair_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RepairAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clone(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Clone)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DMaterial: IPrinting3DMaterial} + RT_CLASS!{class Printing3DModel: IPrinting3DModel} + DEFINE_IID!(IID_IPrinting3DFaceReductionOptions, 3154039703, 11636, 18167, 190, 133, 153, 166, 123, 187, 102, 41); + RT_INTERFACE!{interface IPrinting3DFaceReductionOptions(IPrinting3DFaceReductionOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DFaceReductionOptions] { + fn get_MaxReductionArea(&mut self, out: *mut f64) -> HRESULT, + fn put_MaxReductionArea(&mut self, value: f64) -> HRESULT, + fn get_TargetTriangleCount(&mut self, out: *mut u32) -> HRESULT, + fn put_TargetTriangleCount(&mut self, value: u32) -> HRESULT, + fn get_MaxEdgeLength(&mut self, out: *mut f64) -> HRESULT, + fn put_MaxEdgeLength(&mut self, value: f64) -> HRESULT + }} + impl IPrinting3DFaceReductionOptions { + #[inline] pub unsafe fn get_max_reduction_area(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxReductionArea)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_reduction_area(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxReductionArea)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_target_triangle_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TargetTriangleCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_target_triangle_count(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetTriangleCount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_edge_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxEdgeLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_edge_length(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxEdgeLength)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrinting3DModel2, 3374344647, 51265, 18419, 168, 78, 161, 73, 253, 8, 182, 87); + RT_INTERFACE!{interface IPrinting3DModel2(IPrinting3DModel2Vtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DModel2] { + fn TryPartialRepairAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryPartialRepairWithTimeAsync(&mut self, maxWaitTime: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryReduceFacesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn TryReduceFacesWithOptionsAsync(&mut self, printing3DFaceReductionOptions: *mut Printing3DFaceReductionOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn TryReduceFacesWithOptionsAndTimeAsync(&mut self, printing3DFaceReductionOptions: *mut Printing3DFaceReductionOptions, maxWait: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RepairWithProgressAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IPrinting3DModel2 { + #[inline] pub unsafe fn try_partial_repair_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryPartialRepairAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_partial_repair_with_time_async(&mut self, maxWaitTime: super::super::foundation::TimeSpan) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryPartialRepairWithTimeAsync)(self, maxWaitTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_reduce_faces_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryReduceFacesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_reduce_faces_with_options_async(&mut self, printing3DFaceReductionOptions: &Printing3DFaceReductionOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryReduceFacesWithOptionsAsync)(self, printing3DFaceReductionOptions as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_reduce_faces_with_options_and_time_async(&mut self, printing3DFaceReductionOptions: &Printing3DFaceReductionOptions, maxWait: super::super::foundation::TimeSpan) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryReduceFacesWithOptionsAndTimeAsync)(self, printing3DFaceReductionOptions as *const _ as *mut _, maxWait, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn repair_with_progress_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RepairWithProgressAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Printing3DFaceReductionOptions: IPrinting3DFaceReductionOptions} + DEFINE_IID!(IID_IPrinting3D3MFPackageStatics, 1884871087, 31386, 18311, 184, 23, 246, 244, 89, 33, 72, 35); + RT_INTERFACE!{static interface IPrinting3D3MFPackageStatics(IPrinting3D3MFPackageStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3D3MFPackageStatics] { + #[cfg(feature="windows.storage")] fn LoadAsync(&mut self, value: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPrinting3D3MFPackageStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_async(&mut self, value: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Printing3D3MFPackage: IPrinting3D3MFPackage} + RT_ACTIVATABLE!{IPrinting3D3MFPackageStatics [CLSID_Printing3D3MFPackage]} + DEFINE_CLSID!(CLSID_Printing3D3MFPackage = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,80,114,105,110,116,105,110,103,51,68,46,80,114,105,110,116,105,110,103,51,68,51,77,70,80,97,99,107,97,103,101,0]); + DEFINE_IID!(IID_IPrinting3D3MFPackage, 4132296136, 10935, 17833, 161, 183, 38, 126, 148, 141, 91, 24); + RT_INTERFACE!{interface IPrinting3D3MFPackage(IPrinting3D3MFPackageVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3D3MFPackage] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SaveAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_PrintTicket(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_PrintTicket(&mut self, value: *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_ModelPart(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_ModelPart(&mut self, value: *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + fn get_Thumbnail(&mut self, out: *mut *mut Printing3DTextureResource) -> HRESULT, + fn put_Thumbnail(&mut self, value: *mut Printing3DTextureResource) -> HRESULT, + fn get_Textures(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.storage")] fn LoadModelFromPackageAsync(&mut self, value: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SaveModelToPackageAsync(&mut self, value: *mut Printing3DModel, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IPrinting3D3MFPackage { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn save_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_print_ticket(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrintTicket)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_print_ticket(&mut self, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + let hr = ((*self.lpVtbl).put_PrintTicket)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_model_part(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ModelPart)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_model_part(&mut self, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + let hr = ((*self.lpVtbl).put_ModelPart)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_thumbnail(&mut self, value: &Printing3DTextureResource) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbnail)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_textures(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Textures)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_model_from_package_async(&mut self, value: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadModelFromPackageAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn save_model_to_package_async(&mut self, value: &Printing3DModel) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveModelToPackageAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Graphics.Printing3D +pub mod display { // Windows.Graphics.Display +use ::prelude::*; + DEFINE_IID!(IID_IDisplayInformationStatics, 3332385388, 54354, 17628, 186, 7, 150, 243, 198, 173, 249, 209); + RT_INTERFACE!{static interface IDisplayInformationStatics(IDisplayInformationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDisplayInformationStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut DisplayInformation) -> HRESULT, + fn get_AutoRotationPreferences(&mut self, out: *mut DisplayOrientations) -> HRESULT, + fn put_AutoRotationPreferences(&mut self, value: DisplayOrientations) -> HRESULT, + fn add_DisplayContentsInvalidated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DisplayContentsInvalidated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IDisplayInformationStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_rotation_preferences(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoRotationPreferences)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_rotation_preferences(&mut self, value: DisplayOrientations) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoRotationPreferences)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_display_contents_invalidated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DisplayContentsInvalidated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_display_contents_invalidated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DisplayContentsInvalidated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DisplayInformation: IDisplayInformation} + RT_ACTIVATABLE!{IDisplayInformationStatics [CLSID_DisplayInformation]} + DEFINE_CLSID!(CLSID_DisplayInformation = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,68,105,115,112,108,97,121,46,68,105,115,112,108,97,121,73,110,102,111,114,109,97,116,105,111,110,0]); + DEFINE_IID!(IID_IDisplayInformation, 3201372846, 44483, 19913, 174, 101, 133, 31, 77, 125, 71, 153); + RT_INTERFACE!{interface IDisplayInformation(IDisplayInformationVtbl): IInspectable(IInspectableVtbl) [IID_IDisplayInformation] { + fn get_CurrentOrientation(&mut self, out: *mut DisplayOrientations) -> HRESULT, + fn get_NativeOrientation(&mut self, out: *mut DisplayOrientations) -> HRESULT, + fn add_OrientationChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_OrientationChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_ResolutionScale(&mut self, out: *mut ResolutionScale) -> HRESULT, + fn get_LogicalDpi(&mut self, out: *mut f32) -> HRESULT, + fn get_RawDpiX(&mut self, out: *mut f32) -> HRESULT, + fn get_RawDpiY(&mut self, out: *mut f32) -> HRESULT, + fn add_DpiChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DpiChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_StereoEnabled(&mut self, out: *mut bool) -> HRESULT, + fn add_StereoEnabledChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StereoEnabledChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy13(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetColorProfileAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_ColorProfileChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ColorProfileChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IDisplayInformation { + #[inline] pub unsafe fn get_current_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentOrientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_native_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NativeOrientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_orientation_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_OrientationChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_orientation_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_OrientationChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_resolution_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResolutionScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_logical_dpi(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LogicalDpi)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_raw_dpi_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RawDpiX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_raw_dpi_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RawDpiY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_dpi_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DpiChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_dpi_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DpiChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stereo_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StereoEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_stereo_enabled_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StereoEnabledChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stereo_enabled_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StereoEnabledChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_color_profile_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetColorProfileAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_color_profile_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ColorProfileChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_color_profile_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ColorProfileChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDisplayInformation2, 1305280545, 64209, 19342, 142, 223, 119, 88, 135, 184, 191, 25); + RT_INTERFACE!{interface IDisplayInformation2(IDisplayInformation2Vtbl): IInspectable(IInspectableVtbl) [IID_IDisplayInformation2] { + fn get_RawPixelsPerViewPixel(&mut self, out: *mut f64) -> HRESULT + }} + impl IDisplayInformation2 { + #[inline] pub unsafe fn get_raw_pixels_per_view_pixel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RawPixelsPerViewPixel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDisplayInformation3, 3675586845, 3849, 17510, 143, 243, 17, 222, 154, 60, 146, 154); + RT_INTERFACE!{interface IDisplayInformation3(IDisplayInformation3Vtbl): IInspectable(IInspectableVtbl) [IID_IDisplayInformation3] { + fn get_DiagonalSizeInInches(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IDisplayInformation3 { + #[inline] pub unsafe fn get_diagonal_size_in_inches(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DiagonalSizeInInches)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDisplayInformation4, 3379744303, 4674, 18110, 181, 54, 225, 170, 254, 158, 122, 207); + RT_INTERFACE!{interface IDisplayInformation4(IDisplayInformation4Vtbl): IInspectable(IInspectableVtbl) [IID_IDisplayInformation4] { + fn get_ScreenWidthInRawPixels(&mut self, out: *mut u32) -> HRESULT, + fn get_ScreenHeightInRawPixels(&mut self, out: *mut u32) -> HRESULT + }} + impl IDisplayInformation4 { + #[inline] pub unsafe fn get_screen_width_in_raw_pixels(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScreenWidthInRawPixels)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_screen_height_in_raw_pixels(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScreenHeightInRawPixels)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_DisplayPropertiesEventHandler, 3688729345, 61857, 18129, 158, 227, 84, 59, 204, 153, 89, 128); + RT_DELEGATE!{delegate DisplayPropertiesEventHandler(DisplayPropertiesEventHandlerVtbl, DisplayPropertiesEventHandlerImpl) [IID_DisplayPropertiesEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable) -> HRESULT + }} + impl DisplayPropertiesEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum DisplayOrientations: u32 { + None (DisplayOrientations_None) = 0, Landscape (DisplayOrientations_Landscape) = 1, Portrait (DisplayOrientations_Portrait) = 2, LandscapeFlipped (DisplayOrientations_LandscapeFlipped) = 4, PortraitFlipped (DisplayOrientations_PortraitFlipped) = 8, + }} + RT_ENUM! { enum ResolutionScale: i32 { + Invalid (ResolutionScale_Invalid) = 0, Scale100Percent (ResolutionScale_Scale100Percent) = 100, Scale120Percent (ResolutionScale_Scale120Percent) = 120, Scale125Percent (ResolutionScale_Scale125Percent) = 125, Scale140Percent (ResolutionScale_Scale140Percent) = 140, Scale150Percent (ResolutionScale_Scale150Percent) = 150, Scale160Percent (ResolutionScale_Scale160Percent) = 160, Scale175Percent (ResolutionScale_Scale175Percent) = 175, Scale180Percent (ResolutionScale_Scale180Percent) = 180, Scale200Percent (ResolutionScale_Scale200Percent) = 200, Scale225Percent (ResolutionScale_Scale225Percent) = 225, Scale250Percent (ResolutionScale_Scale250Percent) = 250, Scale300Percent (ResolutionScale_Scale300Percent) = 300, Scale350Percent (ResolutionScale_Scale350Percent) = 350, Scale400Percent (ResolutionScale_Scale400Percent) = 400, Scale450Percent (ResolutionScale_Scale450Percent) = 450, Scale500Percent (ResolutionScale_Scale500Percent) = 500, + }} + DEFINE_IID!(IID_IDisplayPropertiesStatics, 1765272973, 12522, 19949, 130, 113, 69, 83, 255, 2, 246, 138); + RT_INTERFACE!{static interface IDisplayPropertiesStatics(IDisplayPropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDisplayPropertiesStatics] { + fn get_CurrentOrientation(&mut self, out: *mut DisplayOrientations) -> HRESULT, + fn get_NativeOrientation(&mut self, out: *mut DisplayOrientations) -> HRESULT, + fn get_AutoRotationPreferences(&mut self, out: *mut DisplayOrientations) -> HRESULT, + fn put_AutoRotationPreferences(&mut self, value: DisplayOrientations) -> HRESULT, + fn add_OrientationChanged(&mut self, handler: *mut DisplayPropertiesEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_OrientationChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_ResolutionScale(&mut self, out: *mut ResolutionScale) -> HRESULT, + fn get_LogicalDpi(&mut self, out: *mut f32) -> HRESULT, + fn add_LogicalDpiChanged(&mut self, handler: *mut DisplayPropertiesEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LogicalDpiChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_StereoEnabled(&mut self, out: *mut bool) -> HRESULT, + fn add_StereoEnabledChanged(&mut self, handler: *mut DisplayPropertiesEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StereoEnabledChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy13(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetColorProfileAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_ColorProfileChanged(&mut self, handler: *mut DisplayPropertiesEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ColorProfileChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DisplayContentsInvalidated(&mut self, handler: *mut DisplayPropertiesEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DisplayContentsInvalidated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IDisplayPropertiesStatics { + #[inline] pub unsafe fn get_current_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentOrientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_native_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NativeOrientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_rotation_preferences(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoRotationPreferences)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_rotation_preferences(&mut self, value: DisplayOrientations) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoRotationPreferences)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_orientation_changed(&mut self, handler: &DisplayPropertiesEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_OrientationChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_orientation_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_OrientationChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_resolution_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResolutionScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_logical_dpi(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LogicalDpi)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_logical_dpi_changed(&mut self, handler: &DisplayPropertiesEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LogicalDpiChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_logical_dpi_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LogicalDpiChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stereo_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StereoEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_stereo_enabled_changed(&mut self, handler: &DisplayPropertiesEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StereoEnabledChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stereo_enabled_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StereoEnabledChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_color_profile_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetColorProfileAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_color_profile_changed(&mut self, handler: &DisplayPropertiesEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ColorProfileChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_color_profile_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ColorProfileChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_display_contents_invalidated(&mut self, handler: &DisplayPropertiesEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DisplayContentsInvalidated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_display_contents_invalidated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DisplayContentsInvalidated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IDisplayPropertiesStatics [CLSID_DisplayProperties]} + DEFINE_CLSID!(CLSID_DisplayProperties = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,68,105,115,112,108,97,121,46,68,105,115,112,108,97,121,80,114,111,112,101,114,116,105,101,115,0]); +} // Windows.Graphics.Display +pub mod imaging { // Windows.Graphics.Imaging +use ::prelude::*; + RT_ENUM! { enum BitmapInterpolationMode: i32 { + NearestNeighbor (BitmapInterpolationMode_NearestNeighbor) = 0, Linear (BitmapInterpolationMode_Linear) = 1, Cubic (BitmapInterpolationMode_Cubic) = 2, Fant (BitmapInterpolationMode_Fant) = 3, + }} + RT_ENUM! { enum BitmapFlip: i32 { + None (BitmapFlip_None) = 0, Horizontal (BitmapFlip_Horizontal) = 1, Vertical (BitmapFlip_Vertical) = 2, + }} + RT_ENUM! { enum BitmapRotation: i32 { + None (BitmapRotation_None) = 0, Clockwise90Degrees (BitmapRotation_Clockwise90Degrees) = 1, Clockwise180Degrees (BitmapRotation_Clockwise180Degrees) = 2, Clockwise270Degrees (BitmapRotation_Clockwise270Degrees) = 3, + }} + RT_STRUCT! { struct BitmapBounds { + X: u32, Y: u32, Width: u32, Height: u32, + }} + RT_STRUCT! { struct BitmapSize { + Width: u32, Height: u32, + }} + RT_ENUM! { enum ColorManagementMode: i32 { + DoNotColorManage (ColorManagementMode_DoNotColorManage) = 0, ColorManageToSRgb (ColorManagementMode_ColorManageToSRgb) = 1, + }} + RT_ENUM! { enum ExifOrientationMode: i32 { + IgnoreExifOrientation (ExifOrientationMode_IgnoreExifOrientation) = 0, RespectExifOrientation (ExifOrientationMode_RespectExifOrientation) = 1, + }} + RT_ENUM! { enum PngFilterMode: i32 { + Automatic (PngFilterMode_Automatic) = 0, None (PngFilterMode_None) = 1, Sub (PngFilterMode_Sub) = 2, Up (PngFilterMode_Up) = 3, Average (PngFilterMode_Average) = 4, Paeth (PngFilterMode_Paeth) = 5, Adaptive (PngFilterMode_Adaptive) = 6, + }} + RT_ENUM! { enum TiffCompressionMode: i32 { + Automatic (TiffCompressionMode_Automatic) = 0, None (TiffCompressionMode_None) = 1, Ccitt3 (TiffCompressionMode_Ccitt3) = 2, Ccitt4 (TiffCompressionMode_Ccitt4) = 3, Lzw (TiffCompressionMode_Lzw) = 4, Rle (TiffCompressionMode_Rle) = 5, Zip (TiffCompressionMode_Zip) = 6, LzwhDifferencing (TiffCompressionMode_LzwhDifferencing) = 7, + }} + RT_ENUM! { enum JpegSubsamplingMode: i32 { + Default (JpegSubsamplingMode_Default) = 0, Y4Cb2Cr0 (JpegSubsamplingMode_Y4Cb2Cr0) = 1, Y4Cb2Cr2 (JpegSubsamplingMode_Y4Cb2Cr2) = 2, Y4Cb4Cr4 (JpegSubsamplingMode_Y4Cb4Cr4) = 3, + }} + DEFINE_IID!(IID_IBitmapTransform, 2926924612, 57960, 19765, 173, 207, 233, 149, 211, 26, 141, 52); + RT_INTERFACE!{interface IBitmapTransform(IBitmapTransformVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapTransform] { + fn get_ScaledWidth(&mut self, out: *mut u32) -> HRESULT, + fn put_ScaledWidth(&mut self, value: u32) -> HRESULT, + fn get_ScaledHeight(&mut self, out: *mut u32) -> HRESULT, + fn put_ScaledHeight(&mut self, value: u32) -> HRESULT, + fn get_InterpolationMode(&mut self, out: *mut BitmapInterpolationMode) -> HRESULT, + fn put_InterpolationMode(&mut self, value: BitmapInterpolationMode) -> HRESULT, + fn get_Flip(&mut self, out: *mut BitmapFlip) -> HRESULT, + fn put_Flip(&mut self, value: BitmapFlip) -> HRESULT, + fn get_Rotation(&mut self, out: *mut BitmapRotation) -> HRESULT, + fn put_Rotation(&mut self, value: BitmapRotation) -> HRESULT, + fn get_Bounds(&mut self, out: *mut BitmapBounds) -> HRESULT, + fn put_Bounds(&mut self, value: BitmapBounds) -> HRESULT + }} + impl IBitmapTransform { + #[inline] pub unsafe fn get_scaled_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScaledWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scaled_width(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ScaledWidth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scaled_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScaledHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scaled_height(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ScaledHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_interpolation_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InterpolationMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_interpolation_mode(&mut self, value: BitmapInterpolationMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_InterpolationMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_flip(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Flip)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_flip(&mut self, value: BitmapFlip) -> Result<()> { + let hr = ((*self.lpVtbl).put_Flip)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Rotation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rotation(&mut self, value: BitmapRotation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Rotation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bounds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bounds(&mut self, value: BitmapBounds) -> Result<()> { + let hr = ((*self.lpVtbl).put_Bounds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class BitmapTransform: IBitmapTransform} + DEFINE_IID!(IID_IBitmapTypedValue, 3447735465, 9283, 16384, 176, 205, 121, 49, 108, 86, 245, 137); + RT_INTERFACE!{interface IBitmapTypedValue(IBitmapTypedValueVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapTypedValue] { + fn get_Value(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_Type(&mut self, out: *mut super::super::foundation::PropertyType) -> HRESULT + }} + impl IBitmapTypedValue { + #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBitmapTypedValueFactory, 2463872409, 52755, 18107, 149, 69, 203, 58, 63, 99, 235, 139); + RT_INTERFACE!{static interface IBitmapTypedValueFactory(IBitmapTypedValueFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapTypedValueFactory] { + fn Create(&mut self, value: *mut IInspectable, type_: super::super::foundation::PropertyType, out: *mut *mut BitmapTypedValue) -> HRESULT + }} + impl IBitmapTypedValueFactory { + #[inline] pub unsafe fn create(&mut self, value: &IInspectable, type_: super::super::foundation::PropertyType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, value as *const _ as *mut _, type_, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BitmapTypedValue: IBitmapTypedValue [IBitmapTypedValueFactory] [CLSID_BitmapTypedValue]} + DEFINE_CLSID!(CLSID_BitmapTypedValue = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,73,109,97,103,105,110,103,46,66,105,116,109,97,112,84,121,112,101,100,86,97,108,117,101,0]); + RT_CLASS!{class BitmapPropertySet: super::super::foundation::collections::IMap} + DEFINE_IID!(IID_IBitmapPropertiesView, 2114971770, 14960, 18680, 156, 85, 25, 108, 245, 165, 69, 245); + RT_INTERFACE!{interface IBitmapPropertiesView(IBitmapPropertiesViewVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapPropertiesView] { + fn GetPropertiesAsync(&mut self, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBitmapPropertiesView { + #[inline] pub unsafe fn get_properties_async(&mut self, propertiesToRetrieve: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPropertiesAsync)(self, propertiesToRetrieve as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBitmapProperties, 3936309019, 46341, 17488, 164, 209, 232, 202, 148, 82, 157, 141); + RT_INTERFACE!{interface IBitmapProperties(IBitmapPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapProperties] { + fn SetPropertiesAsync(&mut self, propertiesToSet: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IBitmapProperties { + #[inline] pub unsafe fn set_properties_async(&mut self, propertiesToSet: &super::super::foundation::collections::IIterable>) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetPropertiesAsync)(self, propertiesToSet as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BitmapPropertiesView: IBitmapPropertiesView} + RT_CLASS!{class BitmapProperties: IBitmapProperties} + DEFINE_IID!(IID_IPixelDataProvider, 3716357925, 6236, 17813, 159, 185, 204, 190, 110, 193, 138, 111); + RT_INTERFACE!{interface IPixelDataProvider(IPixelDataProviderVtbl): IInspectable(IInspectableVtbl) [IID_IPixelDataProvider] { + fn DetachPixelData(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT + }} + impl IPixelDataProvider { + #[inline] pub unsafe fn detach_pixel_data(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).DetachPixelData)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + } + RT_CLASS!{class PixelDataProvider: IPixelDataProvider} + #[cfg(feature="windows.storage")] RT_CLASS!{class ImageStream: super::super::storage::streams::IRandomAccessStreamWithContentType} + #[cfg(not(feature="windows.storage"))] RT_CLASS!{class ImageStream: IInspectable} + DEFINE_IID!(IID_IBitmapFrame, 1923389980, 32897, 17293, 145, 188, 148, 236, 252, 129, 133, 198); + RT_INTERFACE!{interface IBitmapFrame(IBitmapFrameVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapFrame] { + fn GetThumbnailAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_BitmapProperties(&mut self, out: *mut *mut BitmapPropertiesView) -> HRESULT, + fn get_BitmapPixelFormat(&mut self, out: *mut BitmapPixelFormat) -> HRESULT, + fn get_BitmapAlphaMode(&mut self, out: *mut BitmapAlphaMode) -> HRESULT, + fn get_DpiX(&mut self, out: *mut f64) -> HRESULT, + fn get_DpiY(&mut self, out: *mut f64) -> HRESULT, + fn get_PixelWidth(&mut self, out: *mut u32) -> HRESULT, + fn get_PixelHeight(&mut self, out: *mut u32) -> HRESULT, + fn get_OrientedPixelWidth(&mut self, out: *mut u32) -> HRESULT, + fn get_OrientedPixelHeight(&mut self, out: *mut u32) -> HRESULT, + fn GetPixelDataAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetPixelDataTransformedAsync(&mut self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: *mut BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBitmapFrame { + #[inline] pub unsafe fn get_thumbnail_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetThumbnailAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitmap_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BitmapProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitmap_pixel_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BitmapPixelFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitmap_alpha_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BitmapAlphaMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dpi_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DpiX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dpi_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DpiY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pixel_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PixelWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pixel_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PixelHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_oriented_pixel_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OrientedPixelWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_oriented_pixel_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OrientedPixelHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pixel_data_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPixelDataAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pixel_data_transformed_async(&mut self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: &BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPixelDataTransformedAsync)(self, pixelFormat, alphaMode, transform as *const _ as *mut _, exifOrientationMode, colorManagementMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBitmapFrameWithSoftwareBitmap, 4264066202, 16908, 18787, 135, 173, 105, 20, 54, 224, 131, 131); + RT_INTERFACE!{interface IBitmapFrameWithSoftwareBitmap(IBitmapFrameWithSoftwareBitmapVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapFrameWithSoftwareBitmap] { + fn GetSoftwareBitmapAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetSoftwareBitmapConvertedAsync(&mut self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetSoftwareBitmapTransformedAsync(&mut self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: *mut BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBitmapFrameWithSoftwareBitmap { + #[inline] pub unsafe fn get_software_bitmap_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSoftwareBitmapAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_software_bitmap_converted_async(&mut self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSoftwareBitmapConvertedAsync)(self, pixelFormat, alphaMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_software_bitmap_transformed_async(&mut self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: &BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSoftwareBitmapTransformedAsync)(self, pixelFormat, alphaMode, transform as *const _ as *mut _, exifOrientationMode, colorManagementMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BitmapFrame: IBitmapFrame} + DEFINE_IID!(IID_IBitmapCodecInformation, 1074572018, 50352, 17298, 163, 176, 111, 111, 155, 169, 92, 180); + RT_INTERFACE!{interface IBitmapCodecInformation(IBitmapCodecInformationVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapCodecInformation] { + fn get_CodecId(&mut self, out: *mut Guid) -> HRESULT, + fn get_FileExtensions(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_FriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MimeTypes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IBitmapCodecInformation { + #[inline] pub unsafe fn get_codec_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CodecId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_extensions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FileExtensions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mime_types(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MimeTypes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BitmapCodecInformation: IBitmapCodecInformation} + DEFINE_IID!(IID_IBitmapDecoderStatics, 1133300518, 48367, 20117, 186, 214, 35, 168, 34, 229, 141, 1); + RT_INTERFACE!{static interface IBitmapDecoderStatics(IBitmapDecoderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapDecoderStatics] { + fn get_BmpDecoderId(&mut self, out: *mut Guid) -> HRESULT, + fn get_JpegDecoderId(&mut self, out: *mut Guid) -> HRESULT, + fn get_PngDecoderId(&mut self, out: *mut Guid) -> HRESULT, + fn get_TiffDecoderId(&mut self, out: *mut Guid) -> HRESULT, + fn get_GifDecoderId(&mut self, out: *mut Guid) -> HRESULT, + fn get_JpegXRDecoderId(&mut self, out: *mut Guid) -> HRESULT, + fn get_IcoDecoderId(&mut self, out: *mut Guid) -> HRESULT, + fn GetDecoderInformationEnumerator(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateAsync(&mut self, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateWithIdAsync(&mut self, decoderId: Guid, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBitmapDecoderStatics { + #[inline] pub unsafe fn get_bmp_decoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BmpDecoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_jpeg_decoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_JpegDecoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_png_decoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PngDecoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tiff_decoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TiffDecoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gif_decoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GifDecoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_jpeg_xrdecoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_JpegXRDecoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ico_decoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IcoDecoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_decoder_information_enumerator(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDecoderInformationEnumerator)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_async(&mut self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAsync)(self, stream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_with_id_async(&mut self, decoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithIdAsync)(self, decoderId, stream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BitmapDecoder: IBitmapDecoder} + RT_ACTIVATABLE!{IBitmapDecoderStatics [CLSID_BitmapDecoder]} + DEFINE_CLSID!(CLSID_BitmapDecoder = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,73,109,97,103,105,110,103,46,66,105,116,109,97,112,68,101,99,111,100,101,114,0]); + DEFINE_IID!(IID_IBitmapDecoder, 2901353146, 7540, 19601, 157, 252, 150, 32, 116, 82, 51, 230); + RT_INTERFACE!{interface IBitmapDecoder(IBitmapDecoderVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapDecoder] { + fn get_BitmapContainerProperties(&mut self, out: *mut *mut BitmapPropertiesView) -> HRESULT, + fn get_DecoderInformation(&mut self, out: *mut *mut BitmapCodecInformation) -> HRESULT, + fn get_FrameCount(&mut self, out: *mut u32) -> HRESULT, + fn GetPreviewAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetFrameAsync(&mut self, frameIndex: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBitmapDecoder { + #[inline] pub unsafe fn get_bitmap_container_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BitmapContainerProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_decoder_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DecoderInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FrameCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_preview_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPreviewAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_async(&mut self, frameIndex: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFrameAsync)(self, frameIndex, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBitmapEncoderStatics, 2806208167, 42212, 20153, 142, 64, 86, 77, 231, 225, 204, 178); + RT_INTERFACE!{static interface IBitmapEncoderStatics(IBitmapEncoderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapEncoderStatics] { + fn get_BmpEncoderId(&mut self, out: *mut Guid) -> HRESULT, + fn get_JpegEncoderId(&mut self, out: *mut Guid) -> HRESULT, + fn get_PngEncoderId(&mut self, out: *mut Guid) -> HRESULT, + fn get_TiffEncoderId(&mut self, out: *mut Guid) -> HRESULT, + fn get_GifEncoderId(&mut self, out: *mut Guid) -> HRESULT, + fn get_JpegXREncoderId(&mut self, out: *mut Guid) -> HRESULT, + fn GetEncoderInformationEnumerator(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateAsync(&mut self, encoderId: Guid, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateWithEncodingOptionsAsync(&mut self, encoderId: Guid, stream: *mut super::super::storage::streams::IRandomAccessStream, encodingOptions: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateForTranscodingAsync(&mut self, stream: *mut super::super::storage::streams::IRandomAccessStream, bitmapDecoder: *mut BitmapDecoder, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateForInPlacePropertyEncodingAsync(&mut self, bitmapDecoder: *mut BitmapDecoder, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBitmapEncoderStatics { + #[inline] pub unsafe fn get_bmp_encoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BmpEncoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_jpeg_encoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_JpegEncoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_png_encoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PngEncoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tiff_encoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TiffEncoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gif_encoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GifEncoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_jpeg_xrencoder_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_JpegXREncoderId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_encoder_information_enumerator(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetEncoderInformationEnumerator)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_async(&mut self, encoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAsync)(self, encoderId, stream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_with_encoding_options_async(&mut self, encoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream, encodingOptions: &super::super::foundation::collections::IIterable>) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithEncodingOptionsAsync)(self, encoderId, stream as *const _ as *mut _, encodingOptions as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_for_transcoding_async(&mut self, stream: &super::super::storage::streams::IRandomAccessStream, bitmapDecoder: &BitmapDecoder) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateForTranscodingAsync)(self, stream as *const _ as *mut _, bitmapDecoder as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_for_in_place_property_encoding_async(&mut self, bitmapDecoder: &BitmapDecoder) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateForInPlacePropertyEncodingAsync)(self, bitmapDecoder as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BitmapEncoder: IBitmapEncoder} + RT_ACTIVATABLE!{IBitmapEncoderStatics [CLSID_BitmapEncoder]} + DEFINE_CLSID!(CLSID_BitmapEncoder = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,73,109,97,103,105,110,103,46,66,105,116,109,97,112,69,110,99,111,100,101,114,0]); + DEFINE_IID!(IID_IBitmapEncoder, 734292195, 57848, 19284, 149, 232, 50, 145, 149, 81, 206, 98); + RT_INTERFACE!{interface IBitmapEncoder(IBitmapEncoderVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapEncoder] { + fn get_EncoderInformation(&mut self, out: *mut *mut BitmapCodecInformation) -> HRESULT, + fn get_BitmapProperties(&mut self, out: *mut *mut BitmapProperties) -> HRESULT, + fn get_BitmapContainerProperties(&mut self, out: *mut *mut BitmapProperties) -> HRESULT, + fn get_IsThumbnailGenerated(&mut self, out: *mut bool) -> HRESULT, + fn put_IsThumbnailGenerated(&mut self, value: bool) -> HRESULT, + fn get_GeneratedThumbnailWidth(&mut self, out: *mut u32) -> HRESULT, + fn put_GeneratedThumbnailWidth(&mut self, value: u32) -> HRESULT, + fn get_GeneratedThumbnailHeight(&mut self, out: *mut u32) -> HRESULT, + fn put_GeneratedThumbnailHeight(&mut self, value: u32) -> HRESULT, + fn get_BitmapTransform(&mut self, out: *mut *mut BitmapTransform) -> HRESULT, + fn SetPixelData(&mut self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, width: u32, height: u32, dpiX: f64, dpiY: f64, pixelsSize: u32, pixels: *mut u8) -> HRESULT, + fn GoToNextFrameAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GoToNextFrameWithEncodingOptionsAsync(&mut self, encodingOptions: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn FlushAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IBitmapEncoder { + #[inline] pub unsafe fn get_encoder_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EncoderInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitmap_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BitmapProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitmap_container_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BitmapContainerProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_thumbnail_generated(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsThumbnailGenerated)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_thumbnail_generated(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsThumbnailGenerated)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_generated_thumbnail_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GeneratedThumbnailWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_generated_thumbnail_width(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_GeneratedThumbnailWidth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_generated_thumbnail_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GeneratedThumbnailHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_generated_thumbnail_height(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_GeneratedThumbnailHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitmap_transform(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BitmapTransform)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_pixel_data(&mut self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, width: u32, height: u32, dpiX: f64, dpiY: f64, pixels: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).SetPixelData)(self, pixelFormat, alphaMode, width, height, dpiX, dpiY, pixels.len() as u32, pixels.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn go_to_next_frame_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GoToNextFrameAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn go_to_next_frame_with_encoding_options_async(&mut self, encodingOptions: &super::super::foundation::collections::IIterable>) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GoToNextFrameWithEncodingOptionsAsync)(self, encodingOptions as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn flush_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FlushAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBitmapEncoderWithSoftwareBitmap, 1751962177, 17200, 19575, 172, 228, 3, 52, 150, 139, 23, 104); + RT_INTERFACE!{interface IBitmapEncoderWithSoftwareBitmap(IBitmapEncoderWithSoftwareBitmapVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapEncoderWithSoftwareBitmap] { + fn SetSoftwareBitmap(&mut self, bitmap: *mut SoftwareBitmap) -> HRESULT + }} + impl IBitmapEncoderWithSoftwareBitmap { + #[inline] pub unsafe fn set_software_bitmap(&mut self, bitmap: &SoftwareBitmap) -> Result<()> { + let hr = ((*self.lpVtbl).SetSoftwareBitmap)(self, bitmap as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum BitmapPixelFormat: i32 { + Unknown (BitmapPixelFormat_Unknown) = 0, Rgba16 (BitmapPixelFormat_Rgba16) = 12, Rgba8 (BitmapPixelFormat_Rgba8) = 30, Gray16 (BitmapPixelFormat_Gray16) = 57, Gray8 (BitmapPixelFormat_Gray8) = 62, Bgra8 (BitmapPixelFormat_Bgra8) = 87, Nv12 (BitmapPixelFormat_Nv12) = 103, Yuy2 (BitmapPixelFormat_Yuy2) = 107, + }} + RT_ENUM! { enum BitmapAlphaMode: i32 { + Premultiplied (BitmapAlphaMode_Premultiplied) = 0, Straight (BitmapAlphaMode_Straight) = 1, Ignore (BitmapAlphaMode_Ignore) = 2, + }} + RT_ENUM! { enum BitmapBufferAccessMode: i32 { + Read (BitmapBufferAccessMode_Read) = 0, ReadWrite (BitmapBufferAccessMode_ReadWrite) = 1, Write (BitmapBufferAccessMode_Write) = 2, + }} + RT_CLASS!{class BitmapBuffer: IBitmapBuffer} + RT_CLASS!{class SoftwareBitmap: ISoftwareBitmap [ISoftwareBitmapFactory] [CLSID_SoftwareBitmap]} + RT_ACTIVATABLE!{ISoftwareBitmapStatics [CLSID_SoftwareBitmap]} + DEFINE_CLSID!(CLSID_SoftwareBitmap = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,73,109,97,103,105,110,103,46,83,111,102,116,119,97,114,101,66,105,116,109,97,112,0]); + DEFINE_IID!(IID_ISoftwareBitmapFactory, 3382700905, 11618, 19783, 166, 179, 79, 219, 106, 7, 253, 248); + RT_INTERFACE!{static interface ISoftwareBitmapFactory(ISoftwareBitmapFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISoftwareBitmapFactory] { + fn Create(&mut self, format: BitmapPixelFormat, width: i32, height: i32, out: *mut *mut SoftwareBitmap) -> HRESULT, + fn CreateWithAlpha(&mut self, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode, out: *mut *mut SoftwareBitmap) -> HRESULT + }} + impl ISoftwareBitmapFactory { + #[inline] pub unsafe fn create(&mut self, format: BitmapPixelFormat, width: i32, height: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, format, width, height, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_alpha(&mut self, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithAlpha)(self, format, width, height, alpha, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISoftwareBitmapStatics, 3741550043, 26415, 19101, 128, 110, 194, 68, 47, 52, 62, 134); + RT_INTERFACE!{static interface ISoftwareBitmapStatics(ISoftwareBitmapStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISoftwareBitmapStatics] { + fn Copy(&mut self, source: *mut SoftwareBitmap, out: *mut *mut SoftwareBitmap) -> HRESULT, + fn Convert(&mut self, source: *mut SoftwareBitmap, format: BitmapPixelFormat, out: *mut *mut SoftwareBitmap) -> HRESULT, + fn ConvertWithAlpha(&mut self, source: *mut SoftwareBitmap, format: BitmapPixelFormat, alpha: BitmapAlphaMode, out: *mut *mut SoftwareBitmap) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateCopyFromBuffer(&mut self, source: *mut super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32, out: *mut *mut SoftwareBitmap) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateCopyWithAlphaFromBuffer(&mut self, source: *mut super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode, out: *mut *mut SoftwareBitmap) -> HRESULT, + fn CreateCopyFromSurfaceAsync(&mut self, surface: *mut super::directx::direct3d11::IDirect3DSurface, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateCopyWithAlphaFromSurfaceAsync(&mut self, surface: *mut super::directx::direct3d11::IDirect3DSurface, alpha: BitmapAlphaMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISoftwareBitmapStatics { + #[inline] pub unsafe fn copy(&mut self, source: &SoftwareBitmap) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Copy)(self, source as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn convert(&mut self, source: &SoftwareBitmap, format: BitmapPixelFormat) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Convert)(self, source as *const _ as *mut _, format, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn convert_with_alpha(&mut self, source: &SoftwareBitmap, format: BitmapPixelFormat, alpha: BitmapAlphaMode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConvertWithAlpha)(self, source as *const _ as *mut _, format, alpha, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_copy_from_buffer(&mut self, source: &super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCopyFromBuffer)(self, source as *const _ as *mut _, format, width, height, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_copy_with_alpha_from_buffer(&mut self, source: &super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCopyWithAlphaFromBuffer)(self, source as *const _ as *mut _, format, width, height, alpha, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_copy_from_surface_async(&mut self, surface: &super::directx::direct3d11::IDirect3DSurface) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCopyFromSurfaceAsync)(self, surface as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_copy_with_alpha_from_surface_async(&mut self, surface: &super::directx::direct3d11::IDirect3DSurface, alpha: BitmapAlphaMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCopyWithAlphaFromSurfaceAsync)(self, surface as *const _ as *mut _, alpha, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_STRUCT! { struct BitmapPlaneDescription { + StartIndex: i32, Width: i32, Height: i32, Stride: i32, + }} + DEFINE_IID!(IID_ISoftwareBitmap, 1755186952, 32495, 18495, 150, 63, 218, 147, 136, 24, 224, 115); + RT_INTERFACE!{interface ISoftwareBitmap(ISoftwareBitmapVtbl): IInspectable(IInspectableVtbl) [IID_ISoftwareBitmap] { + fn get_BitmapPixelFormat(&mut self, out: *mut BitmapPixelFormat) -> HRESULT, + fn get_BitmapAlphaMode(&mut self, out: *mut BitmapAlphaMode) -> HRESULT, + fn get_PixelWidth(&mut self, out: *mut i32) -> HRESULT, + fn get_PixelHeight(&mut self, out: *mut i32) -> HRESULT, + fn get_IsReadOnly(&mut self, out: *mut bool) -> HRESULT, + fn put_DpiX(&mut self, value: f64) -> HRESULT, + fn get_DpiX(&mut self, out: *mut f64) -> HRESULT, + fn put_DpiY(&mut self, value: f64) -> HRESULT, + fn get_DpiY(&mut self, out: *mut f64) -> HRESULT, + fn LockBuffer(&mut self, mode: BitmapBufferAccessMode, out: *mut *mut BitmapBuffer) -> HRESULT, + fn CopyTo(&mut self, bitmap: *mut SoftwareBitmap) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy11(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CopyFromBuffer(&mut self, buffer: *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy12(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CopyToBuffer(&mut self, buffer: *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn GetReadOnlyView(&mut self, out: *mut *mut SoftwareBitmap) -> HRESULT + }} + impl ISoftwareBitmap { + #[inline] pub unsafe fn get_bitmap_pixel_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BitmapPixelFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitmap_alpha_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BitmapAlphaMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pixel_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PixelWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pixel_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PixelHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_read_only(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsReadOnly)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_dpi_x(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_DpiX)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_dpi_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DpiX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_dpi_y(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_DpiY)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_dpi_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DpiY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn lock_buffer(&mut self, mode: BitmapBufferAccessMode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LockBuffer)(self, mode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn copy_to(&mut self, bitmap: &SoftwareBitmap) -> Result<()> { + let hr = ((*self.lpVtbl).CopyTo)(self, bitmap as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn copy_from_buffer(&mut self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).CopyFromBuffer)(self, buffer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn copy_to_buffer(&mut self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).CopyToBuffer)(self, buffer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_read_only_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetReadOnlyView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBitmapBuffer, 2772305092, 14748, 17292, 178, 143, 166, 58, 107, 131, 209, 161); + RT_INTERFACE!{interface IBitmapBuffer(IBitmapBufferVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapBuffer] { + fn GetPlaneCount(&mut self, out: *mut i32) -> HRESULT, + fn GetPlaneDescription(&mut self, index: i32, out: *mut BitmapPlaneDescription) -> HRESULT + }} + impl IBitmapBuffer { + #[inline] pub unsafe fn get_plane_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetPlaneCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_plane_description(&mut self, index: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetPlaneDescription)(self, index, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Graphics.Imaging +pub mod effects { // Windows.Graphics.Effects +use ::prelude::*; + DEFINE_IID!(IID_IGraphicsEffectSource, 764386780, 17209, 20153, 146, 22, 249, 222, 183, 86, 88, 162); + RT_INTERFACE!{interface IGraphicsEffectSource(IGraphicsEffectSourceVtbl): IInspectable(IInspectableVtbl) [IID_IGraphicsEffectSource] { + + }} + DEFINE_IID!(IID_IGraphicsEffect, 3411132622, 36838, 17974, 178, 2, 134, 31, 170, 7, 216, 243); + RT_INTERFACE!{interface IGraphicsEffect(IGraphicsEffectVtbl): IInspectable(IInspectableVtbl) [IID_IGraphicsEffect] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, name: HSTRING) -> HRESULT + }} + impl IGraphicsEffect { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, name: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, name.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Graphics.Effects +pub mod printing { // Windows.Graphics.Printing +use ::prelude::*; + RT_STRUCT! { struct PrintPageDescription { + PageSize: super::super::foundation::Size, ImageableRect: super::super::foundation::Rect, DpiX: u32, DpiY: u32, + }} + RT_ENUM! { enum PrintMediaSize: i32 { + Default (PrintMediaSize_Default) = 0, NotAvailable (PrintMediaSize_NotAvailable) = 1, PrinterCustom (PrintMediaSize_PrinterCustom) = 2, BusinessCard (PrintMediaSize_BusinessCard) = 3, CreditCard (PrintMediaSize_CreditCard) = 4, IsoA0 (PrintMediaSize_IsoA0) = 5, IsoA1 (PrintMediaSize_IsoA1) = 6, IsoA10 (PrintMediaSize_IsoA10) = 7, IsoA2 (PrintMediaSize_IsoA2) = 8, IsoA3 (PrintMediaSize_IsoA3) = 9, IsoA3Extra (PrintMediaSize_IsoA3Extra) = 10, IsoA3Rotated (PrintMediaSize_IsoA3Rotated) = 11, IsoA4 (PrintMediaSize_IsoA4) = 12, IsoA4Extra (PrintMediaSize_IsoA4Extra) = 13, IsoA4Rotated (PrintMediaSize_IsoA4Rotated) = 14, IsoA5 (PrintMediaSize_IsoA5) = 15, IsoA5Extra (PrintMediaSize_IsoA5Extra) = 16, IsoA5Rotated (PrintMediaSize_IsoA5Rotated) = 17, IsoA6 (PrintMediaSize_IsoA6) = 18, IsoA6Rotated (PrintMediaSize_IsoA6Rotated) = 19, IsoA7 (PrintMediaSize_IsoA7) = 20, IsoA8 (PrintMediaSize_IsoA8) = 21, IsoA9 (PrintMediaSize_IsoA9) = 22, IsoB0 (PrintMediaSize_IsoB0) = 23, IsoB1 (PrintMediaSize_IsoB1) = 24, IsoB10 (PrintMediaSize_IsoB10) = 25, IsoB2 (PrintMediaSize_IsoB2) = 26, IsoB3 (PrintMediaSize_IsoB3) = 27, IsoB4 (PrintMediaSize_IsoB4) = 28, IsoB4Envelope (PrintMediaSize_IsoB4Envelope) = 29, IsoB5Envelope (PrintMediaSize_IsoB5Envelope) = 30, IsoB5Extra (PrintMediaSize_IsoB5Extra) = 31, IsoB7 (PrintMediaSize_IsoB7) = 32, IsoB8 (PrintMediaSize_IsoB8) = 33, IsoB9 (PrintMediaSize_IsoB9) = 34, IsoC0 (PrintMediaSize_IsoC0) = 35, IsoC1 (PrintMediaSize_IsoC1) = 36, IsoC10 (PrintMediaSize_IsoC10) = 37, IsoC2 (PrintMediaSize_IsoC2) = 38, IsoC3 (PrintMediaSize_IsoC3) = 39, IsoC3Envelope (PrintMediaSize_IsoC3Envelope) = 40, IsoC4 (PrintMediaSize_IsoC4) = 41, IsoC4Envelope (PrintMediaSize_IsoC4Envelope) = 42, IsoC5 (PrintMediaSize_IsoC5) = 43, IsoC5Envelope (PrintMediaSize_IsoC5Envelope) = 44, IsoC6 (PrintMediaSize_IsoC6) = 45, IsoC6C5Envelope (PrintMediaSize_IsoC6C5Envelope) = 46, IsoC6Envelope (PrintMediaSize_IsoC6Envelope) = 47, IsoC7 (PrintMediaSize_IsoC7) = 48, IsoC8 (PrintMediaSize_IsoC8) = 49, IsoC9 (PrintMediaSize_IsoC9) = 50, IsoDLEnvelope (PrintMediaSize_IsoDLEnvelope) = 51, IsoDLEnvelopeRotated (PrintMediaSize_IsoDLEnvelopeRotated) = 52, IsoSRA3 (PrintMediaSize_IsoSRA3) = 53, Japan2LPhoto (PrintMediaSize_Japan2LPhoto) = 54, JapanChou3Envelope (PrintMediaSize_JapanChou3Envelope) = 55, JapanChou3EnvelopeRotated (PrintMediaSize_JapanChou3EnvelopeRotated) = 56, JapanChou4Envelope (PrintMediaSize_JapanChou4Envelope) = 57, JapanChou4EnvelopeRotated (PrintMediaSize_JapanChou4EnvelopeRotated) = 58, JapanDoubleHagakiPostcard (PrintMediaSize_JapanDoubleHagakiPostcard) = 59, JapanDoubleHagakiPostcardRotated (PrintMediaSize_JapanDoubleHagakiPostcardRotated) = 60, JapanHagakiPostcard (PrintMediaSize_JapanHagakiPostcard) = 61, JapanHagakiPostcardRotated (PrintMediaSize_JapanHagakiPostcardRotated) = 62, JapanKaku2Envelope (PrintMediaSize_JapanKaku2Envelope) = 63, JapanKaku2EnvelopeRotated (PrintMediaSize_JapanKaku2EnvelopeRotated) = 64, JapanKaku3Envelope (PrintMediaSize_JapanKaku3Envelope) = 65, JapanKaku3EnvelopeRotated (PrintMediaSize_JapanKaku3EnvelopeRotated) = 66, JapanLPhoto (PrintMediaSize_JapanLPhoto) = 67, JapanQuadrupleHagakiPostcard (PrintMediaSize_JapanQuadrupleHagakiPostcard) = 68, JapanYou1Envelope (PrintMediaSize_JapanYou1Envelope) = 69, JapanYou2Envelope (PrintMediaSize_JapanYou2Envelope) = 70, JapanYou3Envelope (PrintMediaSize_JapanYou3Envelope) = 71, JapanYou4Envelope (PrintMediaSize_JapanYou4Envelope) = 72, JapanYou4EnvelopeRotated (PrintMediaSize_JapanYou4EnvelopeRotated) = 73, JapanYou6Envelope (PrintMediaSize_JapanYou6Envelope) = 74, JapanYou6EnvelopeRotated (PrintMediaSize_JapanYou6EnvelopeRotated) = 75, JisB0 (PrintMediaSize_JisB0) = 76, JisB1 (PrintMediaSize_JisB1) = 77, JisB10 (PrintMediaSize_JisB10) = 78, JisB2 (PrintMediaSize_JisB2) = 79, JisB3 (PrintMediaSize_JisB3) = 80, JisB4 (PrintMediaSize_JisB4) = 81, JisB4Rotated (PrintMediaSize_JisB4Rotated) = 82, JisB5 (PrintMediaSize_JisB5) = 83, JisB5Rotated (PrintMediaSize_JisB5Rotated) = 84, JisB6 (PrintMediaSize_JisB6) = 85, JisB6Rotated (PrintMediaSize_JisB6Rotated) = 86, JisB7 (PrintMediaSize_JisB7) = 87, JisB8 (PrintMediaSize_JisB8) = 88, JisB9 (PrintMediaSize_JisB9) = 89, NorthAmerica10x11 (PrintMediaSize_NorthAmerica10x11) = 90, NorthAmerica10x12 (PrintMediaSize_NorthAmerica10x12) = 91, NorthAmerica10x14 (PrintMediaSize_NorthAmerica10x14) = 92, NorthAmerica11x17 (PrintMediaSize_NorthAmerica11x17) = 93, NorthAmerica14x17 (PrintMediaSize_NorthAmerica14x17) = 94, NorthAmerica4x6 (PrintMediaSize_NorthAmerica4x6) = 95, NorthAmerica4x8 (PrintMediaSize_NorthAmerica4x8) = 96, NorthAmerica5x7 (PrintMediaSize_NorthAmerica5x7) = 97, NorthAmerica8x10 (PrintMediaSize_NorthAmerica8x10) = 98, NorthAmerica9x11 (PrintMediaSize_NorthAmerica9x11) = 99, NorthAmericaArchitectureASheet (PrintMediaSize_NorthAmericaArchitectureASheet) = 100, NorthAmericaArchitectureBSheet (PrintMediaSize_NorthAmericaArchitectureBSheet) = 101, NorthAmericaArchitectureCSheet (PrintMediaSize_NorthAmericaArchitectureCSheet) = 102, NorthAmericaArchitectureDSheet (PrintMediaSize_NorthAmericaArchitectureDSheet) = 103, NorthAmericaArchitectureESheet (PrintMediaSize_NorthAmericaArchitectureESheet) = 104, NorthAmericaCSheet (PrintMediaSize_NorthAmericaCSheet) = 105, NorthAmericaDSheet (PrintMediaSize_NorthAmericaDSheet) = 106, NorthAmericaESheet (PrintMediaSize_NorthAmericaESheet) = 107, NorthAmericaExecutive (PrintMediaSize_NorthAmericaExecutive) = 108, NorthAmericaGermanLegalFanfold (PrintMediaSize_NorthAmericaGermanLegalFanfold) = 109, NorthAmericaGermanStandardFanfold (PrintMediaSize_NorthAmericaGermanStandardFanfold) = 110, NorthAmericaLegal (PrintMediaSize_NorthAmericaLegal) = 111, NorthAmericaLegalExtra (PrintMediaSize_NorthAmericaLegalExtra) = 112, NorthAmericaLetter (PrintMediaSize_NorthAmericaLetter) = 113, NorthAmericaLetterExtra (PrintMediaSize_NorthAmericaLetterExtra) = 114, NorthAmericaLetterPlus (PrintMediaSize_NorthAmericaLetterPlus) = 115, NorthAmericaLetterRotated (PrintMediaSize_NorthAmericaLetterRotated) = 116, NorthAmericaMonarchEnvelope (PrintMediaSize_NorthAmericaMonarchEnvelope) = 117, NorthAmericaNote (PrintMediaSize_NorthAmericaNote) = 118, NorthAmericaNumber10Envelope (PrintMediaSize_NorthAmericaNumber10Envelope) = 119, NorthAmericaNumber10EnvelopeRotated (PrintMediaSize_NorthAmericaNumber10EnvelopeRotated) = 120, NorthAmericaNumber11Envelope (PrintMediaSize_NorthAmericaNumber11Envelope) = 121, NorthAmericaNumber12Envelope (PrintMediaSize_NorthAmericaNumber12Envelope) = 122, NorthAmericaNumber14Envelope (PrintMediaSize_NorthAmericaNumber14Envelope) = 123, NorthAmericaNumber9Envelope (PrintMediaSize_NorthAmericaNumber9Envelope) = 124, NorthAmericaPersonalEnvelope (PrintMediaSize_NorthAmericaPersonalEnvelope) = 125, NorthAmericaQuarto (PrintMediaSize_NorthAmericaQuarto) = 126, NorthAmericaStatement (PrintMediaSize_NorthAmericaStatement) = 127, NorthAmericaSuperA (PrintMediaSize_NorthAmericaSuperA) = 128, NorthAmericaSuperB (PrintMediaSize_NorthAmericaSuperB) = 129, NorthAmericaTabloid (PrintMediaSize_NorthAmericaTabloid) = 130, NorthAmericaTabloidExtra (PrintMediaSize_NorthAmericaTabloidExtra) = 131, OtherMetricA3Plus (PrintMediaSize_OtherMetricA3Plus) = 132, OtherMetricA4Plus (PrintMediaSize_OtherMetricA4Plus) = 133, OtherMetricFolio (PrintMediaSize_OtherMetricFolio) = 134, OtherMetricInviteEnvelope (PrintMediaSize_OtherMetricInviteEnvelope) = 135, OtherMetricItalianEnvelope (PrintMediaSize_OtherMetricItalianEnvelope) = 136, Prc10Envelope (PrintMediaSize_Prc10Envelope) = 137, Prc10EnvelopeRotated (PrintMediaSize_Prc10EnvelopeRotated) = 138, Prc16K (PrintMediaSize_Prc16K) = 139, Prc16KRotated (PrintMediaSize_Prc16KRotated) = 140, Prc1Envelope (PrintMediaSize_Prc1Envelope) = 141, Prc1EnvelopeRotated (PrintMediaSize_Prc1EnvelopeRotated) = 142, Prc2Envelope (PrintMediaSize_Prc2Envelope) = 143, Prc2EnvelopeRotated (PrintMediaSize_Prc2EnvelopeRotated) = 144, Prc32K (PrintMediaSize_Prc32K) = 145, Prc32KBig (PrintMediaSize_Prc32KBig) = 146, Prc32KRotated (PrintMediaSize_Prc32KRotated) = 147, Prc3Envelope (PrintMediaSize_Prc3Envelope) = 148, Prc3EnvelopeRotated (PrintMediaSize_Prc3EnvelopeRotated) = 149, Prc4Envelope (PrintMediaSize_Prc4Envelope) = 150, Prc4EnvelopeRotated (PrintMediaSize_Prc4EnvelopeRotated) = 151, Prc5Envelope (PrintMediaSize_Prc5Envelope) = 152, Prc5EnvelopeRotated (PrintMediaSize_Prc5EnvelopeRotated) = 153, Prc6Envelope (PrintMediaSize_Prc6Envelope) = 154, Prc6EnvelopeRotated (PrintMediaSize_Prc6EnvelopeRotated) = 155, Prc7Envelope (PrintMediaSize_Prc7Envelope) = 156, Prc7EnvelopeRotated (PrintMediaSize_Prc7EnvelopeRotated) = 157, Prc8Envelope (PrintMediaSize_Prc8Envelope) = 158, Prc8EnvelopeRotated (PrintMediaSize_Prc8EnvelopeRotated) = 159, Prc9Envelope (PrintMediaSize_Prc9Envelope) = 160, Prc9EnvelopeRotated (PrintMediaSize_Prc9EnvelopeRotated) = 161, Roll04Inch (PrintMediaSize_Roll04Inch) = 162, Roll06Inch (PrintMediaSize_Roll06Inch) = 163, Roll08Inch (PrintMediaSize_Roll08Inch) = 164, Roll12Inch (PrintMediaSize_Roll12Inch) = 165, Roll15Inch (PrintMediaSize_Roll15Inch) = 166, Roll18Inch (PrintMediaSize_Roll18Inch) = 167, Roll22Inch (PrintMediaSize_Roll22Inch) = 168, Roll24Inch (PrintMediaSize_Roll24Inch) = 169, Roll30Inch (PrintMediaSize_Roll30Inch) = 170, Roll36Inch (PrintMediaSize_Roll36Inch) = 171, Roll54Inch (PrintMediaSize_Roll54Inch) = 172, + }} + RT_ENUM! { enum PrintMediaType: i32 { + Default (PrintMediaType_Default) = 0, NotAvailable (PrintMediaType_NotAvailable) = 1, PrinterCustom (PrintMediaType_PrinterCustom) = 2, AutoSelect (PrintMediaType_AutoSelect) = 3, Archival (PrintMediaType_Archival) = 4, BackPrintFilm (PrintMediaType_BackPrintFilm) = 5, Bond (PrintMediaType_Bond) = 6, CardStock (PrintMediaType_CardStock) = 7, Continuous (PrintMediaType_Continuous) = 8, EnvelopePlain (PrintMediaType_EnvelopePlain) = 9, EnvelopeWindow (PrintMediaType_EnvelopeWindow) = 10, Fabric (PrintMediaType_Fabric) = 11, HighResolution (PrintMediaType_HighResolution) = 12, Label (PrintMediaType_Label) = 13, MultiLayerForm (PrintMediaType_MultiLayerForm) = 14, MultiPartForm (PrintMediaType_MultiPartForm) = 15, Photographic (PrintMediaType_Photographic) = 16, PhotographicFilm (PrintMediaType_PhotographicFilm) = 17, PhotographicGlossy (PrintMediaType_PhotographicGlossy) = 18, PhotographicHighGloss (PrintMediaType_PhotographicHighGloss) = 19, PhotographicMatte (PrintMediaType_PhotographicMatte) = 20, PhotographicSatin (PrintMediaType_PhotographicSatin) = 21, PhotographicSemiGloss (PrintMediaType_PhotographicSemiGloss) = 22, Plain (PrintMediaType_Plain) = 23, Screen (PrintMediaType_Screen) = 24, ScreenPaged (PrintMediaType_ScreenPaged) = 25, Stationery (PrintMediaType_Stationery) = 26, TabStockFull (PrintMediaType_TabStockFull) = 27, TabStockPreCut (PrintMediaType_TabStockPreCut) = 28, Transparency (PrintMediaType_Transparency) = 29, TShirtTransfer (PrintMediaType_TShirtTransfer) = 30, None (PrintMediaType_None) = 31, + }} + RT_ENUM! { enum PrintOrientation: i32 { + Default (PrintOrientation_Default) = 0, NotAvailable (PrintOrientation_NotAvailable) = 1, PrinterCustom (PrintOrientation_PrinterCustom) = 2, Portrait (PrintOrientation_Portrait) = 3, PortraitFlipped (PrintOrientation_PortraitFlipped) = 4, Landscape (PrintOrientation_Landscape) = 5, LandscapeFlipped (PrintOrientation_LandscapeFlipped) = 6, + }} + RT_ENUM! { enum PrintQuality: i32 { + Default (PrintQuality_Default) = 0, NotAvailable (PrintQuality_NotAvailable) = 1, PrinterCustom (PrintQuality_PrinterCustom) = 2, Automatic (PrintQuality_Automatic) = 3, Draft (PrintQuality_Draft) = 4, Fax (PrintQuality_Fax) = 5, High (PrintQuality_High) = 6, Normal (PrintQuality_Normal) = 7, Photographic (PrintQuality_Photographic) = 8, Text (PrintQuality_Text) = 9, + }} + RT_ENUM! { enum PrintColorMode: i32 { + Default (PrintColorMode_Default) = 0, NotAvailable (PrintColorMode_NotAvailable) = 1, PrinterCustom (PrintColorMode_PrinterCustom) = 2, Color (PrintColorMode_Color) = 3, Grayscale (PrintColorMode_Grayscale) = 4, Monochrome (PrintColorMode_Monochrome) = 5, + }} + RT_ENUM! { enum PrintDuplex: i32 { + Default (PrintDuplex_Default) = 0, NotAvailable (PrintDuplex_NotAvailable) = 1, PrinterCustom (PrintDuplex_PrinterCustom) = 2, OneSided (PrintDuplex_OneSided) = 3, TwoSidedShortEdge (PrintDuplex_TwoSidedShortEdge) = 4, TwoSidedLongEdge (PrintDuplex_TwoSidedLongEdge) = 5, + }} + RT_ENUM! { enum PrintCollation: i32 { + Default (PrintCollation_Default) = 0, NotAvailable (PrintCollation_NotAvailable) = 1, PrinterCustom (PrintCollation_PrinterCustom) = 2, Collated (PrintCollation_Collated) = 3, Uncollated (PrintCollation_Uncollated) = 4, + }} + RT_ENUM! { enum PrintStaple: i32 { + Default (PrintStaple_Default) = 0, NotAvailable (PrintStaple_NotAvailable) = 1, PrinterCustom (PrintStaple_PrinterCustom) = 2, None (PrintStaple_None) = 3, StapleTopLeft (PrintStaple_StapleTopLeft) = 4, StapleTopRight (PrintStaple_StapleTopRight) = 5, StapleBottomLeft (PrintStaple_StapleBottomLeft) = 6, StapleBottomRight (PrintStaple_StapleBottomRight) = 7, StapleDualLeft (PrintStaple_StapleDualLeft) = 8, StapleDualRight (PrintStaple_StapleDualRight) = 9, StapleDualTop (PrintStaple_StapleDualTop) = 10, StapleDualBottom (PrintStaple_StapleDualBottom) = 11, SaddleStitch (PrintStaple_SaddleStitch) = 12, + }} + RT_ENUM! { enum PrintHolePunch: i32 { + Default (PrintHolePunch_Default) = 0, NotAvailable (PrintHolePunch_NotAvailable) = 1, PrinterCustom (PrintHolePunch_PrinterCustom) = 2, None (PrintHolePunch_None) = 3, LeftEdge (PrintHolePunch_LeftEdge) = 4, RightEdge (PrintHolePunch_RightEdge) = 5, TopEdge (PrintHolePunch_TopEdge) = 6, BottomEdge (PrintHolePunch_BottomEdge) = 7, + }} + RT_ENUM! { enum PrintBinding: i32 { + Default (PrintBinding_Default) = 0, NotAvailable (PrintBinding_NotAvailable) = 1, PrinterCustom (PrintBinding_PrinterCustom) = 2, None (PrintBinding_None) = 3, Bale (PrintBinding_Bale) = 4, BindBottom (PrintBinding_BindBottom) = 5, BindLeft (PrintBinding_BindLeft) = 6, BindRight (PrintBinding_BindRight) = 7, BindTop (PrintBinding_BindTop) = 8, Booklet (PrintBinding_Booklet) = 9, EdgeStitchBottom (PrintBinding_EdgeStitchBottom) = 10, EdgeStitchLeft (PrintBinding_EdgeStitchLeft) = 11, EdgeStitchRight (PrintBinding_EdgeStitchRight) = 12, EdgeStitchTop (PrintBinding_EdgeStitchTop) = 13, Fold (PrintBinding_Fold) = 14, JogOffset (PrintBinding_JogOffset) = 15, Trim (PrintBinding_Trim) = 16, + }} + RT_ENUM! { enum PrintBordering: i32 { + Default (PrintBordering_Default) = 0, NotAvailable (PrintBordering_NotAvailable) = 1, PrinterCustom (PrintBordering_PrinterCustom) = 2, Bordered (PrintBordering_Bordered) = 3, Borderless (PrintBordering_Borderless) = 4, + }} + DEFINE_IID!(IID_IPrintTaskOptionsCoreProperties, 3250001970, 40595, 20053, 129, 75, 51, 38, 165, 158, 252, 225); + RT_INTERFACE!{interface IPrintTaskOptionsCoreProperties(IPrintTaskOptionsCorePropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskOptionsCoreProperties] { + fn put_MediaSize(&mut self, value: PrintMediaSize) -> HRESULT, + fn get_MediaSize(&mut self, out: *mut PrintMediaSize) -> HRESULT, + fn put_MediaType(&mut self, value: PrintMediaType) -> HRESULT, + fn get_MediaType(&mut self, out: *mut PrintMediaType) -> HRESULT, + fn put_Orientation(&mut self, value: PrintOrientation) -> HRESULT, + fn get_Orientation(&mut self, out: *mut PrintOrientation) -> HRESULT, + fn put_PrintQuality(&mut self, value: PrintQuality) -> HRESULT, + fn get_PrintQuality(&mut self, out: *mut PrintQuality) -> HRESULT, + fn put_ColorMode(&mut self, value: PrintColorMode) -> HRESULT, + fn get_ColorMode(&mut self, out: *mut PrintColorMode) -> HRESULT, + fn put_Duplex(&mut self, value: PrintDuplex) -> HRESULT, + fn get_Duplex(&mut self, out: *mut PrintDuplex) -> HRESULT, + fn put_Collation(&mut self, value: PrintCollation) -> HRESULT, + fn get_Collation(&mut self, out: *mut PrintCollation) -> HRESULT, + fn put_Staple(&mut self, value: PrintStaple) -> HRESULT, + fn get_Staple(&mut self, out: *mut PrintStaple) -> HRESULT, + fn put_HolePunch(&mut self, value: PrintHolePunch) -> HRESULT, + fn get_HolePunch(&mut self, out: *mut PrintHolePunch) -> HRESULT, + fn put_Binding(&mut self, value: PrintBinding) -> HRESULT, + fn get_Binding(&mut self, out: *mut PrintBinding) -> HRESULT, + fn get_MinCopies(&mut self, out: *mut u32) -> HRESULT, + fn get_MaxCopies(&mut self, out: *mut u32) -> HRESULT, + fn put_NumberOfCopies(&mut self, value: u32) -> HRESULT, + fn get_NumberOfCopies(&mut self, out: *mut u32) -> HRESULT + }} + impl IPrintTaskOptionsCoreProperties { + #[inline] pub unsafe fn set_media_size(&mut self, value: PrintMediaSize) -> Result<()> { + let hr = ((*self.lpVtbl).put_MediaSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediaSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_media_type(&mut self, value: PrintMediaType) -> Result<()> { + let hr = ((*self.lpVtbl).put_MediaType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediaType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_orientation(&mut self, value: PrintOrientation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Orientation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_print_quality(&mut self, value: PrintQuality) -> Result<()> { + let hr = ((*self.lpVtbl).put_PrintQuality)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_print_quality(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrintQuality)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_color_mode(&mut self, value: PrintColorMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ColorMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_color_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ColorMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_duplex(&mut self, value: PrintDuplex) -> Result<()> { + let hr = ((*self.lpVtbl).put_Duplex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_duplex(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duplex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_collation(&mut self, value: PrintCollation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Collation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_collation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Collation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_staple(&mut self, value: PrintStaple) -> Result<()> { + let hr = ((*self.lpVtbl).put_Staple)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_staple(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Staple)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_hole_punch(&mut self, value: PrintHolePunch) -> Result<()> { + let hr = ((*self.lpVtbl).put_HolePunch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hole_punch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HolePunch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_binding(&mut self, value: PrintBinding) -> Result<()> { + let hr = ((*self.lpVtbl).put_Binding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_binding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Binding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_copies(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinCopies)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_copies(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxCopies)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_number_of_copies(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_NumberOfCopies)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_copies(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfCopies)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrintPageInfo, 3712739785, 42657, 19162, 147, 14, 218, 135, 42, 79, 35, 211); + RT_INTERFACE!{interface IPrintPageInfo(IPrintPageInfoVtbl): IInspectable(IInspectableVtbl) [IID_IPrintPageInfo] { + fn put_MediaSize(&mut self, value: PrintMediaSize) -> HRESULT, + fn get_MediaSize(&mut self, out: *mut PrintMediaSize) -> HRESULT, + fn put_PageSize(&mut self, value: super::super::foundation::Size) -> HRESULT, + fn get_PageSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn put_DpiX(&mut self, value: u32) -> HRESULT, + fn get_DpiX(&mut self, out: *mut u32) -> HRESULT, + fn put_DpiY(&mut self, value: u32) -> HRESULT, + fn get_DpiY(&mut self, out: *mut u32) -> HRESULT, + fn put_Orientation(&mut self, value: PrintOrientation) -> HRESULT, + fn get_Orientation(&mut self, out: *mut PrintOrientation) -> HRESULT + }} + impl IPrintPageInfo { + #[inline] pub unsafe fn set_media_size(&mut self, value: PrintMediaSize) -> Result<()> { + let hr = ((*self.lpVtbl).put_MediaSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediaSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_page_size(&mut self, value: super::super::foundation::Size) -> Result<()> { + let hr = ((*self.lpVtbl).put_PageSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_page_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PageSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_dpi_x(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DpiX)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_dpi_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DpiX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_dpi_y(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DpiY)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_dpi_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DpiY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_orientation(&mut self, value: PrintOrientation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Orientation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PrintPageInfo: IPrintPageInfo} + DEFINE_IID!(IID_IPrintTaskOptions, 1510631099, 53897, 16827, 150, 221, 87, 226, 131, 56, 174, 63); + RT_INTERFACE!{interface IPrintTaskOptions(IPrintTaskOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskOptions] { + fn put_Bordering(&mut self, value: PrintBordering) -> HRESULT, + fn get_Bordering(&mut self, out: *mut PrintBordering) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetPagePrintTicket(&mut self, printPageInfo: *mut PrintPageInfo, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT + }} + impl IPrintTaskOptions { + #[inline] pub unsafe fn set_bordering(&mut self, value: PrintBordering) -> Result<()> { + let hr = ((*self.lpVtbl).put_Bordering)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bordering(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bordering)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_page_print_ticket(&mut self, printPageInfo: &PrintPageInfo) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPagePrintTicket)(self, printPageInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrintTaskOptionsCoreUIConfiguration, 1659280931, 39454, 17206, 183, 79, 60, 199, 244, 207, 247, 9); + RT_INTERFACE!{interface IPrintTaskOptionsCoreUIConfiguration(IPrintTaskOptionsCoreUIConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskOptionsCoreUIConfiguration] { + fn get_DisplayedOptions(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IPrintTaskOptionsCoreUIConfiguration { + #[inline] pub unsafe fn get_displayed_options(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayedOptions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrintTaskOptionsCore, 467383412, 20177, 16875, 190, 60, 114, 209, 142, 214, 115, 55); + RT_INTERFACE!{interface IPrintTaskOptionsCore(IPrintTaskOptionsCoreVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskOptionsCore] { + fn GetPageDescription(&mut self, jobPageNumber: u32, out: *mut PrintPageDescription) -> HRESULT + }} + impl IPrintTaskOptionsCore { + #[inline] pub unsafe fn get_page_description(&mut self, jobPageNumber: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetPageDescription)(self, jobPageNumber, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PrintTaskOptions: IPrintTaskOptionsCore} + DEFINE_IID!(IID_IStandardPrintTaskOptionsStatic, 3024633126, 3536, 19668, 186, 255, 147, 15, 199, 214, 165, 116); + RT_INTERFACE!{static interface IStandardPrintTaskOptionsStatic(IStandardPrintTaskOptionsStaticVtbl): IInspectable(IInspectableVtbl) [IID_IStandardPrintTaskOptionsStatic] { + fn get_MediaSize(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MediaType(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Orientation(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PrintQuality(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ColorMode(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Duplex(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Collation(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Staple(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HolePunch(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Binding(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Copies(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NUp(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_InputBin(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStandardPrintTaskOptionsStatic { + #[inline] pub unsafe fn get_media_size(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaSize)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_print_quality(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrintQuality)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_color_mode(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ColorMode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_duplex(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Duplex)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_collation(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Collation)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_staple(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Staple)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hole_punch(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HolePunch)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_binding(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Binding)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_copies(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Copies)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nup(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NUp)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_bin(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputBin)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStandardPrintTaskOptionsStatic2, 1004768244, 31300, 17001, 154, 82, 129, 38, 30, 40, 158, 233); + RT_INTERFACE!{static interface IStandardPrintTaskOptionsStatic2(IStandardPrintTaskOptionsStatic2Vtbl): IInspectable(IInspectableVtbl) [IID_IStandardPrintTaskOptionsStatic2] { + fn get_Bordering(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStandardPrintTaskOptionsStatic2 { + #[inline] pub unsafe fn get_bordering(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Bordering)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IStandardPrintTaskOptionsStatic2 [CLSID_StandardPrintTaskOptions]} + RT_ACTIVATABLE!{IStandardPrintTaskOptionsStatic [CLSID_StandardPrintTaskOptions]} + DEFINE_CLSID!(CLSID_StandardPrintTaskOptions = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,80,114,105,110,116,105,110,103,46,83,116,97,110,100,97,114,100,80,114,105,110,116,84,97,115,107,79,112,116,105,111,110,115,0]); + DEFINE_IID!(IID_IPrintDocumentSource, 3738962992, 61931, 18399, 170, 230, 237, 84, 39, 81, 31, 1); + RT_INTERFACE!{interface IPrintDocumentSource(IPrintDocumentSourceVtbl): IInspectable(IInspectableVtbl) [IID_IPrintDocumentSource] { + + }} + DEFINE_IID!(IID_IPrintTaskProgressingEventArgs, 2165101515, 46096, 17026, 160, 115, 90, 195, 120, 35, 65, 116); + RT_INTERFACE!{interface IPrintTaskProgressingEventArgs(IPrintTaskProgressingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskProgressingEventArgs] { + fn get_DocumentPageCount(&mut self, out: *mut u32) -> HRESULT + }} + impl IPrintTaskProgressingEventArgs { + #[inline] pub unsafe fn get_document_page_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DocumentPageCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PrintTaskProgressingEventArgs: IPrintTaskProgressingEventArgs} + RT_ENUM! { enum PrintTaskCompletion: i32 { + Abandoned (PrintTaskCompletion_Abandoned) = 0, Canceled (PrintTaskCompletion_Canceled) = 1, Failed (PrintTaskCompletion_Failed) = 2, Submitted (PrintTaskCompletion_Submitted) = 3, + }} + DEFINE_IID!(IID_IPrintTaskCompletedEventArgs, 1540175023, 9449, 19472, 141, 7, 20, 195, 70, 186, 63, 206); + RT_INTERFACE!{interface IPrintTaskCompletedEventArgs(IPrintTaskCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskCompletedEventArgs] { + fn get_Completion(&mut self, out: *mut PrintTaskCompletion) -> HRESULT + }} + impl IPrintTaskCompletedEventArgs { + #[inline] pub unsafe fn get_completion(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Completion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PrintTaskCompletedEventArgs: IPrintTaskCompletedEventArgs} + DEFINE_IID!(IID_IPrintTask, 1641546311, 27894, 20397, 132, 226, 165, 232, 46, 45, 76, 235); + RT_INTERFACE!{interface IPrintTask(IPrintTaskVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTask] { + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_Properties(&mut self, out: *mut *mut super::super::applicationmodel::datatransfer::DataPackagePropertySet) -> HRESULT, + fn get_Source(&mut self, out: *mut *mut IPrintDocumentSource) -> HRESULT, + fn get_Options(&mut self, out: *mut *mut PrintTaskOptions) -> HRESULT, + fn add_Previewing(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Previewing(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Submitting(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Submitting(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Progressing(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Progressing(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Completed(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPrintTask { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_options(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Options)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_previewing(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Previewing)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_previewing(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Previewing)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_submitting(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Submitting)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_submitting(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Submitting)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_progressing(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Progressing)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_progressing(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Progressing)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_completed(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Completed)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_completed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Completed)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PrintTask: IPrintTask} + DEFINE_IID!(IID_IPrintTaskTargetDeviceSupport, 693989568, 49867, 19325, 176, 234, 147, 9, 80, 145, 162, 32); + RT_INTERFACE!{interface IPrintTaskTargetDeviceSupport(IPrintTaskTargetDeviceSupportVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskTargetDeviceSupport] { + fn put_IsPrinterTargetEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsPrinterTargetEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_Is3DManufacturingTargetEnabled(&mut self, value: bool) -> HRESULT, + fn get_Is3DManufacturingTargetEnabled(&mut self, out: *mut bool) -> HRESULT + }} + impl IPrintTaskTargetDeviceSupport { + #[inline] pub unsafe fn set_is_printer_target_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPrinterTargetEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_printer_target_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPrinterTargetEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is3_dmanufacturing_target_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Is3DManufacturingTargetEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is3_dmanufacturing_target_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Is3DManufacturingTargetEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrintTask2, 908281975, 15955, 19869, 143, 94, 49, 106, 200, 222, 218, 225); + RT_INTERFACE!{interface IPrintTask2(IPrintTask2Vtbl): IInspectable(IInspectableVtbl) [IID_IPrintTask2] { + fn put_IsPreviewEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsPreviewEnabled(&mut self, out: *mut bool) -> HRESULT + }} + impl IPrintTask2 { + #[inline] pub unsafe fn set_is_preview_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPreviewEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_preview_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPreviewEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrintTaskSourceRequestedDeferral, 1242915025, 27026, 19869, 133, 85, 76, 164, 86, 63, 177, 102); + RT_INTERFACE!{interface IPrintTaskSourceRequestedDeferral(IPrintTaskSourceRequestedDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskSourceRequestedDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IPrintTaskSourceRequestedDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PrintTaskSourceRequestedDeferral: IPrintTaskSourceRequestedDeferral} + DEFINE_IID!(IID_IPrintTaskSourceRequestedArgs, 4193281982, 62550, 16880, 156, 152, 92, 231, 62, 133, 20, 16); + RT_INTERFACE!{interface IPrintTaskSourceRequestedArgs(IPrintTaskSourceRequestedArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskSourceRequestedArgs] { + fn get_Deadline(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn SetSource(&mut self, source: *mut IPrintDocumentSource) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut PrintTaskSourceRequestedDeferral) -> HRESULT + }} + impl IPrintTaskSourceRequestedArgs { + #[inline] pub unsafe fn get_deadline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_source(&mut self, source: &IPrintDocumentSource) -> Result<()> { + let hr = ((*self.lpVtbl).SetSource)(self, source as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PrintTaskSourceRequestedArgs: IPrintTaskSourceRequestedArgs} + DEFINE_IID!(IID_PrintTaskSourceRequestedHandler, 1813028776, 23734, 19258, 134, 99, 243, 156, 176, 45, 201, 180); + RT_DELEGATE!{delegate PrintTaskSourceRequestedHandler(PrintTaskSourceRequestedHandlerVtbl, PrintTaskSourceRequestedHandlerImpl) [IID_PrintTaskSourceRequestedHandler] { + fn Invoke(&mut self, args: *mut PrintTaskSourceRequestedArgs) -> HRESULT + }} + impl PrintTaskSourceRequestedHandler { + #[inline] pub unsafe fn invoke(&mut self, args: &PrintTaskSourceRequestedArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrintTaskRequestedDeferral, 3488592880, 52798, 17095, 148, 150, 100, 128, 12, 98, 44, 68); + RT_INTERFACE!{interface IPrintTaskRequestedDeferral(IPrintTaskRequestedDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskRequestedDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IPrintTaskRequestedDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PrintTaskRequestedDeferral: IPrintTaskRequestedDeferral} + DEFINE_IID!(IID_IPrintTaskRequest, 1878400558, 10018, 16960, 166, 124, 243, 100, 132, 154, 23, 243); + RT_INTERFACE!{interface IPrintTaskRequest(IPrintTaskRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskRequest] { + fn get_Deadline(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn CreatePrintTask(&mut self, title: HSTRING, handler: *mut PrintTaskSourceRequestedHandler, out: *mut *mut PrintTask) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut PrintTaskRequestedDeferral) -> HRESULT + }} + impl IPrintTaskRequest { + #[inline] pub unsafe fn get_deadline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn create_print_task(&mut self, title: &HStringArg, handler: &PrintTaskSourceRequestedHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePrintTask)(self, title.get(), handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PrintTaskRequest: IPrintTaskRequest} + DEFINE_IID!(IID_IPrintTaskRequestedEventArgs, 3501193508, 41755, 17740, 167, 182, 93, 12, 197, 34, 252, 22); + RT_INTERFACE!{interface IPrintTaskRequestedEventArgs(IPrintTaskRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut PrintTaskRequest) -> HRESULT + }} + impl IPrintTaskRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PrintTaskRequestedEventArgs: IPrintTaskRequestedEventArgs} + DEFINE_IID!(IID_IPrintManagerStatic, 1477991885, 58932, 18004, 132, 240, 224, 21, 42, 130, 23, 172); + RT_INTERFACE!{static interface IPrintManagerStatic(IPrintManagerStaticVtbl): IInspectable(IInspectableVtbl) [IID_IPrintManagerStatic] { + fn GetForCurrentView(&mut self, out: *mut *mut PrintManager) -> HRESULT, + fn ShowPrintUIAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPrintManagerStatic { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_print_uiasync(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowPrintUIAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PrintManager: IPrintManager} + RT_ACTIVATABLE!{IPrintManagerStatic2 [CLSID_PrintManager]} + RT_ACTIVATABLE!{IPrintManagerStatic [CLSID_PrintManager]} + DEFINE_CLSID!(CLSID_PrintManager = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,80,114,105,110,116,105,110,103,46,80,114,105,110,116,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IPrintManagerStatic2, 900307285, 59051, 16697, 154, 189, 184, 106, 114, 155, 53, 152); + RT_INTERFACE!{static interface IPrintManagerStatic2(IPrintManagerStatic2Vtbl): IInspectable(IInspectableVtbl) [IID_IPrintManagerStatic2] { + fn IsSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IPrintManagerStatic2 { + #[inline] pub unsafe fn is_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrintManager, 4280981140, 35993, 17661, 174, 74, 25, 217, 170, 154, 15, 10); + RT_INTERFACE!{interface IPrintManager(IPrintManagerVtbl): IInspectable(IInspectableVtbl) [IID_IPrintManager] { + fn add_PrintTaskRequested(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PrintTaskRequested(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPrintManager { + #[inline] pub unsafe fn add_print_task_requested(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PrintTaskRequested)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_print_task_requested(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PrintTaskRequested)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +pub mod optiondetails { // Windows.Graphics.Printing.OptionDetails +use ::prelude::*; + RT_ENUM! { enum PrintOptionStates: u32 { + None (PrintOptionStates_None) = 0, Enabled (PrintOptionStates_Enabled) = 1, Constrained (PrintOptionStates_Constrained) = 2, + }} + RT_ENUM! { enum PrintOptionType: i32 { + Unknown (PrintOptionType_Unknown) = 0, Number (PrintOptionType_Number) = 1, Text (PrintOptionType_Text) = 2, ItemList (PrintOptionType_ItemList) = 3, + }} + DEFINE_IID!(IID_IPrintOptionDetails, 956729039, 54914, 18783, 173, 254, 215, 51, 63, 92, 24, 8); + RT_INTERFACE!{interface IPrintOptionDetails(IPrintOptionDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintOptionDetails] { + fn get_OptionId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_OptionType(&mut self, out: *mut PrintOptionType) -> HRESULT, + fn put_ErrorText(&mut self, value: HSTRING) -> HRESULT, + fn get_ErrorText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_State(&mut self, value: PrintOptionStates) -> HRESULT, + fn get_State(&mut self, out: *mut PrintOptionStates) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn TrySetValue(&mut self, value: *mut IInspectable, out: *mut bool) -> HRESULT + }} + impl IPrintOptionDetails { + #[inline] pub unsafe fn get_option_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OptionId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_option_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OptionType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_error_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ErrorText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ErrorText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_state(&mut self, value: PrintOptionStates) -> Result<()> { + let hr = ((*self.lpVtbl).put_State)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_value(&mut self, value: &IInspectable) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySetValue)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrintNumberOptionDetails, 1291959215, 25692, 19945, 150, 95, 111, 198, 187, 196, 124, 171); + RT_INTERFACE!{interface IPrintNumberOptionDetails(IPrintNumberOptionDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintNumberOptionDetails] { + fn get_MinValue(&mut self, out: *mut u32) -> HRESULT, + fn get_MaxValue(&mut self, out: *mut u32) -> HRESULT + }} + impl IPrintNumberOptionDetails { + #[inline] pub unsafe fn get_min_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrintTextOptionDetails, 2910184803, 23780, 18108, 153, 24, 171, 159, 173, 20, 76, 91); + RT_INTERFACE!{interface IPrintTextOptionDetails(IPrintTextOptionDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTextOptionDetails] { + fn get_MaxCharacters(&mut self, out: *mut u32) -> HRESULT + }} + impl IPrintTextOptionDetails { + #[inline] pub unsafe fn get_max_characters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxCharacters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrintItemListOptionDetails, 2585941951, 65121, 17368, 162, 79, 163, 246, 171, 115, 32, 231); + RT_INTERFACE!{interface IPrintItemListOptionDetails(IPrintItemListOptionDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintItemListOptionDetails] { + fn get_Items(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IPrintItemListOptionDetails { + #[inline] pub unsafe fn get_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Items)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PrintCopiesOptionDetails: IPrintOptionDetails} + RT_CLASS!{class PrintMediaSizeOptionDetails: IPrintOptionDetails} + RT_CLASS!{class PrintMediaTypeOptionDetails: IPrintOptionDetails} + RT_CLASS!{class PrintOrientationOptionDetails: IPrintOptionDetails} + RT_CLASS!{class PrintQualityOptionDetails: IPrintOptionDetails} + RT_CLASS!{class PrintColorModeOptionDetails: IPrintOptionDetails} + RT_CLASS!{class PrintDuplexOptionDetails: IPrintOptionDetails} + RT_CLASS!{class PrintCollationOptionDetails: IPrintOptionDetails} + RT_CLASS!{class PrintStapleOptionDetails: IPrintOptionDetails} + RT_CLASS!{class PrintHolePunchOptionDetails: IPrintOptionDetails} + RT_CLASS!{class PrintBindingOptionDetails: IPrintOptionDetails} + RT_CLASS!{class PrintBorderingOptionDetails: IPrintOptionDetails} + DEFINE_IID!(IID_IPrintCustomOptionDetails, 3811302940, 10415, 19344, 149, 218, 163, 172, 243, 32, 185, 41); + RT_INTERFACE!{interface IPrintCustomOptionDetails(IPrintCustomOptionDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintCustomOptionDetails] { + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPrintCustomOptionDetails { + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrintCustomTextOptionDetails, 718369272, 51389, 18693, 145, 146, 13, 117, 19, 110, 139, 49); + RT_INTERFACE!{interface IPrintCustomTextOptionDetails(IPrintCustomTextOptionDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintCustomTextOptionDetails] { + fn put_MaxCharacters(&mut self, value: u32) -> HRESULT, + fn get_MaxCharacters(&mut self, out: *mut u32) -> HRESULT + }} + impl IPrintCustomTextOptionDetails { + #[inline] pub unsafe fn set_max_characters(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxCharacters)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_characters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxCharacters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PrintCustomTextOptionDetails: IPrintOptionDetails} + DEFINE_IID!(IID_IPrintCustomItemDetails, 1459926583, 23610, 17562, 170, 54, 179, 41, 27, 17, 146, 253); + RT_INTERFACE!{interface IPrintCustomItemDetails(IPrintCustomItemDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintCustomItemDetails] { + fn get_ItemId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ItemDisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_ItemDisplayName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPrintCustomItemDetails { + #[inline] pub unsafe fn get_item_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_item_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ItemDisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemDisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PrintCustomItemDetails: IPrintCustomItemDetails} + DEFINE_IID!(IID_IPrintCustomItemListOptionDetails, 2784689544, 22770, 20157, 185, 15, 81, 228, 242, 148, 76, 93); + RT_INTERFACE!{interface IPrintCustomItemListOptionDetails(IPrintCustomItemListOptionDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintCustomItemListOptionDetails] { + fn AddItem(&mut self, itemId: HSTRING, displayName: HSTRING) -> HRESULT + }} + impl IPrintCustomItemListOptionDetails { + #[inline] pub unsafe fn add_item(&mut self, itemId: &HStringArg, displayName: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AddItem)(self, itemId.get(), displayName.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PrintCustomItemListOptionDetails: IPrintOptionDetails} + DEFINE_IID!(IID_IPrintTaskOptionChangedEventArgs, 1696169221, 42478, 17159, 148, 7, 154, 202, 209, 71, 103, 156); + RT_INTERFACE!{interface IPrintTaskOptionChangedEventArgs(IPrintTaskOptionChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskOptionChangedEventArgs] { + fn get_OptionId(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IPrintTaskOptionChangedEventArgs { + #[inline] pub unsafe fn get_option_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OptionId)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PrintTaskOptionChangedEventArgs: IPrintTaskOptionChangedEventArgs} + DEFINE_IID!(IID_IPrintTaskOptionDetails, 4117891825, 43166, 17062, 129, 175, 248, 224, 16, 179, 138, 104); + RT_INTERFACE!{interface IPrintTaskOptionDetails(IPrintTaskOptionDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskOptionDetails] { + fn get_Options(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn CreateItemListOption(&mut self, optionId: HSTRING, displayName: HSTRING, out: *mut *mut PrintCustomItemListOptionDetails) -> HRESULT, + fn CreateTextOption(&mut self, optionId: HSTRING, displayName: HSTRING, out: *mut *mut PrintCustomTextOptionDetails) -> HRESULT, + fn add_OptionChanged(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_OptionChanged(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_BeginValidation(&mut self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BeginValidation(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPrintTaskOptionDetails { + #[inline] pub unsafe fn get_options(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Options)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_item_list_option(&mut self, optionId: &HStringArg, displayName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateItemListOption)(self, optionId.get(), displayName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_text_option(&mut self, optionId: &HStringArg, displayName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTextOption)(self, optionId.get(), displayName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_option_changed(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_OptionChanged)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_option_changed(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_OptionChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_begin_validation(&mut self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BeginValidation)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_begin_validation(&mut self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BeginValidation)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PrintTaskOptionDetails: IPrintTaskOptionDetails} + RT_ACTIVATABLE!{IPrintTaskOptionDetailsStatic [CLSID_PrintTaskOptionDetails]} + DEFINE_CLSID!(CLSID_PrintTaskOptionDetails = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,80,114,105,110,116,105,110,103,46,79,112,116,105,111,110,68,101,116,97,105,108,115,46,80,114,105,110,116,84,97,115,107,79,112,116,105,111,110,68,101,116,97,105,108,115,0]); + DEFINE_IID!(IID_IPrintTaskOptionDetailsStatic, 324903315, 2401, 19310, 135, 102, 241, 59, 127, 188, 205, 88); + RT_INTERFACE!{static interface IPrintTaskOptionDetailsStatic(IPrintTaskOptionDetailsStaticVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskOptionDetailsStatic] { + fn GetFromPrintTaskOptions(&mut self, printTaskOptions: *mut super::PrintTaskOptions, out: *mut *mut PrintTaskOptionDetails) -> HRESULT + }} + impl IPrintTaskOptionDetailsStatic { + #[inline] pub unsafe fn get_from_print_task_options(&mut self, printTaskOptions: &super::PrintTaskOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFromPrintTaskOptions)(self, printTaskOptions as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Graphics.Printing.OptionDetails +} // Windows.Graphics.Printing +pub mod holographic { // Windows.Graphics.Holographic +use ::prelude::*; + RT_ENUM! { enum HolographicFramePresentResult: i32 { + Success (HolographicFramePresentResult_Success) = 0, DeviceRemoved (HolographicFramePresentResult_DeviceRemoved) = 1, + }} + RT_ENUM! { enum HolographicFramePresentWaitBehavior: i32 { + WaitForFrameToFinish (HolographicFramePresentWaitBehavior_WaitForFrameToFinish) = 0, DoNotWaitForFrameToFinish (HolographicFramePresentWaitBehavior_DoNotWaitForFrameToFinish) = 1, + }} + RT_STRUCT! { struct HolographicStereoTransform { + Left: super::super::foundation::numerics::Matrix4x4, Right: super::super::foundation::numerics::Matrix4x4, + }} + RT_STRUCT! { struct HolographicAdapterId { + LowPart: u32, HighPart: i32, + }} + DEFINE_IID!(IID_IHolographicCamera, 3840508997, 39917, 18816, 155, 160, 232, 118, 128, 209, 203, 116); + RT_INTERFACE!{interface IHolographicCamera(IHolographicCameraVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicCamera] { + fn get_RenderTargetSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_ViewportScaleFactor(&mut self, out: *mut f64) -> HRESULT, + fn put_ViewportScaleFactor(&mut self, value: f64) -> HRESULT, + fn get_IsStereo(&mut self, out: *mut bool) -> HRESULT, + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn SetNearPlaneDistance(&mut self, value: f64) -> HRESULT, + fn SetFarPlaneDistance(&mut self, value: f64) -> HRESULT + }} + impl IHolographicCamera { + #[inline] pub unsafe fn get_render_target_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RenderTargetSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_viewport_scale_factor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ViewportScaleFactor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_viewport_scale_factor(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_ViewportScaleFactor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_stereo(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStereo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_near_plane_distance(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).SetNearPlaneDistance)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_far_plane_distance(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).SetFarPlaneDistance)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHolographicSpaceCameraAddedEventArgs, 1492245045, 48051, 15503, 153, 61, 108, 128, 231, 254, 185, 159); + RT_INTERFACE!{interface IHolographicSpaceCameraAddedEventArgs(IHolographicSpaceCameraAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicSpaceCameraAddedEventArgs] { + fn get_Camera(&mut self, out: *mut *mut HolographicCamera) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IHolographicSpaceCameraAddedEventArgs { + #[inline] pub unsafe fn get_camera(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Camera)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class HolographicCamera: IHolographicCamera} + DEFINE_IID!(IID_IHolographicSpaceCameraRemovedEventArgs, 2153006248, 62126, 12846, 141, 169, 131, 106, 10, 149, 164, 193); + RT_INTERFACE!{interface IHolographicSpaceCameraRemovedEventArgs(IHolographicSpaceCameraRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicSpaceCameraRemovedEventArgs] { + fn get_Camera(&mut self, out: *mut *mut HolographicCamera) -> HRESULT + }} + impl IHolographicSpaceCameraRemovedEventArgs { + #[inline] pub unsafe fn get_camera(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Camera)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHolographicSpace, 1132518310, 24184, 17231, 128, 124, 52, 51, 209, 239, 232, 183); + RT_INTERFACE!{interface IHolographicSpace(IHolographicSpaceVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicSpace] { + fn get_PrimaryAdapterId(&mut self, out: *mut HolographicAdapterId) -> HRESULT, + fn SetDirect3D11Device(&mut self, value: *mut super::directx::direct3d11::IDirect3DDevice) -> HRESULT, + fn add_CameraAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraAdded(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CameraRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraRemoved(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn CreateNextFrame(&mut self, out: *mut *mut HolographicFrame) -> HRESULT + }} + impl IHolographicSpace { + #[inline] pub unsafe fn get_primary_adapter_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrimaryAdapterId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_direct3_d11_device(&mut self, value: &super::directx::direct3d11::IDirect3DDevice) -> Result<()> { + let hr = ((*self.lpVtbl).SetDirect3D11Device)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_camera_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CameraAdded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_camera_added(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CameraAdded)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_camera_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CameraRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_camera_removed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CameraRemoved)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn create_next_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateNextFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class HolographicSpace: IHolographicSpace} + RT_ACTIVATABLE!{IHolographicSpaceStatics [CLSID_HolographicSpace]} + DEFINE_CLSID!(CLSID_HolographicSpace = &[87,105,110,100,111,119,115,46,71,114,97,112,104,105,99,115,46,72,111,108,111,103,114,97,112,104,105,99,46,72,111,108,111,103,114,97,112,104,105,99,83,112,97,99,101,0]); + RT_CLASS!{class HolographicSpaceCameraAddedEventArgs: IHolographicSpaceCameraAddedEventArgs} + RT_CLASS!{class HolographicSpaceCameraRemovedEventArgs: IHolographicSpaceCameraRemovedEventArgs} + RT_CLASS!{class HolographicFrame: IHolographicFrame} + DEFINE_IID!(IID_IHolographicSpaceStatics, 911106148, 51442, 15265, 131, 145, 102, 184, 72, 158, 103, 253); + RT_INTERFACE!{static interface IHolographicSpaceStatics(IHolographicSpaceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicSpaceStatics] { + #[cfg(feature="windows.ui")] fn CreateForCoreWindow(&mut self, window: *mut super::super::ui::core::CoreWindow, out: *mut *mut HolographicSpace) -> HRESULT + }} + impl IHolographicSpaceStatics { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn create_for_core_window(&mut self, window: &super::super::ui::core::CoreWindow) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateForCoreWindow)(self, window as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHolographicCameraPose, 226328112, 4830, 17853, 145, 43, 199, 246, 86, 21, 153, 209); + RT_INTERFACE!{interface IHolographicCameraPose(IHolographicCameraPoseVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicCameraPose] { + fn get_HolographicCamera(&mut self, out: *mut *mut HolographicCamera) -> HRESULT, + fn get_Viewport(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + #[cfg(not(feature="windows.perception"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.perception")] fn TryGetViewTransform(&mut self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_ProjectionTransform(&mut self, out: *mut HolographicStereoTransform) -> HRESULT, + #[cfg(not(feature="windows.perception"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.perception")] fn TryGetCullingFrustum(&mut self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + #[cfg(not(feature="windows.perception"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.perception")] fn TryGetVisibleFrustum(&mut self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_NearPlaneDistance(&mut self, out: *mut f64) -> HRESULT, + fn get_FarPlaneDistance(&mut self, out: *mut f64) -> HRESULT + }} + impl IHolographicCameraPose { + #[inline] pub unsafe fn get_holographic_camera(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HolographicCamera)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_viewport(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Viewport)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_view_transform(&mut self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetViewTransform)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_projection_transform(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProjectionTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_culling_frustum(&mut self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetCullingFrustum)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_visible_frustum(&mut self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetVisibleFrustum)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_near_plane_distance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NearPlaneDistance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_far_plane_distance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FarPlaneDistance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHolographicFramePrediction, 1376734689, 23562, 20089, 168, 30, 106, 190, 2, 187, 39, 57); + RT_INTERFACE!{interface IHolographicFramePrediction(IHolographicFramePredictionVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicFramePrediction] { + fn get_CameraPoses(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows.perception")] fn get_Timestamp(&mut self, out: *mut *mut super::super::perception::PerceptionTimestamp) -> HRESULT + }} + impl IHolographicFramePrediction { + #[inline] pub unsafe fn get_camera_poses(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CameraPoses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn get_timestamp(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class HolographicCameraPose: IHolographicCameraPose} + DEFINE_IID!(IID_IHolographicCameraRenderingParameters, 2393648849, 23540, 19990, 130, 54, 174, 8, 0, 193, 29, 13); + RT_INTERFACE!{interface IHolographicCameraRenderingParameters(IHolographicCameraRenderingParametersVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicCameraRenderingParameters] { + #[cfg(not(feature="windows.perception"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.perception")] fn SetFocusPoint(&mut self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3) -> HRESULT, + #[cfg(not(feature="windows.perception"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.perception")] fn SetFocusPointWithNormal(&mut self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, normal: super::super::foundation::numerics::Vector3) -> HRESULT, + #[cfg(not(feature="windows.perception"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.perception")] fn SetFocusPointWithNormalLinearVelocity(&mut self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, normal: super::super::foundation::numerics::Vector3, linearVelocity: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Direct3D11Device(&mut self, out: *mut *mut super::directx::direct3d11::IDirect3DDevice) -> HRESULT, + fn get_Direct3D11BackBuffer(&mut self, out: *mut *mut super::directx::direct3d11::IDirect3DSurface) -> HRESULT + }} + impl IHolographicCameraRenderingParameters { + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn set_focus_point(&mut self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).SetFocusPoint)(self, coordinateSystem as *const _ as *mut _, position); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn set_focus_point_with_normal(&mut self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, normal: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).SetFocusPointWithNormal)(self, coordinateSystem as *const _ as *mut _, position, normal); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn set_focus_point_with_normal_linear_velocity(&mut self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, normal: super::super::foundation::numerics::Vector3, linearVelocity: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).SetFocusPointWithNormalLinearVelocity)(self, coordinateSystem as *const _ as *mut _, position, normal, linearVelocity); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_direct3_d11_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Direct3D11Device)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_direct3_d11_back_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Direct3D11BackBuffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHolographicFrame, 3331886774, 43193, 12372, 166, 235, 214, 36, 182, 83, 99, 117); + RT_INTERFACE!{interface IHolographicFrame(IHolographicFrameVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicFrame] { + fn get_AddedCameras(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_RemovedCameras(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetRenderingParameters(&mut self, cameraPose: *mut HolographicCameraPose, out: *mut *mut HolographicCameraRenderingParameters) -> HRESULT, + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_CurrentPrediction(&mut self, out: *mut *mut HolographicFramePrediction) -> HRESULT, + fn UpdateCurrentPrediction(&mut self) -> HRESULT, + fn PresentUsingCurrentPrediction(&mut self, out: *mut HolographicFramePresentResult) -> HRESULT, + fn PresentUsingCurrentPredictionWithBehavior(&mut self, waitBehavior: HolographicFramePresentWaitBehavior, out: *mut HolographicFramePresentResult) -> HRESULT, + fn WaitForFrameToFinish(&mut self) -> HRESULT + }} + impl IHolographicFrame { + #[inline] pub unsafe fn get_added_cameras(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AddedCameras)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_removed_cameras(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemovedCameras)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rendering_parameters(&mut self, cameraPose: &HolographicCameraPose) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRenderingParameters)(self, cameraPose as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_prediction(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentPrediction)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_current_prediction(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateCurrentPrediction)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn present_using_current_prediction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).PresentUsingCurrentPrediction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn present_using_current_prediction_with_behavior(&mut self, waitBehavior: HolographicFramePresentWaitBehavior) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).PresentUsingCurrentPredictionWithBehavior)(self, waitBehavior, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn wait_for_frame_to_finish(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).WaitForFrameToFinish)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class HolographicCameraRenderingParameters: IHolographicCameraRenderingParameters} + RT_CLASS!{class HolographicFramePrediction: IHolographicFramePrediction} +} // Windows.Graphics.Holographic +pub mod directx { // Windows.Graphics.DirectX +use ::prelude::*; + RT_ENUM! { enum DirectXAlphaMode: i32 { + Unspecified (DirectXAlphaMode_Unspecified) = 0, Premultiplied (DirectXAlphaMode_Premultiplied) = 1, Straight (DirectXAlphaMode_Straight) = 2, Ignore (DirectXAlphaMode_Ignore) = 3, + }} + RT_ENUM! { enum DirectXPixelFormat: i32 { + Unknown (DirectXPixelFormat_Unknown) = 0, R32G32B32A32Typeless (DirectXPixelFormat_R32G32B32A32Typeless) = 1, R32G32B32A32Float (DirectXPixelFormat_R32G32B32A32Float) = 2, R32G32B32A32UInt (DirectXPixelFormat_R32G32B32A32UInt) = 3, R32G32B32A32Int (DirectXPixelFormat_R32G32B32A32Int) = 4, R32G32B32Typeless (DirectXPixelFormat_R32G32B32Typeless) = 5, R32G32B32Float (DirectXPixelFormat_R32G32B32Float) = 6, R32G32B32UInt (DirectXPixelFormat_R32G32B32UInt) = 7, R32G32B32Int (DirectXPixelFormat_R32G32B32Int) = 8, R16G16B16A16Typeless (DirectXPixelFormat_R16G16B16A16Typeless) = 9, R16G16B16A16Float (DirectXPixelFormat_R16G16B16A16Float) = 10, R16G16B16A16UIntNormalized (DirectXPixelFormat_R16G16B16A16UIntNormalized) = 11, R16G16B16A16UInt (DirectXPixelFormat_R16G16B16A16UInt) = 12, R16G16B16A16IntNormalized (DirectXPixelFormat_R16G16B16A16IntNormalized) = 13, R16G16B16A16Int (DirectXPixelFormat_R16G16B16A16Int) = 14, R32G32Typeless (DirectXPixelFormat_R32G32Typeless) = 15, R32G32Float (DirectXPixelFormat_R32G32Float) = 16, R32G32UInt (DirectXPixelFormat_R32G32UInt) = 17, R32G32Int (DirectXPixelFormat_R32G32Int) = 18, R32G8X24Typeless (DirectXPixelFormat_R32G8X24Typeless) = 19, D32FloatS8X24UInt (DirectXPixelFormat_D32FloatS8X24UInt) = 20, R32FloatX8X24Typeless (DirectXPixelFormat_R32FloatX8X24Typeless) = 21, X32TypelessG8X24UInt (DirectXPixelFormat_X32TypelessG8X24UInt) = 22, R10G10B10A2Typeless (DirectXPixelFormat_R10G10B10A2Typeless) = 23, R10G10B10A2UIntNormalized (DirectXPixelFormat_R10G10B10A2UIntNormalized) = 24, R10G10B10A2UInt (DirectXPixelFormat_R10G10B10A2UInt) = 25, R11G11B10Float (DirectXPixelFormat_R11G11B10Float) = 26, R8G8B8A8Typeless (DirectXPixelFormat_R8G8B8A8Typeless) = 27, R8G8B8A8UIntNormalized (DirectXPixelFormat_R8G8B8A8UIntNormalized) = 28, R8G8B8A8UIntNormalizedSrgb (DirectXPixelFormat_R8G8B8A8UIntNormalizedSrgb) = 29, R8G8B8A8UInt (DirectXPixelFormat_R8G8B8A8UInt) = 30, R8G8B8A8IntNormalized (DirectXPixelFormat_R8G8B8A8IntNormalized) = 31, R8G8B8A8Int (DirectXPixelFormat_R8G8B8A8Int) = 32, R16G16Typeless (DirectXPixelFormat_R16G16Typeless) = 33, R16G16Float (DirectXPixelFormat_R16G16Float) = 34, R16G16UIntNormalized (DirectXPixelFormat_R16G16UIntNormalized) = 35, R16G16UInt (DirectXPixelFormat_R16G16UInt) = 36, R16G16IntNormalized (DirectXPixelFormat_R16G16IntNormalized) = 37, R16G16Int (DirectXPixelFormat_R16G16Int) = 38, R32Typeless (DirectXPixelFormat_R32Typeless) = 39, D32Float (DirectXPixelFormat_D32Float) = 40, R32Float (DirectXPixelFormat_R32Float) = 41, R32UInt (DirectXPixelFormat_R32UInt) = 42, R32Int (DirectXPixelFormat_R32Int) = 43, R24G8Typeless (DirectXPixelFormat_R24G8Typeless) = 44, D24UIntNormalizedS8UInt (DirectXPixelFormat_D24UIntNormalizedS8UInt) = 45, R24UIntNormalizedX8Typeless (DirectXPixelFormat_R24UIntNormalizedX8Typeless) = 46, X24TypelessG8UInt (DirectXPixelFormat_X24TypelessG8UInt) = 47, R8G8Typeless (DirectXPixelFormat_R8G8Typeless) = 48, R8G8UIntNormalized (DirectXPixelFormat_R8G8UIntNormalized) = 49, R8G8UInt (DirectXPixelFormat_R8G8UInt) = 50, R8G8IntNormalized (DirectXPixelFormat_R8G8IntNormalized) = 51, R8G8Int (DirectXPixelFormat_R8G8Int) = 52, R16Typeless (DirectXPixelFormat_R16Typeless) = 53, R16Float (DirectXPixelFormat_R16Float) = 54, D16UIntNormalized (DirectXPixelFormat_D16UIntNormalized) = 55, R16UIntNormalized (DirectXPixelFormat_R16UIntNormalized) = 56, R16UInt (DirectXPixelFormat_R16UInt) = 57, R16IntNormalized (DirectXPixelFormat_R16IntNormalized) = 58, R16Int (DirectXPixelFormat_R16Int) = 59, R8Typeless (DirectXPixelFormat_R8Typeless) = 60, R8UIntNormalized (DirectXPixelFormat_R8UIntNormalized) = 61, R8UInt (DirectXPixelFormat_R8UInt) = 62, R8IntNormalized (DirectXPixelFormat_R8IntNormalized) = 63, R8Int (DirectXPixelFormat_R8Int) = 64, A8UIntNormalized (DirectXPixelFormat_A8UIntNormalized) = 65, R1UIntNormalized (DirectXPixelFormat_R1UIntNormalized) = 66, R9G9B9E5SharedExponent (DirectXPixelFormat_R9G9B9E5SharedExponent) = 67, R8G8B8G8UIntNormalized (DirectXPixelFormat_R8G8B8G8UIntNormalized) = 68, G8R8G8B8UIntNormalized (DirectXPixelFormat_G8R8G8B8UIntNormalized) = 69, BC1Typeless (DirectXPixelFormat_BC1Typeless) = 70, BC1UIntNormalized (DirectXPixelFormat_BC1UIntNormalized) = 71, BC1UIntNormalizedSrgb (DirectXPixelFormat_BC1UIntNormalizedSrgb) = 72, BC2Typeless (DirectXPixelFormat_BC2Typeless) = 73, BC2UIntNormalized (DirectXPixelFormat_BC2UIntNormalized) = 74, BC2UIntNormalizedSrgb (DirectXPixelFormat_BC2UIntNormalizedSrgb) = 75, BC3Typeless (DirectXPixelFormat_BC3Typeless) = 76, BC3UIntNormalized (DirectXPixelFormat_BC3UIntNormalized) = 77, BC3UIntNormalizedSrgb (DirectXPixelFormat_BC3UIntNormalizedSrgb) = 78, BC4Typeless (DirectXPixelFormat_BC4Typeless) = 79, BC4UIntNormalized (DirectXPixelFormat_BC4UIntNormalized) = 80, BC4IntNormalized (DirectXPixelFormat_BC4IntNormalized) = 81, BC5Typeless (DirectXPixelFormat_BC5Typeless) = 82, BC5UIntNormalized (DirectXPixelFormat_BC5UIntNormalized) = 83, BC5IntNormalized (DirectXPixelFormat_BC5IntNormalized) = 84, B5G6R5UIntNormalized (DirectXPixelFormat_B5G6R5UIntNormalized) = 85, B5G5R5A1UIntNormalized (DirectXPixelFormat_B5G5R5A1UIntNormalized) = 86, B8G8R8A8UIntNormalized (DirectXPixelFormat_B8G8R8A8UIntNormalized) = 87, B8G8R8X8UIntNormalized (DirectXPixelFormat_B8G8R8X8UIntNormalized) = 88, R10G10B10XRBiasA2UIntNormalized (DirectXPixelFormat_R10G10B10XRBiasA2UIntNormalized) = 89, B8G8R8A8Typeless (DirectXPixelFormat_B8G8R8A8Typeless) = 90, B8G8R8A8UIntNormalizedSrgb (DirectXPixelFormat_B8G8R8A8UIntNormalizedSrgb) = 91, B8G8R8X8Typeless (DirectXPixelFormat_B8G8R8X8Typeless) = 92, B8G8R8X8UIntNormalizedSrgb (DirectXPixelFormat_B8G8R8X8UIntNormalizedSrgb) = 93, BC6HTypeless (DirectXPixelFormat_BC6HTypeless) = 94, BC6H16UnsignedFloat (DirectXPixelFormat_BC6H16UnsignedFloat) = 95, BC6H16Float (DirectXPixelFormat_BC6H16Float) = 96, BC7Typeless (DirectXPixelFormat_BC7Typeless) = 97, BC7UIntNormalized (DirectXPixelFormat_BC7UIntNormalized) = 98, BC7UIntNormalizedSrgb (DirectXPixelFormat_BC7UIntNormalizedSrgb) = 99, Ayuv (DirectXPixelFormat_Ayuv) = 100, Y410 (DirectXPixelFormat_Y410) = 101, Y416 (DirectXPixelFormat_Y416) = 102, NV12 (DirectXPixelFormat_NV12) = 103, P010 (DirectXPixelFormat_P010) = 104, P016 (DirectXPixelFormat_P016) = 105, Opaque420 (DirectXPixelFormat_Opaque420) = 106, Yuy2 (DirectXPixelFormat_Yuy2) = 107, Y210 (DirectXPixelFormat_Y210) = 108, Y216 (DirectXPixelFormat_Y216) = 109, NV11 (DirectXPixelFormat_NV11) = 110, AI44 (DirectXPixelFormat_AI44) = 111, IA44 (DirectXPixelFormat_IA44) = 112, P8 (DirectXPixelFormat_P8) = 113, A8P8 (DirectXPixelFormat_A8P8) = 114, B4G4R4A4UIntNormalized (DirectXPixelFormat_B4G4R4A4UIntNormalized) = 115, P208 (DirectXPixelFormat_P208) = 130, V208 (DirectXPixelFormat_V208) = 131, V408 (DirectXPixelFormat_V408) = 132, + }} +pub mod direct3d11 { // Windows.Graphics.DirectX.Direct3D11 +use ::prelude::*; + RT_STRUCT! { struct Direct3DMultisampleDescription { + Count: i32, Quality: i32, + }} + RT_STRUCT! { struct Direct3DSurfaceDescription { + Width: i32, Height: i32, Format: super::DirectXPixelFormat, MultisampleDescription: Direct3DMultisampleDescription, + }} + RT_ENUM! { enum Direct3DUsage: i32 { + Default (Direct3DUsage_Default) = 0, Immutable (Direct3DUsage_Immutable) = 1, Dynamic (Direct3DUsage_Dynamic) = 2, Staging (Direct3DUsage_Staging) = 3, + }} + RT_ENUM! { enum Direct3DBindings: u32 { + VertexBuffer (Direct3DBindings_VertexBuffer) = 1, IndexBuffer (Direct3DBindings_IndexBuffer) = 2, ConstantBuffer (Direct3DBindings_ConstantBuffer) = 4, ShaderResource (Direct3DBindings_ShaderResource) = 8, StreamOutput (Direct3DBindings_StreamOutput) = 16, RenderTarget (Direct3DBindings_RenderTarget) = 32, DepthStencil (Direct3DBindings_DepthStencil) = 64, UnorderedAccess (Direct3DBindings_UnorderedAccess) = 128, Decoder (Direct3DBindings_Decoder) = 512, VideoEncoder (Direct3DBindings_VideoEncoder) = 1024, + }} + DEFINE_IID!(IID_IDirect3DDevice, 2742428843, 36191, 18000, 157, 62, 158, 174, 61, 155, 198, 112); + RT_INTERFACE!{interface IDirect3DDevice(IDirect3DDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IDirect3DDevice] { + fn Trim(&mut self) -> HRESULT + }} + impl IDirect3DDevice { + #[inline] pub unsafe fn trim(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Trim)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDirect3DSurface, 200581446, 5057, 18068, 190, 227, 122, 191, 21, 234, 245, 134); + RT_INTERFACE!{interface IDirect3DSurface(IDirect3DSurfaceVtbl): IInspectable(IInspectableVtbl) [IID_IDirect3DSurface] { + fn get_Description(&mut self, out: *mut Direct3DSurfaceDescription) -> HRESULT + }} + impl IDirect3DSurface { + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Graphics.DirectX.Direct3D11 +} // Windows.Graphics.DirectX +} // Windows.Graphics +#[cfg(feature="windows.management")] +pub mod management { // Windows.Management +pub mod deployment { // Windows.Management.Deployment +use ::prelude::*; + RT_ENUM! { enum DeploymentProgressState: i32 { + Queued (DeploymentProgressState_Queued) = 0, Processing (DeploymentProgressState_Processing) = 1, + }} + RT_STRUCT! { struct DeploymentProgress { + state: DeploymentProgressState, percentage: u32, + }} + RT_ENUM! { enum DeploymentOptions: u32 { + None (DeploymentOptions_None) = 0, ForceApplicationShutdown (DeploymentOptions_ForceApplicationShutdown) = 1, DevelopmentMode (DeploymentOptions_DevelopmentMode) = 2, InstallAllResources (DeploymentOptions_InstallAllResources) = 32, ForceTargetApplicationShutdown (DeploymentOptions_ForceTargetApplicationShutdown) = 64, + }} + RT_ENUM! { enum RemovalOptions: u32 { + None (RemovalOptions_None) = 0, PreserveApplicationData (RemovalOptions_PreserveApplicationData) = 4096, + }} + RT_ENUM! { enum PackageTypes: u32 { + None (PackageTypes_None) = 0, Main (PackageTypes_Main) = 1, Framework (PackageTypes_Framework) = 2, Resource (PackageTypes_Resource) = 4, Bundle (PackageTypes_Bundle) = 8, Xap (PackageTypes_Xap) = 16, Optional (PackageTypes_Optional) = 32, + }} + DEFINE_IID!(IID_IDeploymentResult, 627292590, 46973, 19487, 138, 123, 32, 230, 173, 81, 94, 243); + RT_INTERFACE!{interface IDeploymentResult(IDeploymentResultVtbl): IInspectable(IInspectableVtbl) [IID_IDeploymentResult] { + fn get_ErrorText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ActivityId(&mut self, out: *mut Guid) -> HRESULT, + fn get_ExtendedErrorCode(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IDeploymentResult { + #[inline] pub unsafe fn get_error_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ErrorText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_activity_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActivityId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class DeploymentResult: IDeploymentResult} + RT_ENUM! { enum PackageInstallState: i32 { + NotInstalled (PackageInstallState_NotInstalled) = 0, Staged (PackageInstallState_Staged) = 1, Installed (PackageInstallState_Installed) = 2, Paused (PackageInstallState_Paused) = 6, + }} + DEFINE_IID!(IID_IPackageUserInformation, 4130878499, 64009, 19644, 144, 85, 21, 202, 39, 94, 46, 126); + RT_INTERFACE!{interface IPackageUserInformation(IPackageUserInformationVtbl): IInspectable(IInspectableVtbl) [IID_IPackageUserInformation] { + fn get_UserSecurityId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_InstallState(&mut self, out: *mut PackageInstallState) -> HRESULT + }} + impl IPackageUserInformation { + #[inline] pub unsafe fn get_user_security_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserSecurityId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_install_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InstallState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PackageUserInformation: IPackageUserInformation} + RT_ENUM! { enum PackageState: i32 { + Normal (PackageState_Normal) = 0, LicenseInvalid (PackageState_LicenseInvalid) = 1, Modified (PackageState_Modified) = 2, Tampered (PackageState_Tampered) = 3, + }} + RT_ENUM! { enum PackageStatus: u32 { + OK (PackageStatus_OK) = 0, LicenseIssue (PackageStatus_LicenseIssue) = 1, Modified (PackageStatus_Modified) = 2, Tampered (PackageStatus_Tampered) = 4, Disabled (PackageStatus_Disabled) = 8, + }} + DEFINE_IID!(IID_IPackageManager, 2591902565, 24207, 20423, 162, 229, 127, 105, 37, 203, 139, 83); + RT_INTERFACE!{interface IPackageManager(IPackageManagerVtbl): IInspectable(IInspectableVtbl) [IID_IPackageManager] { + fn AddPackageAsync(&mut self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn UpdatePackageAsync(&mut self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RemovePackageAsync(&mut self, packageFullName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn StagePackageAsync(&mut self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RegisterPackageAsync(&mut self, manifestUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackages(&mut self, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityId(&mut self, userSecurityId: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByNamePublisher(&mut self, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisher(&mut self, userSecurityId: HSTRING, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn FindUsers(&mut self, packageFullName: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn SetPackageState(&mut self, packageFullName: HSTRING, packageState: PackageState) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackageByPackageFullName(&mut self, packageFullName: HSTRING, out: *mut *mut super::super::applicationmodel::Package) -> HRESULT, + fn CleanupPackageForUserAsync(&mut self, packageName: HSTRING, userSecurityId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByPackageFamilyName(&mut self, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyName(&mut self, userSecurityId: HSTRING, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackageByUserSecurityIdPackageFullName(&mut self, userSecurityId: HSTRING, packageFullName: HSTRING, out: *mut *mut super::super::applicationmodel::Package) -> HRESULT + }} + impl IPackageManager { + #[inline] pub unsafe fn add_package_async(&mut self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddPackageAsync)(self, packageUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, deploymentOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_package_async(&mut self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdatePackageAsync)(self, packageUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, deploymentOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn remove_package_async(&mut self, packageFullName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RemovePackageAsync)(self, packageFullName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stage_package_async(&mut self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StagePackageAsync)(self, packageUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn register_package_async(&mut self, manifestUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RegisterPackageAsync)(self, manifestUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, deploymentOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id(&mut self, userSecurityId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityId)(self, userSecurityId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_name_publisher(&mut self, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByNamePublisher)(self, packageName.get(), packagePublisher.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id_name_publisher(&mut self, userSecurityId: &HStringArg, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdNamePublisher)(self, userSecurityId.get(), packageName.get(), packagePublisher.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_users(&mut self, packageFullName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindUsers)(self, packageFullName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_package_state(&mut self, packageFullName: &HStringArg, packageState: PackageState) -> Result<()> { + let hr = ((*self.lpVtbl).SetPackageState)(self, packageFullName.get(), packageState); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_package_by_package_full_name(&mut self, packageFullName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackageByPackageFullName)(self, packageFullName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn cleanup_package_for_user_async(&mut self, packageName: &HStringArg, userSecurityId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CleanupPackageForUserAsync)(self, packageName.get(), userSecurityId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_package_family_name(&mut self, packageFamilyName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByPackageFamilyName)(self, packageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id_package_family_name(&mut self, userSecurityId: &HStringArg, packageFamilyName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdPackageFamilyName)(self, userSecurityId.get(), packageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_package_by_user_security_id_package_full_name(&mut self, userSecurityId: &HStringArg, packageFullName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackageByUserSecurityIdPackageFullName)(self, userSecurityId.get(), packageFullName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPackageManager2, 4155166861, 2112, 18162, 181, 216, 202, 212, 118, 147, 160, 149); + RT_INTERFACE!{interface IPackageManager2(IPackageManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IPackageManager2] { + fn RemovePackageWithOptionsAsync(&mut self, packageFullName: HSTRING, removalOptions: RemovalOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn StagePackageWithOptionsAsync(&mut self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RegisterPackageByFullNameAsync(&mut self, mainPackageFullName: HSTRING, dependencyPackageFullNames: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn FindPackagesWithPackageTypes(&mut self, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityIdWithPackageTypes(&mut self, userSecurityId: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByNamePublisherWithPackageTypes(&mut self, packageName: HSTRING, packagePublisher: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(&mut self, userSecurityId: HSTRING, packageName: HSTRING, packagePublisher: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByPackageFamilyNameWithPackageTypes(&mut self, packageFamilyName: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes(&mut self, userSecurityId: HSTRING, packageFamilyName: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn StageUserDataAsync(&mut self, packageFullName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IPackageManager2 { + #[inline] pub unsafe fn remove_package_with_options_async(&mut self, packageFullName: &HStringArg, removalOptions: RemovalOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RemovePackageWithOptionsAsync)(self, packageFullName.get(), removalOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stage_package_with_options_async(&mut self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StagePackageWithOptionsAsync)(self, packageUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, deploymentOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn register_package_by_full_name_async(&mut self, mainPackageFullName: &HStringArg, dependencyPackageFullNames: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RegisterPackageByFullNameAsync)(self, mainPackageFullName.get(), dependencyPackageFullNames as *const _ as *mut _, deploymentOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_with_package_types(&mut self, packageTypes: PackageTypes) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesWithPackageTypes)(self, packageTypes, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id_with_package_types(&mut self, userSecurityId: &HStringArg, packageTypes: PackageTypes) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdWithPackageTypes)(self, userSecurityId.get(), packageTypes, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_name_publisher_with_package_types(&mut self, packageName: &HStringArg, packagePublisher: &HStringArg, packageTypes: PackageTypes) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByNamePublisherWithPackageTypes)(self, packageName.get(), packagePublisher.get(), packageTypes, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id_name_publisher_with_package_types(&mut self, userSecurityId: &HStringArg, packageName: &HStringArg, packagePublisher: &HStringArg, packageTypes: PackageTypes) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdNamePublisherWithPackageTypes)(self, userSecurityId.get(), packageName.get(), packagePublisher.get(), packageTypes, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_package_family_name_with_package_types(&mut self, packageFamilyName: &HStringArg, packageTypes: PackageTypes) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByPackageFamilyNameWithPackageTypes)(self, packageFamilyName.get(), packageTypes, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id_package_family_name_with_package_types(&mut self, userSecurityId: &HStringArg, packageFamilyName: &HStringArg, packageTypes: PackageTypes) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes)(self, userSecurityId.get(), packageFamilyName.get(), packageTypes, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stage_user_data_async(&mut self, packageFullName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StageUserDataAsync)(self, packageFullName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPackageManager3, 3668810056, 14065, 16807, 145, 136, 188, 38, 62, 13, 203, 114); + RT_INTERFACE!{interface IPackageManager3(IPackageManager3Vtbl): IInspectable(IInspectableVtbl) [IID_IPackageManager3] { + fn AddPackageVolumeAsync(&mut self, packageStorePath: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn AddPackageToVolumeAsync(&mut self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn ClearPackageStatus(&mut self, packageFullName: HSTRING, status: PackageStatus) -> HRESULT, + fn RegisterPackageWithAppDataVolumeAsync(&mut self, manifestUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, appDataVolume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn FindPackageVolumeByName(&mut self, volumeName: HSTRING, out: *mut *mut PackageVolume) -> HRESULT, + fn FindPackageVolumes(&mut self, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn GetDefaultPackageVolume(&mut self, out: *mut *mut PackageVolume) -> HRESULT, + fn MovePackageToVolumeAsync(&mut self, packageFullName: HSTRING, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RemovePackageVolumeAsync(&mut self, volume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn SetDefaultPackageVolume(&mut self, volume: *mut PackageVolume) -> HRESULT, + fn SetPackageStatus(&mut self, packageFullName: HSTRING, status: PackageStatus) -> HRESULT, + fn SetPackageVolumeOfflineAsync(&mut self, packageVolume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn SetPackageVolumeOnlineAsync(&mut self, packageVolume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn StagePackageToVolumeAsync(&mut self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn StageUserDataWithOptionsAsync(&mut self, packageFullName: HSTRING, deploymentOptions: DeploymentOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IPackageManager3 { + #[inline] pub unsafe fn add_package_volume_async(&mut self, packageStorePath: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddPackageVolumeAsync)(self, packageStorePath.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_package_to_volume_async(&mut self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddPackageToVolumeAsync)(self, packageUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, deploymentOptions, targetVolume as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_package_status(&mut self, packageFullName: &HStringArg, status: PackageStatus) -> Result<()> { + let hr = ((*self.lpVtbl).ClearPackageStatus)(self, packageFullName.get(), status); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_package_with_app_data_volume_async(&mut self, manifestUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, appDataVolume: &PackageVolume) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RegisterPackageWithAppDataVolumeAsync)(self, manifestUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, deploymentOptions, appDataVolume as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_package_volume_by_name(&mut self, volumeName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackageVolumeByName)(self, volumeName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_package_volumes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackageVolumes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_package_volume(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultPackageVolume)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn move_package_to_volume_async(&mut self, packageFullName: &HStringArg, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MovePackageToVolumeAsync)(self, packageFullName.get(), deploymentOptions, targetVolume as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn remove_package_volume_async(&mut self, volume: &PackageVolume) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RemovePackageVolumeAsync)(self, volume as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_package_volume(&mut self, volume: &PackageVolume) -> Result<()> { + let hr = ((*self.lpVtbl).SetDefaultPackageVolume)(self, volume as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_package_status(&mut self, packageFullName: &HStringArg, status: PackageStatus) -> Result<()> { + let hr = ((*self.lpVtbl).SetPackageStatus)(self, packageFullName.get(), status); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_package_volume_offline_async(&mut self, packageVolume: &PackageVolume) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetPackageVolumeOfflineAsync)(self, packageVolume as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_package_volume_online_async(&mut self, packageVolume: &PackageVolume) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetPackageVolumeOnlineAsync)(self, packageVolume as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stage_package_to_volume_async(&mut self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StagePackageToVolumeAsync)(self, packageUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, deploymentOptions, targetVolume as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stage_user_data_with_options_async(&mut self, packageFullName: &HStringArg, deploymentOptions: DeploymentOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StageUserDataWithOptionsAsync)(self, packageFullName.get(), deploymentOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PackageVolume: IPackageVolume} + DEFINE_IID!(IID_IPackageManager4, 1014077795, 47798, 18111, 143, 247, 218, 71, 25, 35, 10, 230); + RT_INTERFACE!{interface IPackageManager4(IPackageManager4Vtbl): IInspectable(IInspectableVtbl) [IID_IPackageManager4] { + fn GetPackageVolumesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IPackageManager4 { + #[inline] pub unsafe fn get_package_volumes_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPackageVolumesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPackageVolume, 3475403459, 6720, 17488, 151, 57, 42, 206, 46, 137, 136, 83); + RT_INTERFACE!{interface IPackageVolume(IPackageVolumeVtbl): IInspectable(IInspectableVtbl) [IID_IPackageVolume] { + fn get_IsOffline(&mut self, out: *mut bool) -> HRESULT, + fn get_IsSystemVolume(&mut self, out: *mut bool) -> HRESULT, + fn get_MountPoint(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PackageStorePath(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SupportsHardLinks(&mut self, out: *mut bool) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackages(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByNamePublisher(&mut self, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByPackageFamilyName(&mut self, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesWithPackageTypes(&mut self, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByNamePublisherWithPackagesTypes(&mut self, packageTypes: PackageTypes, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByPackageFamilyNameWithPackageTypes(&mut self, packageTypes: PackageTypes, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackageByPackageFullName(&mut self, packageFullName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityId(&mut self, userSecurityId: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisher(&mut self, userSecurityId: HSTRING, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyName(&mut self, userSecurityId: HSTRING, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityIdWithPackageTypes(&mut self, userSecurityId: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(&mut self, userSecurityId: HSTRING, packageTypes: PackageTypes, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyNameWithPackagesTypes(&mut self, userSecurityId: HSTRING, packageTypes: PackageTypes, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindPackageByUserSecurityIdPackageFullName(&mut self, userSecurityId: HSTRING, packageFullName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IPackageVolume { + #[inline] pub unsafe fn get_is_offline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsOffline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_system_volume(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSystemVolume)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_mount_point(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MountPoint)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_package_store_path(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PackageStorePath)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supports_hard_links(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportsHardLinks)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_name_publisher(&mut self, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByNamePublisher)(self, packageName.get(), packagePublisher.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_package_family_name(&mut self, packageFamilyName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByPackageFamilyName)(self, packageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_with_package_types(&mut self, packageTypes: PackageTypes) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesWithPackageTypes)(self, packageTypes, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_name_publisher_with_packages_types(&mut self, packageTypes: PackageTypes, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByNamePublisherWithPackagesTypes)(self, packageTypes, packageName.get(), packagePublisher.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_package_family_name_with_package_types(&mut self, packageTypes: PackageTypes, packageFamilyName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByPackageFamilyNameWithPackageTypes)(self, packageTypes, packageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_package_by_package_full_name(&mut self, packageFullName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackageByPackageFullName)(self, packageFullName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id(&mut self, userSecurityId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityId)(self, userSecurityId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id_name_publisher(&mut self, userSecurityId: &HStringArg, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdNamePublisher)(self, userSecurityId.get(), packageName.get(), packagePublisher.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id_package_family_name(&mut self, userSecurityId: &HStringArg, packageFamilyName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdPackageFamilyName)(self, userSecurityId.get(), packageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id_with_package_types(&mut self, userSecurityId: &HStringArg, packageTypes: PackageTypes) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdWithPackageTypes)(self, userSecurityId.get(), packageTypes, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id_name_publisher_with_package_types(&mut self, userSecurityId: &HStringArg, packageTypes: PackageTypes, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdNamePublisherWithPackageTypes)(self, userSecurityId.get(), packageTypes, packageName.get(), packagePublisher.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_packages_by_user_security_id_package_family_name_with_packages_types(&mut self, userSecurityId: &HStringArg, packageTypes: PackageTypes, packageFamilyName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdPackageFamilyNameWithPackagesTypes)(self, userSecurityId.get(), packageTypes, packageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_package_by_user_security_id_package_full_name(&mut self, userSecurityId: &HStringArg, packageFullName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindPackageByUserSecurityIdPackageFullName)(self, userSecurityId.get(), packageFullName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPackageVolume2, 1185664814, 40404, 18338, 171, 140, 198, 64, 131, 73, 188, 216); + RT_INTERFACE!{interface IPackageVolume2(IPackageVolume2Vtbl): IInspectable(IInspectableVtbl) [IID_IPackageVolume2] { + fn get_IsFullTrustPackageSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsAppxInstallSupported(&mut self, out: *mut bool) -> HRESULT, + fn GetAvailableSpaceAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPackageVolume2 { + #[inline] pub unsafe fn get_is_full_trust_package_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFullTrustPackageSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_appx_install_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsAppxInstallSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_available_space_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAvailableSpaceAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PackageManager: IPackageManager} +pub mod preview { // Windows.Management.Deployment.Preview +use ::prelude::*; + RT_STRUCT! { struct DeploymentPreviewContract { + + }} + DEFINE_IID!(IID_IInstalledClassicAppInfo, 175979939, 26064, 16518, 128, 214, 6, 16, 215, 96, 32, 125); + RT_INTERFACE!{interface IInstalledClassicAppInfo(IInstalledClassicAppInfoVtbl): IInspectable(IInspectableVtbl) [IID_IInstalledClassicAppInfo] { + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayVersion(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IInstalledClassicAppInfo { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_version(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayVersion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InstalledClassicAppInfo: IInstalledClassicAppInfo} + DEFINE_IID!(IID_IClassicAppManagerStatics, 3808089704, 34860, 20275, 176, 53, 13, 247, 185, 13, 103, 230); + RT_INTERFACE!{static interface IClassicAppManagerStatics(IClassicAppManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IClassicAppManagerStatics] { + fn FindInstalledApp(&mut self, appUninstallKey: HSTRING, out: *mut *mut InstalledClassicAppInfo) -> HRESULT + }} + impl IClassicAppManagerStatics { + #[inline] pub unsafe fn find_installed_app(&mut self, appUninstallKey: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindInstalledApp)(self, appUninstallKey.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IClassicAppManagerStatics [CLSID_ClassicAppManager]} + DEFINE_CLSID!(CLSID_ClassicAppManager = &[87,105,110,100,111,119,115,46,77,97,110,97,103,101,109,101,110,116,46,68,101,112,108,111,121,109,101,110,116,46,80,114,101,118,105,101,119,46,67,108,97,115,115,105,99,65,112,112,77,97,110,97,103,101,114,0]); +} // Windows.Management.Deployment.Preview +} // Windows.Management.Deployment +pub mod core { // Windows.Management.Core +use ::prelude::*; + DEFINE_IID!(IID_IApplicationDataManagerStatics, 504914659, 27022, 18849, 151, 82, 222, 233, 73, 37, 185, 179); + RT_INTERFACE!{static interface IApplicationDataManagerStatics(IApplicationDataManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationDataManagerStatics] { + #[cfg(feature="windows.storage")] fn CreateForPackageFamily(&mut self, packageFamilyName: HSTRING, out: *mut *mut super::super::storage::ApplicationData) -> HRESULT + }} + impl IApplicationDataManagerStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_for_package_family(&mut self, packageFamilyName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateForPackageFamily)(self, packageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationDataManager, 1959855154, 11929, 16384, 154, 58, 100, 48, 126, 133, 129, 41); + RT_INTERFACE!{interface IApplicationDataManager(IApplicationDataManagerVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationDataManager] { + + }} + RT_CLASS!{class ApplicationDataManager: IApplicationDataManager} + RT_ACTIVATABLE!{IApplicationDataManagerStatics [CLSID_ApplicationDataManager]} + DEFINE_CLSID!(CLSID_ApplicationDataManager = &[87,105,110,100,111,119,115,46,77,97,110,97,103,101,109,101,110,116,46,67,111,114,101,46,65,112,112,108,105,99,97,116,105,111,110,68,97,116,97,77,97,110,97,103,101,114,0]); +} // Windows.Management.Core +pub mod workplace { // Windows.Management.Workplace +use ::prelude::*; + DEFINE_IID!(IID_IMdmAllowPolicyStatics, 3281455591, 29724, 16882, 164, 182, 49, 76, 49, 80, 37, 134); + RT_INTERFACE!{static interface IMdmAllowPolicyStatics(IMdmAllowPolicyStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMdmAllowPolicyStatics] { + fn IsBrowserAllowed(&mut self, out: *mut bool) -> HRESULT, + fn IsCameraAllowed(&mut self, out: *mut bool) -> HRESULT, + fn IsMicrosoftAccountAllowed(&mut self, out: *mut bool) -> HRESULT, + fn IsStoreAllowed(&mut self, out: *mut bool) -> HRESULT + }} + impl IMdmAllowPolicyStatics { + #[inline] pub unsafe fn is_browser_allowed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsBrowserAllowed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_camera_allowed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsCameraAllowed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_microsoft_account_allowed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsMicrosoftAccountAllowed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_store_allowed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsStoreAllowed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum MessagingSyncPolicy: i32 { + Disallowed (MessagingSyncPolicy_Disallowed) = 0, Allowed (MessagingSyncPolicy_Allowed) = 1, Required (MessagingSyncPolicy_Required) = 2, + }} + DEFINE_IID!(IID_IMdmPolicyStatics2, 3382474022, 980, 18937, 169, 147, 67, 239, 204, 210, 101, 196); + RT_INTERFACE!{static interface IMdmPolicyStatics2(IMdmPolicyStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMdmPolicyStatics2] { + fn GetMessagingSyncPolicy(&mut self, out: *mut MessagingSyncPolicy) -> HRESULT + }} + impl IMdmPolicyStatics2 { + #[inline] pub unsafe fn get_messaging_sync_policy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetMessagingSyncPolicy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IMdmAllowPolicyStatics [CLSID_MdmPolicy]} + RT_ACTIVATABLE!{IMdmPolicyStatics2 [CLSID_MdmPolicy]} + DEFINE_CLSID!(CLSID_MdmPolicy = &[87,105,110,100,111,119,115,46,77,97,110,97,103,101,109,101,110,116,46,87,111,114,107,112,108,97,99,101,46,77,100,109,80,111,108,105,99,121,0]); + RT_STRUCT! { struct WorkplaceSettingsContract { + + }} + DEFINE_IID!(IID_IWorkplaceSettingsStatics, 3831984125, 11666, 19464, 186, 212, 246, 89, 11, 84, 166, 211); + RT_INTERFACE!{static interface IWorkplaceSettingsStatics(IWorkplaceSettingsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWorkplaceSettingsStatics] { + fn get_IsMicrosoftAccountOptional(&mut self, out: *mut bool) -> HRESULT + }} + impl IWorkplaceSettingsStatics { + #[inline] pub unsafe fn get_is_microsoft_account_optional(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsMicrosoftAccountOptional)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IWorkplaceSettingsStatics [CLSID_WorkplaceSettings]} + DEFINE_CLSID!(CLSID_WorkplaceSettings = &[87,105,110,100,111,119,115,46,77,97,110,97,103,101,109,101,110,116,46,87,111,114,107,112,108,97,99,101,46,87,111,114,107,112,108,97,99,101,83,101,116,116,105,110,103,115,0]); +} // Windows.Management.Workplace +pub mod orchestration { // Windows.Management.Orchestration +use ::prelude::*; + RT_STRUCT! { struct OrchestrationContract { + + }} + DEFINE_IID!(IID_ICurrentAppOrchestrationStatics, 249772024, 25541, 18134, 172, 97, 80, 147, 228, 175, 109, 179); + RT_INTERFACE!{static interface ICurrentAppOrchestrationStatics(ICurrentAppOrchestrationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentAppOrchestrationStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut CurrentAppOrchestration) -> HRESULT + }} + impl ICurrentAppOrchestrationStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CurrentAppOrchestration: ICurrentAppOrchestration} + RT_ACTIVATABLE!{ICurrentAppOrchestrationStatics [CLSID_CurrentAppOrchestration]} + DEFINE_CLSID!(CLSID_CurrentAppOrchestration = &[87,105,110,100,111,119,115,46,77,97,110,97,103,101,109,101,110,116,46,79,114,99,104,101,115,116,114,97,116,105,111,110,46,67,117,114,114,101,110,116,65,112,112,79,114,99,104,101,115,116,114,97,116,105,111,110,0]); + DEFINE_IID!(IID_ICurrentAppOrchestration, 3488913705, 58194, 20468, 191, 70, 120, 97, 151, 169, 145, 18); + RT_INTERFACE!{interface ICurrentAppOrchestration(ICurrentAppOrchestrationVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentAppOrchestration] { + fn StartSingleAppMode(&mut self, out: *mut *mut SingleAppModeContext) -> HRESULT + }} + impl ICurrentAppOrchestration { + #[inline] pub unsafe fn start_single_app_mode(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartSingleAppMode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SingleAppModeContext: ISingleAppModeContext} + DEFINE_IID!(IID_ISingleAppModeContext, 2272499513, 26454, 18827, 143, 27, 62, 212, 181, 157, 124, 158); + RT_INTERFACE!{interface ISingleAppModeContext(ISingleAppModeContextVtbl): IInspectable(IInspectableVtbl) [IID_ISingleAppModeContext] { + + }} +} // Windows.Management.Orchestration +} // Windows.Management +#[cfg(feature="windows.media")] +pub mod media { // Windows.Media +use ::prelude::*; + DEFINE_IID!(IID_IMediaProcessingTriggerDetails, 3951387820, 41809, 20302, 180, 240, 155, 242, 64, 137, 147, 219); + RT_INTERFACE!{interface IMediaProcessingTriggerDetails(IMediaProcessingTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaProcessingTriggerDetails] { + fn get_Arguments(&mut self, out: *mut *mut super::foundation::collections::ValueSet) -> HRESULT + }} + impl IMediaProcessingTriggerDetails { + #[inline] pub unsafe fn get_arguments(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Arguments)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaProcessingTriggerDetails: IMediaProcessingTriggerDetails} + RT_CLASS!{class VideoFrame: IVideoFrame [IVideoFrameFactory] [CLSID_VideoFrame]} + DEFINE_CLSID!(CLSID_VideoFrame = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,86,105,100,101,111,70,114,97,109,101,0]); + DEFINE_IID!(IID_IVideoFrameFactory, 21720425, 8744, 19602, 146, 255, 80, 195, 128, 211, 231, 118); + RT_INTERFACE!{static interface IVideoFrameFactory(IVideoFrameFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVideoFrameFactory] { + #[cfg(feature="windows.graphics")] fn Create(&mut self, format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32, out: *mut *mut VideoFrame) -> HRESULT, + #[cfg(feature="windows.graphics")] fn CreateWithAlpha(&mut self, format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32, alpha: super::graphics::imaging::BitmapAlphaMode, out: *mut *mut VideoFrame) -> HRESULT + }} + impl IVideoFrameFactory { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn create(&mut self, format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, format, width, height, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn create_with_alpha(&mut self, format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32, alpha: super::graphics::imaging::BitmapAlphaMode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithAlpha)(self, format, width, height, alpha, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum AudioBufferAccessMode: i32 { + Read (AudioBufferAccessMode_Read) = 0, ReadWrite (AudioBufferAccessMode_ReadWrite) = 1, Write (AudioBufferAccessMode_Write) = 2, + }} + RT_CLASS!{class AudioBuffer: IAudioBuffer} + DEFINE_IID!(IID_IAudioFrameFactory, 2443774686, 9250, 16550, 185, 173, 48, 208, 36, 4, 49, 125); + RT_INTERFACE!{static interface IAudioFrameFactory(IAudioFrameFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAudioFrameFactory] { + fn Create(&mut self, capacity: u32, out: *mut *mut AudioFrame) -> HRESULT + }} + impl IAudioFrameFactory { + #[inline] pub unsafe fn create(&mut self, capacity: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, capacity, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioFrame: IAudioFrame [IAudioFrameFactory] [CLSID_AudioFrame]} + DEFINE_CLSID!(CLSID_AudioFrame = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,117,100,105,111,70,114,97,109,101,0]); + DEFINE_IID!(IID_IMediaFrame, 3216322444, 22851, 18392, 142, 16, 5, 48, 138, 165, 251, 208); + RT_INTERFACE!{interface IMediaFrame(IMediaFrameVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrame] { + fn get_Type(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsReadOnly(&mut self, out: *mut bool) -> HRESULT, + fn put_RelativeTime(&mut self, value: *mut super::foundation::IReference) -> HRESULT, + fn get_RelativeTime(&mut self, out: *mut *mut super::foundation::IReference) -> HRESULT, + fn put_SystemRelativeTime(&mut self, value: *mut super::foundation::IReference) -> HRESULT, + fn get_SystemRelativeTime(&mut self, out: *mut *mut super::foundation::IReference) -> HRESULT, + fn put_Duration(&mut self, value: *mut super::foundation::IReference) -> HRESULT, + fn get_Duration(&mut self, out: *mut *mut super::foundation::IReference) -> HRESULT, + fn put_IsDiscontinuous(&mut self, value: bool) -> HRESULT, + fn get_IsDiscontinuous(&mut self, out: *mut bool) -> HRESULT, + fn get_ExtendedProperties(&mut self, out: *mut *mut super::foundation::collections::IPropertySet) -> HRESULT + }} + impl IMediaFrame { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_read_only(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsReadOnly)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_relative_time(&mut self, value: &super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_RelativeTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_relative_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RelativeTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_system_relative_time(&mut self, value: &super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_SystemRelativeTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_relative_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SystemRelativeTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_duration(&mut self, value: &super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Duration)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_discontinuous(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDiscontinuous)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_discontinuous(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDiscontinuous)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoFrame, 213935653, 37116, 19602, 189, 149, 125, 237, 33, 129, 157, 28); + RT_INTERFACE!{interface IVideoFrame(IVideoFrameVtbl): IInspectable(IInspectableVtbl) [IID_IVideoFrame] { + #[cfg(feature="windows.graphics")] fn get_SoftwareBitmap(&mut self, out: *mut *mut super::graphics::imaging::SoftwareBitmap) -> HRESULT, + fn CopyToAsync(&mut self, frame: *mut VideoFrame, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_Direct3DSurface(&mut self, out: *mut *mut super::graphics::directx::direct3d11::IDirect3DSurface) -> HRESULT + }} + impl IVideoFrame { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_software_bitmap(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SoftwareBitmap)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn copy_to_async(&mut self, frame: &VideoFrame) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyToAsync)(self, frame as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_direct3_dsurface(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Direct3DSurface)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioFrame, 3815424772, 43698, 17015, 158, 208, 67, 206, 223, 142, 41, 198); + RT_INTERFACE!{interface IAudioFrame(IAudioFrameVtbl): IInspectable(IInspectableVtbl) [IID_IAudioFrame] { + fn LockBuffer(&mut self, mode: AudioBufferAccessMode, out: *mut *mut AudioBuffer) -> HRESULT + }} + impl IAudioFrame { + #[inline] pub unsafe fn lock_buffer(&mut self, mode: AudioBufferAccessMode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LockBuffer)(self, mode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioBuffer, 890722343, 29259, 19562, 177, 48, 246, 83, 127, 154, 224, 208); + RT_INTERFACE!{interface IAudioBuffer(IAudioBufferVtbl): IInspectable(IInspectableVtbl) [IID_IAudioBuffer] { + fn get_Capacity(&mut self, out: *mut u32) -> HRESULT, + fn get_Length(&mut self, out: *mut u32) -> HRESULT, + fn put_Length(&mut self, value: u32) -> HRESULT + }} + impl IAudioBuffer { + #[inline] pub unsafe fn get_capacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Capacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_length(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Length)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum SoundLevel: i32 { + Muted (SoundLevel_Muted) = 0, Low (SoundLevel_Low) = 1, Full (SoundLevel_Full) = 2, + }} + DEFINE_IID!(IID_IMediaMarker, 402906872, 56485, 19311, 156, 32, 227, 211, 192, 100, 54, 37); + RT_INTERFACE!{interface IMediaMarker(IMediaMarkerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaMarker] { + fn get_Time(&mut self, out: *mut super::foundation::TimeSpan) -> HRESULT, + fn get_MediaMarkerType(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMediaMarker { + #[inline] pub unsafe fn get_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Time)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_marker_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaMarkerType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaMarkers, 2951393673, 63709, 18030, 170, 16, 146, 11, 82, 53, 63, 223); + RT_INTERFACE!{interface IMediaMarkers(IMediaMarkersVtbl): IInspectable(IInspectableVtbl) [IID_IMediaMarkers] { + fn get_Markers(&mut self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMediaMarkers { + #[inline] pub unsafe fn get_markers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Markers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaMarkerTypesStatics, 3139010624, 18479, 18243, 136, 50, 69, 133, 56, 33, 236, 224); + RT_INTERFACE!{static interface IMediaMarkerTypesStatics(IMediaMarkerTypesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaMarkerTypesStatics] { + fn get_Bookmark(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMediaMarkerTypesStatics { + #[inline] pub unsafe fn get_bookmark(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Bookmark)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IMediaMarkerTypesStatics [CLSID_MediaMarkerTypes]} + DEFINE_CLSID!(CLSID_MediaMarkerTypes = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,77,101,100,105,97,77,97,114,107,101,114,84,121,112,101,115,0]); + RT_ENUM! { enum MediaPlaybackType: i32 { + Unknown (MediaPlaybackType_Unknown) = 0, Music (MediaPlaybackType_Music) = 1, Video (MediaPlaybackType_Video) = 2, Image (MediaPlaybackType_Image) = 3, + }} + RT_ENUM! { enum MediaPlaybackAutoRepeatMode: i32 { + None (MediaPlaybackAutoRepeatMode_None) = 0, Track (MediaPlaybackAutoRepeatMode_Track) = 1, List (MediaPlaybackAutoRepeatMode_List) = 2, + }} + DEFINE_IID!(IID_ISystemMediaTransportControlsTimelineProperties, 1361391978, 50082, 18267, 133, 7, 147, 83, 77, 200, 143, 21); + RT_INTERFACE!{interface ISystemMediaTransportControlsTimelineProperties(ISystemMediaTransportControlsTimelinePropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISystemMediaTransportControlsTimelineProperties] { + fn get_StartTime(&mut self, out: *mut super::foundation::TimeSpan) -> HRESULT, + fn put_StartTime(&mut self, value: super::foundation::TimeSpan) -> HRESULT, + fn get_EndTime(&mut self, out: *mut super::foundation::TimeSpan) -> HRESULT, + fn put_EndTime(&mut self, value: super::foundation::TimeSpan) -> HRESULT, + fn get_MinSeekTime(&mut self, out: *mut super::foundation::TimeSpan) -> HRESULT, + fn put_MinSeekTime(&mut self, value: super::foundation::TimeSpan) -> HRESULT, + fn get_MaxSeekTime(&mut self, out: *mut super::foundation::TimeSpan) -> HRESULT, + fn put_MaxSeekTime(&mut self, value: super::foundation::TimeSpan) -> HRESULT, + fn get_Position(&mut self, out: *mut super::foundation::TimeSpan) -> HRESULT, + fn put_Position(&mut self, value: super::foundation::TimeSpan) -> HRESULT + }} + impl ISystemMediaTransportControlsTimelineProperties { + #[inline] pub unsafe fn get_start_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_start_time(&mut self, value: super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_StartTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_end_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_end_time(&mut self, value: super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_EndTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_seek_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinSeekTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_seek_time(&mut self, value: super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinSeekTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_seek_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxSeekTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_seek_time(&mut self, value: super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxSeekTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position(&mut self, value: super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Position)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SystemMediaTransportControlsTimelineProperties: ISystemMediaTransportControlsTimelineProperties} + DEFINE_IID!(IID_IMusicDisplayProperties, 1807682649, 53408, 19750, 146, 160, 249, 120, 225, 209, 142, 123); + RT_INTERFACE!{interface IMusicDisplayProperties(IMusicDisplayPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IMusicDisplayProperties] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_AlbumArtist(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AlbumArtist(&mut self, value: HSTRING) -> HRESULT, + fn get_Artist(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Artist(&mut self, value: HSTRING) -> HRESULT + }} + impl IMusicDisplayProperties { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_album_artist(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlbumArtist)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_album_artist(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AlbumArtist)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_artist(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Artist)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_artist(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Artist)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMusicDisplayProperties2, 3572834, 38867, 17593, 176, 15, 0, 138, 252, 239, 175, 24); + RT_INTERFACE!{interface IMusicDisplayProperties2(IMusicDisplayProperties2Vtbl): IInspectable(IInspectableVtbl) [IID_IMusicDisplayProperties2] { + fn get_AlbumTitle(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AlbumTitle(&mut self, value: HSTRING) -> HRESULT, + fn get_TrackNumber(&mut self, out: *mut u32) -> HRESULT, + fn put_TrackNumber(&mut self, value: u32) -> HRESULT, + fn get_Genres(&mut self, out: *mut *mut super::foundation::collections::IVector) -> HRESULT + }} + impl IMusicDisplayProperties2 { + #[inline] pub unsafe fn get_album_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlbumTitle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_album_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AlbumTitle)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_track_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrackNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_track_number(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TrackNumber)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_genres(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Genres)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMusicDisplayProperties3, 1303714497, 1665, 20108, 148, 1, 184, 21, 157, 158, 239, 199); + RT_INTERFACE!{interface IMusicDisplayProperties3(IMusicDisplayProperties3Vtbl): IInspectable(IInspectableVtbl) [IID_IMusicDisplayProperties3] { + fn get_AlbumTrackCount(&mut self, out: *mut u32) -> HRESULT, + fn put_AlbumTrackCount(&mut self, value: u32) -> HRESULT + }} + impl IMusicDisplayProperties3 { + #[inline] pub unsafe fn get_album_track_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlbumTrackCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_album_track_count(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_AlbumTrackCount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MusicDisplayProperties: IMusicDisplayProperties} + DEFINE_IID!(IID_IVideoDisplayProperties, 1443495345, 23853, 18546, 129, 112, 69, 222, 229, 188, 47, 92); + RT_INTERFACE!{interface IVideoDisplayProperties(IVideoDisplayPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IVideoDisplayProperties] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_Subtitle(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Subtitle(&mut self, value: HSTRING) -> HRESULT + }} + impl IVideoDisplayProperties { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_subtitle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subtitle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_subtitle(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Subtitle)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoDisplayProperties2, 3021005262, 43858, 16811, 164, 134, 204, 16, 250, 177, 82, 249); + RT_INTERFACE!{interface IVideoDisplayProperties2(IVideoDisplayProperties2Vtbl): IInspectable(IInspectableVtbl) [IID_IVideoDisplayProperties2] { + fn get_Genres(&mut self, out: *mut *mut super::foundation::collections::IVector) -> HRESULT + }} + impl IVideoDisplayProperties2 { + #[inline] pub unsafe fn get_genres(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Genres)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VideoDisplayProperties: IVideoDisplayProperties} + DEFINE_IID!(IID_IImageDisplayProperties, 3440101359, 21735, 16671, 153, 51, 240, 233, 139, 10, 150, 210); + RT_INTERFACE!{interface IImageDisplayProperties(IImageDisplayPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IImageDisplayProperties] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_Subtitle(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Subtitle(&mut self, value: HSTRING) -> HRESULT + }} + impl IImageDisplayProperties { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_subtitle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subtitle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_subtitle(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Subtitle)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ImageDisplayProperties: IImageDisplayProperties} + DEFINE_IID!(IID_ISystemMediaTransportControlsDisplayUpdater, 2327561534, 64085, 20175, 173, 142, 201, 132, 229, 221, 21, 80); + RT_INTERFACE!{interface ISystemMediaTransportControlsDisplayUpdater(ISystemMediaTransportControlsDisplayUpdaterVtbl): IInspectable(IInspectableVtbl) [IID_ISystemMediaTransportControlsDisplayUpdater] { + fn get_Type(&mut self, out: *mut MediaPlaybackType) -> HRESULT, + fn put_Type(&mut self, value: MediaPlaybackType) -> HRESULT, + fn get_AppMediaId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AppMediaId(&mut self, value: HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut super::storage::streams::RandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Thumbnail(&mut self, value: *mut super::storage::streams::RandomAccessStreamReference) -> HRESULT, + fn get_MusicProperties(&mut self, out: *mut *mut MusicDisplayProperties) -> HRESULT, + fn get_VideoProperties(&mut self, out: *mut *mut VideoDisplayProperties) -> HRESULT, + fn get_ImageProperties(&mut self, out: *mut *mut ImageDisplayProperties) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CopyFromFileAsync(&mut self, type_: MediaPlaybackType, source: *mut super::storage::StorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn ClearAll(&mut self) -> HRESULT, + fn Update(&mut self) -> HRESULT + }} + impl ISystemMediaTransportControlsDisplayUpdater { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_type(&mut self, value: MediaPlaybackType) -> Result<()> { + let hr = ((*self.lpVtbl).put_Type)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_media_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppMediaId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_app_media_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppMediaId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_thumbnail(&mut self, value: &super::storage::streams::RandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbnail)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_music_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MusicProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_image_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ImageProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn copy_from_file_async(&mut self, type_: MediaPlaybackType, source: &super::storage::StorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyFromFileAsync)(self, type_, source as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ClearAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn update(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Update)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SystemMediaTransportControlsDisplayUpdater: ISystemMediaTransportControlsDisplayUpdater} + RT_ENUM! { enum MediaPlaybackStatus: i32 { + Closed (MediaPlaybackStatus_Closed) = 0, Changing (MediaPlaybackStatus_Changing) = 1, Stopped (MediaPlaybackStatus_Stopped) = 2, Playing (MediaPlaybackStatus_Playing) = 3, Paused (MediaPlaybackStatus_Paused) = 4, + }} + RT_ENUM! { enum SystemMediaTransportControlsButton: i32 { + Play (SystemMediaTransportControlsButton_Play) = 0, Pause (SystemMediaTransportControlsButton_Pause) = 1, Stop (SystemMediaTransportControlsButton_Stop) = 2, Record (SystemMediaTransportControlsButton_Record) = 3, FastForward (SystemMediaTransportControlsButton_FastForward) = 4, Rewind (SystemMediaTransportControlsButton_Rewind) = 5, Next (SystemMediaTransportControlsButton_Next) = 6, Previous (SystemMediaTransportControlsButton_Previous) = 7, ChannelUp (SystemMediaTransportControlsButton_ChannelUp) = 8, ChannelDown (SystemMediaTransportControlsButton_ChannelDown) = 9, + }} + RT_ENUM! { enum SystemMediaTransportControlsProperty: i32 { + SoundLevel (SystemMediaTransportControlsProperty_SoundLevel) = 0, + }} + DEFINE_IID!(IID_ISystemMediaTransportControlsButtonPressedEventArgs, 3086250262, 42351, 19912, 158, 17, 146, 3, 31, 74, 135, 194); + RT_INTERFACE!{interface ISystemMediaTransportControlsButtonPressedEventArgs(ISystemMediaTransportControlsButtonPressedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISystemMediaTransportControlsButtonPressedEventArgs] { + fn get_Button(&mut self, out: *mut SystemMediaTransportControlsButton) -> HRESULT + }} + impl ISystemMediaTransportControlsButtonPressedEventArgs { + #[inline] pub unsafe fn get_button(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Button)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SystemMediaTransportControlsButtonPressedEventArgs: ISystemMediaTransportControlsButtonPressedEventArgs} + DEFINE_IID!(IID_ISystemMediaTransportControlsPropertyChangedEventArgs, 3502901558, 13211, 19635, 142, 235, 115, 118, 7, 245, 110, 8); + RT_INTERFACE!{interface ISystemMediaTransportControlsPropertyChangedEventArgs(ISystemMediaTransportControlsPropertyChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISystemMediaTransportControlsPropertyChangedEventArgs] { + fn get_Property(&mut self, out: *mut SystemMediaTransportControlsProperty) -> HRESULT + }} + impl ISystemMediaTransportControlsPropertyChangedEventArgs { + #[inline] pub unsafe fn get_property(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Property)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SystemMediaTransportControlsPropertyChangedEventArgs: ISystemMediaTransportControlsPropertyChangedEventArgs} + DEFINE_IID!(IID_IPlaybackPositionChangeRequestedEventArgs, 3024699272, 60200, 18785, 156, 20, 51, 94, 68, 243, 225, 37); + RT_INTERFACE!{interface IPlaybackPositionChangeRequestedEventArgs(IPlaybackPositionChangeRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPlaybackPositionChangeRequestedEventArgs] { + fn get_RequestedPlaybackPosition(&mut self, out: *mut super::foundation::TimeSpan) -> HRESULT + }} + impl IPlaybackPositionChangeRequestedEventArgs { + #[inline] pub unsafe fn get_requested_playback_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestedPlaybackPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PlaybackPositionChangeRequestedEventArgs: IPlaybackPositionChangeRequestedEventArgs} + DEFINE_IID!(IID_IPlaybackRateChangeRequestedEventArgs, 753058847, 15574, 20343, 155, 167, 235, 39, 194, 106, 33, 64); + RT_INTERFACE!{interface IPlaybackRateChangeRequestedEventArgs(IPlaybackRateChangeRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPlaybackRateChangeRequestedEventArgs] { + fn get_RequestedPlaybackRate(&mut self, out: *mut f64) -> HRESULT + }} + impl IPlaybackRateChangeRequestedEventArgs { + #[inline] pub unsafe fn get_requested_playback_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestedPlaybackRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PlaybackRateChangeRequestedEventArgs: IPlaybackRateChangeRequestedEventArgs} + DEFINE_IID!(IID_IShuffleEnabledChangeRequestedEventArgs, 1236636670, 20432, 18022, 163, 20, 192, 224, 25, 64, 211, 2); + RT_INTERFACE!{interface IShuffleEnabledChangeRequestedEventArgs(IShuffleEnabledChangeRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IShuffleEnabledChangeRequestedEventArgs] { + fn get_RequestedShuffleEnabled(&mut self, out: *mut bool) -> HRESULT + }} + impl IShuffleEnabledChangeRequestedEventArgs { + #[inline] pub unsafe fn get_requested_shuffle_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestedShuffleEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class ShuffleEnabledChangeRequestedEventArgs: IShuffleEnabledChangeRequestedEventArgs} + DEFINE_IID!(IID_IAutoRepeatModeChangeRequestedEventArgs, 3927146234, 55378, 17294, 136, 43, 201, 144, 16, 154, 120, 244); + RT_INTERFACE!{interface IAutoRepeatModeChangeRequestedEventArgs(IAutoRepeatModeChangeRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAutoRepeatModeChangeRequestedEventArgs] { + fn get_RequestedAutoRepeatMode(&mut self, out: *mut MediaPlaybackAutoRepeatMode) -> HRESULT + }} + impl IAutoRepeatModeChangeRequestedEventArgs { + #[inline] pub unsafe fn get_requested_auto_repeat_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestedAutoRepeatMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class AutoRepeatModeChangeRequestedEventArgs: IAutoRepeatModeChangeRequestedEventArgs} + DEFINE_IID!(IID_ISystemMediaTransportControls, 2583314420, 5954, 17062, 144, 46, 8, 125, 65, 249, 101, 236); + RT_INTERFACE!{interface ISystemMediaTransportControls(ISystemMediaTransportControlsVtbl): IInspectable(IInspectableVtbl) [IID_ISystemMediaTransportControls] { + fn get_PlaybackStatus(&mut self, out: *mut MediaPlaybackStatus) -> HRESULT, + fn put_PlaybackStatus(&mut self, value: MediaPlaybackStatus) -> HRESULT, + fn get_DisplayUpdater(&mut self, out: *mut *mut SystemMediaTransportControlsDisplayUpdater) -> HRESULT, + fn get_SoundLevel(&mut self, out: *mut SoundLevel) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsPlayEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPlayEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsStopEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsStopEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsPauseEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPauseEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsRecordEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsRecordEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsFastForwardEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsFastForwardEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsRewindEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsRewindEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsPreviousEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPreviousEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsNextEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsNextEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsChannelUpEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsChannelUpEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsChannelDownEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsChannelDownEnabled(&mut self, value: bool) -> HRESULT, + fn add_ButtonPressed(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ButtonPressed(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PropertyChanged(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PropertyChanged(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISystemMediaTransportControls { + #[inline] pub unsafe fn get_playback_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PlaybackStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_playback_status(&mut self, value: MediaPlaybackStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlaybackStatus)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_updater(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayUpdater)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sound_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SoundLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_play_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPlayEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_play_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPlayEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_stop_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStopEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_stop_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsStopEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_pause_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPauseEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_pause_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPauseEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_record_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsRecordEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_record_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsRecordEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_fast_forward_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFastForwardEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_fast_forward_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsFastForwardEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_rewind_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsRewindEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_rewind_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsRewindEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_previous_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPreviousEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_previous_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPreviousEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_next_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsNextEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_next_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsNextEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_channel_up_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsChannelUpEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_channel_up_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsChannelUpEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_channel_down_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsChannelDownEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_channel_down_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsChannelDownEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_button_pressed(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ButtonPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_button_pressed(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ButtonPressed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_property_changed(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PropertyChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_property_changed(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PropertyChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SystemMediaTransportControls: ISystemMediaTransportControls} + RT_ACTIVATABLE!{ISystemMediaTransportControlsStatics [CLSID_SystemMediaTransportControls]} + DEFINE_CLSID!(CLSID_SystemMediaTransportControls = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,83,121,115,116,101,109,77,101,100,105,97,84,114,97,110,115,112,111,114,116,67,111,110,116,114,111,108,115,0]); + DEFINE_IID!(IID_ISystemMediaTransportControls2, 3935884022, 32572, 19186, 165, 134, 114, 136, 152, 8, 239, 177); + RT_INTERFACE!{interface ISystemMediaTransportControls2(ISystemMediaTransportControls2Vtbl): IInspectable(IInspectableVtbl) [IID_ISystemMediaTransportControls2] { + fn get_AutoRepeatMode(&mut self, out: *mut MediaPlaybackAutoRepeatMode) -> HRESULT, + fn put_AutoRepeatMode(&mut self, value: MediaPlaybackAutoRepeatMode) -> HRESULT, + fn get_ShuffleEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_ShuffleEnabled(&mut self, value: bool) -> HRESULT, + fn get_PlaybackRate(&mut self, out: *mut f64) -> HRESULT, + fn put_PlaybackRate(&mut self, value: f64) -> HRESULT, + fn UpdateTimelineProperties(&mut self, timelineProperties: *mut SystemMediaTransportControlsTimelineProperties) -> HRESULT, + fn add_PlaybackPositionChangeRequested(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackPositionChangeRequested(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PlaybackRateChangeRequested(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackRateChangeRequested(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ShuffleEnabledChangeRequested(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ShuffleEnabledChangeRequested(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AutoRepeatModeChangeRequested(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AutoRepeatModeChangeRequested(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISystemMediaTransportControls2 { + #[inline] pub unsafe fn get_auto_repeat_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoRepeatMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_repeat_mode(&mut self, value: MediaPlaybackAutoRepeatMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoRepeatMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_shuffle_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShuffleEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_shuffle_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShuffleEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PlaybackRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_playback_rate(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlaybackRate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn update_timeline_properties(&mut self, timelineProperties: &SystemMediaTransportControlsTimelineProperties) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateTimelineProperties)(self, timelineProperties as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_playback_position_change_requested(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PlaybackPositionChangeRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_playback_position_change_requested(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PlaybackPositionChangeRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_playback_rate_change_requested(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PlaybackRateChangeRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_playback_rate_change_requested(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PlaybackRateChangeRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_shuffle_enabled_change_requested(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ShuffleEnabledChangeRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_shuffle_enabled_change_requested(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ShuffleEnabledChangeRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_auto_repeat_mode_change_requested(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AutoRepeatModeChangeRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_auto_repeat_mode_change_requested(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AutoRepeatModeChangeRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISystemMediaTransportControlsStatics, 1136277514, 60580, 18482, 145, 171, 212, 21, 250, 228, 132, 198); + RT_INTERFACE!{static interface ISystemMediaTransportControlsStatics(ISystemMediaTransportControlsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISystemMediaTransportControlsStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut SystemMediaTransportControls) -> HRESULT + }} + impl ISystemMediaTransportControlsStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum AudioProcessing: i32 { + Default (AudioProcessing_Default) = 0, Raw (AudioProcessing_Raw) = 1, + }} + DEFINE_IID!(IID_IMediaExtension, 126963992, 17887, 17451, 138, 63, 247, 130, 106, 99, 112, 171); + RT_INTERFACE!{interface IMediaExtension(IMediaExtensionVtbl): IInspectable(IInspectableVtbl) [IID_IMediaExtension] { + fn SetProperties(&mut self, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT + }} + impl IMediaExtension { + #[inline] pub unsafe fn set_properties(&mut self, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + let hr = ((*self.lpVtbl).SetProperties)(self, configuration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaExtensionManager, 1243998965, 9261, 19963, 151, 244, 105, 183, 196, 37, 118, 255); + RT_INTERFACE!{interface IMediaExtensionManager(IMediaExtensionManagerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaExtensionManager] { + fn RegisterSchemeHandler(&mut self, activatableClassId: HSTRING, scheme: HSTRING) -> HRESULT, + fn RegisterSchemeHandlerWithSettings(&mut self, activatableClassId: HSTRING, scheme: HSTRING, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT, + fn RegisterByteStreamHandler(&mut self, activatableClassId: HSTRING, fileExtension: HSTRING, mimeType: HSTRING) -> HRESULT, + fn RegisterByteStreamHandlerWithSettings(&mut self, activatableClassId: HSTRING, fileExtension: HSTRING, mimeType: HSTRING, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT, + fn RegisterAudioDecoder(&mut self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid) -> HRESULT, + fn RegisterAudioDecoderWithSettings(&mut self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT, + fn RegisterAudioEncoder(&mut self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid) -> HRESULT, + fn RegisterAudioEncoderWithSettings(&mut self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT, + fn RegisterVideoDecoder(&mut self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid) -> HRESULT, + fn RegisterVideoDecoderWithSettings(&mut self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT, + fn RegisterVideoEncoder(&mut self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid) -> HRESULT, + fn RegisterVideoEncoderWithSettings(&mut self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT + }} + impl IMediaExtensionManager { + #[inline] pub unsafe fn register_scheme_handler(&mut self, activatableClassId: &HStringArg, scheme: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterSchemeHandler)(self, activatableClassId.get(), scheme.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_scheme_handler_with_settings(&mut self, activatableClassId: &HStringArg, scheme: &HStringArg, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterSchemeHandlerWithSettings)(self, activatableClassId.get(), scheme.get(), configuration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_byte_stream_handler(&mut self, activatableClassId: &HStringArg, fileExtension: &HStringArg, mimeType: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterByteStreamHandler)(self, activatableClassId.get(), fileExtension.get(), mimeType.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_byte_stream_handler_with_settings(&mut self, activatableClassId: &HStringArg, fileExtension: &HStringArg, mimeType: &HStringArg, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterByteStreamHandlerWithSettings)(self, activatableClassId.get(), fileExtension.get(), mimeType.get(), configuration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_audio_decoder(&mut self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterAudioDecoder)(self, activatableClassId.get(), inputSubtype, outputSubtype); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_audio_decoder_with_settings(&mut self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterAudioDecoderWithSettings)(self, activatableClassId.get(), inputSubtype, outputSubtype, configuration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_audio_encoder(&mut self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterAudioEncoder)(self, activatableClassId.get(), inputSubtype, outputSubtype); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_audio_encoder_with_settings(&mut self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterAudioEncoderWithSettings)(self, activatableClassId.get(), inputSubtype, outputSubtype, configuration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_video_decoder(&mut self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterVideoDecoder)(self, activatableClassId.get(), inputSubtype, outputSubtype); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_video_decoder_with_settings(&mut self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterVideoDecoderWithSettings)(self, activatableClassId.get(), inputSubtype, outputSubtype, configuration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_video_encoder(&mut self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterVideoEncoder)(self, activatableClassId.get(), inputSubtype, outputSubtype); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_video_encoder_with_settings(&mut self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterVideoEncoderWithSettings)(self, activatableClassId.get(), inputSubtype, outputSubtype, configuration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaExtensionManager: IMediaExtensionManager} + DEFINE_IID!(IID_IVideoEffectsStatics, 533571048, 47857, 17697, 152, 12, 59, 206, 187, 68, 207, 56); + RT_INTERFACE!{static interface IVideoEffectsStatics(IVideoEffectsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IVideoEffectsStatics] { + fn get_VideoStabilization(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IVideoEffectsStatics { + #[inline] pub unsafe fn get_video_stabilization(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoStabilization)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IVideoEffectsStatics [CLSID_VideoEffects]} + DEFINE_CLSID!(CLSID_VideoEffects = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,86,105,100,101,111,69,102,102,101,99,116,115,0]); + RT_ENUM! { enum MediaTimelineControllerState: i32 { + Paused (MediaTimelineControllerState_Paused) = 0, Running (MediaTimelineControllerState_Running) = 1, + }} + DEFINE_IID!(IID_IMediaTimelineController, 2396217843, 2936, 17248, 191, 113, 12, 132, 25, 153, 234, 27); + RT_INTERFACE!{interface IMediaTimelineController(IMediaTimelineControllerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaTimelineController] { + fn Start(&mut self) -> HRESULT, + fn Resume(&mut self) -> HRESULT, + fn Pause(&mut self) -> HRESULT, + fn get_Position(&mut self, out: *mut super::foundation::TimeSpan) -> HRESULT, + fn put_Position(&mut self, value: super::foundation::TimeSpan) -> HRESULT, + fn get_ClockRate(&mut self, out: *mut f64) -> HRESULT, + fn put_ClockRate(&mut self, value: f64) -> HRESULT, + fn get_State(&mut self, out: *mut MediaTimelineControllerState) -> HRESULT, + fn add_PositionChanged(&mut self, positionChangedEventHandler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PositionChanged(&mut self, eventCookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_StateChanged(&mut self, stateChangedEventHandler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&mut self, eventCookie: super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMediaTimelineController { + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn resume(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Resume)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn pause(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Pause)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position(&mut self, value: super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Position)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_clock_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ClockRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_clock_rate(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_ClockRate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_position_changed(&mut self, positionChangedEventHandler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PositionChanged)(self, positionChangedEventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_position_changed(&mut self, eventCookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PositionChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_state_changed(&mut self, stateChangedEventHandler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StateChanged)(self, stateChangedEventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_state_changed(&mut self, eventCookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StateChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaTimelineController: IMediaTimelineController} + RT_STRUCT! { struct MediaControlContract { + + }} + DEFINE_IID!(IID_IMediaControl, 2565995489, 31373, 17099, 182, 254, 143, 230, 152, 38, 79, 19); + RT_INTERFACE!{static interface IMediaControl(IMediaControlVtbl): IInspectable(IInspectableVtbl) [IID_IMediaControl] { + fn add_SoundLevelChanged(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SoundLevelChanged(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PlayPressed(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlayPressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PausePressed(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PausePressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_StopPressed(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StopPressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PlayPauseTogglePressed(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlayPauseTogglePressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RecordPressed(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecordPressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_NextTrackPressed(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NextTrackPressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PreviousTrackPressed(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PreviousTrackPressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_FastForwardPressed(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FastForwardPressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RewindPressed(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RewindPressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ChannelUpPressed(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ChannelUpPressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ChannelDownPressed(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ChannelDownPressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn get_SoundLevel(&mut self, out: *mut SoundLevel) -> HRESULT, + fn put_TrackName(&mut self, value: HSTRING) -> HRESULT, + fn get_TrackName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ArtistName(&mut self, value: HSTRING) -> HRESULT, + fn get_ArtistName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_IsPlaying(&mut self, value: bool) -> HRESULT, + fn get_IsPlaying(&mut self, out: *mut bool) -> HRESULT, + fn put_AlbumArt(&mut self, value: *mut super::foundation::Uri) -> HRESULT, + fn get_AlbumArt(&mut self, out: *mut *mut super::foundation::Uri) -> HRESULT + }} + impl IMediaControl { + #[inline] pub unsafe fn add_sound_level_changed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SoundLevelChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_sound_level_changed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SoundLevelChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_play_pressed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PlayPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_play_pressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PlayPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pause_pressed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PausePressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pause_pressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PausePressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stop_pressed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StopPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stop_pressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StopPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_play_pause_toggle_pressed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PlayPauseTogglePressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_play_pause_toggle_pressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PlayPauseTogglePressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_record_pressed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RecordPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_record_pressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RecordPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_next_track_pressed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NextTrackPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_next_track_pressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NextTrackPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_previous_track_pressed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PreviousTrackPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_previous_track_pressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PreviousTrackPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_fast_forward_pressed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FastForwardPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_fast_forward_pressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FastForwardPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rewind_pressed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RewindPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_rewind_pressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RewindPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_channel_up_pressed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ChannelUpPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_channel_up_pressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ChannelUpPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_channel_down_pressed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ChannelDownPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_channel_down_pressed(&mut self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ChannelDownPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_sound_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SoundLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_track_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TrackName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_track_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TrackName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_artist_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ArtistName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_artist_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ArtistName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_playing(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPlaying)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_playing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPlaying)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_album_art(&mut self, value: &super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_AlbumArt)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_album_art(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlbumArt)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IMediaControl [CLSID_MediaControl]} + DEFINE_CLSID!(CLSID_MediaControl = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,77,101,100,105,97,67,111,110,116,114,111,108,0]); +pub mod capture { // Windows.Media.Capture +use ::prelude::*; + RT_STRUCT! { struct AppCaptureContract { + + }} + RT_ENUM! { enum AppCaptureVideoEncodingBitrateMode: i32 { + Custom (AppCaptureVideoEncodingBitrateMode_Custom) = 0, High (AppCaptureVideoEncodingBitrateMode_High) = 1, Standard (AppCaptureVideoEncodingBitrateMode_Standard) = 2, + }} + RT_ENUM! { enum AppCaptureVideoEncodingResolutionMode: i32 { + Custom (AppCaptureVideoEncodingResolutionMode_Custom) = 0, High (AppCaptureVideoEncodingResolutionMode_High) = 1, Standard (AppCaptureVideoEncodingResolutionMode_Standard) = 2, + }} + RT_ENUM! { enum AppCaptureVideoEncodingFrameRateMode: i32 { + Standard (AppCaptureVideoEncodingFrameRateMode_Standard) = 0, High (AppCaptureVideoEncodingFrameRateMode_High) = 1, + }} + RT_ENUM! { enum AppCaptureHistoricalBufferLengthUnit: i32 { + Megabytes (AppCaptureHistoricalBufferLengthUnit_Megabytes) = 0, Seconds (AppCaptureHistoricalBufferLengthUnit_Seconds) = 1, + }} + DEFINE_IID!(IID_IAppCaptureManagerStatics, 2107522727, 25218, 18229, 141, 78, 170, 69, 249, 15, 103, 35); + RT_INTERFACE!{static interface IAppCaptureManagerStatics(IAppCaptureManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureManagerStatics] { + fn GetCurrentSettings(&mut self, out: *mut *mut AppCaptureSettings) -> HRESULT, + fn ApplySettings(&mut self, appCaptureSettings: *mut AppCaptureSettings) -> HRESULT + }} + impl IAppCaptureManagerStatics { + #[inline] pub unsafe fn get_current_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn apply_settings(&mut self, appCaptureSettings: &AppCaptureSettings) -> Result<()> { + let hr = ((*self.lpVtbl).ApplySettings)(self, appCaptureSettings as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AppCaptureSettings: IAppCaptureSettings} + DEFINE_IID!(IID_IAppCaptureAlternateShortcutKeys, 434692335, 9068, 16633, 179, 143, 155, 125, 214, 93, 28, 204); + RT_INTERFACE!{interface IAppCaptureAlternateShortcutKeys(IAppCaptureAlternateShortcutKeysVtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureAlternateShortcutKeys] { + #[cfg(feature="windows.system")] fn put_ToggleGameBarKey(&mut self, value: super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleGameBarKey(&mut self, out: *mut super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn put_ToggleGameBarKeyModifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleGameBarKeyModifiers(&mut self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn put_SaveHistoricalVideoKey(&mut self, value: super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn get_SaveHistoricalVideoKey(&mut self, out: *mut super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn put_SaveHistoricalVideoKeyModifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn get_SaveHistoricalVideoKeyModifiers(&mut self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn put_ToggleRecordingKey(&mut self, value: super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleRecordingKey(&mut self, out: *mut super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn put_ToggleRecordingKeyModifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleRecordingKeyModifiers(&mut self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn put_TakeScreenshotKey(&mut self, value: super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn get_TakeScreenshotKey(&mut self, out: *mut super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn put_TakeScreenshotKeyModifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn get_TakeScreenshotKeyModifiers(&mut self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn put_ToggleRecordingIndicatorKey(&mut self, value: super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleRecordingIndicatorKey(&mut self, out: *mut super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn put_ToggleRecordingIndicatorKeyModifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleRecordingIndicatorKeyModifiers(&mut self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT + }} + impl IAppCaptureAlternateShortcutKeys { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_game_bar_key(&mut self, value: super::super::system::VirtualKey) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleGameBarKey)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_game_bar_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleGameBarKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_game_bar_key_modifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleGameBarKeyModifiers)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_game_bar_key_modifiers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleGameBarKeyModifiers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_save_historical_video_key(&mut self, value: super::super::system::VirtualKey) -> Result<()> { + let hr = ((*self.lpVtbl).put_SaveHistoricalVideoKey)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_save_historical_video_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SaveHistoricalVideoKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_save_historical_video_key_modifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + let hr = ((*self.lpVtbl).put_SaveHistoricalVideoKeyModifiers)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_save_historical_video_key_modifiers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SaveHistoricalVideoKeyModifiers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_recording_key(&mut self, value: super::super::system::VirtualKey) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleRecordingKey)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_recording_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleRecordingKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_recording_key_modifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleRecordingKeyModifiers)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_recording_key_modifiers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleRecordingKeyModifiers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_take_screenshot_key(&mut self, value: super::super::system::VirtualKey) -> Result<()> { + let hr = ((*self.lpVtbl).put_TakeScreenshotKey)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_take_screenshot_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TakeScreenshotKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_take_screenshot_key_modifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + let hr = ((*self.lpVtbl).put_TakeScreenshotKeyModifiers)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_take_screenshot_key_modifiers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TakeScreenshotKeyModifiers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_recording_indicator_key(&mut self, value: super::super::system::VirtualKey) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleRecordingIndicatorKey)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_recording_indicator_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleRecordingIndicatorKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_recording_indicator_key_modifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleRecordingIndicatorKeyModifiers)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_recording_indicator_key_modifiers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleRecordingIndicatorKeyModifiers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAppCaptureAlternateShortcutKeys2, 3278278800, 56599, 18416, 149, 229, 206, 66, 40, 108, 243, 56); + RT_INTERFACE!{interface IAppCaptureAlternateShortcutKeys2(IAppCaptureAlternateShortcutKeys2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureAlternateShortcutKeys2] { + #[cfg(feature="windows.system")] fn put_ToggleMicrophoneCaptureKey(&mut self, value: super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleMicrophoneCaptureKey(&mut self, out: *mut super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn put_ToggleMicrophoneCaptureKeyModifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleMicrophoneCaptureKeyModifiers(&mut self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT + }} + impl IAppCaptureAlternateShortcutKeys2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_microphone_capture_key(&mut self, value: super::super::system::VirtualKey) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleMicrophoneCaptureKey)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_microphone_capture_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleMicrophoneCaptureKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_microphone_capture_key_modifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleMicrophoneCaptureKeyModifiers)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_microphone_capture_key_modifiers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleMicrophoneCaptureKeyModifiers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAppCaptureAlternateShortcutKeys3, 2072069260, 16782, 18076, 164, 154, 69, 181, 151, 200, 38, 182); + RT_INTERFACE!{interface IAppCaptureAlternateShortcutKeys3(IAppCaptureAlternateShortcutKeys3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureAlternateShortcutKeys3] { + #[cfg(feature="windows.system")] fn put_ToggleCameraCaptureKey(&mut self, value: super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleCameraCaptureKey(&mut self, out: *mut super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn put_ToggleCameraCaptureKeyModifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleCameraCaptureKeyModifiers(&mut self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn put_ToggleBroadcastKey(&mut self, value: super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleBroadcastKey(&mut self, out: *mut super::super::system::VirtualKey) -> HRESULT, + #[cfg(feature="windows.system")] fn put_ToggleBroadcastKeyModifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> HRESULT, + #[cfg(feature="windows.system")] fn get_ToggleBroadcastKeyModifiers(&mut self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT + }} + impl IAppCaptureAlternateShortcutKeys3 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_camera_capture_key(&mut self, value: super::super::system::VirtualKey) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleCameraCaptureKey)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_camera_capture_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleCameraCaptureKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_camera_capture_key_modifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleCameraCaptureKeyModifiers)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_camera_capture_key_modifiers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleCameraCaptureKeyModifiers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_broadcast_key(&mut self, value: super::super::system::VirtualKey) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleBroadcastKey)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_broadcast_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleBroadcastKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn set_toggle_broadcast_key_modifiers(&mut self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + let hr = ((*self.lpVtbl).put_ToggleBroadcastKeyModifiers)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_toggle_broadcast_key_modifiers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ToggleBroadcastKeyModifiers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAppCaptureSettings, 342375046, 34823, 18643, 136, 58, 151, 14, 228, 83, 42, 57); + RT_INTERFACE!{interface IAppCaptureSettings(IAppCaptureSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureSettings] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_AppCaptureDestinationFolder(&mut self, value: *mut super::super::storage::StorageFolder) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_AppCaptureDestinationFolder(&mut self, out: *mut *mut super::super::storage::StorageFolder) -> HRESULT, + fn put_AudioEncodingBitrate(&mut self, value: u32) -> HRESULT, + fn get_AudioEncodingBitrate(&mut self, out: *mut u32) -> HRESULT, + fn put_IsAudioCaptureEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsAudioCaptureEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_CustomVideoEncodingBitrate(&mut self, value: u32) -> HRESULT, + fn get_CustomVideoEncodingBitrate(&mut self, out: *mut u32) -> HRESULT, + fn put_CustomVideoEncodingHeight(&mut self, value: u32) -> HRESULT, + fn get_CustomVideoEncodingHeight(&mut self, out: *mut u32) -> HRESULT, + fn put_CustomVideoEncodingWidth(&mut self, value: u32) -> HRESULT, + fn get_CustomVideoEncodingWidth(&mut self, out: *mut u32) -> HRESULT, + fn put_HistoricalBufferLength(&mut self, value: u32) -> HRESULT, + fn get_HistoricalBufferLength(&mut self, out: *mut u32) -> HRESULT, + fn put_HistoricalBufferLengthUnit(&mut self, value: AppCaptureHistoricalBufferLengthUnit) -> HRESULT, + fn get_HistoricalBufferLengthUnit(&mut self, out: *mut AppCaptureHistoricalBufferLengthUnit) -> HRESULT, + fn put_IsHistoricalCaptureEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsHistoricalCaptureEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsHistoricalCaptureOnBatteryAllowed(&mut self, value: bool) -> HRESULT, + fn get_IsHistoricalCaptureOnBatteryAllowed(&mut self, out: *mut bool) -> HRESULT, + fn put_IsHistoricalCaptureOnWirelessDisplayAllowed(&mut self, value: bool) -> HRESULT, + fn get_IsHistoricalCaptureOnWirelessDisplayAllowed(&mut self, out: *mut bool) -> HRESULT, + fn put_MaximumRecordLength(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_MaximumRecordLength(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy24(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_ScreenshotDestinationFolder(&mut self, value: *mut super::super::storage::StorageFolder) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy25(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_ScreenshotDestinationFolder(&mut self, out: *mut *mut super::super::storage::StorageFolder) -> HRESULT, + fn put_VideoEncodingBitrateMode(&mut self, value: AppCaptureVideoEncodingBitrateMode) -> HRESULT, + fn get_VideoEncodingBitrateMode(&mut self, out: *mut AppCaptureVideoEncodingBitrateMode) -> HRESULT, + fn put_VideoEncodingResolutionMode(&mut self, value: AppCaptureVideoEncodingResolutionMode) -> HRESULT, + fn get_VideoEncodingResolutionMode(&mut self, out: *mut AppCaptureVideoEncodingResolutionMode) -> HRESULT, + fn put_IsAppCaptureEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsAppCaptureEnabled(&mut self, out: *mut bool) -> HRESULT, + fn get_IsCpuConstrained(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDisabledByPolicy(&mut self, out: *mut bool) -> HRESULT, + fn get_IsMemoryConstrained(&mut self, out: *mut bool) -> HRESULT, + fn get_HasHardwareEncoder(&mut self, out: *mut bool) -> HRESULT + }} + impl IAppCaptureSettings { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_app_capture_destination_folder(&mut self, value: &super::super::storage::StorageFolder) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppCaptureDestinationFolder)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_app_capture_destination_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppCaptureDestinationFolder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_audio_encoding_bitrate(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioEncodingBitrate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_encoding_bitrate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioEncodingBitrate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_audio_capture_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsAudioCaptureEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_audio_capture_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsAudioCaptureEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_custom_video_encoding_bitrate(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CustomVideoEncodingBitrate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_video_encoding_bitrate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CustomVideoEncodingBitrate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_custom_video_encoding_height(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CustomVideoEncodingHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_video_encoding_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CustomVideoEncodingHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_custom_video_encoding_width(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CustomVideoEncodingWidth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_video_encoding_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CustomVideoEncodingWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_historical_buffer_length(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_HistoricalBufferLength)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_historical_buffer_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HistoricalBufferLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_historical_buffer_length_unit(&mut self, value: AppCaptureHistoricalBufferLengthUnit) -> Result<()> { + let hr = ((*self.lpVtbl).put_HistoricalBufferLengthUnit)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_historical_buffer_length_unit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HistoricalBufferLengthUnit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_historical_capture_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsHistoricalCaptureEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_historical_capture_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsHistoricalCaptureEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_historical_capture_on_battery_allowed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsHistoricalCaptureOnBatteryAllowed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_historical_capture_on_battery_allowed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsHistoricalCaptureOnBatteryAllowed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_historical_capture_on_wireless_display_allowed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsHistoricalCaptureOnWirelessDisplayAllowed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_historical_capture_on_wireless_display_allowed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsHistoricalCaptureOnWirelessDisplayAllowed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_maximum_record_length(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaximumRecordLength)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_maximum_record_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaximumRecordLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_screenshot_destination_folder(&mut self, value: &super::super::storage::StorageFolder) -> Result<()> { + let hr = ((*self.lpVtbl).put_ScreenshotDestinationFolder)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_screenshot_destination_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ScreenshotDestinationFolder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_video_encoding_bitrate_mode(&mut self, value: AppCaptureVideoEncodingBitrateMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_VideoEncodingBitrateMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_encoding_bitrate_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VideoEncodingBitrateMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_video_encoding_resolution_mode(&mut self, value: AppCaptureVideoEncodingResolutionMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_VideoEncodingResolutionMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_encoding_resolution_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VideoEncodingResolutionMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_app_capture_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsAppCaptureEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_app_capture_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsAppCaptureEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_cpu_constrained(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCpuConstrained)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_disabled_by_policy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDisabledByPolicy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_memory_constrained(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsMemoryConstrained)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_hardware_encoder(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasHardwareEncoder)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAppCaptureSettings2, 4239970023, 57963, 18287, 155, 26, 236, 52, 45, 42, 143, 222); + RT_INTERFACE!{interface IAppCaptureSettings2(IAppCaptureSettings2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureSettings2] { + fn get_IsGpuConstrained(&mut self, out: *mut bool) -> HRESULT, + fn get_AlternateShortcutKeys(&mut self, out: *mut *mut AppCaptureAlternateShortcutKeys) -> HRESULT + }} + impl IAppCaptureSettings2 { + #[inline] pub unsafe fn get_is_gpu_constrained(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsGpuConstrained)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_alternate_shortcut_keys(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlternateShortcutKeys)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AppCaptureAlternateShortcutKeys: IAppCaptureAlternateShortcutKeys} + DEFINE_IID!(IID_IAppCaptureSettings3, 2838823678, 35010, 17110, 170, 170, 64, 254, 255, 215, 90, 236); + RT_INTERFACE!{interface IAppCaptureSettings3(IAppCaptureSettings3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureSettings3] { + fn put_IsMicrophoneCaptureEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsMicrophoneCaptureEnabled(&mut self, out: *mut bool) -> HRESULT + }} + impl IAppCaptureSettings3 { + #[inline] pub unsafe fn set_is_microphone_capture_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsMicrophoneCaptureEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_microphone_capture_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsMicrophoneCaptureEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAppCaptureSettings4, 130185036, 6785, 18479, 162, 68, 4, 157, 149, 242, 91, 11); + RT_INTERFACE!{interface IAppCaptureSettings4(IAppCaptureSettings4Vtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureSettings4] { + fn put_IsMicrophoneCaptureEnabledByDefault(&mut self, value: bool) -> HRESULT, + fn get_IsMicrophoneCaptureEnabledByDefault(&mut self, out: *mut bool) -> HRESULT, + fn put_SystemAudioGain(&mut self, value: f64) -> HRESULT, + fn get_SystemAudioGain(&mut self, out: *mut f64) -> HRESULT, + fn put_MicrophoneGain(&mut self, value: f64) -> HRESULT, + fn get_MicrophoneGain(&mut self, out: *mut f64) -> HRESULT, + fn put_VideoEncodingFrameRateMode(&mut self, value: AppCaptureVideoEncodingFrameRateMode) -> HRESULT, + fn get_VideoEncodingFrameRateMode(&mut self, out: *mut AppCaptureVideoEncodingFrameRateMode) -> HRESULT + }} + impl IAppCaptureSettings4 { + #[inline] pub unsafe fn set_is_microphone_capture_enabled_by_default(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsMicrophoneCaptureEnabledByDefault)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_microphone_capture_enabled_by_default(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsMicrophoneCaptureEnabledByDefault)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_system_audio_gain(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_SystemAudioGain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_audio_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SystemAudioGain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_microphone_gain(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MicrophoneGain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_microphone_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MicrophoneGain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_video_encoding_frame_rate_mode(&mut self, value: AppCaptureVideoEncodingFrameRateMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_VideoEncodingFrameRateMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_encoding_frame_rate_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VideoEncodingFrameRateMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IAppCaptureManagerStatics [CLSID_AppCaptureManager]} + DEFINE_CLSID!(CLSID_AppCaptureManager = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,97,112,116,117,114,101,46,65,112,112,67,97,112,116,117,114,101,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IAppCapture, 2538198099, 41626, 17901, 143, 41, 34, 208, 153, 66, 207, 247); + RT_INTERFACE!{interface IAppCapture(IAppCaptureVtbl): IInspectable(IInspectableVtbl) [IID_IAppCapture] { + fn get_IsCapturingAudio(&mut self, out: *mut bool) -> HRESULT, + fn get_IsCapturingVideo(&mut self, out: *mut bool) -> HRESULT, + fn add_CapturingChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CapturingChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAppCapture { + #[inline] pub unsafe fn get_is_capturing_audio(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCapturingAudio)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_capturing_video(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCapturingVideo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_capturing_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CapturingChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_capturing_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CapturingChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AppCapture: IAppCapture} + RT_ACTIVATABLE!{IAppCaptureStatics [CLSID_AppCapture]} + DEFINE_CLSID!(CLSID_AppCapture = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,97,112,116,117,114,101,46,65,112,112,67,97,112,116,117,114,101,0]); + DEFINE_IID!(IID_IAppCaptureStatics, 4179811692, 2686, 20084, 139, 32, 156, 31, 144, 45, 8, 161); + RT_INTERFACE!{static interface IAppCaptureStatics(IAppCaptureStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut AppCapture) -> HRESULT + }} + impl IAppCaptureStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum CameraCaptureUIMode: i32 { + PhotoOrVideo (CameraCaptureUIMode_PhotoOrVideo) = 0, Photo (CameraCaptureUIMode_Photo) = 1, Video (CameraCaptureUIMode_Video) = 2, + }} + RT_ENUM! { enum CameraCaptureUIPhotoFormat: i32 { + Jpeg (CameraCaptureUIPhotoFormat_Jpeg) = 0, Png (CameraCaptureUIPhotoFormat_Png) = 1, JpegXR (CameraCaptureUIPhotoFormat_JpegXR) = 2, + }} + RT_ENUM! { enum CameraCaptureUIVideoFormat: i32 { + Mp4 (CameraCaptureUIVideoFormat_Mp4) = 0, Wmv (CameraCaptureUIVideoFormat_Wmv) = 1, + }} + RT_ENUM! { enum CameraCaptureUIMaxVideoResolution: i32 { + HighestAvailable (CameraCaptureUIMaxVideoResolution_HighestAvailable) = 0, LowDefinition (CameraCaptureUIMaxVideoResolution_LowDefinition) = 1, StandardDefinition (CameraCaptureUIMaxVideoResolution_StandardDefinition) = 2, HighDefinition (CameraCaptureUIMaxVideoResolution_HighDefinition) = 3, + }} + RT_ENUM! { enum CameraCaptureUIMaxPhotoResolution: i32 { + HighestAvailable (CameraCaptureUIMaxPhotoResolution_HighestAvailable) = 0, VerySmallQvga (CameraCaptureUIMaxPhotoResolution_VerySmallQvga) = 1, SmallVga (CameraCaptureUIMaxPhotoResolution_SmallVga) = 2, MediumXga (CameraCaptureUIMaxPhotoResolution_MediumXga) = 3, Large3M (CameraCaptureUIMaxPhotoResolution_Large3M) = 4, VeryLarge5M (CameraCaptureUIMaxPhotoResolution_VeryLarge5M) = 5, + }} + DEFINE_IID!(IID_ICameraCaptureUIPhotoCaptureSettings, 3119890071, 13426, 18088, 138, 158, 4, 206, 66, 204, 201, 125); + RT_INTERFACE!{interface ICameraCaptureUIPhotoCaptureSettings(ICameraCaptureUIPhotoCaptureSettingsVtbl): IInspectable(IInspectableVtbl) [IID_ICameraCaptureUIPhotoCaptureSettings] { + fn get_Format(&mut self, out: *mut CameraCaptureUIPhotoFormat) -> HRESULT, + fn put_Format(&mut self, value: CameraCaptureUIPhotoFormat) -> HRESULT, + fn get_MaxResolution(&mut self, out: *mut CameraCaptureUIMaxPhotoResolution) -> HRESULT, + fn put_MaxResolution(&mut self, value: CameraCaptureUIMaxPhotoResolution) -> HRESULT, + fn get_CroppedSizeInPixels(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn put_CroppedSizeInPixels(&mut self, value: super::super::foundation::Size) -> HRESULT, + fn get_CroppedAspectRatio(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn put_CroppedAspectRatio(&mut self, value: super::super::foundation::Size) -> HRESULT, + fn get_AllowCropping(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowCropping(&mut self, value: bool) -> HRESULT + }} + impl ICameraCaptureUIPhotoCaptureSettings { + #[inline] pub unsafe fn get_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Format)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_format(&mut self, value: CameraCaptureUIPhotoFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_Format)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_resolution(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxResolution)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_resolution(&mut self, value: CameraCaptureUIMaxPhotoResolution) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxResolution)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cropped_size_in_pixels(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CroppedSizeInPixels)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cropped_size_in_pixels(&mut self, value: super::super::foundation::Size) -> Result<()> { + let hr = ((*self.lpVtbl).put_CroppedSizeInPixels)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cropped_aspect_ratio(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CroppedAspectRatio)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cropped_aspect_ratio(&mut self, value: super::super::foundation::Size) -> Result<()> { + let hr = ((*self.lpVtbl).put_CroppedAspectRatio)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_allow_cropping(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowCropping)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_cropping(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowCropping)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CameraCaptureUIPhotoCaptureSettings: ICameraCaptureUIPhotoCaptureSettings} + DEFINE_IID!(IID_ICameraCaptureUIVideoCaptureSettings, 1693003039, 41613, 16986, 184, 79, 229, 104, 51, 95, 242, 78); + RT_INTERFACE!{interface ICameraCaptureUIVideoCaptureSettings(ICameraCaptureUIVideoCaptureSettingsVtbl): IInspectable(IInspectableVtbl) [IID_ICameraCaptureUIVideoCaptureSettings] { + fn get_Format(&mut self, out: *mut CameraCaptureUIVideoFormat) -> HRESULT, + fn put_Format(&mut self, value: CameraCaptureUIVideoFormat) -> HRESULT, + fn get_MaxResolution(&mut self, out: *mut CameraCaptureUIMaxVideoResolution) -> HRESULT, + fn put_MaxResolution(&mut self, value: CameraCaptureUIMaxVideoResolution) -> HRESULT, + fn get_MaxDurationInSeconds(&mut self, out: *mut f32) -> HRESULT, + fn put_MaxDurationInSeconds(&mut self, value: f32) -> HRESULT, + fn get_AllowTrimming(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowTrimming(&mut self, value: bool) -> HRESULT + }} + impl ICameraCaptureUIVideoCaptureSettings { + #[inline] pub unsafe fn get_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Format)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_format(&mut self, value: CameraCaptureUIVideoFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_Format)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_resolution(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxResolution)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_resolution(&mut self, value: CameraCaptureUIMaxVideoResolution) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxResolution)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_duration_in_seconds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxDurationInSeconds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_duration_in_seconds(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxDurationInSeconds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_allow_trimming(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowTrimming)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_trimming(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowTrimming)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CameraCaptureUIVideoCaptureSettings: ICameraCaptureUIVideoCaptureSettings} + DEFINE_IID!(IID_ICameraCaptureUI, 1213756736, 28563, 19380, 184, 243, 232, 158, 72, 148, 140, 145); + RT_INTERFACE!{interface ICameraCaptureUI(ICameraCaptureUIVtbl): IInspectable(IInspectableVtbl) [IID_ICameraCaptureUI] { + fn get_PhotoSettings(&mut self, out: *mut *mut CameraCaptureUIPhotoCaptureSettings) -> HRESULT, + fn get_VideoSettings(&mut self, out: *mut *mut CameraCaptureUIVideoCaptureSettings) -> HRESULT, + #[cfg(feature="windows.storage")] fn CaptureFileAsync(&mut self, mode: CameraCaptureUIMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICameraCaptureUI { + #[inline] pub unsafe fn get_photo_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhotoSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn capture_file_async(&mut self, mode: CameraCaptureUIMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CaptureFileAsync)(self, mode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CameraCaptureUI: ICameraCaptureUI} + RT_ENUM! { enum MediaCategory: i32 { + Other (MediaCategory_Other) = 0, Communications (MediaCategory_Communications) = 1, Media (MediaCategory_Media) = 2, GameChat (MediaCategory_GameChat) = 3, Speech (MediaCategory_Speech) = 4, + }} + RT_ENUM! { enum MediaStreamType: i32 { + VideoPreview (MediaStreamType_VideoPreview) = 0, VideoRecord (MediaStreamType_VideoRecord) = 1, Audio (MediaStreamType_Audio) = 2, Photo (MediaStreamType_Photo) = 3, + }} + RT_ENUM! { enum StreamingCaptureMode: i32 { + AudioAndVideo (StreamingCaptureMode_AudioAndVideo) = 0, Audio (StreamingCaptureMode_Audio) = 1, Video (StreamingCaptureMode_Video) = 2, + }} + RT_ENUM! { enum VideoRotation: i32 { + None (VideoRotation_None) = 0, Clockwise90Degrees (VideoRotation_Clockwise90Degrees) = 1, Clockwise180Degrees (VideoRotation_Clockwise180Degrees) = 2, Clockwise270Degrees (VideoRotation_Clockwise270Degrees) = 3, + }} + RT_ENUM! { enum PhotoCaptureSource: i32 { + Auto (PhotoCaptureSource_Auto) = 0, VideoPreview (PhotoCaptureSource_VideoPreview) = 1, Photo (PhotoCaptureSource_Photo) = 2, + }} + RT_ENUM! { enum VideoDeviceCharacteristic: i32 { + AllStreamsIndependent (VideoDeviceCharacteristic_AllStreamsIndependent) = 0, PreviewRecordStreamsIdentical (VideoDeviceCharacteristic_PreviewRecordStreamsIdentical) = 1, PreviewPhotoStreamsIdentical (VideoDeviceCharacteristic_PreviewPhotoStreamsIdentical) = 2, RecordPhotoStreamsIdentical (VideoDeviceCharacteristic_RecordPhotoStreamsIdentical) = 3, AllStreamsIdentical (VideoDeviceCharacteristic_AllStreamsIdentical) = 4, + }} + RT_ENUM! { enum PowerlineFrequency: i32 { + Disabled (PowerlineFrequency_Disabled) = 0, FiftyHertz (PowerlineFrequency_FiftyHertz) = 1, SixtyHertz (PowerlineFrequency_SixtyHertz) = 2, Auto (PowerlineFrequency_Auto) = 3, + }} + RT_ENUM! { enum MediaCaptureThermalStatus: i32 { + Normal (MediaCaptureThermalStatus_Normal) = 0, Overheated (MediaCaptureThermalStatus_Overheated) = 1, + }} + DEFINE_IID!(IID_IMediaCaptureFailedEventArgs, 2164122612, 21700, 17088, 141, 25, 206, 161, 168, 124, 161, 139); + RT_INTERFACE!{interface IMediaCaptureFailedEventArgs(IMediaCaptureFailedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureFailedEventArgs] { + fn get_Message(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Code(&mut self, out: *mut u32) -> HRESULT + }} + impl IMediaCaptureFailedEventArgs { + #[inline] pub unsafe fn get_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MediaCaptureFailedEventArgs: IMediaCaptureFailedEventArgs} + DEFINE_IID!(IID_MediaCaptureFailedEventHandler, 538243067, 23768, 20232, 163, 20, 13, 54, 13, 165, 159, 20); + RT_DELEGATE!{delegate MediaCaptureFailedEventHandler(MediaCaptureFailedEventHandlerVtbl, MediaCaptureFailedEventHandlerImpl) [IID_MediaCaptureFailedEventHandler] { + fn Invoke(&mut self, sender: *mut MediaCapture, errorEventArgs: *mut MediaCaptureFailedEventArgs) -> HRESULT + }} + impl MediaCaptureFailedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &MediaCapture, errorEventArgs: &MediaCaptureFailedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, errorEventArgs as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaCapture: IMediaCapture} + RT_ACTIVATABLE!{IMediaCaptureStatics [CLSID_MediaCapture]} + DEFINE_CLSID!(CLSID_MediaCapture = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,97,112,116,117,114,101,46,77,101,100,105,97,67,97,112,116,117,114,101,0]); + DEFINE_IID!(IID_RecordLimitationExceededEventHandler, 1068404526, 20449, 20477, 170, 186, 225, 241, 51, 125, 78, 83); + RT_DELEGATE!{delegate RecordLimitationExceededEventHandler(RecordLimitationExceededEventHandlerVtbl, RecordLimitationExceededEventHandlerImpl) [IID_RecordLimitationExceededEventHandler] { + fn Invoke(&mut self, sender: *mut MediaCapture) -> HRESULT + }} + impl RecordLimitationExceededEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &MediaCapture) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum KnownVideoProfile: i32 { + VideoRecording (KnownVideoProfile_VideoRecording) = 0, HighQualityPhoto (KnownVideoProfile_HighQualityPhoto) = 1, BalancedVideoAndPhoto (KnownVideoProfile_BalancedVideoAndPhoto) = 2, VideoConferencing (KnownVideoProfile_VideoConferencing) = 3, PhotoSequence (KnownVideoProfile_PhotoSequence) = 4, + }} + DEFINE_IID!(IID_IMediaCaptureVideoProfileMediaDescription, 2148708335, 46737, 18943, 131, 242, 193, 231, 110, 170, 234, 27); + RT_INTERFACE!{interface IMediaCaptureVideoProfileMediaDescription(IMediaCaptureVideoProfileMediaDescriptionVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureVideoProfileMediaDescription] { + fn get_Width(&mut self, out: *mut u32) -> HRESULT, + fn get_Height(&mut self, out: *mut u32) -> HRESULT, + fn get_FrameRate(&mut self, out: *mut f64) -> HRESULT, + fn get_IsVariablePhotoSequenceSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsHdrVideoSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IMediaCaptureVideoProfileMediaDescription { + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FrameRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_variable_photo_sequence_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsVariablePhotoSequenceSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_hdr_video_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsHdrVideoSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCaptureVideoProfile, 564163519, 41966, 20175, 158, 246, 80, 176, 188, 78, 19, 5); + RT_INTERFACE!{interface IMediaCaptureVideoProfile(IMediaCaptureVideoProfileVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureVideoProfile] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_VideoDeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SupportedPreviewMediaDescription(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedRecordMediaDescription(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedPhotoMediaDescription(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetConcurrency(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMediaCaptureVideoProfile { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_preview_media_description(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedPreviewMediaDescription)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_record_media_description(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedRecordMediaDescription)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_photo_media_description(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedPhotoMediaDescription)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_concurrency(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConcurrency)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaCaptureVideoProfileMediaDescription: IMediaCaptureVideoProfileMediaDescription} + RT_CLASS!{class MediaCaptureVideoProfile: IMediaCaptureVideoProfile} + DEFINE_IID!(IID_IMediaCaptureInitializationSettings, 2541927024, 60005, 18688, 147, 86, 140, 168, 135, 114, 104, 132); + RT_INTERFACE!{interface IMediaCaptureInitializationSettings(IMediaCaptureInitializationSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureInitializationSettings] { + fn put_AudioDeviceId(&mut self, value: HSTRING) -> HRESULT, + fn get_AudioDeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_VideoDeviceId(&mut self, value: HSTRING) -> HRESULT, + fn get_VideoDeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_StreamingCaptureMode(&mut self, value: StreamingCaptureMode) -> HRESULT, + fn get_StreamingCaptureMode(&mut self, out: *mut StreamingCaptureMode) -> HRESULT, + fn put_PhotoCaptureSource(&mut self, value: PhotoCaptureSource) -> HRESULT, + fn get_PhotoCaptureSource(&mut self, out: *mut PhotoCaptureSource) -> HRESULT + }} + impl IMediaCaptureInitializationSettings { + #[inline] pub unsafe fn set_audio_device_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioDeviceId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudioDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_video_device_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_VideoDeviceId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_streaming_capture_mode(&mut self, value: StreamingCaptureMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_StreamingCaptureMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_streaming_capture_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StreamingCaptureMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_photo_capture_source(&mut self, value: PhotoCaptureSource) -> Result<()> { + let hr = ((*self.lpVtbl).put_PhotoCaptureSource)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_photo_capture_source(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhotoCaptureSource)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCaptureInitializationSettings2, 1078855206, 51676, 17385, 174, 228, 230, 191, 27, 87, 180, 76); + RT_INTERFACE!{interface IMediaCaptureInitializationSettings2(IMediaCaptureInitializationSettings2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureInitializationSettings2] { + fn put_MediaCategory(&mut self, value: MediaCategory) -> HRESULT, + fn get_MediaCategory(&mut self, out: *mut MediaCategory) -> HRESULT, + fn put_AudioProcessing(&mut self, value: super::AudioProcessing) -> HRESULT, + fn get_AudioProcessing(&mut self, out: *mut super::AudioProcessing) -> HRESULT + }} + impl IMediaCaptureInitializationSettings2 { + #[inline] pub unsafe fn set_media_category(&mut self, value: MediaCategory) -> Result<()> { + let hr = ((*self.lpVtbl).put_MediaCategory)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_category(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediaCategory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_audio_processing(&mut self, value: super::AudioProcessing) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioProcessing)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_processing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioProcessing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCaptureInitializationSettings3, 1096831389, 48712, 18224, 129, 4, 12, 246, 233, 233, 121, 72); + RT_INTERFACE!{interface IMediaCaptureInitializationSettings3(IMediaCaptureInitializationSettings3Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureInitializationSettings3] { + fn put_AudioSource(&mut self, value: *mut super::core::IMediaSource) -> HRESULT, + fn get_AudioSource(&mut self, out: *mut *mut super::core::IMediaSource) -> HRESULT, + fn put_VideoSource(&mut self, value: *mut super::core::IMediaSource) -> HRESULT, + fn get_VideoSource(&mut self, out: *mut *mut super::core::IMediaSource) -> HRESULT + }} + impl IMediaCaptureInitializationSettings3 { + #[inline] pub unsafe fn set_audio_source(&mut self, value: &super::core::IMediaSource) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioSource)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudioSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_video_source(&mut self, value: &super::core::IMediaSource) -> Result<()> { + let hr = ((*self.lpVtbl).put_VideoSource)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCaptureInitializationSettings4, 4110591287, 19639, 19752, 149, 237, 79, 159, 1, 46, 5, 24); + RT_INTERFACE!{interface IMediaCaptureInitializationSettings4(IMediaCaptureInitializationSettings4Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureInitializationSettings4] { + fn get_VideoProfile(&mut self, out: *mut *mut MediaCaptureVideoProfile) -> HRESULT, + fn put_VideoProfile(&mut self, value: *mut MediaCaptureVideoProfile) -> HRESULT, + fn get_PreviewMediaDescription(&mut self, out: *mut *mut MediaCaptureVideoProfileMediaDescription) -> HRESULT, + fn put_PreviewMediaDescription(&mut self, value: *mut MediaCaptureVideoProfileMediaDescription) -> HRESULT, + fn get_RecordMediaDescription(&mut self, out: *mut *mut MediaCaptureVideoProfileMediaDescription) -> HRESULT, + fn put_RecordMediaDescription(&mut self, value: *mut MediaCaptureVideoProfileMediaDescription) -> HRESULT, + fn get_PhotoMediaDescription(&mut self, out: *mut *mut MediaCaptureVideoProfileMediaDescription) -> HRESULT, + fn put_PhotoMediaDescription(&mut self, value: *mut MediaCaptureVideoProfileMediaDescription) -> HRESULT + }} + impl IMediaCaptureInitializationSettings4 { + #[inline] pub unsafe fn get_video_profile(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoProfile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_video_profile(&mut self, value: &MediaCaptureVideoProfile) -> Result<()> { + let hr = ((*self.lpVtbl).put_VideoProfile)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_preview_media_description(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreviewMediaDescription)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_preview_media_description(&mut self, value: &MediaCaptureVideoProfileMediaDescription) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreviewMediaDescription)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_record_media_description(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RecordMediaDescription)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_record_media_description(&mut self, value: &MediaCaptureVideoProfileMediaDescription) -> Result<()> { + let hr = ((*self.lpVtbl).put_RecordMediaDescription)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_photo_media_description(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhotoMediaDescription)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_photo_media_description(&mut self, value: &MediaCaptureVideoProfileMediaDescription) -> Result<()> { + let hr = ((*self.lpVtbl).put_PhotoMediaDescription)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum MediaCaptureMemoryPreference: i32 { + Auto (MediaCaptureMemoryPreference_Auto) = 0, Cpu (MediaCaptureMemoryPreference_Cpu) = 1, + }} + RT_ENUM! { enum MediaCaptureSharingMode: i32 { + ExclusiveControl (MediaCaptureSharingMode_ExclusiveControl) = 0, SharedReadOnly (MediaCaptureSharingMode_SharedReadOnly) = 1, + }} + DEFINE_IID!(IID_IMediaCaptureInitializationSettings5, 3584222136, 9766, 20116, 183, 179, 83, 8, 160, 246, 75, 26); + RT_INTERFACE!{interface IMediaCaptureInitializationSettings5(IMediaCaptureInitializationSettings5Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureInitializationSettings5] { + fn get_SourceGroup(&mut self, out: *mut *mut frames::MediaFrameSourceGroup) -> HRESULT, + fn put_SourceGroup(&mut self, value: *mut frames::MediaFrameSourceGroup) -> HRESULT, + fn get_SharingMode(&mut self, out: *mut MediaCaptureSharingMode) -> HRESULT, + fn put_SharingMode(&mut self, value: MediaCaptureSharingMode) -> HRESULT, + fn get_MemoryPreference(&mut self, out: *mut MediaCaptureMemoryPreference) -> HRESULT, + fn put_MemoryPreference(&mut self, value: MediaCaptureMemoryPreference) -> HRESULT + }} + impl IMediaCaptureInitializationSettings5 { + #[inline] pub unsafe fn get_source_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceGroup)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_source_group(&mut self, value: &frames::MediaFrameSourceGroup) -> Result<()> { + let hr = ((*self.lpVtbl).put_SourceGroup)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_sharing_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SharingMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_sharing_mode(&mut self, value: MediaCaptureSharingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_SharingMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_memory_preference(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MemoryPreference)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_memory_preference(&mut self, value: MediaCaptureMemoryPreference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MemoryPreference)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaCaptureInitializationSettings: IMediaCaptureInitializationSettings} + DEFINE_IID!(IID_IMediaCaptureStatics, 2901377535, 39405, 17989, 150, 94, 25, 37, 207, 198, 56, 52); + RT_INTERFACE!{static interface IMediaCaptureStatics(IMediaCaptureStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureStatics] { + fn IsVideoProfileSupported(&mut self, videoDeviceId: HSTRING, out: *mut bool) -> HRESULT, + fn FindAllVideoProfiles(&mut self, videoDeviceId: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn FindConcurrentProfiles(&mut self, videoDeviceId: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn FindKnownVideoProfiles(&mut self, videoDeviceId: HSTRING, name: KnownVideoProfile, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMediaCaptureStatics { + #[inline] pub unsafe fn is_video_profile_supported(&mut self, videoDeviceId: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsVideoProfileSupported)(self, videoDeviceId.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_video_profiles(&mut self, videoDeviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllVideoProfiles)(self, videoDeviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_concurrent_profiles(&mut self, videoDeviceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindConcurrentProfiles)(self, videoDeviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_known_video_profiles(&mut self, videoDeviceId: &HStringArg, name: KnownVideoProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindKnownVideoProfiles)(self, videoDeviceId.get(), name, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCapture, 3323657140, 64272, 18996, 172, 24, 202, 128, 217, 200, 231, 238); + RT_INTERFACE!{interface IMediaCapture(IMediaCaptureVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCapture] { + fn InitializeAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn InitializeWithSettingsAsync(&mut self, mediaCaptureInitializationSettings: *mut MediaCaptureInitializationSettings, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn StartRecordToStorageFileAsync(&mut self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn StartRecordToStreamAsync(&mut self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StartRecordToCustomSinkAsync(&mut self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customMediaSink: *mut super::IMediaExtension, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StartRecordToCustomSinkIdAsync(&mut self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customSinkActivationId: HSTRING, customSinkSettings: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StopRecordAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CapturePhotoToStorageFileAsync(&mut self, type_: *mut super::mediaproperties::ImageEncodingProperties, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CapturePhotoToStreamAsync(&mut self, type_: *mut super::mediaproperties::ImageEncodingProperties, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn AddEffectAsync(&mut self, mediaStreamType: MediaStreamType, effectActivationID: HSTRING, effectSettings: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ClearEffectsAsync(&mut self, mediaStreamType: MediaStreamType, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SetEncoderProperty(&mut self, mediaStreamType: MediaStreamType, propertyId: Guid, propertyValue: *mut IInspectable) -> HRESULT, + fn GetEncoderProperty(&mut self, mediaStreamType: MediaStreamType, propertyId: Guid, out: *mut *mut IInspectable) -> HRESULT, + fn add_Failed(&mut self, errorEventHandler: *mut MediaCaptureFailedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Failed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RecordLimitationExceeded(&mut self, recordLimitationExceededEventHandler: *mut RecordLimitationExceededEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecordLimitationExceeded(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_MediaCaptureSettings(&mut self, out: *mut *mut MediaCaptureSettings) -> HRESULT, + fn get_AudioDeviceController(&mut self, out: *mut *mut super::devices::AudioDeviceController) -> HRESULT, + fn get_VideoDeviceController(&mut self, out: *mut *mut super::devices::VideoDeviceController) -> HRESULT, + fn SetPreviewMirroring(&mut self, value: bool) -> HRESULT, + fn GetPreviewMirroring(&mut self, out: *mut bool) -> HRESULT, + fn SetPreviewRotation(&mut self, value: VideoRotation) -> HRESULT, + fn GetPreviewRotation(&mut self, out: *mut VideoRotation) -> HRESULT, + fn SetRecordRotation(&mut self, value: VideoRotation) -> HRESULT, + fn GetRecordRotation(&mut self, out: *mut VideoRotation) -> HRESULT + }} + impl IMediaCapture { + #[inline] pub unsafe fn initialize_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).InitializeAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn initialize_with_settings_async(&mut self, mediaCaptureInitializationSettings: &MediaCaptureInitializationSettings) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).InitializeWithSettingsAsync)(self, mediaCaptureInitializationSettings as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn start_record_to_storage_file_async(&mut self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, file: &super::super::storage::IStorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartRecordToStorageFileAsync)(self, encodingProfile as *const _ as *mut _, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn start_record_to_stream_async(&mut self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, stream: &super::super::storage::streams::IRandomAccessStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartRecordToStreamAsync)(self, encodingProfile as *const _ as *mut _, stream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_record_to_custom_sink_async(&mut self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customMediaSink: &super::IMediaExtension) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartRecordToCustomSinkAsync)(self, encodingProfile as *const _ as *mut _, customMediaSink as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_record_to_custom_sink_id_async(&mut self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customSinkActivationId: &HStringArg, customSinkSettings: &super::super::foundation::collections::IPropertySet) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartRecordToCustomSinkIdAsync)(self, encodingProfile as *const _ as *mut _, customSinkActivationId.get(), customSinkSettings as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_record_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopRecordAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn capture_photo_to_storage_file_async(&mut self, type_: &super::mediaproperties::ImageEncodingProperties, file: &super::super::storage::IStorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CapturePhotoToStorageFileAsync)(self, type_ as *const _ as *mut _, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn capture_photo_to_stream_async(&mut self, type_: &super::mediaproperties::ImageEncodingProperties, stream: &super::super::storage::streams::IRandomAccessStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CapturePhotoToStreamAsync)(self, type_ as *const _ as *mut _, stream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_effect_async(&mut self, mediaStreamType: MediaStreamType, effectActivationID: &HStringArg, effectSettings: &super::super::foundation::collections::IPropertySet) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddEffectAsync)(self, mediaStreamType, effectActivationID.get(), effectSettings as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_effects_async(&mut self, mediaStreamType: MediaStreamType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearEffectsAsync)(self, mediaStreamType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_encoder_property(&mut self, mediaStreamType: MediaStreamType, propertyId: Guid, propertyValue: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetEncoderProperty)(self, mediaStreamType, propertyId, propertyValue as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_encoder_property(&mut self, mediaStreamType: MediaStreamType, propertyId: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetEncoderProperty)(self, mediaStreamType, propertyId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_failed(&mut self, errorEventHandler: &MediaCaptureFailedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Failed)(self, errorEventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_failed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Failed)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_record_limitation_exceeded(&mut self, recordLimitationExceededEventHandler: &RecordLimitationExceededEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RecordLimitationExceeded)(self, recordLimitationExceededEventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_record_limitation_exceeded(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RecordLimitationExceeded)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_capture_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaCaptureSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_device_controller(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudioDeviceController)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_device_controller(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoDeviceController)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_preview_mirroring(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetPreviewMirroring)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_preview_mirroring(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetPreviewMirroring)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_preview_rotation(&mut self, value: VideoRotation) -> Result<()> { + let hr = ((*self.lpVtbl).SetPreviewRotation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_preview_rotation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetPreviewRotation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_record_rotation(&mut self, value: VideoRotation) -> Result<()> { + let hr = ((*self.lpVtbl).SetRecordRotation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_record_rotation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetRecordRotation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MediaCaptureSettings: IMediaCaptureSettings} + DEFINE_IID!(IID_IMediaCapture2, 2630255200, 32161, 16451, 182, 82, 33, 184, 135, 141, 175, 249); + RT_INTERFACE!{interface IMediaCapture2(IMediaCapture2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCapture2] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn PrepareLowLagRecordToStorageFileAsync(&mut self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn PrepareLowLagRecordToStreamAsync(&mut self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PrepareLowLagRecordToCustomSinkAsync(&mut self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customMediaSink: *mut super::IMediaExtension, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PrepareLowLagRecordToCustomSinkIdAsync(&mut self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customSinkActivationId: HSTRING, customSinkSettings: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PrepareLowLagPhotoCaptureAsync(&mut self, type_: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PrepareLowLagPhotoSequenceCaptureAsync(&mut self, type_: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SetEncodingPropertiesAsync(&mut self, mediaStreamType: MediaStreamType, mediaEncodingProperties: *mut super::mediaproperties::IMediaEncodingProperties, encoderProperties: *mut super::mediaproperties::MediaPropertySet, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IMediaCapture2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn prepare_low_lag_record_to_storage_file_async(&mut self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, file: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareLowLagRecordToStorageFileAsync)(self, encodingProfile as *const _ as *mut _, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn prepare_low_lag_record_to_stream_async(&mut self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareLowLagRecordToStreamAsync)(self, encodingProfile as *const _ as *mut _, stream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn prepare_low_lag_record_to_custom_sink_async(&mut self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customMediaSink: &super::IMediaExtension) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareLowLagRecordToCustomSinkAsync)(self, encodingProfile as *const _ as *mut _, customMediaSink as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn prepare_low_lag_record_to_custom_sink_id_async(&mut self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customSinkActivationId: &HStringArg, customSinkSettings: &super::super::foundation::collections::IPropertySet) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareLowLagRecordToCustomSinkIdAsync)(self, encodingProfile as *const _ as *mut _, customSinkActivationId.get(), customSinkSettings as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn prepare_low_lag_photo_capture_async(&mut self, type_: &super::mediaproperties::ImageEncodingProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareLowLagPhotoCaptureAsync)(self, type_ as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn prepare_low_lag_photo_sequence_capture_async(&mut self, type_: &super::mediaproperties::ImageEncodingProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareLowLagPhotoSequenceCaptureAsync)(self, type_ as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_encoding_properties_async(&mut self, mediaStreamType: MediaStreamType, mediaEncodingProperties: &super::mediaproperties::IMediaEncodingProperties, encoderProperties: &super::mediaproperties::MediaPropertySet) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetEncodingPropertiesAsync)(self, mediaStreamType, mediaEncodingProperties as *const _ as *mut _, encoderProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LowLagMediaRecording: ILowLagMediaRecording} + RT_CLASS!{class LowLagPhotoCapture: ILowLagPhotoCapture} + RT_CLASS!{class LowLagPhotoSequenceCapture: ILowLagPhotoSequenceCapture} + DEFINE_IID!(IID_IMediaCapture3, 3558043440, 5476, 18030, 188, 10, 175, 148, 224, 42, 176, 22); + RT_INTERFACE!{interface IMediaCapture3(IMediaCapture3Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCapture3] { + fn PrepareVariablePhotoSequenceCaptureAsync(&mut self, type_: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_FocusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FocusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PhotoConfirmationCaptured(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PhotoConfirmationCaptured(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMediaCapture3 { + #[inline] pub unsafe fn prepare_variable_photo_sequence_capture_async(&mut self, type_: &super::mediaproperties::ImageEncodingProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareVariablePhotoSequenceCaptureAsync)(self, type_ as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_focus_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FocusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_focus_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FocusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_photo_confirmation_captured(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PhotoConfirmationCaptured)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_photo_confirmation_captured(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PhotoConfirmationCaptured)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaCaptureFocusChangedEventArgs: IMediaCaptureFocusChangedEventArgs} + RT_CLASS!{class PhotoConfirmationCapturedEventArgs: IPhotoConfirmationCapturedEventArgs} + DEFINE_IID!(IID_IMediaCapture4, 3134025686, 64264, 18759, 174, 162, 206, 20, 239, 240, 206, 19); + RT_INTERFACE!{interface IMediaCapture4(IMediaCapture4Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCapture4] { + fn AddAudioEffectAsync(&mut self, definition: *mut super::effects::IAudioEffectDefinition, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn AddVideoEffectAsync(&mut self, definition: *mut super::effects::IVideoEffectDefinition, mediaStreamType: MediaStreamType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PauseRecordAsync(&mut self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ResumeRecordAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn add_CameraStreamStateChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraStreamStateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_CameraStreamState(&mut self, out: *mut super::devices::CameraStreamState) -> HRESULT, + fn GetPreviewFrameAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetPreviewFrameCopyAsync(&mut self, destination: *mut super::VideoFrame, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_ThermalStatusChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ThermalStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_ThermalStatus(&mut self, out: *mut MediaCaptureThermalStatus) -> HRESULT, + fn PrepareAdvancedPhotoCaptureAsync(&mut self, encodingProperties: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMediaCapture4 { + #[inline] pub unsafe fn add_audio_effect_async(&mut self, definition: &super::effects::IAudioEffectDefinition) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddAudioEffectAsync)(self, definition as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_video_effect_async(&mut self, definition: &super::effects::IVideoEffectDefinition, mediaStreamType: MediaStreamType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddVideoEffectAsync)(self, definition as *const _ as *mut _, mediaStreamType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pause_record_async(&mut self, behavior: super::devices::MediaCapturePauseBehavior) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PauseRecordAsync)(self, behavior, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn resume_record_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ResumeRecordAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_camera_stream_state_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CameraStreamStateChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_camera_stream_state_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CameraStreamStateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_camera_stream_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CameraStreamState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_preview_frame_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPreviewFrameAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_preview_frame_copy_async(&mut self, destination: &super::VideoFrame) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPreviewFrameCopyAsync)(self, destination as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_thermal_status_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ThermalStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_thermal_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ThermalStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_thermal_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ThermalStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn prepare_advanced_photo_capture_async(&mut self, encodingProperties: &super::mediaproperties::ImageEncodingProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareAdvancedPhotoCaptureAsync)(self, encodingProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AdvancedPhotoCapture: IAdvancedPhotoCapture} + DEFINE_IID!(IID_IMediaCapture5, 3665329186, 15003, 18208, 167, 30, 151, 144, 10, 49, 110, 90); + RT_INTERFACE!{interface IMediaCapture5(IMediaCapture5Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCapture5] { + fn RemoveEffectAsync(&mut self, effect: *mut super::IMediaExtension, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn PauseRecordWithResultAsync(&mut self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn StopRecordWithResultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_FrameSources(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn CreateFrameReaderAsync(&mut self, inputSource: *mut frames::MediaFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFrameReaderWithSubtypeAsync(&mut self, inputSource: *mut frames::MediaFrameSource, outputSubtype: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.graphics")] fn CreateFrameReaderWithSubtypeAndSizeAsync(&mut self, inputSource: *mut frames::MediaFrameSource, outputSubtype: HSTRING, outputSize: super::super::graphics::imaging::BitmapSize, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMediaCapture5 { + #[inline] pub unsafe fn remove_effect_async(&mut self, effect: &super::IMediaExtension) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RemoveEffectAsync)(self, effect as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pause_record_with_result_async(&mut self, behavior: super::devices::MediaCapturePauseBehavior) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PauseRecordWithResultAsync)(self, behavior, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_record_with_result_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopRecordWithResultAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_sources(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameSources)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_frame_reader_async(&mut self, inputSource: &frames::MediaFrameSource) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFrameReaderAsync)(self, inputSource as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_frame_reader_with_subtype_async(&mut self, inputSource: &frames::MediaFrameSource, outputSubtype: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFrameReaderWithSubtypeAsync)(self, inputSource as *const _ as *mut _, outputSubtype.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn create_frame_reader_with_subtype_and_size_async(&mut self, inputSource: &frames::MediaFrameSource, outputSubtype: &HStringArg, outputSize: super::super::graphics::imaging::BitmapSize) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFrameReaderWithSubtypeAndSizeAsync)(self, inputSource as *const _ as *mut _, outputSubtype.get(), outputSize, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaCapturePauseResult: IMediaCapturePauseResult} + RT_CLASS!{class MediaCaptureStopResult: IMediaCaptureStopResult} + DEFINE_IID!(IID_ILowLagPhotoCapture, 2742178231, 27460, 18237, 143, 36, 247, 3, 214, 192, 236, 68); + RT_INTERFACE!{interface ILowLagPhotoCapture(ILowLagPhotoCaptureVtbl): IInspectable(IInspectableVtbl) [IID_ILowLagPhotoCapture] { + fn CaptureAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FinishAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl ILowLagPhotoCapture { + #[inline] pub unsafe fn capture_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CaptureAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn finish_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FinishAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CapturedPhoto: ICapturedPhoto} + DEFINE_IID!(IID_IAdvancedPhotoCapture, 2214570746, 26215, 17628, 151, 60, 166, 188, 229, 150, 170, 15); + RT_INTERFACE!{interface IAdvancedPhotoCapture(IAdvancedPhotoCaptureVtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedPhotoCapture] { + fn CaptureAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CaptureWithContextAsync(&mut self, context: *mut IInspectable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_OptionalReferencePhotoCaptured(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_OptionalReferencePhotoCaptured(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AllPhotosCaptured(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AllPhotosCaptured(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn FinishAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IAdvancedPhotoCapture { + #[inline] pub unsafe fn capture_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CaptureAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn capture_with_context_async(&mut self, context: &IInspectable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CaptureWithContextAsync)(self, context as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_optional_reference_photo_captured(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_OptionalReferencePhotoCaptured)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_optional_reference_photo_captured(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_OptionalReferencePhotoCaptured)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_all_photos_captured(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AllPhotosCaptured)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_all_photos_captured(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AllPhotosCaptured)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn finish_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FinishAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AdvancedCapturedPhoto: IAdvancedCapturedPhoto} + RT_CLASS!{class OptionalReferencePhotoCapturedEventArgs: IOptionalReferencePhotoCapturedEventArgs} + DEFINE_IID!(IID_IAdvancedCapturedPhoto, 4034032267, 45714, 17553, 157, 65, 153, 128, 122, 85, 11, 191); + RT_INTERFACE!{interface IAdvancedCapturedPhoto(IAdvancedCapturedPhotoVtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedCapturedPhoto] { + fn get_Frame(&mut self, out: *mut *mut CapturedFrame) -> HRESULT, + fn get_Mode(&mut self, out: *mut super::devices::AdvancedPhotoMode) -> HRESULT, + fn get_Context(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IAdvancedCapturedPhoto { + #[inline] pub unsafe fn get_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Frame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_context(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Context)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CapturedFrame: ICapturedFrame} + DEFINE_IID!(IID_IAdvancedCapturedPhoto2, 416247000, 53246, 17112, 129, 4, 1, 123, 179, 24, 244, 161); + RT_INTERFACE!{interface IAdvancedCapturedPhoto2(IAdvancedCapturedPhoto2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedCapturedPhoto2] { + fn get_FrameBoundsRelativeToReferencePhoto(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IAdvancedCapturedPhoto2 { + #[inline] pub unsafe fn get_frame_bounds_relative_to_reference_photo(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameBoundsRelativeToReferencePhoto)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IOptionalReferencePhotoCapturedEventArgs, 1192200371, 7789, 16465, 156, 139, 241, 216, 90, 240, 71, 183); + RT_INTERFACE!{interface IOptionalReferencePhotoCapturedEventArgs(IOptionalReferencePhotoCapturedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IOptionalReferencePhotoCapturedEventArgs] { + fn get_Frame(&mut self, out: *mut *mut CapturedFrame) -> HRESULT, + fn get_Context(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IOptionalReferencePhotoCapturedEventArgs { + #[inline] pub unsafe fn get_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Frame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_context(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Context)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILowLagMediaRecording, 1103674103, 65343, 18928, 164, 119, 241, 149, 227, 206, 81, 8); + RT_INTERFACE!{interface ILowLagMediaRecording(ILowLagMediaRecordingVtbl): IInspectable(IInspectableVtbl) [IID_ILowLagMediaRecording] { + fn StartAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StopAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn FinishAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl ILowLagMediaRecording { + #[inline] pub unsafe fn start_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn finish_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FinishAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILowLagMediaRecording2, 1667876696, 22084, 16866, 151, 175, 142, 245, 106, 37, 226, 37); + RT_INTERFACE!{interface ILowLagMediaRecording2(ILowLagMediaRecording2Vtbl): IInspectable(IInspectableVtbl) [IID_ILowLagMediaRecording2] { + fn PauseAsync(&mut self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ResumeAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl ILowLagMediaRecording2 { + #[inline] pub unsafe fn pause_async(&mut self, behavior: super::devices::MediaCapturePauseBehavior) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PauseAsync)(self, behavior, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn resume_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ResumeAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILowLagMediaRecording3, 1546890002, 18679, 18394, 180, 30, 144, 136, 10, 95, 224, 236); + RT_INTERFACE!{interface ILowLagMediaRecording3(ILowLagMediaRecording3Vtbl): IInspectable(IInspectableVtbl) [IID_ILowLagMediaRecording3] { + fn PauseWithResultAsync(&mut self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn StopWithResultAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ILowLagMediaRecording3 { + #[inline] pub unsafe fn pause_with_result_async(&mut self, behavior: super::devices::MediaCapturePauseBehavior) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PauseWithResultAsync)(self, behavior, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_with_result_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopWithResultAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCapturePauseResult, 2932112547, 17527, 19204, 160, 111, 44, 28, 81, 130, 254, 157); + RT_INTERFACE!{interface IMediaCapturePauseResult(IMediaCapturePauseResultVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCapturePauseResult] { + fn get_LastFrame(&mut self, out: *mut *mut super::VideoFrame) -> HRESULT, + fn get_RecordDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IMediaCapturePauseResult { + #[inline] pub unsafe fn get_last_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LastFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_record_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RecordDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCaptureStopResult, 4191906346, 41106, 19153, 151, 212, 242, 1, 249, 208, 130, 219); + RT_INTERFACE!{interface IMediaCaptureStopResult(IMediaCaptureStopResultVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureStopResult] { + fn get_LastFrame(&mut self, out: *mut *mut super::VideoFrame) -> HRESULT, + fn get_RecordDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IMediaCaptureStopResult { + #[inline] pub unsafe fn get_last_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LastFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_record_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RecordDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILowLagPhotoSequenceCapture, 2093172411, 47529, 19601, 143, 250, 40, 126, 156, 102, 134, 105); + RT_INTERFACE!{interface ILowLagPhotoSequenceCapture(ILowLagPhotoSequenceCaptureVtbl): IInspectable(IInspectableVtbl) [IID_ILowLagPhotoSequenceCapture] { + fn StartAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StopAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn FinishAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn add_PhotoCaptured(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PhotoCaptured(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ILowLagPhotoSequenceCapture { + #[inline] pub unsafe fn start_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn finish_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FinishAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_photo_captured(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PhotoCaptured)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_photo_captured(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PhotoCaptured)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PhotoCapturedEventArgs: IPhotoCapturedEventArgs} + DEFINE_IID!(IID_ICapturedFrameControlValues, 2428918655, 19981, 19620, 136, 45, 122, 20, 79, 237, 10, 144); + RT_INTERFACE!{interface ICapturedFrameControlValues(ICapturedFrameControlValuesVtbl): IInspectable(IInspectableVtbl) [IID_ICapturedFrameControlValues] { + fn get_Exposure(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_ExposureCompensation(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_IsoSpeed(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Focus(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_SceneMode(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Flashed(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_FlashPowerPercent(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_WhiteBalance(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_ZoomFactor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl ICapturedFrameControlValues { + #[inline] pub unsafe fn get_exposure(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Exposure)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_exposure_compensation(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExposureCompensation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_iso_speed(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsoSpeed)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Focus)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_scene_mode(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SceneMode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_flashed(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Flashed)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_flash_power_percent(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FlashPowerPercent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_white_balance(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WhiteBalance)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zoom_factor(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZoomFactor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_STRUCT! { struct WhiteBalanceGain { + R: f64, G: f64, B: f64, + }} + DEFINE_IID!(IID_ICapturedFrameControlValues2, 1342909320, 1746, 19111, 167, 219, 211, 122, 247, 51, 33, 216); + RT_INTERFACE!{interface ICapturedFrameControlValues2(ICapturedFrameControlValues2Vtbl): IInspectable(IInspectableVtbl) [IID_ICapturedFrameControlValues2] { + fn get_FocusState(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_IsoDigitalGain(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_IsoAnalogGain(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_SensorFrameRate(&mut self, out: *mut *mut super::mediaproperties::MediaRatio) -> HRESULT, + fn get_WhiteBalanceGain(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl ICapturedFrameControlValues2 { + #[inline] pub unsafe fn get_focus_state(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FocusState)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_iso_digital_gain(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsoDigitalGain)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_iso_analog_gain(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsoAnalogGain)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sensor_frame_rate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SensorFrameRate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_white_balance_gain(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WhiteBalanceGain)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CapturedFrameControlValues: ICapturedFrameControlValues} + DEFINE_IID!(IID_IPhotoCapturedEventArgs, 926677953, 38990, 20464, 191, 133, 28, 0, 170, 188, 90, 69); + RT_INTERFACE!{interface IPhotoCapturedEventArgs(IPhotoCapturedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoCapturedEventArgs] { + fn get_Frame(&mut self, out: *mut *mut CapturedFrame) -> HRESULT, + fn get_Thumbnail(&mut self, out: *mut *mut CapturedFrame) -> HRESULT, + fn get_CaptureTimeOffset(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IPhotoCapturedEventArgs { + #[inline] pub unsafe fn get_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Frame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capture_time_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CaptureTimeOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICapturedPhoto, 2966322778, 53196, 19820, 138, 209, 8, 105, 32, 138, 202, 22); + RT_INTERFACE!{interface ICapturedPhoto(ICapturedPhotoVtbl): IInspectable(IInspectableVtbl) [IID_ICapturedPhoto] { + fn get_Frame(&mut self, out: *mut *mut CapturedFrame) -> HRESULT, + fn get_Thumbnail(&mut self, out: *mut *mut CapturedFrame) -> HRESULT + }} + impl ICapturedPhoto { + #[inline] pub unsafe fn get_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Frame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICapturedFrame, 500358687, 22299, 17624, 142, 128, 160, 138, 21, 120, 118, 110); + RT_INTERFACE!{interface ICapturedFrame(ICapturedFrameVtbl): IInspectable(IInspectableVtbl) [IID_ICapturedFrame] { + fn get_Width(&mut self, out: *mut u32) -> HRESULT, + fn get_Height(&mut self, out: *mut u32) -> HRESULT + }} + impl ICapturedFrame { + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICapturedFrameWithSoftwareBitmap, 3046017902, 34051, 18869, 158, 134, 137, 125, 38, 163, 255, 61); + RT_INTERFACE!{interface ICapturedFrameWithSoftwareBitmap(ICapturedFrameWithSoftwareBitmapVtbl): IInspectable(IInspectableVtbl) [IID_ICapturedFrameWithSoftwareBitmap] { + #[cfg(feature="windows.graphics")] fn get_SoftwareBitmap(&mut self, out: *mut *mut super::super::graphics::imaging::SoftwareBitmap) -> HRESULT + }} + impl ICapturedFrameWithSoftwareBitmap { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_software_bitmap(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SoftwareBitmap)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCaptureVideoPreview, 661811315, 21662, 17535, 162, 10, 79, 3, 196, 121, 216, 192); + RT_INTERFACE!{interface IMediaCaptureVideoPreview(IMediaCaptureVideoPreviewVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureVideoPreview] { + fn StartPreviewAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StartPreviewToCustomSinkAsync(&mut self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customMediaSink: *mut super::IMediaExtension, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StartPreviewToCustomSinkIdAsync(&mut self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customSinkActivationId: HSTRING, customSinkSettings: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StopPreviewAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IMediaCaptureVideoPreview { + #[inline] pub unsafe fn start_preview_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartPreviewAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_preview_to_custom_sink_async(&mut self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customMediaSink: &super::IMediaExtension) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartPreviewToCustomSinkAsync)(self, encodingProfile as *const _ as *mut _, customMediaSink as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_preview_to_custom_sink_id_async(&mut self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customSinkActivationId: &HStringArg, customSinkSettings: &super::super::foundation::collections::IPropertySet) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartPreviewToCustomSinkIdAsync)(self, encodingProfile as *const _ as *mut _, customSinkActivationId.get(), customSinkSettings as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_preview_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopPreviewAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCaptureSettings, 495168254, 27973, 17527, 141, 196, 172, 91, 192, 28, 64, 145); + RT_INTERFACE!{interface IMediaCaptureSettings(IMediaCaptureSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureSettings] { + fn get_AudioDeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_VideoDeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_StreamingCaptureMode(&mut self, out: *mut StreamingCaptureMode) -> HRESULT, + fn get_PhotoCaptureSource(&mut self, out: *mut PhotoCaptureSource) -> HRESULT, + fn get_VideoDeviceCharacteristic(&mut self, out: *mut VideoDeviceCharacteristic) -> HRESULT + }} + impl IMediaCaptureSettings { + #[inline] pub unsafe fn get_audio_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudioDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_streaming_capture_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StreamingCaptureMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_photo_capture_source(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhotoCaptureSource)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_device_characteristic(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VideoDeviceCharacteristic)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCaptureSettings2, 1872657659, 64159, 19219, 156, 190, 90, 185, 79, 31, 52, 147); + RT_INTERFACE!{interface IMediaCaptureSettings2(IMediaCaptureSettings2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureSettings2] { + fn get_ConcurrentRecordAndPhotoSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_ConcurrentRecordAndPhotoSequenceSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_CameraSoundRequiredForRegion(&mut self, out: *mut bool) -> HRESULT, + fn get_Horizontal35mmEquivalentFocalLength(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_PitchOffsetDegrees(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Vertical35mmEquivalentFocalLength(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_MediaCategory(&mut self, out: *mut MediaCategory) -> HRESULT, + fn get_AudioProcessing(&mut self, out: *mut super::AudioProcessing) -> HRESULT + }} + impl IMediaCaptureSettings2 { + #[inline] pub unsafe fn get_concurrent_record_and_photo_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConcurrentRecordAndPhotoSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_concurrent_record_and_photo_sequence_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConcurrentRecordAndPhotoSequenceSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_camera_sound_required_for_region(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CameraSoundRequiredForRegion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_horizontal35mm_equivalent_focal_length(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Horizontal35mmEquivalentFocalLength)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pitch_offset_degrees(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PitchOffsetDegrees)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical35mm_equivalent_focal_length(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Vertical35mmEquivalentFocalLength)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_category(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediaCategory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_processing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioProcessing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCaptureFocusChangedEventArgs, 2179054719, 8823, 18750, 171, 238, 211, 244, 79, 249, 140, 4); + RT_INTERFACE!{interface IMediaCaptureFocusChangedEventArgs(IMediaCaptureFocusChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureFocusChangedEventArgs] { + fn get_FocusState(&mut self, out: *mut super::devices::MediaCaptureFocusState) -> HRESULT + }} + impl IMediaCaptureFocusChangedEventArgs { + #[inline] pub unsafe fn get_focus_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FocusState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoConfirmationCapturedEventArgs, 2873570930, 49802, 18471, 143, 141, 54, 54, 211, 190, 181, 30); + RT_INTERFACE!{interface IPhotoConfirmationCapturedEventArgs(IPhotoConfirmationCapturedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoConfirmationCapturedEventArgs] { + fn get_Frame(&mut self, out: *mut *mut CapturedFrame) -> HRESULT, + fn get_CaptureTimeOffset(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IPhotoConfirmationCapturedEventArgs { + #[inline] pub unsafe fn get_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Frame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capture_time_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CaptureTimeOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoStreamConfiguration, 3631680111, 17296, 19294, 173, 62, 15, 138, 240, 150, 52, 144); + RT_INTERFACE!{interface IVideoStreamConfiguration(IVideoStreamConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IVideoStreamConfiguration] { + fn get_InputProperties(&mut self, out: *mut *mut super::mediaproperties::VideoEncodingProperties) -> HRESULT, + fn get_OutputProperties(&mut self, out: *mut *mut super::mediaproperties::VideoEncodingProperties) -> HRESULT + }} + impl IVideoStreamConfiguration { + #[inline] pub unsafe fn get_input_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_output_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutputProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VideoStreamConfiguration: IVideoStreamConfiguration} + RT_STRUCT! { struct CameraCaptureUIContract { + + }} + DEFINE_IID!(IID_ICameraOptionsUIStatics, 990731828, 14598, 19325, 148, 108, 123, 222, 132, 68, 153, 174); + RT_INTERFACE!{static interface ICameraOptionsUIStatics(ICameraOptionsUIStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICameraOptionsUIStatics] { + fn Show(&mut self, mediaCapture: *mut MediaCapture) -> HRESULT + }} + impl ICameraOptionsUIStatics { + #[inline] pub unsafe fn show(&mut self, mediaCapture: &MediaCapture) -> Result<()> { + let hr = ((*self.lpVtbl).Show)(self, mediaCapture as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ICameraOptionsUIStatics [CLSID_CameraOptionsUI]} + DEFINE_CLSID!(CLSID_CameraOptionsUI = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,97,112,116,117,114,101,46,67,97,109,101,114,97,79,112,116,105,111,110,115,85,73,0]); +pub mod frames { // Windows.Media.Capture.Frames +use ::prelude::*; + RT_CLASS!{class MediaFrameSourceGroup: IMediaFrameSourceGroup} + RT_ACTIVATABLE!{IMediaFrameSourceGroupStatics [CLSID_MediaFrameSourceGroup]} + DEFINE_CLSID!(CLSID_MediaFrameSourceGroup = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,97,112,116,117,114,101,46,70,114,97,109,101,115,46,77,101,100,105,97,70,114,97,109,101,83,111,117,114,99,101,71,114,111,117,112,0]); + RT_CLASS!{class MediaFrameSource: IMediaFrameSource} + RT_CLASS!{class MediaFrameReader: IMediaFrameReader} + RT_ENUM! { enum MediaFrameReaderStartStatus: i32 { + Success (MediaFrameReaderStartStatus_Success) = 0, UnknownFailure (MediaFrameReaderStartStatus_UnknownFailure) = 1, DeviceNotAvailable (MediaFrameReaderStartStatus_DeviceNotAvailable) = 2, OutputFormatNotSupported (MediaFrameReaderStartStatus_OutputFormatNotSupported) = 3, + }} + RT_ENUM! { enum MediaFrameSourceSetPropertyStatus: i32 { + Success (MediaFrameSourceSetPropertyStatus_Success) = 0, UnknownFailure (MediaFrameSourceSetPropertyStatus_UnknownFailure) = 1, NotSupported (MediaFrameSourceSetPropertyStatus_NotSupported) = 2, InvalidValue (MediaFrameSourceSetPropertyStatus_InvalidValue) = 3, DeviceNotAvailable (MediaFrameSourceSetPropertyStatus_DeviceNotAvailable) = 4, NotInControl (MediaFrameSourceSetPropertyStatus_NotInControl) = 5, + }} + RT_ENUM! { enum MediaFrameSourceGetPropertyStatus: i32 { + Success (MediaFrameSourceGetPropertyStatus_Success) = 0, UnknownFailure (MediaFrameSourceGetPropertyStatus_UnknownFailure) = 1, NotSupported (MediaFrameSourceGetPropertyStatus_NotSupported) = 2, DeviceNotAvailable (MediaFrameSourceGetPropertyStatus_DeviceNotAvailable) = 3, + }} + RT_ENUM! { enum MediaFrameSourceKind: i32 { + Custom (MediaFrameSourceKind_Custom) = 0, Color (MediaFrameSourceKind_Color) = 1, Infrared (MediaFrameSourceKind_Infrared) = 2, Depth (MediaFrameSourceKind_Depth) = 3, + }} + DEFINE_IID!(IID_IMediaFrameSourceGroup, 2137021319, 18482, 19295, 174, 61, 65, 47, 170, 179, 125, 52); + RT_INTERFACE!{interface IMediaFrameSourceGroup(IMediaFrameSourceGroupVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameSourceGroup] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SourceInfos(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IMediaFrameSourceGroup { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_source_infos(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceInfos)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaFrameSourceInfo: IMediaFrameSourceInfo} + DEFINE_IID!(IID_IMediaFrameSourceGroupStatics, 474529733, 17263, 17672, 148, 207, 213, 216, 183, 50, 100, 69); + RT_INTERFACE!{static interface IMediaFrameSourceGroupStatics(IMediaFrameSourceGroupStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameSourceGroupStatics] { + fn FindAllAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn FromIdAsync(&mut self, id: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMediaFrameSourceGroupStatics { + #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, id: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, id.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaFrameSourceInfo, 2277362125, 17921, 16527, 145, 207, 3, 131, 24, 205, 10, 243); + RT_INTERFACE!{interface IMediaFrameSourceInfo(IMediaFrameSourceInfoVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameSourceInfo] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MediaStreamType(&mut self, out: *mut super::MediaStreamType) -> HRESULT, + fn get_SourceKind(&mut self, out: *mut MediaFrameSourceKind) -> HRESULT, + fn get_SourceGroup(&mut self, out: *mut *mut MediaFrameSourceGroup) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_DeviceInformation(&mut self, out: *mut *mut ::rt::gen::windows::devices::enumeration::DeviceInformation) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + #[cfg(feature="windows.perception")] fn get_CoordinateSystem(&mut self, out: *mut *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> HRESULT + }} + impl IMediaFrameSourceInfo { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_stream_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediaStreamType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_source_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceGroup)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn get_coordinate_system(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CoordinateSystem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaFrameSource, 3598199123, 37083, 18088, 138, 221, 42, 168, 132, 168, 210, 83); + RT_INTERFACE!{interface IMediaFrameSource(IMediaFrameSourceVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameSource] { + fn get_Info(&mut self, out: *mut *mut MediaFrameSourceInfo) -> HRESULT, + fn get_Controller(&mut self, out: *mut *mut MediaFrameSourceController) -> HRESULT, + fn get_SupportedFormats(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_CurrentFormat(&mut self, out: *mut *mut MediaFrameFormat) -> HRESULT, + fn SetFormatAsync(&mut self, format: *mut MediaFrameFormat, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn add_FormatChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FormatChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn TryGetCameraIntrinsics(&mut self, format: *mut MediaFrameFormat, out: *mut *mut super::super::devices::core::CameraIntrinsics) -> HRESULT + }} + impl IMediaFrameSource { + #[inline] pub unsafe fn get_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Info)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_controller(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Controller)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_formats(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedFormats)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_format_async(&mut self, format: &MediaFrameFormat) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetFormatAsync)(self, format as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_format_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FormatChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_format_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FormatChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_camera_intrinsics(&mut self, format: &MediaFrameFormat) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetCameraIntrinsics)(self, format as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaFrameSourceController: IMediaFrameSourceController} + RT_CLASS!{class MediaFrameFormat: IMediaFrameFormat} + DEFINE_IID!(IID_IMediaFrameArrivedEventArgs, 188943069, 42128, 17461, 173, 161, 154, 255, 213, 82, 57, 247); + RT_INTERFACE!{interface IMediaFrameArrivedEventArgs(IMediaFrameArrivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameArrivedEventArgs] { + + }} + RT_CLASS!{class MediaFrameArrivedEventArgs: IMediaFrameArrivedEventArgs} + DEFINE_IID!(IID_IMediaFrameReader, 3838395285, 8232, 18669, 144, 176, 209, 193, 177, 98, 226, 76); + RT_INTERFACE!{interface IMediaFrameReader(IMediaFrameReaderVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameReader] { + fn add_FrameArrived(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FrameArrived(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn TryAcquireLatestFrame(&mut self, out: *mut *mut MediaFrameReference) -> HRESULT, + fn StartAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn StopAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IMediaFrameReader { + #[inline] pub unsafe fn add_frame_arrived(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FrameArrived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_frame_arrived(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FrameArrived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_acquire_latest_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryAcquireLatestFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaFrameReference: IMediaFrameReference} + DEFINE_IID!(IID_IMediaFrameSourceController, 1829201461, 12653, 19343, 183, 182, 238, 176, 74, 140, 101, 37); + RT_INTERFACE!{interface IMediaFrameSourceController(IMediaFrameSourceControllerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameSourceController] { + fn GetPropertyAsync(&mut self, propertyId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn SetPropertyAsync(&mut self, propertyId: HSTRING, propertyValue: *mut IInspectable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn get_VideoDeviceController(&mut self, out: *mut *mut super::super::devices::VideoDeviceController) -> HRESULT + }} + impl IMediaFrameSourceController { + #[inline] pub unsafe fn get_property_async(&mut self, propertyId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPropertyAsync)(self, propertyId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_property_async(&mut self, propertyId: &HStringArg, propertyValue: &IInspectable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetPropertyAsync)(self, propertyId.get(), propertyValue as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_device_controller(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoDeviceController)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaFrameSourceGetPropertyResult: IMediaFrameSourceGetPropertyResult} + DEFINE_IID!(IID_IMediaFrameSourceGetPropertyResult, 143005378, 14948, 19413, 189, 43, 231, 200, 152, 210, 243, 122); + RT_INTERFACE!{interface IMediaFrameSourceGetPropertyResult(IMediaFrameSourceGetPropertyResultVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameSourceGetPropertyResult] { + fn get_Status(&mut self, out: *mut MediaFrameSourceGetPropertyStatus) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IMediaFrameSourceGetPropertyResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaFrameFormat, 1905273678, 45689, 19095, 169, 219, 189, 90, 47, 183, 143, 57); + RT_INTERFACE!{interface IMediaFrameFormat(IMediaFrameFormatVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameFormat] { + fn get_MajorType(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Subtype(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FrameRate(&mut self, out: *mut *mut super::super::mediaproperties::MediaRatio) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn get_VideoFormat(&mut self, out: *mut *mut VideoMediaFrameFormat) -> HRESULT + }} + impl IMediaFrameFormat { + #[inline] pub unsafe fn get_major_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MajorType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subtype(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subtype)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_rate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameRate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VideoMediaFrameFormat: IVideoMediaFrameFormat} + DEFINE_IID!(IID_IVideoMediaFrameFormat, 1174568896, 55067, 17863, 143, 20, 109, 154, 10, 230, 4, 228); + RT_INTERFACE!{interface IVideoMediaFrameFormat(IVideoMediaFrameFormatVtbl): IInspectable(IInspectableVtbl) [IID_IVideoMediaFrameFormat] { + fn get_MediaFrameFormat(&mut self, out: *mut *mut MediaFrameFormat) -> HRESULT, + fn get_DepthFormat(&mut self, out: *mut *mut DepthMediaFrameFormat) -> HRESULT, + fn get_Width(&mut self, out: *mut u32) -> HRESULT, + fn get_Height(&mut self, out: *mut u32) -> HRESULT + }} + impl IVideoMediaFrameFormat { + #[inline] pub unsafe fn get_media_frame_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaFrameFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_depth_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DepthFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class DepthMediaFrameFormat: IDepthMediaFrameFormat} + DEFINE_IID!(IID_IMediaFrameReference, 4139288129, 61660, 16452, 141, 201, 150, 28, 237, 208, 91, 173); + RT_INTERFACE!{interface IMediaFrameReference(IMediaFrameReferenceVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameReference] { + fn get_SourceKind(&mut self, out: *mut MediaFrameSourceKind) -> HRESULT, + fn get_Format(&mut self, out: *mut *mut MediaFrameFormat) -> HRESULT, + fn get_SystemRelativeTime(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, + fn get_Duration(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn get_BufferMediaFrame(&mut self, out: *mut *mut BufferMediaFrame) -> HRESULT, + fn get_VideoMediaFrame(&mut self, out: *mut *mut VideoMediaFrame) -> HRESULT, + #[cfg(feature="windows.perception")] fn get_CoordinateSystem(&mut self, out: *mut *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> HRESULT + }} + impl IMediaFrameReference { + #[inline] pub unsafe fn get_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Format)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_relative_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SystemRelativeTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_buffer_media_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BufferMediaFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_media_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoMediaFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn get_coordinate_system(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CoordinateSystem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BufferMediaFrame: IBufferMediaFrame} + RT_CLASS!{class VideoMediaFrame: IVideoMediaFrame} + DEFINE_IID!(IID_IBufferMediaFrame, 3048297415, 39812, 16482, 183, 156, 163, 101, 178, 89, 104, 84); + RT_INTERFACE!{interface IBufferMediaFrame(IBufferMediaFrameVtbl): IInspectable(IInspectableVtbl) [IID_IBufferMediaFrame] { + fn get_FrameReference(&mut self, out: *mut *mut MediaFrameReference) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Buffer(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl IBufferMediaFrame { + #[inline] pub unsafe fn get_frame_reference(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameReference)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Buffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoMediaFrame, 14503115, 12989, 20449, 160, 19, 124, 193, 60, 245, 219, 207); + RT_INTERFACE!{interface IVideoMediaFrame(IVideoMediaFrameVtbl): IInspectable(IInspectableVtbl) [IID_IVideoMediaFrame] { + fn get_FrameReference(&mut self, out: *mut *mut MediaFrameReference) -> HRESULT, + fn get_VideoFormat(&mut self, out: *mut *mut VideoMediaFrameFormat) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_SoftwareBitmap(&mut self, out: *mut *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_Direct3DSurface(&mut self, out: *mut *mut ::rt::gen::windows::graphics::directx::direct3d11::IDirect3DSurface) -> HRESULT, + fn get_CameraIntrinsics(&mut self, out: *mut *mut super::super::devices::core::CameraIntrinsics) -> HRESULT, + fn get_InfraredMediaFrame(&mut self, out: *mut *mut InfraredMediaFrame) -> HRESULT, + fn get_DepthMediaFrame(&mut self, out: *mut *mut DepthMediaFrame) -> HRESULT, + fn GetVideoFrame(&mut self, out: *mut *mut super::super::VideoFrame) -> HRESULT + }} + impl IVideoMediaFrame { + #[inline] pub unsafe fn get_frame_reference(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameReference)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_software_bitmap(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SoftwareBitmap)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_direct3_dsurface(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Direct3DSurface)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_camera_intrinsics(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_infrared_media_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InfraredMediaFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_depth_media_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DepthMediaFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVideoFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InfraredMediaFrame: IInfraredMediaFrame} + RT_CLASS!{class DepthMediaFrame: IDepthMediaFrame} + DEFINE_IID!(IID_IInfraredMediaFrame, 1070675203, 75, 20238, 145, 172, 70, 82, 153, 180, 22, 88); + RT_INTERFACE!{interface IInfraredMediaFrame(IInfraredMediaFrameVtbl): IInspectable(IInspectableVtbl) [IID_IInfraredMediaFrame] { + fn get_FrameReference(&mut self, out: *mut *mut MediaFrameReference) -> HRESULT, + fn get_VideoMediaFrame(&mut self, out: *mut *mut VideoMediaFrame) -> HRESULT, + fn get_IsIlluminated(&mut self, out: *mut bool) -> HRESULT + }} + impl IInfraredMediaFrame { + #[inline] pub unsafe fn get_frame_reference(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameReference)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_media_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoMediaFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_illuminated(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsIlluminated)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDepthMediaFrame, 1192451663, 34121, 17856, 146, 91, 128, 211, 94, 253, 177, 10); + RT_INTERFACE!{interface IDepthMediaFrame(IDepthMediaFrameVtbl): IInspectable(IInspectableVtbl) [IID_IDepthMediaFrame] { + fn get_FrameReference(&mut self, out: *mut *mut MediaFrameReference) -> HRESULT, + fn get_VideoMediaFrame(&mut self, out: *mut *mut VideoMediaFrame) -> HRESULT, + fn get_DepthFormat(&mut self, out: *mut *mut DepthMediaFrameFormat) -> HRESULT, + #[cfg(feature="windows.perception")] fn TryCreateCoordinateMapper(&mut self, cameraIntrinsics: *mut super::super::devices::core::CameraIntrinsics, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut super::super::devices::core::DepthCorrelatedCoordinateMapper) -> HRESULT + }} + impl IDepthMediaFrame { + #[inline] pub unsafe fn get_frame_reference(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameReference)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_media_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoMediaFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_depth_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DepthFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_create_coordinate_mapper(&mut self, cameraIntrinsics: &super::super::devices::core::CameraIntrinsics, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryCreateCoordinateMapper)(self, cameraIntrinsics as *const _ as *mut _, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDepthMediaFrameFormat, 3272789824, 55081, 17726, 135, 128, 46, 4, 241, 64, 210, 142); + RT_INTERFACE!{interface IDepthMediaFrameFormat(IDepthMediaFrameFormatVtbl): IInspectable(IInspectableVtbl) [IID_IDepthMediaFrameFormat] { + fn get_VideoFormat(&mut self, out: *mut *mut VideoMediaFrameFormat) -> HRESULT, + fn get_DepthScaleInMeters(&mut self, out: *mut f64) -> HRESULT + }} + impl IDepthMediaFrameFormat { + #[inline] pub unsafe fn get_video_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_depth_scale_in_meters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DepthScaleInMeters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Media.Capture.Frames +pub mod core { // Windows.Media.Capture.Core +use ::prelude::*; + RT_CLASS!{class VariablePhotoSequenceCapture: IVariablePhotoSequenceCapture} + DEFINE_IID!(IID_IVariablePhotoCapturedEventArgs, 3521858652, 6995, 20042, 139, 92, 219, 120, 135, 172, 148, 155); + RT_INTERFACE!{interface IVariablePhotoCapturedEventArgs(IVariablePhotoCapturedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVariablePhotoCapturedEventArgs] { + fn get_Frame(&mut self, out: *mut *mut super::CapturedFrame) -> HRESULT, + fn get_CaptureTimeOffset(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_UsedFrameControllerIndex(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_CapturedFrameControlValues(&mut self, out: *mut *mut super::CapturedFrameControlValues) -> HRESULT + }} + impl IVariablePhotoCapturedEventArgs { + #[inline] pub unsafe fn get_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Frame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capture_time_offset(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CaptureTimeOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_used_frame_controller_index(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UsedFrameControllerIndex)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_captured_frame_control_values(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CapturedFrameControlValues)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VariablePhotoCapturedEventArgs: IVariablePhotoCapturedEventArgs} + DEFINE_IID!(IID_IVariablePhotoSequenceCapture, 3490786589, 798, 16449, 166, 214, 189, 116, 36, 118, 168, 238); + RT_INTERFACE!{interface IVariablePhotoSequenceCapture(IVariablePhotoSequenceCaptureVtbl): IInspectable(IInspectableVtbl) [IID_IVariablePhotoSequenceCapture] { + fn StartAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn StopAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn FinishAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn add_PhotoCaptured(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PhotoCaptured(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IVariablePhotoSequenceCapture { + #[inline] pub unsafe fn start_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn finish_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FinishAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_photo_captured(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PhotoCaptured)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_photo_captured(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PhotoCaptured)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVariablePhotoSequenceCapture2, 4264321724, 20656, 17379, 145, 124, 227, 185, 39, 152, 148, 47); + RT_INTERFACE!{interface IVariablePhotoSequenceCapture2(IVariablePhotoSequenceCapture2Vtbl): IInspectable(IInspectableVtbl) [IID_IVariablePhotoSequenceCapture2] { + fn UpdateSettingsAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IVariablePhotoSequenceCapture2 { + #[inline] pub unsafe fn update_settings_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateSettingsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Media.Capture.Core +} // Windows.Media.Capture +pub mod audio { // Windows.Media.Audio +use ::prelude::*; + RT_ENUM! { enum AudioGraphCreationStatus: i32 { + Success (AudioGraphCreationStatus_Success) = 0, DeviceNotAvailable (AudioGraphCreationStatus_DeviceNotAvailable) = 1, FormatNotSupported (AudioGraphCreationStatus_FormatNotSupported) = 2, UnknownFailure (AudioGraphCreationStatus_UnknownFailure) = 3, + }} + RT_ENUM! { enum QuantumSizeSelectionMode: i32 { + SystemDefault (QuantumSizeSelectionMode_SystemDefault) = 0, LowestLatency (QuantumSizeSelectionMode_LowestLatency) = 1, ClosestToDesired (QuantumSizeSelectionMode_ClosestToDesired) = 2, + }} + DEFINE_IID!(IID_ICreateAudioGraphResult, 1414786942, 31710, 19318, 187, 93, 72, 247, 156, 252, 140, 11); + RT_INTERFACE!{interface ICreateAudioGraphResult(ICreateAudioGraphResultVtbl): IInspectable(IInspectableVtbl) [IID_ICreateAudioGraphResult] { + fn get_Status(&mut self, out: *mut AudioGraphCreationStatus) -> HRESULT, + fn get_Graph(&mut self, out: *mut *mut AudioGraph) -> HRESULT + }} + impl ICreateAudioGraphResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_graph(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Graph)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioGraph: IAudioGraph} + RT_ACTIVATABLE!{IAudioGraphStatics [CLSID_AudioGraph]} + DEFINE_CLSID!(CLSID_AudioGraph = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,117,100,105,111,46,65,117,100,105,111,71,114,97,112,104,0]); + RT_CLASS!{class CreateAudioGraphResult: ICreateAudioGraphResult} + DEFINE_IID!(IID_IAudioGraphSettingsFactory, 2782469318, 49899, 19041, 162, 20, 29, 102, 215, 95, 131, 218); + RT_INTERFACE!{static interface IAudioGraphSettingsFactory(IAudioGraphSettingsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAudioGraphSettingsFactory] { + fn Create(&mut self, audioRenderCategory: super::render::AudioRenderCategory, out: *mut *mut AudioGraphSettings) -> HRESULT + }} + impl IAudioGraphSettingsFactory { + #[inline] pub unsafe fn create(&mut self, audioRenderCategory: super::render::AudioRenderCategory) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, audioRenderCategory, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioGraphSettings: IAudioGraphSettings [IAudioGraphSettingsFactory] [CLSID_AudioGraphSettings]} + DEFINE_CLSID!(CLSID_AudioGraphSettings = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,117,100,105,111,46,65,117,100,105,111,71,114,97,112,104,83,101,116,116,105,110,103,115,0]); + DEFINE_IID!(IID_IAudioGraphSettings, 492397695, 59134, 17960, 132, 248, 157, 139, 219, 162, 87, 133); + RT_INTERFACE!{interface IAudioGraphSettings(IAudioGraphSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IAudioGraphSettings] { + fn get_EncodingProperties(&mut self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, + fn put_EncodingProperties(&mut self, value: *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PrimaryRenderDevice(&mut self, out: *mut *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.devices")] fn put_PrimaryRenderDevice(&mut self, value: *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT, + fn get_QuantumSizeSelectionMode(&mut self, out: *mut QuantumSizeSelectionMode) -> HRESULT, + fn put_QuantumSizeSelectionMode(&mut self, value: QuantumSizeSelectionMode) -> HRESULT, + fn get_DesiredSamplesPerQuantum(&mut self, out: *mut i32) -> HRESULT, + fn put_DesiredSamplesPerQuantum(&mut self, value: i32) -> HRESULT, + fn get_AudioRenderCategory(&mut self, out: *mut super::render::AudioRenderCategory) -> HRESULT, + fn put_AudioRenderCategory(&mut self, value: super::render::AudioRenderCategory) -> HRESULT, + fn get_DesiredRenderDeviceAudioProcessing(&mut self, out: *mut super::AudioProcessing) -> HRESULT, + fn put_DesiredRenderDeviceAudioProcessing(&mut self, value: super::AudioProcessing) -> HRESULT + }} + impl IAudioGraphSettings { + #[inline] pub unsafe fn get_encoding_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_encoding_properties(&mut self, value: &super::mediaproperties::AudioEncodingProperties) -> Result<()> { + let hr = ((*self.lpVtbl).put_EncodingProperties)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_primary_render_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrimaryRenderDevice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn set_primary_render_device(&mut self, value: &super::super::devices::enumeration::DeviceInformation) -> Result<()> { + let hr = ((*self.lpVtbl).put_PrimaryRenderDevice)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_quantum_size_selection_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_QuantumSizeSelectionMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_quantum_size_selection_mode(&mut self, value: QuantumSizeSelectionMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_QuantumSizeSelectionMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_samples_per_quantum(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredSamplesPerQuantum)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_samples_per_quantum(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredSamplesPerQuantum)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_render_category(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioRenderCategory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_audio_render_category(&mut self, value: super::render::AudioRenderCategory) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioRenderCategory)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_render_device_audio_processing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredRenderDeviceAudioProcessing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_render_device_audio_processing(&mut self, value: super::AudioProcessing) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredRenderDeviceAudioProcessing)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioGraphStatics, 1995190578, 57689, 19127, 168, 42, 23, 190, 180, 179, 30, 148); + RT_INTERFACE!{static interface IAudioGraphStatics(IAudioGraphStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAudioGraphStatics] { + fn CreateAsync(&mut self, settings: *mut AudioGraphSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IAudioGraphStatics { + #[inline] pub unsafe fn create_async(&mut self, settings: &AudioGraphSettings) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAsync)(self, settings as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum AudioDeviceNodeCreationStatus: i32 { + Success (AudioDeviceNodeCreationStatus_Success) = 0, DeviceNotAvailable (AudioDeviceNodeCreationStatus_DeviceNotAvailable) = 1, FormatNotSupported (AudioDeviceNodeCreationStatus_FormatNotSupported) = 2, UnknownFailure (AudioDeviceNodeCreationStatus_UnknownFailure) = 3, AccessDenied (AudioDeviceNodeCreationStatus_AccessDenied) = 4, + }} + RT_ENUM! { enum AudioFileNodeCreationStatus: i32 { + Success (AudioFileNodeCreationStatus_Success) = 0, FileNotFound (AudioFileNodeCreationStatus_FileNotFound) = 1, InvalidFileType (AudioFileNodeCreationStatus_InvalidFileType) = 2, FormatNotSupported (AudioFileNodeCreationStatus_FormatNotSupported) = 3, UnknownFailure (AudioFileNodeCreationStatus_UnknownFailure) = 4, + }} + DEFINE_IID!(IID_ICreateAudioDeviceInputNodeResult, 384747432, 7335, 16623, 145, 164, 211, 70, 224, 170, 27, 186); + RT_INTERFACE!{interface ICreateAudioDeviceInputNodeResult(ICreateAudioDeviceInputNodeResultVtbl): IInspectable(IInspectableVtbl) [IID_ICreateAudioDeviceInputNodeResult] { + fn get_Status(&mut self, out: *mut AudioDeviceNodeCreationStatus) -> HRESULT, + fn get_DeviceInputNode(&mut self, out: *mut *mut AudioDeviceInputNode) -> HRESULT + }} + impl ICreateAudioDeviceInputNodeResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_input_node(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceInputNode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioDeviceInputNode: IAudioDeviceInputNode} + RT_CLASS!{class CreateAudioDeviceInputNodeResult: ICreateAudioDeviceInputNodeResult} + DEFINE_IID!(IID_ICreateAudioDeviceOutputNodeResult, 4151799079, 7578, 18423, 156, 212, 40, 89, 204, 27, 123, 255); + RT_INTERFACE!{interface ICreateAudioDeviceOutputNodeResult(ICreateAudioDeviceOutputNodeResultVtbl): IInspectable(IInspectableVtbl) [IID_ICreateAudioDeviceOutputNodeResult] { + fn get_Status(&mut self, out: *mut AudioDeviceNodeCreationStatus) -> HRESULT, + fn get_DeviceOutputNode(&mut self, out: *mut *mut AudioDeviceOutputNode) -> HRESULT + }} + impl ICreateAudioDeviceOutputNodeResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_output_node(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceOutputNode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioDeviceOutputNode: IAudioDeviceOutputNode} + RT_CLASS!{class CreateAudioDeviceOutputNodeResult: ICreateAudioDeviceOutputNodeResult} + DEFINE_IID!(IID_ICreateAudioFileInputNodeResult, 3464746524, 58007, 19536, 156, 231, 28, 122, 105, 214, 189, 9); + RT_INTERFACE!{interface ICreateAudioFileInputNodeResult(ICreateAudioFileInputNodeResultVtbl): IInspectable(IInspectableVtbl) [IID_ICreateAudioFileInputNodeResult] { + fn get_Status(&mut self, out: *mut AudioFileNodeCreationStatus) -> HRESULT, + fn get_FileInputNode(&mut self, out: *mut *mut AudioFileInputNode) -> HRESULT + }} + impl ICreateAudioFileInputNodeResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_input_node(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FileInputNode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioFileInputNode: IAudioFileInputNode} + RT_CLASS!{class CreateAudioFileInputNodeResult: ICreateAudioFileInputNodeResult} + DEFINE_IID!(IID_ICreateAudioFileOutputNodeResult, 1205254779, 59657, 17727, 134, 110, 85, 64, 205, 167, 52, 255); + RT_INTERFACE!{interface ICreateAudioFileOutputNodeResult(ICreateAudioFileOutputNodeResultVtbl): IInspectable(IInspectableVtbl) [IID_ICreateAudioFileOutputNodeResult] { + fn get_Status(&mut self, out: *mut AudioFileNodeCreationStatus) -> HRESULT, + fn get_FileOutputNode(&mut self, out: *mut *mut AudioFileOutputNode) -> HRESULT + }} + impl ICreateAudioFileOutputNodeResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_output_node(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FileOutputNode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioFileOutputNode: IAudioFileOutputNode} + RT_CLASS!{class CreateAudioFileOutputNodeResult: ICreateAudioFileOutputNodeResult} + RT_ENUM! { enum AudioGraphUnrecoverableError: i32 { + None (AudioGraphUnrecoverableError_None) = 0, AudioDeviceLost (AudioGraphUnrecoverableError_AudioDeviceLost) = 1, AudioSessionDisconnected (AudioGraphUnrecoverableError_AudioSessionDisconnected) = 2, UnknownFailure (AudioGraphUnrecoverableError_UnknownFailure) = 3, + }} + DEFINE_IID!(IID_IAudioGraphUnrecoverableErrorOccurredEventArgs, 3285830624, 16374, 20403, 178, 98, 80, 212, 53, 197, 84, 35); + RT_INTERFACE!{interface IAudioGraphUnrecoverableErrorOccurredEventArgs(IAudioGraphUnrecoverableErrorOccurredEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAudioGraphUnrecoverableErrorOccurredEventArgs] { + fn get_Error(&mut self, out: *mut AudioGraphUnrecoverableError) -> HRESULT + }} + impl IAudioGraphUnrecoverableErrorOccurredEventArgs { + #[inline] pub unsafe fn get_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class AudioGraphUnrecoverableErrorOccurredEventArgs: IAudioGraphUnrecoverableErrorOccurredEventArgs} + RT_CLASS!{class AudioGraphBatchUpdater: super::super::foundation::IClosable} + DEFINE_IID!(IID_IAudioGraph, 450129645, 58508, 19988, 150, 96, 44, 79, 131, 233, 205, 216); + RT_INTERFACE!{interface IAudioGraph(IAudioGraphVtbl): IInspectable(IInspectableVtbl) [IID_IAudioGraph] { + fn CreateFrameInputNode(&mut self, out: *mut *mut AudioFrameInputNode) -> HRESULT, + fn CreateFrameInputNodeWithFormat(&mut self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, out: *mut *mut AudioFrameInputNode) -> HRESULT, + fn CreateDeviceInputNodeAsync(&mut self, category: super::capture::MediaCategory, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateDeviceInputNodeWithFormatAsync(&mut self, category: super::capture::MediaCategory, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.devices")] fn CreateDeviceInputNodeWithFormatOnDeviceAsync(&mut self, category: super::capture::MediaCategory, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, device: *mut super::super::devices::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFrameOutputNode(&mut self, out: *mut *mut AudioFrameOutputNode) -> HRESULT, + fn CreateFrameOutputNodeWithFormat(&mut self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, out: *mut *mut AudioFrameOutputNode) -> HRESULT, + fn CreateDeviceOutputNodeAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFileInputNodeAsync(&mut self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFileOutputNodeAsync(&mut self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFileOutputNodeWithFileProfileAsync(&mut self, file: *mut super::super::storage::IStorageFile, fileEncodingProfile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateSubmixNode(&mut self, out: *mut *mut AudioSubmixNode) -> HRESULT, + fn CreateSubmixNodeWithFormat(&mut self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, out: *mut *mut AudioSubmixNode) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn ResetAllNodes(&mut self) -> HRESULT, + fn add_QuantumStarted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_QuantumStarted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_QuantumProcessed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_QuantumProcessed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_UnrecoverableErrorOccurred(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UnrecoverableErrorOccurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_CompletedQuantumCount(&mut self, out: *mut u64) -> HRESULT, + fn get_EncodingProperties(&mut self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, + fn get_LatencyInSamples(&mut self, out: *mut i32) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy25(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PrimaryRenderDevice(&mut self, out: *mut *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT, + fn get_RenderDeviceAudioProcessing(&mut self, out: *mut super::AudioProcessing) -> HRESULT, + fn get_SamplesPerQuantum(&mut self, out: *mut i32) -> HRESULT + }} + impl IAudioGraph { + #[inline] pub unsafe fn create_frame_input_node(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFrameInputNode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_frame_input_node_with_format(&mut self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFrameInputNodeWithFormat)(self, encodingProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_device_input_node_async(&mut self, category: super::capture::MediaCategory) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDeviceInputNodeAsync)(self, category, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_device_input_node_with_format_async(&mut self, category: super::capture::MediaCategory, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDeviceInputNodeWithFormatAsync)(self, category, encodingProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn create_device_input_node_with_format_on_device_async(&mut self, category: super::capture::MediaCategory, encodingProperties: &super::mediaproperties::AudioEncodingProperties, device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDeviceInputNodeWithFormatOnDeviceAsync)(self, category, encodingProperties as *const _ as *mut _, device as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_frame_output_node(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFrameOutputNode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_frame_output_node_with_format(&mut self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFrameOutputNodeWithFormat)(self, encodingProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_device_output_node_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDeviceOutputNodeAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_file_input_node_async(&mut self, file: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileInputNodeAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_file_output_node_async(&mut self, file: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileOutputNodeAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_file_output_node_with_file_profile_async(&mut self, file: &super::super::storage::IStorageFile, fileEncodingProfile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileOutputNodeWithFileProfileAsync)(self, file as *const _ as *mut _, fileEncodingProfile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_submix_node(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSubmixNode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_submix_node_with_format(&mut self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSubmixNodeWithFormat)(self, encodingProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn reset_all_nodes(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ResetAllNodes)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_quantum_started(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_QuantumStarted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_quantum_started(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_QuantumStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_quantum_processed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_QuantumProcessed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_quantum_processed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_QuantumProcessed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_unrecoverable_error_occurred(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UnrecoverableErrorOccurred)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_unrecoverable_error_occurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UnrecoverableErrorOccurred)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_completed_quantum_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CompletedQuantumCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_encoding_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_latency_in_samples(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LatencyInSamples)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_primary_render_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrimaryRenderDevice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_render_device_audio_processing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RenderDeviceAudioProcessing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_samples_per_quantum(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SamplesPerQuantum)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class AudioFrameInputNode: IAudioFrameInputNode} + RT_CLASS!{class AudioFrameOutputNode: IAudioFrameOutputNode} + RT_CLASS!{class AudioSubmixNode: IAudioInputNode} + DEFINE_IID!(IID_IAudioGraph2, 1313618901, 20417, 17910, 169, 71, 60, 211, 143, 79, 216, 57); + RT_INTERFACE!{interface IAudioGraph2(IAudioGraph2Vtbl): IInspectable(IInspectableVtbl) [IID_IAudioGraph2] { + fn CreateFrameInputNodeWithFormatAndEmitter(&mut self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, emitter: *mut AudioNodeEmitter, out: *mut *mut AudioFrameInputNode) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.devices")] fn CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync(&mut self, category: super::capture::MediaCategory, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, device: *mut super::super::devices::enumeration::DeviceInformation, emitter: *mut AudioNodeEmitter, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFileInputNodeWithEmitterAsync(&mut self, file: *mut super::super::storage::IStorageFile, emitter: *mut AudioNodeEmitter, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateSubmixNodeWithFormatAndEmitter(&mut self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, emitter: *mut AudioNodeEmitter, out: *mut *mut AudioSubmixNode) -> HRESULT, + fn CreateBatchUpdater(&mut self, out: *mut *mut AudioGraphBatchUpdater) -> HRESULT + }} + impl IAudioGraph2 { + #[inline] pub unsafe fn create_frame_input_node_with_format_and_emitter(&mut self, encodingProperties: &super::mediaproperties::AudioEncodingProperties, emitter: &AudioNodeEmitter) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFrameInputNodeWithFormatAndEmitter)(self, encodingProperties as *const _ as *mut _, emitter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn create_device_input_node_with_format_and_emitter_on_device_async(&mut self, category: super::capture::MediaCategory, encodingProperties: &super::mediaproperties::AudioEncodingProperties, device: &super::super::devices::enumeration::DeviceInformation, emitter: &AudioNodeEmitter) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync)(self, category, encodingProperties as *const _ as *mut _, device as *const _ as *mut _, emitter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_file_input_node_with_emitter_async(&mut self, file: &super::super::storage::IStorageFile, emitter: &AudioNodeEmitter) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileInputNodeWithEmitterAsync)(self, file as *const _ as *mut _, emitter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_submix_node_with_format_and_emitter(&mut self, encodingProperties: &super::mediaproperties::AudioEncodingProperties, emitter: &AudioNodeEmitter) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSubmixNodeWithFormatAndEmitter)(self, encodingProperties as *const _ as *mut _, emitter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_batch_updater(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBatchUpdater)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioNodeEmitter: IAudioNodeEmitter [IAudioNodeEmitterFactory] [CLSID_AudioNodeEmitter]} + DEFINE_CLSID!(CLSID_AudioNodeEmitter = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,117,100,105,111,46,65,117,100,105,111,78,111,100,101,69,109,105,116,116,101,114,0]); + DEFINE_IID!(IID_IAudioNode, 356031871, 56280, 18457, 191, 3, 102, 142, 147, 87, 205, 109); + RT_INTERFACE!{interface IAudioNode(IAudioNodeVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNode] { + fn get_EffectDefinitions(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_OutgoingGain(&mut self, value: f64) -> HRESULT, + fn get_OutgoingGain(&mut self, out: *mut f64) -> HRESULT, + fn get_EncodingProperties(&mut self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, + fn get_ConsumeInput(&mut self, out: *mut bool) -> HRESULT, + fn put_ConsumeInput(&mut self, value: bool) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn Reset(&mut self) -> HRESULT, + fn DisableEffectsByDefinition(&mut self, definition: *mut super::effects::IAudioEffectDefinition) -> HRESULT, + fn EnableEffectsByDefinition(&mut self, definition: *mut super::effects::IAudioEffectDefinition) -> HRESULT + }} + impl IAudioNode { + #[inline] pub unsafe fn get_effect_definitions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EffectDefinitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_outgoing_gain(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutgoingGain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outgoing_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutgoingGain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_encoding_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_consume_input(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConsumeInput)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_consume_input(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ConsumeInput)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn reset(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Reset)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn disable_effects_by_definition(&mut self, definition: &super::effects::IAudioEffectDefinition) -> Result<()> { + let hr = ((*self.lpVtbl).DisableEffectsByDefinition)(self, definition as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn enable_effects_by_definition(&mut self, definition: &super::effects::IAudioEffectDefinition) -> Result<()> { + let hr = ((*self.lpVtbl).EnableEffectsByDefinition)(self, definition as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioNodeWithListener, 235901052, 31231, 17732, 158, 235, 1, 37, 123, 21, 16, 90); + RT_INTERFACE!{interface IAudioNodeWithListener(IAudioNodeWithListenerVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeWithListener] { + fn put_Listener(&mut self, value: *mut AudioNodeListener) -> HRESULT, + fn get_Listener(&mut self, out: *mut *mut AudioNodeListener) -> HRESULT + }} + impl IAudioNodeWithListener { + #[inline] pub unsafe fn set_listener(&mut self, value: &AudioNodeListener) -> Result<()> { + let hr = ((*self.lpVtbl).put_Listener)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_listener(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Listener)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioNodeListener: IAudioNodeListener} + DEFINE_IID!(IID_IAudioInputNode, 3511156828, 33832, 18308, 183, 253, 169, 157, 70, 140, 93, 32); + RT_INTERFACE!{interface IAudioInputNode(IAudioInputNodeVtbl): IInspectable(IInspectableVtbl) [IID_IAudioInputNode] { + fn get_OutgoingConnections(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn AddOutgoingConnection(&mut self, destination: *mut IAudioNode) -> HRESULT, + fn AddOutgoingConnectionWithGain(&mut self, destination: *mut IAudioNode, gain: f64) -> HRESULT, + fn RemoveOutgoingConnection(&mut self, destination: *mut IAudioNode) -> HRESULT + }} + impl IAudioInputNode { + #[inline] pub unsafe fn get_outgoing_connections(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutgoingConnections)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_outgoing_connection(&mut self, destination: &IAudioNode) -> Result<()> { + let hr = ((*self.lpVtbl).AddOutgoingConnection)(self, destination as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_outgoing_connection_with_gain(&mut self, destination: &IAudioNode, gain: f64) -> Result<()> { + let hr = ((*self.lpVtbl).AddOutgoingConnectionWithGain)(self, destination as *const _ as *mut _, gain); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_outgoing_connection(&mut self, destination: &IAudioNode) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveOutgoingConnection)(self, destination as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AudioGraphConnection: IAudioGraphConnection} + DEFINE_IID!(IID_IAudioInputNode2, 2421249719, 51816, 19565, 168, 188, 227, 238, 23, 254, 63, 210); + RT_INTERFACE!{interface IAudioInputNode2(IAudioInputNode2Vtbl): IInspectable(IInspectableVtbl) [IID_IAudioInputNode2] { + fn get_Emitter(&mut self, out: *mut *mut AudioNodeEmitter) -> HRESULT + }} + impl IAudioInputNode2 { + #[inline] pub unsafe fn get_emitter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Emitter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioFrameInputNode, 28468935, 64918, 20469, 163, 197, 210, 122, 155, 244, 66, 55); + RT_INTERFACE!{interface IAudioFrameInputNode(IAudioFrameInputNodeVtbl): IInspectable(IInspectableVtbl) [IID_IAudioFrameInputNode] { + fn put_PlaybackSpeedFactor(&mut self, value: f64) -> HRESULT, + fn get_PlaybackSpeedFactor(&mut self, out: *mut f64) -> HRESULT, + fn AddFrame(&mut self, frame: *mut super::AudioFrame) -> HRESULT, + fn DiscardQueuedFrames(&mut self) -> HRESULT, + fn get_QueuedSampleCount(&mut self, out: *mut u64) -> HRESULT, + fn add_AudioFrameCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioFrameCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_QuantumStarted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_QuantumStarted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAudioFrameInputNode { + #[inline] pub unsafe fn set_playback_speed_factor(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlaybackSpeedFactor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_speed_factor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PlaybackSpeedFactor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_frame(&mut self, frame: &super::AudioFrame) -> Result<()> { + let hr = ((*self.lpVtbl).AddFrame)(self, frame as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn discard_queued_frames(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DiscardQueuedFrames)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_queued_sample_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_QueuedSampleCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_audio_frame_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AudioFrameCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_audio_frame_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AudioFrameCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_quantum_started(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_QuantumStarted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_quantum_started(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_QuantumStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AudioFrameCompletedEventArgs: IAudioFrameCompletedEventArgs} + RT_CLASS!{class FrameInputNodeQuantumStartedEventArgs: IFrameInputNodeQuantumStartedEventArgs} + DEFINE_IID!(IID_IAudioFileInputNode, 2421909448, 28517, 19668, 136, 144, 70, 148, 132, 60, 39, 109); + RT_INTERFACE!{interface IAudioFileInputNode(IAudioFileInputNodeVtbl): IInspectable(IInspectableVtbl) [IID_IAudioFileInputNode] { + fn put_PlaybackSpeedFactor(&mut self, value: f64) -> HRESULT, + fn get_PlaybackSpeedFactor(&mut self, out: *mut f64) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn Seek(&mut self, position: super::super::foundation::TimeSpan) -> HRESULT, + fn get_StartTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_StartTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_EndTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_EndTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_LoopCount(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_LoopCount(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy11(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_SourceFile(&mut self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT, + fn add_FileCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FileCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAudioFileInputNode { + #[inline] pub unsafe fn set_playback_speed_factor(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlaybackSpeedFactor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_speed_factor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PlaybackSpeedFactor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn seek(&mut self, position: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).Seek)(self, position); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_start_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_start_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_StartTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_end_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EndTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_end_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_EndTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_loop_count(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LoopCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_loop_count(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_LoopCount)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_source_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceFile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_file_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FileCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_file_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FileCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioDeviceInputNode, 2954587105, 28494, 18914, 172, 1, 85, 157, 98, 190, 179, 169); + RT_INTERFACE!{interface IAudioDeviceInputNode(IAudioDeviceInputNodeVtbl): IInspectable(IInspectableVtbl) [IID_IAudioDeviceInputNode] { + #[cfg(feature="windows.devices")] fn get_Device(&mut self, out: *mut *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT + }} + impl IAudioDeviceInputNode { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Device)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioDeviceOutputNode, 909040639, 65308, 17460, 158, 15, 189, 46, 245, 34, 172, 130); + RT_INTERFACE!{interface IAudioDeviceOutputNode(IAudioDeviceOutputNodeVtbl): IInspectable(IInspectableVtbl) [IID_IAudioDeviceOutputNode] { + #[cfg(feature="windows.devices")] fn get_Device(&mut self, out: *mut *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT + }} + impl IAudioDeviceOutputNode { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Device)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioFrameOutputNode, 3091674907, 12953, 17909, 136, 179, 201, 209, 42, 63, 28, 200); + RT_INTERFACE!{interface IAudioFrameOutputNode(IAudioFrameOutputNodeVtbl): IInspectable(IInspectableVtbl) [IID_IAudioFrameOutputNode] { + fn GetFrame(&mut self, out: *mut *mut super::AudioFrame) -> HRESULT + }} + impl IAudioFrameOutputNode { + #[inline] pub unsafe fn get_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioFileOutputNode, 1356863872, 20838, 16531, 128, 248, 173, 160, 0, 137, 233, 207); + RT_INTERFACE!{interface IAudioFileOutputNode(IAudioFileOutputNodeVtbl): IInspectable(IInspectableVtbl) [IID_IAudioFileOutputNode] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_File(&mut self, out: *mut *mut super::super::storage::IStorageFile) -> HRESULT, + fn get_FileEncodingProfile(&mut self, out: *mut *mut super::mediaproperties::MediaEncodingProfile) -> HRESULT, + fn FinalizeAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IAudioFileOutputNode { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_File)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_encoding_profile(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FileEncodingProfile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn finalize_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FinalizeAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioFrameCompletedEventArgs, 3699147422, 520, 17668, 165, 168, 240, 242, 104, 146, 10, 101); + RT_INTERFACE!{interface IAudioFrameCompletedEventArgs(IAudioFrameCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAudioFrameCompletedEventArgs] { + fn get_Frame(&mut self, out: *mut *mut super::AudioFrame) -> HRESULT + }} + impl IAudioFrameCompletedEventArgs { + #[inline] pub unsafe fn get_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Frame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameInputNodeQuantumStartedEventArgs, 1033622680, 41734, 20230, 189, 159, 233, 239, 200, 34, 99, 4); + RT_INTERFACE!{interface IFrameInputNodeQuantumStartedEventArgs(IFrameInputNodeQuantumStartedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IFrameInputNodeQuantumStartedEventArgs] { + fn get_RequiredSamples(&mut self, out: *mut i32) -> HRESULT + }} + impl IFrameInputNodeQuantumStartedEventArgs { + #[inline] pub unsafe fn get_required_samples(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequiredSamples)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioGraphConnection, 1982886125, 53326, 20396, 178, 51, 96, 11, 66, 237, 212, 105); + RT_INTERFACE!{interface IAudioGraphConnection(IAudioGraphConnectionVtbl): IInspectable(IInspectableVtbl) [IID_IAudioGraphConnection] { + fn get_Destination(&mut self, out: *mut *mut IAudioNode) -> HRESULT, + fn put_Gain(&mut self, value: f64) -> HRESULT, + fn get_Gain(&mut self, out: *mut f64) -> HRESULT + }} + impl IAudioGraphConnection { + #[inline] pub unsafe fn get_destination(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Destination)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_gain(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Gain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEqualizerBand, 3221903978, 9773, 19333, 155, 183, 67, 40, 11, 98, 237, 12); + RT_INTERFACE!{interface IEqualizerBand(IEqualizerBandVtbl): IInspectable(IInspectableVtbl) [IID_IEqualizerBand] { + fn get_Bandwidth(&mut self, out: *mut f64) -> HRESULT, + fn put_Bandwidth(&mut self, value: f64) -> HRESULT, + fn get_FrequencyCenter(&mut self, out: *mut f64) -> HRESULT, + fn put_FrequencyCenter(&mut self, value: f64) -> HRESULT, + fn get_Gain(&mut self, out: *mut f64) -> HRESULT, + fn put_Gain(&mut self, value: f64) -> HRESULT + }} + impl IEqualizerBand { + #[inline] pub unsafe fn get_bandwidth(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bandwidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bandwidth(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Bandwidth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_frequency_center(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FrequencyCenter)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_frequency_center(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_FrequencyCenter)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_gain(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Gain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class EqualizerBand: IEqualizerBand} + DEFINE_IID!(IID_IEqualizerEffectDefinitionFactory, 3532091332, 54288, 20149, 158, 105, 201, 170, 18, 119, 234, 240); + RT_INTERFACE!{static interface IEqualizerEffectDefinitionFactory(IEqualizerEffectDefinitionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IEqualizerEffectDefinitionFactory] { + fn Create(&mut self, audioGraph: *mut AudioGraph, out: *mut *mut EqualizerEffectDefinition) -> HRESULT + }} + impl IEqualizerEffectDefinitionFactory { + #[inline] pub unsafe fn create(&mut self, audioGraph: &AudioGraph) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, audioGraph as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EqualizerEffectDefinition: IEqualizerEffectDefinition [IEqualizerEffectDefinitionFactory] [CLSID_EqualizerEffectDefinition]} + DEFINE_CLSID!(CLSID_EqualizerEffectDefinition = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,117,100,105,111,46,69,113,117,97,108,105,122,101,114,69,102,102,101,99,116,68,101,102,105,110,105,116,105,111,110,0]); + DEFINE_IID!(IID_IReverbEffectDefinitionFactory, 2815806462, 4107, 20464, 157, 166, 220, 78, 5, 167, 89, 240); + RT_INTERFACE!{static interface IReverbEffectDefinitionFactory(IReverbEffectDefinitionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IReverbEffectDefinitionFactory] { + fn Create(&mut self, audioGraph: *mut AudioGraph, out: *mut *mut ReverbEffectDefinition) -> HRESULT + }} + impl IReverbEffectDefinitionFactory { + #[inline] pub unsafe fn create(&mut self, audioGraph: &AudioGraph) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, audioGraph as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ReverbEffectDefinition: IReverbEffectDefinition [IReverbEffectDefinitionFactory] [CLSID_ReverbEffectDefinition]} + DEFINE_CLSID!(CLSID_ReverbEffectDefinition = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,117,100,105,111,46,82,101,118,101,114,98,69,102,102,101,99,116,68,101,102,105,110,105,116,105,111,110,0]); + DEFINE_IID!(IID_IEchoEffectDefinitionFactory, 223224407, 43762, 20102, 165, 76, 251, 121, 219, 143, 108, 18); + RT_INTERFACE!{static interface IEchoEffectDefinitionFactory(IEchoEffectDefinitionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IEchoEffectDefinitionFactory] { + fn Create(&mut self, audioGraph: *mut AudioGraph, out: *mut *mut EchoEffectDefinition) -> HRESULT + }} + impl IEchoEffectDefinitionFactory { + #[inline] pub unsafe fn create(&mut self, audioGraph: &AudioGraph) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, audioGraph as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EchoEffectDefinition: IEchoEffectDefinition [IEchoEffectDefinitionFactory] [CLSID_EchoEffectDefinition]} + DEFINE_CLSID!(CLSID_EchoEffectDefinition = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,117,100,105,111,46,69,99,104,111,69,102,102,101,99,116,68,101,102,105,110,105,116,105,111,110,0]); + DEFINE_IID!(IID_ILimiterEffectDefinitionFactory, 3971671793, 25087, 17903, 184, 245, 72, 101, 154, 87, 199, 45); + RT_INTERFACE!{static interface ILimiterEffectDefinitionFactory(ILimiterEffectDefinitionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ILimiterEffectDefinitionFactory] { + fn Create(&mut self, audioGraph: *mut AudioGraph, out: *mut *mut LimiterEffectDefinition) -> HRESULT + }} + impl ILimiterEffectDefinitionFactory { + #[inline] pub unsafe fn create(&mut self, audioGraph: &AudioGraph) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, audioGraph as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LimiterEffectDefinition: ILimiterEffectDefinition [ILimiterEffectDefinitionFactory] [CLSID_LimiterEffectDefinition]} + DEFINE_CLSID!(CLSID_LimiterEffectDefinition = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,117,100,105,111,46,76,105,109,105,116,101,114,69,102,102,101,99,116,68,101,102,105,110,105,116,105,111,110,0]); + RT_ENUM! { enum AudioNodeEmitterSettings: u32 { + None (AudioNodeEmitterSettings_None) = 0, DisableDoppler (AudioNodeEmitterSettings_DisableDoppler) = 1, + }} + RT_ENUM! { enum AudioNodeEmitterShapeKind: i32 { + Omnidirectional (AudioNodeEmitterShapeKind_Omnidirectional) = 0, Cone (AudioNodeEmitterShapeKind_Cone) = 1, + }} + RT_ENUM! { enum AudioNodeEmitterDecayKind: i32 { + Natural (AudioNodeEmitterDecayKind_Natural) = 0, Custom (AudioNodeEmitterDecayKind_Custom) = 1, + }} + DEFINE_IID!(IID_IAudioNodeEmitterConeProperties, 3919260910, 714, 17269, 147, 38, 12, 106, 228, 188, 223, 181); + RT_INTERFACE!{interface IAudioNodeEmitterConeProperties(IAudioNodeEmitterConePropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeEmitterConeProperties] { + fn get_InnerAngle(&mut self, out: *mut f64) -> HRESULT, + fn get_OuterAngle(&mut self, out: *mut f64) -> HRESULT, + fn get_OuterAngleGain(&mut self, out: *mut f64) -> HRESULT + }} + impl IAudioNodeEmitterConeProperties { + #[inline] pub unsafe fn get_inner_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InnerAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_outer_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OuterAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_outer_angle_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OuterAngleGain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class AudioNodeEmitterConeProperties: IAudioNodeEmitterConeProperties} + DEFINE_IID!(IID_IAudioNodeEmitterShape, 3926069701, 59197, 17596, 133, 156, 69, 85, 59, 188, 72, 40); + RT_INTERFACE!{interface IAudioNodeEmitterShape(IAudioNodeEmitterShapeVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeEmitterShape] { + fn get_Kind(&mut self, out: *mut AudioNodeEmitterShapeKind) -> HRESULT, + fn get_ConeProperties(&mut self, out: *mut *mut AudioNodeEmitterConeProperties) -> HRESULT + }} + impl IAudioNodeEmitterShape { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cone_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConeProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioNodeEmitterShapeStatics, 1471883121, 65445, 19334, 167, 121, 226, 100, 174, 185, 20, 95); + RT_INTERFACE!{static interface IAudioNodeEmitterShapeStatics(IAudioNodeEmitterShapeStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeEmitterShapeStatics] { + fn CreateCone(&mut self, innerAngle: f64, outerAngle: f64, outerAngleGain: f64, out: *mut *mut AudioNodeEmitterShape) -> HRESULT, + fn CreateOmnidirectional(&mut self, out: *mut *mut AudioNodeEmitterShape) -> HRESULT + }} + impl IAudioNodeEmitterShapeStatics { + #[inline] pub unsafe fn create_cone(&mut self, innerAngle: f64, outerAngle: f64, outerAngleGain: f64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCone)(self, innerAngle, outerAngle, outerAngleGain, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_omnidirectional(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateOmnidirectional)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioNodeEmitterShape: IAudioNodeEmitterShape} + RT_ACTIVATABLE!{IAudioNodeEmitterShapeStatics [CLSID_AudioNodeEmitterShape]} + DEFINE_CLSID!(CLSID_AudioNodeEmitterShape = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,117,100,105,111,46,65,117,100,105,111,78,111,100,101,69,109,105,116,116,101,114,83,104,97,112,101,0]); + DEFINE_IID!(IID_IAudioNodeEmitterNaturalDecayModelProperties, 1217612751, 53036, 20220, 147, 49, 117, 189, 34, 223, 31, 12); + RT_INTERFACE!{interface IAudioNodeEmitterNaturalDecayModelProperties(IAudioNodeEmitterNaturalDecayModelPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeEmitterNaturalDecayModelProperties] { + fn get_UnityGainDistance(&mut self, out: *mut f64) -> HRESULT, + fn get_CutoffDistance(&mut self, out: *mut f64) -> HRESULT + }} + impl IAudioNodeEmitterNaturalDecayModelProperties { + #[inline] pub unsafe fn get_unity_gain_distance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UnityGainDistance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cutoff_distance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CutoffDistance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class AudioNodeEmitterNaturalDecayModelProperties: IAudioNodeEmitterNaturalDecayModelProperties} + DEFINE_IID!(IID_IAudioNodeEmitterDecayModel, 488463095, 3411, 20393, 189, 132, 213, 129, 106, 134, 243, 255); + RT_INTERFACE!{interface IAudioNodeEmitterDecayModel(IAudioNodeEmitterDecayModelVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeEmitterDecayModel] { + fn get_Kind(&mut self, out: *mut AudioNodeEmitterDecayKind) -> HRESULT, + fn get_MinGain(&mut self, out: *mut f64) -> HRESULT, + fn get_MaxGain(&mut self, out: *mut f64) -> HRESULT, + fn get_NaturalProperties(&mut self, out: *mut *mut AudioNodeEmitterNaturalDecayModelProperties) -> HRESULT + }} + impl IAudioNodeEmitterDecayModel { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinGain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxGain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_natural_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NaturalProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioNodeEmitterDecayModelStatics, 3346562216, 61816, 17967, 188, 129, 141, 213, 203, 229, 218, 232); + RT_INTERFACE!{static interface IAudioNodeEmitterDecayModelStatics(IAudioNodeEmitterDecayModelStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeEmitterDecayModelStatics] { + fn CreateNatural(&mut self, minGain: f64, maxGain: f64, unityGainDistance: f64, cutoffDistance: f64, out: *mut *mut AudioNodeEmitterDecayModel) -> HRESULT, + fn CreateCustom(&mut self, minGain: f64, maxGain: f64, out: *mut *mut AudioNodeEmitterDecayModel) -> HRESULT + }} + impl IAudioNodeEmitterDecayModelStatics { + #[inline] pub unsafe fn create_natural(&mut self, minGain: f64, maxGain: f64, unityGainDistance: f64, cutoffDistance: f64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateNatural)(self, minGain, maxGain, unityGainDistance, cutoffDistance, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_custom(&mut self, minGain: f64, maxGain: f64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCustom)(self, minGain, maxGain, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioNodeEmitterDecayModel: IAudioNodeEmitterDecayModel} + RT_ACTIVATABLE!{IAudioNodeEmitterDecayModelStatics [CLSID_AudioNodeEmitterDecayModel]} + DEFINE_CLSID!(CLSID_AudioNodeEmitterDecayModel = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,117,100,105,111,46,65,117,100,105,111,78,111,100,101,69,109,105,116,116,101,114,68,101,99,97,121,77,111,100,101,108,0]); + RT_ENUM! { enum SpatialAudioModel: i32 { + ObjectBased (SpatialAudioModel_ObjectBased) = 0, FoldDown (SpatialAudioModel_FoldDown) = 1, + }} + DEFINE_IID!(IID_IAudioNodeEmitter, 913741597, 34826, 18360, 173, 247, 19, 35, 169, 217, 101, 190); + RT_INTERFACE!{interface IAudioNodeEmitter(IAudioNodeEmitterVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeEmitter] { + fn get_Position(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_Position(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Direction(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_Direction(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Shape(&mut self, out: *mut *mut AudioNodeEmitterShape) -> HRESULT, + fn get_DecayModel(&mut self, out: *mut *mut AudioNodeEmitterDecayModel) -> HRESULT, + fn get_Gain(&mut self, out: *mut f64) -> HRESULT, + fn put_Gain(&mut self, value: f64) -> HRESULT, + fn get_DistanceScale(&mut self, out: *mut f64) -> HRESULT, + fn put_DistanceScale(&mut self, value: f64) -> HRESULT, + fn get_DopplerScale(&mut self, out: *mut f64) -> HRESULT, + fn put_DopplerScale(&mut self, value: f64) -> HRESULT, + fn get_DopplerVelocity(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_DopplerVelocity(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_IsDopplerDisabled(&mut self, out: *mut bool) -> HRESULT + }} + impl IAudioNodeEmitter { + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_Position)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Direction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_direction(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_Direction)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_shape(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Shape)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_decay_model(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DecayModel)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_gain(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Gain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_distance_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DistanceScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_distance_scale(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_DistanceScale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_doppler_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DopplerScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_doppler_scale(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_DopplerScale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_doppler_velocity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DopplerVelocity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_doppler_velocity(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_DopplerVelocity)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_doppler_disabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDopplerDisabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioNodeEmitter2, 1253502667, 60457, 18424, 129, 140, 182, 182, 96, 165, 174, 177); + RT_INTERFACE!{interface IAudioNodeEmitter2(IAudioNodeEmitter2Vtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeEmitter2] { + fn get_SpatialAudioModel(&mut self, out: *mut SpatialAudioModel) -> HRESULT, + fn put_SpatialAudioModel(&mut self, value: SpatialAudioModel) -> HRESULT + }} + impl IAudioNodeEmitter2 { + #[inline] pub unsafe fn get_spatial_audio_model(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpatialAudioModel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_spatial_audio_model(&mut self, value: SpatialAudioModel) -> Result<()> { + let hr = ((*self.lpVtbl).put_SpatialAudioModel)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioNodeEmitterFactory, 4257761434, 27350, 19684, 183, 247, 169, 147, 112, 223, 126, 233); + RT_INTERFACE!{static interface IAudioNodeEmitterFactory(IAudioNodeEmitterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeEmitterFactory] { + fn CreateAudioNodeEmitter(&mut self, shape: *mut AudioNodeEmitterShape, decayModel: *mut AudioNodeEmitterDecayModel, settings: AudioNodeEmitterSettings, out: *mut *mut AudioNodeEmitter) -> HRESULT + }} + impl IAudioNodeEmitterFactory { + #[inline] pub unsafe fn create_audio_node_emitter(&mut self, shape: &AudioNodeEmitterShape, decayModel: &AudioNodeEmitterDecayModel, settings: AudioNodeEmitterSettings) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAudioNodeEmitter)(self, shape as *const _ as *mut _, decayModel as *const _ as *mut _, settings, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioNodeListener, 3648138774, 3082, 16858, 183, 85, 108, 119, 131, 95, 177, 235); + RT_INTERFACE!{interface IAudioNodeListener(IAudioNodeListenerVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeListener] { + fn get_Position(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_Position(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Orientation(&mut self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT, + fn put_Orientation(&mut self, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn get_SpeedOfSound(&mut self, out: *mut f64) -> HRESULT, + fn put_SpeedOfSound(&mut self, value: f64) -> HRESULT, + fn get_DopplerVelocity(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_DopplerVelocity(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT + }} + impl IAudioNodeListener { + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_Position)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_orientation(&mut self, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + let hr = ((*self.lpVtbl).put_Orientation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_speed_of_sound(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpeedOfSound)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_speed_of_sound(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_SpeedOfSound)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_doppler_velocity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DopplerVelocity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_doppler_velocity(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_DopplerVelocity)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEqualizerEffectDefinition, 37711647, 33790, 17562, 168, 34, 198, 150, 68, 45, 22, 176); + RT_INTERFACE!{interface IEqualizerEffectDefinition(IEqualizerEffectDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IEqualizerEffectDefinition] { + fn get_Bands(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IEqualizerEffectDefinition { + #[inline] pub unsafe fn get_bands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Bands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IReverbEffectDefinition, 1174841993, 62819, 19722, 143, 110, 240, 205, 223, 243, 93, 132); + RT_INTERFACE!{interface IReverbEffectDefinition(IReverbEffectDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IReverbEffectDefinition] { + fn put_WetDryMix(&mut self, value: f64) -> HRESULT, + fn get_WetDryMix(&mut self, out: *mut f64) -> HRESULT, + fn put_ReflectionsDelay(&mut self, value: u32) -> HRESULT, + fn get_ReflectionsDelay(&mut self, out: *mut u32) -> HRESULT, + fn put_ReverbDelay(&mut self, value: u8) -> HRESULT, + fn get_ReverbDelay(&mut self, out: *mut u8) -> HRESULT, + fn put_RearDelay(&mut self, value: u8) -> HRESULT, + fn get_RearDelay(&mut self, out: *mut u8) -> HRESULT, + fn put_PositionLeft(&mut self, value: u8) -> HRESULT, + fn get_PositionLeft(&mut self, out: *mut u8) -> HRESULT, + fn put_PositionRight(&mut self, value: u8) -> HRESULT, + fn get_PositionRight(&mut self, out: *mut u8) -> HRESULT, + fn put_PositionMatrixLeft(&mut self, value: u8) -> HRESULT, + fn get_PositionMatrixLeft(&mut self, out: *mut u8) -> HRESULT, + fn put_PositionMatrixRight(&mut self, value: u8) -> HRESULT, + fn get_PositionMatrixRight(&mut self, out: *mut u8) -> HRESULT, + fn put_EarlyDiffusion(&mut self, value: u8) -> HRESULT, + fn get_EarlyDiffusion(&mut self, out: *mut u8) -> HRESULT, + fn put_LateDiffusion(&mut self, value: u8) -> HRESULT, + fn get_LateDiffusion(&mut self, out: *mut u8) -> HRESULT, + fn put_LowEQGain(&mut self, value: u8) -> HRESULT, + fn get_LowEQGain(&mut self, out: *mut u8) -> HRESULT, + fn put_LowEQCutoff(&mut self, value: u8) -> HRESULT, + fn get_LowEQCutoff(&mut self, out: *mut u8) -> HRESULT, + fn put_HighEQGain(&mut self, value: u8) -> HRESULT, + fn get_HighEQGain(&mut self, out: *mut u8) -> HRESULT, + fn put_HighEQCutoff(&mut self, value: u8) -> HRESULT, + fn get_HighEQCutoff(&mut self, out: *mut u8) -> HRESULT, + fn put_RoomFilterFreq(&mut self, value: f64) -> HRESULT, + fn get_RoomFilterFreq(&mut self, out: *mut f64) -> HRESULT, + fn put_RoomFilterMain(&mut self, value: f64) -> HRESULT, + fn get_RoomFilterMain(&mut self, out: *mut f64) -> HRESULT, + fn put_RoomFilterHF(&mut self, value: f64) -> HRESULT, + fn get_RoomFilterHF(&mut self, out: *mut f64) -> HRESULT, + fn put_ReflectionsGain(&mut self, value: f64) -> HRESULT, + fn get_ReflectionsGain(&mut self, out: *mut f64) -> HRESULT, + fn put_ReverbGain(&mut self, value: f64) -> HRESULT, + fn get_ReverbGain(&mut self, out: *mut f64) -> HRESULT, + fn put_DecayTime(&mut self, value: f64) -> HRESULT, + fn get_DecayTime(&mut self, out: *mut f64) -> HRESULT, + fn put_Density(&mut self, value: f64) -> HRESULT, + fn get_Density(&mut self, out: *mut f64) -> HRESULT, + fn put_RoomSize(&mut self, value: f64) -> HRESULT, + fn get_RoomSize(&mut self, out: *mut f64) -> HRESULT, + fn put_DisableLateField(&mut self, value: bool) -> HRESULT, + fn get_DisableLateField(&mut self, out: *mut bool) -> HRESULT + }} + impl IReverbEffectDefinition { + #[inline] pub unsafe fn set_wet_dry_mix(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_WetDryMix)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_wet_dry_mix(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WetDryMix)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_reflections_delay(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReflectionsDelay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_reflections_delay(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReflectionsDelay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_reverb_delay(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReverbDelay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_reverb_delay(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReverbDelay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rear_delay(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_RearDelay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rear_delay(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RearDelay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position_left(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_PositionLeft)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_left(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionLeft)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position_right(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_PositionRight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_right(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionRight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position_matrix_left(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_PositionMatrixLeft)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_matrix_left(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionMatrixLeft)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position_matrix_right(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_PositionMatrixRight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_matrix_right(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionMatrixRight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_early_diffusion(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_EarlyDiffusion)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_early_diffusion(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EarlyDiffusion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_late_diffusion(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_LateDiffusion)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_late_diffusion(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LateDiffusion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_low_eqgain(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_LowEQGain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_low_eqgain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LowEQGain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_low_eqcutoff(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_LowEQCutoff)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_low_eqcutoff(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LowEQCutoff)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_high_eqgain(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_HighEQGain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_high_eqgain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HighEQGain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_high_eqcutoff(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_HighEQCutoff)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_high_eqcutoff(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HighEQCutoff)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_room_filter_freq(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_RoomFilterFreq)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_room_filter_freq(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoomFilterFreq)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_room_filter_main(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_RoomFilterMain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_room_filter_main(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoomFilterMain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_room_filter_hf(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_RoomFilterHF)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_room_filter_hf(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoomFilterHF)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_reflections_gain(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReflectionsGain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_reflections_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReflectionsGain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_reverb_gain(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReverbGain)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_reverb_gain(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReverbGain)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_decay_time(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_DecayTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_decay_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DecayTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_density(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Density)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_density(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Density)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_room_size(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_RoomSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_room_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoomSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_disable_late_field(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisableLateField)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_disable_late_field(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DisableLateField)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEchoEffectDefinition, 239943594, 14008, 19601, 185, 218, 17, 244, 74, 138, 102, 16); + RT_INTERFACE!{interface IEchoEffectDefinition(IEchoEffectDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IEchoEffectDefinition] { + fn put_WetDryMix(&mut self, value: f64) -> HRESULT, + fn get_WetDryMix(&mut self, out: *mut f64) -> HRESULT, + fn put_Feedback(&mut self, value: f64) -> HRESULT, + fn get_Feedback(&mut self, out: *mut f64) -> HRESULT, + fn put_Delay(&mut self, value: f64) -> HRESULT, + fn get_Delay(&mut self, out: *mut f64) -> HRESULT + }} + impl IEchoEffectDefinition { + #[inline] pub unsafe fn set_wet_dry_mix(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_WetDryMix)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_wet_dry_mix(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WetDryMix)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_feedback(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Feedback)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_feedback(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Feedback)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_delay(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Delay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_delay(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Delay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILimiterEffectDefinition, 1802853657, 9731, 18362, 189, 235, 57, 5, 94, 52, 134, 220); + RT_INTERFACE!{interface ILimiterEffectDefinition(ILimiterEffectDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_ILimiterEffectDefinition] { + fn put_Release(&mut self, value: u32) -> HRESULT, + fn get_Release(&mut self, out: *mut u32) -> HRESULT, + fn put_Loudness(&mut self, value: u32) -> HRESULT, + fn get_Loudness(&mut self, out: *mut u32) -> HRESULT + }} + impl ILimiterEffectDefinition { + #[inline] pub unsafe fn set_release(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Release)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_release(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Release)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_loudness(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Loudness)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_loudness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Loudness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Media.Audio +pub mod casting { // Windows.Media.Casting +use ::prelude::*; + RT_ENUM! { enum CastingPlaybackTypes: u32 { + None (CastingPlaybackTypes_None) = 0, Audio (CastingPlaybackTypes_Audio) = 1, Video (CastingPlaybackTypes_Video) = 2, Picture (CastingPlaybackTypes_Picture) = 4, + }} + RT_ENUM! { enum CastingConnectionErrorStatus: i32 { + Succeeded (CastingConnectionErrorStatus_Succeeded) = 0, DeviceDidNotRespond (CastingConnectionErrorStatus_DeviceDidNotRespond) = 1, DeviceError (CastingConnectionErrorStatus_DeviceError) = 2, DeviceLocked (CastingConnectionErrorStatus_DeviceLocked) = 3, ProtectedPlaybackFailed (CastingConnectionErrorStatus_ProtectedPlaybackFailed) = 4, InvalidCastingSource (CastingConnectionErrorStatus_InvalidCastingSource) = 5, Unknown (CastingConnectionErrorStatus_Unknown) = 6, + }} + RT_ENUM! { enum CastingConnectionState: i32 { + Disconnected (CastingConnectionState_Disconnected) = 0, Connected (CastingConnectionState_Connected) = 1, Rendering (CastingConnectionState_Rendering) = 2, Disconnecting (CastingConnectionState_Disconnecting) = 3, Connecting (CastingConnectionState_Connecting) = 4, + }} + DEFINE_IID!(IID_ICastingSource, 4096387698, 13415, 18406, 160, 39, 82, 41, 35, 233, 215, 39); + RT_INTERFACE!{interface ICastingSource(ICastingSourceVtbl): IInspectable(IInspectableVtbl) [IID_ICastingSource] { + fn get_PreferredSourceUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_PreferredSourceUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT + }} + impl ICastingSource { + #[inline] pub unsafe fn get_preferred_source_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreferredSourceUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_preferred_source_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreferredSourceUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CastingSource: ICastingSource} + DEFINE_IID!(IID_ICastingConnectionErrorOccurredEventArgs, 2818260073, 34585, 20224, 129, 251, 150, 24, 99, 199, 154, 50); + RT_INTERFACE!{interface ICastingConnectionErrorOccurredEventArgs(ICastingConnectionErrorOccurredEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICastingConnectionErrorOccurredEventArgs] { + fn get_ErrorStatus(&mut self, out: *mut CastingConnectionErrorStatus) -> HRESULT, + fn get_Message(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICastingConnectionErrorOccurredEventArgs { + #[inline] pub unsafe fn get_error_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CastingConnectionErrorOccurredEventArgs: ICastingConnectionErrorOccurredEventArgs} + DEFINE_IID!(IID_ICastingConnection, 3449099859, 49905, 17560, 139, 120, 95, 180, 205, 54, 64, 221); + RT_INTERFACE!{interface ICastingConnection(ICastingConnectionVtbl): IInspectable(IInspectableVtbl) [IID_ICastingConnection] { + fn get_State(&mut self, out: *mut CastingConnectionState) -> HRESULT, + fn get_Device(&mut self, out: *mut *mut CastingDevice) -> HRESULT, + fn get_Source(&mut self, out: *mut *mut CastingSource) -> HRESULT, + fn put_Source(&mut self, value: *mut CastingSource) -> HRESULT, + fn add_StateChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ErrorOccurred(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ErrorOccurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn RequestStartCastingAsync(&mut self, value: *mut CastingSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DisconnectAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICastingConnection { + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Device)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_source(&mut self, value: &CastingSource) -> Result<()> { + let hr = ((*self.lpVtbl).put_Source)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_state_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StateChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_state_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_error_occurred(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ErrorOccurred)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_error_occurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ErrorOccurred)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn request_start_casting_async(&mut self, value: &CastingSource) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStartCastingAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn disconnect_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DisconnectAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CastingDevice: ICastingDevice} + RT_ACTIVATABLE!{ICastingDeviceStatics [CLSID_CastingDevice]} + DEFINE_CLSID!(CLSID_CastingDevice = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,97,115,116,105,110,103,46,67,97,115,116,105,110,103,68,101,118,105,99,101,0]); + RT_CLASS!{class CastingConnection: ICastingConnection} + DEFINE_IID!(IID_ICastingDevice, 3732020355, 19011, 19153, 166, 210, 36, 146, 167, 150, 195, 242); + RT_INTERFACE!{interface ICastingDevice(ICastingDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ICastingDevice] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Icon(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamWithContentType) -> HRESULT, + fn GetSupportedCastingPlaybackTypesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateCastingConnection(&mut self, out: *mut *mut CastingConnection) -> HRESULT + }} + impl ICastingDevice { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_icon(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Icon)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_casting_playback_types_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSupportedCastingPlaybackTypesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_casting_connection(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCastingConnection)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICastingDeviceStatics, 3889780951, 19731, 16951, 163, 101, 76, 79, 106, 76, 253, 47); + RT_INTERFACE!{static interface ICastingDeviceStatics(ICastingDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICastingDeviceStatics] { + fn GetDeviceSelector(&mut self, type_: CastingPlaybackTypes, out: *mut HSTRING) -> HRESULT, + fn GetDeviceSelectorFromCastingSourceAsync(&mut self, castingSource: *mut CastingSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&mut self, value: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn DeviceInfoSupportsCastingAsync(&mut self, device: *mut super::super::devices::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICastingDeviceStatics { + #[inline] pub unsafe fn get_device_selector(&mut self, type_: CastingPlaybackTypes) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, type_, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector_from_casting_source_async(&mut self, castingSource: &CastingSource) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelectorFromCastingSourceAsync)(self, castingSource as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, value: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, value.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn device_info_supports_casting_async(&mut self, device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeviceInfoSupportsCastingAsync)(self, device as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICastingDeviceSelectedEventArgs, 3695419014, 56663, 19725, 148, 0, 175, 69, 228, 251, 54, 99); + RT_INTERFACE!{interface ICastingDeviceSelectedEventArgs(ICastingDeviceSelectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICastingDeviceSelectedEventArgs] { + fn get_SelectedCastingDevice(&mut self, out: *mut *mut CastingDevice) -> HRESULT + }} + impl ICastingDeviceSelectedEventArgs { + #[inline] pub unsafe fn get_selected_casting_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectedCastingDevice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CastingDeviceSelectedEventArgs: ICastingDeviceSelectedEventArgs} + DEFINE_IID!(IID_ICastingDevicePickerFilter, 3196871068, 46435, 17236, 174, 51, 159, 218, 173, 140, 98, 145); + RT_INTERFACE!{interface ICastingDevicePickerFilter(ICastingDevicePickerFilterVtbl): IInspectable(IInspectableVtbl) [IID_ICastingDevicePickerFilter] { + fn get_SupportsAudio(&mut self, out: *mut bool) -> HRESULT, + fn put_SupportsAudio(&mut self, value: bool) -> HRESULT, + fn get_SupportsVideo(&mut self, out: *mut bool) -> HRESULT, + fn put_SupportsVideo(&mut self, value: bool) -> HRESULT, + fn get_SupportsPictures(&mut self, out: *mut bool) -> HRESULT, + fn put_SupportsPictures(&mut self, value: bool) -> HRESULT, + fn get_SupportedCastingSources(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl ICastingDevicePickerFilter { + #[inline] pub unsafe fn get_supports_audio(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportsAudio)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_supports_audio(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SupportsAudio)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_supports_video(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportsVideo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_supports_video(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SupportsVideo)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_supports_pictures(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportsPictures)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_supports_pictures(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SupportsPictures)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_casting_sources(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedCastingSources)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CastingDevicePickerFilter: ICastingDevicePickerFilter} + DEFINE_IID!(IID_ICastingDevicePicker, 3704854820, 1425, 18878, 170, 203, 75, 130, 238, 117, 106, 149); + RT_INTERFACE!{interface ICastingDevicePicker(ICastingDevicePickerVtbl): IInspectable(IInspectableVtbl) [IID_ICastingDevicePicker] { + fn get_Filter(&mut self, out: *mut *mut CastingDevicePickerFilter) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_Appearance(&mut self, out: *mut *mut super::super::devices::enumeration::DevicePickerAppearance) -> HRESULT, + fn add_CastingDeviceSelected(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CastingDeviceSelected(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CastingDevicePickerDismissed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CastingDevicePickerDismissed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn Show(&mut self, selection: super::super::foundation::Rect) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowWithPlacement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> HRESULT, + fn Hide(&mut self) -> HRESULT + }} + impl ICastingDevicePicker { + #[inline] pub unsafe fn get_filter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Filter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_appearance(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Appearance)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_casting_device_selected(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CastingDeviceSelected)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_casting_device_selected(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CastingDeviceSelected)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_casting_device_picker_dismissed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CastingDevicePickerDismissed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_casting_device_picker_dismissed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CastingDevicePickerDismissed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show(&mut self, selection: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).Show)(self, selection); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_with_placement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { + let hr = ((*self.lpVtbl).ShowWithPlacement)(self, selection, preferredPlacement); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn hide(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Hide)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CastingDevicePicker: ICastingDevicePicker} +} // Windows.Media.Casting +pub mod devices { // Windows.Media.Devices +use ::prelude::*; + RT_ENUM! { enum AudioDeviceRole: i32 { + Default (AudioDeviceRole_Default) = 0, Communications (AudioDeviceRole_Communications) = 1, + }} + DEFINE_IID!(IID_IDefaultAudioDeviceChangedEventArgs, 286230575, 7173, 18007, 161, 142, 71, 201, 182, 159, 7, 171); + RT_INTERFACE!{interface IDefaultAudioDeviceChangedEventArgs(IDefaultAudioDeviceChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDefaultAudioDeviceChangedEventArgs] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Role(&mut self, out: *mut AudioDeviceRole) -> HRESULT + }} + impl IDefaultAudioDeviceChangedEventArgs { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_role(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Role)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaDeviceStatics, 2855115328, 37023, 19386, 191, 139, 12, 13, 41, 111, 20, 240); + RT_INTERFACE!{static interface IMediaDeviceStatics(IMediaDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaDeviceStatics] { + fn GetAudioCaptureSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetAudioRenderSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetVideoCaptureSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetDefaultAudioCaptureId(&mut self, role: AudioDeviceRole, out: *mut HSTRING) -> HRESULT, + fn GetDefaultAudioRenderId(&mut self, role: AudioDeviceRole, out: *mut HSTRING) -> HRESULT, + fn add_DefaultAudioCaptureDeviceChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DefaultAudioCaptureDeviceChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DefaultAudioRenderDeviceChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DefaultAudioRenderDeviceChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMediaDeviceStatics { + #[inline] pub unsafe fn get_audio_capture_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAudioCaptureSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_render_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAudioRenderSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_capture_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVideoCaptureSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_audio_capture_id(&mut self, role: AudioDeviceRole) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultAudioCaptureId)(self, role, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_audio_render_id(&mut self, role: AudioDeviceRole) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultAudioRenderId)(self, role, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_default_audio_capture_device_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DefaultAudioCaptureDeviceChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_default_audio_capture_device_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DefaultAudioCaptureDeviceChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_default_audio_render_device_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DefaultAudioRenderDeviceChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_default_audio_render_device_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DefaultAudioRenderDeviceChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DefaultAudioCaptureDeviceChangedEventArgs: IDefaultAudioDeviceChangedEventArgs} + RT_CLASS!{class DefaultAudioRenderDeviceChangedEventArgs: IDefaultAudioDeviceChangedEventArgs} + RT_ACTIVATABLE!{IMediaDeviceStatics [CLSID_MediaDevice]} + DEFINE_CLSID!(CLSID_MediaDevice = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,68,101,118,105,99,101,115,46,77,101,100,105,97,68,101,118,105,99,101,0]); + RT_ENUM! { enum IsoSpeedPreset: i32 { + Auto (IsoSpeedPreset_Auto) = 0, Iso50 (IsoSpeedPreset_Iso50) = 1, Iso80 (IsoSpeedPreset_Iso80) = 2, Iso100 (IsoSpeedPreset_Iso100) = 3, Iso200 (IsoSpeedPreset_Iso200) = 4, Iso400 (IsoSpeedPreset_Iso400) = 5, Iso800 (IsoSpeedPreset_Iso800) = 6, Iso1600 (IsoSpeedPreset_Iso1600) = 7, Iso3200 (IsoSpeedPreset_Iso3200) = 8, Iso6400 (IsoSpeedPreset_Iso6400) = 9, Iso12800 (IsoSpeedPreset_Iso12800) = 10, Iso25600 (IsoSpeedPreset_Iso25600) = 11, + }} + RT_ENUM! { enum CaptureSceneMode: i32 { + Auto (CaptureSceneMode_Auto) = 0, Manual (CaptureSceneMode_Manual) = 1, Macro (CaptureSceneMode_Macro) = 2, Portrait (CaptureSceneMode_Portrait) = 3, Sport (CaptureSceneMode_Sport) = 4, Snow (CaptureSceneMode_Snow) = 5, Night (CaptureSceneMode_Night) = 6, Beach (CaptureSceneMode_Beach) = 7, Sunset (CaptureSceneMode_Sunset) = 8, Candlelight (CaptureSceneMode_Candlelight) = 9, Landscape (CaptureSceneMode_Landscape) = 10, NightPortrait (CaptureSceneMode_NightPortrait) = 11, Backlit (CaptureSceneMode_Backlit) = 12, + }} + RT_ENUM! { enum MediaCaptureFocusState: i32 { + Uninitialized (MediaCaptureFocusState_Uninitialized) = 0, Lost (MediaCaptureFocusState_Lost) = 1, Searching (MediaCaptureFocusState_Searching) = 2, Focused (MediaCaptureFocusState_Focused) = 3, Failed (MediaCaptureFocusState_Failed) = 4, + }} + RT_ENUM! { enum CameraStreamState: i32 { + NotStreaming (CameraStreamState_NotStreaming) = 0, Streaming (CameraStreamState_Streaming) = 1, BlockedForPrivacy (CameraStreamState_BlockedForPrivacy) = 2, Shutdown (CameraStreamState_Shutdown) = 3, + }} + RT_ENUM! { enum MediaCapturePauseBehavior: i32 { + RetainHardwareResources (MediaCapturePauseBehavior_RetainHardwareResources) = 0, ReleaseHardwareResources (MediaCapturePauseBehavior_ReleaseHardwareResources) = 1, + }} + RT_ENUM! { enum AdvancedPhotoMode: i32 { + Auto (AdvancedPhotoMode_Auto) = 0, Standard (AdvancedPhotoMode_Standard) = 1, Hdr (AdvancedPhotoMode_Hdr) = 2, LowLight (AdvancedPhotoMode_LowLight) = 3, + }} + RT_CLASS!{class AudioDeviceController: IAudioDeviceController} + RT_CLASS!{class VideoDeviceController: IVideoDeviceController} + DEFINE_IID!(IID_ISceneModeControl, 3566099191, 36185, 18516, 140, 98, 18, 199, 11, 168, 155, 124); + RT_INTERFACE!{interface ISceneModeControl(ISceneModeControlVtbl): IInspectable(IInspectableVtbl) [IID_ISceneModeControl] { + fn get_SupportedModes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Value(&mut self, out: *mut CaptureSceneMode) -> HRESULT, + fn SetValueAsync(&mut self, sceneMode: CaptureSceneMode, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl ISceneModeControl { + #[inline] pub unsafe fn get_supported_modes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedModes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_value_async(&mut self, sceneMode: CaptureSceneMode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetValueAsync)(self, sceneMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SceneModeControl: ISceneModeControl} + DEFINE_IID!(IID_ITorchControl, 2785359461, 33360, 16748, 145, 154, 114, 66, 150, 175, 163, 6); + RT_INTERFACE!{interface ITorchControl(ITorchControlVtbl): IInspectable(IInspectableVtbl) [IID_ITorchControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_PowerSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT, + fn put_Enabled(&mut self, value: bool) -> HRESULT, + fn get_PowerPercent(&mut self, out: *mut f32) -> HRESULT, + fn put_PowerPercent(&mut self, value: f32) -> HRESULT + }} + impl ITorchControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_power_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Enabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_power_percent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerPercent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_power_percent(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_PowerPercent)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class TorchControl: ITorchControl} + DEFINE_IID!(IID_IFlashControl, 3740540350, 32104, 17891, 140, 15, 190, 123, 179, 40, 55, 208); + RT_INTERFACE!{interface IFlashControl(IFlashControlVtbl): IInspectable(IInspectableVtbl) [IID_IFlashControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_PowerSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_RedEyeReductionSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT, + fn put_Enabled(&mut self, value: bool) -> HRESULT, + fn get_Auto(&mut self, out: *mut bool) -> HRESULT, + fn put_Auto(&mut self, value: bool) -> HRESULT, + fn get_RedEyeReduction(&mut self, out: *mut bool) -> HRESULT, + fn put_RedEyeReduction(&mut self, value: bool) -> HRESULT, + fn get_PowerPercent(&mut self, out: *mut f32) -> HRESULT, + fn put_PowerPercent(&mut self, value: f32) -> HRESULT + }} + impl IFlashControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_power_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_red_eye_reduction_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RedEyeReductionSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Enabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Auto)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Auto)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_red_eye_reduction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RedEyeReduction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_red_eye_reduction(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_RedEyeReduction)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_power_percent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerPercent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_power_percent(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_PowerPercent)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFlashControl2, 2099891358, 30177, 19191, 189, 125, 78, 56, 225, 192, 108, 214); + RT_INTERFACE!{interface IFlashControl2(IFlashControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IFlashControl2] { + fn get_AssistantLightSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_AssistantLightEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_AssistantLightEnabled(&mut self, value: bool) -> HRESULT + }} + impl IFlashControl2 { + #[inline] pub unsafe fn get_assistant_light_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AssistantLightSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_assistant_light_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AssistantLightEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_assistant_light_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AssistantLightEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FlashControl: IFlashControl} + DEFINE_IID!(IID_IExposureCompensationControl, 2177427508, 56556, 16401, 166, 16, 31, 56, 71, 230, 74, 202); + RT_INTERFACE!{interface IExposureCompensationControl(IExposureCompensationControlVtbl): IInspectable(IInspectableVtbl) [IID_IExposureCompensationControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_Min(&mut self, out: *mut f32) -> HRESULT, + fn get_Max(&mut self, out: *mut f32) -> HRESULT, + fn get_Step(&mut self, out: *mut f32) -> HRESULT, + fn get_Value(&mut self, out: *mut f32) -> HRESULT, + fn SetValueAsync(&mut self, value: f32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IExposureCompensationControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Min)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Max)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Step)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_value_async(&mut self, value: f32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetValueAsync)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ExposureCompensationControl: IExposureCompensationControl} + DEFINE_IID!(IID_IIsoSpeedControl, 666288930, 9645, 20251, 170, 171, 82, 74, 179, 118, 202, 51); + RT_INTERFACE!{interface IIsoSpeedControl(IIsoSpeedControlVtbl): IInspectable(IInspectableVtbl) [IID_IIsoSpeedControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportedPresets(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Preset(&mut self, out: *mut IsoSpeedPreset) -> HRESULT, + fn SetPresetAsync(&mut self, preset: IsoSpeedPreset, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IIsoSpeedControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_presets(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedPresets)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_preset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Preset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_preset_async(&mut self, preset: IsoSpeedPreset) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetPresetAsync)(self, preset, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IIsoSpeedControl2, 1863678194, 28023, 20362, 140, 47, 97, 48, 182, 57, 80, 83); + RT_INTERFACE!{interface IIsoSpeedControl2(IIsoSpeedControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IIsoSpeedControl2] { + fn get_Min(&mut self, out: *mut u32) -> HRESULT, + fn get_Max(&mut self, out: *mut u32) -> HRESULT, + fn get_Step(&mut self, out: *mut u32) -> HRESULT, + fn get_Value(&mut self, out: *mut u32) -> HRESULT, + fn SetValueAsync(&mut self, isoSpeed: u32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_Auto(&mut self, out: *mut bool) -> HRESULT, + fn SetAutoAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IIsoSpeedControl2 { + #[inline] pub unsafe fn get_min(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Min)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Max)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Step)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_value_async(&mut self, isoSpeed: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetValueAsync)(self, isoSpeed, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Auto)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetAutoAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class IsoSpeedControl: IIsoSpeedControl} + RT_ENUM! { enum ColorTemperaturePreset: i32 { + Auto (ColorTemperaturePreset_Auto) = 0, Manual (ColorTemperaturePreset_Manual) = 1, Cloudy (ColorTemperaturePreset_Cloudy) = 2, Daylight (ColorTemperaturePreset_Daylight) = 3, Flash (ColorTemperaturePreset_Flash) = 4, Fluorescent (ColorTemperaturePreset_Fluorescent) = 5, Tungsten (ColorTemperaturePreset_Tungsten) = 6, Candlelight (ColorTemperaturePreset_Candlelight) = 7, + }} + DEFINE_IID!(IID_IWhiteBalanceControl, 2015298686, 29026, 18888, 168, 249, 148, 129, 197, 101, 54, 62); + RT_INTERFACE!{interface IWhiteBalanceControl(IWhiteBalanceControlVtbl): IInspectable(IInspectableVtbl) [IID_IWhiteBalanceControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_Preset(&mut self, out: *mut ColorTemperaturePreset) -> HRESULT, + fn SetPresetAsync(&mut self, preset: ColorTemperaturePreset, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_Min(&mut self, out: *mut u32) -> HRESULT, + fn get_Max(&mut self, out: *mut u32) -> HRESULT, + fn get_Step(&mut self, out: *mut u32) -> HRESULT, + fn get_Value(&mut self, out: *mut u32) -> HRESULT, + fn SetValueAsync(&mut self, temperature: u32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IWhiteBalanceControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_preset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Preset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_preset_async(&mut self, preset: ColorTemperaturePreset) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetPresetAsync)(self, preset, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_min(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Min)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Max)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Step)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_value_async(&mut self, temperature: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetValueAsync)(self, temperature, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WhiteBalanceControl: IWhiteBalanceControl} + DEFINE_IID!(IID_IExposureControl, 166251490, 44438, 20264, 160, 224, 150, 237, 126, 27, 95, 210); + RT_INTERFACE!{interface IExposureControl(IExposureControlVtbl): IInspectable(IInspectableVtbl) [IID_IExposureControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_Auto(&mut self, out: *mut bool) -> HRESULT, + fn SetAutoAsync(&mut self, value: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_Min(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Max(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Step(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Value(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn SetValueAsync(&mut self, shutterDuration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IExposureControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Auto)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_async(&mut self, value: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetAutoAsync)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_min(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Min)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Max)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Step)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_value_async(&mut self, shutterDuration: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetValueAsync)(self, shutterDuration, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ExposureControl: IExposureControl} + RT_ENUM! { enum ZoomTransitionMode: i32 { + Auto (ZoomTransitionMode_Auto) = 0, Direct (ZoomTransitionMode_Direct) = 1, Smooth (ZoomTransitionMode_Smooth) = 2, + }} + DEFINE_IID!(IID_IZoomSettings, 1792437028, 5300, 19453, 177, 143, 136, 254, 36, 70, 59, 82); + RT_INTERFACE!{interface IZoomSettings(IZoomSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IZoomSettings] { + fn get_Mode(&mut self, out: *mut ZoomTransitionMode) -> HRESULT, + fn put_Mode(&mut self, value: ZoomTransitionMode) -> HRESULT, + fn get_Value(&mut self, out: *mut f32) -> HRESULT, + fn put_Value(&mut self, value: f32) -> HRESULT + }} + impl IZoomSettings { + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mode(&mut self, value: ZoomTransitionMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ZoomSettings: IZoomSettings} + DEFINE_IID!(IID_IZoomControl, 975047442, 13018, 19479, 191, 215, 141, 12, 115, 200, 245, 165); + RT_INTERFACE!{interface IZoomControl(IZoomControlVtbl): IInspectable(IInspectableVtbl) [IID_IZoomControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_Min(&mut self, out: *mut f32) -> HRESULT, + fn get_Max(&mut self, out: *mut f32) -> HRESULT, + fn get_Step(&mut self, out: *mut f32) -> HRESULT, + fn get_Value(&mut self, out: *mut f32) -> HRESULT, + fn put_Value(&mut self, value: f32) -> HRESULT + }} + impl IZoomControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Min)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Max)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Step)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IZoomControl2, 1770274224, 11929, 17985, 133, 41, 24, 79, 49, 157, 22, 113); + RT_INTERFACE!{interface IZoomControl2(IZoomControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IZoomControl2] { + fn get_SupportedModes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Mode(&mut self, out: *mut ZoomTransitionMode) -> HRESULT, + fn Configure(&mut self, settings: *mut ZoomSettings) -> HRESULT + }} + impl IZoomControl2 { + #[inline] pub unsafe fn get_supported_modes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedModes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn configure(&mut self, settings: &ZoomSettings) -> Result<()> { + let hr = ((*self.lpVtbl).Configure)(self, settings as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ZoomControl: IZoomControl} + RT_ENUM! { enum FocusPreset: i32 { + Auto (FocusPreset_Auto) = 0, Manual (FocusPreset_Manual) = 1, AutoMacro (FocusPreset_AutoMacro) = 2, AutoNormal (FocusPreset_AutoNormal) = 3, AutoInfinity (FocusPreset_AutoInfinity) = 4, AutoHyperfocal (FocusPreset_AutoHyperfocal) = 5, + }} + RT_ENUM! { enum FocusMode: i32 { + Auto (FocusMode_Auto) = 0, Single (FocusMode_Single) = 1, Continuous (FocusMode_Continuous) = 2, Manual (FocusMode_Manual) = 3, + }} + RT_ENUM! { enum ManualFocusDistance: i32 { + Infinity (ManualFocusDistance_Infinity) = 0, Hyperfocal (ManualFocusDistance_Hyperfocal) = 1, Nearest (ManualFocusDistance_Nearest) = 2, + }} + RT_ENUM! { enum AutoFocusRange: i32 { + FullRange (AutoFocusRange_FullRange) = 0, Macro (AutoFocusRange_Macro) = 1, Normal (AutoFocusRange_Normal) = 2, + }} + DEFINE_IID!(IID_IFocusSettings, 2039844715, 12899, 17013, 133, 214, 174, 174, 137, 28, 150, 238); + RT_INTERFACE!{interface IFocusSettings(IFocusSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IFocusSettings] { + fn get_Mode(&mut self, out: *mut FocusMode) -> HRESULT, + fn put_Mode(&mut self, value: FocusMode) -> HRESULT, + fn get_AutoFocusRange(&mut self, out: *mut AutoFocusRange) -> HRESULT, + fn put_AutoFocusRange(&mut self, value: AutoFocusRange) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Value(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Distance(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Distance(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_WaitForFocus(&mut self, out: *mut bool) -> HRESULT, + fn put_WaitForFocus(&mut self, value: bool) -> HRESULT, + fn get_DisableDriverFallback(&mut self, out: *mut bool) -> HRESULT, + fn put_DisableDriverFallback(&mut self, value: bool) -> HRESULT + }} + impl IFocusSettings { + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mode(&mut self, value: FocusMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_focus_range(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoFocusRange)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_focus_range(&mut self, value: AutoFocusRange) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoFocusRange)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_distance(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Distance)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_distance(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Distance)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_wait_for_focus(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WaitForFocus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_wait_for_focus(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_WaitForFocus)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_disable_driver_fallback(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DisableDriverFallback)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_disable_driver_fallback(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisableDriverFallback)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FocusSettings: IFocusSettings} + DEFINE_IID!(IID_IFocusControl, 3235416566, 21032, 17491, 177, 83, 133, 96, 101, 146, 178, 56); + RT_INTERFACE!{interface IFocusControl(IFocusControlVtbl): IInspectable(IInspectableVtbl) [IID_IFocusControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportedPresets(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Preset(&mut self, out: *mut FocusPreset) -> HRESULT, + fn SetPresetAsync(&mut self, preset: FocusPreset, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SetPresetWithCompletionOptionAsync(&mut self, preset: FocusPreset, completeBeforeFocus: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_Min(&mut self, out: *mut u32) -> HRESULT, + fn get_Max(&mut self, out: *mut u32) -> HRESULT, + fn get_Step(&mut self, out: *mut u32) -> HRESULT, + fn get_Value(&mut self, out: *mut u32) -> HRESULT, + fn SetValueAsync(&mut self, focus: u32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn FocusAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IFocusControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_presets(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedPresets)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_preset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Preset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_preset_async(&mut self, preset: FocusPreset) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetPresetAsync)(self, preset, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_preset_with_completion_option_async(&mut self, preset: FocusPreset, completeBeforeFocus: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetPresetWithCompletionOptionAsync)(self, preset, completeBeforeFocus, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_min(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Min)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Max)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Step)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_value_async(&mut self, focus: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetValueAsync)(self, focus, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn focus_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FocusAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFocusControl2, 1065156424, 50484, 20126, 148, 195, 82, 239, 42, 253, 93, 7); + RT_INTERFACE!{interface IFocusControl2(IFocusControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IFocusControl2] { + fn get_FocusChangedSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_WaitForFocusSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportedFocusModes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedFocusDistances(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedFocusRanges(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Mode(&mut self, out: *mut FocusMode) -> HRESULT, + fn get_FocusState(&mut self, out: *mut MediaCaptureFocusState) -> HRESULT, + fn UnlockAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn LockAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn Configure(&mut self, settings: *mut FocusSettings) -> HRESULT + }} + impl IFocusControl2 { + #[inline] pub unsafe fn get_focus_changed_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FocusChangedSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_wait_for_focus_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WaitForFocusSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_focus_modes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedFocusModes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_focus_distances(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedFocusDistances)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_focus_ranges(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedFocusRanges)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FocusState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn unlock_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnlockAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn lock_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LockAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn configure(&mut self, settings: &FocusSettings) -> Result<()> { + let hr = ((*self.lpVtbl).Configure)(self, settings as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FocusControl: IFocusControl} + DEFINE_IID!(IID_IRegionOfInterest, 3857500212, 52838, 19973, 167, 143, 207, 57, 26, 94, 194, 209); + RT_INTERFACE!{interface IRegionOfInterest(IRegionOfInterestVtbl): IInspectable(IInspectableVtbl) [IID_IRegionOfInterest] { + fn get_AutoFocusEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_AutoFocusEnabled(&mut self, value: bool) -> HRESULT, + fn get_AutoWhiteBalanceEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_AutoWhiteBalanceEnabled(&mut self, value: bool) -> HRESULT, + fn get_AutoExposureEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_AutoExposureEnabled(&mut self, value: bool) -> HRESULT, + fn get_Bounds(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn put_Bounds(&mut self, value: super::super::foundation::Rect) -> HRESULT + }} + impl IRegionOfInterest { + #[inline] pub unsafe fn get_auto_focus_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoFocusEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_focus_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoFocusEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_white_balance_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoWhiteBalanceEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_white_balance_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoWhiteBalanceEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_exposure_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoExposureEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_exposure_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoExposureEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bounds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bounds(&mut self, value: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).put_Bounds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum RegionOfInterestType: i32 { + Unknown (RegionOfInterestType_Unknown) = 0, Face (RegionOfInterestType_Face) = 1, + }} + DEFINE_IID!(IID_IRegionOfInterest2, 436087441, 29610, 19793, 138, 157, 86, 204, 247, 219, 127, 84); + RT_INTERFACE!{interface IRegionOfInterest2(IRegionOfInterest2Vtbl): IInspectable(IInspectableVtbl) [IID_IRegionOfInterest2] { + fn get_Type(&mut self, out: *mut RegionOfInterestType) -> HRESULT, + fn put_Type(&mut self, value: RegionOfInterestType) -> HRESULT, + fn get_BoundsNormalized(&mut self, out: *mut bool) -> HRESULT, + fn put_BoundsNormalized(&mut self, value: bool) -> HRESULT, + fn get_Weight(&mut self, out: *mut u32) -> HRESULT, + fn put_Weight(&mut self, value: u32) -> HRESULT + }} + impl IRegionOfInterest2 { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_type(&mut self, value: RegionOfInterestType) -> Result<()> { + let hr = ((*self.lpVtbl).put_Type)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bounds_normalized(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BoundsNormalized)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bounds_normalized(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_BoundsNormalized)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_weight(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Weight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_weight(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Weight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class RegionOfInterest: IRegionOfInterest} + DEFINE_IID!(IID_IRegionsOfInterestControl, 3273913639, 43787, 17752, 139, 91, 223, 86, 147, 219, 3, 120); + RT_INTERFACE!{interface IRegionsOfInterestControl(IRegionsOfInterestControlVtbl): IInspectable(IInspectableVtbl) [IID_IRegionsOfInterestControl] { + fn get_MaxRegions(&mut self, out: *mut u32) -> HRESULT, + fn SetRegionsAsync(&mut self, regions: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SetRegionsWithLockAsync(&mut self, regions: *mut super::super::foundation::collections::IIterable, lockValues: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ClearRegionsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_AutoFocusSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_AutoWhiteBalanceSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_AutoExposureSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IRegionsOfInterestControl { + #[inline] pub unsafe fn get_max_regions(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxRegions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_regions_async(&mut self, regions: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetRegionsAsync)(self, regions as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_regions_with_lock_async(&mut self, regions: &super::super::foundation::collections::IIterable, lockValues: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetRegionsWithLockAsync)(self, regions as *const _ as *mut _, lockValues, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_regions_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearRegionsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_focus_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoFocusSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_white_balance_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoWhiteBalanceSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_exposure_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoExposureSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class RegionsOfInterestControl: IRegionsOfInterestControl} + DEFINE_IID!(IID_IExposurePriorityVideoControl, 749879459, 20840, 17009, 158, 165, 71, 98, 26, 152, 163, 82); + RT_INTERFACE!{interface IExposurePriorityVideoControl(IExposurePriorityVideoControlVtbl): IInspectable(IInspectableVtbl) [IID_IExposurePriorityVideoControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT, + fn put_Enabled(&mut self, value: bool) -> HRESULT + }} + impl IExposurePriorityVideoControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Enabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ExposurePriorityVideoControl: IExposurePriorityVideoControl} + RT_ENUM! { enum HdrVideoMode: i32 { + Off (HdrVideoMode_Off) = 0, On (HdrVideoMode_On) = 1, Auto (HdrVideoMode_Auto) = 2, + }} + DEFINE_IID!(IID_IHdrVideoControl, 1440277200, 12480, 17343, 155, 154, 151, 153, 215, 12, 237, 148); + RT_INTERFACE!{interface IHdrVideoControl(IHdrVideoControlVtbl): IInspectable(IInspectableVtbl) [IID_IHdrVideoControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportedModes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Mode(&mut self, out: *mut HdrVideoMode) -> HRESULT, + fn put_Mode(&mut self, value: HdrVideoMode) -> HRESULT + }} + impl IHdrVideoControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_modes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedModes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mode(&mut self, value: HdrVideoMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class HdrVideoControl: IHdrVideoControl} + DEFINE_IID!(IID_IAdvancedPhotoCaptureSettings, 150177338, 24, 17499, 147, 210, 100, 109, 28, 94, 208, 92); + RT_INTERFACE!{interface IAdvancedPhotoCaptureSettings(IAdvancedPhotoCaptureSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedPhotoCaptureSettings] { + fn get_Mode(&mut self, out: *mut AdvancedPhotoMode) -> HRESULT, + fn put_Mode(&mut self, value: AdvancedPhotoMode) -> HRESULT + }} + impl IAdvancedPhotoCaptureSettings { + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mode(&mut self, value: AdvancedPhotoMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AdvancedPhotoCaptureSettings: IAdvancedPhotoCaptureSettings} + DEFINE_IID!(IID_IAdvancedPhotoControl, 3316733062, 36865, 18050, 147, 9, 104, 234, 224, 8, 14, 236); + RT_INTERFACE!{interface IAdvancedPhotoControl(IAdvancedPhotoControlVtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedPhotoControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportedModes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Mode(&mut self, out: *mut AdvancedPhotoMode) -> HRESULT, + fn Configure(&mut self, settings: *mut AdvancedPhotoCaptureSettings) -> HRESULT + }} + impl IAdvancedPhotoControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_modes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedModes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn configure(&mut self, settings: &AdvancedPhotoCaptureSettings) -> Result<()> { + let hr = ((*self.lpVtbl).Configure)(self, settings as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AdvancedPhotoControl: IAdvancedPhotoControl} + RT_ENUM! { enum OpticalImageStabilizationMode: i32 { + Off (OpticalImageStabilizationMode_Off) = 0, On (OpticalImageStabilizationMode_On) = 1, Auto (OpticalImageStabilizationMode_Auto) = 2, + }} + DEFINE_IID!(IID_IOpticalImageStabilizationControl, 3215825949, 188, 16955, 142, 178, 160, 23, 140, 169, 66, 71); + RT_INTERFACE!{interface IOpticalImageStabilizationControl(IOpticalImageStabilizationControlVtbl): IInspectable(IInspectableVtbl) [IID_IOpticalImageStabilizationControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportedModes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Mode(&mut self, out: *mut OpticalImageStabilizationMode) -> HRESULT, + fn put_Mode(&mut self, value: OpticalImageStabilizationMode) -> HRESULT + }} + impl IOpticalImageStabilizationControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_modes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedModes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mode(&mut self, value: OpticalImageStabilizationMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class OpticalImageStabilizationControl: IOpticalImageStabilizationControl} + DEFINE_IID!(IID_IMediaDeviceController, 4143510990, 8346, 18683, 134, 252, 212, 69, 120, 243, 23, 230); + RT_INTERFACE!{interface IMediaDeviceController(IMediaDeviceControllerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaDeviceController] { + fn GetAvailableMediaStreamProperties(&mut self, mediaStreamType: super::capture::MediaStreamType, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetMediaStreamProperties(&mut self, mediaStreamType: super::capture::MediaStreamType, out: *mut *mut super::mediaproperties::IMediaEncodingProperties) -> HRESULT, + fn SetMediaStreamPropertiesAsync(&mut self, mediaStreamType: super::capture::MediaStreamType, mediaEncodingProperties: *mut super::mediaproperties::IMediaEncodingProperties, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IMediaDeviceController { + #[inline] pub unsafe fn get_available_media_stream_properties(&mut self, mediaStreamType: super::capture::MediaStreamType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAvailableMediaStreamProperties)(self, mediaStreamType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_stream_properties(&mut self, mediaStreamType: super::capture::MediaStreamType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMediaStreamProperties)(self, mediaStreamType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_media_stream_properties_async(&mut self, mediaStreamType: super::capture::MediaStreamType, mediaEncodingProperties: &super::mediaproperties::IMediaEncodingProperties) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetMediaStreamPropertiesAsync)(self, mediaStreamType, mediaEncodingProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioDeviceController, 3990135688, 31175, 20348, 144, 232, 239, 147, 75, 33, 88, 10); + RT_INTERFACE!{interface IAudioDeviceController(IAudioDeviceControllerVtbl): IInspectable(IInspectableVtbl) [IID_IAudioDeviceController] { + fn put_Muted(&mut self, value: bool) -> HRESULT, + fn get_Muted(&mut self, out: *mut bool) -> HRESULT, + fn put_VolumePercent(&mut self, value: f32) -> HRESULT, + fn get_VolumePercent(&mut self, out: *mut f32) -> HRESULT + }} + impl IAudioDeviceController { + #[inline] pub unsafe fn set_muted(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Muted)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_muted(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Muted)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_volume_percent(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_VolumePercent)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_volume_percent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VolumePercent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoDeviceController, 2572506485, 11822, 16568, 182, 199, 248, 45, 16, 1, 50, 16); + RT_INTERFACE!{interface IVideoDeviceController(IVideoDeviceControllerVtbl): IInspectable(IInspectableVtbl) [IID_IVideoDeviceController] { + fn get_Brightness(&mut self, out: *mut *mut MediaDeviceControl) -> HRESULT, + fn get_Contrast(&mut self, out: *mut *mut MediaDeviceControl) -> HRESULT, + fn get_Hue(&mut self, out: *mut *mut MediaDeviceControl) -> HRESULT, + fn get_WhiteBalance(&mut self, out: *mut *mut MediaDeviceControl) -> HRESULT, + fn get_BacklightCompensation(&mut self, out: *mut *mut MediaDeviceControl) -> HRESULT, + fn get_Pan(&mut self, out: *mut *mut MediaDeviceControl) -> HRESULT, + fn get_Tilt(&mut self, out: *mut *mut MediaDeviceControl) -> HRESULT, + fn get_Zoom(&mut self, out: *mut *mut MediaDeviceControl) -> HRESULT, + fn get_Roll(&mut self, out: *mut *mut MediaDeviceControl) -> HRESULT, + fn get_Exposure(&mut self, out: *mut *mut MediaDeviceControl) -> HRESULT, + fn get_Focus(&mut self, out: *mut *mut MediaDeviceControl) -> HRESULT, + fn TrySetPowerlineFrequency(&mut self, value: super::capture::PowerlineFrequency, out: *mut bool) -> HRESULT, + fn TryGetPowerlineFrequency(&mut self, value: *mut super::capture::PowerlineFrequency, out: *mut bool) -> HRESULT + }} + impl IVideoDeviceController { + #[inline] pub unsafe fn get_brightness(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Brightness)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_contrast(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contrast)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hue(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Hue)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_white_balance(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WhiteBalance)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_backlight_compensation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BacklightCompensation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pan(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pan)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tilt(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tilt)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zoom(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Zoom)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_roll(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Roll)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_exposure(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Exposure)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Focus)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_powerline_frequency(&mut self, value: super::capture::PowerlineFrequency) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySetPowerlineFrequency)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_powerline_frequency(&mut self) -> Result<(super::capture::PowerlineFrequency, bool)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetPowerlineFrequency)(self, &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaDeviceControl: IMediaDeviceControl} + RT_ENUM! { enum CaptureUse: i32 { + None (CaptureUse_None) = 0, Photo (CaptureUse_Photo) = 1, Video (CaptureUse_Video) = 2, + }} + RT_ENUM! { enum MediaCaptureOptimization: i32 { + Default (MediaCaptureOptimization_Default) = 0, Quality (MediaCaptureOptimization_Quality) = 1, Latency (MediaCaptureOptimization_Latency) = 2, Power (MediaCaptureOptimization_Power) = 3, LatencyThenQuality (MediaCaptureOptimization_LatencyThenQuality) = 4, LatencyThenPower (MediaCaptureOptimization_LatencyThenPower) = 5, PowerAndQuality (MediaCaptureOptimization_PowerAndQuality) = 6, + }} + DEFINE_IID!(IID_IAdvancedVideoCaptureDeviceController2, 2344177551, 61722, 17371, 180, 2, 17, 147, 11, 128, 174, 86); + RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController2(IAdvancedVideoCaptureDeviceController2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedVideoCaptureDeviceController2] { + fn get_LowLagPhotoSequence(&mut self, out: *mut *mut LowLagPhotoSequenceControl) -> HRESULT, + fn get_LowLagPhoto(&mut self, out: *mut *mut LowLagPhotoControl) -> HRESULT, + fn get_SceneModeControl(&mut self, out: *mut *mut SceneModeControl) -> HRESULT, + fn get_TorchControl(&mut self, out: *mut *mut TorchControl) -> HRESULT, + fn get_FlashControl(&mut self, out: *mut *mut FlashControl) -> HRESULT, + fn get_WhiteBalanceControl(&mut self, out: *mut *mut WhiteBalanceControl) -> HRESULT, + fn get_ExposureControl(&mut self, out: *mut *mut ExposureControl) -> HRESULT, + fn get_FocusControl(&mut self, out: *mut *mut FocusControl) -> HRESULT, + fn get_ExposureCompensationControl(&mut self, out: *mut *mut ExposureCompensationControl) -> HRESULT, + fn get_IsoSpeedControl(&mut self, out: *mut *mut IsoSpeedControl) -> HRESULT, + fn get_RegionsOfInterestControl(&mut self, out: *mut *mut RegionsOfInterestControl) -> HRESULT, + fn get_PrimaryUse(&mut self, out: *mut CaptureUse) -> HRESULT, + fn put_PrimaryUse(&mut self, value: CaptureUse) -> HRESULT + }} + impl IAdvancedVideoCaptureDeviceController2 { + #[inline] pub unsafe fn get_low_lag_photo_sequence(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LowLagPhotoSequence)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_low_lag_photo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LowLagPhoto)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_scene_mode_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SceneModeControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_torch_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TorchControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_flash_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FlashControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_white_balance_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WhiteBalanceControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_exposure_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExposureControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FocusControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_exposure_compensation_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExposureCompensationControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_iso_speed_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsoSpeedControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_regions_of_interest_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RegionsOfInterestControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_primary_use(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrimaryUse)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_primary_use(&mut self, value: CaptureUse) -> Result<()> { + let hr = ((*self.lpVtbl).put_PrimaryUse)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class LowLagPhotoSequenceControl: ILowLagPhotoSequenceControl} + RT_CLASS!{class LowLagPhotoControl: ILowLagPhotoControl} + DEFINE_IID!(IID_IAdvancedVideoCaptureDeviceController3, 2844495668, 60941, 18188, 185, 240, 66, 41, 196, 187, 208, 137); + RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController3(IAdvancedVideoCaptureDeviceController3Vtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedVideoCaptureDeviceController3] { + fn get_VariablePhotoSequenceController(&mut self, out: *mut *mut core::VariablePhotoSequenceController) -> HRESULT, + fn get_PhotoConfirmationControl(&mut self, out: *mut *mut PhotoConfirmationControl) -> HRESULT, + fn get_ZoomControl(&mut self, out: *mut *mut ZoomControl) -> HRESULT + }} + impl IAdvancedVideoCaptureDeviceController3 { + #[inline] pub unsafe fn get_variable_photo_sequence_controller(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VariablePhotoSequenceController)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_photo_confirmation_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhotoConfirmationControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zoom_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZoomControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PhotoConfirmationControl: IPhotoConfirmationControl} + DEFINE_IID!(IID_IAdvancedVideoCaptureDeviceController4, 3936337839, 54129, 16835, 154, 23, 130, 74, 135, 235, 223, 210); + RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController4(IAdvancedVideoCaptureDeviceController4Vtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedVideoCaptureDeviceController4] { + fn get_ExposurePriorityVideoControl(&mut self, out: *mut *mut ExposurePriorityVideoControl) -> HRESULT, + fn get_DesiredOptimization(&mut self, out: *mut MediaCaptureOptimization) -> HRESULT, + fn put_DesiredOptimization(&mut self, value: MediaCaptureOptimization) -> HRESULT, + fn get_HdrVideoControl(&mut self, out: *mut *mut HdrVideoControl) -> HRESULT, + fn get_OpticalImageStabilizationControl(&mut self, out: *mut *mut OpticalImageStabilizationControl) -> HRESULT, + fn get_AdvancedPhotoControl(&mut self, out: *mut *mut AdvancedPhotoControl) -> HRESULT + }} + impl IAdvancedVideoCaptureDeviceController4 { + #[inline] pub unsafe fn get_exposure_priority_video_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExposurePriorityVideoControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_optimization(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredOptimization)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_optimization(&mut self, value: MediaCaptureOptimization) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredOptimization)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hdr_video_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HdrVideoControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_optical_image_stabilization_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OpticalImageStabilizationControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_advanced_photo_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AdvancedPhotoControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaDeviceControl, 4020821929, 28533, 18531, 186, 11, 88, 63, 48, 54, 180, 222); + RT_INTERFACE!{interface IMediaDeviceControl(IMediaDeviceControlVtbl): IInspectable(IInspectableVtbl) [IID_IMediaDeviceControl] { + fn get_Capabilities(&mut self, out: *mut *mut MediaDeviceControlCapabilities) -> HRESULT, + fn TryGetValue(&mut self, value: *mut f64, out: *mut bool) -> HRESULT, + fn TrySetValue(&mut self, value: f64, out: *mut bool) -> HRESULT, + fn TryGetAuto(&mut self, value: *mut bool, out: *mut bool) -> HRESULT, + fn TrySetAuto(&mut self, value: bool, out: *mut bool) -> HRESULT + }} + impl IMediaDeviceControl { + #[inline] pub unsafe fn get_capabilities(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Capabilities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_value(&mut self) -> Result<(f64, bool)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetValue)(self, &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_value(&mut self, value: f64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySetValue)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_auto(&mut self) -> Result<(bool, bool)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetAuto)(self, &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_auto(&mut self, value: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySetAuto)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MediaDeviceControlCapabilities: IMediaDeviceControlCapabilities} + DEFINE_IID!(IID_IMediaDeviceControlCapabilities, 587225110, 60293, 17378, 185, 43, 130, 64, 213, 238, 112, 236); + RT_INTERFACE!{interface IMediaDeviceControlCapabilities(IMediaDeviceControlCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IMediaDeviceControlCapabilities] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_Min(&mut self, out: *mut f64) -> HRESULT, + fn get_Max(&mut self, out: *mut f64) -> HRESULT, + fn get_Step(&mut self, out: *mut f64) -> HRESULT, + fn get_Default(&mut self, out: *mut f64) -> HRESULT, + fn get_AutoModeSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IMediaDeviceControlCapabilities { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Min)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Max)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Step)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_default(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Default)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_mode_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoModeSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdvancedVideoCaptureDeviceController, 3731879123, 11158, 17795, 128, 171, 181, 176, 29, 198, 168, 215); + RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController(IAdvancedVideoCaptureDeviceControllerVtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedVideoCaptureDeviceController] { + fn SetDeviceProperty(&mut self, propertyId: HSTRING, propertyValue: *mut IInspectable) -> HRESULT, + fn GetDeviceProperty(&mut self, propertyId: HSTRING, out: *mut *mut IInspectable) -> HRESULT + }} + impl IAdvancedVideoCaptureDeviceController { + #[inline] pub unsafe fn set_device_property(&mut self, propertyId: &HStringArg, propertyValue: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetDeviceProperty)(self, propertyId.get(), propertyValue as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_property(&mut self, propertyId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceProperty)(self, propertyId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILowLagPhotoSequenceControl, 1037013149, 27926, 16540, 186, 254, 185, 165, 148, 198, 253, 230); + RT_INTERFACE!{interface ILowLagPhotoSequenceControl(ILowLagPhotoSequenceControlVtbl): IInspectable(IInspectableVtbl) [IID_ILowLagPhotoSequenceControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_MaxPastPhotos(&mut self, out: *mut u32) -> HRESULT, + fn get_MaxPhotosPerSecond(&mut self, out: *mut f32) -> HRESULT, + fn get_PastPhotoLimit(&mut self, out: *mut u32) -> HRESULT, + fn put_PastPhotoLimit(&mut self, value: u32) -> HRESULT, + fn get_PhotosPerSecondLimit(&mut self, out: *mut f32) -> HRESULT, + fn put_PhotosPerSecondLimit(&mut self, value: f32) -> HRESULT, + fn GetHighestConcurrentFrameRate(&mut self, captureProperties: *mut super::mediaproperties::IMediaEncodingProperties, out: *mut *mut super::mediaproperties::MediaRatio) -> HRESULT, + fn GetCurrentFrameRate(&mut self, out: *mut *mut super::mediaproperties::MediaRatio) -> HRESULT, + fn get_ThumbnailEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_ThumbnailEnabled(&mut self, value: bool) -> HRESULT, + fn get_ThumbnailFormat(&mut self, out: *mut super::mediaproperties::MediaThumbnailFormat) -> HRESULT, + fn put_ThumbnailFormat(&mut self, value: super::mediaproperties::MediaThumbnailFormat) -> HRESULT, + fn get_DesiredThumbnailSize(&mut self, out: *mut u32) -> HRESULT, + fn put_DesiredThumbnailSize(&mut self, value: u32) -> HRESULT, + fn get_HardwareAcceleratedThumbnailSupported(&mut self, out: *mut u32) -> HRESULT + }} + impl ILowLagPhotoSequenceControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_past_photos(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPastPhotos)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_photos_per_second(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPhotosPerSecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_past_photo_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PastPhotoLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_past_photo_limit(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_PastPhotoLimit)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_photos_per_second_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhotosPerSecondLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_photos_per_second_limit(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_PhotosPerSecondLimit)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_highest_concurrent_frame_rate(&mut self, captureProperties: &super::mediaproperties::IMediaEncodingProperties) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetHighestConcurrentFrameRate)(self, captureProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_frame_rate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentFrameRate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ThumbnailEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_thumbnail_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ThumbnailEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ThumbnailFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_thumbnail_format(&mut self, value: super::mediaproperties::MediaThumbnailFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_ThumbnailFormat)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_thumbnail_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredThumbnailSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_thumbnail_size(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredThumbnailSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hardware_accelerated_thumbnail_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HardwareAcceleratedThumbnailSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILowLagPhotoControl, 1834765776, 64223, 16733, 174, 230, 59, 170, 82, 147, 0, 201); + RT_INTERFACE!{interface ILowLagPhotoControl(ILowLagPhotoControlVtbl): IInspectable(IInspectableVtbl) [IID_ILowLagPhotoControl] { + fn GetHighestConcurrentFrameRate(&mut self, captureProperties: *mut super::mediaproperties::IMediaEncodingProperties, out: *mut *mut super::mediaproperties::MediaRatio) -> HRESULT, + fn GetCurrentFrameRate(&mut self, out: *mut *mut super::mediaproperties::MediaRatio) -> HRESULT, + fn get_ThumbnailEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_ThumbnailEnabled(&mut self, value: bool) -> HRESULT, + fn get_ThumbnailFormat(&mut self, out: *mut super::mediaproperties::MediaThumbnailFormat) -> HRESULT, + fn put_ThumbnailFormat(&mut self, value: super::mediaproperties::MediaThumbnailFormat) -> HRESULT, + fn get_DesiredThumbnailSize(&mut self, out: *mut u32) -> HRESULT, + fn put_DesiredThumbnailSize(&mut self, value: u32) -> HRESULT, + fn get_HardwareAcceleratedThumbnailSupported(&mut self, out: *mut u32) -> HRESULT + }} + impl ILowLagPhotoControl { + #[inline] pub unsafe fn get_highest_concurrent_frame_rate(&mut self, captureProperties: &super::mediaproperties::IMediaEncodingProperties) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetHighestConcurrentFrameRate)(self, captureProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_frame_rate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentFrameRate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ThumbnailEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_thumbnail_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ThumbnailEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ThumbnailFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_thumbnail_format(&mut self, value: super::mediaproperties::MediaThumbnailFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_ThumbnailFormat)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_thumbnail_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredThumbnailSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_thumbnail_size(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredThumbnailSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hardware_accelerated_thumbnail_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HardwareAcceleratedThumbnailSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoConfirmationControl, 3371430755, 65374, 17794, 169, 168, 5, 80, 248, 90, 74, 118); + RT_INTERFACE!{interface IPhotoConfirmationControl(IPhotoConfirmationControlVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoConfirmationControl] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT, + fn put_Enabled(&mut self, value: bool) -> HRESULT, + fn get_PixelFormat(&mut self, out: *mut super::mediaproperties::MediaPixelFormat) -> HRESULT, + fn put_PixelFormat(&mut self, format: super::mediaproperties::MediaPixelFormat) -> HRESULT + }} + impl IPhotoConfirmationControl { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Enabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pixel_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PixelFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_pixel_format(&mut self, format: super::mediaproperties::MediaPixelFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_PixelFormat)(self, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_STRUCT! { struct CallControlContract { + + }} + RT_ENUM! { enum TelephonyKey: i32 { + D0 (TelephonyKey_D0) = 0, D1 (TelephonyKey_D1) = 1, D2 (TelephonyKey_D2) = 2, D3 (TelephonyKey_D3) = 3, D4 (TelephonyKey_D4) = 4, D5 (TelephonyKey_D5) = 5, D6 (TelephonyKey_D6) = 6, D7 (TelephonyKey_D7) = 7, D8 (TelephonyKey_D8) = 8, D9 (TelephonyKey_D9) = 9, Star (TelephonyKey_Star) = 10, Pound (TelephonyKey_Pound) = 11, A (TelephonyKey_A) = 12, B (TelephonyKey_B) = 13, C (TelephonyKey_C) = 14, D (TelephonyKey_D) = 15, + }} + DEFINE_IID!(IID_IDialRequestedEventArgs, 58430110, 38204, 17030, 136, 102, 79, 15, 55, 108, 133, 90); + RT_INTERFACE!{interface IDialRequestedEventArgs(IDialRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDialRequestedEventArgs] { + fn Handled(&mut self) -> HRESULT, + fn get_Contact(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IDialRequestedEventArgs { + #[inline] pub unsafe fn handled(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Handled)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DialRequestedEventArgs: IDialRequestedEventArgs} + DEFINE_IID!(IID_IRedialRequestedEventArgs, 2125812233, 30379, 19505, 180, 14, 75, 88, 55, 157, 88, 12); + RT_INTERFACE!{interface IRedialRequestedEventArgs(IRedialRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRedialRequestedEventArgs] { + fn Handled(&mut self) -> HRESULT + }} + impl IRedialRequestedEventArgs { + #[inline] pub unsafe fn handled(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Handled)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class RedialRequestedEventArgs: IRedialRequestedEventArgs} + DEFINE_IID!(IID_IKeypadPressedEventArgs, 3550755072, 46330, 18893, 148, 66, 137, 175, 101, 104, 246, 1); + RT_INTERFACE!{interface IKeypadPressedEventArgs(IKeypadPressedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IKeypadPressedEventArgs] { + fn get_TelephonyKey(&mut self, out: *mut TelephonyKey) -> HRESULT + }} + impl IKeypadPressedEventArgs { + #[inline] pub unsafe fn get_telephony_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TelephonyKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class KeypadPressedEventArgs: IKeypadPressedEventArgs} + DEFINE_IID!(IID_CallControlEventHandler, 1500476831, 20703, 17492, 188, 99, 77, 61, 1, 182, 25, 88); + RT_DELEGATE!{delegate CallControlEventHandler(CallControlEventHandlerVtbl, CallControlEventHandlerImpl) [IID_CallControlEventHandler] { + fn Invoke(&mut self, sender: *mut CallControl) -> HRESULT + }} + impl CallControlEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &CallControl) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CallControl: ICallControl} + RT_ACTIVATABLE!{ICallControlStatics [CLSID_CallControl]} + DEFINE_CLSID!(CLSID_CallControl = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,68,101,118,105,99,101,115,46,67,97,108,108,67,111,110,116,114,111,108,0]); + DEFINE_IID!(IID_DialRequestedEventHandler, 1522270171, 49695, 19396, 137, 27, 37, 126, 40, 193, 177, 164); + RT_DELEGATE!{delegate DialRequestedEventHandler(DialRequestedEventHandlerVtbl, DialRequestedEventHandlerImpl) [IID_DialRequestedEventHandler] { + fn Invoke(&mut self, sender: *mut CallControl, e: *mut DialRequestedEventArgs) -> HRESULT + }} + impl DialRequestedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &CallControl, e: &DialRequestedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_RedialRequestedEventHandler, 3136444369, 20157, 19332, 159, 71, 110, 196, 61, 117, 216, 177); + RT_DELEGATE!{delegate RedialRequestedEventHandler(RedialRequestedEventHandlerVtbl, RedialRequestedEventHandlerImpl) [IID_RedialRequestedEventHandler] { + fn Invoke(&mut self, sender: *mut CallControl, e: *mut RedialRequestedEventArgs) -> HRESULT + }} + impl RedialRequestedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &CallControl, e: &RedialRequestedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_KeypadPressedEventHandler, 3862406228, 50471, 16940, 137, 38, 201, 175, 131, 181, 89, 160); + RT_DELEGATE!{delegate KeypadPressedEventHandler(KeypadPressedEventHandlerVtbl, KeypadPressedEventHandlerImpl) [IID_KeypadPressedEventHandler] { + fn Invoke(&mut self, sender: *mut CallControl, e: *mut KeypadPressedEventArgs) -> HRESULT + }} + impl KeypadPressedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &CallControl, e: &KeypadPressedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICallControl, 2770391254, 44685, 17883, 128, 17, 202, 73, 211, 179, 229, 120); + RT_INTERFACE!{interface ICallControl(ICallControlVtbl): IInspectable(IInspectableVtbl) [IID_ICallControl] { + fn IndicateNewIncomingCall(&mut self, enableRinger: bool, callerId: HSTRING, out: *mut u64) -> HRESULT, + fn IndicateNewOutgoingCall(&mut self, out: *mut u64) -> HRESULT, + fn IndicateActiveCall(&mut self, callToken: u64) -> HRESULT, + fn EndCall(&mut self, callToken: u64) -> HRESULT, + fn get_HasRinger(&mut self, out: *mut bool) -> HRESULT, + fn add_AnswerRequested(&mut self, handler: *mut CallControlEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AnswerRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_HangUpRequested(&mut self, handler: *mut CallControlEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_HangUpRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DialRequested(&mut self, handler: *mut DialRequestedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DialRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RedialRequested(&mut self, handler: *mut RedialRequestedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RedialRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_KeypadPressed(&mut self, handler: *mut KeypadPressedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeypadPressed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AudioTransferRequested(&mut self, handler: *mut CallControlEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioTransferRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICallControl { + #[inline] pub unsafe fn indicate_new_incoming_call(&mut self, enableRinger: bool, callerId: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IndicateNewIncomingCall)(self, enableRinger, callerId.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn indicate_new_outgoing_call(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IndicateNewOutgoingCall)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn indicate_active_call(&mut self, callToken: u64) -> Result<()> { + let hr = ((*self.lpVtbl).IndicateActiveCall)(self, callToken); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn end_call(&mut self, callToken: u64) -> Result<()> { + let hr = ((*self.lpVtbl).EndCall)(self, callToken); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_ringer(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasRinger)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_answer_requested(&mut self, handler: &CallControlEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AnswerRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_answer_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AnswerRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_hang_up_requested(&mut self, handler: &CallControlEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_HangUpRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_hang_up_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_HangUpRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_dial_requested(&mut self, handler: &DialRequestedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DialRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_dial_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DialRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_redial_requested(&mut self, handler: &RedialRequestedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RedialRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_redial_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RedialRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_keypad_pressed(&mut self, handler: &KeypadPressedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_KeypadPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_keypad_pressed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_KeypadPressed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_audio_transfer_requested(&mut self, handler: &CallControlEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AudioTransferRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_audio_transfer_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AudioTransferRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICallControlStatics, 60054229, 34219, 16609, 175, 25, 86, 201, 67, 3, 176, 25); + RT_INTERFACE!{static interface ICallControlStatics(ICallControlStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICallControlStatics] { + fn GetDefault(&mut self, out: *mut *mut CallControl) -> HRESULT, + fn FromId(&mut self, deviceId: HSTRING, out: *mut *mut CallControl) -> HRESULT + }} + impl ICallControlStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id(&mut self, deviceId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromId)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +pub mod core { // Windows.Media.Devices.Core +use ::prelude::*; + RT_CLASS!{class CameraIntrinsics: ICameraIntrinsics} + RT_CLASS!{class DepthCorrelatedCoordinateMapper: IDepthCorrelatedCoordinateMapper} + RT_CLASS!{class VariablePhotoSequenceController: IVariablePhotoSequenceController} + DEFINE_IID!(IID_IFrameExposureCapabilities, 3183385827, 14725, 20082, 151, 194, 5, 144, 214, 19, 7, 161); + RT_INTERFACE!{interface IFrameExposureCapabilities(IFrameExposureCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IFrameExposureCapabilities] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_Min(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Max(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Step(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT + }} + impl IFrameExposureCapabilities { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Min)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Max)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_step(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Step)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class FrameExposureCapabilities: IFrameExposureCapabilities} + DEFINE_IID!(IID_IFrameExposureCompensationCapabilities, 3112740899, 32869, 16878, 176, 79, 114, 34, 101, 149, 69, 0); + RT_INTERFACE!{interface IFrameExposureCompensationCapabilities(IFrameExposureCompensationCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IFrameExposureCompensationCapabilities] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_Min(&mut self, out: *mut f32) -> HRESULT, + fn get_Max(&mut self, out: *mut f32) -> HRESULT, + fn get_Step(&mut self, out: *mut f32) -> HRESULT + }} + impl IFrameExposureCompensationCapabilities { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Min)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Max)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Step)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class FrameExposureCompensationCapabilities: IFrameExposureCompensationCapabilities} + DEFINE_IID!(IID_IFrameIsoSpeedCapabilities, 381550433, 28150, 19145, 185, 42, 159, 110, 205, 26, 210, 250); + RT_INTERFACE!{interface IFrameIsoSpeedCapabilities(IFrameIsoSpeedCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IFrameIsoSpeedCapabilities] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_Min(&mut self, out: *mut u32) -> HRESULT, + fn get_Max(&mut self, out: *mut u32) -> HRESULT, + fn get_Step(&mut self, out: *mut u32) -> HRESULT + }} + impl IFrameIsoSpeedCapabilities { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Min)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Max)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Step)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class FrameIsoSpeedCapabilities: IFrameIsoSpeedCapabilities} + DEFINE_IID!(IID_IFrameFocusCapabilities, 2066074968, 448, 16485, 156, 64, 193, 167, 33, 66, 92, 26); + RT_INTERFACE!{interface IFrameFocusCapabilities(IFrameFocusCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IFrameFocusCapabilities] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_Min(&mut self, out: *mut u32) -> HRESULT, + fn get_Max(&mut self, out: *mut u32) -> HRESULT, + fn get_Step(&mut self, out: *mut u32) -> HRESULT + }} + impl IFrameFocusCapabilities { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Min)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Max)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Step)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class FrameFocusCapabilities: IFrameFocusCapabilities} + RT_ENUM! { enum FrameFlashMode: i32 { + Disable (FrameFlashMode_Disable) = 0, Enable (FrameFlashMode_Enable) = 1, Global (FrameFlashMode_Global) = 2, + }} + DEFINE_IID!(IID_IFrameFlashCapabilities, 3146989986, 24254, 20322, 130, 35, 14, 43, 5, 191, 187, 208); + RT_INTERFACE!{interface IFrameFlashCapabilities(IFrameFlashCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IFrameFlashCapabilities] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_RedEyeReductionSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_PowerSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IFrameFlashCapabilities { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_red_eye_reduction_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RedEyeReductionSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_power_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class FrameFlashCapabilities: IFrameFlashCapabilities} + DEFINE_IID!(IID_IFrameControlCapabilities, 2835328608, 20126, 17271, 167, 137, 226, 76, 74, 231, 229, 68); + RT_INTERFACE!{interface IFrameControlCapabilities(IFrameControlCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IFrameControlCapabilities] { + fn get_Exposure(&mut self, out: *mut *mut FrameExposureCapabilities) -> HRESULT, + fn get_ExposureCompensation(&mut self, out: *mut *mut FrameExposureCompensationCapabilities) -> HRESULT, + fn get_IsoSpeed(&mut self, out: *mut *mut FrameIsoSpeedCapabilities) -> HRESULT, + fn get_Focus(&mut self, out: *mut *mut FrameFocusCapabilities) -> HRESULT, + fn get_PhotoConfirmationSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IFrameControlCapabilities { + #[inline] pub unsafe fn get_exposure(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Exposure)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_exposure_compensation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExposureCompensation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_iso_speed(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsoSpeed)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Focus)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_photo_confirmation_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhotoConfirmationSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameControlCapabilities2, 3466265700, 18224, 17423, 189, 62, 239, 232, 168, 242, 48, 168); + RT_INTERFACE!{interface IFrameControlCapabilities2(IFrameControlCapabilities2Vtbl): IInspectable(IInspectableVtbl) [IID_IFrameControlCapabilities2] { + fn get_Flash(&mut self, out: *mut *mut FrameFlashCapabilities) -> HRESULT + }} + impl IFrameControlCapabilities2 { + #[inline] pub unsafe fn get_flash(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Flash)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FrameControlCapabilities: IFrameControlCapabilities} + DEFINE_IID!(IID_IFrameExposureControl, 2975881825, 65455, 18258, 182, 33, 245, 182, 241, 23, 244, 50); + RT_INTERFACE!{interface IFrameExposureControl(IFrameExposureControlVtbl): IInspectable(IInspectableVtbl) [IID_IFrameExposureControl] { + fn get_Auto(&mut self, out: *mut bool) -> HRESULT, + fn put_Auto(&mut self, value: bool) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, + fn put_Value(&mut self, value: *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT + }} + impl IFrameExposureControl { + #[inline] pub unsafe fn get_auto(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Auto)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Auto)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: &::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FrameExposureControl: IFrameExposureControl} + DEFINE_IID!(IID_IFrameExposureCompensationControl, 3914897097, 63481, 18634, 133, 145, 162, 101, 49, 203, 21, 120); + RT_INTERFACE!{interface IFrameExposureCompensationControl(IFrameExposureCompensationControlVtbl): IInspectable(IInspectableVtbl) [IID_IFrameExposureCompensationControl] { + fn get_Value(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_Value(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + }} + impl IFrameExposureCompensationControl { + #[inline] pub unsafe fn get_value(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FrameExposureCompensationControl: IFrameExposureCompensationControl} + DEFINE_IID!(IID_IFrameIsoSpeedControl, 436465645, 30826, 19573, 165, 87, 122, 185, 168, 95, 88, 140); + RT_INTERFACE!{interface IFrameIsoSpeedControl(IFrameIsoSpeedControlVtbl): IInspectable(IInspectableVtbl) [IID_IFrameIsoSpeedControl] { + fn get_Auto(&mut self, out: *mut bool) -> HRESULT, + fn put_Auto(&mut self, value: bool) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_Value(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + }} + impl IFrameIsoSpeedControl { + #[inline] pub unsafe fn get_auto(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Auto)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Auto)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FrameIsoSpeedControl: IFrameIsoSpeedControl} + DEFINE_IID!(IID_IFrameFocusControl, 657322448, 55570, 16916, 166, 123, 227, 138, 141, 72, 216, 198); + RT_INTERFACE!{interface IFrameFocusControl(IFrameFocusControlVtbl): IInspectable(IInspectableVtbl) [IID_IFrameFocusControl] { + fn get_Value(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_Value(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + }} + impl IFrameFocusControl { + #[inline] pub unsafe fn get_value(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FrameFocusControl: IFrameFocusControl} + DEFINE_IID!(IID_IFrameFlashControl, 1976956615, 48453, 20395, 147, 117, 69, 172, 4, 179, 50, 194); + RT_INTERFACE!{interface IFrameFlashControl(IFrameFlashControlVtbl): IInspectable(IInspectableVtbl) [IID_IFrameFlashControl] { + fn get_Mode(&mut self, out: *mut FrameFlashMode) -> HRESULT, + fn put_Mode(&mut self, value: FrameFlashMode) -> HRESULT, + fn get_Auto(&mut self, out: *mut bool) -> HRESULT, + fn put_Auto(&mut self, value: bool) -> HRESULT, + fn get_RedEyeReduction(&mut self, out: *mut bool) -> HRESULT, + fn put_RedEyeReduction(&mut self, value: bool) -> HRESULT, + fn get_PowerPercent(&mut self, out: *mut f32) -> HRESULT, + fn put_PowerPercent(&mut self, value: f32) -> HRESULT + }} + impl IFrameFlashControl { + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mode(&mut self, value: FrameFlashMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Auto)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Auto)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_red_eye_reduction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RedEyeReduction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_red_eye_reduction(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_RedEyeReduction)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_power_percent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerPercent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_power_percent(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_PowerPercent)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FrameFlashControl: IFrameFlashControl} + DEFINE_IID!(IID_IFrameController, 3244579289, 47855, 16466, 145, 119, 72, 175, 242, 175, 117, 34); + RT_INTERFACE!{interface IFrameController(IFrameControllerVtbl): IInspectable(IInspectableVtbl) [IID_IFrameController] { + fn get_ExposureControl(&mut self, out: *mut *mut FrameExposureControl) -> HRESULT, + fn get_ExposureCompensationControl(&mut self, out: *mut *mut FrameExposureCompensationControl) -> HRESULT, + fn get_IsoSpeedControl(&mut self, out: *mut *mut FrameIsoSpeedControl) -> HRESULT, + fn get_FocusControl(&mut self, out: *mut *mut FrameFocusControl) -> HRESULT, + fn get_PhotoConfirmationEnabled(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_PhotoConfirmationEnabled(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + }} + impl IFrameController { + #[inline] pub unsafe fn get_exposure_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExposureControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_exposure_compensation_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExposureCompensationControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_iso_speed_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsoSpeedControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FocusControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_photo_confirmation_enabled(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhotoConfirmationEnabled)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_photo_confirmation_enabled(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_PhotoConfirmationEnabled)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameController2, 13876341, 55420, 18523, 138, 9, 92, 53, 133, 104, 180, 39); + RT_INTERFACE!{interface IFrameController2(IFrameController2Vtbl): IInspectable(IInspectableVtbl) [IID_IFrameController2] { + fn get_FlashControl(&mut self, out: *mut *mut FrameFlashControl) -> HRESULT + }} + impl IFrameController2 { + #[inline] pub unsafe fn get_flash_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FlashControl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FrameController: IFrameController} + DEFINE_IID!(IID_IVariablePhotoSequenceController, 2143287424, 60812, 17405, 167, 195, 179, 88, 9, 228, 34, 154); + RT_INTERFACE!{interface IVariablePhotoSequenceController(IVariablePhotoSequenceControllerVtbl): IInspectable(IInspectableVtbl) [IID_IVariablePhotoSequenceController] { + fn get_Supported(&mut self, out: *mut bool) -> HRESULT, + fn get_MaxPhotosPerSecond(&mut self, out: *mut f32) -> HRESULT, + fn get_PhotosPerSecondLimit(&mut self, out: *mut f32) -> HRESULT, + fn put_PhotosPerSecondLimit(&mut self, value: f32) -> HRESULT, + fn GetHighestConcurrentFrameRate(&mut self, captureProperties: *mut super::super::mediaproperties::IMediaEncodingProperties, out: *mut *mut super::super::mediaproperties::MediaRatio) -> HRESULT, + fn GetCurrentFrameRate(&mut self, out: *mut *mut super::super::mediaproperties::MediaRatio) -> HRESULT, + fn get_FrameCapabilities(&mut self, out: *mut *mut FrameControlCapabilities) -> HRESULT, + fn get_DesiredFrameControllers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + }} + impl IVariablePhotoSequenceController { + #[inline] pub unsafe fn get_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Supported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_photos_per_second(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPhotosPerSecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_photos_per_second_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhotosPerSecondLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_photos_per_second_limit(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_PhotosPerSecondLimit)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_highest_concurrent_frame_rate(&mut self, captureProperties: &super::super::mediaproperties::IMediaEncodingProperties) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetHighestConcurrentFrameRate)(self, captureProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_frame_rate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentFrameRate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_capabilities(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameCapabilities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_frame_controllers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesiredFrameControllers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICameraIntrinsicsFactory, 3235759238, 8498, 18996, 166, 89, 155, 254, 42, 5, 87, 18); + RT_INTERFACE!{interface ICameraIntrinsicsFactory(ICameraIntrinsicsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICameraIntrinsicsFactory] { + fn Create(&mut self, focalLength: ::rt::gen::windows::foundation::numerics::Vector2, principalPoint: ::rt::gen::windows::foundation::numerics::Vector2, radialDistortion: ::rt::gen::windows::foundation::numerics::Vector3, tangentialDistortion: ::rt::gen::windows::foundation::numerics::Vector2, imageWidth: u32, imageHeight: u32, out: *mut *mut CameraIntrinsics) -> HRESULT + }} + impl ICameraIntrinsicsFactory { + #[inline] pub unsafe fn create(&mut self, focalLength: ::rt::gen::windows::foundation::numerics::Vector2, principalPoint: ::rt::gen::windows::foundation::numerics::Vector2, radialDistortion: ::rt::gen::windows::foundation::numerics::Vector3, tangentialDistortion: ::rt::gen::windows::foundation::numerics::Vector2, imageWidth: u32, imageHeight: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, focalLength, principalPoint, radialDistortion, tangentialDistortion, imageWidth, imageHeight, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICameraIntrinsics, 178711858, 25993, 18906, 175, 222, 89, 66, 112, 202, 10, 172); + RT_INTERFACE!{interface ICameraIntrinsics(ICameraIntrinsicsVtbl): IInspectable(IInspectableVtbl) [IID_ICameraIntrinsics] { + fn get_FocalLength(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector2) -> HRESULT, + fn get_PrincipalPoint(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector2) -> HRESULT, + fn get_RadialDistortion(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_TangentialDistortion(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector2) -> HRESULT, + fn get_ImageWidth(&mut self, out: *mut u32) -> HRESULT, + fn get_ImageHeight(&mut self, out: *mut u32) -> HRESULT, + fn ProjectOntoFrame(&mut self, coordinate: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn UnprojectAtUnitDepth(&mut self, pixelCoordinate: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::numerics::Vector2) -> HRESULT, + fn ProjectManyOntoFrame(&mut self, coordinatesSize: u32, coordinates: *mut ::rt::gen::windows::foundation::numerics::Vector3, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn UnprojectPixelsAtUnitDepth(&mut self, pixelCoordinatesSize: u32, pixelCoordinates: *mut ::rt::gen::windows::foundation::Point, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::numerics::Vector2) -> HRESULT + }} + impl ICameraIntrinsics { + #[inline] pub unsafe fn get_focal_length(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector2> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FocalLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_principal_point(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector2> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrincipalPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_radial_distortion(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RadialDistortion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tangential_distortion(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector2> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TangentialDistortion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_image_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ImageWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_image_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ImageHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn project_onto_frame(&mut self, coordinate: ::rt::gen::windows::foundation::numerics::Vector3) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ProjectOntoFrame)(self, coordinate, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn unproject_at_unit_depth(&mut self, pixelCoordinate: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::numerics::Vector2> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).UnprojectAtUnitDepth)(self, pixelCoordinate, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn project_many_onto_frame(&mut self, coordinates: &[::rt::gen::windows::foundation::numerics::Vector3], resultsSize: u32, results: *mut ::rt::gen::windows::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).ProjectManyOntoFrame)(self, coordinates.len() as u32, coordinates.as_ptr() as *mut _, resultsSize, results); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn unproject_pixels_at_unit_depth(&mut self, pixelCoordinates: &[::rt::gen::windows::foundation::Point], resultsSize: u32, results: *mut ::rt::gen::windows::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).UnprojectPixelsAtUnitDepth)(self, pixelCoordinates.len() as u32, pixelCoordinates.as_ptr() as *mut _, resultsSize, results); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICameraIntrinsics2, 215655495, 1944, 19277, 131, 159, 197, 236, 65, 77, 178, 122); + RT_INTERFACE!{interface ICameraIntrinsics2(ICameraIntrinsics2Vtbl): IInspectable(IInspectableVtbl) [IID_ICameraIntrinsics2] { + fn get_UndistortedProjectionTransform(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Matrix4x4) -> HRESULT, + fn DistortPoint(&mut self, input: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn DistortPoints(&mut self, inputsSize: u32, inputs: *mut ::rt::gen::windows::foundation::Point, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn UndistortPoint(&mut self, input: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn UndistortPoints(&mut self, inputsSize: u32, inputs: *mut ::rt::gen::windows::foundation::Point, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::Point) -> HRESULT + }} + impl ICameraIntrinsics2 { + #[inline] pub unsafe fn get_undistorted_projection_transform(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Matrix4x4> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UndistortedProjectionTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn distort_point(&mut self, input: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).DistortPoint)(self, input, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn distort_points(&mut self, inputs: &[::rt::gen::windows::foundation::Point], resultsSize: u32, results: *mut ::rt::gen::windows::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).DistortPoints)(self, inputs.len() as u32, inputs.as_ptr() as *mut _, resultsSize, results); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn undistort_point(&mut self, input: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).UndistortPoint)(self, input, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn undistort_points(&mut self, inputs: &[::rt::gen::windows::foundation::Point], resultsSize: u32, results: *mut ::rt::gen::windows::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).UndistortPoints)(self, inputs.len() as u32, inputs.as_ptr() as *mut _, resultsSize, results); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDepthCorrelatedCoordinateMapper, 4183656955, 35568, 19632, 146, 109, 105, 104, 102, 229, 4, 106); + RT_INTERFACE!{interface IDepthCorrelatedCoordinateMapper(IDepthCorrelatedCoordinateMapperVtbl): IInspectable(IInspectableVtbl) [IID_IDepthCorrelatedCoordinateMapper] { + #[cfg(feature="windows.perception")] fn UnprojectPoint(&mut self, sourcePoint: ::rt::gen::windows::foundation::Point, targetCoordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + #[cfg(feature="windows.perception")] fn UnprojectPoints(&mut self, sourcePointsSize: u32, sourcePoints: *mut ::rt::gen::windows::foundation::Point, targetCoordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + #[cfg(feature="windows.perception")] fn MapPoint(&mut self, sourcePoint: ::rt::gen::windows::foundation::Point, targetCoordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, targetCameraIntrinsics: *mut CameraIntrinsics, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + #[cfg(feature="windows.perception")] fn MapPoints(&mut self, sourcePointsSize: u32, sourcePoints: *mut ::rt::gen::windows::foundation::Point, targetCoordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, targetCameraIntrinsics: *mut CameraIntrinsics, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::Point) -> HRESULT + }} + impl IDepthCorrelatedCoordinateMapper { + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn unproject_point(&mut self, sourcePoint: ::rt::gen::windows::foundation::Point, targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).UnprojectPoint)(self, sourcePoint, targetCoordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn unproject_points(&mut self, sourcePoints: &[::rt::gen::windows::foundation::Point], targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).UnprojectPoints)(self, sourcePoints.len() as u32, sourcePoints.as_ptr() as *mut _, targetCoordinateSystem as *const _ as *mut _, resultsSize, results); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn map_point(&mut self, sourcePoint: ::rt::gen::windows::foundation::Point, targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, targetCameraIntrinsics: &CameraIntrinsics) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).MapPoint)(self, sourcePoint, targetCoordinateSystem as *const _ as *mut _, targetCameraIntrinsics as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn map_points(&mut self, sourcePoints: &[::rt::gen::windows::foundation::Point], targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, targetCameraIntrinsics: &CameraIntrinsics, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).MapPoints)(self, sourcePoints.len() as u32, sourcePoints.as_ptr() as *mut _, targetCoordinateSystem as *const _ as *mut _, targetCameraIntrinsics as *const _ as *mut _, resultsSize, results); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Media.Devices.Core +} // Windows.Media.Devices +pub mod dialprotocol { // Windows.Media.DialProtocol +use ::prelude::*; + RT_ENUM! { enum DialAppState: i32 { + Unknown (DialAppState_Unknown) = 0, Stopped (DialAppState_Stopped) = 1, Running (DialAppState_Running) = 2, NetworkFailure (DialAppState_NetworkFailure) = 3, + }} + RT_ENUM! { enum DialAppLaunchResult: i32 { + Launched (DialAppLaunchResult_Launched) = 0, FailedToLaunch (DialAppLaunchResult_FailedToLaunch) = 1, NotFound (DialAppLaunchResult_NotFound) = 2, NetworkFailure (DialAppLaunchResult_NetworkFailure) = 3, + }} + RT_ENUM! { enum DialAppStopResult: i32 { + Stopped (DialAppStopResult_Stopped) = 0, StopFailed (DialAppStopResult_StopFailed) = 1, OperationNotSupported (DialAppStopResult_OperationNotSupported) = 2, NetworkFailure (DialAppStopResult_NetworkFailure) = 3, + }} + RT_ENUM! { enum DialDeviceDisplayStatus: i32 { + None (DialDeviceDisplayStatus_None) = 0, Connecting (DialDeviceDisplayStatus_Connecting) = 1, Connected (DialDeviceDisplayStatus_Connected) = 2, Disconnecting (DialDeviceDisplayStatus_Disconnecting) = 3, Disconnected (DialDeviceDisplayStatus_Disconnected) = 4, Error (DialDeviceDisplayStatus_Error) = 5, + }} + DEFINE_IID!(IID_IDialAppStateDetails, 3720651937, 62942, 16397, 190, 164, 140, 132, 102, 187, 41, 97); + RT_INTERFACE!{interface IDialAppStateDetails(IDialAppStateDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IDialAppStateDetails] { + fn get_State(&mut self, out: *mut DialAppState) -> HRESULT, + fn get_FullXml(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IDialAppStateDetails { + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_full_xml(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FullXml)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DialAppStateDetails: IDialAppStateDetails} + DEFINE_IID!(IID_IDialApp, 1432353747, 17847, 18931, 187, 215, 48, 45, 182, 8, 70, 70); + RT_INTERFACE!{interface IDialApp(IDialAppVtbl): IInspectable(IInspectableVtbl) [IID_IDialApp] { + fn get_AppName(&mut self, out: *mut HSTRING) -> HRESULT, + fn RequestLaunchAsync(&mut self, appArgument: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn StopAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAppStateAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IDialApp { + #[inline] pub unsafe fn get_app_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_launch_async(&mut self, appArgument: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestLaunchAsync)(self, appArgument.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_state_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAppStateAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DialApp: IDialApp} + DEFINE_IID!(IID_IDialDevice, 4293979567, 30111, 16850, 162, 10, 127, 41, 206, 11, 55, 132); + RT_INTERFACE!{interface IDialDevice(IDialDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IDialDevice] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetDialApp(&mut self, appName: HSTRING, out: *mut *mut DialApp) -> HRESULT + }} + impl IDialDevice { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_dial_app(&mut self, appName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDialApp)(self, appName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDialDevice2, 3132617685, 23547, 20154, 139, 50, 181, 124, 92, 94, 229, 201); + RT_INTERFACE!{interface IDialDevice2(IDialDevice2Vtbl): IInspectable(IInspectableVtbl) [IID_IDialDevice2] { + fn get_FriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT + }} + impl IDialDevice2 { + #[inline] pub unsafe fn get_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDialDeviceStatics, 2859060373, 504, 18264, 132, 97, 43, 189, 28, 220, 60, 243); + RT_INTERFACE!{static interface IDialDeviceStatics(IDialDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDialDeviceStatics] { + fn GetDeviceSelector(&mut self, appName: HSTRING, out: *mut HSTRING) -> HRESULT, + fn FromIdAsync(&mut self, value: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn DeviceInfoSupportsDialAsync(&mut self, device: *mut super::super::devices::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IDialDeviceStatics { + #[inline] pub unsafe fn get_device_selector(&mut self, appName: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, appName.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id_async(&mut self, value: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, value.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn device_info_supports_dial_async(&mut self, device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeviceInfoSupportsDialAsync)(self, device as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DialDevice: IDialDevice} + RT_ACTIVATABLE!{IDialDeviceStatics [CLSID_DialDevice]} + DEFINE_CLSID!(CLSID_DialDevice = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,68,105,97,108,80,114,111,116,111,99,111,108,46,68,105,97,108,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_IDialDeviceSelectedEventArgs, 1208717997, 44150, 18411, 156, 6, 161, 147, 4, 218, 2, 71); + RT_INTERFACE!{interface IDialDeviceSelectedEventArgs(IDialDeviceSelectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDialDeviceSelectedEventArgs] { + fn get_SelectedDialDevice(&mut self, out: *mut *mut DialDevice) -> HRESULT + }} + impl IDialDeviceSelectedEventArgs { + #[inline] pub unsafe fn get_selected_dial_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectedDialDevice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DialDeviceSelectedEventArgs: IDialDeviceSelectedEventArgs} + DEFINE_IID!(IID_IDialDisconnectButtonClickedEventArgs, 1383485778, 40065, 20053, 173, 194, 14, 190, 153, 205, 227, 182); + RT_INTERFACE!{interface IDialDisconnectButtonClickedEventArgs(IDialDisconnectButtonClickedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDialDisconnectButtonClickedEventArgs] { + fn get_Device(&mut self, out: *mut *mut DialDevice) -> HRESULT + }} + impl IDialDisconnectButtonClickedEventArgs { + #[inline] pub unsafe fn get_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Device)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DialDisconnectButtonClickedEventArgs: IDialDisconnectButtonClickedEventArgs} + DEFINE_IID!(IID_IDialDevicePickerFilter, 3246166970, 34496, 18525, 184, 214, 15, 154, 143, 100, 21, 144); + RT_INTERFACE!{interface IDialDevicePickerFilter(IDialDevicePickerFilterVtbl): IInspectable(IInspectableVtbl) [IID_IDialDevicePickerFilter] { + fn get_SupportedAppNames(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IDialDevicePickerFilter { + #[inline] pub unsafe fn get_supported_app_names(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedAppNames)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DialDevicePickerFilter: IDialDevicePickerFilter} + DEFINE_IID!(IID_IDialDevicePicker, 3128840714, 65369, 20299, 189, 172, 216, 159, 73, 90, 214, 225); + RT_INTERFACE!{interface IDialDevicePicker(IDialDevicePickerVtbl): IInspectable(IInspectableVtbl) [IID_IDialDevicePicker] { + fn get_Filter(&mut self, out: *mut *mut DialDevicePickerFilter) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_Appearance(&mut self, out: *mut *mut super::super::devices::enumeration::DevicePickerAppearance) -> HRESULT, + fn add_DialDeviceSelected(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DialDeviceSelected(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DisconnectButtonClicked(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DisconnectButtonClicked(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DialDevicePickerDismissed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DialDevicePickerDismissed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn Show(&mut self, selection: super::super::foundation::Rect) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.ui")] fn ShowWithPlacement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> HRESULT, + fn PickSingleDialDeviceAsync(&mut self, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy11(&mut self) -> (), + #[cfg(feature="windows.ui")] fn PickSingleDialDeviceAsyncWithPlacement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn Hide(&mut self) -> HRESULT, + fn SetDisplayStatus(&mut self, device: *mut DialDevice, status: DialDeviceDisplayStatus) -> HRESULT + }} + impl IDialDevicePicker { + #[inline] pub unsafe fn get_filter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Filter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_appearance(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Appearance)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_dial_device_selected(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DialDeviceSelected)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_dial_device_selected(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DialDeviceSelected)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_disconnect_button_clicked(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DisconnectButtonClicked)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_disconnect_button_clicked(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DisconnectButtonClicked)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_dial_device_picker_dismissed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DialDevicePickerDismissed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_dial_device_picker_dismissed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DialDevicePickerDismissed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show(&mut self, selection: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).Show)(self, selection); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn show_with_placement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { + let hr = ((*self.lpVtbl).ShowWithPlacement)(self, selection, preferredPlacement); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn pick_single_dial_device_async(&mut self, selection: super::super::foundation::Rect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickSingleDialDeviceAsync)(self, selection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn pick_single_dial_device_async_with_placement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickSingleDialDeviceAsyncWithPlacement)(self, selection, preferredPlacement, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn hide(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Hide)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_status(&mut self, device: &DialDevice, status: DialDeviceDisplayStatus) -> Result<()> { + let hr = ((*self.lpVtbl).SetDisplayStatus)(self, device as *const _ as *mut _, status); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DialDevicePicker: IDialDevicePicker} +} // Windows.Media.DialProtocol +pub mod effects { // Windows.Media.Effects +use ::prelude::*; + DEFINE_IID!(IID_IVideoCompositorDefinition, 2034677968, 8208, 19171, 154, 178, 44, 239, 66, 237, 212, 210); + RT_INTERFACE!{interface IVideoCompositorDefinition(IVideoCompositorDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IVideoCompositorDefinition] { + fn get_ActivatableClassId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + }} + impl IVideoCompositorDefinition { + #[inline] pub unsafe fn get_activatable_class_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActivatableClassId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VideoCompositorDefinition: IVideoCompositorDefinition [IVideoCompositorDefinitionFactory] [CLSID_VideoCompositorDefinition]} + DEFINE_CLSID!(CLSID_VideoCompositorDefinition = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,69,102,102,101,99,116,115,46,86,105,100,101,111,67,111,109,112,111,115,105,116,111,114,68,101,102,105,110,105,116,105,111,110,0]); + DEFINE_IID!(IID_IVideoCompositorDefinitionFactory, 1130822928, 26808, 19794, 137, 182, 2, 169, 104, 204, 168, 153); + RT_INTERFACE!{static interface IVideoCompositorDefinitionFactory(IVideoCompositorDefinitionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVideoCompositorDefinitionFactory] { + fn Create(&mut self, activatableClassId: HSTRING, out: *mut *mut VideoCompositorDefinition) -> HRESULT, + fn CreateWithProperties(&mut self, activatableClassId: HSTRING, props: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut VideoCompositorDefinition) -> HRESULT + }} + impl IVideoCompositorDefinitionFactory { + #[inline] pub unsafe fn create(&mut self, activatableClassId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, activatableClassId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_properties(&mut self, activatableClassId: &HStringArg, props: &super::super::foundation::collections::IPropertySet) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithProperties)(self, activatableClassId.get(), props as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositeVideoFrameContext, 1815085643, 62740, 17016, 165, 247, 185, 24, 128, 73, 209, 16); + RT_INTERFACE!{interface ICompositeVideoFrameContext(ICompositeVideoFrameContextVtbl): IInspectable(IInspectableVtbl) [IID_ICompositeVideoFrameContext] { + #[cfg(feature="windows.graphics")] fn get_SurfacesToOverlay(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_BackgroundFrame(&mut self, out: *mut *mut super::VideoFrame) -> HRESULT, + fn get_OutputFrame(&mut self, out: *mut *mut super::VideoFrame) -> HRESULT, + #[cfg(feature="windows.graphics")] fn GetOverlayForSurface(&mut self, surfaceToOverlay: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface, out: *mut *mut super::editing::MediaOverlay) -> HRESULT + }} + impl ICompositeVideoFrameContext { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_surfaces_to_overlay(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SurfacesToOverlay)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BackgroundFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_output_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutputFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_overlay_for_surface(&mut self, surfaceToOverlay: &super::super::graphics::directx::direct3d11::IDirect3DSurface) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetOverlayForSurface)(self, surfaceToOverlay as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CompositeVideoFrameContext: ICompositeVideoFrameContext} + RT_ENUM! { enum AudioEffectType: i32 { + Other (AudioEffectType_Other) = 0, AcousticEchoCancellation (AudioEffectType_AcousticEchoCancellation) = 1, NoiseSuppression (AudioEffectType_NoiseSuppression) = 2, AutomaticGainControl (AudioEffectType_AutomaticGainControl) = 3, BeamForming (AudioEffectType_BeamForming) = 4, ConstantToneRemoval (AudioEffectType_ConstantToneRemoval) = 5, Equalizer (AudioEffectType_Equalizer) = 6, LoudnessEqualizer (AudioEffectType_LoudnessEqualizer) = 7, BassBoost (AudioEffectType_BassBoost) = 8, VirtualSurround (AudioEffectType_VirtualSurround) = 9, VirtualHeadphones (AudioEffectType_VirtualHeadphones) = 10, SpeakerFill (AudioEffectType_SpeakerFill) = 11, RoomCorrection (AudioEffectType_RoomCorrection) = 12, BassManagement (AudioEffectType_BassManagement) = 13, EnvironmentalEffects (AudioEffectType_EnvironmentalEffects) = 14, SpeakerProtection (AudioEffectType_SpeakerProtection) = 15, SpeakerCompensation (AudioEffectType_SpeakerCompensation) = 16, DynamicRangeCompression (AudioEffectType_DynamicRangeCompression) = 17, + }} + DEFINE_IID!(IID_IAudioEffect, 883620433, 37383, 16469, 190, 147, 110, 87, 52, 168, 106, 228); + RT_INTERFACE!{interface IAudioEffect(IAudioEffectVtbl): IInspectable(IInspectableVtbl) [IID_IAudioEffect] { + fn get_AudioEffectType(&mut self, out: *mut AudioEffectType) -> HRESULT + }} + impl IAudioEffect { + #[inline] pub unsafe fn get_audio_effect_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioEffectType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class AudioEffect: IAudioEffect} + DEFINE_IID!(IID_IAudioEffectsManagerStatics, 1715497988, 34554, 18380, 163, 21, 244, 137, 216, 195, 254, 16); + RT_INTERFACE!{static interface IAudioEffectsManagerStatics(IAudioEffectsManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAudioEffectsManagerStatics] { + fn CreateAudioRenderEffectsManager(&mut self, deviceId: HSTRING, category: super::render::AudioRenderCategory, out: *mut *mut AudioRenderEffectsManager) -> HRESULT, + fn CreateAudioRenderEffectsManagerWithMode(&mut self, deviceId: HSTRING, category: super::render::AudioRenderCategory, mode: super::AudioProcessing, out: *mut *mut AudioRenderEffectsManager) -> HRESULT, + fn CreateAudioCaptureEffectsManager(&mut self, deviceId: HSTRING, category: super::capture::MediaCategory, out: *mut *mut AudioCaptureEffectsManager) -> HRESULT, + fn CreateAudioCaptureEffectsManagerWithMode(&mut self, deviceId: HSTRING, category: super::capture::MediaCategory, mode: super::AudioProcessing, out: *mut *mut AudioCaptureEffectsManager) -> HRESULT + }} + impl IAudioEffectsManagerStatics { + #[inline] pub unsafe fn create_audio_render_effects_manager(&mut self, deviceId: &HStringArg, category: super::render::AudioRenderCategory) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAudioRenderEffectsManager)(self, deviceId.get(), category, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_audio_render_effects_manager_with_mode(&mut self, deviceId: &HStringArg, category: super::render::AudioRenderCategory, mode: super::AudioProcessing) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAudioRenderEffectsManagerWithMode)(self, deviceId.get(), category, mode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_audio_capture_effects_manager(&mut self, deviceId: &HStringArg, category: super::capture::MediaCategory) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAudioCaptureEffectsManager)(self, deviceId.get(), category, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_audio_capture_effects_manager_with_mode(&mut self, deviceId: &HStringArg, category: super::capture::MediaCategory, mode: super::AudioProcessing) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAudioCaptureEffectsManagerWithMode)(self, deviceId.get(), category, mode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioRenderEffectsManager: IAudioRenderEffectsManager} + RT_CLASS!{class AudioCaptureEffectsManager: IAudioCaptureEffectsManager} + DEFINE_IID!(IID_IAudioRenderEffectsManager, 1305053542, 34641, 17074, 191, 203, 57, 202, 120, 100, 189, 71); + RT_INTERFACE!{interface IAudioRenderEffectsManager(IAudioRenderEffectsManagerVtbl): IInspectable(IInspectableVtbl) [IID_IAudioRenderEffectsManager] { + fn add_AudioRenderEffectsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioRenderEffectsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetAudioRenderEffects(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IAudioRenderEffectsManager { + #[inline] pub unsafe fn add_audio_render_effects_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AudioRenderEffectsChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_audio_render_effects_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AudioRenderEffectsChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_render_effects(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAudioRenderEffects)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioRenderEffectsManager2, 2823081225, 24268, 17587, 187, 78, 29, 176, 114, 135, 19, 156); + RT_INTERFACE!{interface IAudioRenderEffectsManager2(IAudioRenderEffectsManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IAudioRenderEffectsManager2] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_EffectsProviderThumbnail(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamWithContentType) -> HRESULT, + fn get_EffectsProviderSettingsLabel(&mut self, out: *mut HSTRING) -> HRESULT, + fn ShowSettingsUI(&mut self) -> HRESULT + }} + impl IAudioRenderEffectsManager2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_effects_provider_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EffectsProviderThumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_effects_provider_settings_label(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EffectsProviderSettingsLabel)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_settings_ui(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ShowSettingsUI)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioCaptureEffectsManager, 2407907953, 909, 17299, 130, 152, 84, 1, 16, 96, 142, 239); + RT_INTERFACE!{interface IAudioCaptureEffectsManager(IAudioCaptureEffectsManagerVtbl): IInspectable(IInspectableVtbl) [IID_IAudioCaptureEffectsManager] { + fn add_AudioCaptureEffectsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioCaptureEffectsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetAudioCaptureEffects(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IAudioCaptureEffectsManager { + #[inline] pub unsafe fn add_audio_capture_effects_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AudioCaptureEffectsChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_audio_capture_effects_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AudioCaptureEffectsChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_capture_effects(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAudioCaptureEffects)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IAudioEffectsManagerStatics [CLSID_AudioEffectsManager]} + DEFINE_CLSID!(CLSID_AudioEffectsManager = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,69,102,102,101,99,116,115,46,65,117,100,105,111,69,102,102,101,99,116,115,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IVideoCompositor, 2232464446, 16908, 16911, 150, 199, 124, 152, 187, 161, 252, 85); + RT_INTERFACE!{interface IVideoCompositor(IVideoCompositorVtbl): IInspectable(IInspectableVtbl) [IID_IVideoCompositor] { + fn get_TimeIndependent(&mut self, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn SetEncodingProperties(&mut self, backgroundProperties: *mut super::mediaproperties::VideoEncodingProperties, device: *mut super::super::graphics::directx::direct3d11::IDirect3DDevice) -> HRESULT, + fn CompositeFrame(&mut self, context: *mut CompositeVideoFrameContext) -> HRESULT, + fn Close(&mut self, reason: MediaEffectClosedReason) -> HRESULT, + fn DiscardQueuedFrames(&mut self) -> HRESULT + }} + impl IVideoCompositor { + #[inline] pub unsafe fn get_time_independent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeIndependent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_encoding_properties(&mut self, backgroundProperties: &super::mediaproperties::VideoEncodingProperties, device: &super::super::graphics::directx::direct3d11::IDirect3DDevice) -> Result<()> { + let hr = ((*self.lpVtbl).SetEncodingProperties)(self, backgroundProperties as *const _ as *mut _, device as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn composite_frame(&mut self, context: &CompositeVideoFrameContext) -> Result<()> { + let hr = ((*self.lpVtbl).CompositeFrame)(self, context as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn close(&mut self, reason: MediaEffectClosedReason) -> Result<()> { + let hr = ((*self.lpVtbl).Close)(self, reason); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn discard_queued_frames(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DiscardQueuedFrames)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioEffectDefinition, 3839359348, 32128, 20339, 144, 137, 227, 28, 157, 185, 194, 148); + RT_INTERFACE!{interface IAudioEffectDefinition(IAudioEffectDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IAudioEffectDefinition] { + fn get_ActivatableClassId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + }} + impl IAudioEffectDefinition { + #[inline] pub unsafe fn get_activatable_class_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActivatableClassId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoEffectDefinition, 972262640, 36111, 20286, 132, 252, 45, 70, 165, 41, 121, 67); + RT_INTERFACE!{interface IVideoEffectDefinition(IVideoEffectDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IVideoEffectDefinition] { + fn get_ActivatableClassId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + }} + impl IVideoEffectDefinition { + #[inline] pub unsafe fn get_activatable_class_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActivatableClassId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VideoEffectDefinition: IVideoEffectDefinition [IVideoEffectDefinitionFactory] [CLSID_VideoEffectDefinition]} + DEFINE_CLSID!(CLSID_VideoEffectDefinition = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,69,102,102,101,99,116,115,46,86,105,100,101,111,69,102,102,101,99,116,68,101,102,105,110,105,116,105,111,110,0]); + DEFINE_IID!(IID_IVideoEffectDefinitionFactory, 2168691534, 28211, 17039, 157, 33, 181, 170, 254, 247, 97, 124); + RT_INTERFACE!{static interface IVideoEffectDefinitionFactory(IVideoEffectDefinitionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVideoEffectDefinitionFactory] { + fn Create(&mut self, activatableClassId: HSTRING, out: *mut *mut VideoEffectDefinition) -> HRESULT, + fn CreateWithProperties(&mut self, activatableClassId: HSTRING, props: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut VideoEffectDefinition) -> HRESULT + }} + impl IVideoEffectDefinitionFactory { + #[inline] pub unsafe fn create(&mut self, activatableClassId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, activatableClassId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_properties(&mut self, activatableClassId: &HStringArg, props: &super::super::foundation::collections::IPropertySet) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithProperties)(self, activatableClassId.get(), props as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioEffectDefinition: IAudioEffectDefinition [IAudioEffectDefinitionFactory] [CLSID_AudioEffectDefinition]} + DEFINE_CLSID!(CLSID_AudioEffectDefinition = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,69,102,102,101,99,116,115,46,65,117,100,105,111,69,102,102,101,99,116,68,101,102,105,110,105,116,105,111,110,0]); + DEFINE_IID!(IID_IAudioEffectDefinitionFactory, 2384307782, 59141, 17901, 138, 43, 252, 78, 79, 64, 90, 151); + RT_INTERFACE!{static interface IAudioEffectDefinitionFactory(IAudioEffectDefinitionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAudioEffectDefinitionFactory] { + fn Create(&mut self, activatableClassId: HSTRING, out: *mut *mut AudioEffectDefinition) -> HRESULT, + fn CreateWithProperties(&mut self, activatableClassId: HSTRING, props: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut AudioEffectDefinition) -> HRESULT + }} + impl IAudioEffectDefinitionFactory { + #[inline] pub unsafe fn create(&mut self, activatableClassId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, activatableClassId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_properties(&mut self, activatableClassId: &HStringArg, props: &super::super::foundation::collections::IPropertySet) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithProperties)(self, activatableClassId.get(), props as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum MediaMemoryTypes: i32 { + Gpu (MediaMemoryTypes_Gpu) = 0, Cpu (MediaMemoryTypes_Cpu) = 1, GpuAndCpu (MediaMemoryTypes_GpuAndCpu) = 2, + }} + RT_ENUM! { enum MediaEffectClosedReason: i32 { + Done (MediaEffectClosedReason_Done) = 0, UnknownError (MediaEffectClosedReason_UnknownError) = 1, UnsupportedEncodingFormat (MediaEffectClosedReason_UnsupportedEncodingFormat) = 2, EffectCurrentlyUnloaded (MediaEffectClosedReason_EffectCurrentlyUnloaded) = 3, + }} + DEFINE_IID!(IID_IProcessVideoFrameContext, 661589547, 25697, 16414, 186, 120, 15, 218, 214, 17, 78, 236); + RT_INTERFACE!{interface IProcessVideoFrameContext(IProcessVideoFrameContextVtbl): IInspectable(IInspectableVtbl) [IID_IProcessVideoFrameContext] { + fn get_InputFrame(&mut self, out: *mut *mut super::VideoFrame) -> HRESULT, + fn get_OutputFrame(&mut self, out: *mut *mut super::VideoFrame) -> HRESULT + }} + impl IProcessVideoFrameContext { + #[inline] pub unsafe fn get_input_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_output_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutputFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBasicVideoEffect, 2187511791, 45920, 16574, 148, 155, 47, 244, 47, 243, 86, 147); + RT_INTERFACE!{interface IBasicVideoEffect(IBasicVideoEffectVtbl): IInspectable(IInspectableVtbl) [IID_IBasicVideoEffect] { + fn get_IsReadOnly(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportedMemoryTypes(&mut self, out: *mut MediaMemoryTypes) -> HRESULT, + fn get_TimeIndependent(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportedEncodingProperties(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn SetEncodingProperties(&mut self, encodingProperties: *mut super::mediaproperties::VideoEncodingProperties, device: *mut super::super::graphics::directx::direct3d11::IDirect3DDevice) -> HRESULT, + fn ProcessFrame(&mut self, context: *mut ProcessVideoFrameContext) -> HRESULT, + fn Close(&mut self, reason: MediaEffectClosedReason) -> HRESULT, + fn DiscardQueuedFrames(&mut self) -> HRESULT + }} + impl IBasicVideoEffect { + #[inline] pub unsafe fn get_is_read_only(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsReadOnly)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_memory_types(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportedMemoryTypes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_independent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeIndependent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_encoding_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedEncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_encoding_properties(&mut self, encodingProperties: &super::mediaproperties::VideoEncodingProperties, device: &super::super::graphics::directx::direct3d11::IDirect3DDevice) -> Result<()> { + let hr = ((*self.lpVtbl).SetEncodingProperties)(self, encodingProperties as *const _ as *mut _, device as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn process_frame(&mut self, context: &ProcessVideoFrameContext) -> Result<()> { + let hr = ((*self.lpVtbl).ProcessFrame)(self, context as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn close(&mut self, reason: MediaEffectClosedReason) -> Result<()> { + let hr = ((*self.lpVtbl).Close)(self, reason); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn discard_queued_frames(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DiscardQueuedFrames)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ProcessVideoFrameContext: IProcessVideoFrameContext} + DEFINE_IID!(IID_IProcessAudioFrameContext, 1289300294, 4642, 18983, 165, 134, 251, 62, 32, 39, 50, 85); + RT_INTERFACE!{interface IProcessAudioFrameContext(IProcessAudioFrameContextVtbl): IInspectable(IInspectableVtbl) [IID_IProcessAudioFrameContext] { + fn get_InputFrame(&mut self, out: *mut *mut super::AudioFrame) -> HRESULT, + fn get_OutputFrame(&mut self, out: *mut *mut super::AudioFrame) -> HRESULT + }} + impl IProcessAudioFrameContext { + #[inline] pub unsafe fn get_input_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_output_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutputFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBasicAudioEffect, 2349214803, 27584, 18616, 169, 154, 75, 65, 85, 15, 19, 89); + RT_INTERFACE!{interface IBasicAudioEffect(IBasicAudioEffectVtbl): IInspectable(IInspectableVtbl) [IID_IBasicAudioEffect] { + fn get_UseInputFrameForOutput(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportedEncodingProperties(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn SetEncodingProperties(&mut self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, + fn ProcessFrame(&mut self, context: *mut ProcessAudioFrameContext) -> HRESULT, + fn Close(&mut self, reason: MediaEffectClosedReason) -> HRESULT, + fn DiscardQueuedFrames(&mut self) -> HRESULT + }} + impl IBasicAudioEffect { + #[inline] pub unsafe fn get_use_input_frame_for_output(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UseInputFrameForOutput)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_encoding_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedEncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_encoding_properties(&mut self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result<()> { + let hr = ((*self.lpVtbl).SetEncodingProperties)(self, encodingProperties as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn process_frame(&mut self, context: &ProcessAudioFrameContext) -> Result<()> { + let hr = ((*self.lpVtbl).ProcessFrame)(self, context as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn close(&mut self, reason: MediaEffectClosedReason) -> Result<()> { + let hr = ((*self.lpVtbl).Close)(self, reason); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn discard_queued_frames(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DiscardQueuedFrames)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ProcessAudioFrameContext: IProcessAudioFrameContext} + DEFINE_IID!(IID_IVideoTransformEffectDefinition, 2523183978, 7846, 19110, 128, 116, 171, 232, 133, 30, 202, 226); + RT_INTERFACE!{interface IVideoTransformEffectDefinition(IVideoTransformEffectDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IVideoTransformEffectDefinition] { + #[cfg(not(feature="windows.ui"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_PaddingColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_PaddingColor(&mut self, value: super::super::ui::Color) -> HRESULT, + fn get_OutputSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn put_OutputSize(&mut self, value: super::super::foundation::Size) -> HRESULT, + fn get_CropRectangle(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn put_CropRectangle(&mut self, value: super::super::foundation::Rect) -> HRESULT, + fn get_Rotation(&mut self, out: *mut super::mediaproperties::MediaRotation) -> HRESULT, + fn put_Rotation(&mut self, value: super::mediaproperties::MediaRotation) -> HRESULT, + fn get_Mirror(&mut self, out: *mut super::mediaproperties::MediaMirroringOptions) -> HRESULT, + fn put_Mirror(&mut self, value: super::mediaproperties::MediaMirroringOptions) -> HRESULT, + fn put_ProcessingAlgorithm(&mut self, value: super::transcoding::MediaVideoProcessingAlgorithm) -> HRESULT, + fn get_ProcessingAlgorithm(&mut self, out: *mut super::transcoding::MediaVideoProcessingAlgorithm) -> HRESULT + }} + impl IVideoTransformEffectDefinition { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_padding_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PaddingColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_padding_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_PaddingColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_output_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutputSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_output_size(&mut self, value: super::super::foundation::Size) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutputSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_crop_rectangle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CropRectangle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_crop_rectangle(&mut self, value: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).put_CropRectangle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Rotation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rotation(&mut self, value: super::mediaproperties::MediaRotation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Rotation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_mirror(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mirror)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mirror(&mut self, value: super::mediaproperties::MediaMirroringOptions) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mirror)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_processing_algorithm(&mut self, value: super::transcoding::MediaVideoProcessingAlgorithm) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProcessingAlgorithm)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_processing_algorithm(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProcessingAlgorithm)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class VideoTransformEffectDefinition: IVideoEffectDefinition} +} // Windows.Media.Effects +pub mod editing { // Windows.Media.Editing +use ::prelude::*; + RT_CLASS!{class MediaOverlay: IMediaOverlay [IMediaOverlayFactory] [CLSID_MediaOverlay]} + DEFINE_CLSID!(CLSID_MediaOverlay = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,69,100,105,116,105,110,103,46,77,101,100,105,97,79,118,101,114,108,97,121,0]); + RT_ENUM! { enum VideoFramePrecision: i32 { + NearestFrame (VideoFramePrecision_NearestFrame) = 0, NearestKeyFrame (VideoFramePrecision_NearestKeyFrame) = 1, + }} + RT_ENUM! { enum MediaTrimmingPreference: i32 { + Fast (MediaTrimmingPreference_Fast) = 0, Precise (MediaTrimmingPreference_Precise) = 1, + }} + DEFINE_IID!(IID_IMediaClip, 1408389990, 24506, 16036, 134, 147, 36, 118, 24, 17, 20, 10); + RT_INTERFACE!{interface IMediaClip(IMediaClipVtbl): IInspectable(IInspectableVtbl) [IID_IMediaClip] { + fn get_TrimTimeFromStart(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_TrimTimeFromStart(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_TrimTimeFromEnd(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_TrimTimeFromEnd(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_OriginalDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_TrimmedDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_UserData(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn Clone(&mut self, out: *mut *mut MediaClip) -> HRESULT, + fn get_StartTimeInComposition(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_EndTimeInComposition(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_EmbeddedAudioTracks(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SelectedEmbeddedAudioTrackIndex(&mut self, out: *mut u32) -> HRESULT, + fn put_SelectedEmbeddedAudioTrackIndex(&mut self, value: u32) -> HRESULT, + fn put_Volume(&mut self, value: f64) -> HRESULT, + fn get_Volume(&mut self, out: *mut f64) -> HRESULT, + fn GetVideoEncodingProperties(&mut self, out: *mut *mut super::mediaproperties::VideoEncodingProperties) -> HRESULT, + fn get_AudioEffectDefinitions(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_VideoEffectDefinitions(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IMediaClip { + #[inline] pub unsafe fn get_trim_time_from_start(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrimTimeFromStart)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_trim_time_from_start(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_TrimTimeFromStart)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_trim_time_from_end(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrimTimeFromEnd)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_trim_time_from_end(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_TrimTimeFromEnd)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_original_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OriginalDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_trimmed_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrimmedDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_data(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clone(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Clone)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_start_time_in_composition(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartTimeInComposition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_end_time_in_composition(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndTimeInComposition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_embedded_audio_tracks(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmbeddedAudioTracks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_embedded_audio_track_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedEmbeddedAudioTrackIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_selected_embedded_audio_track_index(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectedEmbeddedAudioTrackIndex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_volume(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Volume)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_volume(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Volume)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_encoding_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVideoEncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_effect_definitions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudioEffectDefinitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_effect_definitions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoEffectDefinitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaClip: IMediaClip} + RT_ACTIVATABLE!{IMediaClipStatics [CLSID_MediaClip]} + RT_ACTIVATABLE!{IMediaClipStatics2 [CLSID_MediaClip]} + DEFINE_CLSID!(CLSID_MediaClip = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,69,100,105,116,105,110,103,46,77,101,100,105,97,67,108,105,112,0]); + RT_CLASS!{class EmbeddedAudioTrack: IEmbeddedAudioTrack} + DEFINE_IID!(IID_IMediaComposition, 772204037, 56433, 16854, 184, 55, 45, 43, 193, 74, 41, 71); + RT_INTERFACE!{interface IMediaComposition(IMediaCompositionVtbl): IInspectable(IInspectableVtbl) [IID_IMediaComposition] { + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Clips(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_BackgroundAudioTracks(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_UserData(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn Clone(&mut self, out: *mut *mut MediaComposition) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SaveAsync(&mut self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn GetThumbnailAsync(&mut self, timeFromStart: super::super::foundation::TimeSpan, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn GetThumbnailsAsync(&mut self, timesFromStart: *mut super::super::foundation::collections::IIterable, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RenderToFileAsync(&mut self, destination: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RenderToFileWithTrimmingPreferenceAsync(&mut self, destination: *mut super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RenderToFileWithProfileAsync(&mut self, destination: *mut super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn CreateDefaultEncodingProfile(&mut self, out: *mut *mut super::mediaproperties::MediaEncodingProfile) -> HRESULT, + fn GenerateMediaStreamSource(&mut self, out: *mut *mut super::core::MediaStreamSource) -> HRESULT, + fn GenerateMediaStreamSourceWithProfile(&mut self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut super::core::MediaStreamSource) -> HRESULT, + fn GeneratePreviewMediaStreamSource(&mut self, scaledWidth: i32, scaledHeight: i32, out: *mut *mut super::core::MediaStreamSource) -> HRESULT + }} + impl IMediaComposition { + #[inline] pub unsafe fn get_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_clips(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Clips)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_audio_tracks(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BackgroundAudioTracks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_data(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clone(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Clone)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn save_async(&mut self, file: &super::super::storage::IStorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_thumbnail_async(&mut self, timeFromStart: super::super::foundation::TimeSpan, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetThumbnailAsync)(self, timeFromStart, scaledWidth, scaledHeight, framePrecision, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_thumbnails_async(&mut self, timesFromStart: &super::super::foundation::collections::IIterable, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetThumbnailsAsync)(self, timesFromStart as *const _ as *mut _, scaledWidth, scaledHeight, framePrecision, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn render_to_file_async(&mut self, destination: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RenderToFileAsync)(self, destination as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn render_to_file_with_trimming_preference_async(&mut self, destination: &super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RenderToFileWithTrimmingPreferenceAsync)(self, destination as *const _ as *mut _, trimmingPreference, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn render_to_file_with_profile_async(&mut self, destination: &super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference, encodingProfile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RenderToFileWithProfileAsync)(self, destination as *const _ as *mut _, trimmingPreference, encodingProfile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_default_encoding_profile(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDefaultEncodingProfile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn generate_media_stream_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GenerateMediaStreamSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn generate_media_stream_source_with_profile(&mut self, encodingProfile: &super::mediaproperties::MediaEncodingProfile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GenerateMediaStreamSourceWithProfile)(self, encodingProfile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn generate_preview_media_stream_source(&mut self, scaledWidth: i32, scaledHeight: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GeneratePreviewMediaStreamSource)(self, scaledWidth, scaledHeight, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BackgroundAudioTrack: IBackgroundAudioTrack} + RT_ACTIVATABLE!{IBackgroundAudioTrackStatics [CLSID_BackgroundAudioTrack]} + DEFINE_CLSID!(CLSID_BackgroundAudioTrack = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,69,100,105,116,105,110,103,46,66,97,99,107,103,114,111,117,110,100,65,117,100,105,111,84,114,97,99,107,0]); + RT_CLASS!{class MediaComposition: IMediaComposition} + RT_ACTIVATABLE!{IMediaCompositionStatics [CLSID_MediaComposition]} + DEFINE_CLSID!(CLSID_MediaComposition = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,69,100,105,116,105,110,103,46,77,101,100,105,97,67,111,109,112,111,115,105,116,105,111,110,0]); + DEFINE_IID!(IID_IMediaClipStatics, 4198509416, 37519, 17348, 188, 110, 120, 58, 26, 53, 150, 86); + RT_INTERFACE!{static interface IMediaClipStatics(IMediaClipStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaClipStatics] { + #[cfg(not(feature="windows.ui"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.ui")] fn CreateFromColor(&mut self, color: super::super::ui::Color, originalDuration: super::super::foundation::TimeSpan, out: *mut *mut MediaClip) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateFromFileAsync(&mut self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateFromImageFileAsync(&mut self, file: *mut super::super::storage::IStorageFile, originalDuration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMediaClipStatics { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn create_from_color(&mut self, color: super::super::ui::Color, originalDuration: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromColor)(self, color, originalDuration, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_file_async(&mut self, file: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromFileAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_image_file_async(&mut self, file: &super::super::storage::IStorageFile, originalDuration: super::super::foundation::TimeSpan) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromImageFileAsync)(self, file as *const _ as *mut _, originalDuration, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaClipStatics2, 1528682419, 34126, 19867, 135, 125, 71, 116, 165, 86, 205, 18); + RT_INTERFACE!{static interface IMediaClipStatics2(IMediaClipStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaClipStatics2] { + #[cfg(feature="windows.graphics")] fn CreateFromSurface(&mut self, surface: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface, originalDuration: super::super::foundation::TimeSpan, out: *mut *mut MediaClip) -> HRESULT + }} + impl IMediaClipStatics2 { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn create_from_surface(&mut self, surface: &super::super::graphics::directx::direct3d11::IDirect3DSurface, originalDuration: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromSurface)(self, surface as *const _ as *mut _, originalDuration, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCompositionStatics, 2275446532, 58154, 17870, 143, 102, 163, 13, 240, 118, 98, 36); + RT_INTERFACE!{static interface IMediaCompositionStatics(IMediaCompositionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCompositionStatics] { + #[cfg(feature="windows.storage")] fn LoadAsync(&mut self, file: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMediaCompositionStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_async(&mut self, file: &super::super::storage::StorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEmbeddedAudioTrack, 1441684090, 11568, 16314, 161, 144, 79, 26, 100, 84, 248, 143); + RT_INTERFACE!{interface IEmbeddedAudioTrack(IEmbeddedAudioTrackVtbl): IInspectable(IInspectableVtbl) [IID_IEmbeddedAudioTrack] { + fn GetAudioEncodingProperties(&mut self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT + }} + impl IEmbeddedAudioTrack { + #[inline] pub unsafe fn get_audio_encoding_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAudioEncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundAudioTrack, 1267839933, 40481, 16998, 169, 194, 103, 221, 1, 26, 35, 87); + RT_INTERFACE!{interface IBackgroundAudioTrack(IBackgroundAudioTrackVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundAudioTrack] { + fn get_TrimTimeFromStart(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_TrimTimeFromStart(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_TrimTimeFromEnd(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_TrimTimeFromEnd(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_OriginalDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_TrimmedDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_UserData(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn put_Delay(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_Delay(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Volume(&mut self, value: f64) -> HRESULT, + fn get_Volume(&mut self, out: *mut f64) -> HRESULT, + fn Clone(&mut self, out: *mut *mut BackgroundAudioTrack) -> HRESULT, + fn GetAudioEncodingProperties(&mut self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, + fn get_AudioEffectDefinitions(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IBackgroundAudioTrack { + #[inline] pub unsafe fn get_trim_time_from_start(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrimTimeFromStart)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_trim_time_from_start(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_TrimTimeFromStart)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_trim_time_from_end(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrimTimeFromEnd)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_trim_time_from_end(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_TrimTimeFromEnd)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_original_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OriginalDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_trimmed_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrimmedDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_data(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_delay(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Delay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_delay(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Delay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_volume(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Volume)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_volume(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Volume)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn clone(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Clone)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_encoding_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAudioEncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_effect_definitions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudioEffectDefinitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundAudioTrackStatics, 3652305111, 53272, 17064, 165, 89, 203, 77, 158, 151, 230, 100); + RT_INTERFACE!{static interface IBackgroundAudioTrackStatics(IBackgroundAudioTrackStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundAudioTrackStatics] { + fn CreateFromEmbeddedAudioTrack(&mut self, embeddedAudioTrack: *mut EmbeddedAudioTrack, out: *mut *mut BackgroundAudioTrack) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateFromFileAsync(&mut self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBackgroundAudioTrackStatics { + #[inline] pub unsafe fn create_from_embedded_audio_track(&mut self, embeddedAudioTrack: &EmbeddedAudioTrack) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromEmbeddedAudioTrack)(self, embeddedAudioTrack as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_file_async(&mut self, file: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromFileAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaComposition2, 2778616690, 9062, 18732, 190, 200, 230, 223, 186, 109, 2, 129); + RT_INTERFACE!{interface IMediaComposition2(IMediaComposition2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaComposition2] { + fn get_OverlayLayers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IMediaComposition2 { + #[inline] pub unsafe fn get_overlay_layers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OverlayLayers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaOverlayLayer: IMediaOverlayLayer [IMediaOverlayLayerFactory] [CLSID_MediaOverlayLayer]} + DEFINE_CLSID!(CLSID_MediaOverlayLayer = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,69,100,105,116,105,110,103,46,77,101,100,105,97,79,118,101,114,108,97,121,76,97,121,101,114,0]); + DEFINE_IID!(IID_IMediaOverlay, 2835525213, 30825, 18480, 138, 177, 148, 220, 1, 192, 95, 164); + RT_INTERFACE!{interface IMediaOverlay(IMediaOverlayVtbl): IInspectable(IInspectableVtbl) [IID_IMediaOverlay] { + fn get_Position(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn put_Position(&mut self, value: super::super::foundation::Rect) -> HRESULT, + fn put_Delay(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_Delay(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Opacity(&mut self, out: *mut f64) -> HRESULT, + fn put_Opacity(&mut self, value: f64) -> HRESULT, + fn Clone(&mut self, out: *mut *mut MediaOverlay) -> HRESULT, + fn get_Clip(&mut self, out: *mut *mut MediaClip) -> HRESULT, + fn get_AudioEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_AudioEnabled(&mut self, value: bool) -> HRESULT + }} + impl IMediaOverlay { + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position(&mut self, value: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).put_Position)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_delay(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Delay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_delay(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Delay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_opacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Opacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_opacity(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Opacity)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clone(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Clone)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_clip(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Clip)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_audio_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaOverlayFactory, 3045360266, 24968, 20367, 162, 224, 170, 85, 45, 89, 142, 24); + RT_INTERFACE!{static interface IMediaOverlayFactory(IMediaOverlayFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMediaOverlayFactory] { + fn Create(&mut self, clip: *mut MediaClip, out: *mut *mut MediaOverlay) -> HRESULT, + fn CreateWithPositionAndOpacity(&mut self, clip: *mut MediaClip, position: super::super::foundation::Rect, opacity: f64, out: *mut *mut MediaOverlay) -> HRESULT + }} + impl IMediaOverlayFactory { + #[inline] pub unsafe fn create(&mut self, clip: &MediaClip) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, clip as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_position_and_opacity(&mut self, clip: &MediaClip, position: super::super::foundation::Rect, opacity: f64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithPositionAndOpacity)(self, clip as *const _ as *mut _, position, opacity, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaOverlayLayerFactory, 2491200627, 41886, 17250, 171, 191, 159, 139, 80, 112, 160, 98); + RT_INTERFACE!{static interface IMediaOverlayLayerFactory(IMediaOverlayLayerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMediaOverlayLayerFactory] { + fn CreateWithCompositorDefinition(&mut self, compositorDefinition: *mut super::effects::IVideoCompositorDefinition, out: *mut *mut MediaOverlayLayer) -> HRESULT + }} + impl IMediaOverlayLayerFactory { + #[inline] pub unsafe fn create_with_compositor_definition(&mut self, compositorDefinition: &super::effects::IVideoCompositorDefinition) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithCompositorDefinition)(self, compositorDefinition as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaOverlayLayer, 2799286871, 61146, 18118, 187, 229, 227, 152, 200, 65, 104, 172); + RT_INTERFACE!{interface IMediaOverlayLayer(IMediaOverlayLayerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaOverlayLayer] { + fn Clone(&mut self, out: *mut *mut MediaOverlayLayer) -> HRESULT, + fn get_Overlays(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_CustomCompositorDefinition(&mut self, out: *mut *mut super::effects::IVideoCompositorDefinition) -> HRESULT + }} + impl IMediaOverlayLayer { + #[inline] pub unsafe fn clone(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Clone)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_overlays(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Overlays)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_compositor_definition(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomCompositorDefinition)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Media.Editing +pub mod render { // Windows.Media.Render +use ::prelude::*; + RT_ENUM! { enum AudioRenderCategory: i32 { + Other (AudioRenderCategory_Other) = 0, ForegroundOnlyMedia (AudioRenderCategory_ForegroundOnlyMedia) = 1, BackgroundCapableMedia (AudioRenderCategory_BackgroundCapableMedia) = 2, Communications (AudioRenderCategory_Communications) = 3, Alerts (AudioRenderCategory_Alerts) = 4, SoundEffects (AudioRenderCategory_SoundEffects) = 5, GameEffects (AudioRenderCategory_GameEffects) = 6, GameMedia (AudioRenderCategory_GameMedia) = 7, GameChat (AudioRenderCategory_GameChat) = 8, Speech (AudioRenderCategory_Speech) = 9, Movie (AudioRenderCategory_Movie) = 10, Media (AudioRenderCategory_Media) = 11, + }} +} // Windows.Media.Render +pub mod faceanalysis { // Windows.Media.FaceAnalysis +use ::prelude::*; + DEFINE_IID!(IID_IDetectedFace, 2181092436, 26300, 13535, 148, 16, 232, 148, 0, 25, 84, 20); + RT_INTERFACE!{interface IDetectedFace(IDetectedFaceVtbl): IInspectable(IInspectableVtbl) [IID_IDetectedFace] { + #[cfg(feature="windows.graphics")] fn get_FaceBox(&mut self, out: *mut super::super::graphics::imaging::BitmapBounds) -> HRESULT + }} + impl IDetectedFace { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_face_box(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FaceBox)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFaceDetector, 381055708, 65135, 12567, 141, 149, 195, 240, 77, 81, 99, 12); + RT_INTERFACE!{interface IFaceDetector(IFaceDetectorVtbl): IInspectable(IInspectableVtbl) [IID_IFaceDetector] { + #[cfg(feature="windows.graphics")] fn DetectFacesAsync(&mut self, image: *mut super::super::graphics::imaging::SoftwareBitmap, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows.graphics")] fn DetectFacesWithSearchAreaAsync(&mut self, image: *mut super::super::graphics::imaging::SoftwareBitmap, searchArea: super::super::graphics::imaging::BitmapBounds, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_MinDetectableFaceSize(&mut self, out: *mut super::super::graphics::imaging::BitmapSize) -> HRESULT, + #[cfg(feature="windows.graphics")] fn put_MinDetectableFaceSize(&mut self, value: super::super::graphics::imaging::BitmapSize) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_MaxDetectableFaceSize(&mut self, out: *mut super::super::graphics::imaging::BitmapSize) -> HRESULT, + #[cfg(feature="windows.graphics")] fn put_MaxDetectableFaceSize(&mut self, value: super::super::graphics::imaging::BitmapSize) -> HRESULT + }} + impl IFaceDetector { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn detect_faces_async(&mut self, image: &super::super::graphics::imaging::SoftwareBitmap) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DetectFacesAsync)(self, image as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn detect_faces_with_search_area_async(&mut self, image: &super::super::graphics::imaging::SoftwareBitmap, searchArea: super::super::graphics::imaging::BitmapBounds) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DetectFacesWithSearchAreaAsync)(self, image as *const _ as *mut _, searchArea, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_min_detectable_face_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinDetectableFaceSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_min_detectable_face_size(&mut self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinDetectableFaceSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_max_detectable_face_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxDetectableFaceSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_max_detectable_face_size(&mut self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxDetectableFaceSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DetectedFace: IDetectedFace} + RT_CLASS!{class FaceTracker: IFaceTracker} + RT_ACTIVATABLE!{IFaceTrackerStatics [CLSID_FaceTracker]} + DEFINE_CLSID!(CLSID_FaceTracker = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,70,97,99,101,65,110,97,108,121,115,105,115,46,70,97,99,101,84,114,97,99,107,101,114,0]); + DEFINE_IID!(IID_IFaceDetectorStatics, 3154390375, 36935, 13302, 136, 27, 103, 70, 193, 178, 24, 184); + RT_INTERFACE!{static interface IFaceDetectorStatics(IFaceDetectorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFaceDetectorStatics] { + fn CreateAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn GetSupportedBitmapPixelFormats(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn IsBitmapPixelFormatSupported(&mut self, bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat, out: *mut bool) -> HRESULT, + fn get_IsSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IFaceDetectorStatics { + #[inline] pub unsafe fn create_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_supported_bitmap_pixel_formats(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSupportedBitmapPixelFormats)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn is_bitmap_pixel_format_supported(&mut self, bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsBitmapPixelFormatSupported)(self, bitmapPixelFormat, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class FaceDetector: IFaceDetector} + RT_ACTIVATABLE!{IFaceDetectorStatics [CLSID_FaceDetector]} + DEFINE_CLSID!(CLSID_FaceDetector = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,70,97,99,101,65,110,97,108,121,115,105,115,46,70,97,99,101,68,101,116,101,99,116,111,114,0]); + DEFINE_IID!(IID_IFaceTracker, 1806073228, 43073, 17440, 147, 230, 36, 32, 161, 136, 79, 207); + RT_INTERFACE!{interface IFaceTracker(IFaceTrackerVtbl): IInspectable(IInspectableVtbl) [IID_IFaceTracker] { + fn ProcessNextFrameAsync(&mut self, videoFrame: *mut super::VideoFrame, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_MinDetectableFaceSize(&mut self, out: *mut super::super::graphics::imaging::BitmapSize) -> HRESULT, + #[cfg(feature="windows.graphics")] fn put_MinDetectableFaceSize(&mut self, value: super::super::graphics::imaging::BitmapSize) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_MaxDetectableFaceSize(&mut self, out: *mut super::super::graphics::imaging::BitmapSize) -> HRESULT, + #[cfg(feature="windows.graphics")] fn put_MaxDetectableFaceSize(&mut self, value: super::super::graphics::imaging::BitmapSize) -> HRESULT + }} + impl IFaceTracker { + #[inline] pub unsafe fn process_next_frame_async(&mut self, videoFrame: &super::VideoFrame) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProcessNextFrameAsync)(self, videoFrame as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_min_detectable_face_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinDetectableFaceSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_min_detectable_face_size(&mut self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinDetectableFaceSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_max_detectable_face_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxDetectableFaceSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_max_detectable_face_size(&mut self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxDetectableFaceSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFaceTrackerStatics, 3915551128, 6145, 16293, 147, 46, 49, 215, 103, 175, 108, 77); + RT_INTERFACE!{static interface IFaceTrackerStatics(IFaceTrackerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFaceTrackerStatics] { + fn CreateAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn GetSupportedBitmapPixelFormats(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn IsBitmapPixelFormatSupported(&mut self, bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat, out: *mut bool) -> HRESULT, + fn get_IsSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IFaceTrackerStatics { + #[inline] pub unsafe fn create_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_supported_bitmap_pixel_formats(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSupportedBitmapPixelFormats)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn is_bitmap_pixel_format_supported(&mut self, bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsBitmapPixelFormatSupported)(self, bitmapPixelFormat, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Media.FaceAnalysis +pub mod import { // Windows.Media.Import +use ::prelude::*; + RT_ENUM! { enum PhotoImportStage: i32 { + NotStarted (PhotoImportStage_NotStarted) = 0, FindingItems (PhotoImportStage_FindingItems) = 1, ImportingItems (PhotoImportStage_ImportingItems) = 2, DeletingImportedItemsFromSource (PhotoImportStage_DeletingImportedItemsFromSource) = 3, + }} + RT_ENUM! { enum PhotoImportAccessMode: i32 { + ReadWrite (PhotoImportAccessMode_ReadWrite) = 0, ReadOnly (PhotoImportAccessMode_ReadOnly) = 1, ReadAndDelete (PhotoImportAccessMode_ReadAndDelete) = 2, + }} + RT_ENUM! { enum PhotoImportImportMode: i32 { + ImportEverything (PhotoImportImportMode_ImportEverything) = 0, IgnoreSidecars (PhotoImportImportMode_IgnoreSidecars) = 1, IgnoreSiblings (PhotoImportImportMode_IgnoreSiblings) = 2, IgnoreSidecarsAndSiblings (PhotoImportImportMode_IgnoreSidecarsAndSiblings) = 3, + }} + RT_ENUM! { enum PhotoImportSourceType: i32 { + Generic (PhotoImportSourceType_Generic) = 0, Camera (PhotoImportSourceType_Camera) = 1, MediaPlayer (PhotoImportSourceType_MediaPlayer) = 2, Phone (PhotoImportSourceType_Phone) = 3, Video (PhotoImportSourceType_Video) = 4, PersonalInfoManager (PhotoImportSourceType_PersonalInfoManager) = 5, AudioRecorder (PhotoImportSourceType_AudioRecorder) = 6, + }} + RT_ENUM! { enum PhotoImportContentType: i32 { + Unknown (PhotoImportContentType_Unknown) = 0, Image (PhotoImportContentType_Image) = 1, Video (PhotoImportContentType_Video) = 2, + }} + RT_ENUM! { enum PhotoImportPowerSource: i32 { + Unknown (PhotoImportPowerSource_Unknown) = 0, Battery (PhotoImportPowerSource_Battery) = 1, External (PhotoImportPowerSource_External) = 2, + }} + RT_ENUM! { enum PhotoImportStorageMediumType: i32 { + Undefined (PhotoImportStorageMediumType_Undefined) = 0, Fixed (PhotoImportStorageMediumType_Fixed) = 1, Removable (PhotoImportStorageMediumType_Removable) = 2, + }} + RT_ENUM! { enum PhotoImportContentTypeFilter: i32 { + OnlyImages (PhotoImportContentTypeFilter_OnlyImages) = 0, OnlyVideos (PhotoImportContentTypeFilter_OnlyVideos) = 1, ImagesAndVideos (PhotoImportContentTypeFilter_ImagesAndVideos) = 2, + }} + RT_ENUM! { enum PhotoImportItemSelectionMode: i32 { + SelectAll (PhotoImportItemSelectionMode_SelectAll) = 0, SelectNone (PhotoImportItemSelectionMode_SelectNone) = 1, SelectNew (PhotoImportItemSelectionMode_SelectNew) = 2, + }} + RT_ENUM! { enum PhotoImportSubfolderDateFormat: i32 { + Year (PhotoImportSubfolderDateFormat_Year) = 0, YearMonth (PhotoImportSubfolderDateFormat_YearMonth) = 1, YearMonthDay (PhotoImportSubfolderDateFormat_YearMonthDay) = 2, + }} + RT_ENUM! { enum PhotoImportConnectionTransport: i32 { + Unknown (PhotoImportConnectionTransport_Unknown) = 0, Usb (PhotoImportConnectionTransport_Usb) = 1, IP (PhotoImportConnectionTransport_IP) = 2, Bluetooth (PhotoImportConnectionTransport_Bluetooth) = 3, + }} + RT_ENUM! { enum PhotoImportSubfolderCreationMode: i32 { + DoNotCreateSubfolders (PhotoImportSubfolderCreationMode_DoNotCreateSubfolders) = 0, CreateSubfoldersFromFileDate (PhotoImportSubfolderCreationMode_CreateSubfoldersFromFileDate) = 1, CreateSubfoldersFromExifDate (PhotoImportSubfolderCreationMode_CreateSubfoldersFromExifDate) = 2, KeepOriginalFolderStructure (PhotoImportSubfolderCreationMode_KeepOriginalFolderStructure) = 3, + }} + DEFINE_IID!(IID_IPhotoImportManagerStatics, 661753917, 41030, 20230, 155, 156, 191, 214, 98, 232, 50, 135); + RT_INTERFACE!{static interface IPhotoImportManagerStatics(IPhotoImportManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportManagerStatics] { + fn IsSupportedAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindAllSourcesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetPendingOperations(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IPhotoImportManagerStatics { + #[inline] pub unsafe fn is_supported_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).IsSupportedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_sources_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllSourcesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pending_operations(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPendingOperations)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PhotoImportSource: IPhotoImportSource} + RT_ACTIVATABLE!{IPhotoImportSourceStatics [CLSID_PhotoImportSource]} + DEFINE_CLSID!(CLSID_PhotoImportSource = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,73,109,112,111,114,116,46,80,104,111,116,111,73,109,112,111,114,116,83,111,117,114,99,101,0]); + RT_CLASS!{class PhotoImportOperation: IPhotoImportOperation} + RT_ACTIVATABLE!{IPhotoImportManagerStatics [CLSID_PhotoImportManager]} + DEFINE_CLSID!(CLSID_PhotoImportManager = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,73,109,112,111,114,116,46,80,104,111,116,111,73,109,112,111,114,116,77,97,110,97,103,101,114,0]); + RT_STRUCT! { struct PhotoImportProgress { + ItemsImported: u32, TotalItemsToImport: u32, BytesImported: u64, TotalBytesToImport: u64, ImportProgress: f64, + }} + DEFINE_IID!(IID_IPhotoImportOperation, 3656882148, 41114, 20196, 164, 177, 32, 148, 2, 119, 165, 190); + RT_INTERFACE!{interface IPhotoImportOperation(IPhotoImportOperationVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportOperation] { + fn get_Stage(&mut self, out: *mut PhotoImportStage) -> HRESULT, + fn get_Session(&mut self, out: *mut *mut PhotoImportSession) -> HRESULT, + fn get_ContinueFindingItemsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn get_ContinueImportingItemsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn get_ContinueDeletingImportedItemsFromSourceAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IPhotoImportOperation { + #[inline] pub unsafe fn get_stage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Stage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Session)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_continue_finding_items_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContinueFindingItemsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_continue_importing_items_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContinueImportingItemsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_continue_deleting_imported_items_from_source_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContinueDeletingImportedItemsFromSourceAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PhotoImportSession: IPhotoImportSession} + RT_CLASS!{class PhotoImportFindItemsResult: IPhotoImportFindItemsResult} + RT_CLASS!{class PhotoImportImportItemsResult: IPhotoImportImportItemsResult} + RT_CLASS!{class PhotoImportDeleteImportedItemsFromSourceResult: IPhotoImportDeleteImportedItemsFromSourceResult} + DEFINE_IID!(IID_IPhotoImportStorageMedium, 4072255635, 64645, 18559, 135, 194, 88, 214, 117, 208, 91, 7); + RT_INTERFACE!{interface IPhotoImportStorageMedium(IPhotoImportStorageMediumVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportStorageMedium] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SerialNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_StorageMediumType(&mut self, out: *mut PhotoImportStorageMediumType) -> HRESULT, + fn get_SupportedAccessMode(&mut self, out: *mut PhotoImportAccessMode) -> HRESULT, + fn get_CapacityInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_AvailableSpaceInBytes(&mut self, out: *mut u64) -> HRESULT, + fn Refresh(&mut self) -> HRESULT + }} + impl IPhotoImportStorageMedium { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_serial_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SerialNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_storage_medium_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StorageMediumType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_access_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportedAccessMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_capacity_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CapacityInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_available_space_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AvailableSpaceInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn refresh(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Refresh)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PhotoImportStorageMedium: IPhotoImportStorageMedium} + DEFINE_IID!(IID_IPhotoImportSourceStatics, 86566278, 13016, 18044, 140, 238, 35, 161, 178, 244, 62, 133); + RT_INTERFACE!{static interface IPhotoImportSourceStatics(IPhotoImportSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportSourceStatics] { + fn FromIdAsync(&mut self, sourceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn FromFolderAsync(&mut self, sourceRootFolder: *mut super::super::storage::IStorageFolder, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPhotoImportSourceStatics { + #[inline] pub unsafe fn from_id_async(&mut self, sourceId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromIdAsync)(self, sourceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn from_folder_async(&mut self, sourceRootFolder: &super::super::storage::IStorageFolder) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromFolderAsync)(self, sourceRootFolder as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoImportSource, 529441630, 5211, 19670, 135, 241, 84, 150, 90, 152, 47, 239); + RT_INTERFACE!{interface IPhotoImportSource(IPhotoImportSourceVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportSource] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Manufacturer(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Model(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SerialNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ConnectionProtocol(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ConnectionTransport(&mut self, out: *mut PhotoImportConnectionTransport) -> HRESULT, + fn get_Type(&mut self, out: *mut PhotoImportSourceType) -> HRESULT, + fn get_PowerSource(&mut self, out: *mut PhotoImportPowerSource) -> HRESULT, + fn get_BatteryLevelPercent(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_DateTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_StorageMedia(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_IsLocked(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_IsMassStorage(&mut self, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy15(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn CreateImportSession(&mut self, out: *mut *mut PhotoImportSession) -> HRESULT + }} + impl IPhotoImportSource { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manufacturer(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Manufacturer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_model(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Model)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_serial_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SerialNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_connection_protocol(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConnectionProtocol)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_connection_transport(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConnectionTransport)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_power_source(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerSource)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_battery_level_percent(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BatteryLevelPercent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_date_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DateTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_storage_media(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StorageMedia)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_locked(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsLocked)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_mass_storage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsMassStorage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_import_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateImportSession)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoImportSession, 2858652014, 60635, 20222, 148, 198, 95, 92, 175, 227, 76, 251); + RT_INTERFACE!{interface IPhotoImportSession(IPhotoImportSessionVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportSession] { + fn get_Source(&mut self, out: *mut *mut PhotoImportSource) -> HRESULT, + fn get_SessionId(&mut self, out: *mut Guid) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_DestinationFolder(&mut self, value: *mut super::super::storage::IStorageFolder) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_DestinationFolder(&mut self, out: *mut *mut super::super::storage::IStorageFolder) -> HRESULT, + fn put_AppendSessionDateToDestinationFolder(&mut self, value: bool) -> HRESULT, + fn get_AppendSessionDateToDestinationFolder(&mut self, out: *mut bool) -> HRESULT, + fn put_SubfolderCreationMode(&mut self, value: PhotoImportSubfolderCreationMode) -> HRESULT, + fn get_SubfolderCreationMode(&mut self, out: *mut PhotoImportSubfolderCreationMode) -> HRESULT, + fn put_DestinationFileNamePrefix(&mut self, value: HSTRING) -> HRESULT, + fn get_DestinationFileNamePrefix(&mut self, out: *mut HSTRING) -> HRESULT, + fn FindItemsAsync(&mut self, contentTypeFilter: PhotoImportContentTypeFilter, itemSelectionMode: PhotoImportItemSelectionMode, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IPhotoImportSession { + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_session_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SessionId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_destination_folder(&mut self, value: &super::super::storage::IStorageFolder) -> Result<()> { + let hr = ((*self.lpVtbl).put_DestinationFolder)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_destination_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DestinationFolder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_append_session_date_to_destination_folder(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppendSessionDateToDestinationFolder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_append_session_date_to_destination_folder(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AppendSessionDateToDestinationFolder)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_subfolder_creation_mode(&mut self, value: PhotoImportSubfolderCreationMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_SubfolderCreationMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_subfolder_creation_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SubfolderCreationMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_destination_file_name_prefix(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DestinationFileNamePrefix)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_destination_file_name_prefix(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DestinationFileNamePrefix)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_items_async(&mut self, contentTypeFilter: PhotoImportContentTypeFilter, itemSelectionMode: PhotoImportItemSelectionMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindItemsAsync)(self, contentTypeFilter, itemSelectionMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoImportSession2, 710043408, 16070, 18077, 163, 117, 43, 159, 71, 133, 57, 30); + RT_INTERFACE!{interface IPhotoImportSession2(IPhotoImportSession2Vtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportSession2] { + fn put_SubfolderDateFormat(&mut self, value: PhotoImportSubfolderDateFormat) -> HRESULT, + fn get_SubfolderDateFormat(&mut self, out: *mut PhotoImportSubfolderDateFormat) -> HRESULT, + fn put_RememberDeselectedItems(&mut self, value: bool) -> HRESULT, + fn get_RememberDeselectedItems(&mut self, out: *mut bool) -> HRESULT + }} + impl IPhotoImportSession2 { + #[inline] pub unsafe fn set_subfolder_date_format(&mut self, value: PhotoImportSubfolderDateFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_SubfolderDateFormat)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_subfolder_date_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SubfolderDateFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_remember_deselected_items(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_RememberDeselectedItems)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_remember_deselected_items(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RememberDeselectedItems)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoImportItem, 2849013366, 39932, 17336, 179, 86, 99, 59, 106, 152, 140, 158); + RT_INTERFACE!{interface IPhotoImportItem(IPhotoImportItemVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportItem] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ItemKey(&mut self, out: *mut u64) -> HRESULT, + fn get_ContentType(&mut self, out: *mut PhotoImportContentType) -> HRESULT, + fn get_SizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_Date(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Sibling(&mut self, out: *mut *mut PhotoImportSidecar) -> HRESULT, + fn get_Sidecars(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_VideoSegments(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_IsSelected(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSelected(&mut self, value: bool) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_ImportedFileNames(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_DeletedFileNames(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IPhotoImportItem { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ItemKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ContentType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Date)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sibling(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sibling)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sidecars(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sidecars)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_segments(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoSegments)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_selected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSelected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_selected(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSelected)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_imported_file_names(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ImportedFileNames)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deleted_file_names(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeletedFileNames)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PhotoImportSidecar: IPhotoImportSidecar} + RT_CLASS!{class PhotoImportVideoSegment: IPhotoImportVideoSegment} + RT_CLASS!{class PhotoImportItem: IPhotoImportItem} + DEFINE_IID!(IID_IPhotoImportFindItemsResult, 957736519, 27768, 18731, 132, 78, 143, 229, 232, 246, 191, 185); + RT_INTERFACE!{interface IPhotoImportFindItemsResult(IPhotoImportFindItemsResultVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportFindItemsResult] { + fn get_Session(&mut self, out: *mut *mut PhotoImportSession) -> HRESULT, + fn get_HasSucceeded(&mut self, out: *mut bool) -> HRESULT, + fn get_FoundItems(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_PhotosCount(&mut self, out: *mut u32) -> HRESULT, + fn get_PhotosSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_VideosCount(&mut self, out: *mut u32) -> HRESULT, + fn get_VideosSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_SidecarsCount(&mut self, out: *mut u32) -> HRESULT, + fn get_SidecarsSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_SiblingsCount(&mut self, out: *mut u32) -> HRESULT, + fn get_SiblingsSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_TotalCount(&mut self, out: *mut u32) -> HRESULT, + fn get_TotalSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn SelectAll(&mut self) -> HRESULT, + fn SelectNone(&mut self) -> HRESULT, + fn SelectNewAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SetImportMode(&mut self, value: PhotoImportImportMode) -> HRESULT, + fn get_ImportMode(&mut self, out: *mut PhotoImportImportMode) -> HRESULT, + fn get_SelectedPhotosCount(&mut self, out: *mut u32) -> HRESULT, + fn get_SelectedPhotosSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_SelectedVideosCount(&mut self, out: *mut u32) -> HRESULT, + fn get_SelectedVideosSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_SelectedSidecarsCount(&mut self, out: *mut u32) -> HRESULT, + fn get_SelectedSidecarsSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_SelectedSiblingsCount(&mut self, out: *mut u32) -> HRESULT, + fn get_SelectedSiblingsSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_SelectedTotalCount(&mut self, out: *mut u32) -> HRESULT, + fn get_SelectedTotalSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn add_SelectionChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectionChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn ImportItemsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn add_ItemImported(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemImported(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPhotoImportFindItemsResult { + #[inline] pub unsafe fn get_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Session)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_succeeded(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasSucceeded)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_found_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FoundItems)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_photos_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhotosCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_photos_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhotosSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_videos_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VideosCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_videos_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VideosSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sidecars_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SidecarsCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sidecars_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SidecarsSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_siblings_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SiblingsCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_siblings_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SiblingsSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_total_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TotalCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_total_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TotalSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn select_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SelectAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn select_none(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SelectNone)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn select_new_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectNewAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_import_mode(&mut self, value: PhotoImportImportMode) -> Result<()> { + let hr = ((*self.lpVtbl).SetImportMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_import_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ImportMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_photos_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedPhotosCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_photos_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedPhotosSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_videos_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedVideosCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_videos_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedVideosSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_sidecars_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedSidecarsCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_sidecars_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedSidecarsSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_siblings_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedSiblingsCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_siblings_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedSiblingsSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_total_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedTotalCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_total_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedTotalSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_selection_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SelectionChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_selection_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SelectionChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn import_items_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportItemsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_item_imported(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ItemImported)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_item_imported(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ItemImported)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PhotoImportSelectionChangedEventArgs: IPhotoImportSelectionChangedEventArgs} + RT_CLASS!{class PhotoImportItemImportedEventArgs: IPhotoImportItemImportedEventArgs} + DEFINE_IID!(IID_IPhotoImportFindItemsResult2, 4225591867, 60665, 16490, 129, 94, 80, 21, 98, 91, 10, 136); + RT_INTERFACE!{interface IPhotoImportFindItemsResult2(IPhotoImportFindItemsResult2Vtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportFindItemsResult2] { + fn AddItemsInDateRangeToSelection(&mut self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan) -> HRESULT + }} + impl IPhotoImportFindItemsResult2 { + #[inline] pub unsafe fn add_items_in_date_range_to_selection(&mut self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).AddItemsInDateRangeToSelection)(self, rangeStart, rangeLength); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoImportImportItemsResult, 3839161464, 54297, 17475, 168, 78, 240, 106, 133, 12, 11, 0); + RT_INTERFACE!{interface IPhotoImportImportItemsResult(IPhotoImportImportItemsResultVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportImportItemsResult] { + fn get_Session(&mut self, out: *mut *mut PhotoImportSession) -> HRESULT, + fn get_HasSucceeded(&mut self, out: *mut bool) -> HRESULT, + fn get_ImportedItems(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_PhotosCount(&mut self, out: *mut u32) -> HRESULT, + fn get_PhotosSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_VideosCount(&mut self, out: *mut u32) -> HRESULT, + fn get_VideosSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_SidecarsCount(&mut self, out: *mut u32) -> HRESULT, + fn get_SidecarsSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_SiblingsCount(&mut self, out: *mut u32) -> HRESULT, + fn get_SiblingsSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_TotalCount(&mut self, out: *mut u32) -> HRESULT, + fn get_TotalSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn DeleteImportedItemsFromSourceAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IPhotoImportImportItemsResult { + #[inline] pub unsafe fn get_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Session)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_succeeded(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasSucceeded)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_imported_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ImportedItems)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_photos_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhotosCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_photos_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhotosSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_videos_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VideosCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_videos_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VideosSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sidecars_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SidecarsCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sidecars_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SidecarsSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_siblings_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SiblingsCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_siblings_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SiblingsSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_total_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TotalCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_total_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TotalSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn delete_imported_items_from_source_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteImportedItemsFromSourceAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoImportDeleteImportedItemsFromSourceResult, 4108391160, 33853, 17034, 161, 166, 129, 81, 2, 146, 176, 174); + RT_INTERFACE!{interface IPhotoImportDeleteImportedItemsFromSourceResult(IPhotoImportDeleteImportedItemsFromSourceResultVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportDeleteImportedItemsFromSourceResult] { + fn get_Session(&mut self, out: *mut *mut PhotoImportSession) -> HRESULT, + fn get_HasSucceeded(&mut self, out: *mut bool) -> HRESULT, + fn get_DeletedItems(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_PhotosCount(&mut self, out: *mut u32) -> HRESULT, + fn get_PhotosSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_VideosCount(&mut self, out: *mut u32) -> HRESULT, + fn get_VideosSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_SidecarsCount(&mut self, out: *mut u32) -> HRESULT, + fn get_SidecarsSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_SiblingsCount(&mut self, out: *mut u32) -> HRESULT, + fn get_SiblingsSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_TotalCount(&mut self, out: *mut u32) -> HRESULT, + fn get_TotalSizeInBytes(&mut self, out: *mut u64) -> HRESULT + }} + impl IPhotoImportDeleteImportedItemsFromSourceResult { + #[inline] pub unsafe fn get_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Session)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_succeeded(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasSucceeded)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deleted_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeletedItems)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_photos_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhotosCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_photos_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhotosSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_videos_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VideosCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_videos_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VideosSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sidecars_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SidecarsCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sidecars_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SidecarsSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_siblings_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SiblingsCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_siblings_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SiblingsSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_total_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TotalCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_total_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TotalSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoImportSidecar, 1188550487, 63490, 17607, 156, 152, 122, 113, 244, 188, 20, 134); + RT_INTERFACE!{interface IPhotoImportSidecar(IPhotoImportSidecarVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportSidecar] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_Date(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT + }} + impl IPhotoImportSidecar { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Date)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoImportVideoSegment, 1648099977, 12826, 16856, 145, 102, 140, 98, 163, 51, 39, 108); + RT_INTERFACE!{interface IPhotoImportVideoSegment(IPhotoImportVideoSegmentVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportVideoSegment] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_Date(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Sibling(&mut self, out: *mut *mut PhotoImportSidecar) -> HRESULT, + fn get_Sidecars(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IPhotoImportVideoSegment { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Date)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sibling(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sibling)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sidecars(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sidecars)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoImportItemImportedEventArgs, 1120612317, 32104, 18357, 188, 124, 206, 183, 62, 12, 119, 220); + RT_INTERFACE!{interface IPhotoImportItemImportedEventArgs(IPhotoImportItemImportedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportItemImportedEventArgs] { + fn get_ImportedItem(&mut self, out: *mut *mut PhotoImportItem) -> HRESULT + }} + impl IPhotoImportItemImportedEventArgs { + #[inline] pub unsafe fn get_imported_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ImportedItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPhotoImportSelectionChangedEventArgs, 273028994, 64157, 19504, 139, 201, 77, 100, 145, 21, 114, 213); + RT_INTERFACE!{interface IPhotoImportSelectionChangedEventArgs(IPhotoImportSelectionChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportSelectionChangedEventArgs] { + fn get_IsSelectionEmpty(&mut self, out: *mut bool) -> HRESULT + }} + impl IPhotoImportSelectionChangedEventArgs { + #[inline] pub unsafe fn get_is_selection_empty(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSelectionEmpty)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Media.Import +pub mod ocr { // Windows.Media.Ocr +use ::prelude::*; + DEFINE_IID!(IID_IOcrWord, 1009403770, 23769, 13605, 186, 42, 35, 209, 224, 166, 138, 29); + RT_INTERFACE!{interface IOcrWord(IOcrWordVtbl): IInspectable(IInspectableVtbl) [IID_IOcrWord] { + fn get_BoundingRect(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IOcrWord { + #[inline] pub unsafe fn get_bounding_rect(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BoundingRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IOcrLine, 4432239, 58143, 14884, 137, 156, 212, 68, 189, 8, 129, 36); + RT_INTERFACE!{interface IOcrLine(IOcrLineVtbl): IInspectable(IInspectableVtbl) [IID_IOcrLine] { + fn get_Words(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IOcrLine { + #[inline] pub unsafe fn get_words(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Words)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class OcrWord: IOcrWord} + DEFINE_IID!(IID_IOcrResult, 2614244786, 5979, 15722, 146, 226, 56, 140, 32, 110, 47, 99); + RT_INTERFACE!{interface IOcrResult(IOcrResultVtbl): IInspectable(IInspectableVtbl) [IID_IOcrResult] { + fn get_Lines(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_TextAngle(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IOcrResult { + #[inline] pub unsafe fn get_lines(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Lines)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_angle(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextAngle)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class OcrLine: IOcrLine} + DEFINE_IID!(IID_IOcrEngine, 1511308353, 23414, 12608, 182, 128, 136, 37, 86, 38, 131, 172); + RT_INTERFACE!{interface IOcrEngine(IOcrEngineVtbl): IInspectable(IInspectableVtbl) [IID_IOcrEngine] { + #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn RecognizeAsync(&mut self, bitmap: *mut super::super::graphics::imaging::SoftwareBitmap, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.globalization")] fn get_RecognizerLanguage(&mut self, out: *mut *mut super::super::globalization::Language) -> HRESULT + }} + impl IOcrEngine { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn recognize_async(&mut self, bitmap: &super::super::graphics::imaging::SoftwareBitmap) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RecognizeAsync)(self, bitmap as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_recognizer_language(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RecognizerLanguage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class OcrResult: IOcrResult} + DEFINE_IID!(IID_IOcrEngineStatics, 1543481434, 13188, 13632, 153, 64, 105, 145, 32, 212, 40, 168); + RT_INTERFACE!{static interface IOcrEngineStatics(IOcrEngineStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IOcrEngineStatics] { + fn get_MaxImageDimension(&mut self, out: *mut u32) -> HRESULT, + #[cfg(not(feature="windows.globalization"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.globalization")] fn get_AvailableRecognizerLanguages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(not(feature="windows.globalization"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.globalization")] fn IsLanguageSupported(&mut self, language: *mut super::super::globalization::Language, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.globalization"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.globalization")] fn TryCreateFromLanguage(&mut self, language: *mut super::super::globalization::Language, out: *mut *mut OcrEngine) -> HRESULT, + fn TryCreateFromUserProfileLanguages(&mut self, out: *mut *mut OcrEngine) -> HRESULT + }} + impl IOcrEngineStatics { + #[inline] pub unsafe fn get_max_image_dimension(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxImageDimension)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_available_recognizer_languages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AvailableRecognizerLanguages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn is_language_supported(&mut self, language: &super::super::globalization::Language) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsLanguageSupported)(self, language as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn try_create_from_language(&mut self, language: &super::super::globalization::Language) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryCreateFromLanguage)(self, language as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_create_from_user_profile_languages(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryCreateFromUserProfileLanguages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class OcrEngine: IOcrEngine} + RT_ACTIVATABLE!{IOcrEngineStatics [CLSID_OcrEngine]} + DEFINE_CLSID!(CLSID_OcrEngine = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,79,99,114,46,79,99,114,69,110,103,105,110,101,0]); +} // Windows.Media.Ocr +pub mod playback { // Windows.Media.Playback +use ::prelude::*; + RT_ENUM! { enum MediaPlayerState: i32 { + Closed (MediaPlayerState_Closed) = 0, Opening (MediaPlayerState_Opening) = 1, Buffering (MediaPlayerState_Buffering) = 2, Playing (MediaPlayerState_Playing) = 3, Paused (MediaPlayerState_Paused) = 4, Stopped (MediaPlayerState_Stopped) = 5, + }} + RT_ENUM! { enum MediaPlaybackState: i32 { + None (MediaPlaybackState_None) = 0, Opening (MediaPlaybackState_Opening) = 1, Buffering (MediaPlaybackState_Buffering) = 2, Playing (MediaPlaybackState_Playing) = 3, Paused (MediaPlaybackState_Paused) = 4, + }} + RT_ENUM! { enum MediaPlayerError: i32 { + Unknown (MediaPlayerError_Unknown) = 0, Aborted (MediaPlayerError_Aborted) = 1, NetworkError (MediaPlayerError_NetworkError) = 2, DecodingError (MediaPlayerError_DecodingError) = 3, SourceNotSupported (MediaPlayerError_SourceNotSupported) = 4, + }} + RT_ENUM! { enum MediaPlayerAudioCategory: i32 { + Other (MediaPlayerAudioCategory_Other) = 0, Communications (MediaPlayerAudioCategory_Communications) = 3, Alerts (MediaPlayerAudioCategory_Alerts) = 4, SoundEffects (MediaPlayerAudioCategory_SoundEffects) = 5, GameEffects (MediaPlayerAudioCategory_GameEffects) = 6, GameMedia (MediaPlayerAudioCategory_GameMedia) = 7, GameChat (MediaPlayerAudioCategory_GameChat) = 8, Speech (MediaPlayerAudioCategory_Speech) = 9, Movie (MediaPlayerAudioCategory_Movie) = 10, Media (MediaPlayerAudioCategory_Media) = 11, + }} + RT_ENUM! { enum MediaPlayerAudioDeviceType: i32 { + Console (MediaPlayerAudioDeviceType_Console) = 0, Multimedia (MediaPlayerAudioDeviceType_Multimedia) = 1, Communications (MediaPlayerAudioDeviceType_Communications) = 2, + }} + RT_ENUM! { enum StereoscopicVideoRenderMode: i32 { + Mono (StereoscopicVideoRenderMode_Mono) = 0, Stereo (StereoscopicVideoRenderMode_Stereo) = 1, + }} + RT_ENUM! { enum MediaCommandEnablingRule: i32 { + Auto (MediaCommandEnablingRule_Auto) = 0, Always (MediaCommandEnablingRule_Always) = 1, Never (MediaCommandEnablingRule_Never) = 2, + }} + DEFINE_IID!(IID_IPlaybackMediaMarker, 3302109020, 15388, 17476, 182, 185, 119, 139, 4, 34, 212, 26); + RT_INTERFACE!{interface IPlaybackMediaMarker(IPlaybackMediaMarkerVtbl): IInspectable(IInspectableVtbl) [IID_IPlaybackMediaMarker] { + fn get_Time(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_MediaMarkerType(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPlaybackMediaMarker { + #[inline] pub unsafe fn get_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Time)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_marker_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaMarkerType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlaybackMediaMarker: IPlaybackMediaMarker [IPlaybackMediaMarkerFactory] [CLSID_PlaybackMediaMarker]} + DEFINE_CLSID!(CLSID_PlaybackMediaMarker = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,108,97,121,98,97,99,107,46,80,108,97,121,98,97,99,107,77,101,100,105,97,77,97,114,107,101,114,0]); + DEFINE_IID!(IID_IPlaybackMediaMarkerFactory, 2354252408, 57518, 19994, 168, 200, 226, 63, 152, 42, 147, 123); + RT_INTERFACE!{static interface IPlaybackMediaMarkerFactory(IPlaybackMediaMarkerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPlaybackMediaMarkerFactory] { + fn CreateFromTime(&mut self, value: super::super::foundation::TimeSpan, out: *mut *mut PlaybackMediaMarker) -> HRESULT, + fn Create(&mut self, value: super::super::foundation::TimeSpan, mediaMarketType: HSTRING, text: HSTRING, out: *mut *mut PlaybackMediaMarker) -> HRESULT + }} + impl IPlaybackMediaMarkerFactory { + #[inline] pub unsafe fn create_from_time(&mut self, value: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromTime)(self, value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create(&mut self, value: super::super::foundation::TimeSpan, mediaMarketType: &HStringArg, text: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, value, mediaMarketType.get(), text.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlaybackMediaMarkerSequence, 4068543726, 25483, 18127, 136, 23, 29, 17, 31, 233, 216, 196); + RT_INTERFACE!{interface IPlaybackMediaMarkerSequence(IPlaybackMediaMarkerSequenceVtbl): IInspectable(IInspectableVtbl) [IID_IPlaybackMediaMarkerSequence] { + fn get_Size(&mut self, out: *mut u32) -> HRESULT, + fn Insert(&mut self, value: *mut PlaybackMediaMarker) -> HRESULT, + fn Clear(&mut self) -> HRESULT + }} + impl IPlaybackMediaMarkerSequence { + #[inline] pub unsafe fn get_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn insert(&mut self, value: &PlaybackMediaMarker) -> Result<()> { + let hr = ((*self.lpVtbl).Insert)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PlaybackMediaMarkerSequence: IPlaybackMediaMarkerSequence} + DEFINE_IID!(IID_IMediaPlayerFailedEventArgs, 658827705, 42979, 20246, 186, 196, 121, 20, 235, 192, 131, 1); + RT_INTERFACE!{interface IMediaPlayerFailedEventArgs(IMediaPlayerFailedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayerFailedEventArgs] { + fn get_Error(&mut self, out: *mut MediaPlayerError) -> HRESULT, + fn get_ExtendedErrorCode(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT, + fn get_ErrorMessage(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMediaPlayerFailedEventArgs { + #[inline] pub unsafe fn get_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ErrorMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlayerFailedEventArgs: IMediaPlayerFailedEventArgs} + DEFINE_IID!(IID_IMediaPlayerRateChangedEventArgs, 1080036696, 15201, 19378, 152, 159, 252, 101, 96, 139, 108, 171); + RT_INTERFACE!{interface IMediaPlayerRateChangedEventArgs(IMediaPlayerRateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayerRateChangedEventArgs] { + fn get_NewRate(&mut self, out: *mut f64) -> HRESULT + }} + impl IMediaPlayerRateChangedEventArgs { + #[inline] pub unsafe fn get_new_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlayerRateChangedEventArgs: IMediaPlayerRateChangedEventArgs} + DEFINE_IID!(IID_IPlaybackMediaMarkerReachedEventArgs, 1468846521, 37090, 20064, 171, 196, 135, 64, 176, 31, 97, 150); + RT_INTERFACE!{interface IPlaybackMediaMarkerReachedEventArgs(IPlaybackMediaMarkerReachedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPlaybackMediaMarkerReachedEventArgs] { + fn get_PlaybackMediaMarker(&mut self, out: *mut *mut PlaybackMediaMarker) -> HRESULT + }} + impl IPlaybackMediaMarkerReachedEventArgs { + #[inline] pub unsafe fn get_playback_media_marker(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaybackMediaMarker)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlaybackMediaMarkerReachedEventArgs: IPlaybackMediaMarkerReachedEventArgs} + DEFINE_IID!(IID_IMediaPlayerDataReceivedEventArgs, 3344602117, 51201, 16682, 131, 91, 131, 252, 14, 98, 42, 142); + RT_INTERFACE!{interface IMediaPlayerDataReceivedEventArgs(IMediaPlayerDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayerDataReceivedEventArgs] { + fn get_Data(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + }} + impl IMediaPlayerDataReceivedEventArgs { + #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlayerDataReceivedEventArgs: IMediaPlayerDataReceivedEventArgs} + DEFINE_IID!(IID_IMediaPlayer, 941261771, 28671, 18843, 141, 100, 40, 133, 223, 193, 36, 158); + RT_INTERFACE!{interface IMediaPlayer(IMediaPlayerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayer] { + fn get_AutoPlay(&mut self, out: *mut bool) -> HRESULT, + fn put_AutoPlay(&mut self, value: bool) -> HRESULT, + fn get_NaturalDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Position(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_BufferingProgress(&mut self, out: *mut f64) -> HRESULT, + fn get_CurrentState(&mut self, out: *mut MediaPlayerState) -> HRESULT, + fn get_CanSeek(&mut self, out: *mut bool) -> HRESULT, + fn get_CanPause(&mut self, out: *mut bool) -> HRESULT, + fn get_IsLoopingEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsLoopingEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsProtected(&mut self, out: *mut bool) -> HRESULT, + fn get_IsMuted(&mut self, out: *mut bool) -> HRESULT, + fn put_IsMuted(&mut self, value: bool) -> HRESULT, + fn get_PlaybackRate(&mut self, out: *mut f64) -> HRESULT, + fn put_PlaybackRate(&mut self, value: f64) -> HRESULT, + fn get_Volume(&mut self, out: *mut f64) -> HRESULT, + fn put_Volume(&mut self, value: f64) -> HRESULT, + fn get_PlaybackMediaMarkers(&mut self, out: *mut *mut PlaybackMediaMarkerSequence) -> HRESULT, + fn add_MediaOpened(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MediaOpened(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_MediaEnded(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MediaEnded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_MediaFailed(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MediaFailed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CurrentStateChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CurrentStateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PlaybackMediaMarkerReached(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackMediaMarkerReached(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_MediaPlayerRateChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MediaPlayerRateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VolumeChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VolumeChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SeekCompleted(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SeekCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BufferingStarted(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BufferingStarted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BufferingEnded(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BufferingEnded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn Play(&mut self) -> HRESULT, + fn Pause(&mut self) -> HRESULT, + fn SetUriSource(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT + }} + impl IMediaPlayer { + #[inline] pub unsafe fn get_auto_play(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoPlay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_play(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoPlay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_natural_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NaturalDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Position)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_buffering_progress(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BufferingProgress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_seek(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanSeek)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_pause(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanPause)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_looping_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsLoopingEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_looping_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsLoopingEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_protected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsProtected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_muted(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsMuted)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_muted(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsMuted)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PlaybackRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_playback_rate(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlaybackRate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_volume(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Volume)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_volume(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Volume)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_media_markers(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaybackMediaMarkers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_media_opened(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MediaOpened)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_media_opened(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MediaOpened)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_media_ended(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MediaEnded)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_media_ended(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MediaEnded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_media_failed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MediaFailed)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_media_failed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MediaFailed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_current_state_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CurrentStateChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_current_state_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CurrentStateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_playback_media_marker_reached(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PlaybackMediaMarkerReached)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_playback_media_marker_reached(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PlaybackMediaMarkerReached)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_media_player_rate_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MediaPlayerRateChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_media_player_rate_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MediaPlayerRateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_volume_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VolumeChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_volume_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VolumeChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_seek_completed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SeekCompleted)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_seek_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SeekCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_buffering_started(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BufferingStarted)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_buffering_started(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BufferingStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_buffering_ended(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BufferingEnded)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_buffering_ended(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BufferingEnded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn play(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Play)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn pause(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Pause)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_uri_source(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).SetUriSource)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlayer: IMediaPlayer} + DEFINE_IID!(IID_IMediaPlayer2, 1015288344, 8483, 20421, 144, 130, 47, 136, 63, 119, 189, 245); + RT_INTERFACE!{interface IMediaPlayer2(IMediaPlayer2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayer2] { + fn get_SystemMediaTransportControls(&mut self, out: *mut *mut super::SystemMediaTransportControls) -> HRESULT, + fn get_AudioCategory(&mut self, out: *mut MediaPlayerAudioCategory) -> HRESULT, + fn put_AudioCategory(&mut self, value: MediaPlayerAudioCategory) -> HRESULT, + fn get_AudioDeviceType(&mut self, out: *mut MediaPlayerAudioDeviceType) -> HRESULT, + fn put_AudioDeviceType(&mut self, value: MediaPlayerAudioDeviceType) -> HRESULT + }} + impl IMediaPlayer2 { + #[inline] pub unsafe fn get_system_media_transport_controls(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SystemMediaTransportControls)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_category(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioCategory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_audio_category(&mut self, value: MediaPlayerAudioCategory) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioCategory)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioDeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_audio_device_type(&mut self, value: MediaPlayerAudioDeviceType) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioDeviceType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlayer3, 3993395418, 795, 20459, 189, 155, 146, 224, 160, 168, 210, 153); + RT_INTERFACE!{interface IMediaPlayer3(IMediaPlayer3Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayer3] { + fn add_IsMutedChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsMutedChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_AudioBalance(&mut self, out: *mut f64) -> HRESULT, + fn put_AudioBalance(&mut self, value: f64) -> HRESULT, + fn get_RealTimePlayback(&mut self, out: *mut bool) -> HRESULT, + fn put_RealTimePlayback(&mut self, value: bool) -> HRESULT, + fn get_StereoscopicVideoRenderMode(&mut self, out: *mut StereoscopicVideoRenderMode) -> HRESULT, + fn put_StereoscopicVideoRenderMode(&mut self, value: StereoscopicVideoRenderMode) -> HRESULT, + fn get_BreakManager(&mut self, out: *mut *mut MediaBreakManager) -> HRESULT, + fn get_CommandManager(&mut self, out: *mut *mut MediaPlaybackCommandManager) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy12(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_AudioDevice(&mut self, out: *mut *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy13(&mut self) -> (), + #[cfg(feature="windows.devices")] fn put_AudioDevice(&mut self, value: *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT, + fn get_TimelineController(&mut self, out: *mut *mut super::MediaTimelineController) -> HRESULT, + fn put_TimelineController(&mut self, value: *mut super::MediaTimelineController) -> HRESULT, + fn get_TimelineControllerPositionOffset(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_TimelineControllerPositionOffset(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_PlaybackSession(&mut self, out: *mut *mut MediaPlaybackSession) -> HRESULT, + fn StepForwardOneFrame(&mut self) -> HRESULT, + fn StepBackwardOneFrame(&mut self) -> HRESULT, + fn GetAsCastingSource(&mut self, out: *mut *mut super::casting::CastingSource) -> HRESULT + }} + impl IMediaPlayer3 { + #[inline] pub unsafe fn add_is_muted_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_IsMutedChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_is_muted_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_IsMutedChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_balance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioBalance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_audio_balance(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioBalance)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_real_time_playback(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RealTimePlayback)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_real_time_playback(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_RealTimePlayback)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stereoscopic_video_render_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StereoscopicVideoRenderMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stereoscopic_video_render_mode(&mut self, value: StereoscopicVideoRenderMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_StereoscopicVideoRenderMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_break_manager(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BreakManager)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_command_manager(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CommandManager)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_audio_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudioDevice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn set_audio_device(&mut self, value: &super::super::devices::enumeration::DeviceInformation) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioDevice)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_timeline_controller(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TimelineController)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_timeline_controller(&mut self, value: &super::MediaTimelineController) -> Result<()> { + let hr = ((*self.lpVtbl).put_TimelineController)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_timeline_controller_position_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimelineControllerPositionOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_timeline_controller_position_offset(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_TimelineControllerPositionOffset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaybackSession)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn step_forward_one_frame(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).StepForwardOneFrame)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn step_backward_one_frame(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).StepBackwardOneFrame)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_as_casting_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAsCastingSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaBreakManager: IMediaBreakManager} + RT_CLASS!{class MediaPlaybackCommandManager: IMediaPlaybackCommandManager} + RT_CLASS!{class MediaPlaybackSession: IMediaPlaybackSession} + DEFINE_IID!(IID_IMediaPlayer4, 2147704240, 29768, 18288, 175, 207, 42, 87, 69, 9, 20, 197); + RT_INTERFACE!{interface IMediaPlayer4(IMediaPlayer4Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayer4] { + fn SetSurfaceSize(&mut self, size: super::super::foundation::Size) -> HRESULT, + #[cfg(feature="windows.ui")] fn GetSurface(&mut self, compositor: *mut super::super::ui::composition::Compositor, out: *mut *mut MediaPlayerSurface) -> HRESULT + }} + impl IMediaPlayer4 { + #[inline] pub unsafe fn set_surface_size(&mut self, size: super::super::foundation::Size) -> Result<()> { + let hr = ((*self.lpVtbl).SetSurfaceSize)(self, size); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_surface(&mut self, compositor: &super::super::ui::composition::Compositor) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSurface)(self, compositor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlayerSurface: IMediaPlayerSurface} + DEFINE_IID!(IID_IMediaPlaybackSession, 3274401853, 1031, 16826, 137, 70, 139, 52, 90, 90, 84, 53); + RT_INTERFACE!{interface IMediaPlaybackSession(IMediaPlaybackSessionVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackSession] { + fn add_PlaybackStateChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackStateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PlaybackRateChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackRateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SeekCompleted(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SeekCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BufferingStarted(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BufferingStarted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BufferingEnded(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BufferingEnded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BufferingProgressChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BufferingProgressChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadProgressChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadProgressChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_NaturalDurationChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NaturalDurationChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PositionChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PositionChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_NaturalVideoSizeChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NaturalVideoSizeChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_MediaPlayer(&mut self, out: *mut *mut MediaPlayer) -> HRESULT, + fn get_NaturalDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Position(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_PlaybackState(&mut self, out: *mut MediaPlaybackState) -> HRESULT, + fn get_CanSeek(&mut self, out: *mut bool) -> HRESULT, + fn get_CanPause(&mut self, out: *mut bool) -> HRESULT, + fn get_IsProtected(&mut self, out: *mut bool) -> HRESULT, + fn get_PlaybackRate(&mut self, out: *mut f64) -> HRESULT, + fn put_PlaybackRate(&mut self, value: f64) -> HRESULT, + fn get_BufferingProgress(&mut self, out: *mut f64) -> HRESULT, + fn get_DownloadProgress(&mut self, out: *mut f64) -> HRESULT, + fn get_NaturalVideoHeight(&mut self, out: *mut u32) -> HRESULT, + fn get_NaturalVideoWidth(&mut self, out: *mut u32) -> HRESULT, + fn get_NormalizedSourceRect(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn put_NormalizedSourceRect(&mut self, value: super::super::foundation::Rect) -> HRESULT, + fn get_StereoscopicVideoPackingMode(&mut self, out: *mut super::mediaproperties::StereoscopicVideoPackingMode) -> HRESULT, + fn put_StereoscopicVideoPackingMode(&mut self, value: super::mediaproperties::StereoscopicVideoPackingMode) -> HRESULT + }} + impl IMediaPlaybackSession { + #[inline] pub unsafe fn add_playback_state_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PlaybackStateChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_playback_state_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PlaybackStateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_playback_rate_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PlaybackRateChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_playback_rate_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PlaybackRateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_seek_completed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SeekCompleted)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_seek_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SeekCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_buffering_started(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BufferingStarted)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_buffering_started(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BufferingStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_buffering_ended(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BufferingEnded)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_buffering_ended(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BufferingEnded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_buffering_progress_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BufferingProgressChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_buffering_progress_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BufferingProgressChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_download_progress_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DownloadProgressChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_download_progress_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DownloadProgressChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_natural_duration_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NaturalDurationChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_natural_duration_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NaturalDurationChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_position_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PositionChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_position_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PositionChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_natural_video_size_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NaturalVideoSizeChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_natural_video_size_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NaturalVideoSizeChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_player(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaPlayer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_natural_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NaturalDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Position)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PlaybackState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_seek(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanSeek)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_pause(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanPause)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_protected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsProtected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PlaybackRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_playback_rate(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlaybackRate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_buffering_progress(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BufferingProgress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_download_progress(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DownloadProgress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_natural_video_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NaturalVideoHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_natural_video_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NaturalVideoWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_normalized_source_rect(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NormalizedSourceRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_normalized_source_rect(&mut self, value: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).put_NormalizedSourceRect)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stereoscopic_video_packing_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StereoscopicVideoPackingMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stereoscopic_video_packing_mode(&mut self, value: super::mediaproperties::StereoscopicVideoPackingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_StereoscopicVideoPackingMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlayerSource, 3176106135, 5155, 19518, 130, 197, 15, 177, 175, 148, 247, 21); + RT_INTERFACE!{interface IMediaPlayerSource(IMediaPlayerSourceVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayerSource] { + fn get_ProtectionManager(&mut self, out: *mut *mut super::protection::MediaProtectionManager) -> HRESULT, + fn put_ProtectionManager(&mut self, value: *mut super::protection::MediaProtectionManager) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SetFileSource(&mut self, file: *mut super::super::storage::IStorageFile) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SetStreamSource(&mut self, stream: *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + fn SetMediaSource(&mut self, source: *mut super::core::IMediaSource) -> HRESULT + }} + impl IMediaPlayerSource { + #[inline] pub unsafe fn get_protection_manager(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProtectionManager)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_protection_manager(&mut self, value: &super::protection::MediaProtectionManager) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProtectionManager)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_file_source(&mut self, file: &super::super::storage::IStorageFile) -> Result<()> { + let hr = ((*self.lpVtbl).SetFileSource)(self, file as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_stream_source(&mut self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + let hr = ((*self.lpVtbl).SetStreamSource)(self, stream as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_media_source(&mut self, source: &super::core::IMediaSource) -> Result<()> { + let hr = ((*self.lpVtbl).SetMediaSource)(self, source as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlayerSource2, 2185534367, 29474, 19467, 176, 59, 62, 105, 164, 130, 96, 197); + RT_INTERFACE!{interface IMediaPlayerSource2(IMediaPlayerSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayerSource2] { + fn get_Source(&mut self, out: *mut *mut IMediaPlaybackSource) -> HRESULT, + fn put_Source(&mut self, value: *mut IMediaPlaybackSource) -> HRESULT + }} + impl IMediaPlayerSource2 { + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_source(&mut self, value: &IMediaPlaybackSource) -> Result<()> { + let hr = ((*self.lpVtbl).put_Source)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlayerEffects, 2241978074, 51894, 19648, 139, 227, 96, 53, 244, 222, 37, 145); + RT_INTERFACE!{interface IMediaPlayerEffects(IMediaPlayerEffectsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayerEffects] { + fn AddAudioEffect(&mut self, activatableClassId: HSTRING, effectOptional: bool, configuration: *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn RemoveAllEffects(&mut self) -> HRESULT + }} + impl IMediaPlayerEffects { + #[inline] pub unsafe fn add_audio_effect(&mut self, activatableClassId: &HStringArg, effectOptional: bool, configuration: &super::super::foundation::collections::IPropertySet) -> Result<()> { + let hr = ((*self.lpVtbl).AddAudioEffect)(self, activatableClassId.get(), effectOptional, configuration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_all_effects(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveAllEffects)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlayerEffects2, 4198603385, 7102, 18117, 174, 31, 142, 230, 159, 179, 194, 199); + RT_INTERFACE!{interface IMediaPlayerEffects2(IMediaPlayerEffects2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayerEffects2] { + fn AddVideoEffect(&mut self, activatableClassId: HSTRING, effectOptional: bool, effectConfiguration: *mut super::super::foundation::collections::IPropertySet) -> HRESULT + }} + impl IMediaPlayerEffects2 { + #[inline] pub unsafe fn add_video_effect(&mut self, activatableClassId: &HStringArg, effectOptional: bool, effectConfiguration: &super::super::foundation::collections::IPropertySet) -> Result<()> { + let hr = ((*self.lpVtbl).AddVideoEffect)(self, activatableClassId.get(), effectOptional, effectConfiguration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaBreakStartedEventArgs, 2826894961, 57300, 17738, 149, 110, 10, 74, 100, 131, 149, 248); + RT_INTERFACE!{interface IMediaBreakStartedEventArgs(IMediaBreakStartedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaBreakStartedEventArgs] { + fn get_MediaBreak(&mut self, out: *mut *mut MediaBreak) -> HRESULT + }} + impl IMediaBreakStartedEventArgs { + #[inline] pub unsafe fn get_media_break(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaBreak)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaBreakEndedEventArgs, 850997878, 7261, 20462, 135, 50, 35, 109, 195, 168, 133, 128); + RT_INTERFACE!{interface IMediaBreakEndedEventArgs(IMediaBreakEndedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaBreakEndedEventArgs] { + fn get_MediaBreak(&mut self, out: *mut *mut MediaBreak) -> HRESULT + }} + impl IMediaBreakEndedEventArgs { + #[inline] pub unsafe fn get_media_break(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaBreak)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaBreakSkippedEventArgs, 1860783109, 12116, 19006, 163, 171, 36, 195, 178, 112, 180, 163); + RT_INTERFACE!{interface IMediaBreakSkippedEventArgs(IMediaBreakSkippedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaBreakSkippedEventArgs] { + fn get_MediaBreak(&mut self, out: *mut *mut MediaBreak) -> HRESULT + }} + impl IMediaBreakSkippedEventArgs { + #[inline] pub unsafe fn get_media_break(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaBreak)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaBreakSeekedOverEventArgs, 3853150022, 1542, 17554, 185, 211, 195, 200, 253, 224, 164, 234); + RT_INTERFACE!{interface IMediaBreakSeekedOverEventArgs(IMediaBreakSeekedOverEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaBreakSeekedOverEventArgs] { + fn get_SeekedOverBreaks(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_OldPosition(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_NewPosition(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IMediaBreakSeekedOverEventArgs { + #[inline] pub unsafe fn get_seeked_over_breaks(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SeekedOverBreaks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_old_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OldPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaBreakManager, 2824134065, 65204, 19867, 157, 151, 15, 219, 229, 142, 94, 57); + RT_INTERFACE!{interface IMediaBreakManager(IMediaBreakManagerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaBreakManager] { + fn add_BreaksSeekedOver(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BreaksSeekedOver(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BreakStarted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BreakStarted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BreakEnded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BreakEnded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BreakSkipped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BreakSkipped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_CurrentBreak(&mut self, out: *mut *mut MediaBreak) -> HRESULT, + fn get_PlaybackSession(&mut self, out: *mut *mut MediaPlaybackSession) -> HRESULT, + fn PlayBreak(&mut self, value: *mut MediaBreak) -> HRESULT, + fn SkipCurrentBreak(&mut self) -> HRESULT + }} + impl IMediaBreakManager { + #[inline] pub unsafe fn add_breaks_seeked_over(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BreaksSeekedOver)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_breaks_seeked_over(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BreaksSeekedOver)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_break_started(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BreakStarted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_break_started(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BreakStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_break_ended(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BreakEnded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_break_ended(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BreakEnded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_break_skipped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BreakSkipped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_break_skipped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BreakSkipped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_break(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentBreak)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaybackSession)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn play_break(&mut self, value: &MediaBreak) -> Result<()> { + let hr = ((*self.lpVtbl).PlayBreak)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn skip_current_break(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SkipCurrentBreak)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaBreakSeekedOverEventArgs: IMediaBreakSeekedOverEventArgs} + RT_CLASS!{class MediaBreakStartedEventArgs: IMediaBreakStartedEventArgs} + RT_CLASS!{class MediaBreakEndedEventArgs: IMediaBreakEndedEventArgs} + RT_CLASS!{class MediaBreakSkippedEventArgs: IMediaBreakSkippedEventArgs} + DEFINE_IID!(IID_IMediaPlayerSurface, 248927164, 46902, 18883, 131, 11, 118, 74, 56, 69, 49, 58); + RT_INTERFACE!{interface IMediaPlayerSurface(IMediaPlayerSurfaceVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayerSurface] { + #[cfg(not(feature="windows.ui"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_CompositionSurface(&mut self, out: *mut *mut super::super::ui::composition::ICompositionSurface) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_Compositor(&mut self, out: *mut *mut super::super::ui::composition::Compositor) -> HRESULT, + fn get_MediaPlayer(&mut self, out: *mut *mut MediaPlayer) -> HRESULT + }} + impl IMediaPlayerSurface { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_composition_surface(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CompositionSurface)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_compositor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Compositor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_player(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaPlayer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundMediaPlayerStatics, 2238569409, 22007, 18207, 160, 242, 104, 172, 76, 144, 69, 146); + RT_INTERFACE!{static interface IBackgroundMediaPlayerStatics(IBackgroundMediaPlayerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundMediaPlayerStatics] { + fn get_Current(&mut self, out: *mut *mut MediaPlayer) -> HRESULT, + fn add_MessageReceivedFromBackground(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceivedFromBackground(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_MessageReceivedFromForeground(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceivedFromForeground(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn SendMessageToBackground(&mut self, value: *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn SendMessageToForeground(&mut self, value: *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn IsMediaPlaying(&mut self, out: *mut bool) -> HRESULT, + fn Shutdown(&mut self) -> HRESULT + }} + impl IBackgroundMediaPlayerStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_message_received_from_background(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MessageReceivedFromBackground)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_message_received_from_background(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MessageReceivedFromBackground)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_message_received_from_foreground(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MessageReceivedFromForeground)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_message_received_from_foreground(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MessageReceivedFromForeground)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn send_message_to_background(&mut self, value: &super::super::foundation::collections::ValueSet) -> Result<()> { + let hr = ((*self.lpVtbl).SendMessageToBackground)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn send_message_to_foreground(&mut self, value: &super::super::foundation::collections::ValueSet) -> Result<()> { + let hr = ((*self.lpVtbl).SendMessageToForeground)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn is_media_playing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsMediaPlaying)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn shutdown(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Shutdown)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IBackgroundMediaPlayerStatics [CLSID_BackgroundMediaPlayer]} + DEFINE_CLSID!(CLSID_BackgroundMediaPlayer = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,108,97,121,98,97,99,107,46,66,97,99,107,103,114,111,117,110,100,77,101,100,105,97,80,108,97,121,101,114,0]); + DEFINE_IID!(IID_IMediaPlaybackCommandManagerPlayReceivedEventArgs, 2599419982, 22411, 19542, 160, 6, 22, 21, 157, 136, 138, 72); + RT_INTERFACE!{interface IMediaPlaybackCommandManagerPlayReceivedEventArgs(IMediaPlaybackCommandManagerPlayReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManagerPlayReceivedEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IMediaPlaybackCommandManagerPlayReceivedEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackCommandManagerPlayReceivedEventArgs: IMediaPlaybackCommandManagerPlayReceivedEventArgs} + DEFINE_IID!(IID_IMediaPlaybackCommandManagerPauseReceivedEventArgs, 1559022876, 49756, 16929, 177, 108, 195, 201, 140, 224, 18, 214); + RT_INTERFACE!{interface IMediaPlaybackCommandManagerPauseReceivedEventArgs(IMediaPlaybackCommandManagerPauseReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManagerPauseReceivedEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IMediaPlaybackCommandManagerPauseReceivedEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackCommandManagerPauseReceivedEventArgs: IMediaPlaybackCommandManagerPauseReceivedEventArgs} + DEFINE_IID!(IID_IMediaPlaybackCommandManagerNextReceivedEventArgs, 3780133939, 41648, 17876, 185, 222, 95, 66, 172, 20, 168, 57); + RT_INTERFACE!{interface IMediaPlaybackCommandManagerNextReceivedEventArgs(IMediaPlaybackCommandManagerNextReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManagerNextReceivedEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IMediaPlaybackCommandManagerNextReceivedEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackCommandManagerNextReceivedEventArgs: IMediaPlaybackCommandManagerNextReceivedEventArgs} + DEFINE_IID!(IID_IMediaPlaybackCommandManagerPreviousReceivedEventArgs, 1381904513, 17970, 20342, 153, 177, 215, 113, 98, 63, 98, 135); + RT_INTERFACE!{interface IMediaPlaybackCommandManagerPreviousReceivedEventArgs(IMediaPlaybackCommandManagerPreviousReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManagerPreviousReceivedEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IMediaPlaybackCommandManagerPreviousReceivedEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackCommandManagerPreviousReceivedEventArgs: IMediaPlaybackCommandManagerPreviousReceivedEventArgs} + DEFINE_IID!(IID_IMediaPlaybackCommandManagerFastForwardReceivedEventArgs, 821060825, 46225, 19722, 188, 33, 48, 152, 189, 19, 50, 233); + RT_INTERFACE!{interface IMediaPlaybackCommandManagerFastForwardReceivedEventArgs(IMediaPlaybackCommandManagerFastForwardReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManagerFastForwardReceivedEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IMediaPlaybackCommandManagerFastForwardReceivedEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackCommandManagerFastForwardReceivedEventArgs: IMediaPlaybackCommandManagerFastForwardReceivedEventArgs} + DEFINE_IID!(IID_IMediaPlaybackCommandManagerRewindReceivedEventArgs, 2668124487, 41920, 16989, 170, 239, 151, 186, 120, 152, 177, 65); + RT_INTERFACE!{interface IMediaPlaybackCommandManagerRewindReceivedEventArgs(IMediaPlaybackCommandManagerRewindReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManagerRewindReceivedEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IMediaPlaybackCommandManagerRewindReceivedEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackCommandManagerRewindReceivedEventArgs: IMediaPlaybackCommandManagerRewindReceivedEventArgs} + DEFINE_IID!(IID_IMediaPlaybackCommandManagerShuffleReceivedEventArgs, 1352686831, 25582, 19094, 183, 181, 254, 224, 139, 159, 249, 12); + RT_INTERFACE!{interface IMediaPlaybackCommandManagerShuffleReceivedEventArgs(IMediaPlaybackCommandManagerShuffleReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManagerShuffleReceivedEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn get_IsShuffleRequested(&mut self, out: *mut bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IMediaPlaybackCommandManagerShuffleReceivedEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_shuffle_requested(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsShuffleRequested)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackCommandManagerShuffleReceivedEventArgs: IMediaPlaybackCommandManagerShuffleReceivedEventArgs} + DEFINE_IID!(IID_IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs, 1030704931, 21040, 17425, 160, 233, 186, 217, 76, 42, 4, 92); + RT_INTERFACE!{interface IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs(IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn get_AutoRepeatMode(&mut self, out: *mut super::MediaPlaybackAutoRepeatMode) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_repeat_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoRepeatMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs: IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs} + DEFINE_IID!(IID_IMediaPlaybackCommandManagerPositionReceivedEventArgs, 1435608916, 54823, 19421, 169, 13, 134, 160, 21, 178, 73, 2); + RT_INTERFACE!{interface IMediaPlaybackCommandManagerPositionReceivedEventArgs(IMediaPlaybackCommandManagerPositionReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManagerPositionReceivedEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IMediaPlaybackCommandManagerPositionReceivedEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackCommandManagerPositionReceivedEventArgs: IMediaPlaybackCommandManagerPositionReceivedEventArgs} + DEFINE_IID!(IID_IMediaPlaybackCommandManagerRateReceivedEventArgs, 418003257, 18966, 16745, 139, 5, 62, 185, 245, 255, 120, 235); + RT_INTERFACE!{interface IMediaPlaybackCommandManagerRateReceivedEventArgs(IMediaPlaybackCommandManagerRateReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManagerRateReceivedEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn get_PlaybackRate(&mut self, out: *mut f64) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IMediaPlaybackCommandManagerRateReceivedEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PlaybackRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackCommandManagerRateReceivedEventArgs: IMediaPlaybackCommandManagerRateReceivedEventArgs} + DEFINE_IID!(IID_IMediaPlaybackCommandManagerCommandBehavior, 2020351608, 52856, 18960, 175, 214, 132, 63, 203, 185, 12, 46); + RT_INTERFACE!{interface IMediaPlaybackCommandManagerCommandBehavior(IMediaPlaybackCommandManagerCommandBehaviorVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManagerCommandBehavior] { + fn get_CommandManager(&mut self, out: *mut *mut MediaPlaybackCommandManager) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn get_EnablingRule(&mut self, out: *mut MediaCommandEnablingRule) -> HRESULT, + fn put_EnablingRule(&mut self, value: MediaCommandEnablingRule) -> HRESULT, + fn add_IsEnabledChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsEnabledChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMediaPlaybackCommandManagerCommandBehavior { + #[inline] pub unsafe fn get_command_manager(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CommandManager)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_enabling_rule(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EnablingRule)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_enabling_rule(&mut self, value: MediaCommandEnablingRule) -> Result<()> { + let hr = ((*self.lpVtbl).put_EnablingRule)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_is_enabled_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_IsEnabledChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_is_enabled_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_IsEnabledChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackCommandManagerCommandBehavior: IMediaPlaybackCommandManagerCommandBehavior} + DEFINE_IID!(IID_IMediaPlaybackCommandManager, 1523508646, 23734, 19034, 133, 33, 204, 134, 177, 193, 237, 55); + RT_INTERFACE!{interface IMediaPlaybackCommandManager(IMediaPlaybackCommandManagerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackCommandManager] { + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsEnabled(&mut self, value: bool) -> HRESULT, + fn get_MediaPlayer(&mut self, out: *mut *mut MediaPlayer) -> HRESULT, + fn get_PlayBehavior(&mut self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, + fn get_PauseBehavior(&mut self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, + fn get_NextBehavior(&mut self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, + fn get_PreviousBehavior(&mut self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, + fn get_FastForwardBehavior(&mut self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, + fn get_RewindBehavior(&mut self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, + fn get_ShuffleBehavior(&mut self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, + fn get_AutoRepeatModeBehavior(&mut self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, + fn get_PositionBehavior(&mut self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, + fn get_RateBehavior(&mut self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, + fn add_PlayReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlayReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PauseReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PauseReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_NextReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NextReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PreviousReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PreviousReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_FastForwardReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FastForwardReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RewindReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RewindReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ShuffleReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ShuffleReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AutoRepeatModeReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AutoRepeatModeReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PositionReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PositionReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RateReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RateReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMediaPlaybackCommandManager { + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_player(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaPlayer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_play_behavior(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlayBehavior)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pause_behavior(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PauseBehavior)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_next_behavior(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NextBehavior)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_previous_behavior(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreviousBehavior)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_fast_forward_behavior(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FastForwardBehavior)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rewind_behavior(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RewindBehavior)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_shuffle_behavior(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ShuffleBehavior)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_repeat_mode_behavior(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AutoRepeatModeBehavior)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_behavior(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PositionBehavior)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rate_behavior(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RateBehavior)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_play_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PlayReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_play_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PlayReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pause_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PauseReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pause_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PauseReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_next_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NextReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_next_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NextReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_previous_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PreviousReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_previous_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PreviousReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_fast_forward_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FastForwardReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_fast_forward_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FastForwardReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rewind_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RewindReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_rewind_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RewindReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_shuffle_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ShuffleReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_shuffle_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ShuffleReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_auto_repeat_mode_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AutoRepeatModeReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_auto_repeat_mode_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AutoRepeatModeReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_position_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PositionReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_position_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PositionReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rate_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RateReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_rate_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RateReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackItem: IMediaPlaybackItem [IMediaPlaybackItemFactory2] [CLSID_MediaPlaybackItem]} + RT_ACTIVATABLE!{IMediaPlaybackItemStatics [CLSID_MediaPlaybackItem]} + DEFINE_CLSID!(CLSID_MediaPlaybackItem = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,108,97,121,98,97,99,107,46,77,101,100,105,97,80,108,97,121,98,97,99,107,73,116,101,109,0]); + DEFINE_IID!(IID_IMediaPlaybackSource, 4020093628, 37655, 18070, 176, 81, 43, 173, 100, 49, 119, 181); + RT_INTERFACE!{interface IMediaPlaybackSource(IMediaPlaybackSourceVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackSource] { + + }} + RT_ENUM! { enum MediaPlaybackItemErrorCode: i32 { + None (MediaPlaybackItemErrorCode_None) = 0, Aborted (MediaPlaybackItemErrorCode_Aborted) = 1, NetworkError (MediaPlaybackItemErrorCode_NetworkError) = 2, DecodeError (MediaPlaybackItemErrorCode_DecodeError) = 3, SourceNotSupportedError (MediaPlaybackItemErrorCode_SourceNotSupportedError) = 4, EncryptionError (MediaPlaybackItemErrorCode_EncryptionError) = 5, + }} + RT_ENUM! { enum FailedMediaStreamKind: i32 { + Unknown (FailedMediaStreamKind_Unknown) = 0, Audio (FailedMediaStreamKind_Audio) = 1, Video (FailedMediaStreamKind_Video) = 2, + }} + RT_ENUM! { enum TimedMetadataTrackPresentationMode: i32 { + Disabled (TimedMetadataTrackPresentationMode_Disabled) = 0, Hidden (TimedMetadataTrackPresentationMode_Hidden) = 1, ApplicationPresented (TimedMetadataTrackPresentationMode_ApplicationPresented) = 2, PlatformPresented (TimedMetadataTrackPresentationMode_PlatformPresented) = 3, + }} + RT_ENUM! { enum MediaBreakInsertionMethod: i32 { + Interrupt (MediaBreakInsertionMethod_Interrupt) = 0, Replace (MediaBreakInsertionMethod_Replace) = 1, + }} + DEFINE_IID!(IID_IMediaPlaybackItemFactory, 1899232481, 5993, 20473, 167, 193, 56, 210, 196, 212, 35, 96); + RT_INTERFACE!{interface IMediaPlaybackItemFactory(IMediaPlaybackItemFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackItemFactory] { + fn Create(&mut self, source: *mut super::core::MediaSource, out: *mut *mut MediaPlaybackItem) -> HRESULT + }} + impl IMediaPlaybackItemFactory { + #[inline] pub unsafe fn create(&mut self, source: &super::core::MediaSource) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, source as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlaybackItemFactory2, 3615285050, 47431, 18802, 179, 93, 173, 251, 147, 26, 113, 230); + RT_INTERFACE!{static interface IMediaPlaybackItemFactory2(IMediaPlaybackItemFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackItemFactory2] { + fn CreateWithStartTime(&mut self, source: *mut super::core::MediaSource, startTime: super::super::foundation::TimeSpan, out: *mut *mut MediaPlaybackItem) -> HRESULT, + fn CreateWithStartTimeAndDurationLimit(&mut self, source: *mut super::core::MediaSource, startTime: super::super::foundation::TimeSpan, durationLimit: super::super::foundation::TimeSpan, out: *mut *mut MediaPlaybackItem) -> HRESULT + }} + impl IMediaPlaybackItemFactory2 { + #[inline] pub unsafe fn create_with_start_time(&mut self, source: &super::core::MediaSource, startTime: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithStartTime)(self, source as *const _ as *mut _, startTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_start_time_and_duration_limit(&mut self, source: &super::core::MediaSource, startTime: super::super::foundation::TimeSpan, durationLimit: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithStartTimeAndDurationLimit)(self, source as *const _ as *mut _, startTime, durationLimit, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlaybackItemStatics, 1260120052, 17221, 16444, 138, 103, 245, 222, 145, 223, 76, 134); + RT_INTERFACE!{static interface IMediaPlaybackItemStatics(IMediaPlaybackItemStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackItemStatics] { + fn FindFromMediaSource(&mut self, source: *mut super::core::MediaSource, out: *mut *mut MediaPlaybackItem) -> HRESULT + }} + impl IMediaPlaybackItemStatics { + #[inline] pub unsafe fn find_from_media_source(&mut self, source: &super::core::MediaSource) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindFromMediaSource)(self, source as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlaybackItem, 74487762, 58543, 18603, 178, 131, 105, 41, 230, 116, 236, 226); + RT_INTERFACE!{interface IMediaPlaybackItem(IMediaPlaybackItemVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackItem] { + fn add_AudioTracksChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioTracksChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoTracksChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoTracksChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_TimedMetadataTracksChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TimedMetadataTracksChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Source(&mut self, out: *mut *mut super::core::MediaSource) -> HRESULT, + fn get_AudioTracks(&mut self, out: *mut *mut MediaPlaybackAudioTrackList) -> HRESULT, + fn get_VideoTracks(&mut self, out: *mut *mut MediaPlaybackVideoTrackList) -> HRESULT, + fn get_TimedMetadataTracks(&mut self, out: *mut *mut MediaPlaybackTimedMetadataTrackList) -> HRESULT + }} + impl IMediaPlaybackItem { + #[inline] pub unsafe fn add_audio_tracks_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AudioTracksChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_audio_tracks_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AudioTracksChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_video_tracks_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VideoTracksChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_video_tracks_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VideoTracksChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_timed_metadata_tracks_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TimedMetadataTracksChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_timed_metadata_tracks_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TimedMetadataTracksChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_tracks(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudioTracks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_tracks(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoTracks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_timed_metadata_tracks(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TimedMetadataTracks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackAudioTrackList: super::super::foundation::collections::IVectorView} + RT_CLASS!{class MediaPlaybackVideoTrackList: super::super::foundation::collections::IVectorView} + RT_CLASS!{class MediaPlaybackTimedMetadataTrackList: super::super::foundation::collections::IVectorView} + DEFINE_IID!(IID_IMediaItemDisplayProperties, 507255624, 28823, 17284, 162, 23, 193, 41, 29, 250, 140, 22); + RT_INTERFACE!{interface IMediaItemDisplayProperties(IMediaItemDisplayPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IMediaItemDisplayProperties] { + fn get_Type(&mut self, out: *mut super::MediaPlaybackType) -> HRESULT, + fn put_Type(&mut self, value: super::MediaPlaybackType) -> HRESULT, + fn get_MusicProperties(&mut self, out: *mut *mut super::MusicDisplayProperties) -> HRESULT, + fn get_VideoProperties(&mut self, out: *mut *mut super::VideoDisplayProperties) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut super::super::storage::streams::RandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Thumbnail(&mut self, value: *mut super::super::storage::streams::RandomAccessStreamReference) -> HRESULT, + fn ClearAll(&mut self) -> HRESULT + }} + impl IMediaItemDisplayProperties { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_type(&mut self, value: super::MediaPlaybackType) -> Result<()> { + let hr = ((*self.lpVtbl).put_Type)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_music_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MusicProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_thumbnail(&mut self, value: &super::super::storage::streams::RandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbnail)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ClearAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlaybackItem2, 3629764977, 55279, 19329, 172, 31, 244, 4, 147, 203, 176, 145); + RT_INTERFACE!{interface IMediaPlaybackItem2(IMediaPlaybackItem2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackItem2] { + fn get_BreakSchedule(&mut self, out: *mut *mut MediaBreakSchedule) -> HRESULT, + fn get_StartTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_DurationLimit(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_CanSkip(&mut self, out: *mut bool) -> HRESULT, + fn put_CanSkip(&mut self, value: bool) -> HRESULT, + fn GetDisplayProperties(&mut self, out: *mut *mut MediaItemDisplayProperties) -> HRESULT, + fn ApplyDisplayProperties(&mut self, value: *mut MediaItemDisplayProperties) -> HRESULT + }} + impl IMediaPlaybackItem2 { + #[inline] pub unsafe fn get_break_schedule(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BreakSchedule)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_start_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration_limit(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DurationLimit)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_skip(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanSkip)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_can_skip(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanSkip)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDisplayProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn apply_display_properties(&mut self, value: &MediaItemDisplayProperties) -> Result<()> { + let hr = ((*self.lpVtbl).ApplyDisplayProperties)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaBreakSchedule: IMediaBreakSchedule} + RT_CLASS!{class MediaItemDisplayProperties: IMediaItemDisplayProperties} + DEFINE_IID!(IID_IMediaBreakFactory, 1159127042, 6368, 16505, 139, 95, 211, 52, 149, 193, 93, 46); + RT_INTERFACE!{static interface IMediaBreakFactory(IMediaBreakFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMediaBreakFactory] { + fn Create(&mut self, insertionMethod: MediaBreakInsertionMethod, out: *mut *mut MediaBreak) -> HRESULT, + fn CreateWithPresentationPosition(&mut self, insertionMethod: MediaBreakInsertionMethod, presentationPosition: super::super::foundation::TimeSpan, out: *mut *mut MediaBreak) -> HRESULT + }} + impl IMediaBreakFactory { + #[inline] pub unsafe fn create(&mut self, insertionMethod: MediaBreakInsertionMethod) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, insertionMethod, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_presentation_position(&mut self, insertionMethod: MediaBreakInsertionMethod, presentationPosition: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithPresentationPosition)(self, insertionMethod, presentationPosition, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaBreak: IMediaBreak [IMediaBreakFactory] [CLSID_MediaBreak]} + DEFINE_CLSID!(CLSID_MediaBreak = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,108,97,121,98,97,99,107,46,77,101,100,105,97,66,114,101,97,107,0]); + DEFINE_IID!(IID_IMediaBreak, 1900798576, 3567, 20156, 164, 137, 107, 52, 147, 14, 21, 88); + RT_INTERFACE!{interface IMediaBreak(IMediaBreakVtbl): IInspectable(IInspectableVtbl) [IID_IMediaBreak] { + fn get_PlaybackList(&mut self, out: *mut *mut MediaPlaybackList) -> HRESULT, + fn get_PresentationPosition(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_InsertionMethod(&mut self, out: *mut MediaBreakInsertionMethod) -> HRESULT, + fn get_CustomProperties(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn get_CanStart(&mut self, out: *mut bool) -> HRESULT, + fn put_CanStart(&mut self, value: bool) -> HRESULT + }} + impl IMediaBreak { + #[inline] pub unsafe fn get_playback_list(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaybackList)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_presentation_position(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PresentationPosition)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_insertion_method(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InsertionMethod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_start(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanStart)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_can_start(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanStart)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackList: IMediaPlaybackList} + DEFINE_IID!(IID_IMediaBreakSchedule, 2711246867, 39094, 16856, 131, 218, 249, 113, 210, 43, 123, 186); + RT_INTERFACE!{interface IMediaBreakSchedule(IMediaBreakScheduleVtbl): IInspectable(IInspectableVtbl) [IID_IMediaBreakSchedule] { + fn add_ScheduleChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ScheduleChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn InsertMidrollBreak(&mut self, mediaBreak: *mut MediaBreak) -> HRESULT, + fn RemoveMidrollBreak(&mut self, mediaBreak: *mut MediaBreak) -> HRESULT, + fn get_MidrollBreaks(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn put_PrerollBreak(&mut self, value: *mut MediaBreak) -> HRESULT, + fn get_PrerollBreak(&mut self, out: *mut *mut MediaBreak) -> HRESULT, + fn put_PostrollBreak(&mut self, value: *mut MediaBreak) -> HRESULT, + fn get_PostrollBreak(&mut self, out: *mut *mut MediaBreak) -> HRESULT, + fn get_PlaybackItem(&mut self, out: *mut *mut MediaPlaybackItem) -> HRESULT + }} + impl IMediaBreakSchedule { + #[inline] pub unsafe fn add_schedule_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ScheduleChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_schedule_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ScheduleChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_midroll_break(&mut self, mediaBreak: &MediaBreak) -> Result<()> { + let hr = ((*self.lpVtbl).InsertMidrollBreak)(self, mediaBreak as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_midroll_break(&mut self, mediaBreak: &MediaBreak) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveMidrollBreak)(self, mediaBreak as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_midroll_breaks(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MidrollBreaks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_preroll_break(&mut self, value: &MediaBreak) -> Result<()> { + let hr = ((*self.lpVtbl).put_PrerollBreak)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_preroll_break(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrerollBreak)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_postroll_break(&mut self, value: &MediaBreak) -> Result<()> { + let hr = ((*self.lpVtbl).put_PostrollBreak)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_postroll_break(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PostrollBreak)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaybackItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlaybackItemError, 1778118443, 56534, 19961, 164, 80, 219, 244, 198, 241, 194, 194); + RT_INTERFACE!{interface IMediaPlaybackItemError(IMediaPlaybackItemErrorVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackItemError] { + fn get_ErrorCode(&mut self, out: *mut MediaPlaybackItemErrorCode) -> HRESULT, + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IMediaPlaybackItemError { + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaEnginePlaybackSource, 1545407399, 14422, 18617, 141, 198, 36, 75, 241, 7, 191, 140); + RT_INTERFACE!{interface IMediaEnginePlaybackSource(IMediaEnginePlaybackSourceVtbl): IInspectable(IInspectableVtbl) [IID_IMediaEnginePlaybackSource] { + fn get_CurrentItem(&mut self, out: *mut *mut MediaPlaybackItem) -> HRESULT, + fn SetPlaybackSource(&mut self, source: *mut IMediaPlaybackSource) -> HRESULT + }} + impl IMediaEnginePlaybackSource { + #[inline] pub unsafe fn get_current_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_playback_source(&mut self, source: &IMediaPlaybackSource) -> Result<()> { + let hr = ((*self.lpVtbl).SetPlaybackSource)(self, source as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlaybackItemOpenedEventArgs, 3420044674, 12343, 20414, 174, 143, 57, 252, 57, 237, 244, 239); + RT_INTERFACE!{interface IMediaPlaybackItemOpenedEventArgs(IMediaPlaybackItemOpenedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackItemOpenedEventArgs] { + fn get_Item(&mut self, out: *mut *mut MediaPlaybackItem) -> HRESULT + }} + impl IMediaPlaybackItemOpenedEventArgs { + #[inline] pub unsafe fn get_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Item)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlaybackItemFailedEventArgs, 1996690250, 59815, 18371, 134, 44, 198, 86, 211, 6, 131, 212); + RT_INTERFACE!{interface IMediaPlaybackItemFailedEventArgs(IMediaPlaybackItemFailedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackItemFailedEventArgs] { + fn get_Item(&mut self, out: *mut *mut MediaPlaybackItem) -> HRESULT, + fn get_Error(&mut self, out: *mut *mut MediaPlaybackItemError) -> HRESULT + }} + impl IMediaPlaybackItemFailedEventArgs { + #[inline] pub unsafe fn get_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Item)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_error(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackItemError: IMediaPlaybackItemError} + DEFINE_IID!(IID_ICurrentMediaPlaybackItemChangedEventArgs, 390310034, 23619, 18965, 150, 122, 87, 45, 45, 15, 38, 198); + RT_INTERFACE!{interface ICurrentMediaPlaybackItemChangedEventArgs(ICurrentMediaPlaybackItemChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentMediaPlaybackItemChangedEventArgs] { + fn get_NewItem(&mut self, out: *mut *mut MediaPlaybackItem) -> HRESULT, + fn get_OldItem(&mut self, out: *mut *mut MediaPlaybackItem) -> HRESULT + }} + impl ICurrentMediaPlaybackItemChangedEventArgs { + #[inline] pub unsafe fn get_new_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NewItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_old_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OldItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlaybackList, 2138566300, 56386, 20006, 169, 141, 120, 80, 223, 142, 201, 37); + RT_INTERFACE!{interface IMediaPlaybackList(IMediaPlaybackListVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackList] { + fn add_ItemFailed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemFailed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CurrentItemChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CurrentItemChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ItemOpened(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemOpened(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Items(&mut self, out: *mut *mut super::super::foundation::collections::IObservableVector) -> HRESULT, + fn get_AutoRepeatEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_AutoRepeatEnabled(&mut self, value: bool) -> HRESULT, + fn get_ShuffleEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_ShuffleEnabled(&mut self, value: bool) -> HRESULT, + fn get_CurrentItem(&mut self, out: *mut *mut MediaPlaybackItem) -> HRESULT, + fn get_CurrentItemIndex(&mut self, out: *mut u32) -> HRESULT, + fn MoveNext(&mut self, out: *mut *mut MediaPlaybackItem) -> HRESULT, + fn MovePrevious(&mut self, out: *mut *mut MediaPlaybackItem) -> HRESULT, + fn MoveTo(&mut self, itemIndex: u32, out: *mut *mut MediaPlaybackItem) -> HRESULT + }} + impl IMediaPlaybackList { + #[inline] pub unsafe fn add_item_failed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ItemFailed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_item_failed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ItemFailed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_current_item_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CurrentItemChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_current_item_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CurrentItemChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_item_opened(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ItemOpened)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_item_opened(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ItemOpened)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Items)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_repeat_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoRepeatEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_repeat_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoRepeatEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_shuffle_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShuffleEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_shuffle_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShuffleEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_item_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentItemIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn move_next(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MoveNext)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn move_previous(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MovePrevious)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn move_to(&mut self, itemIndex: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MoveTo)(self, itemIndex, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaPlaybackItemFailedEventArgs: IMediaPlaybackItemFailedEventArgs} + RT_CLASS!{class CurrentMediaPlaybackItemChangedEventArgs: ICurrentMediaPlaybackItemChangedEventArgs} + RT_CLASS!{class MediaPlaybackItemOpenedEventArgs: IMediaPlaybackItemOpenedEventArgs} + DEFINE_IID!(IID_IMediaPlaybackList2, 235517048, 24586, 17012, 161, 75, 11, 103, 35, 208, 244, 139); + RT_INTERFACE!{interface IMediaPlaybackList2(IMediaPlaybackList2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackList2] { + fn get_MaxPrefetchTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_MaxPrefetchTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_StartingItem(&mut self, out: *mut *mut MediaPlaybackItem) -> HRESULT, + fn put_StartingItem(&mut self, value: *mut MediaPlaybackItem) -> HRESULT, + fn get_ShuffledItems(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn SetShuffledItems(&mut self, value: *mut super::super::foundation::collections::IIterable) -> HRESULT + }} + impl IMediaPlaybackList2 { + #[inline] pub unsafe fn get_max_prefetch_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxPrefetchTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_prefetch_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxPrefetchTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_starting_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StartingItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_starting_item(&mut self, value: &MediaPlaybackItem) -> Result<()> { + let hr = ((*self.lpVtbl).put_StartingItem)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_shuffled_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ShuffledItems)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_shuffled_items(&mut self, value: &super::super::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).SetShuffledItems)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaPlaybackTimedMetadataTrackList, 1924403993, 48123, 18083, 147, 114, 156, 156, 116, 75, 148, 56); + RT_INTERFACE!{interface IMediaPlaybackTimedMetadataTrackList(IMediaPlaybackTimedMetadataTrackListVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackTimedMetadataTrackList] { + fn add_PresentationModeChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PresentationModeChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetPresentationMode(&mut self, index: u32, out: *mut TimedMetadataTrackPresentationMode) -> HRESULT, + fn SetPresentationMode(&mut self, index: u32, value: TimedMetadataTrackPresentationMode) -> HRESULT + }} + impl IMediaPlaybackTimedMetadataTrackList { + #[inline] pub unsafe fn add_presentation_mode_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PresentationModeChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_presentation_mode_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PresentationModeChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_presentation_mode(&mut self, index: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetPresentationMode)(self, index, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_presentation_mode(&mut self, index: u32, value: TimedMetadataTrackPresentationMode) -> Result<()> { + let hr = ((*self.lpVtbl).SetPresentationMode)(self, index, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class TimedMetadataPresentationModeChangedEventArgs: ITimedMetadataPresentationModeChangedEventArgs} + DEFINE_IID!(IID_ITimedMetadataPresentationModeChangedEventArgs, 3512950937, 26079, 17838, 140, 239, 220, 11, 83, 253, 194, 187); + RT_INTERFACE!{interface ITimedMetadataPresentationModeChangedEventArgs(ITimedMetadataPresentationModeChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITimedMetadataPresentationModeChangedEventArgs] { + fn get_Track(&mut self, out: *mut *mut super::core::TimedMetadataTrack) -> HRESULT, + fn get_OldPresentationMode(&mut self, out: *mut TimedMetadataTrackPresentationMode) -> HRESULT, + fn get_NewPresentationMode(&mut self, out: *mut TimedMetadataTrackPresentationMode) -> HRESULT + }} + impl ITimedMetadataPresentationModeChangedEventArgs { + #[inline] pub unsafe fn get_track(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Track)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_old_presentation_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OldPresentationMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_presentation_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewPresentationMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Media.Playback +pub mod playto { // Windows.Media.PlayTo +use ::prelude::*; + DEFINE_IID!(IID_ISourceChangeRequestedEventArgs, 4215224982, 31398, 19083, 134, 231, 84, 246, 198, 211, 79, 100); + RT_INTERFACE!{interface ISourceChangeRequestedEventArgs(ISourceChangeRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISourceChangeRequestedEventArgs] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Stream(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamWithContentType) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Author(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Album(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Genre(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Date(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_Rating(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + }} + impl ISourceChangeRequestedEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Stream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_author(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Author)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_album(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Album)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_genre(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Genre)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_date(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Date)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rating(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Rating)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SourceChangeRequestedEventArgs: ISourceChangeRequestedEventArgs} + DEFINE_IID!(IID_IPlaybackRateChangeRequestedEventArgs, 257319342, 11400, 19658, 133, 64, 213, 134, 9, 93, 19, 165); + RT_INTERFACE!{interface IPlaybackRateChangeRequestedEventArgs(IPlaybackRateChangeRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPlaybackRateChangeRequestedEventArgs] { + fn get_Rate(&mut self, out: *mut f64) -> HRESULT + }} + impl IPlaybackRateChangeRequestedEventArgs { + #[inline] pub unsafe fn get_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Rate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PlaybackRateChangeRequestedEventArgs: IPlaybackRateChangeRequestedEventArgs} + DEFINE_IID!(IID_ICurrentTimeChangeRequestedEventArgs, 2574324516, 60871, 19445, 145, 246, 60, 134, 39, 219, 89, 229); + RT_INTERFACE!{interface ICurrentTimeChangeRequestedEventArgs(ICurrentTimeChangeRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentTimeChangeRequestedEventArgs] { + fn get_Time(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl ICurrentTimeChangeRequestedEventArgs { + #[inline] pub unsafe fn get_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Time)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CurrentTimeChangeRequestedEventArgs: ICurrentTimeChangeRequestedEventArgs} + DEFINE_IID!(IID_IMuteChangeRequestedEventArgs, 3837064694, 44831, 20254, 180, 55, 125, 163, 36, 0, 225, 212); + RT_INTERFACE!{interface IMuteChangeRequestedEventArgs(IMuteChangeRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMuteChangeRequestedEventArgs] { + fn get_Mute(&mut self, out: *mut bool) -> HRESULT + }} + impl IMuteChangeRequestedEventArgs { + #[inline] pub unsafe fn get_mute(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mute)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MuteChangeRequestedEventArgs: IMuteChangeRequestedEventArgs} + DEFINE_IID!(IID_IVolumeChangeRequestedEventArgs, 1862430044, 53109, 19499, 145, 62, 109, 124, 108, 50, 145, 121); + RT_INTERFACE!{interface IVolumeChangeRequestedEventArgs(IVolumeChangeRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVolumeChangeRequestedEventArgs] { + fn get_Volume(&mut self, out: *mut f64) -> HRESULT + }} + impl IVolumeChangeRequestedEventArgs { + #[inline] pub unsafe fn get_volume(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Volume)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class VolumeChangeRequestedEventArgs: IVolumeChangeRequestedEventArgs} + DEFINE_IID!(IID_IPlayToReceiver, 2887110471, 41314, 19110, 175, 27, 58, 163, 95, 59, 144, 105); + RT_INTERFACE!{interface IPlayToReceiver(IPlayToReceiverVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToReceiver] { + fn add_PlayRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlayRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PauseRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PauseRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceChangeRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceChangeRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PlaybackRateChangeRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackRateChangeRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CurrentTimeChangeRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CurrentTimeChangeRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_MuteChangeRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MuteChangeRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VolumeChangeRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VolumeChangeRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_TimeUpdateRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TimeUpdateRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_StopRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StopRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn NotifyVolumeChange(&mut self, volume: f64, mute: bool) -> HRESULT, + fn NotifyRateChange(&mut self, rate: f64) -> HRESULT, + fn NotifyLoadedMetadata(&mut self) -> HRESULT, + fn NotifyTimeUpdate(&mut self, currentTime: super::super::foundation::TimeSpan) -> HRESULT, + fn NotifyDurationChange(&mut self, duration: super::super::foundation::TimeSpan) -> HRESULT, + fn NotifySeeking(&mut self) -> HRESULT, + fn NotifySeeked(&mut self) -> HRESULT, + fn NotifyPaused(&mut self) -> HRESULT, + fn NotifyPlaying(&mut self) -> HRESULT, + fn NotifyEnded(&mut self) -> HRESULT, + fn NotifyError(&mut self) -> HRESULT, + fn NotifyStopped(&mut self) -> HRESULT, + fn get_FriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_FriendlyName(&mut self, value: HSTRING) -> HRESULT, + fn put_SupportsImage(&mut self, value: bool) -> HRESULT, + fn get_SupportsImage(&mut self, out: *mut bool) -> HRESULT, + fn put_SupportsAudio(&mut self, value: bool) -> HRESULT, + fn get_SupportsAudio(&mut self, out: *mut bool) -> HRESULT, + fn put_SupportsVideo(&mut self, value: bool) -> HRESULT, + fn get_SupportsVideo(&mut self, out: *mut bool) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn StartAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StopAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IPlayToReceiver { + #[inline] pub unsafe fn add_play_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PlayRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_play_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PlayRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pause_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PauseRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pause_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PauseRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_change_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceChangeRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_change_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceChangeRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_playback_rate_change_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PlaybackRateChangeRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_playback_rate_change_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PlaybackRateChangeRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_current_time_change_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CurrentTimeChangeRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_current_time_change_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CurrentTimeChangeRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_mute_change_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MuteChangeRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_mute_change_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MuteChangeRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_volume_change_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VolumeChangeRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_volume_change_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VolumeChangeRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_time_update_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TimeUpdateRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_time_update_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TimeUpdateRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stop_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StopRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stop_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StopRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_volume_change(&mut self, volume: f64, mute: bool) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyVolumeChange)(self, volume, mute); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_rate_change(&mut self, rate: f64) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyRateChange)(self, rate); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_loaded_metadata(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyLoadedMetadata)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_time_update(&mut self, currentTime: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyTimeUpdate)(self, currentTime); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_duration_change(&mut self, duration: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyDurationChange)(self, duration); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_seeking(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifySeeking)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_seeked(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifySeeked)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_paused(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyPaused)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_playing(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyPlaying)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_ended(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyEnded)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_error(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyError)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_stopped(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyStopped)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_friendly_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_FriendlyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_supports_image(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SupportsImage)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_supports_image(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportsImage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_supports_audio(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SupportsAudio)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_supports_audio(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportsAudio)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_supports_video(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SupportsVideo)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_supports_video(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportsVideo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayToReceiver: IPlayToReceiver} + DEFINE_IID!(IID_IPlayToSource, 2131986952, 64439, 19209, 131, 86, 170, 95, 78, 51, 92, 49); + RT_INTERFACE!{interface IPlayToSource(IPlayToSourceVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToSource] { + fn get_Connection(&mut self, out: *mut *mut PlayToConnection) -> HRESULT, + fn get_Next(&mut self, out: *mut *mut PlayToSource) -> HRESULT, + fn put_Next(&mut self, value: *mut PlayToSource) -> HRESULT, + fn PlayNext(&mut self) -> HRESULT + }} + impl IPlayToSource { + #[inline] pub unsafe fn get_connection(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Connection)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_next(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Next)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_next(&mut self, value: &PlayToSource) -> Result<()> { + let hr = ((*self.lpVtbl).put_Next)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn play_next(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).PlayNext)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PlayToConnection: IPlayToConnection} + RT_CLASS!{class PlayToSource: IPlayToSource} + DEFINE_IID!(IID_IPlayToSourceWithPreferredSourceUri, 2863813611, 13057, 19908, 175, 186, 178, 242, 237, 150, 53, 160); + RT_INTERFACE!{interface IPlayToSourceWithPreferredSourceUri(IPlayToSourceWithPreferredSourceUriVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToSourceWithPreferredSourceUri] { + fn get_PreferredSourceUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_PreferredSourceUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT + }} + impl IPlayToSourceWithPreferredSourceUri { + #[inline] pub unsafe fn get_preferred_source_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreferredSourceUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_preferred_source_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreferredSourceUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum PlayToConnectionState: i32 { + Disconnected (PlayToConnectionState_Disconnected) = 0, Connected (PlayToConnectionState_Connected) = 1, Rendering (PlayToConnectionState_Rendering) = 2, + }} + DEFINE_IID!(IID_IPlayToConnectionStateChangedEventArgs, 1757721871, 3104, 18816, 134, 2, 88, 198, 34, 56, 212, 35); + RT_INTERFACE!{interface IPlayToConnectionStateChangedEventArgs(IPlayToConnectionStateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToConnectionStateChangedEventArgs] { + fn get_PreviousState(&mut self, out: *mut PlayToConnectionState) -> HRESULT, + fn get_CurrentState(&mut self, out: *mut PlayToConnectionState) -> HRESULT + }} + impl IPlayToConnectionStateChangedEventArgs { + #[inline] pub unsafe fn get_previous_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreviousState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PlayToConnectionStateChangedEventArgs: IPlayToConnectionStateChangedEventArgs} + DEFINE_IID!(IID_IPlayToConnectionTransferredEventArgs, 4209187130, 1667, 18393, 141, 240, 24, 203, 180, 137, 132, 216); + RT_INTERFACE!{interface IPlayToConnectionTransferredEventArgs(IPlayToConnectionTransferredEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToConnectionTransferredEventArgs] { + fn get_PreviousSource(&mut self, out: *mut *mut PlayToSource) -> HRESULT, + fn get_CurrentSource(&mut self, out: *mut *mut PlayToSource) -> HRESULT + }} + impl IPlayToConnectionTransferredEventArgs { + #[inline] pub unsafe fn get_previous_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreviousSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayToConnectionTransferredEventArgs: IPlayToConnectionTransferredEventArgs} + RT_ENUM! { enum PlayToConnectionError: i32 { + None (PlayToConnectionError_None) = 0, DeviceNotResponding (PlayToConnectionError_DeviceNotResponding) = 1, DeviceError (PlayToConnectionError_DeviceError) = 2, DeviceLocked (PlayToConnectionError_DeviceLocked) = 3, ProtectedPlaybackFailed (PlayToConnectionError_ProtectedPlaybackFailed) = 4, + }} + DEFINE_IID!(IID_IPlayToConnectionErrorEventArgs, 3210653094, 35046, 17503, 157, 64, 217, 185, 248, 147, 152, 150); + RT_INTERFACE!{interface IPlayToConnectionErrorEventArgs(IPlayToConnectionErrorEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToConnectionErrorEventArgs] { + fn get_Code(&mut self, out: *mut PlayToConnectionError) -> HRESULT, + fn get_Message(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPlayToConnectionErrorEventArgs { + #[inline] pub unsafe fn get_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayToConnectionErrorEventArgs: IPlayToConnectionErrorEventArgs} + DEFINE_IID!(IID_IPlayToConnection, 288341960, 62005, 20446, 141, 65, 155, 242, 124, 158, 154, 64); + RT_INTERFACE!{interface IPlayToConnection(IPlayToConnectionVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToConnection] { + fn get_State(&mut self, out: *mut PlayToConnectionState) -> HRESULT, + fn add_StateChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Transferred(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Transferred(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Error(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Error(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPlayToConnection { + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_state_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StateChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_state_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_transferred(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Transferred)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_transferred(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Transferred)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_error(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Error)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_error(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Error)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayToSourceSelectedEventArgs, 211649809, 20994, 19915, 140, 103, 171, 218, 18, 187, 60, 18); + RT_INTERFACE!{interface IPlayToSourceSelectedEventArgs(IPlayToSourceSelectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToSourceSelectedEventArgs] { + fn get_FriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Icon(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamWithContentType) -> HRESULT, + fn get_SupportsImage(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportsAudio(&mut self, out: *mut bool) -> HRESULT, + fn get_SupportsVideo(&mut self, out: *mut bool) -> HRESULT + }} + impl IPlayToSourceSelectedEventArgs { + #[inline] pub unsafe fn get_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_icon(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Icon)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supports_image(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportsImage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supports_audio(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportsAudio)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supports_video(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportsVideo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PlayToSourceSelectedEventArgs: IPlayToSourceSelectedEventArgs} + DEFINE_IID!(IID_IPlayToSourceDeferral, 1090554141, 10126, 20265, 133, 155, 169, 229, 1, 5, 62, 125); + RT_INTERFACE!{interface IPlayToSourceDeferral(IPlayToSourceDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToSourceDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IPlayToSourceDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PlayToSourceDeferral: IPlayToSourceDeferral} + DEFINE_IID!(IID_IPlayToSourceRequest, 4166534757, 25844, 17568, 172, 13, 70, 141, 43, 143, 218, 131); + RT_INTERFACE!{interface IPlayToSourceRequest(IPlayToSourceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToSourceRequest] { + fn get_Deadline(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn DisplayErrorString(&mut self, errorString: HSTRING) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut PlayToSourceDeferral) -> HRESULT, + fn SetSource(&mut self, value: *mut PlayToSource) -> HRESULT + }} + impl IPlayToSourceRequest { + #[inline] pub unsafe fn get_deadline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn display_error_string(&mut self, errorString: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).DisplayErrorString)(self, errorString.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_source(&mut self, value: &PlayToSource) -> Result<()> { + let hr = ((*self.lpVtbl).SetSource)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PlayToSourceRequest: IPlayToSourceRequest} + DEFINE_IID!(IID_IPlayToSourceRequestedEventArgs, 3318596400, 10719, 20166, 157, 169, 159, 189, 252, 252, 27, 62); + RT_INTERFACE!{interface IPlayToSourceRequestedEventArgs(IPlayToSourceRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToSourceRequestedEventArgs] { + fn get_SourceRequest(&mut self, out: *mut *mut PlayToSourceRequest) -> HRESULT + }} + impl IPlayToSourceRequestedEventArgs { + #[inline] pub unsafe fn get_source_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceRequest)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayToSourceRequestedEventArgs: IPlayToSourceRequestedEventArgs} + DEFINE_IID!(IID_IPlayToManager, 4117373038, 7031, 17135, 143, 13, 185, 73, 248, 217, 178, 96); + RT_INTERFACE!{interface IPlayToManager(IPlayToManagerVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToManager] { + fn add_SourceRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceSelected(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceSelected(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn put_DefaultSourceSelection(&mut self, value: bool) -> HRESULT, + fn get_DefaultSourceSelection(&mut self, out: *mut bool) -> HRESULT + }} + impl IPlayToManager { + #[inline] pub unsafe fn add_source_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_selected(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceSelected)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_selected(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceSelected)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_source_selection(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultSourceSelection)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_source_selection(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DefaultSourceSelection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PlayToManager: IPlayToManager} + RT_ACTIVATABLE!{IPlayToManagerStatics [CLSID_PlayToManager]} + DEFINE_CLSID!(CLSID_PlayToManager = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,108,97,121,84,111,46,80,108,97,121,84,111,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IPlayToManagerStatics, 1692838023, 14722, 20283, 186, 32, 97, 85, 228, 53, 50, 91); + RT_INTERFACE!{static interface IPlayToManagerStatics(IPlayToManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPlayToManagerStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut PlayToManager) -> HRESULT, + fn ShowPlayToUI(&mut self) -> HRESULT + }} + impl IPlayToManagerStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_play_to_ui(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ShowPlayToUI)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Media.PlayTo +pub mod protection { // Windows.Media.Protection +use ::prelude::*; + RT_CLASS!{class MediaProtectionManager: IMediaProtectionManager} + RT_CLASS!{class ServiceRequestedEventArgs: IServiceRequestedEventArgs} + RT_CLASS!{class ComponentLoadFailedEventArgs: IComponentLoadFailedEventArgs} + RT_CLASS!{class MediaProtectionServiceCompletion: IMediaProtectionServiceCompletion} + RT_CLASS!{class RevocationAndRenewalInformation: IRevocationAndRenewalInformation} + RT_CLASS!{class RevocationAndRenewalItem: IRevocationAndRenewalItem} + RT_CLASS!{class MediaProtectionPMPServer: IMediaProtectionPMPServer [IMediaProtectionPMPServerFactory] [CLSID_MediaProtectionPMPServer]} + DEFINE_CLSID!(CLSID_MediaProtectionPMPServer = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,77,101,100,105,97,80,114,111,116,101,99,116,105,111,110,80,77,80,83,101,114,118,101,114,0]); + DEFINE_IID!(IID_ServiceRequestedEventHandler, 3537277114, 51913, 18657, 149, 192, 211, 132, 149, 168, 64, 85); + RT_DELEGATE!{delegate ServiceRequestedEventHandler(ServiceRequestedEventHandlerVtbl, ServiceRequestedEventHandlerImpl) [IID_ServiceRequestedEventHandler] { + fn Invoke(&mut self, sender: *mut MediaProtectionManager, e: *mut ServiceRequestedEventArgs) -> HRESULT + }} + impl ServiceRequestedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &MediaProtectionManager, e: &ServiceRequestedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_RebootNeededEventHandler, 1692478021, 38715, 19002, 178, 96, 145, 137, 138, 73, 168, 44); + RT_DELEGATE!{delegate RebootNeededEventHandler(RebootNeededEventHandlerVtbl, RebootNeededEventHandlerImpl) [IID_RebootNeededEventHandler] { + fn Invoke(&mut self, sender: *mut MediaProtectionManager) -> HRESULT + }} + impl RebootNeededEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &MediaProtectionManager) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ComponentLoadFailedEventHandler, 2514117692, 28089, 16971, 134, 202, 9, 26, 244, 50, 8, 28); + RT_DELEGATE!{delegate ComponentLoadFailedEventHandler(ComponentLoadFailedEventHandlerVtbl, ComponentLoadFailedEventHandlerImpl) [IID_ComponentLoadFailedEventHandler] { + fn Invoke(&mut self, sender: *mut MediaProtectionManager, e: *mut ComponentLoadFailedEventArgs) -> HRESULT + }} + impl ComponentLoadFailedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &MediaProtectionManager, e: &ComponentLoadFailedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaProtectionManager, 1164527943, 51009, 17227, 167, 158, 71, 76, 18, 217, 61, 47); + RT_INTERFACE!{interface IMediaProtectionManager(IMediaProtectionManagerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaProtectionManager] { + fn add_ServiceRequested(&mut self, handler: *mut ServiceRequestedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServiceRequested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RebootNeeded(&mut self, handler: *mut RebootNeededEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RebootNeeded(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ComponentLoadFailed(&mut self, handler: *mut ComponentLoadFailedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ComponentLoadFailed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + }} + impl IMediaProtectionManager { + #[inline] pub unsafe fn add_service_requested(&mut self, handler: &ServiceRequestedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ServiceRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_service_requested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ServiceRequested)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_reboot_needed(&mut self, handler: &RebootNeededEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RebootNeeded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reboot_needed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RebootNeeded)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_component_load_failed(&mut self, handler: &ComponentLoadFailedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ComponentLoadFailed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_component_load_failed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ComponentLoadFailed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaProtectionServiceCompletion, 2338114072, 53205, 17646, 162, 237, 223, 118, 1, 12, 20, 181); + RT_INTERFACE!{interface IMediaProtectionServiceCompletion(IMediaProtectionServiceCompletionVtbl): IInspectable(IInspectableVtbl) [IID_IMediaProtectionServiceCompletion] { + fn Complete(&mut self, success: bool) -> HRESULT + }} + impl IMediaProtectionServiceCompletion { + #[inline] pub unsafe fn complete(&mut self, success: bool) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self, success); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IServiceRequestedEventArgs, 875051951, 43956, 20417, 189, 137, 147, 241, 6, 87, 58, 73); + RT_INTERFACE!{interface IServiceRequestedEventArgs(IServiceRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IServiceRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut IMediaProtectionServiceRequest) -> HRESULT, + fn get_Completion(&mut self, out: *mut *mut MediaProtectionServiceCompletion) -> HRESULT + }} + impl IServiceRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_completion(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Completion)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaProtectionServiceRequest, 2984119974, 8340, 18317, 135, 164, 139, 149, 32, 15, 133, 198); + RT_INTERFACE!{interface IMediaProtectionServiceRequest(IMediaProtectionServiceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IMediaProtectionServiceRequest] { + fn get_ProtectionSystem(&mut self, out: *mut Guid) -> HRESULT, + fn get_Type(&mut self, out: *mut Guid) -> HRESULT + }} + impl IMediaProtectionServiceRequest { + #[inline] pub unsafe fn get_protection_system(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtectionSystem)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IServiceRequestedEventArgs2, 1430022614, 64254, 16680, 141, 250, 19, 14, 57, 138, 19, 167); + RT_INTERFACE!{interface IServiceRequestedEventArgs2(IServiceRequestedEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IServiceRequestedEventArgs2] { + fn get_MediaPlaybackItem(&mut self, out: *mut *mut super::playback::MediaPlaybackItem) -> HRESULT + }} + impl IServiceRequestedEventArgs2 { + #[inline] pub unsafe fn get_media_playback_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaPlaybackItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IComponentLoadFailedEventArgs, 2509713043, 30534, 16766, 132, 149, 240, 49, 187, 197, 134, 44); + RT_INTERFACE!{interface IComponentLoadFailedEventArgs(IComponentLoadFailedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IComponentLoadFailedEventArgs] { + fn get_Information(&mut self, out: *mut *mut RevocationAndRenewalInformation) -> HRESULT, + fn get_Completion(&mut self, out: *mut *mut MediaProtectionServiceCompletion) -> HRESULT + }} + impl IComponentLoadFailedEventArgs { + #[inline] pub unsafe fn get_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Information)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_completion(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Completion)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRevocationAndRenewalInformation, 4087452539, 9473, 17310, 166, 231, 111, 201, 94, 23, 95, 207); + RT_INTERFACE!{interface IRevocationAndRenewalInformation(IRevocationAndRenewalInformationVtbl): IInspectable(IInspectableVtbl) [IID_IRevocationAndRenewalInformation] { + fn get_Items(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IRevocationAndRenewalInformation { + #[inline] pub unsafe fn get_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Items)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum RevocationAndRenewalReasons: u32 { + UserModeComponentLoad (RevocationAndRenewalReasons_UserModeComponentLoad) = 1, KernelModeComponentLoad (RevocationAndRenewalReasons_KernelModeComponentLoad) = 2, AppComponent (RevocationAndRenewalReasons_AppComponent) = 4, GlobalRevocationListLoadFailed (RevocationAndRenewalReasons_GlobalRevocationListLoadFailed) = 16, InvalidGlobalRevocationListSignature (RevocationAndRenewalReasons_InvalidGlobalRevocationListSignature) = 32, GlobalRevocationListAbsent (RevocationAndRenewalReasons_GlobalRevocationListAbsent) = 4096, ComponentRevoked (RevocationAndRenewalReasons_ComponentRevoked) = 8192, InvalidComponentCertificateExtendedKeyUse (RevocationAndRenewalReasons_InvalidComponentCertificateExtendedKeyUse) = 16384, ComponentCertificateRevoked (RevocationAndRenewalReasons_ComponentCertificateRevoked) = 32768, InvalidComponentCertificateRoot (RevocationAndRenewalReasons_InvalidComponentCertificateRoot) = 65536, ComponentHighSecurityCertificateRevoked (RevocationAndRenewalReasons_ComponentHighSecurityCertificateRevoked) = 131072, ComponentLowSecurityCertificateRevoked (RevocationAndRenewalReasons_ComponentLowSecurityCertificateRevoked) = 262144, BootDriverVerificationFailed (RevocationAndRenewalReasons_BootDriverVerificationFailed) = 1048576, ComponentSignedWithTestCertificate (RevocationAndRenewalReasons_ComponentSignedWithTestCertificate) = 16777216, EncryptionFailure (RevocationAndRenewalReasons_EncryptionFailure) = 268435456, + }} + DEFINE_IID!(IID_IRevocationAndRenewalItem, 815383052, 15600, 18922, 144, 45, 202, 243, 45, 45, 222, 44); + RT_INTERFACE!{interface IRevocationAndRenewalItem(IRevocationAndRenewalItemVtbl): IInspectable(IInspectableVtbl) [IID_IRevocationAndRenewalItem] { + fn get_Reasons(&mut self, out: *mut RevocationAndRenewalReasons) -> HRESULT, + fn get_HeaderHash(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PublicKeyHash(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RenewalId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IRevocationAndRenewalItem { + #[inline] pub unsafe fn get_reasons(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reasons)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_hash(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderHash)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_public_key_hash(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PublicKeyHash)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_renewal_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RenewalId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum GraphicsTrustStatus: i32 { + TrustNotRequired (GraphicsTrustStatus_TrustNotRequired) = 0, TrustEstablished (GraphicsTrustStatus_TrustEstablished) = 1, EnvironmentNotSupported (GraphicsTrustStatus_EnvironmentNotSupported) = 2, DriverNotSupported (GraphicsTrustStatus_DriverNotSupported) = 3, DriverSigningFailure (GraphicsTrustStatus_DriverSigningFailure) = 4, UnknownFailure (GraphicsTrustStatus_UnknownFailure) = 5, + }} + DEFINE_IID!(IID_IMediaProtectionPMPServerFactory, 1613532766, 63442, 18558, 175, 145, 219, 196, 37, 43, 33, 130); + RT_INTERFACE!{static interface IMediaProtectionPMPServerFactory(IMediaProtectionPMPServerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMediaProtectionPMPServerFactory] { + fn CreatePMPServer(&mut self, pProperties: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut MediaProtectionPMPServer) -> HRESULT + }} + impl IMediaProtectionPMPServerFactory { + #[inline] pub unsafe fn create_pmpserver(&mut self, pProperties: &super::super::foundation::collections::IPropertySet) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePMPServer)(self, pProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaProtectionPMPServer, 202445350, 31526, 19761, 149, 187, 156, 27, 8, 239, 127, 192); + RT_INTERFACE!{interface IMediaProtectionPMPServer(IMediaProtectionPMPServerVtbl): IInspectable(IInspectableVtbl) [IID_IMediaProtectionPMPServer] { + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + }} + impl IMediaProtectionPMPServer { + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum ProtectionCapabilityResult: i32 { + NotSupported (ProtectionCapabilityResult_NotSupported) = 0, Maybe (ProtectionCapabilityResult_Maybe) = 1, Probably (ProtectionCapabilityResult_Probably) = 2, + }} + DEFINE_IID!(IID_IProtectionCapabilities, 3349962110, 29824, 19753, 164, 100, 123, 205, 145, 61, 216, 228); + RT_INTERFACE!{interface IProtectionCapabilities(IProtectionCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IProtectionCapabilities] { + fn IsTypeSupported(&mut self, type_: HSTRING, keySystem: HSTRING, out: *mut ProtectionCapabilityResult) -> HRESULT + }} + impl IProtectionCapabilities { + #[inline] pub unsafe fn is_type_supported(&mut self, type_: &HStringArg, keySystem: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsTypeSupported)(self, type_.get(), keySystem.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class ProtectionCapabilities: IProtectionCapabilities} + RT_ENUM! { enum HdcpProtection: i32 { + Off (HdcpProtection_Off) = 0, On (HdcpProtection_On) = 1, OnWithTypeEnforcement (HdcpProtection_OnWithTypeEnforcement) = 2, + }} + RT_ENUM! { enum HdcpSetProtectionResult: i32 { + Success (HdcpSetProtectionResult_Success) = 0, TimedOut (HdcpSetProtectionResult_TimedOut) = 1, NotSupported (HdcpSetProtectionResult_NotSupported) = 2, UnknownFailure (HdcpSetProtectionResult_UnknownFailure) = 3, + }} + DEFINE_IID!(IID_IHdcpSession, 1904756201, 25815, 17005, 128, 155, 27, 228, 97, 148, 26, 42); + RT_INTERFACE!{interface IHdcpSession(IHdcpSessionVtbl): IInspectable(IInspectableVtbl) [IID_IHdcpSession] { + fn IsEffectiveProtectionAtLeast(&mut self, protection: HdcpProtection, out: *mut bool) -> HRESULT, + fn GetEffectiveProtection(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn SetDesiredMinProtectionAsync(&mut self, protection: HdcpProtection, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_ProtectionChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProtectionChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IHdcpSession { + #[inline] pub unsafe fn is_effective_protection_at_least(&mut self, protection: HdcpProtection) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEffectiveProtectionAtLeast)(self, protection, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_effective_protection(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetEffectiveProtection)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_min_protection_async(&mut self, protection: HdcpProtection) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetDesiredMinProtectionAsync)(self, protection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_protection_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ProtectionChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_protection_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ProtectionChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class HdcpSession: IHdcpSession} + RT_STRUCT! { struct ProtectionRenewalContract { + + }} + RT_ACTIVATABLE!{IComponentRenewalStatics [CLSID_ComponentRenewal]} + DEFINE_CLSID!(CLSID_ComponentRenewal = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,67,111,109,112,111,110,101,110,116,82,101,110,101,119,97,108,0]); + RT_ENUM! { enum RenewalStatus: i32 { + NotStarted (RenewalStatus_NotStarted) = 0, UpdatesInProgress (RenewalStatus_UpdatesInProgress) = 1, UserCancelled (RenewalStatus_UserCancelled) = 2, AppComponentsMayNeedUpdating (RenewalStatus_AppComponentsMayNeedUpdating) = 3, NoComponentsFound (RenewalStatus_NoComponentsFound) = 4, + }} + DEFINE_IID!(IID_IComponentRenewalStatics, 1878773095, 46997, 18629, 139, 123, 167, 196, 239, 226, 2, 227); + RT_INTERFACE!{static interface IComponentRenewalStatics(IComponentRenewalStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IComponentRenewalStatics] { + fn RenewSystemComponentsAsync(&mut self, information: *mut RevocationAndRenewalInformation, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IComponentRenewalStatics { + #[inline] pub unsafe fn renew_system_components_async(&mut self, information: &RevocationAndRenewalInformation) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RenewSystemComponentsAsync)(self, information as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +pub mod playready { // Windows.Media.Protection.PlayReady +use ::prelude::*; + RT_ENUM! { enum PlayReadyDecryptorSetup: i32 { + Uninitialized (PlayReadyDecryptorSetup_Uninitialized) = 0, OnDemand (PlayReadyDecryptorSetup_OnDemand) = 1, + }} + RT_ENUM! { enum PlayReadyEncryptionAlgorithm: i32 { + Unprotected (PlayReadyEncryptionAlgorithm_Unprotected) = 0, Aes128Ctr (PlayReadyEncryptionAlgorithm_Aes128Ctr) = 1, Cocktail (PlayReadyEncryptionAlgorithm_Cocktail) = 4, Uninitialized (PlayReadyEncryptionAlgorithm_Uninitialized) = 2147483647, + }} + DEFINE_IID!(IID_IPlayReadyContentHeader, 2588117610, 32588, 17710, 136, 189, 1, 72, 198, 56, 122, 44); + RT_INTERFACE!{interface IPlayReadyContentHeader(IPlayReadyContentHeaderVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyContentHeader] { + fn get_KeyId(&mut self, out: *mut Guid) -> HRESULT, + fn get_KeyIdString(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LicenseAcquisitionUrl(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_LicenseAcquisitionUserInterfaceUrl(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_DomainServiceId(&mut self, out: *mut Guid) -> HRESULT, + fn get_EncryptionType(&mut self, out: *mut PlayReadyEncryptionAlgorithm) -> HRESULT, + fn get_CustomAttributes(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DecryptorSetup(&mut self, out: *mut PlayReadyDecryptorSetup) -> HRESULT, + fn GetSerializedHeader(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn get_HeaderWithEmbeddedUpdates(&mut self, out: *mut *mut PlayReadyContentHeader) -> HRESULT + }} + impl IPlayReadyContentHeader { + #[inline] pub unsafe fn get_key_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_id_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyIdString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_license_acquisition_url(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LicenseAcquisitionUrl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_license_acquisition_user_interface_url(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LicenseAcquisitionUserInterfaceUrl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_service_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DomainServiceId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_encryption_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EncryptionType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_attributes(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomAttributes)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_decryptor_setup(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DecryptorSetup)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_serialized_header(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSerializedHeader)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_with_embedded_updates(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderWithEmbeddedUpdates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayReadyContentHeader: IPlayReadyContentHeader [IPlayReadyContentHeaderFactory] [CLSID_PlayReadyContentHeader]} + DEFINE_CLSID!(CLSID_PlayReadyContentHeader = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,80,108,97,121,82,101,97,100,121,67,111,110,116,101,110,116,72,101,97,100,101,114,0]); + DEFINE_IID!(IID_IPlayReadyContentHeaderFactory, 3415722239, 46936, 18294, 191, 1, 33, 122, 139, 81, 11, 44); + RT_INTERFACE!{static interface IPlayReadyContentHeaderFactory(IPlayReadyContentHeaderFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyContentHeaderFactory] { + fn CreateInstanceFromWindowsMediaDrmHeader(&mut self, headerBytesSize: u32, headerBytes: *mut u8, licenseAcquisitionUrl: *mut ::rt::gen::windows::foundation::Uri, licenseAcquisitionUserInterfaceUrl: *mut ::rt::gen::windows::foundation::Uri, customAttributes: HSTRING, domainServiceId: Guid, out: *mut *mut PlayReadyContentHeader) -> HRESULT, + fn CreateInstanceFromComponents(&mut self, contentKeyId: Guid, contentKeyIdString: HSTRING, contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: *mut ::rt::gen::windows::foundation::Uri, licenseAcquisitionUserInterfaceUrl: *mut ::rt::gen::windows::foundation::Uri, customAttributes: HSTRING, domainServiceId: Guid, out: *mut *mut PlayReadyContentHeader) -> HRESULT, + fn CreateInstanceFromPlayReadyHeader(&mut self, headerBytesSize: u32, headerBytes: *mut u8, out: *mut *mut PlayReadyContentHeader) -> HRESULT + }} + impl IPlayReadyContentHeaderFactory { + #[inline] pub unsafe fn create_instance_from_windows_media_drm_header(&mut self, headerBytes: &[u8], licenseAcquisitionUrl: &::rt::gen::windows::foundation::Uri, licenseAcquisitionUserInterfaceUrl: &::rt::gen::windows::foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstanceFromWindowsMediaDrmHeader)(self, headerBytes.len() as u32, headerBytes.as_ptr() as *mut _, licenseAcquisitionUrl as *const _ as *mut _, licenseAcquisitionUserInterfaceUrl as *const _ as *mut _, customAttributes.get(), domainServiceId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_instance_from_components(&mut self, contentKeyId: Guid, contentKeyIdString: &HStringArg, contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: &::rt::gen::windows::foundation::Uri, licenseAcquisitionUserInterfaceUrl: &::rt::gen::windows::foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstanceFromComponents)(self, contentKeyId, contentKeyIdString.get(), contentEncryptionAlgorithm, licenseAcquisitionUrl as *const _ as *mut _, licenseAcquisitionUserInterfaceUrl as *const _ as *mut _, customAttributes.get(), domainServiceId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_instance_from_play_ready_header(&mut self, headerBytes: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstanceFromPlayReadyHeader)(self, headerBytes.len() as u32, headerBytes.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayReadyContentHeader2, 899447284, 8576, 18828, 150, 91, 231, 84, 216, 117, 234, 178); + RT_INTERFACE!{interface IPlayReadyContentHeader2(IPlayReadyContentHeader2Vtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyContentHeader2] { + fn get_KeyIds(&mut self, outSize: *mut u32, out: *mut *mut Guid) -> HRESULT, + fn get_KeyIdStrings(&mut self, outSize: *mut u32, out: *mut *mut HSTRING) -> HRESULT + }} + impl IPlayReadyContentHeader2 { + #[inline] pub unsafe fn get_key_ids(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyIds)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_id_strings(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyIdStrings)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayReadyContentHeaderFactory2, 3508772085, 44653, 18296, 151, 253, 110, 58, 46, 234, 219, 235); + RT_INTERFACE!{interface IPlayReadyContentHeaderFactory2(IPlayReadyContentHeaderFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyContentHeaderFactory2] { + fn CreateInstanceFromComponents2(&mut self, dwFlags: u32, contentKeyIdsSize: u32, contentKeyIds: *mut Guid, contentKeyIdStringsSize: u32, contentKeyIdStrings: *mut HSTRING, contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: *mut ::rt::gen::windows::foundation::Uri, licenseAcquisitionUserInterfaceUrl: *mut ::rt::gen::windows::foundation::Uri, customAttributes: HSTRING, domainServiceId: Guid, out: *mut *mut PlayReadyContentHeader) -> HRESULT + }} + impl IPlayReadyContentHeaderFactory2 { + #[inline] pub unsafe fn create_instance_from_components2(&mut self, dwFlags: u32, contentKeyIds: &[Guid], contentKeyIdStrings: &[&HStringArg], contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: &::rt::gen::windows::foundation::Uri, licenseAcquisitionUserInterfaceUrl: &::rt::gen::windows::foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstanceFromComponents2)(self, dwFlags, contentKeyIds.len() as u32, contentKeyIds.as_ptr() as *mut _, contentKeyIdStrings.len() as u32, contentKeyIdStrings.as_ptr() as *mut _, contentEncryptionAlgorithm, licenseAcquisitionUrl as *const _ as *mut _, licenseAcquisitionUserInterfaceUrl as *const _ as *mut _, customAttributes.get(), domainServiceId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayReadySoapMessage: IPlayReadySoapMessage} + DEFINE_IID!(IID_IPlayReadyContentResolver, 4227671331, 36973, 18818, 166, 184, 104, 73, 86, 90, 124, 232); + RT_INTERFACE!{static interface IPlayReadyContentResolver(IPlayReadyContentResolverVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyContentResolver] { + fn ServiceRequest(&mut self, contentHeader: *mut PlayReadyContentHeader, out: *mut *mut IPlayReadyServiceRequest) -> HRESULT + }} + impl IPlayReadyContentResolver { + #[inline] pub unsafe fn service_request(&mut self, contentHeader: &PlayReadyContentHeader) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ServiceRequest)(self, contentHeader as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPlayReadyContentResolver [CLSID_PlayReadyContentResolver]} + DEFINE_CLSID!(CLSID_PlayReadyContentResolver = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,80,108,97,121,82,101,97,100,121,67,111,110,116,101,110,116,82,101,115,111,108,118,101,114,0]); + RT_CLASS!{class PlayReadyIndividualizationServiceRequest: IPlayReadyIndividualizationServiceRequest} + RT_CLASS!{class PlayReadyDomainJoinServiceRequest: IPlayReadyDomainJoinServiceRequest} + RT_CLASS!{class PlayReadyDomainLeaveServiceRequest: IPlayReadyDomainLeaveServiceRequest} + RT_CLASS!{class PlayReadyLicenseAcquisitionServiceRequest: IPlayReadyLicenseAcquisitionServiceRequest} + RT_CLASS!{class PlayReadyMeteringReportServiceRequest: IPlayReadyMeteringReportServiceRequest} + RT_CLASS!{class PlayReadyRevocationServiceRequest: IPlayReadyRevocationServiceRequest} + DEFINE_IID!(IID_IPlayReadyLicenseManagement, 2867536193, 2391, 17413, 184, 146, 139, 243, 236, 93, 173, 217); + RT_INTERFACE!{static interface IPlayReadyLicenseManagement(IPlayReadyLicenseManagementVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyLicenseManagement] { + fn DeleteLicenses(&mut self, contentHeader: *mut PlayReadyContentHeader, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IPlayReadyLicenseManagement { + #[inline] pub unsafe fn delete_licenses(&mut self, contentHeader: &PlayReadyContentHeader) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteLicenses)(self, contentHeader as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPlayReadyLicenseManagement [CLSID_PlayReadyLicenseManagement]} + DEFINE_CLSID!(CLSID_PlayReadyLicenseManagement = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,80,108,97,121,82,101,97,100,121,76,105,99,101,110,115,101,77,97,110,97,103,101,109,101,110,116,0]); + DEFINE_IID!(IID_IPlayReadyLicense, 3997649998, 64060, 16717, 169, 242, 63, 252, 30, 248, 50, 212); + RT_INTERFACE!{interface IPlayReadyLicense(IPlayReadyLicenseVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyLicense] { + fn get_FullyEvaluated(&mut self, out: *mut bool) -> HRESULT, + fn get_UsableForPlay(&mut self, out: *mut bool) -> HRESULT, + fn get_ExpirationDate(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_ExpireAfterFirstPlay(&mut self, out: *mut u32) -> HRESULT, + fn get_DomainAccountID(&mut self, out: *mut Guid) -> HRESULT, + fn get_ChainDepth(&mut self, out: *mut u32) -> HRESULT, + fn GetKIDAtChainDepth(&mut self, chainDepth: u32, out: *mut Guid) -> HRESULT + }} + impl IPlayReadyLicense { + #[inline] pub unsafe fn get_fully_evaluated(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FullyEvaluated)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usable_for_play(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UsableForPlay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_expire_after_first_play(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExpireAfterFirstPlay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_account_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DomainAccountID)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_chain_depth(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ChainDepth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_kidat_chain_depth(&mut self, chainDepth: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetKIDAtChainDepth)(self, chainDepth, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PlayReadyLicense: IPlayReadyLicense} + DEFINE_IID!(IID_IPlayReadyLicenseIterableFactory, 3558317832, 2103, 18808, 142, 104, 190, 66, 147, 200, 215, 166); + RT_INTERFACE!{static interface IPlayReadyLicenseIterableFactory(IPlayReadyLicenseIterableFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyLicenseIterableFactory] { + fn CreateInstance(&mut self, contentHeader: *mut PlayReadyContentHeader, fullyEvaluated: bool, out: *mut *mut PlayReadyLicenseIterable) -> HRESULT + }} + impl IPlayReadyLicenseIterableFactory { + #[inline] pub unsafe fn create_instance(&mut self, contentHeader: &PlayReadyContentHeader, fullyEvaluated: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, contentHeader as *const _ as *mut _, fullyEvaluated, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayReadyLicenseIterable: ::rt::gen::windows::foundation::collections::IIterable [IPlayReadyLicenseIterableFactory] [CLSID_PlayReadyLicenseIterable]} + DEFINE_CLSID!(CLSID_PlayReadyLicenseIterable = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,80,108,97,121,82,101,97,100,121,76,105,99,101,110,115,101,73,116,101,114,97,98,108,101,0]); + RT_CLASS!{class PlayReadyLicenseIterator: ::rt::gen::windows::foundation::collections::IIterator} + DEFINE_IID!(IID_IPlayReadyDomain, 2915865516, 38886, 17391, 149, 228, 215, 134, 143, 59, 22, 169); + RT_INTERFACE!{interface IPlayReadyDomain(IPlayReadyDomainVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyDomain] { + fn get_AccountId(&mut self, out: *mut Guid) -> HRESULT, + fn get_ServiceId(&mut self, out: *mut Guid) -> HRESULT, + fn get_Revision(&mut self, out: *mut u32) -> HRESULT, + fn get_FriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DomainJoinUrl(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT + }} + impl IPlayReadyDomain { + #[inline] pub unsafe fn get_account_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AccountId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_revision(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Revision)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_join_url(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DomainJoinUrl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayReadyDomain: IPlayReadyDomain} + DEFINE_IID!(IID_IPlayReadyDomainIterableFactory, 1307804910, 12577, 19955, 165, 232, 208, 194, 76, 5, 0, 252); + RT_INTERFACE!{static interface IPlayReadyDomainIterableFactory(IPlayReadyDomainIterableFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyDomainIterableFactory] { + fn CreateInstance(&mut self, domainAccountId: Guid, out: *mut *mut PlayReadyDomainIterable) -> HRESULT + }} + impl IPlayReadyDomainIterableFactory { + #[inline] pub unsafe fn create_instance(&mut self, domainAccountId: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, domainAccountId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayReadyDomainIterable: ::rt::gen::windows::foundation::collections::IIterable [IPlayReadyDomainIterableFactory] [CLSID_PlayReadyDomainIterable]} + DEFINE_CLSID!(CLSID_PlayReadyDomainIterable = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,80,108,97,121,82,101,97,100,121,68,111,109,97,105,110,73,116,101,114,97,98,108,101,0]); + RT_CLASS!{class PlayReadyDomainIterator: ::rt::gen::windows::foundation::collections::IIterator} + DEFINE_IID!(IID_IPlayReadyStatics, 1583988749, 9340, 18074, 143, 49, 92, 26, 21, 113, 217, 198); + RT_INTERFACE!{static interface IPlayReadyStatics(IPlayReadyStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyStatics] { + fn get_DomainJoinServiceRequestType(&mut self, out: *mut Guid) -> HRESULT, + fn get_DomainLeaveServiceRequestType(&mut self, out: *mut Guid) -> HRESULT, + fn get_IndividualizationServiceRequestType(&mut self, out: *mut Guid) -> HRESULT, + fn get_LicenseAcquirerServiceRequestType(&mut self, out: *mut Guid) -> HRESULT, + fn get_MeteringReportServiceRequestType(&mut self, out: *mut Guid) -> HRESULT, + fn get_RevocationServiceRequestType(&mut self, out: *mut Guid) -> HRESULT, + fn get_MediaProtectionSystemId(&mut self, out: *mut Guid) -> HRESULT, + fn get_PlayReadySecurityVersion(&mut self, out: *mut u32) -> HRESULT + }} + impl IPlayReadyStatics { + #[inline] pub unsafe fn get_domain_join_service_request_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DomainJoinServiceRequestType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_leave_service_request_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DomainLeaveServiceRequestType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_individualization_service_request_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IndividualizationServiceRequestType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_license_acquirer_service_request_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LicenseAcquirerServiceRequestType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_metering_report_service_request_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MeteringReportServiceRequestType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_revocation_service_request_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RevocationServiceRequestType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_protection_system_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediaProtectionSystemId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_play_ready_security_version(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PlayReadySecurityVersion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayReadyStatics2, 529361554, 24474, 16958, 148, 102, 179, 57, 105, 175, 122, 61); + RT_INTERFACE!{static interface IPlayReadyStatics2(IPlayReadyStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyStatics2] { + fn get_PlayReadyCertificateSecurityLevel(&mut self, out: *mut u32) -> HRESULT + }} + impl IPlayReadyStatics2 { + #[inline] pub unsafe fn get_play_ready_certificate_security_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PlayReadyCertificateSecurityLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum PlayReadyHardwareDRMFeatures: i32 { + HardwareDRM (PlayReadyHardwareDRMFeatures_HardwareDRM) = 1, HEVC (PlayReadyHardwareDRMFeatures_HEVC) = 2, + }} + DEFINE_IID!(IID_IPlayReadyStatics3, 1067663217, 11731, 19437, 174, 73, 247, 20, 142, 99, 231, 16); + RT_INTERFACE!{static interface IPlayReadyStatics3(IPlayReadyStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyStatics3] { + fn get_SecureStopServiceRequestType(&mut self, out: *mut Guid) -> HRESULT, + fn CheckSupportedHardware(&mut self, hwdrmFeature: PlayReadyHardwareDRMFeatures, out: *mut bool) -> HRESULT + }} + impl IPlayReadyStatics3 { + #[inline] pub unsafe fn get_secure_stop_service_request_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SecureStopServiceRequestType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn check_supported_hardware(&mut self, hwdrmFeature: PlayReadyHardwareDRMFeatures) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CheckSupportedHardware)(self, hwdrmFeature, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayReadyStatics4, 1353257728, 55332, 16945, 157, 94, 120, 239, 136, 68, 199, 215); + RT_INTERFACE!{static interface IPlayReadyStatics4(IPlayReadyStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyStatics4] { + fn get_InputTrustAuthorityToCreate(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ProtectionSystemId(&mut self, out: *mut Guid) -> HRESULT + }} + impl IPlayReadyStatics4 { + #[inline] pub unsafe fn get_input_trust_authority_to_create(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputTrustAuthorityToCreate)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_protection_system_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtectionSystemId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPlayReadyStatics [CLSID_PlayReadyStatics]} + RT_ACTIVATABLE!{IPlayReadyStatics2 [CLSID_PlayReadyStatics]} + RT_ACTIVATABLE!{IPlayReadyStatics3 [CLSID_PlayReadyStatics]} + RT_ACTIVATABLE!{IPlayReadyStatics4 [CLSID_PlayReadyStatics]} + DEFINE_CLSID!(CLSID_PlayReadyStatics = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,80,108,97,121,82,101,97,100,121,83,116,97,116,105,99,115,0]); + DEFINE_IID!(IID_IPlayReadySecureStopServiceRequestFactory, 239373001, 59006, 18766, 159, 73, 98, 133, 67, 140, 118, 207); + RT_INTERFACE!{static interface IPlayReadySecureStopServiceRequestFactory(IPlayReadySecureStopServiceRequestFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadySecureStopServiceRequestFactory] { + fn CreateInstance(&mut self, publisherCertBytesSize: u32, publisherCertBytes: *mut u8, out: *mut *mut PlayReadySecureStopServiceRequest) -> HRESULT, + fn CreateInstanceFromSessionID(&mut self, sessionID: Guid, publisherCertBytesSize: u32, publisherCertBytes: *mut u8, out: *mut *mut PlayReadySecureStopServiceRequest) -> HRESULT + }} + impl IPlayReadySecureStopServiceRequestFactory { + #[inline] pub unsafe fn create_instance(&mut self, publisherCertBytes: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, publisherCertBytes.len() as u32, publisherCertBytes.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_instance_from_session_id(&mut self, sessionID: Guid, publisherCertBytes: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstanceFromSessionID)(self, sessionID, publisherCertBytes.len() as u32, publisherCertBytes.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayReadySecureStopServiceRequest: IPlayReadySecureStopServiceRequest [IPlayReadySecureStopServiceRequestFactory] [CLSID_PlayReadySecureStopServiceRequest]} + DEFINE_CLSID!(CLSID_PlayReadySecureStopServiceRequest = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,80,108,97,121,82,101,97,100,121,83,101,99,117,114,101,83,116,111,112,83,101,114,118,105,99,101,82,101,113,117,101,115,116,0]); + DEFINE_IID!(IID_IPlayReadySecureStopIterableFactory, 1595867493, 16916, 19870, 129, 235, 232, 159, 157, 41, 74, 238); + RT_INTERFACE!{static interface IPlayReadySecureStopIterableFactory(IPlayReadySecureStopIterableFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadySecureStopIterableFactory] { + fn CreateInstance(&mut self, publisherCertBytesSize: u32, publisherCertBytes: *mut u8, out: *mut *mut PlayReadySecureStopIterable) -> HRESULT + }} + impl IPlayReadySecureStopIterableFactory { + #[inline] pub unsafe fn create_instance(&mut self, publisherCertBytes: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, publisherCertBytes.len() as u32, publisherCertBytes.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayReadySecureStopIterable: ::rt::gen::windows::foundation::collections::IIterable [IPlayReadySecureStopIterableFactory] [CLSID_PlayReadySecureStopIterable]} + DEFINE_CLSID!(CLSID_PlayReadySecureStopIterable = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,80,108,97,121,82,101,97,100,121,83,101,99,117,114,101,83,116,111,112,73,116,101,114,97,98,108,101,0]); + RT_CLASS!{class PlayReadySecureStopIterator: ::rt::gen::windows::foundation::collections::IIterator} + DEFINE_IID!(IID_IPlayReadySoapMessage, 3059350709, 52801, 16826, 138, 13, 97, 223, 95, 255, 161, 57); + RT_INTERFACE!{interface IPlayReadySoapMessage(IPlayReadySoapMessageVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadySoapMessage] { + fn GetMessageBody(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn get_MessageHeaders(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IPropertySet) -> HRESULT, + fn get_Uri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT + }} + impl IPlayReadySoapMessage { + #[inline] pub unsafe fn get_message_body(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMessageBody)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_message_headers(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MessageHeaders)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum PlayReadyITADataFormat: i32 { + SerializedProperties (PlayReadyITADataFormat_SerializedProperties) = 0, SerializedProperties_WithContentProtectionWrapper (PlayReadyITADataFormat_SerializedProperties_WithContentProtectionWrapper) = 1, + }} + DEFINE_IID!(IID_IPlayReadyITADataGenerator, 608463758, 4281, 17712, 178, 91, 144, 26, 128, 41, 169, 178); + RT_INTERFACE!{interface IPlayReadyITADataGenerator(IPlayReadyITADataGeneratorVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyITADataGenerator] { + fn GenerateData(&mut self, guidCPSystemId: Guid, countOfStreams: u32, configuration: *mut ::rt::gen::windows::foundation::collections::IPropertySet, format: PlayReadyITADataFormat, outSize: *mut u32, out: *mut *mut u8) -> HRESULT + }} + impl IPlayReadyITADataGenerator { + #[inline] pub unsafe fn generate_data(&mut self, guidCPSystemId: Guid, countOfStreams: u32, configuration: &::rt::gen::windows::foundation::collections::IPropertySet, format: PlayReadyITADataFormat) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).GenerateData)(self, guidCPSystemId, countOfStreams, configuration as *const _ as *mut _, format, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayReadyITADataGenerator: IPlayReadyITADataGenerator} + DEFINE_IID!(IID_IPlayReadyLicenseSession, 2708617785, 34810, 20445, 171, 187, 169, 114, 14, 132, 82, 89); + RT_INTERFACE!{interface IPlayReadyLicenseSession(IPlayReadyLicenseSessionVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyLicenseSession] { + fn CreateLAServiceRequest(&mut self, out: *mut *mut IPlayReadyLicenseAcquisitionServiceRequest) -> HRESULT, + fn ConfigureMediaProtectionManager(&mut self, mpm: *mut super::MediaProtectionManager) -> HRESULT + }} + impl IPlayReadyLicenseSession { + #[inline] pub unsafe fn create_laservice_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateLAServiceRequest)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn configure_media_protection_manager(&mut self, mpm: &super::MediaProtectionManager) -> Result<()> { + let hr = ((*self.lpVtbl).ConfigureMediaProtectionManager)(self, mpm as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayReadyLicenseSessionFactory, 1648961177, 25895, 17054, 152, 190, 72, 215, 152, 172, 39, 57); + RT_INTERFACE!{static interface IPlayReadyLicenseSessionFactory(IPlayReadyLicenseSessionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyLicenseSessionFactory] { + fn CreateInstance(&mut self, configuration: *mut ::rt::gen::windows::foundation::collections::IPropertySet, out: *mut *mut PlayReadyLicenseSession) -> HRESULT + }} + impl IPlayReadyLicenseSessionFactory { + #[inline] pub unsafe fn create_instance(&mut self, configuration: &::rt::gen::windows::foundation::collections::IPropertySet) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, configuration as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PlayReadyLicenseSession: IPlayReadyLicenseSession [IPlayReadyLicenseSessionFactory] [CLSID_PlayReadyLicenseSession]} + DEFINE_CLSID!(CLSID_PlayReadyLicenseSession = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,80,108,97,121,82,101,97,100,121,76,105,99,101,110,115,101,83,101,115,115,105,111,110,0]); + RT_ENUM! { enum NDCertificateType: i32 { + Unknown (NDCertificateType_Unknown) = 0, PC (NDCertificateType_PC) = 1, Device (NDCertificateType_Device) = 2, Domain (NDCertificateType_Domain) = 3, Issuer (NDCertificateType_Issuer) = 4, CrlSigner (NDCertificateType_CrlSigner) = 5, Service (NDCertificateType_Service) = 6, Silverlight (NDCertificateType_Silverlight) = 7, Application (NDCertificateType_Application) = 8, Metering (NDCertificateType_Metering) = 9, KeyFileSigner (NDCertificateType_KeyFileSigner) = 10, Server (NDCertificateType_Server) = 11, LicenseSigner (NDCertificateType_LicenseSigner) = 12, + }} + RT_ENUM! { enum NDCertificatePlatformID: i32 { + Windows (NDCertificatePlatformID_Windows) = 0, OSX (NDCertificatePlatformID_OSX) = 1, WindowsOnARM (NDCertificatePlatformID_WindowsOnARM) = 2, WindowsMobile7 (NDCertificatePlatformID_WindowsMobile7) = 5, iOSOnARM (NDCertificatePlatformID_iOSOnARM) = 6, XBoxOnPPC (NDCertificatePlatformID_XBoxOnPPC) = 7, WindowsPhone8OnARM (NDCertificatePlatformID_WindowsPhone8OnARM) = 8, WindowsPhone8OnX86 (NDCertificatePlatformID_WindowsPhone8OnX86) = 9, XboxOne (NDCertificatePlatformID_XboxOne) = 10, AndroidOnARM (NDCertificatePlatformID_AndroidOnARM) = 11, WindowsPhone81OnARM (NDCertificatePlatformID_WindowsPhone81OnARM) = 12, WindowsPhone81OnX86 (NDCertificatePlatformID_WindowsPhone81OnX86) = 13, + }} + RT_ENUM! { enum NDCertificateFeature: i32 { + Transmitter (NDCertificateFeature_Transmitter) = 1, Receiver (NDCertificateFeature_Receiver) = 2, SharedCertificate (NDCertificateFeature_SharedCertificate) = 3, SecureClock (NDCertificateFeature_SecureClock) = 4, AntiRollBackClock (NDCertificateFeature_AntiRollBackClock) = 5, CRLS (NDCertificateFeature_CRLS) = 9, PlayReady3Features (NDCertificateFeature_PlayReady3Features) = 13, + }} + RT_ENUM! { enum NDProximityDetectionType: i32 { + UDP (NDProximityDetectionType_UDP) = 1, TCP (NDProximityDetectionType_TCP) = 2, TransportAgnostic (NDProximityDetectionType_TransportAgnostic) = 4, + }} + RT_ENUM! { enum NDMediaStreamType: i32 { + Audio (NDMediaStreamType_Audio) = 1, Video (NDMediaStreamType_Video) = 2, + }} + RT_ENUM! { enum NDContentIDType: i32 { + KeyID (NDContentIDType_KeyID) = 1, PlayReadyObject (NDContentIDType_PlayReadyObject) = 2, Custom (NDContentIDType_Custom) = 3, + }} + RT_ENUM! { enum NDClosedCaptionFormat: i32 { + ATSC (NDClosedCaptionFormat_ATSC) = 0, SCTE20 (NDClosedCaptionFormat_SCTE20) = 1, Unknown (NDClosedCaptionFormat_Unknown) = 2, + }} + RT_ENUM! { enum NDStartAsyncOptions: i32 { + MutualAuthentication (NDStartAsyncOptions_MutualAuthentication) = 1, WaitForLicenseDescriptor (NDStartAsyncOptions_WaitForLicenseDescriptor) = 2, + }} + DEFINE_IID!(IID_INDDownloadEngine, 757218661, 50358, 17464, 141, 70, 185, 110, 109, 15, 178, 31); + RT_INTERFACE!{interface INDDownloadEngine(INDDownloadEngineVtbl): IInspectable(IInspectableVtbl) [IID_INDDownloadEngine] { + fn Open(&mut self, uri: *mut ::rt::gen::windows::foundation::Uri, sessionIDBytesSize: u32, sessionIDBytes: *mut u8) -> HRESULT, + fn Pause(&mut self) -> HRESULT, + fn Resume(&mut self) -> HRESULT, + fn Close(&mut self) -> HRESULT, + fn Seek(&mut self, startPosition: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_CanSeek(&mut self, out: *mut bool) -> HRESULT, + fn get_BufferFullMinThresholdInSamples(&mut self, out: *mut u32) -> HRESULT, + fn get_BufferFullMaxThresholdInSamples(&mut self, out: *mut u32) -> HRESULT, + fn get_Notifier(&mut self, out: *mut *mut NDDownloadEngineNotifier) -> HRESULT + }} + impl INDDownloadEngine { + #[inline] pub unsafe fn open(&mut self, uri: &::rt::gen::windows::foundation::Uri, sessionIDBytes: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).Open)(self, uri as *const _ as *mut _, sessionIDBytes.len() as u32, sessionIDBytes.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn pause(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Pause)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn resume(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Resume)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn close(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Close)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn seek(&mut self, startPosition: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).Seek)(self, startPosition); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_seek(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanSeek)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_buffer_full_min_threshold_in_samples(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BufferFullMinThresholdInSamples)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_buffer_full_max_threshold_in_samples(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BufferFullMaxThresholdInSamples)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_notifier(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Notifier)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NDDownloadEngineNotifier: INDDownloadEngineNotifier} + DEFINE_IID!(IID_INDDownloadEngineNotifier, 3609244884, 62648, 17712, 168, 9, 145, 147, 165, 113, 231, 252); + RT_INTERFACE!{interface INDDownloadEngineNotifier(INDDownloadEngineNotifierVtbl): IInspectable(IInspectableVtbl) [IID_INDDownloadEngineNotifier] { + fn OnStreamOpened(&mut self) -> HRESULT, + fn OnPlayReadyObjectReceived(&mut self, dataBytesSize: u32, dataBytes: *mut u8) -> HRESULT, + fn OnContentIDReceived(&mut self, licenseFetchDescriptor: *mut INDLicenseFetchDescriptor) -> HRESULT, + fn OnDataReceived(&mut self, dataBytesSize: u32, dataBytes: *mut u8, bytesReceived: u32) -> HRESULT, + fn OnEndOfStream(&mut self) -> HRESULT, + fn OnNetworkError(&mut self) -> HRESULT + }} + impl INDDownloadEngineNotifier { + #[inline] pub unsafe fn on_stream_opened(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).OnStreamOpened)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_play_ready_object_received(&mut self, dataBytes: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).OnPlayReadyObjectReceived)(self, dataBytes.len() as u32, dataBytes.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_content_idreceived(&mut self, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result<()> { + let hr = ((*self.lpVtbl).OnContentIDReceived)(self, licenseFetchDescriptor as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_data_received(&mut self, dataBytes: &[u8], bytesReceived: u32) -> Result<()> { + let hr = ((*self.lpVtbl).OnDataReceived)(self, dataBytes.len() as u32, dataBytes.as_ptr() as *mut _, bytesReceived); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_end_of_stream(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).OnEndOfStream)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_network_error(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).OnNetworkError)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDLicenseFetchDescriptor, 1419301690, 59014, 18741, 165, 103, 124, 167, 122, 210, 15, 164); + RT_INTERFACE!{interface INDLicenseFetchDescriptor(INDLicenseFetchDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_INDLicenseFetchDescriptor] { + fn get_ContentIDType(&mut self, out: *mut NDContentIDType) -> HRESULT, + fn get_ContentID(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn get_LicenseFetchChallengeCustomData(&mut self, out: *mut *mut INDCustomData) -> HRESULT, + fn put_LicenseFetchChallengeCustomData(&mut self, licenseFetchChallengeCustomData: *mut INDCustomData) -> HRESULT + }} + impl INDLicenseFetchDescriptor { + #[inline] pub unsafe fn get_content_idtype(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ContentIDType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_id(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentID)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_license_fetch_challenge_custom_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LicenseFetchChallengeCustomData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_license_fetch_challenge_custom_data(&mut self, licenseFetchChallengeCustomData: &INDCustomData) -> Result<()> { + let hr = ((*self.lpVtbl).put_LicenseFetchChallengeCustomData)(self, licenseFetchChallengeCustomData as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDCustomData, 4123725788, 11529, 20249, 181, 225, 118, 160, 179, 238, 146, 103); + RT_INTERFACE!{interface INDCustomData(INDCustomDataVtbl): IInspectable(IInspectableVtbl) [IID_INDCustomData] { + fn get_CustomDataTypeID(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn get_CustomData(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT + }} + impl INDCustomData { + #[inline] pub unsafe fn get_custom_data_type_id(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomDataTypeID)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_data(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomData)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDStreamParser, 3770327448, 38806, 16841, 134, 149, 89, 67, 126, 103, 230, 106); + RT_INTERFACE!{interface INDStreamParser(INDStreamParserVtbl): IInspectable(IInspectableVtbl) [IID_INDStreamParser] { + fn ParseData(&mut self, dataBytesSize: u32, dataBytes: *mut u8) -> HRESULT, + fn GetStreamInformation(&mut self, descriptor: *mut super::super::core::IMediaStreamDescriptor, streamType: *mut NDMediaStreamType, out: *mut u32) -> HRESULT, + fn BeginOfStream(&mut self) -> HRESULT, + fn EndOfStream(&mut self) -> HRESULT, + fn get_Notifier(&mut self, out: *mut *mut NDStreamParserNotifier) -> HRESULT + }} + impl INDStreamParser { + #[inline] pub unsafe fn parse_data(&mut self, dataBytes: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).ParseData)(self, dataBytes.len() as u32, dataBytes.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stream_information(&mut self, descriptor: &super::super::core::IMediaStreamDescriptor) -> Result<(NDMediaStreamType, u32)> { + let mut streamType = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStreamInformation)(self, descriptor as *const _ as *mut _, &mut streamType, &mut out); + if hr == S_OK { Ok((streamType, out)) } else { err(hr) } + } + #[inline] pub unsafe fn begin_of_stream(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).BeginOfStream)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn end_of_stream(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).EndOfStream)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_notifier(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Notifier)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NDStreamParserNotifier: INDStreamParserNotifier} + DEFINE_IID!(IID_INDStreamParserNotifier, 3244797136, 11494, 17004, 172, 229, 94, 146, 117, 254, 167, 21); + RT_INTERFACE!{interface INDStreamParserNotifier(INDStreamParserNotifierVtbl): IInspectable(IInspectableVtbl) [IID_INDStreamParserNotifier] { + fn OnContentIDReceived(&mut self, licenseFetchDescriptor: *mut INDLicenseFetchDescriptor) -> HRESULT, + fn OnMediaStreamDescriptorCreated(&mut self, audioStreamDescriptors: *mut ::rt::gen::windows::foundation::collections::IVector, videoStreamDescriptors: *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn OnSampleParsed(&mut self, streamID: u32, streamType: NDMediaStreamType, streamSample: *mut super::super::core::MediaStreamSample, pts: i64, ccFormat: NDClosedCaptionFormat, ccDataBytesSize: u32, ccDataBytes: *mut u8) -> HRESULT, + fn OnBeginSetupDecryptor(&mut self, descriptor: *mut super::super::core::IMediaStreamDescriptor, keyID: Guid, proBytesSize: u32, proBytes: *mut u8) -> HRESULT + }} + impl INDStreamParserNotifier { + #[inline] pub unsafe fn on_content_idreceived(&mut self, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result<()> { + let hr = ((*self.lpVtbl).OnContentIDReceived)(self, licenseFetchDescriptor as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_media_stream_descriptor_created(&mut self, audioStreamDescriptors: &::rt::gen::windows::foundation::collections::IVector, videoStreamDescriptors: &::rt::gen::windows::foundation::collections::IVector) -> Result<()> { + let hr = ((*self.lpVtbl).OnMediaStreamDescriptorCreated)(self, audioStreamDescriptors as *const _ as *mut _, videoStreamDescriptors as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_sample_parsed(&mut self, streamID: u32, streamType: NDMediaStreamType, streamSample: &super::super::core::MediaStreamSample, pts: i64, ccFormat: NDClosedCaptionFormat, ccDataBytes: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).OnSampleParsed)(self, streamID, streamType, streamSample as *const _ as *mut _, pts, ccFormat, ccDataBytes.len() as u32, ccDataBytes.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_begin_setup_decryptor(&mut self, descriptor: &super::super::core::IMediaStreamDescriptor, keyID: Guid, proBytes: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).OnBeginSetupDecryptor)(self, descriptor as *const _ as *mut _, keyID, proBytes.len() as u32, proBytes.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDSendResult, 3815265559, 42372, 18333, 144, 183, 214, 137, 199, 191, 124, 128); + RT_INTERFACE!{interface INDSendResult(INDSendResultVtbl): IInspectable(IInspectableVtbl) [IID_INDSendResult] { + fn get_Response(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT + }} + impl INDSendResult { + #[inline] pub unsafe fn get_response(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Response)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDMessenger, 3559782749, 42843, 18367, 130, 73, 188, 131, 130, 13, 163, 138); + RT_INTERFACE!{interface INDMessenger(INDMessengerVtbl): IInspectable(IInspectableVtbl) [IID_INDMessenger] { + fn SendRegistrationRequestAsync(&mut self, sessionIDBytesSize: u32, sessionIDBytes: *mut u8, challengeDataBytesSize: u32, challengeDataBytes: *mut u8, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn SendProximityDetectionStartAsync(&mut self, pdType: NDProximityDetectionType, transmitterChannelBytesSize: u32, transmitterChannelBytes: *mut u8, sessionIDBytesSize: u32, sessionIDBytes: *mut u8, challengeDataBytesSize: u32, challengeDataBytes: *mut u8, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn SendProximityDetectionResponseAsync(&mut self, pdType: NDProximityDetectionType, transmitterChannelBytesSize: u32, transmitterChannelBytes: *mut u8, sessionIDBytesSize: u32, sessionIDBytes: *mut u8, responseDataBytesSize: u32, responseDataBytes: *mut u8, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn SendLicenseFetchRequestAsync(&mut self, sessionIDBytesSize: u32, sessionIDBytes: *mut u8, challengeDataBytesSize: u32, challengeDataBytes: *mut u8, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl INDMessenger { + #[inline] pub unsafe fn send_registration_request_async(&mut self, sessionIDBytes: &[u8], challengeDataBytes: &[u8]) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendRegistrationRequestAsync)(self, sessionIDBytes.len() as u32, sessionIDBytes.as_ptr() as *mut _, challengeDataBytes.len() as u32, challengeDataBytes.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn send_proximity_detection_start_async(&mut self, pdType: NDProximityDetectionType, transmitterChannelBytes: &[u8], sessionIDBytes: &[u8], challengeDataBytes: &[u8]) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendProximityDetectionStartAsync)(self, pdType, transmitterChannelBytes.len() as u32, transmitterChannelBytes.as_ptr() as *mut _, sessionIDBytes.len() as u32, sessionIDBytes.as_ptr() as *mut _, challengeDataBytes.len() as u32, challengeDataBytes.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn send_proximity_detection_response_async(&mut self, pdType: NDProximityDetectionType, transmitterChannelBytes: &[u8], sessionIDBytes: &[u8], responseDataBytes: &[u8]) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendProximityDetectionResponseAsync)(self, pdType, transmitterChannelBytes.len() as u32, transmitterChannelBytes.as_ptr() as *mut _, sessionIDBytes.len() as u32, sessionIDBytes.as_ptr() as *mut _, responseDataBytes.len() as u32, responseDataBytes.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn send_license_fetch_request_async(&mut self, sessionIDBytes: &[u8], challengeDataBytes: &[u8]) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendLicenseFetchRequestAsync)(self, sessionIDBytes.len() as u32, sessionIDBytes.as_ptr() as *mut _, challengeDataBytes.len() as u32, challengeDataBytes.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDTCPMessengerFactory, 2111331582, 7065, 20328, 143, 130, 129, 119, 247, 206, 223, 43); + RT_INTERFACE!{static interface INDTCPMessengerFactory(INDTCPMessengerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_INDTCPMessengerFactory] { + fn CreateInstance(&mut self, remoteHostName: HSTRING, remoteHostPort: u32, out: *mut *mut NDTCPMessenger) -> HRESULT + }} + impl INDTCPMessengerFactory { + #[inline] pub unsafe fn create_instance(&mut self, remoteHostName: &HStringArg, remoteHostPort: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, remoteHostName.get(), remoteHostPort, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NDTCPMessenger: INDMessenger [INDTCPMessengerFactory] [CLSID_NDTCPMessenger]} + DEFINE_CLSID!(CLSID_NDTCPMessenger = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,78,68,84,67,80,77,101,115,115,101,110,103,101,114,0]); + DEFINE_IID!(IID_INDTransmitterProperties, 3845566243, 44111, 19164, 140, 102, 79, 247, 194, 112, 45, 214); + RT_INTERFACE!{interface INDTransmitterProperties(INDTransmitterPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_INDTransmitterProperties] { + fn get_CertificateType(&mut self, out: *mut NDCertificateType) -> HRESULT, + fn get_PlatformIdentifier(&mut self, out: *mut NDCertificatePlatformID) -> HRESULT, + fn get_SupportedFeatures(&mut self, outSize: *mut u32, out: *mut *mut NDCertificateFeature) -> HRESULT, + fn get_SecurityLevel(&mut self, out: *mut u32) -> HRESULT, + fn get_SecurityVersion(&mut self, out: *mut u32) -> HRESULT, + fn get_ExpirationDate(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_ClientID(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn get_ModelDigest(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn get_ModelManufacturerName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ModelName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ModelNumber(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl INDTransmitterProperties { + #[inline] pub unsafe fn get_certificate_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CertificateType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_platform_identifier(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PlatformIdentifier)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_features(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedFeatures)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_security_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SecurityLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_security_version(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SecurityVersion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_client_id(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ClientID)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_model_digest(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ModelDigest)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_model_manufacturer_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ModelManufacturerName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_model_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ModelName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_model_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ModelNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDStartResult, 2046224750, 62735, 16405, 139, 164, 194, 188, 52, 78, 189, 78); + RT_INTERFACE!{interface INDStartResult(INDStartResultVtbl): IInspectable(IInspectableVtbl) [IID_INDStartResult] { + fn get_MediaStreamSource(&mut self, out: *mut *mut super::super::core::MediaStreamSource) -> HRESULT + }} + impl INDStartResult { + #[inline] pub unsafe fn get_media_stream_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaStreamSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDLicenseFetchResult, 567514776, 43618, 17919, 165, 255, 128, 55, 229, 67, 56, 37); + RT_INTERFACE!{interface INDLicenseFetchResult(INDLicenseFetchResultVtbl): IInspectable(IInspectableVtbl) [IID_INDLicenseFetchResult] { + fn get_ResponseCustomData(&mut self, out: *mut *mut INDCustomData) -> HRESULT + }} + impl INDLicenseFetchResult { + #[inline] pub unsafe fn get_response_custom_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResponseCustomData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDLicenseFetchDescriptorFactory, 3489862146, 53164, 20224, 174, 106, 151, 175, 128, 184, 72, 242); + RT_INTERFACE!{static interface INDLicenseFetchDescriptorFactory(INDLicenseFetchDescriptorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_INDLicenseFetchDescriptorFactory] { + fn CreateInstance(&mut self, contentIDType: NDContentIDType, contentIDBytesSize: u32, contentIDBytes: *mut u8, licenseFetchChallengeCustomData: *mut INDCustomData, out: *mut *mut NDLicenseFetchDescriptor) -> HRESULT + }} + impl INDLicenseFetchDescriptorFactory { + #[inline] pub unsafe fn create_instance(&mut self, contentIDType: NDContentIDType, contentIDBytes: &[u8], licenseFetchChallengeCustomData: &INDCustomData) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, contentIDType, contentIDBytes.len() as u32, contentIDBytes.as_ptr() as *mut _, licenseFetchChallengeCustomData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NDLicenseFetchDescriptor: INDLicenseFetchDescriptor [INDLicenseFetchDescriptorFactory] [CLSID_NDLicenseFetchDescriptor]} + DEFINE_CLSID!(CLSID_NDLicenseFetchDescriptor = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,78,68,76,105,99,101,110,115,101,70,101,116,99,104,68,101,115,99,114,105,112,116,111,114,0]); + DEFINE_IID!(IID_INDRegistrationCompletedEventArgs, 2654582349, 43867, 18693, 172, 220, 120, 122, 119, 198, 55, 77); + RT_INTERFACE!{interface INDRegistrationCompletedEventArgs(INDRegistrationCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_INDRegistrationCompletedEventArgs] { + fn get_ResponseCustomData(&mut self, out: *mut *mut INDCustomData) -> HRESULT, + fn get_TransmitterProperties(&mut self, out: *mut *mut INDTransmitterProperties) -> HRESULT, + fn get_TransmitterCertificateAccepted(&mut self, out: *mut bool) -> HRESULT, + fn put_TransmitterCertificateAccepted(&mut self, accept: bool) -> HRESULT + }} + impl INDRegistrationCompletedEventArgs { + #[inline] pub unsafe fn get_response_custom_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResponseCustomData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transmitter_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransmitterProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transmitter_certificate_accepted(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TransmitterCertificateAccepted)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_transmitter_certificate_accepted(&mut self, accept: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransmitterCertificateAccepted)(self, accept); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDCustomDataFactory, 3595830699, 13348, 18483, 140, 154, 175, 95, 222, 178, 40, 114); + RT_INTERFACE!{static interface INDCustomDataFactory(INDCustomDataFactoryVtbl): IInspectable(IInspectableVtbl) [IID_INDCustomDataFactory] { + fn CreateInstance(&mut self, customDataTypeIDBytesSize: u32, customDataTypeIDBytes: *mut u8, customDataBytesSize: u32, customDataBytes: *mut u8, out: *mut *mut NDCustomData) -> HRESULT + }} + impl INDCustomDataFactory { + #[inline] pub unsafe fn create_instance(&mut self, customDataTypeIDBytes: &[u8], customDataBytes: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, customDataTypeIDBytes.len() as u32, customDataTypeIDBytes.as_ptr() as *mut _, customDataBytes.len() as u32, customDataBytes.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NDCustomData: INDCustomData [INDCustomDataFactory] [CLSID_NDCustomData]} + DEFINE_CLSID!(CLSID_NDCustomData = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,78,68,67,117,115,116,111,109,68,97,116,97,0]); + DEFINE_IID!(IID_INDProximityDetectionCompletedEventArgs, 712008488, 55845, 20364, 158, 183, 93, 15, 195, 101, 139, 202); + RT_INTERFACE!{interface INDProximityDetectionCompletedEventArgs(INDProximityDetectionCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_INDProximityDetectionCompletedEventArgs] { + fn get_ProximityDetectionRetryCount(&mut self, out: *mut u32) -> HRESULT + }} + impl INDProximityDetectionCompletedEventArgs { + #[inline] pub unsafe fn get_proximity_detection_retry_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProximityDetectionRetryCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDLicenseFetchCompletedEventArgs, 518195738, 4530, 17752, 136, 101, 227, 165, 22, 146, 37, 23); + RT_INTERFACE!{interface INDLicenseFetchCompletedEventArgs(INDLicenseFetchCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_INDLicenseFetchCompletedEventArgs] { + fn get_ResponseCustomData(&mut self, out: *mut *mut INDCustomData) -> HRESULT + }} + impl INDLicenseFetchCompletedEventArgs { + #[inline] pub unsafe fn get_response_custom_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResponseCustomData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDClient, 1003911195, 25016, 18146, 153, 165, 138, 188, 182, 185, 247, 214); + RT_INTERFACE!{interface INDClient(INDClientVtbl): IInspectable(IInspectableVtbl) [IID_INDClient] { + fn add_RegistrationCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RegistrationCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ProximityDetectionCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProximityDetectionCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_LicenseFetchCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LicenseFetchCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ReRegistrationNeeded(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReRegistrationNeeded(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ClosedCaptionDataReceived(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ClosedCaptionDataReceived(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn StartAsync(&mut self, contentUrl: *mut ::rt::gen::windows::foundation::Uri, startAsyncOptions: u32, registrationCustomData: *mut INDCustomData, licenseFetchDescriptor: *mut INDLicenseFetchDescriptor, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn LicenseFetchAsync(&mut self, licenseFetchDescriptor: *mut INDLicenseFetchDescriptor, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn ReRegistrationAsync(&mut self, registrationCustomData: *mut INDCustomData, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn Close(&mut self) -> HRESULT + }} + impl INDClient { + #[inline] pub unsafe fn add_registration_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RegistrationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_registration_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RegistrationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_proximity_detection_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ProximityDetectionCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_proximity_detection_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ProximityDetectionCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_license_fetch_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LicenseFetchCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_license_fetch_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LicenseFetchCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_re_registration_needed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ReRegistrationNeeded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_re_registration_needed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ReRegistrationNeeded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_closed_caption_data_received(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ClosedCaptionDataReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closed_caption_data_received(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ClosedCaptionDataReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_async(&mut self, contentUrl: &::rt::gen::windows::foundation::Uri, startAsyncOptions: u32, registrationCustomData: &INDCustomData, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAsync)(self, contentUrl as *const _ as *mut _, startAsyncOptions, registrationCustomData as *const _ as *mut _, licenseFetchDescriptor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn license_fetch_async(&mut self, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LicenseFetchAsync)(self, licenseFetchDescriptor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn re_registration_async(&mut self, registrationCustomData: &INDCustomData) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReRegistrationAsync)(self, registrationCustomData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn close(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Close)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class NDClient: INDClient [INDClientFactory] [CLSID_NDClient]} + DEFINE_CLSID!(CLSID_NDClient = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,114,111,116,101,99,116,105,111,110,46,80,108,97,121,82,101,97,100,121,46,78,68,67,108,105,101,110,116,0]); + DEFINE_IID!(IID_INDClosedCaptionDataReceivedEventArgs, 1194906271, 49989, 17993, 132, 104, 184, 197, 252, 53, 113, 144); + RT_INTERFACE!{interface INDClosedCaptionDataReceivedEventArgs(INDClosedCaptionDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_INDClosedCaptionDataReceivedEventArgs] { + fn get_ClosedCaptionDataFormat(&mut self, out: *mut NDClosedCaptionFormat) -> HRESULT, + fn get_PresentationTimestamp(&mut self, out: *mut i64) -> HRESULT, + fn get_ClosedCaptionData(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT + }} + impl INDClosedCaptionDataReceivedEventArgs { + #[inline] pub unsafe fn get_closed_caption_data_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ClosedCaptionDataFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_presentation_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PresentationTimestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_closed_caption_data(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ClosedCaptionData)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDClientFactory, 1045683554, 65256, 17695, 176, 212, 247, 6, 204, 163, 224, 55); + RT_INTERFACE!{static interface INDClientFactory(INDClientFactoryVtbl): IInspectable(IInspectableVtbl) [IID_INDClientFactory] { + fn CreateInstance(&mut self, downloadEngine: *mut INDDownloadEngine, streamParser: *mut INDStreamParser, pMessenger: *mut INDMessenger, out: *mut *mut NDClient) -> HRESULT + }} + impl INDClientFactory { + #[inline] pub unsafe fn create_instance(&mut self, downloadEngine: &INDDownloadEngine, streamParser: &INDStreamParser, pMessenger: &INDMessenger) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, downloadEngine as *const _ as *mut _, streamParser as *const _ as *mut _, pMessenger as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INDStorageFileHelper, 3639656184, 37330, 19783, 163, 249, 234, 255, 78, 219, 114, 159); + RT_INTERFACE!{interface INDStorageFileHelper(INDStorageFileHelperVtbl): IInspectable(IInspectableVtbl) [IID_INDStorageFileHelper] { + #[cfg(feature="windows.storage")] fn GetFileURLs(&mut self, file: *mut ::rt::gen::windows::storage::IStorageFile, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + }} + impl INDStorageFileHelper { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_file_urls(&mut self, file: &::rt::gen::windows::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFileURLs)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NDStorageFileHelper: INDStorageFileHelper} + DEFINE_IID!(IID_IPlayReadyServiceRequest, 2343381046, 42755, 17830, 161, 128, 118, 243, 86, 90, 167, 37); + RT_INTERFACE!{interface IPlayReadyServiceRequest(IPlayReadyServiceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyServiceRequest] { + fn get_Uri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn put_Uri(&mut self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_ResponseCustomData(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ChallengeCustomData(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ChallengeCustomData(&mut self, value: HSTRING) -> HRESULT, + fn BeginServiceRequest(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn NextServiceRequest(&mut self, out: *mut *mut IPlayReadyServiceRequest) -> HRESULT, + fn GenerateManualEnablingChallenge(&mut self, out: *mut *mut PlayReadySoapMessage) -> HRESULT, + fn ProcessManualEnablingResponse(&mut self, responseBytesSize: u32, responseBytes: *mut u8, out: *mut ::rt::gen::windows::foundation::HResult) -> HRESULT + }} + impl IPlayReadyServiceRequest { + #[inline] pub unsafe fn get_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_uri(&mut self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Uri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_response_custom_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResponseCustomData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_challenge_custom_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChallengeCustomData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_challenge_custom_data(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ChallengeCustomData)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn begin_service_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BeginServiceRequest)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn next_service_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).NextServiceRequest)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn generate_manual_enabling_challenge(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GenerateManualEnablingChallenge)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn process_manual_enabling_response(&mut self, responseBytes: &[u8]) -> Result<::rt::gen::windows::foundation::HResult> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ProcessManualEnablingResponse)(self, responseBytes.len() as u32, responseBytes.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayReadyIndividualizationServiceRequest, 569747563, 140, 17937, 171, 47, 170, 166, 198, 159, 14, 36); + RT_INTERFACE!{interface IPlayReadyIndividualizationServiceRequest(IPlayReadyIndividualizationServiceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyIndividualizationServiceRequest] { + + }} + DEFINE_IID!(IID_IPlayReadyDomainJoinServiceRequest, 387664474, 16479, 18233, 176, 64, 103, 185, 240, 195, 135, 88); + RT_INTERFACE!{interface IPlayReadyDomainJoinServiceRequest(IPlayReadyDomainJoinServiceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyDomainJoinServiceRequest] { + fn get_DomainAccountId(&mut self, out: *mut Guid) -> HRESULT, + fn put_DomainAccountId(&mut self, value: Guid) -> HRESULT, + fn get_DomainFriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DomainFriendlyName(&mut self, value: HSTRING) -> HRESULT, + fn get_DomainServiceId(&mut self, out: *mut Guid) -> HRESULT, + fn put_DomainServiceId(&mut self, value: Guid) -> HRESULT + }} + impl IPlayReadyDomainJoinServiceRequest { + #[inline] pub unsafe fn get_domain_account_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DomainAccountId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_domain_account_id(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).put_DomainAccountId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DomainFriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_domain_friendly_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DomainFriendlyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_service_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DomainServiceId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_domain_service_id(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).put_DomainServiceId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayReadyDomainLeaveServiceRequest, 103635134, 38829, 18711, 170, 3, 70, 212, 194, 82, 212, 100); + RT_INTERFACE!{interface IPlayReadyDomainLeaveServiceRequest(IPlayReadyDomainLeaveServiceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyDomainLeaveServiceRequest] { + fn get_DomainAccountId(&mut self, out: *mut Guid) -> HRESULT, + fn put_DomainAccountId(&mut self, value: Guid) -> HRESULT, + fn get_DomainServiceId(&mut self, out: *mut Guid) -> HRESULT, + fn put_DomainServiceId(&mut self, value: Guid) -> HRESULT + }} + impl IPlayReadyDomainLeaveServiceRequest { + #[inline] pub unsafe fn get_domain_account_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DomainAccountId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_domain_account_id(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).put_DomainAccountId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_service_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DomainServiceId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_domain_service_id(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).put_DomainServiceId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayReadyLicenseAcquisitionServiceRequest, 1569062725, 16031, 20296, 147, 225, 149, 48, 200, 213, 140, 62); + RT_INTERFACE!{interface IPlayReadyLicenseAcquisitionServiceRequest(IPlayReadyLicenseAcquisitionServiceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyLicenseAcquisitionServiceRequest] { + fn get_ContentHeader(&mut self, out: *mut *mut PlayReadyContentHeader) -> HRESULT, + fn put_ContentHeader(&mut self, value: *mut PlayReadyContentHeader) -> HRESULT, + fn get_DomainServiceId(&mut self, out: *mut Guid) -> HRESULT, + fn put_DomainServiceId(&mut self, value: Guid) -> HRESULT + }} + impl IPlayReadyLicenseAcquisitionServiceRequest { + #[inline] pub unsafe fn get_content_header(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentHeader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_header(&mut self, value: &PlayReadyContentHeader) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentHeader)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_service_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DomainServiceId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_domain_service_id(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).put_DomainServiceId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayReadyLicenseAcquisitionServiceRequest2, 3086638773, 65036, 45605, 188, 96, 90, 158, 221, 50, 206, 181); + RT_INTERFACE!{interface IPlayReadyLicenseAcquisitionServiceRequest2(IPlayReadyLicenseAcquisitionServiceRequest2Vtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyLicenseAcquisitionServiceRequest2] { + fn get_SessionId(&mut self, out: *mut Guid) -> HRESULT + }} + impl IPlayReadyLicenseAcquisitionServiceRequest2 { + #[inline] pub unsafe fn get_session_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SessionId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayReadyMeteringReportServiceRequest, 3240829724, 3789, 20241, 161, 133, 30, 36, 164, 166, 127, 183); + RT_INTERFACE!{interface IPlayReadyMeteringReportServiceRequest(IPlayReadyMeteringReportServiceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyMeteringReportServiceRequest] { + fn get_MeteringCertificate(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn put_MeteringCertificate(&mut self, meteringCertBytesSize: u32, meteringCertBytes: *mut u8) -> HRESULT + }} + impl IPlayReadyMeteringReportServiceRequest { + #[inline] pub unsafe fn get_metering_certificate(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MeteringCertificate)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_metering_certificate(&mut self, meteringCertBytes: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).put_MeteringCertificate)(self, meteringCertBytes.len() as u32, meteringCertBytes.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlayReadyRevocationServiceRequest, 1413310124, 64240, 17760, 132, 165, 14, 74, 206, 201, 57, 228); + RT_INTERFACE!{interface IPlayReadyRevocationServiceRequest(IPlayReadyRevocationServiceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyRevocationServiceRequest] { + + }} + DEFINE_IID!(IID_IPlayReadySecureStopServiceRequest, 3041926885, 447, 17409, 150, 119, 5, 99, 10, 106, 76, 200); + RT_INTERFACE!{interface IPlayReadySecureStopServiceRequest(IPlayReadySecureStopServiceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadySecureStopServiceRequest] { + fn get_SessionID(&mut self, out: *mut Guid) -> HRESULT, + fn get_StartTime(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_UpdateTime(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_Stopped(&mut self, out: *mut bool) -> HRESULT, + fn get_PublisherCertificate(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT + }} + impl IPlayReadySecureStopServiceRequest { + #[inline] pub unsafe fn get_session_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SessionID)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_start_time(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_update_time(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UpdateTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_stopped(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Stopped)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_publisher_certificate(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PublisherCertificate)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + } +} // Windows.Media.Protection.PlayReady +} // Windows.Media.Protection +pub mod speechrecognition { // Windows.Media.SpeechRecognition +use ::prelude::*; + RT_ENUM! { enum SpeechRecognitionConstraintProbability: i32 { + Default (SpeechRecognitionConstraintProbability_Default) = 0, Min (SpeechRecognitionConstraintProbability_Min) = 1, Max (SpeechRecognitionConstraintProbability_Max) = 2, + }} + RT_ENUM! { enum SpeechRecognitionConfidence: i32 { + High (SpeechRecognitionConfidence_High) = 0, Medium (SpeechRecognitionConfidence_Medium) = 1, Low (SpeechRecognitionConfidence_Low) = 2, Rejected (SpeechRecognitionConfidence_Rejected) = 3, + }} + RT_ENUM! { enum SpeechRecognitionScenario: i32 { + WebSearch (SpeechRecognitionScenario_WebSearch) = 0, Dictation (SpeechRecognitionScenario_Dictation) = 1, FormFilling (SpeechRecognitionScenario_FormFilling) = 2, + }} + RT_ENUM! { enum SpeechRecognitionConstraintType: i32 { + Topic (SpeechRecognitionConstraintType_Topic) = 0, List (SpeechRecognitionConstraintType_List) = 1, Grammar (SpeechRecognitionConstraintType_Grammar) = 2, VoiceCommandDefinition (SpeechRecognitionConstraintType_VoiceCommandDefinition) = 3, + }} + RT_ENUM! { enum SpeechRecognizerState: i32 { + Idle (SpeechRecognizerState_Idle) = 0, Capturing (SpeechRecognizerState_Capturing) = 1, Processing (SpeechRecognizerState_Processing) = 2, SoundStarted (SpeechRecognizerState_SoundStarted) = 3, SoundEnded (SpeechRecognizerState_SoundEnded) = 4, SpeechDetected (SpeechRecognizerState_SpeechDetected) = 5, Paused (SpeechRecognizerState_Paused) = 6, + }} + RT_ENUM! { enum SpeechRecognitionAudioProblem: i32 { + None (SpeechRecognitionAudioProblem_None) = 0, TooNoisy (SpeechRecognitionAudioProblem_TooNoisy) = 1, NoSignal (SpeechRecognitionAudioProblem_NoSignal) = 2, TooLoud (SpeechRecognitionAudioProblem_TooLoud) = 3, TooQuiet (SpeechRecognitionAudioProblem_TooQuiet) = 4, TooFast (SpeechRecognitionAudioProblem_TooFast) = 5, TooSlow (SpeechRecognitionAudioProblem_TooSlow) = 6, + }} + RT_ENUM! { enum SpeechRecognitionResultStatus: i32 { + Success (SpeechRecognitionResultStatus_Success) = 0, TopicLanguageNotSupported (SpeechRecognitionResultStatus_TopicLanguageNotSupported) = 1, GrammarLanguageMismatch (SpeechRecognitionResultStatus_GrammarLanguageMismatch) = 2, GrammarCompilationFailure (SpeechRecognitionResultStatus_GrammarCompilationFailure) = 3, AudioQualityFailure (SpeechRecognitionResultStatus_AudioQualityFailure) = 4, UserCanceled (SpeechRecognitionResultStatus_UserCanceled) = 5, Unknown (SpeechRecognitionResultStatus_Unknown) = 6, TimeoutExceeded (SpeechRecognitionResultStatus_TimeoutExceeded) = 7, PauseLimitExceeded (SpeechRecognitionResultStatus_PauseLimitExceeded) = 8, NetworkFailure (SpeechRecognitionResultStatus_NetworkFailure) = 9, MicrophoneUnavailable (SpeechRecognitionResultStatus_MicrophoneUnavailable) = 10, + }} + RT_ENUM! { enum SpeechContinuousRecognitionMode: i32 { + Default (SpeechContinuousRecognitionMode_Default) = 0, PauseOnRecognition (SpeechContinuousRecognitionMode_PauseOnRecognition) = 1, + }} + DEFINE_IID!(IID_ISpeechRecognitionCompilationResult, 1082027101, 27335, 19876, 156, 193, 47, 206, 50, 207, 116, 137); + RT_INTERFACE!{interface ISpeechRecognitionCompilationResult(ISpeechRecognitionCompilationResultVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionCompilationResult] { + fn get_Status(&mut self, out: *mut SpeechRecognitionResultStatus) -> HRESULT + }} + impl ISpeechRecognitionCompilationResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognizerTimeouts, 787967946, 27196, 19914, 161, 83, 223, 27, 200, 138, 121, 175); + RT_INTERFACE!{interface ISpeechRecognizerTimeouts(ISpeechRecognizerTimeoutsVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognizerTimeouts] { + fn get_InitialSilenceTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_InitialSilenceTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_EndSilenceTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_EndSilenceTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_BabbleTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_BabbleTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT + }} + impl ISpeechRecognizerTimeouts { + #[inline] pub unsafe fn get_initial_silence_timeout(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InitialSilenceTimeout)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_initial_silence_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_InitialSilenceTimeout)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_end_silence_timeout(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndSilenceTimeout)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_end_silence_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_EndSilenceTimeout)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_babble_timeout(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BabbleTimeout)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_babble_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_BabbleTimeout)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognizerUIOptions, 2022233665, 47403, 17594, 162, 95, 209, 134, 70, 48, 100, 31); + RT_INTERFACE!{interface ISpeechRecognizerUIOptions(ISpeechRecognizerUIOptionsVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognizerUIOptions] { + fn get_ExampleText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ExampleText(&mut self, value: HSTRING) -> HRESULT, + fn get_AudiblePrompt(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AudiblePrompt(&mut self, value: HSTRING) -> HRESULT, + fn get_IsReadBackEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsReadBackEnabled(&mut self, value: bool) -> HRESULT, + fn get_ShowConfirmation(&mut self, out: *mut bool) -> HRESULT, + fn put_ShowConfirmation(&mut self, value: bool) -> HRESULT + }} + impl ISpeechRecognizerUIOptions { + #[inline] pub unsafe fn get_example_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExampleText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_example_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExampleText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audible_prompt(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudiblePrompt)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_audible_prompt(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudiblePrompt)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_read_back_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsReadBackEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_read_back_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsReadBackEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_show_confirmation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShowConfirmation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_show_confirmation(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShowConfirmation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognitionResult, 1311781207, 846, 18002, 133, 126, 208, 69, 76, 196, 190, 236); + RT_INTERFACE!{interface ISpeechRecognitionResult(ISpeechRecognitionResultVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionResult] { + fn get_Status(&mut self, out: *mut SpeechRecognitionResultStatus) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Confidence(&mut self, out: *mut SpeechRecognitionConfidence) -> HRESULT, + fn get_SemanticInterpretation(&mut self, out: *mut *mut SpeechRecognitionSemanticInterpretation) -> HRESULT, + fn GetAlternates(&mut self, maxAlternates: u32, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Constraint(&mut self, out: *mut *mut ISpeechRecognitionConstraint) -> HRESULT, + fn get_RulePath(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_RawConfidence(&mut self, out: *mut f64) -> HRESULT + }} + impl ISpeechRecognitionResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_confidence(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Confidence)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_semantic_interpretation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SemanticInterpretation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_alternates(&mut self, maxAlternates: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAlternates)(self, maxAlternates, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_constraint(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Constraint)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rule_path(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RulePath)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_raw_confidence(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RawConfidence)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SpeechRecognitionSemanticInterpretation: ISpeechRecognitionSemanticInterpretation} + RT_CLASS!{class SpeechRecognitionResult: ISpeechRecognitionResult} + DEFINE_IID!(IID_ISpeechRecognitionConstraint, 2041321000, 19816, 17348, 137, 17, 64, 220, 65, 1, 181, 91); + RT_INTERFACE!{interface ISpeechRecognitionConstraint(ISpeechRecognitionConstraintVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionConstraint] { + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsEnabled(&mut self, value: bool) -> HRESULT, + fn get_Tag(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Tag(&mut self, value: HSTRING) -> HRESULT, + fn get_Type(&mut self, out: *mut SpeechRecognitionConstraintType) -> HRESULT, + fn get_Probability(&mut self, out: *mut SpeechRecognitionConstraintProbability) -> HRESULT, + fn put_Probability(&mut self, value: SpeechRecognitionConstraintProbability) -> HRESULT + }} + impl ISpeechRecognitionConstraint { + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_tag(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Tag)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_probability(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Probability)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_probability(&mut self, value: SpeechRecognitionConstraintProbability) -> Result<()> { + let hr = ((*self.lpVtbl).put_Probability)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognitionResult2, 2944324026, 17691, 16742, 160, 193, 31, 254, 132, 3, 45, 3); + RT_INTERFACE!{interface ISpeechRecognitionResult2(ISpeechRecognitionResult2Vtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionResult2] { + fn get_PhraseStartTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_PhraseDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl ISpeechRecognitionResult2 { + #[inline] pub unsafe fn get_phrase_start_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhraseStartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_phrase_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PhraseDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognitionSemanticInterpretation, 2866928283, 32306, 19487, 137, 254, 12, 101, 244, 134, 245, 46); + RT_INTERFACE!{interface ISpeechRecognitionSemanticInterpretation(ISpeechRecognitionSemanticInterpretationVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionSemanticInterpretation] { + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView>) -> HRESULT + }} + impl ISpeechRecognitionSemanticInterpretation { + #[inline] pub unsafe fn get_properties(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognitionTopicConstraint, 3211779865, 33373, 20073, 166, 129, 54, 228, 140, 241, 201, 62); + RT_INTERFACE!{interface ISpeechRecognitionTopicConstraint(ISpeechRecognitionTopicConstraintVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionTopicConstraint] { + fn get_Scenario(&mut self, out: *mut SpeechRecognitionScenario) -> HRESULT, + fn get_TopicHint(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISpeechRecognitionTopicConstraint { + #[inline] pub unsafe fn get_scenario(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Scenario)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_topic_hint(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TopicHint)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognitionTopicConstraintFactory, 1852335071, 60421, 18391, 165, 223, 86, 163, 67, 30, 88, 210); + RT_INTERFACE!{static interface ISpeechRecognitionTopicConstraintFactory(ISpeechRecognitionTopicConstraintFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionTopicConstraintFactory] { + fn Create(&mut self, scenario: SpeechRecognitionScenario, topicHint: HSTRING, out: *mut *mut SpeechRecognitionTopicConstraint) -> HRESULT, + fn CreateWithTag(&mut self, scenario: SpeechRecognitionScenario, topicHint: HSTRING, tag: HSTRING, out: *mut *mut SpeechRecognitionTopicConstraint) -> HRESULT + }} + impl ISpeechRecognitionTopicConstraintFactory { + #[inline] pub unsafe fn create(&mut self, scenario: SpeechRecognitionScenario, topicHint: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, scenario, topicHint.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_tag(&mut self, scenario: SpeechRecognitionScenario, topicHint: &HStringArg, tag: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithTag)(self, scenario, topicHint.get(), tag.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpeechRecognitionTopicConstraint: ISpeechRecognitionTopicConstraint [ISpeechRecognitionTopicConstraintFactory] [CLSID_SpeechRecognitionTopicConstraint]} + DEFINE_CLSID!(CLSID_SpeechRecognitionTopicConstraint = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,83,112,101,101,99,104,82,101,99,111,103,110,105,116,105,111,110,46,83,112,101,101,99,104,82,101,99,111,103,110,105,116,105,111,110,84,111,112,105,99,67,111,110,115,116,114,97,105,110,116,0]); + DEFINE_IID!(IID_ISpeechRecognitionListConstraint, 163874793, 58541, 17702, 129, 242, 73, 70, 251, 72, 29, 152); + RT_INTERFACE!{interface ISpeechRecognitionListConstraint(ISpeechRecognitionListConstraintVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionListConstraint] { + fn get_Commands(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl ISpeechRecognitionListConstraint { + #[inline] pub unsafe fn get_commands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Commands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognitionListConstraintFactory, 1089719751, 22058, 17002, 159, 59, 59, 78, 40, 43, 225, 213); + RT_INTERFACE!{static interface ISpeechRecognitionListConstraintFactory(ISpeechRecognitionListConstraintFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionListConstraintFactory] { + fn Create(&mut self, commands: *mut super::super::foundation::collections::IIterable, out: *mut *mut SpeechRecognitionListConstraint) -> HRESULT, + fn CreateWithTag(&mut self, commands: *mut super::super::foundation::collections::IIterable, tag: HSTRING, out: *mut *mut SpeechRecognitionListConstraint) -> HRESULT + }} + impl ISpeechRecognitionListConstraintFactory { + #[inline] pub unsafe fn create(&mut self, commands: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, commands as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_tag(&mut self, commands: &super::super::foundation::collections::IIterable, tag: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithTag)(self, commands as *const _ as *mut _, tag.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpeechRecognitionListConstraint: ISpeechRecognitionListConstraint [ISpeechRecognitionListConstraintFactory] [CLSID_SpeechRecognitionListConstraint]} + DEFINE_CLSID!(CLSID_SpeechRecognitionListConstraint = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,83,112,101,101,99,104,82,101,99,111,103,110,105,116,105,111,110,46,83,112,101,101,99,104,82,101,99,111,103,110,105,116,105,111,110,76,105,115,116,67,111,110,115,116,114,97,105,110,116,0]); + DEFINE_IID!(IID_ISpeechRecognitionGrammarFileConstraint, 3036879503, 34250, 20388, 177, 26, 71, 79, 196, 27, 56, 53); + RT_INTERFACE!{interface ISpeechRecognitionGrammarFileConstraint(ISpeechRecognitionGrammarFileConstraintVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionGrammarFileConstraint] { + #[cfg(feature="windows.storage")] fn get_GrammarFile(&mut self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT + }} + impl ISpeechRecognitionGrammarFileConstraint { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_grammar_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GrammarFile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognitionGrammarFileConstraintFactory, 1034383595, 50297, 19495, 159, 25, 137, 151, 78, 243, 146, 209); + RT_INTERFACE!{static interface ISpeechRecognitionGrammarFileConstraintFactory(ISpeechRecognitionGrammarFileConstraintFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionGrammarFileConstraintFactory] { + #[cfg(feature="windows.storage")] fn Create(&mut self, file: *mut super::super::storage::StorageFile, out: *mut *mut SpeechRecognitionGrammarFileConstraint) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateWithTag(&mut self, file: *mut super::super::storage::StorageFile, tag: HSTRING, out: *mut *mut SpeechRecognitionGrammarFileConstraint) -> HRESULT + }} + impl ISpeechRecognitionGrammarFileConstraintFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create(&mut self, file: &super::super::storage::StorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_with_tag(&mut self, file: &super::super::storage::StorageFile, tag: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithTag)(self, file as *const _ as *mut _, tag.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpeechRecognitionGrammarFileConstraint: ISpeechRecognitionGrammarFileConstraint [ISpeechRecognitionGrammarFileConstraintFactory] [CLSID_SpeechRecognitionGrammarFileConstraint]} + DEFINE_CLSID!(CLSID_SpeechRecognitionGrammarFileConstraint = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,83,112,101,101,99,104,82,101,99,111,103,110,105,116,105,111,110,46,83,112,101,101,99,104,82,101,99,111,103,110,105,116,105,111,110,71,114,97,109,109,97,114,70,105,108,101,67,111,110,115,116,114,97,105,110,116,0]); + DEFINE_IID!(IID_ISpeechRecognitionVoiceCommandDefinitionConstraint, 4068023339, 7924, 19175, 157, 119, 182, 255, 16, 184, 163, 194); + RT_INTERFACE!{interface ISpeechRecognitionVoiceCommandDefinitionConstraint(ISpeechRecognitionVoiceCommandDefinitionConstraintVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionVoiceCommandDefinitionConstraint] { + + }} + DEFINE_IID!(IID_ISpeechRecognitionQualityDegradingEventArgs, 1340227845, 35898, 19582, 141, 10, 91, 212, 245, 177, 74, 216); + RT_INTERFACE!{interface ISpeechRecognitionQualityDegradingEventArgs(ISpeechRecognitionQualityDegradingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionQualityDegradingEventArgs] { + fn get_Problem(&mut self, out: *mut SpeechRecognitionAudioProblem) -> HRESULT + }} + impl ISpeechRecognitionQualityDegradingEventArgs { + #[inline] pub unsafe fn get_problem(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Problem)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognizerStateChangedEventArgs, 1446858505, 47619, 19373, 173, 129, 221, 198, 196, 218, 176, 195); + RT_INTERFACE!{interface ISpeechRecognizerStateChangedEventArgs(ISpeechRecognizerStateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognizerStateChangedEventArgs] { + fn get_State(&mut self, out: *mut SpeechRecognizerState) -> HRESULT + }} + impl ISpeechRecognizerStateChangedEventArgs { + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognizer, 197380555, 49770, 16626, 174, 181, 128, 150, 178, 228, 128, 115); + RT_INTERFACE!{interface ISpeechRecognizer(ISpeechRecognizerVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognizer] { + #[cfg(not(feature="windows.globalization"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.globalization")] fn get_CurrentLanguage(&mut self, out: *mut *mut super::super::globalization::Language) -> HRESULT, + fn get_Constraints(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Timeouts(&mut self, out: *mut *mut SpeechRecognizerTimeouts) -> HRESULT, + fn get_UIOptions(&mut self, out: *mut *mut SpeechRecognizerUIOptions) -> HRESULT, + fn CompileConstraintsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RecognizeAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RecognizeWithUIAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_RecognitionQualityDegrading(&mut self, speechRecognitionQualityDegradingHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecognitionQualityDegrading(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_StateChanged(&mut self, stateChangedHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISpeechRecognizer { + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_current_language(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentLanguage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_constraints(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Constraints)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_timeouts(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Timeouts)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uioptions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UIOptions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn compile_constraints_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CompileConstraintsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn recognize_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RecognizeAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn recognize_with_uiasync(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RecognizeWithUIAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_recognition_quality_degrading(&mut self, speechRecognitionQualityDegradingHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RecognitionQualityDegrading)(self, speechRecognitionQualityDegradingHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_recognition_quality_degrading(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RecognitionQualityDegrading)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_state_changed(&mut self, stateChangedHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StateChanged)(self, stateChangedHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_state_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StateChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SpeechRecognizerTimeouts: ISpeechRecognizerTimeouts} + RT_CLASS!{class SpeechRecognizerUIOptions: ISpeechRecognizerUIOptions} + RT_CLASS!{class SpeechRecognitionCompilationResult: ISpeechRecognitionCompilationResult} + RT_CLASS!{class SpeechRecognizer: ISpeechRecognizer [ISpeechRecognizerFactory] [CLSID_SpeechRecognizer]} + RT_ACTIVATABLE!{ISpeechRecognizerStatics [CLSID_SpeechRecognizer]} + DEFINE_CLSID!(CLSID_SpeechRecognizer = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,83,112,101,101,99,104,82,101,99,111,103,110,105,116,105,111,110,46,83,112,101,101,99,104,82,101,99,111,103,110,105,122,101,114,0]); + RT_CLASS!{class SpeechRecognitionQualityDegradingEventArgs: ISpeechRecognitionQualityDegradingEventArgs} + RT_CLASS!{class SpeechRecognizerStateChangedEventArgs: ISpeechRecognizerStateChangedEventArgs} + DEFINE_IID!(IID_ISpeechRecognizerFactory, 1623492829, 32696, 16435, 172, 112, 208, 70, 246, 72, 24, 225); + RT_INTERFACE!{static interface ISpeechRecognizerFactory(ISpeechRecognizerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognizerFactory] { + #[cfg(feature="windows.globalization")] fn Create(&mut self, language: *mut super::super::globalization::Language, out: *mut *mut SpeechRecognizer) -> HRESULT + }} + impl ISpeechRecognizerFactory { + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn create(&mut self, language: &super::super::globalization::Language) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, language as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognizerStatics, 2275630764, 42972, 19211, 188, 201, 36, 244, 124, 11, 126, 191); + RT_INTERFACE!{static interface ISpeechRecognizerStatics(ISpeechRecognizerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognizerStatics] { + #[cfg(feature="windows.globalization")] fn get_SystemSpeechLanguage(&mut self, out: *mut *mut super::super::globalization::Language) -> HRESULT, + #[cfg(feature="windows.globalization")] fn get_SupportedTopicLanguages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows.globalization")] fn get_SupportedGrammarLanguages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl ISpeechRecognizerStatics { + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_system_speech_language(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SystemSpeechLanguage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_supported_topic_languages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedTopicLanguages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_supported_grammar_languages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedGrammarLanguages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpeechRecognitionVoiceCommandDefinitionConstraint: ISpeechRecognitionVoiceCommandDefinitionConstraint} + DEFINE_IID!(IID_ISpeechRecognizer2, 1674164977, 37347, 20132, 134, 161, 124, 56, 103, 208, 132, 166); + RT_INTERFACE!{interface ISpeechRecognizer2(ISpeechRecognizer2Vtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognizer2] { + fn get_ContinuousRecognitionSession(&mut self, out: *mut *mut SpeechContinuousRecognitionSession) -> HRESULT, + fn get_State(&mut self, out: *mut SpeechRecognizerState) -> HRESULT, + fn StopRecognitionAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn add_HypothesisGenerated(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_HypothesisGenerated(&mut self, value: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISpeechRecognizer2 { + #[inline] pub unsafe fn get_continuous_recognition_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContinuousRecognitionSession)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn stop_recognition_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopRecognitionAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_hypothesis_generated(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_HypothesisGenerated)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_hypothesis_generated(&mut self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_HypothesisGenerated)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SpeechContinuousRecognitionSession: ISpeechContinuousRecognitionSession} + RT_CLASS!{class SpeechRecognitionHypothesisGeneratedEventArgs: ISpeechRecognitionHypothesisGeneratedEventArgs} + DEFINE_IID!(IID_ISpeechRecognitionHypothesis, 2054890928, 39365, 20349, 191, 132, 16, 170, 19, 2, 182, 52); + RT_INTERFACE!{interface ISpeechRecognitionHypothesis(ISpeechRecognitionHypothesisVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionHypothesis] { + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISpeechRecognitionHypothesis { + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechRecognitionHypothesisGeneratedEventArgs, 1427511930, 32803, 22630, 65, 29, 18, 19, 187, 39, 20, 118); + RT_INTERFACE!{interface ISpeechRecognitionHypothesisGeneratedEventArgs(ISpeechRecognitionHypothesisGeneratedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionHypothesisGeneratedEventArgs] { + fn get_Hypothesis(&mut self, out: *mut *mut SpeechRecognitionHypothesis) -> HRESULT + }} + impl ISpeechRecognitionHypothesisGeneratedEventArgs { + #[inline] pub unsafe fn get_hypothesis(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Hypothesis)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpeechRecognitionHypothesis: ISpeechRecognitionHypothesis} + DEFINE_IID!(IID_ISpeechContinuousRecognitionSession, 1780562948, 26132, 18936, 153, 162, 181, 233, 179, 160, 133, 200); + RT_INTERFACE!{interface ISpeechContinuousRecognitionSession(ISpeechContinuousRecognitionSessionVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechContinuousRecognitionSession] { + fn get_AutoStopSilenceTimeout(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_AutoStopSilenceTimeout(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn StartAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StartWithModeAsync(&mut self, mode: SpeechContinuousRecognitionMode, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StopAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn CancelAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn PauseAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn Resume(&mut self) -> HRESULT, + fn add_Completed(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&mut self, value: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ResultGenerated(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ResultGenerated(&mut self, value: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISpeechContinuousRecognitionSession { + #[inline] pub unsafe fn get_auto_stop_silence_timeout(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoStopSilenceTimeout)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_stop_silence_timeout(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoStopSilenceTimeout)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_with_mode_async(&mut self, mode: SpeechContinuousRecognitionMode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartWithModeAsync)(self, mode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn cancel_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CancelAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pause_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PauseAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn resume(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Resume)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_completed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Completed)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_completed(&mut self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Completed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_result_generated(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ResultGenerated)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_result_generated(&mut self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ResultGenerated)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SpeechContinuousRecognitionCompletedEventArgs: ISpeechContinuousRecognitionCompletedEventArgs} + RT_CLASS!{class SpeechContinuousRecognitionResultGeneratedEventArgs: ISpeechContinuousRecognitionResultGeneratedEventArgs} + DEFINE_IID!(IID_ISpeechContinuousRecognitionCompletedEventArgs, 3822086587, 58124, 24088, 66, 75, 127, 190, 129, 248, 251, 208); + RT_INTERFACE!{interface ISpeechContinuousRecognitionCompletedEventArgs(ISpeechContinuousRecognitionCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechContinuousRecognitionCompletedEventArgs] { + fn get_Status(&mut self, out: *mut SpeechRecognitionResultStatus) -> HRESULT + }} + impl ISpeechContinuousRecognitionCompletedEventArgs { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechContinuousRecognitionResultGeneratedEventArgs, 420027934, 28286, 23110, 64, 251, 118, 89, 79, 120, 101, 4); + RT_INTERFACE!{interface ISpeechContinuousRecognitionResultGeneratedEventArgs(ISpeechContinuousRecognitionResultGeneratedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechContinuousRecognitionResultGeneratedEventArgs] { + fn get_Result(&mut self, out: *mut *mut SpeechRecognitionResult) -> HRESULT + }} + impl ISpeechContinuousRecognitionResultGeneratedEventArgs { + #[inline] pub unsafe fn get_result(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Result)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Media.SpeechRecognition +pub mod speechsynthesis { // Windows.Media.SpeechSynthesis +use ::prelude::*; + RT_ENUM! { enum VoiceGender: i32 { + Male (VoiceGender_Male) = 0, Female (VoiceGender_Female) = 1, + }} + RT_CLASS!{class VoiceInformation: IVoiceInformation} + DEFINE_IID!(IID_IVoiceInformation, 2972178084, 4753, 17924, 170, 156, 131, 19, 64, 131, 53, 44); + RT_INTERFACE!{interface IVoiceInformation(IVoiceInformationVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceInformation] { + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Gender(&mut self, out: *mut VoiceGender) -> HRESULT + }} + impl IVoiceInformation { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gender(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gender)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInstalledVoicesStatic, 2102554316, 30003, 19519, 133, 190, 136, 140, 43, 174, 235, 220); + RT_INTERFACE!{static interface IInstalledVoicesStatic(IInstalledVoicesStaticVtbl): IInspectable(IInspectableVtbl) [IID_IInstalledVoicesStatic] { + fn get_AllVoices(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_DefaultVoice(&mut self, out: *mut *mut VoiceInformation) -> HRESULT + }} + impl IInstalledVoicesStatic { + #[inline] pub unsafe fn get_all_voices(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AllVoices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_voice(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DefaultVoice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpeechSynthesisStream, 2212785811, 9292, 17954, 186, 11, 98, 41, 196, 208, 214, 93); + RT_INTERFACE!{interface ISpeechSynthesisStream(ISpeechSynthesisStreamVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechSynthesisStream] { + fn get_Markers(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl ISpeechSynthesisStream { + #[inline] pub unsafe fn get_markers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Markers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpeechSynthesisStream: ISpeechSynthesisStream} + DEFINE_IID!(IID_ISpeechSynthesizer, 3466558582, 38900, 19693, 173, 104, 213, 28, 69, 142, 69, 198); + RT_INTERFACE!{interface ISpeechSynthesizer(ISpeechSynthesizerVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechSynthesizer] { + fn SynthesizeTextToStreamAsync(&mut self, text: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SynthesizeSsmlToStreamAsync(&mut self, ssml: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn put_Voice(&mut self, value: *mut VoiceInformation) -> HRESULT, + fn get_Voice(&mut self, out: *mut *mut VoiceInformation) -> HRESULT + }} + impl ISpeechSynthesizer { + #[inline] pub unsafe fn synthesize_text_to_stream_async(&mut self, text: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SynthesizeTextToStreamAsync)(self, text.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn synthesize_ssml_to_stream_async(&mut self, ssml: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SynthesizeSsmlToStreamAsync)(self, ssml.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_voice(&mut self, value: &VoiceInformation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Voice)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_voice(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Voice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpeechSynthesizer: ISpeechSynthesizer} + RT_ACTIVATABLE!{IInstalledVoicesStatic [CLSID_SpeechSynthesizer]} + DEFINE_CLSID!(CLSID_SpeechSynthesizer = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,83,112,101,101,99,104,83,121,110,116,104,101,115,105,115,46,83,112,101,101,99,104,83,121,110,116,104,101,115,105,122,101,114,0]); +} // Windows.Media.SpeechSynthesis +pub mod transcoding { // Windows.Media.Transcoding +use ::prelude::*; + RT_ENUM! { enum MediaVideoProcessingAlgorithm: i32 { + Default (MediaVideoProcessingAlgorithm_Default) = 0, MrfCrf444 (MediaVideoProcessingAlgorithm_MrfCrf444) = 1, + }} + RT_ENUM! { enum TranscodeFailureReason: i32 { + None (TranscodeFailureReason_None) = 0, Unknown (TranscodeFailureReason_Unknown) = 1, InvalidProfile (TranscodeFailureReason_InvalidProfile) = 2, CodecNotFound (TranscodeFailureReason_CodecNotFound) = 3, + }} + DEFINE_IID!(IID_IMediaTranscoder2, 1079188852, 13792, 20228, 133, 116, 202, 139, 196, 229, 160, 130); + RT_INTERFACE!{interface IMediaTranscoder2(IMediaTranscoder2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaTranscoder2] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn PrepareMediaStreamSourceTranscodeAsync(&mut self, source: *mut super::core::IMediaSource, destination: *mut super::super::storage::streams::IRandomAccessStream, profile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn put_VideoProcessingAlgorithm(&mut self, value: MediaVideoProcessingAlgorithm) -> HRESULT, + fn get_VideoProcessingAlgorithm(&mut self, out: *mut MediaVideoProcessingAlgorithm) -> HRESULT + }} + impl IMediaTranscoder2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn prepare_media_stream_source_transcode_async(&mut self, source: &super::core::IMediaSource, destination: &super::super::storage::streams::IRandomAccessStream, profile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareMediaStreamSourceTranscodeAsync)(self, source as *const _ as *mut _, destination as *const _ as *mut _, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_video_processing_algorithm(&mut self, value: MediaVideoProcessingAlgorithm) -> Result<()> { + let hr = ((*self.lpVtbl).put_VideoProcessingAlgorithm)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_processing_algorithm(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VideoProcessingAlgorithm)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PrepareTranscodeResult: IPrepareTranscodeResult} + DEFINE_IID!(IID_IMediaTranscoder, 420256210, 41130, 19764, 134, 188, 238, 209, 177, 44, 47, 91); + RT_INTERFACE!{interface IMediaTranscoder(IMediaTranscoderVtbl): IInspectable(IInspectableVtbl) [IID_IMediaTranscoder] { + fn put_TrimStartTime(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_TrimStartTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_TrimStopTime(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_TrimStopTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_AlwaysReencode(&mut self, value: bool) -> HRESULT, + fn get_AlwaysReencode(&mut self, out: *mut bool) -> HRESULT, + fn put_HardwareAccelerationEnabled(&mut self, value: bool) -> HRESULT, + fn get_HardwareAccelerationEnabled(&mut self, out: *mut bool) -> HRESULT, + fn AddAudioEffect(&mut self, activatableClassId: HSTRING) -> HRESULT, + fn AddAudioEffectWithSettings(&mut self, activatableClassId: HSTRING, effectRequired: bool, configuration: *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn AddVideoEffect(&mut self, activatableClassId: HSTRING) -> HRESULT, + fn AddVideoEffectWithSettings(&mut self, activatableClassId: HSTRING, effectRequired: bool, configuration: *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn ClearEffects(&mut self) -> HRESULT, + #[cfg(feature="windows.storage")] fn PrepareFileTranscodeAsync(&mut self, source: *mut super::super::storage::IStorageFile, destination: *mut super::super::storage::IStorageFile, profile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn PrepareStreamTranscodeAsync(&mut self, source: *mut super::super::storage::streams::IRandomAccessStream, destination: *mut super::super::storage::streams::IRandomAccessStream, profile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMediaTranscoder { + #[inline] pub unsafe fn set_trim_start_time(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_TrimStartTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_trim_start_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrimStartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_trim_stop_time(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_TrimStopTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_trim_stop_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrimStopTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_always_reencode(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AlwaysReencode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_always_reencode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlwaysReencode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_hardware_acceleration_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_HardwareAccelerationEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hardware_acceleration_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HardwareAccelerationEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_audio_effect(&mut self, activatableClassId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AddAudioEffect)(self, activatableClassId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_audio_effect_with_settings(&mut self, activatableClassId: &HStringArg, effectRequired: bool, configuration: &super::super::foundation::collections::IPropertySet) -> Result<()> { + let hr = ((*self.lpVtbl).AddAudioEffectWithSettings)(self, activatableClassId.get(), effectRequired, configuration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_video_effect(&mut self, activatableClassId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AddVideoEffect)(self, activatableClassId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_video_effect_with_settings(&mut self, activatableClassId: &HStringArg, effectRequired: bool, configuration: &super::super::foundation::collections::IPropertySet) -> Result<()> { + let hr = ((*self.lpVtbl).AddVideoEffectWithSettings)(self, activatableClassId.get(), effectRequired, configuration as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear_effects(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ClearEffects)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn prepare_file_transcode_async(&mut self, source: &super::super::storage::IStorageFile, destination: &super::super::storage::IStorageFile, profile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareFileTranscodeAsync)(self, source as *const _ as *mut _, destination as *const _ as *mut _, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn prepare_stream_transcode_async(&mut self, source: &super::super::storage::streams::IRandomAccessStream, destination: &super::super::storage::streams::IRandomAccessStream, profile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareStreamTranscodeAsync)(self, source as *const _ as *mut _, destination as *const _ as *mut _, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPrepareTranscodeResult, 99769806, 39247, 18996, 157, 104, 151, 204, 206, 23, 48, 214); + RT_INTERFACE!{interface IPrepareTranscodeResult(IPrepareTranscodeResultVtbl): IInspectable(IInspectableVtbl) [IID_IPrepareTranscodeResult] { + fn get_CanTranscode(&mut self, out: *mut bool) -> HRESULT, + fn get_FailureReason(&mut self, out: *mut TranscodeFailureReason) -> HRESULT, + fn TranscodeAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncActionWithProgress) -> HRESULT + }} + impl IPrepareTranscodeResult { + #[inline] pub unsafe fn get_can_transcode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanTranscode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_failure_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FailureReason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn transcode_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TranscodeAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaTranscoder: IMediaTranscoder} +} // Windows.Media.Transcoding +pub mod mediaproperties { // Windows.Media.MediaProperties +use ::prelude::*; + RT_ENUM! { enum StereoscopicVideoPackingMode: i32 { + None (StereoscopicVideoPackingMode_None) = 0, SideBySide (StereoscopicVideoPackingMode_SideBySide) = 1, TopBottom (StereoscopicVideoPackingMode_TopBottom) = 2, + }} + DEFINE_IID!(IID_IMediaRatio, 3536912101, 35113, 16413, 172, 120, 125, 53, 126, 55, 129, 99); + RT_INTERFACE!{interface IMediaRatio(IMediaRatioVtbl): IInspectable(IInspectableVtbl) [IID_IMediaRatio] { + fn put_Numerator(&mut self, value: u32) -> HRESULT, + fn get_Numerator(&mut self, out: *mut u32) -> HRESULT, + fn put_Denominator(&mut self, value: u32) -> HRESULT, + fn get_Denominator(&mut self, out: *mut u32) -> HRESULT + }} + impl IMediaRatio { + #[inline] pub unsafe fn set_numerator(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Numerator)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_numerator(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Numerator)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_denominator(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Denominator)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_denominator(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Denominator)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MediaRatio: IMediaRatio} + RT_CLASS!{class MediaPropertySet: super::super::foundation::collections::IMap} + DEFINE_IID!(IID_IMediaEncodingProperties, 3019909878, 44244, 20058, 162, 75, 93, 116, 152, 168, 184, 196); + RT_INTERFACE!{interface IMediaEncodingProperties(IMediaEncodingPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IMediaEncodingProperties] { + fn get_Properties(&mut self, out: *mut *mut MediaPropertySet) -> HRESULT, + fn get_Type(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Subtype(&mut self, value: HSTRING) -> HRESULT, + fn get_Subtype(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMediaEncodingProperties { + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_subtype(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Subtype)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_subtype(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subtype)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioEncodingProperties, 1656519190, 92, 19259, 138, 11, 10, 9, 14, 150, 135, 243); + RT_INTERFACE!{interface IAudioEncodingProperties(IAudioEncodingPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IAudioEncodingProperties] { + fn put_Bitrate(&mut self, value: u32) -> HRESULT, + fn get_Bitrate(&mut self, out: *mut u32) -> HRESULT, + fn put_ChannelCount(&mut self, value: u32) -> HRESULT, + fn get_ChannelCount(&mut self, out: *mut u32) -> HRESULT, + fn put_SampleRate(&mut self, value: u32) -> HRESULT, + fn get_SampleRate(&mut self, out: *mut u32) -> HRESULT, + fn put_BitsPerSample(&mut self, value: u32) -> HRESULT, + fn get_BitsPerSample(&mut self, out: *mut u32) -> HRESULT + }} + impl IAudioEncodingProperties { + #[inline] pub unsafe fn set_bitrate(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Bitrate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitrate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bitrate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_channel_count(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ChannelCount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_channel_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ChannelCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_sample_rate(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SampleRate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_sample_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SampleRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bits_per_sample(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_BitsPerSample)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bits_per_sample(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BitsPerSample)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioEncodingPropertiesWithFormatUserData, 2565934457, 5098, 18943, 190, 112, 38, 115, 219, 105, 112, 44); + RT_INTERFACE!{interface IAudioEncodingPropertiesWithFormatUserData(IAudioEncodingPropertiesWithFormatUserDataVtbl): IInspectable(IInspectableVtbl) [IID_IAudioEncodingPropertiesWithFormatUserData] { + fn SetFormatUserData(&mut self, valueSize: u32, value: *mut u8) -> HRESULT, + fn GetFormatUserData(&mut self, valueSize: *mut u32, value: *mut *mut u8) -> HRESULT + }} + impl IAudioEncodingPropertiesWithFormatUserData { + #[inline] pub unsafe fn set_format_user_data(&mut self, value: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).SetFormatUserData)(self, value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_format_user_data(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetFormatUserData)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioEncodingPropertiesStatics, 212677420, 60393, 17703, 179, 109, 228, 42, 19, 207, 56, 219); + RT_INTERFACE!{static interface IAudioEncodingPropertiesStatics(IAudioEncodingPropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAudioEncodingPropertiesStatics] { + fn CreateAac(&mut self, sampleRate: u32, channelCount: u32, bitrate: u32, out: *mut *mut AudioEncodingProperties) -> HRESULT, + fn CreateAacAdts(&mut self, sampleRate: u32, channelCount: u32, bitrate: u32, out: *mut *mut AudioEncodingProperties) -> HRESULT, + fn CreateMp3(&mut self, sampleRate: u32, channelCount: u32, bitrate: u32, out: *mut *mut AudioEncodingProperties) -> HRESULT, + fn CreatePcm(&mut self, sampleRate: u32, channelCount: u32, bitsPerSample: u32, out: *mut *mut AudioEncodingProperties) -> HRESULT, + fn CreateWma(&mut self, sampleRate: u32, channelCount: u32, bitrate: u32, out: *mut *mut AudioEncodingProperties) -> HRESULT + }} + impl IAudioEncodingPropertiesStatics { + #[inline] pub unsafe fn create_aac(&mut self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAac)(self, sampleRate, channelCount, bitrate, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_aac_adts(&mut self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAacAdts)(self, sampleRate, channelCount, bitrate, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_mp3(&mut self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMp3)(self, sampleRate, channelCount, bitrate, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_pcm(&mut self, sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePcm)(self, sampleRate, channelCount, bitsPerSample, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_wma(&mut self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWma)(self, sampleRate, channelCount, bitrate, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioEncodingProperties: IAudioEncodingProperties} + RT_ACTIVATABLE!{IAudioEncodingPropertiesStatics [CLSID_AudioEncodingProperties]} + DEFINE_CLSID!(CLSID_AudioEncodingProperties = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,77,101,100,105,97,80,114,111,112,101,114,116,105,101,115,46,65,117,100,105,111,69,110,99,111,100,105,110,103,80,114,111,112,101,114,116,105,101,115,0]); + DEFINE_IID!(IID_IVideoEncodingProperties, 1995336858, 14274, 20266, 136, 10, 18, 130, 187, 180, 55, 61); + RT_INTERFACE!{interface IVideoEncodingProperties(IVideoEncodingPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IVideoEncodingProperties] { + fn put_Bitrate(&mut self, value: u32) -> HRESULT, + fn get_Bitrate(&mut self, out: *mut u32) -> HRESULT, + fn put_Width(&mut self, value: u32) -> HRESULT, + fn get_Width(&mut self, out: *mut u32) -> HRESULT, + fn put_Height(&mut self, value: u32) -> HRESULT, + fn get_Height(&mut self, out: *mut u32) -> HRESULT, + fn get_FrameRate(&mut self, out: *mut *mut MediaRatio) -> HRESULT, + fn get_PixelAspectRatio(&mut self, out: *mut *mut MediaRatio) -> HRESULT + }} + impl IVideoEncodingProperties { + #[inline] pub unsafe fn set_bitrate(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Bitrate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitrate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bitrate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_width(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Width)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_height(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Height)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_rate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameRate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pixel_aspect_ratio(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PixelAspectRatio)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaEncodingSubtypesStatics, 934696974, 41329, 17508, 186, 90, 83, 24, 158, 72, 193, 200); + RT_INTERFACE!{static interface IMediaEncodingSubtypesStatics(IMediaEncodingSubtypesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaEncodingSubtypesStatics] { + fn get_Aac(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AacAdts(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Ac3(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AmrNb(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AmrWb(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Argb32(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Asf(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Avi(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Bgra8(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Bmp(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Eac3(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Float(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Gif(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_H263(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_H264(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_H264Es(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Hevc(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HevcEs(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Iyuv(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Jpeg(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_JpegXr(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Mjpg(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Mpeg(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Mpeg1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Mpeg2(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Mp3(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Mpeg4(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Nv12(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Pcm(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Png(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Rgb24(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Rgb32(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Tiff(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Wave(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Wma8(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Wma9(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Wmv3(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Wvc1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Yuy2(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Yv12(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMediaEncodingSubtypesStatics { + #[inline] pub unsafe fn get_aac(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Aac)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_aac_adts(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AacAdts)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ac3(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ac3)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_amr_nb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AmrNb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_amr_wb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AmrWb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_argb32(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Argb32)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_asf(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Asf)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_avi(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Avi)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bgra8(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Bgra8)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bmp(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Bmp)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_eac3(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Eac3)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_float(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Float)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gif(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gif)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_h263(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_H263)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_h264(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_H264)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_h264_es(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_H264Es)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hevc(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Hevc)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hevc_es(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HevcEs)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_iyuv(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Iyuv)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_jpeg(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Jpeg)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_jpeg_xr(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_JpegXr)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mjpg(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mjpg)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mpeg(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mpeg)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mpeg1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mpeg1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mpeg2(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mpeg2)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mp3(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mp3)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mpeg4(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mpeg4)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nv12(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Nv12)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pcm(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pcm)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_png(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Png)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rgb24(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Rgb24)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rgb32(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Rgb32)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tiff(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tiff)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_wave(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Wave)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_wma8(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Wma8)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_wma9(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Wma9)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_wmv3(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Wmv3)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_wvc1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Wvc1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_yuy2(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Yuy2)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_yv12(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Yv12)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IMediaEncodingSubtypesStatics [CLSID_MediaEncodingSubtypes]} + DEFINE_CLSID!(CLSID_MediaEncodingSubtypes = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,77,101,100,105,97,80,114,111,112,101,114,116,105,101,115,46,77,101,100,105,97,69,110,99,111,100,105,110,103,83,117,98,116,121,112,101,115,0]); + DEFINE_IID!(IID_IH264ProfileIdsStatics, 946162855, 33898, 20375, 162, 229, 195, 161, 91, 191, 112, 253); + RT_INTERFACE!{static interface IH264ProfileIdsStatics(IH264ProfileIdsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IH264ProfileIdsStatics] { + fn get_ConstrainedBaseline(&mut self, out: *mut i32) -> HRESULT, + fn get_Baseline(&mut self, out: *mut i32) -> HRESULT, + fn get_Extended(&mut self, out: *mut i32) -> HRESULT, + fn get_Main(&mut self, out: *mut i32) -> HRESULT, + fn get_High(&mut self, out: *mut i32) -> HRESULT, + fn get_High10(&mut self, out: *mut i32) -> HRESULT, + fn get_High422(&mut self, out: *mut i32) -> HRESULT, + fn get_High444(&mut self, out: *mut i32) -> HRESULT, + fn get_StereoHigh(&mut self, out: *mut i32) -> HRESULT, + fn get_MultiviewHigh(&mut self, out: *mut i32) -> HRESULT + }} + impl IH264ProfileIdsStatics { + #[inline] pub unsafe fn get_constrained_baseline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConstrainedBaseline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_baseline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Baseline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Extended)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_main(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Main)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_high(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_High)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_high10(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_High10)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_high422(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_High422)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_high444(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_High444)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_stereo_high(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StereoHigh)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_multiview_high(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MultiviewHigh)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IH264ProfileIdsStatics [CLSID_H264ProfileIds]} + DEFINE_CLSID!(CLSID_H264ProfileIds = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,77,101,100,105,97,80,114,111,112,101,114,116,105,101,115,46,72,50,54,52,80,114,111,102,105,108,101,73,100,115,0]); + DEFINE_IID!(IID_IMpeg2ProfileIdsStatics, 2757885829, 58746, 16680, 155, 33, 213, 51, 27, 4, 35, 92); + RT_INTERFACE!{static interface IMpeg2ProfileIdsStatics(IMpeg2ProfileIdsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMpeg2ProfileIdsStatics] { + fn get_Simple(&mut self, out: *mut i32) -> HRESULT, + fn get_Main(&mut self, out: *mut i32) -> HRESULT, + fn get_SignalNoiseRatioScalable(&mut self, out: *mut i32) -> HRESULT, + fn get_SpatiallyScalable(&mut self, out: *mut i32) -> HRESULT, + fn get_High(&mut self, out: *mut i32) -> HRESULT + }} + impl IMpeg2ProfileIdsStatics { + #[inline] pub unsafe fn get_simple(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Simple)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_main(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Main)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_signal_noise_ratio_scalable(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SignalNoiseRatioScalable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_spatially_scalable(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpatiallyScalable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_high(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_High)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IMpeg2ProfileIdsStatics [CLSID_Mpeg2ProfileIds]} + DEFINE_CLSID!(CLSID_Mpeg2ProfileIds = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,77,101,100,105,97,80,114,111,112,101,114,116,105,101,115,46,77,112,101,103,50,80,114,111,102,105,108,101,73,100,115,0]); + DEFINE_IID!(IID_IVideoEncodingProperties2, 4148404719, 54373, 17040, 169, 75, 239, 15, 21, 40, 248, 227); + RT_INTERFACE!{interface IVideoEncodingProperties2(IVideoEncodingProperties2Vtbl): IInspectable(IInspectableVtbl) [IID_IVideoEncodingProperties2] { + fn SetFormatUserData(&mut self, valueSize: u32, value: *mut u8) -> HRESULT, + fn GetFormatUserData(&mut self, valueSize: *mut u32, value: *mut *mut u8) -> HRESULT, + fn put_ProfileId(&mut self, value: i32) -> HRESULT, + fn get_ProfileId(&mut self, out: *mut i32) -> HRESULT + }} + impl IVideoEncodingProperties2 { + #[inline] pub unsafe fn set_format_user_data(&mut self, value: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).SetFormatUserData)(self, value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_format_user_data(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetFormatUserData)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn set_profile_id(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProfileId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_profile_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProfileId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoEncodingProperties3, 946589124, 34618, 18335, 179, 235, 86, 193, 252, 190, 198, 215); + RT_INTERFACE!{interface IVideoEncodingProperties3(IVideoEncodingProperties3Vtbl): IInspectable(IInspectableVtbl) [IID_IVideoEncodingProperties3] { + fn get_StereoscopicVideoPackingMode(&mut self, out: *mut StereoscopicVideoPackingMode) -> HRESULT + }} + impl IVideoEncodingProperties3 { + #[inline] pub unsafe fn get_stereoscopic_video_packing_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StereoscopicVideoPackingMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoEncodingPropertiesStatics, 1021398340, 7621, 17371, 159, 56, 235, 235, 249, 1, 82, 203); + RT_INTERFACE!{static interface IVideoEncodingPropertiesStatics(IVideoEncodingPropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IVideoEncodingPropertiesStatics] { + fn CreateH264(&mut self, out: *mut *mut VideoEncodingProperties) -> HRESULT, + fn CreateMpeg2(&mut self, out: *mut *mut VideoEncodingProperties) -> HRESULT, + fn CreateUncompressed(&mut self, subtype: HSTRING, width: u32, height: u32, out: *mut *mut VideoEncodingProperties) -> HRESULT + }} + impl IVideoEncodingPropertiesStatics { + #[inline] pub unsafe fn create_h264(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateH264)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_mpeg2(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMpeg2)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_uncompressed(&mut self, subtype: &HStringArg, width: u32, height: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUncompressed)(self, subtype.get(), width, height, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VideoEncodingProperties: IVideoEncodingProperties} + RT_ACTIVATABLE!{IVideoEncodingPropertiesStatics [CLSID_VideoEncodingProperties]} + DEFINE_CLSID!(CLSID_VideoEncodingProperties = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,77,101,100,105,97,80,114,111,112,101,114,116,105,101,115,46,86,105,100,101,111,69,110,99,111,100,105,110,103,80,114,111,112,101,114,116,105,101,115,0]); + DEFINE_IID!(IID_IImageEncodingProperties, 2019710517, 62257, 16777, 177, 195, 180, 141, 90, 224, 52, 241); + RT_INTERFACE!{interface IImageEncodingProperties(IImageEncodingPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IImageEncodingProperties] { + fn put_Width(&mut self, value: u32) -> HRESULT, + fn get_Width(&mut self, out: *mut u32) -> HRESULT, + fn put_Height(&mut self, value: u32) -> HRESULT, + fn get_Height(&mut self, out: *mut u32) -> HRESULT + }} + impl IImageEncodingProperties { + #[inline] pub unsafe fn set_width(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Width)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_height(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Height)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IImageEncodingPropertiesStatics, 628910300, 35737, 17310, 170, 89, 145, 58, 54, 22, 18, 151); + RT_INTERFACE!{static interface IImageEncodingPropertiesStatics(IImageEncodingPropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IImageEncodingPropertiesStatics] { + fn CreateJpeg(&mut self, out: *mut *mut ImageEncodingProperties) -> HRESULT, + fn CreatePng(&mut self, out: *mut *mut ImageEncodingProperties) -> HRESULT, + fn CreateJpegXR(&mut self, out: *mut *mut ImageEncodingProperties) -> HRESULT + }} + impl IImageEncodingPropertiesStatics { + #[inline] pub unsafe fn create_jpeg(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateJpeg)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_png(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePng)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_jpeg_xr(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateJpegXR)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ImageEncodingProperties: IImageEncodingProperties} + RT_ACTIVATABLE!{IImageEncodingPropertiesStatics2 [CLSID_ImageEncodingProperties]} + RT_ACTIVATABLE!{IImageEncodingPropertiesStatics [CLSID_ImageEncodingProperties]} + DEFINE_CLSID!(CLSID_ImageEncodingProperties = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,77,101,100,105,97,80,114,111,112,101,114,116,105,101,115,46,73,109,97,103,101,69,110,99,111,100,105,110,103,80,114,111,112,101,114,116,105,101,115,0]); + RT_ENUM! { enum MediaPixelFormat: i32 { + Nv12 (MediaPixelFormat_Nv12) = 0, Bgra8 (MediaPixelFormat_Bgra8) = 1, + }} + RT_ENUM! { enum MediaThumbnailFormat: i32 { + Bmp (MediaThumbnailFormat_Bmp) = 0, Bgra8 (MediaThumbnailFormat_Bgra8) = 1, + }} + DEFINE_IID!(IID_IImageEncodingPropertiesStatics2, 4139932457, 14372, 18096, 149, 110, 80, 19, 41, 225, 190, 60); + RT_INTERFACE!{static interface IImageEncodingPropertiesStatics2(IImageEncodingPropertiesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IImageEncodingPropertiesStatics2] { + fn CreateUncompressed(&mut self, format: MediaPixelFormat, out: *mut *mut ImageEncodingProperties) -> HRESULT, + fn CreateBmp(&mut self, out: *mut *mut ImageEncodingProperties) -> HRESULT + }} + impl IImageEncodingPropertiesStatics2 { + #[inline] pub unsafe fn create_uncompressed(&mut self, format: MediaPixelFormat) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUncompressed)(self, format, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_bmp(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBmp)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContainerEncodingProperties, 1504455255, 45866, 18334, 138, 97, 75, 127, 46, 158, 126, 160); + RT_INTERFACE!{interface IContainerEncodingProperties(IContainerEncodingPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IContainerEncodingProperties] { + + }} + RT_CLASS!{class ContainerEncodingProperties: IContainerEncodingProperties} + RT_ENUM! { enum AudioEncodingQuality: i32 { + Auto (AudioEncodingQuality_Auto) = 0, High (AudioEncodingQuality_High) = 1, Medium (AudioEncodingQuality_Medium) = 2, Low (AudioEncodingQuality_Low) = 3, + }} + RT_ENUM! { enum VideoEncodingQuality: i32 { + Auto (VideoEncodingQuality_Auto) = 0, HD1080p (VideoEncodingQuality_HD1080p) = 1, HD720p (VideoEncodingQuality_HD720p) = 2, Wvga (VideoEncodingQuality_Wvga) = 3, Ntsc (VideoEncodingQuality_Ntsc) = 4, Pal (VideoEncodingQuality_Pal) = 5, Vga (VideoEncodingQuality_Vga) = 6, Qvga (VideoEncodingQuality_Qvga) = 7, + }} + DEFINE_IID!(IID_IMediaEncodingProfileStatics, 427767084, 11998, 19013, 168, 150, 129, 122, 72, 84, 248, 254); + RT_INTERFACE!{static interface IMediaEncodingProfileStatics(IMediaEncodingProfileStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaEncodingProfileStatics] { + fn CreateM4a(&mut self, quality: AudioEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT, + fn CreateMp3(&mut self, quality: AudioEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT, + fn CreateWma(&mut self, quality: AudioEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT, + fn CreateMp4(&mut self, quality: VideoEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT, + fn CreateWmv(&mut self, quality: VideoEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateFromFileAsync(&mut self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateFromStreamAsync(&mut self, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMediaEncodingProfileStatics { + #[inline] pub unsafe fn create_m4a(&mut self, quality: AudioEncodingQuality) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateM4a)(self, quality, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_mp3(&mut self, quality: AudioEncodingQuality) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMp3)(self, quality, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_wma(&mut self, quality: AudioEncodingQuality) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWma)(self, quality, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_mp4(&mut self, quality: VideoEncodingQuality) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMp4)(self, quality, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_wmv(&mut self, quality: VideoEncodingQuality) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWmv)(self, quality, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_file_async(&mut self, file: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromFileAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_stream_async(&mut self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromStreamAsync)(self, stream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaEncodingProfile: IMediaEncodingProfile} + RT_ACTIVATABLE!{IMediaEncodingProfileStatics2 [CLSID_MediaEncodingProfile]} + RT_ACTIVATABLE!{IMediaEncodingProfileStatics [CLSID_MediaEncodingProfile]} + DEFINE_CLSID!(CLSID_MediaEncodingProfile = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,77,101,100,105,97,80,114,111,112,101,114,116,105,101,115,46,77,101,100,105,97,69,110,99,111,100,105,110,103,80,114,111,102,105,108,101,0]); + DEFINE_IID!(IID_IMediaEncodingProfileStatics2, 3465406287, 27380, 17032, 143, 226, 121, 173, 241, 247, 154, 67); + RT_INTERFACE!{static interface IMediaEncodingProfileStatics2(IMediaEncodingProfileStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaEncodingProfileStatics2] { + fn CreateWav(&mut self, quality: AudioEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT, + fn CreateAvi(&mut self, quality: VideoEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT + }} + impl IMediaEncodingProfileStatics2 { + #[inline] pub unsafe fn create_wav(&mut self, quality: AudioEncodingQuality) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWav)(self, quality, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_avi(&mut self, quality: VideoEncodingQuality) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAvi)(self, quality, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaEncodingProfile, 3889952168, 7609, 18307, 135, 107, 61, 254, 18, 172, 253, 179); + RT_INTERFACE!{interface IMediaEncodingProfile(IMediaEncodingProfileVtbl): IInspectable(IInspectableVtbl) [IID_IMediaEncodingProfile] { + fn put_Audio(&mut self, value: *mut AudioEncodingProperties) -> HRESULT, + fn get_Audio(&mut self, out: *mut *mut AudioEncodingProperties) -> HRESULT, + fn put_Video(&mut self, value: *mut VideoEncodingProperties) -> HRESULT, + fn get_Video(&mut self, out: *mut *mut VideoEncodingProperties) -> HRESULT, + fn put_Container(&mut self, value: *mut ContainerEncodingProperties) -> HRESULT, + fn get_Container(&mut self, out: *mut *mut ContainerEncodingProperties) -> HRESULT + }} + impl IMediaEncodingProfile { + #[inline] pub unsafe fn set_audio(&mut self, value: &AudioEncodingProperties) -> Result<()> { + let hr = ((*self.lpVtbl).put_Audio)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Audio)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_video(&mut self, value: &VideoEncodingProperties) -> Result<()> { + let hr = ((*self.lpVtbl).put_Video)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_video(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Video)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_container(&mut self, value: &ContainerEncodingProperties) -> Result<()> { + let hr = ((*self.lpVtbl).put_Container)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_container(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Container)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum MediaRotation: i32 { + None (MediaRotation_None) = 0, Clockwise90Degrees (MediaRotation_Clockwise90Degrees) = 1, Clockwise180Degrees (MediaRotation_Clockwise180Degrees) = 2, Clockwise270Degrees (MediaRotation_Clockwise270Degrees) = 3, + }} + RT_ENUM! { enum MediaMirroringOptions: u32 { + None (MediaMirroringOptions_None) = 0, Horizontal (MediaMirroringOptions_Horizontal) = 1, Vertical (MediaMirroringOptions_Vertical) = 2, + }} +} // Windows.Media.MediaProperties +pub mod core { // Windows.Media.Core +use ::prelude::*; + DEFINE_IID!(IID_IMediaSource, 3888100761, 41117, 19489, 188, 223, 32, 175, 79, 134, 179, 217); + RT_INTERFACE!{interface IMediaSource(IMediaSourceVtbl): IInspectable(IInspectableVtbl) [IID_IMediaSource] { + + }} + RT_ENUM! { enum MediaStreamSourceClosedReason: i32 { + Done (MediaStreamSourceClosedReason_Done) = 0, UnknownError (MediaStreamSourceClosedReason_UnknownError) = 1, AppReportedError (MediaStreamSourceClosedReason_AppReportedError) = 2, UnsupportedProtectionSystem (MediaStreamSourceClosedReason_UnsupportedProtectionSystem) = 3, ProtectionSystemFailure (MediaStreamSourceClosedReason_ProtectionSystemFailure) = 4, UnsupportedEncodingFormat (MediaStreamSourceClosedReason_UnsupportedEncodingFormat) = 5, MissingSampleRequestedEventHandler (MediaStreamSourceClosedReason_MissingSampleRequestedEventHandler) = 6, + }} + RT_ENUM! { enum MediaStreamSourceErrorStatus: i32 { + Other (MediaStreamSourceErrorStatus_Other) = 0, OutOfMemory (MediaStreamSourceErrorStatus_OutOfMemory) = 1, FailedToOpenFile (MediaStreamSourceErrorStatus_FailedToOpenFile) = 2, FailedToConnectToServer (MediaStreamSourceErrorStatus_FailedToConnectToServer) = 3, ConnectionToServerLost (MediaStreamSourceErrorStatus_ConnectionToServerLost) = 4, UnspecifiedNetworkError (MediaStreamSourceErrorStatus_UnspecifiedNetworkError) = 5, DecodeError (MediaStreamSourceErrorStatus_DecodeError) = 6, UnsupportedMediaFormat (MediaStreamSourceErrorStatus_UnsupportedMediaFormat) = 7, + }} + DEFINE_IID!(IID_IMediaStreamDescriptor, 2163306094, 37623, 17694, 151, 210, 175, 216, 7, 66, 218, 112); + RT_INTERFACE!{interface IMediaStreamDescriptor(IMediaStreamDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamDescriptor] { + fn get_IsSelected(&mut self, out: *mut bool) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Language(&mut self, value: HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMediaStreamDescriptor { + #[inline] pub unsafe fn get_is_selected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSelected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_language(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Language)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioStreamDescriptor, 506893028, 16423, 18503, 167, 11, 223, 29, 154, 42, 123, 4); + RT_INTERFACE!{interface IAudioStreamDescriptor(IAudioStreamDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IAudioStreamDescriptor] { + fn get_EncodingProperties(&mut self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT + }} + impl IAudioStreamDescriptor { + #[inline] pub unsafe fn get_encoding_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioStreamDescriptor2, 778629622, 42056, 18811, 136, 64, 133, 8, 38, 101, 172, 249); + RT_INTERFACE!{interface IAudioStreamDescriptor2(IAudioStreamDescriptor2Vtbl): IInspectable(IInspectableVtbl) [IID_IAudioStreamDescriptor2] { + fn put_LeadingEncoderPadding(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_LeadingEncoderPadding(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_TrailingEncoderPadding(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_TrailingEncoderPadding(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IAudioStreamDescriptor2 { + #[inline] pub unsafe fn set_leading_encoder_padding(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_LeadingEncoderPadding)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_leading_encoder_padding(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LeadingEncoderPadding)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_trailing_encoder_padding(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_TrailingEncoderPadding)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_trailing_encoder_padding(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TrailingEncoderPadding)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioStreamDescriptorFactory, 1250348702, 19633, 17280, 142, 12, 131, 80, 75, 127, 91, 243); + RT_INTERFACE!{static interface IAudioStreamDescriptorFactory(IAudioStreamDescriptorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAudioStreamDescriptorFactory] { + fn Create(&mut self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, out: *mut *mut AudioStreamDescriptor) -> HRESULT + }} + impl IAudioStreamDescriptorFactory { + #[inline] pub unsafe fn create(&mut self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, encodingProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioStreamDescriptor: IAudioStreamDescriptor [IAudioStreamDescriptorFactory] [CLSID_AudioStreamDescriptor]} + DEFINE_CLSID!(CLSID_AudioStreamDescriptor = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,65,117,100,105,111,83,116,114,101,97,109,68,101,115,99,114,105,112,116,111,114,0]); + DEFINE_IID!(IID_IVideoStreamDescriptor, 317590869, 39979, 17472, 128, 87, 44, 122, 144, 240, 203, 236); + RT_INTERFACE!{interface IVideoStreamDescriptor(IVideoStreamDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IVideoStreamDescriptor] { + fn get_EncodingProperties(&mut self, out: *mut *mut super::mediaproperties::VideoEncodingProperties) -> HRESULT + }} + impl IVideoStreamDescriptor { + #[inline] pub unsafe fn get_encoding_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoStreamDescriptorFactory, 1229911761, 47989, 17362, 158, 94, 123, 121, 163, 175, 206, 212); + RT_INTERFACE!{static interface IVideoStreamDescriptorFactory(IVideoStreamDescriptorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVideoStreamDescriptorFactory] { + fn Create(&mut self, encodingProperties: *mut super::mediaproperties::VideoEncodingProperties, out: *mut *mut VideoStreamDescriptor) -> HRESULT + }} + impl IVideoStreamDescriptorFactory { + #[inline] pub unsafe fn create(&mut self, encodingProperties: &super::mediaproperties::VideoEncodingProperties) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, encodingProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VideoStreamDescriptor: IVideoStreamDescriptor [IVideoStreamDescriptorFactory] [CLSID_VideoStreamDescriptor]} + DEFINE_CLSID!(CLSID_VideoStreamDescriptor = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,86,105,100,101,111,83,116,114,101,97,109,68,101,115,99,114,105,112,116,111,114,0]); + DEFINE_IID!(IID_IMediaStreamSource, 923981123, 17899, 16696, 170, 98, 192, 30, 38, 243, 132, 63); + RT_INTERFACE!{interface IMediaStreamSource(IMediaStreamSourceVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSource] { + fn add_Closed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Starting(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Starting(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Paused(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Paused(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SampleRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SampleRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SwitchStreamsRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SwitchStreamsRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn NotifyError(&mut self, errorStatus: MediaStreamSourceErrorStatus) -> HRESULT, + fn AddStreamDescriptor(&mut self, descriptor: *mut IMediaStreamDescriptor) -> HRESULT, + fn put_MediaProtectionManager(&mut self, value: *mut super::protection::MediaProtectionManager) -> HRESULT, + fn get_MediaProtectionManager(&mut self, out: *mut *mut super::protection::MediaProtectionManager) -> HRESULT, + fn put_Duration(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_CanSeek(&mut self, value: bool) -> HRESULT, + fn get_CanSeek(&mut self, out: *mut bool) -> HRESULT, + fn put_BufferTime(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_BufferTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn SetBufferedRange(&mut self, startOffset: super::super::foundation::TimeSpan, endOffset: super::super::foundation::TimeSpan) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy21(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_MusicProperties(&mut self, out: *mut *mut super::super::storage::fileproperties::MusicProperties) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy22(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_VideoProperties(&mut self, out: *mut *mut super::super::storage::fileproperties::VideoProperties) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy23(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Thumbnail(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy24(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Thumbnail(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn AddProtectionKey(&mut self, streamDescriptor: *mut IMediaStreamDescriptor, keyIdentifierSize: u32, keyIdentifier: *mut u8, licenseDataSize: u32, licenseData: *mut u8) -> HRESULT + }} + impl IMediaStreamSource { + #[inline] pub unsafe fn add_closed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Closed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Closed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_starting(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Starting)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_starting(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Starting)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_paused(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Paused)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_paused(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Paused)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_sample_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SampleRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_sample_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SampleRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_switch_streams_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SwitchStreamsRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_switch_streams_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SwitchStreamsRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_error(&mut self, errorStatus: MediaStreamSourceErrorStatus) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyError)(self, errorStatus); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stream_descriptor(&mut self, descriptor: &IMediaStreamDescriptor) -> Result<()> { + let hr = ((*self.lpVtbl).AddStreamDescriptor)(self, descriptor as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_media_protection_manager(&mut self, value: &super::protection::MediaProtectionManager) -> Result<()> { + let hr = ((*self.lpVtbl).put_MediaProtectionManager)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_protection_manager(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaProtectionManager)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_duration(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Duration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_can_seek(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanSeek)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_seek(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanSeek)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_buffer_time(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_BufferTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_buffer_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BufferTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_buffered_range(&mut self, startOffset: super::super::foundation::TimeSpan, endOffset: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).SetBufferedRange)(self, startOffset, endOffset); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_music_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MusicProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_video_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_thumbnail(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbnail)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_protection_key(&mut self, streamDescriptor: &IMediaStreamDescriptor, keyIdentifier: &[u8], licenseData: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).AddProtectionKey)(self, streamDescriptor as *const _ as *mut _, keyIdentifier.len() as u32, keyIdentifier.as_ptr() as *mut _, licenseData.len() as u32, licenseData.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaStreamSource: IMediaStreamSource [IMediaStreamSourceFactory] [CLSID_MediaStreamSource]} + DEFINE_CLSID!(CLSID_MediaStreamSource = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,77,101,100,105,97,83,116,114,101,97,109,83,111,117,114,99,101,0]); + RT_CLASS!{class MediaStreamSourceClosedEventArgs: IMediaStreamSourceClosedEventArgs} + RT_CLASS!{class MediaStreamSourceStartingEventArgs: IMediaStreamSourceStartingEventArgs} + RT_CLASS!{class MediaStreamSourceSampleRequestedEventArgs: IMediaStreamSourceSampleRequestedEventArgs} + RT_CLASS!{class MediaStreamSourceSwitchStreamsRequestedEventArgs: IMediaStreamSourceSwitchStreamsRequestedEventArgs} + DEFINE_IID!(IID_IMediaStreamSource2, 3965046957, 11882, 20340, 173, 187, 181, 98, 209, 83, 56, 73); + RT_INTERFACE!{interface IMediaStreamSource2(IMediaStreamSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSource2] { + fn add_SampleRendered(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SampleRendered(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMediaStreamSource2 { + #[inline] pub unsafe fn add_sample_rendered(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SampleRendered)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_sample_rendered(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SampleRendered)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaStreamSourceSampleRenderedEventArgs: IMediaStreamSourceSampleRenderedEventArgs} + DEFINE_IID!(IID_IMediaStreamSourceFactory, 4017610969, 53592, 19322, 134, 63, 32, 51, 66, 251, 253, 65); + RT_INTERFACE!{static interface IMediaStreamSourceFactory(IMediaStreamSourceFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceFactory] { + fn CreateFromDescriptor(&mut self, descriptor: *mut IMediaStreamDescriptor, out: *mut *mut MediaStreamSource) -> HRESULT, + fn CreateFromDescriptors(&mut self, descriptor: *mut IMediaStreamDescriptor, descriptor2: *mut IMediaStreamDescriptor, out: *mut *mut MediaStreamSource) -> HRESULT + }} + impl IMediaStreamSourceFactory { + #[inline] pub unsafe fn create_from_descriptor(&mut self, descriptor: &IMediaStreamDescriptor) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromDescriptor)(self, descriptor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_descriptors(&mut self, descriptor: &IMediaStreamDescriptor, descriptor2: &IMediaStreamDescriptor) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromDescriptors)(self, descriptor as *const _ as *mut _, descriptor2 as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaStreamSamplePropertySet: super::super::foundation::collections::IMap} + DEFINE_IID!(IID_IMediaStreamSample, 1552791079, 19328, 17249, 152, 55, 108, 183, 72, 26, 217, 214); + RT_INTERFACE!{interface IMediaStreamSample(IMediaStreamSampleVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSample] { + fn add_Processed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Processed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Buffer(&mut self, out: *mut *mut super::super::storage::streams::Buffer) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_ExtendedProperties(&mut self, out: *mut *mut MediaStreamSamplePropertySet) -> HRESULT, + fn get_Protection(&mut self, out: *mut *mut MediaStreamSampleProtectionProperties) -> HRESULT, + fn put_DecodeTimestamp(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_DecodeTimestamp(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Duration(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_KeyFrame(&mut self, value: bool) -> HRESULT, + fn get_KeyFrame(&mut self, out: *mut bool) -> HRESULT, + fn put_Discontinuous(&mut self, value: bool) -> HRESULT, + fn get_Discontinuous(&mut self, out: *mut bool) -> HRESULT + }} + impl IMediaStreamSample { + #[inline] pub unsafe fn add_processed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Processed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_processed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Processed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Buffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_protection(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Protection)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_decode_timestamp(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_DecodeTimestamp)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_decode_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DecodeTimestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_duration(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Duration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_frame(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeyFrame)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_frame(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyFrame)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_discontinuous(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Discontinuous)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_discontinuous(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Discontinuous)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MediaStreamSample: IMediaStreamSample} + RT_ACTIVATABLE!{IMediaStreamSampleStatics [CLSID_MediaStreamSample]} + DEFINE_CLSID!(CLSID_MediaStreamSample = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,77,101,100,105,97,83,116,114,101,97,109,83,97,109,112,108,101,0]); + RT_CLASS!{class MediaStreamSampleProtectionProperties: IMediaStreamSampleProtectionProperties} + DEFINE_IID!(IID_IMediaStreamSampleStatics, 3755942287, 42703, 17785, 190, 65, 115, 221, 148, 26, 217, 114); + RT_INTERFACE!{static interface IMediaStreamSampleStatics(IMediaStreamSampleStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSampleStatics] { + #[cfg(feature="windows.storage")] fn CreateFromBuffer(&mut self, buffer: *mut super::super::storage::streams::IBuffer, timestamp: super::super::foundation::TimeSpan, out: *mut *mut MediaStreamSample) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateFromStreamAsync(&mut self, stream: *mut super::super::storage::streams::IInputStream, count: u32, timestamp: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMediaStreamSampleStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_buffer(&mut self, buffer: &super::super::storage::streams::IBuffer, timestamp: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromBuffer)(self, buffer as *const _ as *mut _, timestamp, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_stream_async(&mut self, stream: &super::super::storage::streams::IInputStream, count: u32, timestamp: super::super::foundation::TimeSpan) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromStreamAsync)(self, stream as *const _ as *mut _, count, timestamp, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaStreamSampleProtectionProperties, 1320714898, 60639, 18750, 132, 29, 221, 74, 221, 124, 172, 162); + RT_INTERFACE!{interface IMediaStreamSampleProtectionProperties(IMediaStreamSampleProtectionPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSampleProtectionProperties] { + fn SetKeyIdentifier(&mut self, valueSize: u32, value: *mut u8) -> HRESULT, + fn GetKeyIdentifier(&mut self, valueSize: *mut u32, value: *mut *mut u8) -> HRESULT, + fn SetInitializationVector(&mut self, valueSize: u32, value: *mut u8) -> HRESULT, + fn GetInitializationVector(&mut self, valueSize: *mut u32, value: *mut *mut u8) -> HRESULT, + fn SetSubSampleMapping(&mut self, valueSize: u32, value: *mut u8) -> HRESULT, + fn GetSubSampleMapping(&mut self, valueSize: *mut u32, value: *mut *mut u8) -> HRESULT + }} + impl IMediaStreamSampleProtectionProperties { + #[inline] pub unsafe fn set_key_identifier(&mut self, value: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).SetKeyIdentifier)(self, value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_identifier(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetKeyIdentifier)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn set_initialization_vector(&mut self, value: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).SetInitializationVector)(self, value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_initialization_vector(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetInitializationVector)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[inline] pub unsafe fn set_sub_sample_mapping(&mut self, value: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).SetSubSampleMapping)(self, value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_sub_sample_mapping(&mut self) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetSubSampleMapping)(self, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaStreamSourceClosedRequest, 2424045801, 6307, 18769, 136, 122, 44, 30, 235, 213, 198, 158); + RT_INTERFACE!{interface IMediaStreamSourceClosedRequest(IMediaStreamSourceClosedRequestVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceClosedRequest] { + fn get_Reason(&mut self, out: *mut MediaStreamSourceClosedReason) -> HRESULT + }} + impl IMediaStreamSourceClosedRequest { + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MediaStreamSourceClosedRequest: IMediaStreamSourceClosedRequest} + DEFINE_IID!(IID_IMediaStreamSourceClosedEventArgs, 3448536754, 18454, 20004, 136, 240, 73, 30, 247, 56, 100, 6); + RT_INTERFACE!{interface IMediaStreamSourceClosedEventArgs(IMediaStreamSourceClosedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceClosedEventArgs] { + fn get_Request(&mut self, out: *mut *mut MediaStreamSourceClosedRequest) -> HRESULT + }} + impl IMediaStreamSourceClosedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaStreamSourceStartingRequestDeferral, 1058231973, 25408, 19908, 153, 16, 6, 142, 217, 245, 152, 248); + RT_INTERFACE!{interface IMediaStreamSourceStartingRequestDeferral(IMediaStreamSourceStartingRequestDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceStartingRequestDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IMediaStreamSourceStartingRequestDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaStreamSourceStartingRequestDeferral: IMediaStreamSourceStartingRequestDeferral} + DEFINE_IID!(IID_IMediaStreamSourceStartingRequest, 714118116, 13764, 19227, 167, 145, 13, 153, 219, 86, 221, 29); + RT_INTERFACE!{interface IMediaStreamSourceStartingRequest(IMediaStreamSourceStartingRequestVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceStartingRequest] { + fn get_StartPosition(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut MediaStreamSourceStartingRequestDeferral) -> HRESULT, + fn SetActualStartPosition(&mut self, position: super::super::foundation::TimeSpan) -> HRESULT + }} + impl IMediaStreamSourceStartingRequest { + #[inline] pub unsafe fn get_start_position(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StartPosition)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_actual_start_position(&mut self, position: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).SetActualStartPosition)(self, position); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaStreamSourceStartingRequest: IMediaStreamSourceStartingRequest} + DEFINE_IID!(IID_IMediaStreamSourceStartingEventArgs, 4094978290, 49780, 18752, 165, 187, 40, 165, 114, 69, 47, 167); + RT_INTERFACE!{interface IMediaStreamSourceStartingEventArgs(IMediaStreamSourceStartingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceStartingEventArgs] { + fn get_Request(&mut self, out: *mut *mut MediaStreamSourceStartingRequest) -> HRESULT + }} + impl IMediaStreamSourceStartingEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaStreamSourceSampleRequestDeferral, 2023083010, 63874, 17352, 157, 22, 198, 45, 153, 147, 25, 190); + RT_INTERFACE!{interface IMediaStreamSourceSampleRequestDeferral(IMediaStreamSourceSampleRequestDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceSampleRequestDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IMediaStreamSourceSampleRequestDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaStreamSourceSampleRequestDeferral: IMediaStreamSourceSampleRequestDeferral} + DEFINE_IID!(IID_IMediaStreamSourceSampleRequest, 1303593385, 13569, 19867, 131, 249, 143, 35, 92, 130, 37, 50); + RT_INTERFACE!{interface IMediaStreamSourceSampleRequest(IMediaStreamSourceSampleRequestVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceSampleRequest] { + fn get_StreamDescriptor(&mut self, out: *mut *mut IMediaStreamDescriptor) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut MediaStreamSourceSampleRequestDeferral) -> HRESULT, + fn put_Sample(&mut self, value: *mut MediaStreamSample) -> HRESULT, + fn get_Sample(&mut self, out: *mut *mut MediaStreamSample) -> HRESULT, + fn ReportSampleProgress(&mut self, progress: u32) -> HRESULT + }} + impl IMediaStreamSourceSampleRequest { + #[inline] pub unsafe fn get_stream_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StreamDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_sample(&mut self, value: &MediaStreamSample) -> Result<()> { + let hr = ((*self.lpVtbl).put_Sample)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_sample(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sample)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_sample_progress(&mut self, progress: u32) -> Result<()> { + let hr = ((*self.lpVtbl).ReportSampleProgress)(self, progress); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaStreamSourceSampleRequest: IMediaStreamSourceSampleRequest} + DEFINE_IID!(IID_IMediaStreamSourceSampleRequestedEventArgs, 284801950, 29125, 18735, 132, 127, 13, 161, 243, 94, 129, 248); + RT_INTERFACE!{interface IMediaStreamSourceSampleRequestedEventArgs(IMediaStreamSourceSampleRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceSampleRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut MediaStreamSourceSampleRequest) -> HRESULT + }} + impl IMediaStreamSourceSampleRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaStreamSourceSwitchStreamsRequestDeferral, 3202603061, 42245, 20378, 185, 67, 43, 140, 177, 180, 187, 217); + RT_INTERFACE!{interface IMediaStreamSourceSwitchStreamsRequestDeferral(IMediaStreamSourceSwitchStreamsRequestDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceSwitchStreamsRequestDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IMediaStreamSourceSwitchStreamsRequestDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaStreamSourceSwitchStreamsRequestDeferral: IMediaStreamSourceSwitchStreamsRequestDeferral} + DEFINE_IID!(IID_IMediaStreamSourceSwitchStreamsRequest, 1102610574, 14505, 20163, 155, 160, 182, 155, 133, 80, 30, 144); + RT_INTERFACE!{interface IMediaStreamSourceSwitchStreamsRequest(IMediaStreamSourceSwitchStreamsRequestVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceSwitchStreamsRequest] { + fn get_OldStreamDescriptor(&mut self, out: *mut *mut IMediaStreamDescriptor) -> HRESULT, + fn get_NewStreamDescriptor(&mut self, out: *mut *mut IMediaStreamDescriptor) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut MediaStreamSourceSwitchStreamsRequestDeferral) -> HRESULT + }} + impl IMediaStreamSourceSwitchStreamsRequest { + #[inline] pub unsafe fn get_old_stream_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OldStreamDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_stream_descriptor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NewStreamDescriptor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaStreamSourceSwitchStreamsRequest: IMediaStreamSourceSwitchStreamsRequest} + DEFINE_IID!(IID_IMediaStreamSourceSwitchStreamsRequestedEventArgs, 1109404530, 28321, 18039, 152, 30, 53, 10, 13, 164, 18, 170); + RT_INTERFACE!{interface IMediaStreamSourceSwitchStreamsRequestedEventArgs(IMediaStreamSourceSwitchStreamsRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceSwitchStreamsRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut MediaStreamSourceSwitchStreamsRequest) -> HRESULT + }} + impl IMediaStreamSourceSwitchStreamsRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaStreamSourceSampleRenderedEventArgs, 2640935685, 54514, 19578, 157, 254, 141, 108, 208, 179, 238, 132); + RT_INTERFACE!{interface IMediaStreamSourceSampleRenderedEventArgs(IMediaStreamSourceSampleRenderedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSourceSampleRenderedEventArgs] { + fn get_SampleLag(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IMediaStreamSourceSampleRenderedEventArgs { + #[inline] pub unsafe fn get_sample_lag(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SampleLag)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_STRUCT! { struct MseTimeRange { + Start: super::super::foundation::TimeSpan, End: super::super::foundation::TimeSpan, + }} + RT_ENUM! { enum MseReadyState: i32 { + Closed (MseReadyState_Closed) = 0, Open (MseReadyState_Open) = 1, Ended (MseReadyState_Ended) = 2, + }} + RT_ENUM! { enum MseEndOfStreamStatus: i32 { + Success (MseEndOfStreamStatus_Success) = 0, NetworkError (MseEndOfStreamStatus_NetworkError) = 1, DecodeError (MseEndOfStreamStatus_DecodeError) = 2, UnknownError (MseEndOfStreamStatus_UnknownError) = 3, + }} + RT_ENUM! { enum MseAppendMode: i32 { + Segments (MseAppendMode_Segments) = 0, Sequence (MseAppendMode_Sequence) = 1, + }} + DEFINE_IID!(IID_IMseStreamSourceStatics, 1180460957, 54640, 17358, 186, 33, 11, 255, 95, 63, 189, 10); + RT_INTERFACE!{static interface IMseStreamSourceStatics(IMseStreamSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMseStreamSourceStatics] { + fn IsContentTypeSupported(&mut self, contentType: HSTRING, out: *mut bool) -> HRESULT + }} + impl IMseStreamSourceStatics { + #[inline] pub unsafe fn is_content_type_supported(&mut self, contentType: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsContentTypeSupported)(self, contentType.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMseStreamSource, 2964593037, 756, 18723, 136, 221, 129, 188, 63, 54, 15, 250); + RT_INTERFACE!{interface IMseStreamSource(IMseStreamSourceVtbl): IInspectable(IInspectableVtbl) [IID_IMseStreamSource] { + fn add_Opened(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Opened(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Ended(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Ended(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Closed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_SourceBuffers(&mut self, out: *mut *mut MseSourceBufferList) -> HRESULT, + fn get_ActiveSourceBuffers(&mut self, out: *mut *mut MseSourceBufferList) -> HRESULT, + fn get_ReadyState(&mut self, out: *mut MseReadyState) -> HRESULT, + fn get_Duration(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Duration(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn AddSourceBuffer(&mut self, mimeType: HSTRING, out: *mut *mut MseSourceBuffer) -> HRESULT, + fn RemoveSourceBuffer(&mut self, buffer: *mut MseSourceBuffer) -> HRESULT, + fn EndOfStream(&mut self, status: MseEndOfStreamStatus) -> HRESULT + }} + impl IMseStreamSource { + #[inline] pub unsafe fn add_opened(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Opened)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_opened(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Opened)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_ended(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Ended)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_ended(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Ended)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_closed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Closed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Closed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source_buffers(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceBuffers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_active_source_buffers(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActiveSourceBuffers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ready_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadyState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_duration(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Duration)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_buffer(&mut self, mimeType: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddSourceBuffer)(self, mimeType.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_buffer(&mut self, buffer: &MseSourceBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveSourceBuffer)(self, buffer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn end_of_stream(&mut self, status: MseEndOfStreamStatus) -> Result<()> { + let hr = ((*self.lpVtbl).EndOfStream)(self, status); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MseStreamSource: IMseStreamSource} + RT_ACTIVATABLE!{IMseStreamSourceStatics [CLSID_MseStreamSource]} + DEFINE_CLSID!(CLSID_MseStreamSource = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,77,115,101,83,116,114,101,97,109,83,111,117,114,99,101,0]); + RT_CLASS!{class MseSourceBufferList: IMseSourceBufferList} + RT_CLASS!{class MseSourceBuffer: IMseSourceBuffer} + DEFINE_IID!(IID_IMseSourceBuffer, 203072483, 57229, 16505, 163, 254, 104, 73, 24, 75, 78, 47); + RT_INTERFACE!{interface IMseSourceBuffer(IMseSourceBufferVtbl): IInspectable(IInspectableVtbl) [IID_IMseSourceBuffer] { + fn add_UpdateStarting(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UpdateStarting(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_UpdateEnded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UpdateEnded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ErrorOccurred(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ErrorOccurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Aborted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Aborted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Mode(&mut self, out: *mut MseAppendMode) -> HRESULT, + fn put_Mode(&mut self, value: MseAppendMode) -> HRESULT, + fn get_IsUpdating(&mut self, out: *mut bool) -> HRESULT, + fn get_Buffered(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_TimestampOffset(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_TimestampOffset(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_AppendWindowStart(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_AppendWindowStart(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_AppendWindowEnd(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_AppendWindowEnd(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy20(&mut self) -> (), + #[cfg(feature="windows.storage")] fn AppendBuffer(&mut self, buffer: *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy21(&mut self) -> (), + #[cfg(feature="windows.storage")] fn AppendStream(&mut self, stream: *mut super::super::storage::streams::IInputStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy22(&mut self) -> (), + #[cfg(feature="windows.storage")] fn AppendStreamMaxSize(&mut self, stream: *mut super::super::storage::streams::IInputStream, maxSize: u64) -> HRESULT, + fn Abort(&mut self) -> HRESULT, + fn Remove(&mut self, start: super::super::foundation::TimeSpan, end: *mut super::super::foundation::IReference) -> HRESULT + }} + impl IMseSourceBuffer { + #[inline] pub unsafe fn add_update_starting(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UpdateStarting)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_update_starting(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UpdateStarting)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Updated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Updated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_update_ended(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UpdateEnded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_update_ended(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UpdateEnded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_error_occurred(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ErrorOccurred)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_error_occurred(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ErrorOccurred)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_aborted(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Aborted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_aborted(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Aborted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mode(&mut self, value: MseAppendMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_updating(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsUpdating)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_buffered(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Buffered)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimestampOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_timestamp_offset(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_TimestampOffset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_append_window_start(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AppendWindowStart)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_append_window_start(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppendWindowStart)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_append_window_end(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppendWindowEnd)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_append_window_end(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppendWindowEnd)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn append_buffer(&mut self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).AppendBuffer)(self, buffer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn append_stream(&mut self, stream: &super::super::storage::streams::IInputStream) -> Result<()> { + let hr = ((*self.lpVtbl).AppendStream)(self, stream as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn append_stream_max_size(&mut self, stream: &super::super::storage::streams::IInputStream, maxSize: u64) -> Result<()> { + let hr = ((*self.lpVtbl).AppendStreamMaxSize)(self, stream as *const _ as *mut _, maxSize); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn abort(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Abort)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove(&mut self, start: super::super::foundation::TimeSpan, end: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).Remove)(self, start, end as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMseSourceBufferList, 2516248807, 43239, 20159, 137, 39, 20, 94, 148, 11, 165, 17); + RT_INTERFACE!{interface IMseSourceBufferList(IMseSourceBufferListVtbl): IInspectable(IInspectableVtbl) [IID_IMseSourceBufferList] { + fn add_SourceBufferAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceBufferAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceBufferRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceBufferRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Buffers(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMseSourceBufferList { + #[inline] pub unsafe fn add_source_buffer_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceBufferAdded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_buffer_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceBufferAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_buffer_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceBufferRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_buffer_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceBufferRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_buffers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Buffers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHighDynamicRangeControl, 1441900462, 55639, 19913, 157, 28, 133, 83, 168, 42, 125, 153); + RT_INTERFACE!{interface IHighDynamicRangeControl(IHighDynamicRangeControlVtbl): IInspectable(IInspectableVtbl) [IID_IHighDynamicRangeControl] { + fn put_Enabled(&mut self, value: bool) -> HRESULT, + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT + }} + impl IHighDynamicRangeControl { + #[inline] pub unsafe fn set_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Enabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class HighDynamicRangeControl: IHighDynamicRangeControl} + DEFINE_IID!(IID_ISceneAnalysisEffect, 3226182425, 51777, 18451, 191, 253, 123, 8, 176, 237, 37, 87); + RT_INTERFACE!{interface ISceneAnalysisEffect(ISceneAnalysisEffectVtbl): IInspectable(IInspectableVtbl) [IID_ISceneAnalysisEffect] { + fn get_HighDynamicRangeAnalyzer(&mut self, out: *mut *mut HighDynamicRangeControl) -> HRESULT, + fn put_DesiredAnalysisInterval(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_DesiredAnalysisInterval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn add_SceneAnalyzed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SceneAnalyzed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISceneAnalysisEffect { + #[inline] pub unsafe fn get_high_dynamic_range_analyzer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HighDynamicRangeAnalyzer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_analysis_interval(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredAnalysisInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_analysis_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredAnalysisInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_scene_analyzed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SceneAnalyzed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_scene_analyzed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SceneAnalyzed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SceneAnalysisEffect: ISceneAnalysisEffect} + RT_CLASS!{class SceneAnalyzedEventArgs: ISceneAnalyzedEventArgs} + DEFINE_IID!(IID_IHighDynamicRangeOutput, 257392747, 9531, 16665, 187, 64, 58, 144, 229, 19, 132, 247); + RT_INTERFACE!{interface IHighDynamicRangeOutput(IHighDynamicRangeOutputVtbl): IInspectable(IInspectableVtbl) [IID_IHighDynamicRangeOutput] { + fn get_Certainty(&mut self, out: *mut f64) -> HRESULT, + fn get_FrameControllers(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IHighDynamicRangeOutput { + #[inline] pub unsafe fn get_certainty(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Certainty)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_controllers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameControllers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class HighDynamicRangeOutput: IHighDynamicRangeOutput} + DEFINE_IID!(IID_ISceneAnalysisEffectFrame, 3635482188, 32729, 17121, 133, 235, 101, 114, 194, 151, 201, 135); + RT_INTERFACE!{interface ISceneAnalysisEffectFrame(ISceneAnalysisEffectFrameVtbl): IInspectable(IInspectableVtbl) [IID_ISceneAnalysisEffectFrame] { + fn get_FrameControlValues(&mut self, out: *mut *mut super::capture::CapturedFrameControlValues) -> HRESULT, + fn get_HighDynamicRange(&mut self, out: *mut *mut HighDynamicRangeOutput) -> HRESULT + }} + impl ISceneAnalysisEffectFrame { + #[inline] pub unsafe fn get_frame_control_values(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameControlValues)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_high_dynamic_range(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HighDynamicRange)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SceneAnalysisEffectFrame: ISceneAnalysisEffectFrame} + DEFINE_IID!(IID_ISceneAnalyzedEventArgs, 342594952, 10321, 17892, 173, 85, 68, 207, 141, 248, 219, 77); + RT_INTERFACE!{interface ISceneAnalyzedEventArgs(ISceneAnalyzedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISceneAnalyzedEventArgs] { + fn get_ResultFrame(&mut self, out: *mut *mut SceneAnalysisEffectFrame) -> HRESULT + }} + impl ISceneAnalyzedEventArgs { + #[inline] pub unsafe fn get_result_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResultFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SceneAnalysisEffectDefinition: super::effects::IVideoEffectDefinition} + DEFINE_IID!(IID_IFaceDetectionEffectFrame, 2326825363, 24008, 17531, 162, 71, 82, 112, 189, 128, 46, 206); + RT_INTERFACE!{interface IFaceDetectionEffectFrame(IFaceDetectionEffectFrameVtbl): IInspectable(IInspectableVtbl) [IID_IFaceDetectionEffectFrame] { + fn get_DetectedFaces(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IFaceDetectionEffectFrame { + #[inline] pub unsafe fn get_detected_faces(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DetectedFaces)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FaceDetectionEffectFrame: IFaceDetectionEffectFrame} + DEFINE_IID!(IID_IFaceDetectedEventArgs, 428966950, 50779, 18106, 133, 248, 19, 136, 5, 118, 201, 10); + RT_INTERFACE!{interface IFaceDetectedEventArgs(IFaceDetectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IFaceDetectedEventArgs] { + fn get_ResultFrame(&mut self, out: *mut *mut FaceDetectionEffectFrame) -> HRESULT + }} + impl IFaceDetectedEventArgs { + #[inline] pub unsafe fn get_result_frame(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResultFrame)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FaceDetectedEventArgs: IFaceDetectedEventArgs} + DEFINE_IID!(IID_IFaceDetectionEffect, 2920672210, 1346, 17065, 188, 144, 242, 131, 162, 159, 70, 193); + RT_INTERFACE!{interface IFaceDetectionEffect(IFaceDetectionEffectVtbl): IInspectable(IInspectableVtbl) [IID_IFaceDetectionEffect] { + fn put_Enabled(&mut self, value: bool) -> HRESULT, + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT, + fn put_DesiredDetectionInterval(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_DesiredDetectionInterval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn add_FaceDetected(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FaceDetected(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IFaceDetectionEffect { + #[inline] pub unsafe fn set_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Enabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_detection_interval(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredDetectionInterval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_detection_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredDetectionInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_face_detected(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FaceDetected)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_face_detected(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FaceDetected)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FaceDetectionEffect: IFaceDetectionEffect} + RT_ENUM! { enum FaceDetectionMode: i32 { + HighPerformance (FaceDetectionMode_HighPerformance) = 0, Balanced (FaceDetectionMode_Balanced) = 1, HighQuality (FaceDetectionMode_HighQuality) = 2, + }} + DEFINE_IID!(IID_IFaceDetectionEffectDefinition, 1138532481, 47176, 20275, 183, 2, 31, 210, 98, 79, 176, 22); + RT_INTERFACE!{interface IFaceDetectionEffectDefinition(IFaceDetectionEffectDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IFaceDetectionEffectDefinition] { + fn put_DetectionMode(&mut self, value: FaceDetectionMode) -> HRESULT, + fn get_DetectionMode(&mut self, out: *mut FaceDetectionMode) -> HRESULT, + fn put_SynchronousDetectionEnabled(&mut self, value: bool) -> HRESULT, + fn get_SynchronousDetectionEnabled(&mut self, out: *mut bool) -> HRESULT + }} + impl IFaceDetectionEffectDefinition { + #[inline] pub unsafe fn set_detection_mode(&mut self, value: FaceDetectionMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_DetectionMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_detection_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DetectionMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_synchronous_detection_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SynchronousDetectionEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_synchronous_detection_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SynchronousDetectionEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class FaceDetectionEffectDefinition: super::effects::IVideoEffectDefinition} + RT_ENUM! { enum VideoStabilizationEffectEnabledChangedReason: i32 { + Programmatic (VideoStabilizationEffectEnabledChangedReason_Programmatic) = 0, PixelRateTooHigh (VideoStabilizationEffectEnabledChangedReason_PixelRateTooHigh) = 1, RunningSlowly (VideoStabilizationEffectEnabledChangedReason_RunningSlowly) = 2, + }} + DEFINE_IID!(IID_IVideoStabilizationEffectEnabledChangedEventArgs, 410976040, 26555, 18195, 185, 0, 65, 104, 218, 22, 69, 41); + RT_INTERFACE!{interface IVideoStabilizationEffectEnabledChangedEventArgs(IVideoStabilizationEffectEnabledChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVideoStabilizationEffectEnabledChangedEventArgs] { + fn get_Reason(&mut self, out: *mut VideoStabilizationEffectEnabledChangedReason) -> HRESULT + }} + impl IVideoStabilizationEffectEnabledChangedEventArgs { + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class VideoStabilizationEffectEnabledChangedEventArgs: IVideoStabilizationEffectEnabledChangedEventArgs} + DEFINE_IID!(IID_IVideoStabilizationEffect, 134784592, 38552, 20055, 135, 123, 189, 124, 178, 238, 15, 138); + RT_INTERFACE!{interface IVideoStabilizationEffect(IVideoStabilizationEffectVtbl): IInspectable(IInspectableVtbl) [IID_IVideoStabilizationEffect] { + fn put_Enabled(&mut self, value: bool) -> HRESULT, + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT, + fn add_EnabledChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnabledChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetRecommendedStreamConfiguration(&mut self, controller: *mut super::devices::VideoDeviceController, desiredProperties: *mut super::mediaproperties::VideoEncodingProperties, out: *mut *mut super::capture::VideoStreamConfiguration) -> HRESULT + }} + impl IVideoStabilizationEffect { + #[inline] pub unsafe fn set_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Enabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_enabled_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnabledChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_enabled_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnabledChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_recommended_stream_configuration(&mut self, controller: &super::devices::VideoDeviceController, desiredProperties: &super::mediaproperties::VideoEncodingProperties) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRecommendedStreamConfiguration)(self, controller as *const _ as *mut _, desiredProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VideoStabilizationEffect: IVideoStabilizationEffect} + RT_CLASS!{class VideoStabilizationEffectDefinition: super::effects::IVideoEffectDefinition} + RT_ENUM! { enum MediaTrackKind: i32 { + Audio (MediaTrackKind_Audio) = 0, Video (MediaTrackKind_Video) = 1, TimedMetadata (MediaTrackKind_TimedMetadata) = 2, + }} + RT_ENUM! { enum TimedMetadataKind: i32 { + Caption (TimedMetadataKind_Caption) = 0, Chapter (TimedMetadataKind_Chapter) = 1, Custom (TimedMetadataKind_Custom) = 2, Data (TimedMetadataKind_Data) = 3, Description (TimedMetadataKind_Description) = 4, Subtitle (TimedMetadataKind_Subtitle) = 5, + }} + RT_ENUM! { enum TimedMetadataTrackErrorCode: i32 { + None (TimedMetadataTrackErrorCode_None) = 0, DataFormatError (TimedMetadataTrackErrorCode_DataFormatError) = 1, NetworkError (TimedMetadataTrackErrorCode_NetworkError) = 2, InternalError (TimedMetadataTrackErrorCode_InternalError) = 3, + }} + RT_ENUM! { enum TimedTextScrollMode: i32 { + Popon (TimedTextScrollMode_Popon) = 0, Rollup (TimedTextScrollMode_Rollup) = 1, + }} + RT_ENUM! { enum TimedTextUnit: i32 { + Pixels (TimedTextUnit_Pixels) = 0, Percentage (TimedTextUnit_Percentage) = 1, + }} + RT_ENUM! { enum TimedTextWritingMode: i32 { + LeftRightTopBottom (TimedTextWritingMode_LeftRightTopBottom) = 0, RightLeftTopBottom (TimedTextWritingMode_RightLeftTopBottom) = 1, TopBottomRightLeft (TimedTextWritingMode_TopBottomRightLeft) = 2, TopBottomLeftRight (TimedTextWritingMode_TopBottomLeftRight) = 3, LeftRight (TimedTextWritingMode_LeftRight) = 4, RightLeft (TimedTextWritingMode_RightLeft) = 5, TopBottom (TimedTextWritingMode_TopBottom) = 6, + }} + RT_ENUM! { enum TimedTextDisplayAlignment: i32 { + Before (TimedTextDisplayAlignment_Before) = 0, After (TimedTextDisplayAlignment_After) = 1, Center (TimedTextDisplayAlignment_Center) = 2, + }} + RT_ENUM! { enum TimedTextLineAlignment: i32 { + Start (TimedTextLineAlignment_Start) = 0, End (TimedTextLineAlignment_End) = 1, Center (TimedTextLineAlignment_Center) = 2, + }} + RT_ENUM! { enum TimedTextWrapping: i32 { + NoWrap (TimedTextWrapping_NoWrap) = 0, Wrap (TimedTextWrapping_Wrap) = 1, + }} + RT_ENUM! { enum TimedTextWeight: i32 { + Normal (TimedTextWeight_Normal) = 400, Bold (TimedTextWeight_Bold) = 700, + }} + RT_ENUM! { enum TimedTextFlowDirection: i32 { + LeftToRight (TimedTextFlowDirection_LeftToRight) = 0, RightToLeft (TimedTextFlowDirection_RightToLeft) = 1, + }} + RT_ENUM! { enum MediaDecoderStatus: i32 { + FullySupported (MediaDecoderStatus_FullySupported) = 0, UnsupportedSubtype (MediaDecoderStatus_UnsupportedSubtype) = 1, UnsupportedEncoderProperties (MediaDecoderStatus_UnsupportedEncoderProperties) = 2, Degraded (MediaDecoderStatus_Degraded) = 3, + }} + RT_ENUM! { enum AudioDecoderDegradation: i32 { + None (AudioDecoderDegradation_None) = 0, DownmixTo2Channels (AudioDecoderDegradation_DownmixTo2Channels) = 1, DownmixTo6Channels (AudioDecoderDegradation_DownmixTo6Channels) = 2, DownmixTo8Channels (AudioDecoderDegradation_DownmixTo8Channels) = 3, + }} + RT_ENUM! { enum AudioDecoderDegradationReason: i32 { + None (AudioDecoderDegradationReason_None) = 0, LicensingRequirement (AudioDecoderDegradationReason_LicensingRequirement) = 1, + }} + RT_ENUM! { enum MediaSourceStatus: i32 { + FullySupported (MediaSourceStatus_FullySupported) = 0, Unknown (MediaSourceStatus_Unknown) = 1, + }} + RT_STRUCT! { struct TimedTextPadding { + Before: f64, After: f64, Start: f64, End: f64, Unit: TimedTextUnit, + }} + RT_STRUCT! { struct TimedTextSize { + Height: f64, Width: f64, Unit: TimedTextUnit, + }} + RT_STRUCT! { struct TimedTextDouble { + Value: f64, Unit: TimedTextUnit, + }} + RT_STRUCT! { struct TimedTextPoint { + X: f64, Y: f64, Unit: TimedTextUnit, + }} + RT_ENUM! { enum MediaSourceState: i32 { + Initial (MediaSourceState_Initial) = 0, Opening (MediaSourceState_Opening) = 1, Opened (MediaSourceState_Opened) = 2, Failed (MediaSourceState_Failed) = 3, Closed (MediaSourceState_Closed) = 4, + }} + DEFINE_IID!(IID_IMediaSourceError, 1544194405, 14277, 20125, 141, 33, 28, 222, 233, 12, 236, 198); + RT_INTERFACE!{interface IMediaSourceError(IMediaSourceErrorVtbl): IInspectable(IInspectableVtbl) [IID_IMediaSourceError] { + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IMediaSourceError { + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaSourceOpenOperationCompletedEventArgs, 4234685675, 57985, 18300, 168, 224, 26, 205, 101, 65, 20, 200); + RT_INTERFACE!{interface IMediaSourceOpenOperationCompletedEventArgs(IMediaSourceOpenOperationCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaSourceOpenOperationCompletedEventArgs] { + fn get_Error(&mut self, out: *mut *mut MediaSourceError) -> HRESULT + }} + impl IMediaSourceOpenOperationCompletedEventArgs { + #[inline] pub unsafe fn get_error(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaSourceError: IMediaSourceError} + DEFINE_IID!(IID_IMediaSourceStateChangedEventArgs, 170962818, 36977, 19372, 188, 57, 202, 42, 147, 183, 23, 169); + RT_INTERFACE!{interface IMediaSourceStateChangedEventArgs(IMediaSourceStateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaSourceStateChangedEventArgs] { + fn get_OldState(&mut self, out: *mut MediaSourceState) -> HRESULT, + fn get_NewState(&mut self, out: *mut MediaSourceState) -> HRESULT + }} + impl IMediaSourceStateChangedEventArgs { + #[inline] pub unsafe fn get_old_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OldState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaSourceStatics, 4152192932, 18002, 16654, 177, 216, 233, 165, 226, 69, 164, 92); + RT_INTERFACE!{static interface IMediaSourceStatics(IMediaSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaSourceStatics] { + fn CreateFromAdaptiveMediaSource(&mut self, mediaSource: *mut super::streaming::adaptive::AdaptiveMediaSource, out: *mut *mut MediaSource) -> HRESULT, + fn CreateFromMediaStreamSource(&mut self, mediaSource: *mut MediaStreamSource, out: *mut *mut MediaSource) -> HRESULT, + fn CreateFromMseStreamSource(&mut self, mediaSource: *mut MseStreamSource, out: *mut *mut MediaSource) -> HRESULT, + fn CreateFromIMediaSource(&mut self, mediaSource: *mut IMediaSource, out: *mut *mut MediaSource) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFromStorageFile(&mut self, file: *mut super::super::storage::IStorageFile, out: *mut *mut MediaSource) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFromStream(&mut self, stream: *mut super::super::storage::streams::IRandomAccessStream, contentType: HSTRING, out: *mut *mut MediaSource) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFromStreamReference(&mut self, stream: *mut super::super::storage::streams::IRandomAccessStreamReference, contentType: HSTRING, out: *mut *mut MediaSource) -> HRESULT, + fn CreateFromUri(&mut self, uri: *mut super::super::foundation::Uri, out: *mut *mut MediaSource) -> HRESULT + }} + impl IMediaSourceStatics { + #[inline] pub unsafe fn create_from_adaptive_media_source(&mut self, mediaSource: &super::streaming::adaptive::AdaptiveMediaSource) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromAdaptiveMediaSource)(self, mediaSource as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_media_stream_source(&mut self, mediaSource: &MediaStreamSource) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromMediaStreamSource)(self, mediaSource as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_mse_stream_source(&mut self, mediaSource: &MseStreamSource) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromMseStreamSource)(self, mediaSource as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_imedia_source(&mut self, mediaSource: &IMediaSource) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromIMediaSource)(self, mediaSource as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_storage_file(&mut self, file: &super::super::storage::IStorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromStorageFile)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_stream(&mut self, stream: &super::super::storage::streams::IRandomAccessStream, contentType: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromStream)(self, stream as *const _ as *mut _, contentType.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_stream_reference(&mut self, stream: &super::super::storage::streams::IRandomAccessStreamReference, contentType: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromStreamReference)(self, stream as *const _ as *mut _, contentType.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_uri(&mut self, uri: &super::super::foundation::Uri) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromUri)(self, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaSource: IMediaSource2} + RT_ACTIVATABLE!{IMediaSourceStatics [CLSID_MediaSource]} + RT_ACTIVATABLE!{IMediaSourceStatics2 [CLSID_MediaSource]} + DEFINE_CLSID!(CLSID_MediaSource = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,77,101,100,105,97,83,111,117,114,99,101,0]); + DEFINE_IID!(IID_IMediaSourceStatics2, 4007748004, 32531, 18582, 184, 203, 223, 13, 229, 188, 185, 241); + RT_INTERFACE!{static interface IMediaSourceStatics2(IMediaSourceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaSourceStatics2] { + fn CreateFromMediaBinder(&mut self, binder: *mut MediaBinder, out: *mut *mut MediaSource) -> HRESULT + }} + impl IMediaSourceStatics2 { + #[inline] pub unsafe fn create_from_media_binder(&mut self, binder: &MediaBinder) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromMediaBinder)(self, binder as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaBinder: IMediaBinder} + DEFINE_IID!(IID_IMediaBinder, 729694378, 56839, 16975, 131, 241, 241, 222, 70, 196, 250, 46); + RT_INTERFACE!{interface IMediaBinder(IMediaBinderVtbl): IInspectable(IInspectableVtbl) [IID_IMediaBinder] { + fn add_Binding(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Binding(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Token(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Token(&mut self, value: HSTRING) -> HRESULT, + fn get_Source(&mut self, out: *mut *mut MediaSource) -> HRESULT + }} + impl IMediaBinder { + #[inline] pub unsafe fn add_binding(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Binding)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_binding(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Binding)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_token(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Token)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_token(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Token)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaBindingEventArgs: IMediaBindingEventArgs} + DEFINE_IID!(IID_IMediaBindingEventArgs, 3055333978, 7021, 17968, 168, 109, 47, 8, 55, 247, 18, 229); + RT_INTERFACE!{interface IMediaBindingEventArgs(IMediaBindingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaBindingEventArgs] { + fn add_Canceled(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Canceled(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_MediaBinder(&mut self, out: *mut *mut MediaBinder) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT, + fn SetUri(&mut self, uri: *mut super::super::foundation::Uri) -> HRESULT, + #[cfg(feature="windows.storage")] fn SetStream(&mut self, stream: *mut super::super::storage::streams::IRandomAccessStream, contentType: HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn SetStreamReference(&mut self, stream: *mut super::super::storage::streams::IRandomAccessStreamReference, contentType: HSTRING) -> HRESULT + }} + impl IMediaBindingEventArgs { + #[inline] pub unsafe fn add_canceled(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Canceled)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_canceled(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Canceled)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_binder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaBinder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_uri(&mut self, uri: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).SetUri)(self, uri as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_stream(&mut self, stream: &super::super::storage::streams::IRandomAccessStream, contentType: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetStream)(self, stream as *const _ as *mut _, contentType.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_stream_reference(&mut self, stream: &super::super::storage::streams::IRandomAccessStreamReference, contentType: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetStreamReference)(self, stream as *const _ as *mut _, contentType.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaSource2, 783683656, 25951, 19511, 184, 19, 180, 228, 93, 250, 10, 190); + RT_INTERFACE!{interface IMediaSource2(IMediaSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaSource2] { + fn add_OpenOperationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_OpenOperationCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_CustomProperties(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn get_Duration(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_IsOpen(&mut self, out: *mut bool) -> HRESULT, + fn get_ExternalTimedTextSources(&mut self, out: *mut *mut super::super::foundation::collections::IObservableVector) -> HRESULT, + fn get_ExternalTimedMetadataTracks(&mut self, out: *mut *mut super::super::foundation::collections::IObservableVector) -> HRESULT + }} + impl IMediaSource2 { + #[inline] pub unsafe fn add_open_operation_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_OpenOperationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_open_operation_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_OpenOperationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_open(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsOpen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_external_timed_text_sources(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExternalTimedTextSources)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_external_timed_metadata_tracks(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExternalTimedMetadataTracks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaSourceOpenOperationCompletedEventArgs: IMediaSourceOpenOperationCompletedEventArgs} + RT_CLASS!{class TimedTextSource: ITimedTextSource} + RT_ACTIVATABLE!{ITimedTextSourceStatics [CLSID_TimedTextSource]} + DEFINE_CLSID!(CLSID_TimedTextSource = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,84,105,109,101,100,84,101,120,116,83,111,117,114,99,101,0]); + RT_CLASS!{class TimedMetadataTrack: ITimedMetadataTrack [ITimedMetadataTrackFactory] [CLSID_TimedMetadataTrack]} + DEFINE_CLSID!(CLSID_TimedMetadataTrack = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,84,105,109,101,100,77,101,116,97,100,97,116,97,84,114,97,99,107,0]); + DEFINE_IID!(IID_IMediaSource3, 3047099803, 19310, 16877, 187, 180, 124, 117, 9, 169, 148, 173); + RT_INTERFACE!{interface IMediaSource3(IMediaSource3Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaSource3] { + fn add_StateChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_State(&mut self, out: *mut MediaSourceState) -> HRESULT, + fn Reset(&mut self) -> HRESULT + }} + impl IMediaSource3 { + #[inline] pub unsafe fn add_state_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StateChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_state_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn reset(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Reset)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaSourceStateChangedEventArgs: IMediaSourceStateChangedEventArgs} + RT_CLASS!{class TimedTextRegion: ITimedTextRegion} + RT_CLASS!{class TimedTextStyle: ITimedTextStyle} + RT_CLASS!{class TimedTextLine: ITimedTextLine} + DEFINE_IID!(IID_IMediaCue, 3352387165, 23004, 17183, 160, 238, 39, 116, 67, 35, 179, 109); + RT_INTERFACE!{interface IMediaCue(IMediaCueVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCue] { + fn put_StartTime(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_StartTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Duration(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Id(&mut self, value: HSTRING) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMediaCue { + #[inline] pub unsafe fn set_start_time(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_StartTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_start_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_duration(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Duration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Id)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITimedTextCue, 1372036689, 15238, 18765, 179, 89, 187, 46, 167, 172, 169, 169); + RT_INTERFACE!{interface ITimedTextCue(ITimedTextCueVtbl): IInspectable(IInspectableVtbl) [IID_ITimedTextCue] { + fn get_CueRegion(&mut self, out: *mut *mut TimedTextRegion) -> HRESULT, + fn put_CueRegion(&mut self, value: *mut TimedTextRegion) -> HRESULT, + fn get_CueStyle(&mut self, out: *mut *mut TimedTextStyle) -> HRESULT, + fn put_CueStyle(&mut self, value: *mut TimedTextStyle) -> HRESULT, + fn get_Lines(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl ITimedTextCue { + #[inline] pub unsafe fn get_cue_region(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CueRegion)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_cue_region(&mut self, value: &TimedTextRegion) -> Result<()> { + let hr = ((*self.lpVtbl).put_CueRegion)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cue_style(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CueStyle)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_cue_style(&mut self, value: &TimedTextStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_CueStyle)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_lines(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Lines)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITimedTextRegion, 516982815, 35334, 16930, 159, 89, 178, 27, 244, 1, 36, 180); + RT_INTERFACE!{interface ITimedTextRegion(ITimedTextRegionVtbl): IInspectable(IInspectableVtbl) [IID_ITimedTextRegion] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_Position(&mut self, out: *mut TimedTextPoint) -> HRESULT, + fn put_Position(&mut self, value: TimedTextPoint) -> HRESULT, + fn get_Extent(&mut self, out: *mut TimedTextSize) -> HRESULT, + fn put_Extent(&mut self, value: TimedTextSize) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_Background(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_Background(&mut self, value: super::super::ui::Color) -> HRESULT, + fn get_WritingMode(&mut self, out: *mut TimedTextWritingMode) -> HRESULT, + fn put_WritingMode(&mut self, value: TimedTextWritingMode) -> HRESULT, + fn get_DisplayAlignment(&mut self, out: *mut TimedTextDisplayAlignment) -> HRESULT, + fn put_DisplayAlignment(&mut self, value: TimedTextDisplayAlignment) -> HRESULT, + fn get_LineHeight(&mut self, out: *mut TimedTextDouble) -> HRESULT, + fn put_LineHeight(&mut self, value: TimedTextDouble) -> HRESULT, + fn get_IsOverflowClipped(&mut self, out: *mut bool) -> HRESULT, + fn put_IsOverflowClipped(&mut self, value: bool) -> HRESULT, + fn get_Padding(&mut self, out: *mut TimedTextPadding) -> HRESULT, + fn put_Padding(&mut self, value: TimedTextPadding) -> HRESULT, + fn get_TextWrapping(&mut self, out: *mut TimedTextWrapping) -> HRESULT, + fn put_TextWrapping(&mut self, value: TimedTextWrapping) -> HRESULT, + fn get_ZIndex(&mut self, out: *mut i32) -> HRESULT, + fn put_ZIndex(&mut self, value: i32) -> HRESULT, + fn get_ScrollMode(&mut self, out: *mut TimedTextScrollMode) -> HRESULT, + fn put_ScrollMode(&mut self, value: TimedTextScrollMode) -> HRESULT + }} + impl ITimedTextRegion { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position(&mut self, value: TimedTextPoint) -> Result<()> { + let hr = ((*self.lpVtbl).put_Position)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_extent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Extent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_extent(&mut self, value: TimedTextSize) -> Result<()> { + let hr = ((*self.lpVtbl).put_Extent)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_background(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Background)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_background(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_Background)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_writing_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WritingMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_writing_mode(&mut self, value: TimedTextWritingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_WritingMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DisplayAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_alignment(&mut self, value: TimedTextDisplayAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_height(&mut self, value: TimedTextDouble) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_overflow_clipped(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsOverflowClipped)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_overflow_clipped(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsOverflowClipped)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Padding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_padding(&mut self, value: TimedTextPadding) -> Result<()> { + let hr = ((*self.lpVtbl).put_Padding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_wrapping(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextWrapping)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_wrapping(&mut self, value: TimedTextWrapping) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextWrapping)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_zindex(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ZIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_zindex(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ZIndex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scroll_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScrollMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scroll_mode(&mut self, value: TimedTextScrollMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ScrollMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITimedTextStyle, 464664653, 43045, 16578, 167, 245, 40, 30, 174, 223, 59, 85); + RT_INTERFACE!{interface ITimedTextStyle(ITimedTextStyleVtbl): IInspectable(IInspectableVtbl) [IID_ITimedTextStyle] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_FontFamily(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_FontFamily(&mut self, value: HSTRING) -> HRESULT, + fn get_FontSize(&mut self, out: *mut TimedTextDouble) -> HRESULT, + fn put_FontSize(&mut self, value: TimedTextDouble) -> HRESULT, + fn get_FontWeight(&mut self, out: *mut TimedTextWeight) -> HRESULT, + fn put_FontWeight(&mut self, value: TimedTextWeight) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_Foreground(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_Foreground(&mut self, value: super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_Background(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy11(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_Background(&mut self, value: super::super::ui::Color) -> HRESULT, + fn get_IsBackgroundAlwaysShown(&mut self, out: *mut bool) -> HRESULT, + fn put_IsBackgroundAlwaysShown(&mut self, value: bool) -> HRESULT, + fn get_FlowDirection(&mut self, out: *mut TimedTextFlowDirection) -> HRESULT, + fn put_FlowDirection(&mut self, value: TimedTextFlowDirection) -> HRESULT, + fn get_LineAlignment(&mut self, out: *mut TimedTextLineAlignment) -> HRESULT, + fn put_LineAlignment(&mut self, value: TimedTextLineAlignment) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy18(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_OutlineColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy19(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_OutlineColor(&mut self, value: super::super::ui::Color) -> HRESULT, + fn get_OutlineThickness(&mut self, out: *mut TimedTextDouble) -> HRESULT, + fn put_OutlineThickness(&mut self, value: TimedTextDouble) -> HRESULT, + fn get_OutlineRadius(&mut self, out: *mut TimedTextDouble) -> HRESULT, + fn put_OutlineRadius(&mut self, value: TimedTextDouble) -> HRESULT + }} + impl ITimedTextStyle { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_family(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontFamily)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_family(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontFamily)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_size(&mut self, value: TimedTextDouble) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_weight(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontWeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_weight(&mut self, value: TimedTextWeight) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontWeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_foreground(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Foreground)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_foreground(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_Foreground)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_background(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Background)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_background(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_Background)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_background_always_shown(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsBackgroundAlwaysShown)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_background_always_shown(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsBackgroundAlwaysShown)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_flow_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FlowDirection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_flow_direction(&mut self, value: TimedTextFlowDirection) -> Result<()> { + let hr = ((*self.lpVtbl).put_FlowDirection)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_alignment(&mut self, value: TimedTextLineAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_outline_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutlineColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_outline_color(&mut self, value: super::super::ui::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutlineColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outline_thickness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutlineThickness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outline_thickness(&mut self, value: TimedTextDouble) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutlineThickness)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outline_radius(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutlineRadius)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outline_radius(&mut self, value: TimedTextDouble) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutlineRadius)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITimedTextSubformat, 3608367151, 12897, 18210, 160, 194, 185, 55, 178, 57, 15, 20); + RT_INTERFACE!{interface ITimedTextSubformat(ITimedTextSubformatVtbl): IInspectable(IInspectableVtbl) [IID_ITimedTextSubformat] { + fn get_StartIndex(&mut self, out: *mut i32) -> HRESULT, + fn put_StartIndex(&mut self, value: i32) -> HRESULT, + fn get_Length(&mut self, out: *mut i32) -> HRESULT, + fn put_Length(&mut self, value: i32) -> HRESULT, + fn get_SubformatStyle(&mut self, out: *mut *mut TimedTextStyle) -> HRESULT, + fn put_SubformatStyle(&mut self, value: *mut TimedTextStyle) -> HRESULT + }} + impl ITimedTextSubformat { + #[inline] pub unsafe fn get_start_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_start_index(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_StartIndex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_length(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Length)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_subformat_style(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SubformatStyle)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_subformat_style(&mut self, value: &TimedTextStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_SubformatStyle)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITimedTextLine, 2542632162, 29448, 19558, 190, 80, 101, 119, 114, 137, 245, 223); + RT_INTERFACE!{interface ITimedTextLine(ITimedTextLineVtbl): IInspectable(IInspectableVtbl) [IID_ITimedTextLine] { + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Text(&mut self, value: HSTRING) -> HRESULT, + fn get_Subformats(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl ITimedTextLine { + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Text)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_subformats(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subformats)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TimedTextSubformat: ITimedTextSubformat} + DEFINE_IID!(IID_ISingleSelectMediaTrackList, 1998614303, 49999, 18767, 128, 119, 43, 173, 159, 244, 236, 241); + RT_INTERFACE!{interface ISingleSelectMediaTrackList(ISingleSelectMediaTrackListVtbl): IInspectable(IInspectableVtbl) [IID_ISingleSelectMediaTrackList] { + fn add_SelectedIndexChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectedIndexChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn put_SelectedIndex(&mut self, value: i32) -> HRESULT, + fn get_SelectedIndex(&mut self, out: *mut i32) -> HRESULT + }} + impl ISingleSelectMediaTrackList { + #[inline] pub unsafe fn add_selected_index_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SelectedIndexChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_selected_index_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SelectedIndexChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_selected_index(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectedIndex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaTrack, 65141500, 51505, 18714, 180, 107, 193, 14, 232, 194, 86, 183); + RT_INTERFACE!{interface IMediaTrack(IMediaTrackVtbl): IInspectable(IInspectableVtbl) [IID_IMediaTrack] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TrackKind(&mut self, out: *mut MediaTrackKind) -> HRESULT, + fn put_Label(&mut self, value: HSTRING) -> HRESULT, + fn get_Label(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMediaTrack { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_track_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrackKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_label(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Label)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_label(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Label)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITimedMetadataTrackError, 3010885909, 16660, 18457, 185, 217, 221, 118, 8, 158, 114, 248); + RT_INTERFACE!{interface ITimedMetadataTrackError(ITimedMetadataTrackErrorVtbl): IInspectable(IInspectableVtbl) [IID_ITimedMetadataTrackError] { + fn get_ErrorCode(&mut self, out: *mut TimedMetadataTrackErrorCode) -> HRESULT, + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl ITimedMetadataTrackError { + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaCueEventArgs, 3509536759, 24484, 20072, 159, 229, 50, 22, 13, 206, 229, 126); + RT_INTERFACE!{interface IMediaCueEventArgs(IMediaCueEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaCueEventArgs] { + fn get_Cue(&mut self, out: *mut *mut IMediaCue) -> HRESULT + }} + impl IMediaCueEventArgs { + #[inline] pub unsafe fn get_cue(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Cue)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITimedMetadataTrackFailedEventArgs, 2776615377, 26505, 19789, 176, 127, 132, 180, 243, 26, 203, 112); + RT_INTERFACE!{interface ITimedMetadataTrackFailedEventArgs(ITimedMetadataTrackFailedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITimedMetadataTrackFailedEventArgs] { + fn get_Error(&mut self, out: *mut *mut TimedMetadataTrackError) -> HRESULT + }} + impl ITimedMetadataTrackFailedEventArgs { + #[inline] pub unsafe fn get_error(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TimedMetadataTrackError: ITimedMetadataTrackError} + DEFINE_IID!(IID_IDataCue, 2088724333, 8124, 20013, 154, 135, 238, 56, 189, 29, 198, 55); + RT_INTERFACE!{interface IDataCue(IDataCueVtbl): IInspectable(IInspectableVtbl) [IID_IDataCue] { + #[cfg(feature="windows.storage")] fn put_Data(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IDataCue { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_data(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITimedMetadataTrackFactory, 2379576849, 38835, 19999, 133, 44, 15, 72, 44, 129, 173, 38); + RT_INTERFACE!{static interface ITimedMetadataTrackFactory(ITimedMetadataTrackFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITimedMetadataTrackFactory] { + fn Create(&mut self, id: HSTRING, language: HSTRING, kind: TimedMetadataKind, out: *mut *mut TimedMetadataTrack) -> HRESULT + }} + impl ITimedMetadataTrackFactory { + #[inline] pub unsafe fn create(&mut self, id: &HStringArg, language: &HStringArg, kind: TimedMetadataKind) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, id.get(), language.get(), kind, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITimedMetadataTrack, 2657807774, 63098, 18857, 179, 48, 207, 3, 176, 233, 207, 7); + RT_INTERFACE!{interface ITimedMetadataTrack(ITimedMetadataTrackVtbl): IInspectable(IInspectableVtbl) [IID_ITimedMetadataTrack] { + fn add_CueEntered(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CueEntered(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CueExited(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CueExited(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_TrackFailed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TrackFailed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Cues(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ActiveCues(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_TimedMetadataKind(&mut self, out: *mut TimedMetadataKind) -> HRESULT, + fn get_DispatchType(&mut self, out: *mut HSTRING) -> HRESULT, + fn AddCue(&mut self, cue: *mut IMediaCue) -> HRESULT, + fn RemoveCue(&mut self, cue: *mut IMediaCue) -> HRESULT + }} + impl ITimedMetadataTrack { + #[inline] pub unsafe fn add_cue_entered(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CueEntered)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_cue_entered(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CueEntered)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_cue_exited(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CueExited)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_cue_exited(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CueExited)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_track_failed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TrackFailed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_track_failed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TrackFailed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cues(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Cues)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_active_cues(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActiveCues)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_timed_metadata_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimedMetadataKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dispatch_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DispatchType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_cue(&mut self, cue: &IMediaCue) -> Result<()> { + let hr = ((*self.lpVtbl).AddCue)(self, cue as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_cue(&mut self, cue: &IMediaCue) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveCue)(self, cue as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaCueEventArgs: IMediaCueEventArgs} + RT_CLASS!{class TimedMetadataTrackFailedEventArgs: ITimedMetadataTrackFailedEventArgs} + DEFINE_IID!(IID_ITimedTextSourceResolveResultEventArgs, 1217428636, 56536, 19507, 154, 211, 108, 220, 231, 177, 197, 102); + RT_INTERFACE!{interface ITimedTextSourceResolveResultEventArgs(ITimedTextSourceResolveResultEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITimedTextSourceResolveResultEventArgs] { + fn get_Error(&mut self, out: *mut *mut TimedMetadataTrackError) -> HRESULT, + fn get_Tracks(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl ITimedTextSourceResolveResultEventArgs { + #[inline] pub unsafe fn get_error(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Error)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tracks(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tracks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITimedTextSource, 3303906214, 4127, 16461, 169, 73, 130, 243, 63, 205, 147, 183); + RT_INTERFACE!{interface ITimedTextSource(ITimedTextSourceVtbl): IInspectable(IInspectableVtbl) [IID_ITimedTextSource] { + fn add_Resolved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Resolved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ITimedTextSource { + #[inline] pub unsafe fn add_resolved(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Resolved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_resolved(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Resolved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class TimedTextSourceResolveResultEventArgs: ITimedTextSourceResolveResultEventArgs} + DEFINE_IID!(IID_ITimedTextSourceStatics, 2117146707, 39610, 19140, 187, 152, 47, 177, 118, 195, 191, 221); + RT_INTERFACE!{static interface ITimedTextSourceStatics(ITimedTextSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ITimedTextSourceStatics] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFromStream(&mut self, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut TimedTextSource) -> HRESULT, + fn CreateFromUri(&mut self, uri: *mut super::super::foundation::Uri, out: *mut *mut TimedTextSource) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFromStreamWithLanguage(&mut self, stream: *mut super::super::storage::streams::IRandomAccessStream, defaultLanguage: HSTRING, out: *mut *mut TimedTextSource) -> HRESULT, + fn CreateFromUriWithLanguage(&mut self, uri: *mut super::super::foundation::Uri, defaultLanguage: HSTRING, out: *mut *mut TimedTextSource) -> HRESULT + }} + impl ITimedTextSourceStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_stream(&mut self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromStream)(self, stream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_uri(&mut self, uri: &super::super::foundation::Uri) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromUri)(self, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_stream_with_language(&mut self, stream: &super::super::storage::streams::IRandomAccessStream, defaultLanguage: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromStreamWithLanguage)(self, stream as *const _ as *mut _, defaultLanguage.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_uri_with_language(&mut self, uri: &super::super::foundation::Uri, defaultLanguage: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromUriWithLanguage)(self, uri as *const _ as *mut _, defaultLanguage.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoTrackSupportInfo, 1270166688, 64607, 17677, 143, 240, 119, 141, 89, 4, 134, 222); + RT_INTERFACE!{interface IVideoTrackSupportInfo(IVideoTrackSupportInfoVtbl): IInspectable(IInspectableVtbl) [IID_IVideoTrackSupportInfo] { + fn get_DecoderStatus(&mut self, out: *mut MediaDecoderStatus) -> HRESULT, + fn get_MediaSourceStatus(&mut self, out: *mut MediaSourceStatus) -> HRESULT + }} + impl IVideoTrackSupportInfo { + #[inline] pub unsafe fn get_decoder_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DecoderStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_source_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediaSourceStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioTrackSupportInfo, 395046903, 52281, 17574, 185, 81, 74, 86, 83, 240, 115, 250); + RT_INTERFACE!{interface IAudioTrackSupportInfo(IAudioTrackSupportInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAudioTrackSupportInfo] { + fn get_DecoderStatus(&mut self, out: *mut MediaDecoderStatus) -> HRESULT, + fn get_Degradation(&mut self, out: *mut AudioDecoderDegradation) -> HRESULT, + fn get_DegradationReason(&mut self, out: *mut AudioDecoderDegradationReason) -> HRESULT, + fn get_MediaSourceStatus(&mut self, out: *mut MediaSourceStatus) -> HRESULT + }} + impl IAudioTrackSupportInfo { + #[inline] pub unsafe fn get_decoder_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DecoderStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_degradation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Degradation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_degradation_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DegradationReason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_source_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediaSourceStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoTrackOpenFailedEventArgs, 1987699249, 1273, 19586, 164, 238, 134, 2, 200, 187, 71, 84); + RT_INTERFACE!{interface IVideoTrackOpenFailedEventArgs(IVideoTrackOpenFailedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVideoTrackOpenFailedEventArgs] { + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IVideoTrackOpenFailedEventArgs { + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAudioTrackOpenFailedEventArgs, 4007508409, 47996, 16658, 191, 118, 147, 132, 103, 111, 130, 75); + RT_INTERFACE!{interface IAudioTrackOpenFailedEventArgs(IAudioTrackOpenFailedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAudioTrackOpenFailedEventArgs] { + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IAudioTrackOpenFailedEventArgs { + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoTrack, 2582886387, 58008, 17302, 187, 106, 165, 27, 230, 162, 162, 10); + RT_INTERFACE!{interface IVideoTrack(IVideoTrackVtbl): IInspectable(IInspectableVtbl) [IID_IVideoTrack] { + fn add_OpenFailed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_OpenFailed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetEncodingProperties(&mut self, out: *mut *mut super::mediaproperties::VideoEncodingProperties) -> HRESULT, + fn get_PlaybackItem(&mut self, out: *mut *mut super::playback::MediaPlaybackItem) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SupportInfo(&mut self, out: *mut *mut VideoTrackSupportInfo) -> HRESULT + }} + impl IVideoTrack { + #[inline] pub unsafe fn add_open_failed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_OpenFailed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_open_failed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_OpenFailed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_encoding_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetEncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaybackItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_support_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VideoTrack: IMediaTrack} + RT_CLASS!{class VideoTrackOpenFailedEventArgs: IVideoTrackOpenFailedEventArgs} + RT_CLASS!{class VideoTrackSupportInfo: IVideoTrackSupportInfo} + DEFINE_IID!(IID_IAudioTrack, 4063981175, 16119, 16606, 185, 67, 6, 139, 19, 33, 112, 29); + RT_INTERFACE!{interface IAudioTrack(IAudioTrackVtbl): IInspectable(IInspectableVtbl) [IID_IAudioTrack] { + fn add_OpenFailed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_OpenFailed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetEncodingProperties(&mut self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, + fn get_PlaybackItem(&mut self, out: *mut *mut super::playback::MediaPlaybackItem) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SupportInfo(&mut self, out: *mut *mut AudioTrackSupportInfo) -> HRESULT + }} + impl IAudioTrack { + #[inline] pub unsafe fn add_open_failed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_OpenFailed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_open_failed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_OpenFailed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_encoding_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetEncodingProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_playback_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaybackItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_support_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AudioTrack: IMediaTrack} + RT_CLASS!{class AudioTrackOpenFailedEventArgs: IAudioTrackOpenFailedEventArgs} + RT_CLASS!{class AudioTrackSupportInfo: IAudioTrackSupportInfo} + DEFINE_IID!(IID_ITimedMetadataTrack2, 565491272, 40861, 16570, 168, 243, 26, 146, 117, 58, 239, 11); + RT_INTERFACE!{interface ITimedMetadataTrack2(ITimedMetadataTrack2Vtbl): IInspectable(IInspectableVtbl) [IID_ITimedMetadataTrack2] { + fn get_PlaybackItem(&mut self, out: *mut *mut super::playback::MediaPlaybackItem) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ITimedMetadataTrack2 { + #[inline] pub unsafe fn get_playback_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaybackItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TimedTextCue: ITimedTextCue} + RT_CLASS!{class DataCue: IDataCue} +} // Windows.Media.Core +pub mod closedcaptioning { // Windows.Media.ClosedCaptioning +use ::prelude::*; + RT_ENUM! { enum ClosedCaptionStyle: i32 { + Default (ClosedCaptionStyle_Default) = 0, MonospacedWithSerifs (ClosedCaptionStyle_MonospacedWithSerifs) = 1, ProportionalWithSerifs (ClosedCaptionStyle_ProportionalWithSerifs) = 2, MonospacedWithoutSerifs (ClosedCaptionStyle_MonospacedWithoutSerifs) = 3, ProportionalWithoutSerifs (ClosedCaptionStyle_ProportionalWithoutSerifs) = 4, Casual (ClosedCaptionStyle_Casual) = 5, Cursive (ClosedCaptionStyle_Cursive) = 6, SmallCapitals (ClosedCaptionStyle_SmallCapitals) = 7, + }} + RT_ENUM! { enum ClosedCaptionEdgeEffect: i32 { + Default (ClosedCaptionEdgeEffect_Default) = 0, None (ClosedCaptionEdgeEffect_None) = 1, Raised (ClosedCaptionEdgeEffect_Raised) = 2, Depressed (ClosedCaptionEdgeEffect_Depressed) = 3, Uniform (ClosedCaptionEdgeEffect_Uniform) = 4, DropShadow (ClosedCaptionEdgeEffect_DropShadow) = 5, + }} + RT_ENUM! { enum ClosedCaptionOpacity: i32 { + Default (ClosedCaptionOpacity_Default) = 0, OneHundredPercent (ClosedCaptionOpacity_OneHundredPercent) = 1, SeventyFivePercent (ClosedCaptionOpacity_SeventyFivePercent) = 2, TwentyFivePercent (ClosedCaptionOpacity_TwentyFivePercent) = 3, ZeroPercent (ClosedCaptionOpacity_ZeroPercent) = 4, + }} + RT_ENUM! { enum ClosedCaptionColor: i32 { + Default (ClosedCaptionColor_Default) = 0, White (ClosedCaptionColor_White) = 1, Black (ClosedCaptionColor_Black) = 2, Red (ClosedCaptionColor_Red) = 3, Green (ClosedCaptionColor_Green) = 4, Blue (ClosedCaptionColor_Blue) = 5, Yellow (ClosedCaptionColor_Yellow) = 6, Magenta (ClosedCaptionColor_Magenta) = 7, Cyan (ClosedCaptionColor_Cyan) = 8, + }} + RT_ENUM! { enum ClosedCaptionSize: i32 { + Default (ClosedCaptionSize_Default) = 0, FiftyPercent (ClosedCaptionSize_FiftyPercent) = 1, OneHundredPercent (ClosedCaptionSize_OneHundredPercent) = 2, OneHundredFiftyPercent (ClosedCaptionSize_OneHundredFiftyPercent) = 3, TwoHundredPercent (ClosedCaptionSize_TwoHundredPercent) = 4, + }} + DEFINE_IID!(IID_IClosedCaptionPropertiesStatics, 279584644, 52272, 16705, 181, 3, 82, 114, 40, 158, 12, 32); + RT_INTERFACE!{static interface IClosedCaptionPropertiesStatics(IClosedCaptionPropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IClosedCaptionPropertiesStatics] { + fn get_FontColor(&mut self, out: *mut ClosedCaptionColor) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_ComputedFontColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + fn get_FontOpacity(&mut self, out: *mut ClosedCaptionOpacity) -> HRESULT, + fn get_FontSize(&mut self, out: *mut ClosedCaptionSize) -> HRESULT, + fn get_FontStyle(&mut self, out: *mut ClosedCaptionStyle) -> HRESULT, + fn get_FontEffect(&mut self, out: *mut ClosedCaptionEdgeEffect) -> HRESULT, + fn get_BackgroundColor(&mut self, out: *mut ClosedCaptionColor) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_ComputedBackgroundColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + fn get_BackgroundOpacity(&mut self, out: *mut ClosedCaptionOpacity) -> HRESULT, + fn get_RegionColor(&mut self, out: *mut ClosedCaptionColor) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_ComputedRegionColor(&mut self, out: *mut super::super::ui::Color) -> HRESULT, + fn get_RegionOpacity(&mut self, out: *mut ClosedCaptionOpacity) -> HRESULT + }} + impl IClosedCaptionPropertiesStatics { + #[inline] pub unsafe fn get_font_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_computed_font_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ComputedFontColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_opacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontOpacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_style(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStyle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_effect(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontEffect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BackgroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_computed_background_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ComputedBackgroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_opacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BackgroundOpacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_region_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RegionColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_computed_region_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ComputedRegionColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_region_opacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RegionOpacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IClosedCaptionPropertiesStatics [CLSID_ClosedCaptionProperties]} + DEFINE_CLSID!(CLSID_ClosedCaptionProperties = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,108,111,115,101,100,67,97,112,116,105,111,110,105,110,103,46,67,108,111,115,101,100,67,97,112,116,105,111,110,80,114,111,112,101,114,116,105,101,115,0]); +} // Windows.Media.ClosedCaptioning +pub mod streaming { // Windows.Media.Streaming +pub mod adaptive { // Windows.Media.Streaming.Adaptive +use ::prelude::*; + RT_ENUM! { enum AdaptiveMediaSourceCreationStatus: i32 { + Success (AdaptiveMediaSourceCreationStatus_Success) = 0, ManifestDownloadFailure (AdaptiveMediaSourceCreationStatus_ManifestDownloadFailure) = 1, ManifestParseFailure (AdaptiveMediaSourceCreationStatus_ManifestParseFailure) = 2, UnsupportedManifestContentType (AdaptiveMediaSourceCreationStatus_UnsupportedManifestContentType) = 3, UnsupportedManifestVersion (AdaptiveMediaSourceCreationStatus_UnsupportedManifestVersion) = 4, UnsupportedManifestProfile (AdaptiveMediaSourceCreationStatus_UnsupportedManifestProfile) = 5, UnknownFailure (AdaptiveMediaSourceCreationStatus_UnknownFailure) = 6, + }} + DEFINE_IID!(IID_IAdaptiveMediaSourceCreationResult, 1183233714, 32783, 20017, 144, 147, 118, 212, 120, 32, 19, 231); + RT_INTERFACE!{interface IAdaptiveMediaSourceCreationResult(IAdaptiveMediaSourceCreationResultVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceCreationResult] { + fn get_Status(&mut self, out: *mut AdaptiveMediaSourceCreationStatus) -> HRESULT, + fn get_MediaSource(&mut self, out: *mut *mut AdaptiveMediaSource) -> HRESULT, + #[cfg(feature="windows.web")] fn get_HttpResponseMessage(&mut self, out: *mut *mut ::rt::gen::windows::web::http::HttpResponseMessage) -> HRESULT + }} + impl IAdaptiveMediaSourceCreationResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.web")] #[inline] pub unsafe fn get_http_response_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HttpResponseMessage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AdaptiveMediaSource: IAdaptiveMediaSource} + RT_ACTIVATABLE!{IAdaptiveMediaSourceStatics [CLSID_AdaptiveMediaSource]} + DEFINE_CLSID!(CLSID_AdaptiveMediaSource = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,83,116,114,101,97,109,105,110,103,46,65,100,97,112,116,105,118,101,46,65,100,97,112,116,105,118,101,77,101,100,105,97,83,111,117,114,99,101,0]); + RT_CLASS!{class AdaptiveMediaSourceCreationResult: IAdaptiveMediaSourceCreationResult} + DEFINE_IID!(IID_IAdaptiveMediaSourceStatics, 1353104733, 26351, 19667, 149, 121, 158, 102, 5, 7, 220, 63); + RT_INTERFACE!{static interface IAdaptiveMediaSourceStatics(IAdaptiveMediaSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceStatics] { + fn IsContentTypeSupported(&mut self, contentType: HSTRING, out: *mut bool) -> HRESULT, + fn CreateFromUriAsync(&mut self, uri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.web"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.web")] fn CreateFromUriWithDownloaderAsync(&mut self, uri: *mut ::rt::gen::windows::foundation::Uri, httpClient: *mut ::rt::gen::windows::web::http::HttpClient, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFromStreamAsync(&mut self, stream: *mut ::rt::gen::windows::storage::streams::IInputStream, uri: *mut ::rt::gen::windows::foundation::Uri, contentType: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(all(feature="windows.storage",feature="windows.web"))] fn CreateFromStreamWithDownloaderAsync(&mut self, stream: *mut ::rt::gen::windows::storage::streams::IInputStream, uri: *mut ::rt::gen::windows::foundation::Uri, contentType: HSTRING, httpClient: *mut ::rt::gen::windows::web::http::HttpClient, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IAdaptiveMediaSourceStatics { + #[inline] pub unsafe fn is_content_type_supported(&mut self, contentType: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsContentTypeSupported)(self, contentType.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_uri_async(&mut self, uri: &::rt::gen::windows::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromUriAsync)(self, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.web")] #[inline] pub unsafe fn create_from_uri_with_downloader_async(&mut self, uri: &::rt::gen::windows::foundation::Uri, httpClient: &::rt::gen::windows::web::http::HttpClient) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromUriWithDownloaderAsync)(self, uri as *const _ as *mut _, httpClient as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_stream_async(&mut self, stream: &::rt::gen::windows::storage::streams::IInputStream, uri: &::rt::gen::windows::foundation::Uri, contentType: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromStreamAsync)(self, stream as *const _ as *mut _, uri as *const _ as *mut _, contentType.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(all(feature="windows.storage",feature="windows.web"))] #[inline] pub unsafe fn create_from_stream_with_downloader_async(&mut self, stream: &::rt::gen::windows::storage::streams::IInputStream, uri: &::rt::gen::windows::foundation::Uri, contentType: &HStringArg, httpClient: &::rt::gen::windows::web::http::HttpClient) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromStreamWithDownloaderAsync)(self, stream as *const _ as *mut _, uri as *const _ as *mut _, contentType.get(), httpClient as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdaptiveMediaSource, 1282618095, 54175, 17302, 180, 217, 4, 57, 87, 167, 201, 100); + RT_INTERFACE!{interface IAdaptiveMediaSource(IAdaptiveMediaSourceVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSource] { + fn get_IsLive(&mut self, out: *mut bool) -> HRESULT, + fn get_DesiredLiveOffset(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn put_DesiredLiveOffset(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_InitialBitrate(&mut self, out: *mut u32) -> HRESULT, + fn put_InitialBitrate(&mut self, value: u32) -> HRESULT, + fn get_CurrentDownloadBitrate(&mut self, out: *mut u32) -> HRESULT, + fn get_CurrentPlaybackBitrate(&mut self, out: *mut u32) -> HRESULT, + fn get_AvailableBitrates(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_DesiredMinBitrate(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_DesiredMinBitrate(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_DesiredMaxBitrate(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_DesiredMaxBitrate(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_AudioOnlyPlayback(&mut self, out: *mut bool) -> HRESULT, + fn get_InboundBitsPerSecond(&mut self, out: *mut u64) -> HRESULT, + fn get_InboundBitsPerSecondWindow(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn put_InboundBitsPerSecondWindow(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn add_DownloadBitrateChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadBitrateChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PlaybackBitrateChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackBitrateChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadFailed(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadFailed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAdaptiveMediaSource { + #[inline] pub unsafe fn get_is_live(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsLive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_live_offset(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredLiveOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_live_offset(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredLiveOffset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_initial_bitrate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InitialBitrate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_initial_bitrate(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_InitialBitrate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_download_bitrate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentDownloadBitrate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_playback_bitrate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentPlaybackBitrate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_available_bitrates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AvailableBitrates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_min_bitrate(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesiredMinBitrate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_min_bitrate(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredMinBitrate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_max_bitrate(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesiredMaxBitrate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_max_bitrate(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredMaxBitrate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_only_playback(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioOnlyPlayback)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_inbound_bits_per_second(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InboundBitsPerSecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_inbound_bits_per_second_window(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InboundBitsPerSecondWindow)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_inbound_bits_per_second_window(&mut self, value: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_InboundBitsPerSecondWindow)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_download_bitrate_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DownloadBitrateChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_download_bitrate_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DownloadBitrateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_playback_bitrate_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PlaybackBitrateChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_playback_bitrate_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PlaybackBitrateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_download_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DownloadRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_download_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DownloadRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_download_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DownloadCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_download_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DownloadCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_download_failed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DownloadFailed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_download_failed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DownloadFailed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AdaptiveMediaSourceDownloadBitrateChangedEventArgs: IAdaptiveMediaSourceDownloadBitrateChangedEventArgs} + RT_CLASS!{class AdaptiveMediaSourcePlaybackBitrateChangedEventArgs: IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs} + RT_CLASS!{class AdaptiveMediaSourceDownloadRequestedEventArgs: IAdaptiveMediaSourceDownloadRequestedEventArgs} + RT_CLASS!{class AdaptiveMediaSourceDownloadCompletedEventArgs: IAdaptiveMediaSourceDownloadCompletedEventArgs} + RT_CLASS!{class AdaptiveMediaSourceDownloadFailedEventArgs: IAdaptiveMediaSourceDownloadFailedEventArgs} + DEFINE_IID!(IID_IAdaptiveMediaSource2, 394855234, 26464, 19385, 165, 138, 247, 170, 152, 176, 140, 14); + RT_INTERFACE!{interface IAdaptiveMediaSource2(IAdaptiveMediaSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSource2] { + fn get_AdvancedSettings(&mut self, out: *mut *mut AdaptiveMediaSourceAdvancedSettings) -> HRESULT + }} + impl IAdaptiveMediaSource2 { + #[inline] pub unsafe fn get_advanced_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AdvancedSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AdaptiveMediaSourceAdvancedSettings: IAdaptiveMediaSourceAdvancedSettings} + DEFINE_IID!(IID_IAdaptiveMediaSourceAdvancedSettings, 1440421504, 6891, 18396, 170, 8, 154, 17, 97, 11, 164, 90); + RT_INTERFACE!{interface IAdaptiveMediaSourceAdvancedSettings(IAdaptiveMediaSourceAdvancedSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceAdvancedSettings] { + fn get_AllSegmentsIndependent(&mut self, out: *mut bool) -> HRESULT, + fn put_AllSegmentsIndependent(&mut self, value: bool) -> HRESULT, + fn get_DesiredBitrateHeadroomRatio(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_DesiredBitrateHeadroomRatio(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_BitrateDowngradeTriggerRatio(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_BitrateDowngradeTriggerRatio(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + }} + impl IAdaptiveMediaSourceAdvancedSettings { + #[inline] pub unsafe fn get_all_segments_independent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllSegmentsIndependent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_all_segments_independent(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllSegmentsIndependent)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_bitrate_headroom_ratio(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesiredBitrateHeadroomRatio)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_bitrate_headroom_ratio(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredBitrateHeadroomRatio)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitrate_downgrade_trigger_ratio(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BitrateDowngradeTriggerRatio)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_bitrate_downgrade_trigger_ratio(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_BitrateDowngradeTriggerRatio)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadBitrateChangedEventArgs, 1728842308, 57422, 20223, 129, 106, 23, 57, 159, 120, 244, 186); + RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadBitrateChangedEventArgs(IAdaptiveMediaSourceDownloadBitrateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDownloadBitrateChangedEventArgs] { + fn get_OldValue(&mut self, out: *mut u32) -> HRESULT, + fn get_NewValue(&mut self, out: *mut u32) -> HRESULT + }} + impl IAdaptiveMediaSourceDownloadBitrateChangedEventArgs { + #[inline] pub unsafe fn get_old_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OldValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs, 597860205, 32218, 19025, 135, 169, 111, 168, 197, 178, 146, 190); + RT_INTERFACE!{interface IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs(IAdaptiveMediaSourcePlaybackBitrateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs] { + fn get_OldValue(&mut self, out: *mut u32) -> HRESULT, + fn get_NewValue(&mut self, out: *mut u32) -> HRESULT, + fn get_AudioOnly(&mut self, out: *mut bool) -> HRESULT + }} + impl IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs { + #[inline] pub unsafe fn get_old_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OldValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_only(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioOnly)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum AdaptiveMediaSourceResourceType: i32 { + Manifest (AdaptiveMediaSourceResourceType_Manifest) = 0, InitializationSegment (AdaptiveMediaSourceResourceType_InitializationSegment) = 1, MediaSegment (AdaptiveMediaSourceResourceType_MediaSegment) = 2, Key (AdaptiveMediaSourceResourceType_Key) = 3, InitializationVector (AdaptiveMediaSourceResourceType_InitializationVector) = 4, + }} + DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadRequestedEventArgs, 3359629309, 17577, 18338, 191, 150, 3, 57, 139, 75, 250, 175); + RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadRequestedEventArgs(IAdaptiveMediaSourceDownloadRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDownloadRequestedEventArgs] { + fn get_ResourceType(&mut self, out: *mut AdaptiveMediaSourceResourceType) -> HRESULT, + fn get_ResourceUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_ResourceByteRangeOffset(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_ResourceByteRangeLength(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_Result(&mut self, out: *mut *mut AdaptiveMediaSourceDownloadResult) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut AdaptiveMediaSourceDownloadRequestedDeferral) -> HRESULT + }} + impl IAdaptiveMediaSourceDownloadRequestedEventArgs { + #[inline] pub unsafe fn get_resource_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResourceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_resource_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_resource_byte_range_offset(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceByteRangeOffset)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_resource_byte_range_length(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceByteRangeLength)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_result(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Result)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AdaptiveMediaSourceDownloadResult: IAdaptiveMediaSourceDownloadResult} + RT_CLASS!{class AdaptiveMediaSourceDownloadRequestedDeferral: IAdaptiveMediaSourceDownloadRequestedDeferral} + DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadResult, 4105165939, 48366, 19050, 159, 10, 254, 196, 30, 35, 57, 176); + RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadResult(IAdaptiveMediaSourceDownloadResultVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDownloadResult] { + fn get_ResourceUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn put_ResourceUri(&mut self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_InputStream(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IInputStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_InputStream(&mut self, value: *mut ::rt::gen::windows::storage::streams::IInputStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Buffer(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Buffer(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn get_ContentType(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ContentType(&mut self, value: HSTRING) -> HRESULT, + fn get_ExtendedStatus(&mut self, out: *mut u32) -> HRESULT, + fn put_ExtendedStatus(&mut self, value: u32) -> HRESULT + }} + impl IAdaptiveMediaSourceDownloadResult { + #[inline] pub unsafe fn get_resource_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_resource_uri(&mut self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_ResourceUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_input_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_input_stream(&mut self, value: &::rt::gen::windows::storage::streams::IInputStream) -> Result<()> { + let hr = ((*self.lpVtbl).put_InputStream)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Buffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_buffer(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_Buffer)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_type(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentType)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_extended_status(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExtendedStatus)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadResult2, 357903543, 31616, 19140, 134, 96, 164, 185, 127, 124, 112, 240); + RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadResult2(IAdaptiveMediaSourceDownloadResult2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDownloadResult2] { + fn get_ResourceByteRangeOffset(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_ResourceByteRangeOffset(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_ResourceByteRangeLength(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_ResourceByteRangeLength(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + }} + impl IAdaptiveMediaSourceDownloadResult2 { + #[inline] pub unsafe fn get_resource_byte_range_offset(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceByteRangeOffset)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_resource_byte_range_offset(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ResourceByteRangeOffset)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_resource_byte_range_length(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceByteRangeLength)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_resource_byte_range_length(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ResourceByteRangeLength)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadRequestedDeferral, 96898916, 64032, 19901, 152, 33, 75, 244, 201, 191, 119, 171); + RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadRequestedDeferral(IAdaptiveMediaSourceDownloadRequestedDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDownloadRequestedDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IAdaptiveMediaSourceDownloadRequestedDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadCompletedEventArgs, 421793219, 23351, 18970, 137, 112, 214, 33, 203, 108, 168, 59); + RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadCompletedEventArgs(IAdaptiveMediaSourceDownloadCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDownloadCompletedEventArgs] { + fn get_ResourceType(&mut self, out: *mut AdaptiveMediaSourceResourceType) -> HRESULT, + fn get_ResourceUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_ResourceByteRangeOffset(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_ResourceByteRangeLength(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + #[cfg(feature="windows.web")] fn get_HttpResponseMessage(&mut self, out: *mut *mut ::rt::gen::windows::web::http::HttpResponseMessage) -> HRESULT + }} + impl IAdaptiveMediaSourceDownloadCompletedEventArgs { + #[inline] pub unsafe fn get_resource_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResourceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_resource_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_resource_byte_range_offset(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceByteRangeOffset)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_resource_byte_range_length(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceByteRangeLength)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.web")] #[inline] pub unsafe fn get_http_response_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HttpResponseMessage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadFailedEventArgs, 930320456, 62635, 16548, 177, 53, 198, 223, 216, 189, 127, 241); + RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadFailedEventArgs(IAdaptiveMediaSourceDownloadFailedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDownloadFailedEventArgs] { + fn get_ResourceType(&mut self, out: *mut AdaptiveMediaSourceResourceType) -> HRESULT, + fn get_ResourceUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_ResourceByteRangeOffset(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_ResourceByteRangeLength(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + #[cfg(feature="windows.web")] fn get_HttpResponseMessage(&mut self, out: *mut *mut ::rt::gen::windows::web::http::HttpResponseMessage) -> HRESULT + }} + impl IAdaptiveMediaSourceDownloadFailedEventArgs { + #[inline] pub unsafe fn get_resource_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResourceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_resource_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_resource_byte_range_offset(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceByteRangeOffset)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_resource_byte_range_length(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResourceByteRangeLength)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.web")] #[inline] pub unsafe fn get_http_response_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HttpResponseMessage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Media.Streaming.Adaptive +} // Windows.Media.Streaming +pub mod contentrestrictions { // Windows.Media.ContentRestrictions +use ::prelude::*; + RT_ENUM! { enum RatedContentCategory: i32 { + General (RatedContentCategory_General) = 0, Application (RatedContentCategory_Application) = 1, Game (RatedContentCategory_Game) = 2, Movie (RatedContentCategory_Movie) = 3, Television (RatedContentCategory_Television) = 4, Music (RatedContentCategory_Music) = 5, + }} + RT_ENUM! { enum ContentAccessRestrictionLevel: i32 { + Allow (ContentAccessRestrictionLevel_Allow) = 0, Warn (ContentAccessRestrictionLevel_Warn) = 1, Block (ContentAccessRestrictionLevel_Block) = 2, Hide (ContentAccessRestrictionLevel_Hide) = 3, + }} + DEFINE_IID!(IID_IRatedContentDescription, 1766352607, 26290, 19907, 150, 177, 240, 144, 238, 222, 226, 85); + RT_INTERFACE!{interface IRatedContentDescription(IRatedContentDescriptionVtbl): IInspectable(IInspectableVtbl) [IID_IRatedContentDescription] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Id(&mut self, value: HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Image(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_Image(&mut self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, + fn get_Category(&mut self, out: *mut RatedContentCategory) -> HRESULT, + fn put_Category(&mut self, value: RatedContentCategory) -> HRESULT, + fn get_Ratings(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_Ratings(&mut self, value: *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IRatedContentDescription { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Id)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_image(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Image)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_image(&mut self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_Image)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_category(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Category)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_category(&mut self, value: RatedContentCategory) -> Result<()> { + let hr = ((*self.lpVtbl).put_Category)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ratings(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ratings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_ratings(&mut self, value: &super::super::foundation::collections::IVector) -> Result<()> { + let hr = ((*self.lpVtbl).put_Ratings)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRatedContentDescriptionFactory, 775479138, 39824, 20390, 137, 193, 75, 141, 47, 251, 53, 115); + RT_INTERFACE!{static interface IRatedContentDescriptionFactory(IRatedContentDescriptionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IRatedContentDescriptionFactory] { + fn Create(&mut self, id: HSTRING, title: HSTRING, category: RatedContentCategory, out: *mut *mut RatedContentDescription) -> HRESULT + }} + impl IRatedContentDescriptionFactory { + #[inline] pub unsafe fn create(&mut self, id: &HStringArg, title: &HStringArg, category: RatedContentCategory) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, id.get(), title.get(), category, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RatedContentDescription: IRatedContentDescription [IRatedContentDescriptionFactory] [CLSID_RatedContentDescription]} + DEFINE_CLSID!(CLSID_RatedContentDescription = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,110,116,101,110,116,82,101,115,116,114,105,99,116,105,111,110,115,46,82,97,116,101,100,67,111,110,116,101,110,116,68,101,115,99,114,105,112,116,105,111,110,0]); + DEFINE_IID!(IID_IContentRestrictionsBrowsePolicy, 2348888996, 17454, 17946, 135, 87, 250, 210, 245, 189, 55, 228); + RT_INTERFACE!{interface IContentRestrictionsBrowsePolicy(IContentRestrictionsBrowsePolicyVtbl): IInspectable(IInspectableVtbl) [IID_IContentRestrictionsBrowsePolicy] { + fn get_GeographicRegion(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MaxBrowsableAgeRating(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_PreferredAgeRating(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IContentRestrictionsBrowsePolicy { + #[inline] pub unsafe fn get_geographic_region(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GeographicRegion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_browsable_age_rating(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxBrowsableAgeRating)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_preferred_age_rating(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreferredAgeRating)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRatedContentRestrictions, 1065296843, 47623, 17409, 164, 157, 139, 146, 34, 32, 87, 35); + RT_INTERFACE!{interface IRatedContentRestrictions(IRatedContentRestrictionsVtbl): IInspectable(IInspectableVtbl) [IID_IRatedContentRestrictions] { + fn GetBrowsePolicyAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetRestrictionLevelAsync(&mut self, ratedContentDescription: *mut RatedContentDescription, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestContentAccessAsync(&mut self, ratedContentDescription: *mut RatedContentDescription, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_RestrictionsChanged(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RestrictionsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IRatedContentRestrictions { + #[inline] pub unsafe fn get_browse_policy_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBrowsePolicyAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_restriction_level_async(&mut self, ratedContentDescription: &RatedContentDescription) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRestrictionLevelAsync)(self, ratedContentDescription as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_content_access_async(&mut self, ratedContentDescription: &RatedContentDescription) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestContentAccessAsync)(self, ratedContentDescription as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_restrictions_changed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RestrictionsChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_restrictions_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RestrictionsChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ContentRestrictionsBrowsePolicy: IContentRestrictionsBrowsePolicy} + DEFINE_IID!(IID_IRatedContentRestrictionsFactory, 4216007062, 50109, 18704, 150, 25, 151, 207, 208, 105, 77, 86); + RT_INTERFACE!{static interface IRatedContentRestrictionsFactory(IRatedContentRestrictionsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IRatedContentRestrictionsFactory] { + fn CreateWithMaxAgeRating(&mut self, maxAgeRating: u32, out: *mut *mut RatedContentRestrictions) -> HRESULT + }} + impl IRatedContentRestrictionsFactory { + #[inline] pub unsafe fn create_with_max_age_rating(&mut self, maxAgeRating: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithMaxAgeRating)(self, maxAgeRating, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RatedContentRestrictions: IRatedContentRestrictions [IRatedContentRestrictionsFactory] [CLSID_RatedContentRestrictions]} + DEFINE_CLSID!(CLSID_RatedContentRestrictions = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,110,116,101,110,116,82,101,115,116,114,105,99,116,105,111,110,115,46,82,97,116,101,100,67,111,110,116,101,110,116,82,101,115,116,114,105,99,116,105,111,110,115,0]); +} // Windows.Media.ContentRestrictions +pub mod playlists { // Windows.Media.Playlists +use ::prelude::*; + RT_STRUCT! { struct PlaylistsContract { + + }} + RT_ENUM! { enum PlaylistFormat: i32 { + WindowsMedia (PlaylistFormat_WindowsMedia) = 0, Zune (PlaylistFormat_Zune) = 1, M3u (PlaylistFormat_M3u) = 2, + }} + DEFINE_IID!(IID_IPlaylist, 2151102197, 53060, 19863, 131, 179, 122, 8, 158, 154, 182, 99); + RT_INTERFACE!{interface IPlaylist(IPlaylistVtbl): IInspectable(IInspectableVtbl) [IID_IPlaylist] { + #[cfg(feature="windows.storage")] fn get_Files(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn SaveAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows.storage")] fn SaveAsAsync(&mut self, saveLocation: *mut super::super::storage::IStorageFolder, desiredName: HSTRING, option: super::super::storage::NameCollisionOption, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn SaveAsWithFormatAsync(&mut self, saveLocation: *mut super::super::storage::IStorageFolder, desiredName: HSTRING, option: super::super::storage::NameCollisionOption, playlistFormat: PlaylistFormat, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPlaylist { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_files(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Files)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn save_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn save_as_async(&mut self, saveLocation: &super::super::storage::IStorageFolder, desiredName: &HStringArg, option: super::super::storage::NameCollisionOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAsAsync)(self, saveLocation as *const _ as *mut _, desiredName.get(), option, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn save_as_with_format_async(&mut self, saveLocation: &super::super::storage::IStorageFolder, desiredName: &HStringArg, option: super::super::storage::NameCollisionOption, playlistFormat: PlaylistFormat) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAsWithFormatAsync)(self, saveLocation as *const _ as *mut _, desiredName.get(), option, playlistFormat, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPlaylistStatics, 3317903821, 33273, 20467, 149, 185, 112, 182, 255, 4, 107, 104); + RT_INTERFACE!{static interface IPlaylistStatics(IPlaylistStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPlaylistStatics] { + #[cfg(feature="windows.storage")] fn LoadAsync(&mut self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPlaylistStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_async(&mut self, file: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Playlist: IPlaylist} + RT_ACTIVATABLE!{IPlaylistStatics [CLSID_Playlist]} + DEFINE_CLSID!(CLSID_Playlist = &[87,105,110,100,111,119,115,46,77,101,100,105,97,46,80,108,97,121,108,105,115,116,115,46,80,108,97,121,108,105,115,116,0]); +} // Windows.Media.Playlists +} // Windows.Media +#[cfg(feature="windows.networking")] +pub mod networking { // Windows.Networking +use ::prelude::*; + RT_ENUM! { enum HostNameSortOptions: u32 { + None (HostNameSortOptions_None) = 0, OptimizeForLongConnections (HostNameSortOptions_OptimizeForLongConnections) = 2, + }} + RT_ENUM! { enum HostNameType: i32 { + DomainName (HostNameType_DomainName) = 0, Ipv4 (HostNameType_Ipv4) = 1, Ipv6 (HostNameType_Ipv6) = 2, Bluetooth (HostNameType_Bluetooth) = 3, + }} + RT_ENUM! { enum DomainNameType: i32 { + Suffix (DomainNameType_Suffix) = 0, FullyQualified (DomainNameType_FullyQualified) = 1, + }} + DEFINE_IID!(IID_IHostNameStatics, 4136424639, 41864, 20107, 145, 234, 84, 221, 109, 217, 1, 192); + RT_INTERFACE!{static interface IHostNameStatics(IHostNameStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IHostNameStatics] { + fn Compare(&mut self, value1: HSTRING, value2: HSTRING, out: *mut i32) -> HRESULT + }} + impl IHostNameStatics { + #[inline] pub unsafe fn compare(&mut self, value1: &HStringArg, value2: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Compare)(self, value1.get(), value2.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHostName, 3213806253, 60822, 18855, 144, 132, 212, 22, 202, 232, 141, 203); + RT_INTERFACE!{interface IHostName(IHostNameVtbl): IInspectable(IInspectableVtbl) [IID_IHostName] { + fn get_IPInformation(&mut self, out: *mut *mut connectivity::IPInformation) -> HRESULT, + fn get_RawName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CanonicalName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Type(&mut self, out: *mut HostNameType) -> HRESULT, + fn IsEqual(&mut self, hostName: *mut HostName, out: *mut bool) -> HRESULT + }} + impl IHostName { + #[inline] pub unsafe fn get_ipinformation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IPInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_raw_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RawName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_canonical_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CanonicalName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_equal(&mut self, hostName: &HostName) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEqual)(self, hostName as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class HostName: IHostName [IHostNameFactory] [CLSID_HostName]} + RT_ACTIVATABLE!{IHostNameStatics [CLSID_HostName]} + DEFINE_CLSID!(CLSID_HostName = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,72,111,115,116,78,97,109,101,0]); + DEFINE_IID!(IID_IHostNameFactory, 1166812141, 28975, 17782, 173, 241, 194, 11, 44, 100, 53, 88); + RT_INTERFACE!{static interface IHostNameFactory(IHostNameFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IHostNameFactory] { + fn CreateHostName(&mut self, hostName: HSTRING, out: *mut *mut HostName) -> HRESULT + }} + impl IHostNameFactory { + #[inline] pub unsafe fn create_host_name(&mut self, hostName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateHostName)(self, hostName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEndpointPair, 866167350, 63738, 19248, 184, 86, 118, 81, 124, 59, 208, 109); + RT_INTERFACE!{interface IEndpointPair(IEndpointPairVtbl): IInspectable(IInspectableVtbl) [IID_IEndpointPair] { + fn get_LocalHostName(&mut self, out: *mut *mut HostName) -> HRESULT, + fn put_LocalHostName(&mut self, value: *mut HostName) -> HRESULT, + fn get_LocalServiceName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_LocalServiceName(&mut self, value: HSTRING) -> HRESULT, + fn get_RemoteHostName(&mut self, out: *mut *mut HostName) -> HRESULT, + fn put_RemoteHostName(&mut self, value: *mut HostName) -> HRESULT, + fn get_RemoteServiceName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RemoteServiceName(&mut self, value: HSTRING) -> HRESULT + }} + impl IEndpointPair { + #[inline] pub unsafe fn get_local_host_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalHostName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_local_host_name(&mut self, value: &HostName) -> Result<()> { + let hr = ((*self.lpVtbl).put_LocalHostName)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_service_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalServiceName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_local_service_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_LocalServiceName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_host_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteHostName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_remote_host_name(&mut self, value: &HostName) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteHostName)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_service_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteServiceName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_remote_service_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteServiceName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEndpointPairFactory, 3054098801, 25824, 17451, 170, 111, 204, 140, 143, 24, 31, 120); + RT_INTERFACE!{static interface IEndpointPairFactory(IEndpointPairFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IEndpointPairFactory] { + fn CreateEndpointPair(&mut self, localHostName: *mut HostName, localServiceName: HSTRING, remoteHostName: *mut HostName, remoteServiceName: HSTRING, out: *mut *mut EndpointPair) -> HRESULT + }} + impl IEndpointPairFactory { + #[inline] pub unsafe fn create_endpoint_pair(&mut self, localHostName: &HostName, localServiceName: &HStringArg, remoteHostName: &HostName, remoteServiceName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateEndpointPair)(self, localHostName as *const _ as *mut _, localServiceName.get(), remoteHostName as *const _ as *mut _, remoteServiceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EndpointPair: IEndpointPair [IEndpointPairFactory] [CLSID_EndpointPair]} + DEFINE_CLSID!(CLSID_EndpointPair = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,69,110,100,112,111,105,110,116,80,97,105,114,0]); +pub mod connectivity { // Windows.Networking.Connectivity +use ::prelude::*; + RT_STRUCT! { struct WwanContract { + + }} + RT_ENUM! { enum WwanNetworkRegistrationState: i32 { + None (WwanNetworkRegistrationState_None) = 0, Deregistered (WwanNetworkRegistrationState_Deregistered) = 1, Searching (WwanNetworkRegistrationState_Searching) = 2, Home (WwanNetworkRegistrationState_Home) = 3, Roaming (WwanNetworkRegistrationState_Roaming) = 4, Partner (WwanNetworkRegistrationState_Partner) = 5, Denied (WwanNetworkRegistrationState_Denied) = 6, + }} + RT_ENUM! { enum WwanDataClass: u32 { + None (WwanDataClass_None) = 0, Gprs (WwanDataClass_Gprs) = 1, Edge (WwanDataClass_Edge) = 2, Umts (WwanDataClass_Umts) = 4, Hsdpa (WwanDataClass_Hsdpa) = 8, Hsupa (WwanDataClass_Hsupa) = 16, LteAdvanced (WwanDataClass_LteAdvanced) = 32, Cdma1xRtt (WwanDataClass_Cdma1xRtt) = 65536, Cdma1xEvdo (WwanDataClass_Cdma1xEvdo) = 131072, Cdma1xEvdoRevA (WwanDataClass_Cdma1xEvdoRevA) = 262144, Cdma1xEvdv (WwanDataClass_Cdma1xEvdv) = 524288, Cdma3xRtt (WwanDataClass_Cdma3xRtt) = 1048576, Cdma1xEvdoRevB (WwanDataClass_Cdma1xEvdoRevB) = 2097152, CdmaUmb (WwanDataClass_CdmaUmb) = 4194304, Custom (WwanDataClass_Custom) = 2147483648, + }} + DEFINE_IID!(IID_IWwanConnectionProfileDetails, 239970558, 33631, 19955, 130, 253, 223, 85, 110, 188, 9, 239); + RT_INTERFACE!{interface IWwanConnectionProfileDetails(IWwanConnectionProfileDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IWwanConnectionProfileDetails] { + fn get_HomeProviderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AccessPointName(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetNetworkRegistrationState(&mut self, out: *mut WwanNetworkRegistrationState) -> HRESULT, + fn GetCurrentDataClass(&mut self, out: *mut WwanDataClass) -> HRESULT + }} + impl IWwanConnectionProfileDetails { + #[inline] pub unsafe fn get_home_provider_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HomeProviderId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_access_point_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccessPointName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_registration_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetNetworkRegistrationState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_data_class(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCurrentDataClass)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class WwanConnectionProfileDetails: IWwanConnectionProfileDetails} + RT_CLASS!{class IPInformation: IIPInformation} + RT_ENUM! { enum NetworkCostType: i32 { + Unknown (NetworkCostType_Unknown) = 0, Unrestricted (NetworkCostType_Unrestricted) = 1, Fixed (NetworkCostType_Fixed) = 2, Variable (NetworkCostType_Variable) = 3, + }} + RT_ENUM! { enum NetworkConnectivityLevel: i32 { + None (NetworkConnectivityLevel_None) = 0, LocalAccess (NetworkConnectivityLevel_LocalAccess) = 1, ConstrainedInternetAccess (NetworkConnectivityLevel_ConstrainedInternetAccess) = 2, InternetAccess (NetworkConnectivityLevel_InternetAccess) = 3, + }} + RT_ENUM! { enum NetworkTypes: u32 { + None (NetworkTypes_None) = 0, Internet (NetworkTypes_Internet) = 1, PrivateNetwork (NetworkTypes_PrivateNetwork) = 2, + }} + RT_ENUM! { enum RoamingStates: u32 { + None (RoamingStates_None) = 0, NotRoaming (RoamingStates_NotRoaming) = 1, Roaming (RoamingStates_Roaming) = 2, + }} + RT_ENUM! { enum NetworkAuthenticationType: i32 { + None (NetworkAuthenticationType_None) = 0, Unknown (NetworkAuthenticationType_Unknown) = 1, Open80211 (NetworkAuthenticationType_Open80211) = 2, SharedKey80211 (NetworkAuthenticationType_SharedKey80211) = 3, Wpa (NetworkAuthenticationType_Wpa) = 4, WpaPsk (NetworkAuthenticationType_WpaPsk) = 5, WpaNone (NetworkAuthenticationType_WpaNone) = 6, Rsna (NetworkAuthenticationType_Rsna) = 7, RsnaPsk (NetworkAuthenticationType_RsnaPsk) = 8, Ihv (NetworkAuthenticationType_Ihv) = 9, + }} + RT_ENUM! { enum NetworkEncryptionType: i32 { + None (NetworkEncryptionType_None) = 0, Unknown (NetworkEncryptionType_Unknown) = 1, Wep (NetworkEncryptionType_Wep) = 2, Wep40 (NetworkEncryptionType_Wep40) = 3, Wep104 (NetworkEncryptionType_Wep104) = 4, Tkip (NetworkEncryptionType_Tkip) = 5, Ccmp (NetworkEncryptionType_Ccmp) = 6, WpaUseGroup (NetworkEncryptionType_WpaUseGroup) = 7, RsnUseGroup (NetworkEncryptionType_RsnUseGroup) = 8, Ihv (NetworkEncryptionType_Ihv) = 9, + }} + RT_ENUM! { enum DomainConnectivityLevel: i32 { + None (DomainConnectivityLevel_None) = 0, Unauthenticated (DomainConnectivityLevel_Unauthenticated) = 1, Authenticated (DomainConnectivityLevel_Authenticated) = 2, + }} + RT_ENUM! { enum DataUsageGranularity: i32 { + PerMinute (DataUsageGranularity_PerMinute) = 0, PerHour (DataUsageGranularity_PerHour) = 1, PerDay (DataUsageGranularity_PerDay) = 2, Total (DataUsageGranularity_Total) = 3, + }} + RT_ENUM! { enum CellularApnAuthenticationType: i32 { + None (CellularApnAuthenticationType_None) = 0, Pap (CellularApnAuthenticationType_Pap) = 1, Chap (CellularApnAuthenticationType_Chap) = 2, Mschapv2 (CellularApnAuthenticationType_Mschapv2) = 3, + }} + RT_ENUM! { enum TriStates: i32 { + DoNotCare (TriStates_DoNotCare) = 0, No (TriStates_No) = 1, Yes (TriStates_Yes) = 2, + }} + RT_STRUCT! { struct NetworkUsageStates { + Roaming: TriStates, Shared: TriStates, + }} + DEFINE_IID!(IID_IDataUsage, 3242401235, 45382, 19769, 185, 89, 12, 105, 176, 150, 197, 18); + RT_INTERFACE!{interface IDataUsage(IDataUsageVtbl): IInspectable(IInspectableVtbl) [IID_IDataUsage] { + fn get_BytesSent(&mut self, out: *mut u64) -> HRESULT, + fn get_BytesReceived(&mut self, out: *mut u64) -> HRESULT + }} + impl IDataUsage { + #[inline] pub unsafe fn get_bytes_sent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BytesSent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bytes_received(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BytesReceived)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataPlanUsage, 3105966381, 15172, 18431, 179, 97, 190, 89, 230, 158, 209, 176); + RT_INTERFACE!{interface IDataPlanUsage(IDataPlanUsageVtbl): IInspectable(IInspectableVtbl) [IID_IDataPlanUsage] { + fn get_MegabytesUsed(&mut self, out: *mut u32) -> HRESULT, + fn get_LastSyncTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT + }} + impl IDataPlanUsage { + #[inline] pub unsafe fn get_megabytes_used(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MegabytesUsed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_sync_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LastSyncTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataPlanStatus, 2541390732, 14469, 16627, 136, 81, 66, 205, 43, 213, 104, 187); + RT_INTERFACE!{interface IDataPlanStatus(IDataPlanStatusVtbl): IInspectable(IInspectableVtbl) [IID_IDataPlanStatus] { + fn get_DataPlanUsage(&mut self, out: *mut *mut DataPlanUsage) -> HRESULT, + fn get_DataLimitInMegabytes(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_InboundBitsPerSecond(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_OutboundBitsPerSecond(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_NextBillingCycle(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxTransferSizeInMegabytes(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IDataPlanStatus { + #[inline] pub unsafe fn get_data_plan_usage(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataPlanUsage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_limit_in_megabytes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataLimitInMegabytes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_inbound_bits_per_second(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InboundBitsPerSecond)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_outbound_bits_per_second(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutboundBitsPerSecond)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_next_billing_cycle(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NextBillingCycle)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_transfer_size_in_megabytes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxTransferSizeInMegabytes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DataPlanUsage: IDataPlanUsage} + DEFINE_IID!(IID_IConnectionCost, 3134707753, 13334, 19216, 162, 2, 186, 192, 176, 117, 189, 174); + RT_INTERFACE!{interface IConnectionCost(IConnectionCostVtbl): IInspectable(IInspectableVtbl) [IID_IConnectionCost] { + fn get_NetworkCostType(&mut self, out: *mut NetworkCostType) -> HRESULT, + fn get_Roaming(&mut self, out: *mut bool) -> HRESULT, + fn get_OverDataLimit(&mut self, out: *mut bool) -> HRESULT, + fn get_ApproachingDataLimit(&mut self, out: *mut bool) -> HRESULT + }} + impl IConnectionCost { + #[inline] pub unsafe fn get_network_cost_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkCostType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_roaming(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Roaming)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_over_data_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OverDataLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_approaching_data_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ApproachingDataLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IConnectionCost2, 2383493637, 57865, 17737, 187, 37, 94, 13, 182, 145, 203, 5); + RT_INTERFACE!{interface IConnectionCost2(IConnectionCost2Vtbl): IInspectable(IInspectableVtbl) [IID_IConnectionCost2] { + fn get_BackgroundDataUsageRestricted(&mut self, out: *mut bool) -> HRESULT + }} + impl IConnectionCost2 { + #[inline] pub unsafe fn get_background_data_usage_restricted(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BackgroundDataUsageRestricted)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_INetworkSecuritySettings, 2090892941, 37243, 19295, 184, 77, 40, 247, 165, 172, 84, 2); + RT_INTERFACE!{interface INetworkSecuritySettings(INetworkSecuritySettingsVtbl): IInspectable(IInspectableVtbl) [IID_INetworkSecuritySettings] { + fn get_NetworkAuthenticationType(&mut self, out: *mut NetworkAuthenticationType) -> HRESULT, + fn get_NetworkEncryptionType(&mut self, out: *mut NetworkEncryptionType) -> HRESULT + }} + impl INetworkSecuritySettings { + #[inline] pub unsafe fn get_network_authentication_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkAuthenticationType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_encryption_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkEncryptionType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IConnectionProfile, 1908020284, 22926, 18896, 132, 235, 143, 235, 174, 220, 193, 149); + RT_INTERFACE!{interface IConnectionProfile(IConnectionProfileVtbl): IInspectable(IInspectableVtbl) [IID_IConnectionProfile] { + fn get_ProfileName(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetNetworkConnectivityLevel(&mut self, out: *mut NetworkConnectivityLevel) -> HRESULT, + fn GetNetworkNames(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetConnectionCost(&mut self, out: *mut *mut ConnectionCost) -> HRESULT, + fn GetDataPlanStatus(&mut self, out: *mut *mut DataPlanStatus) -> HRESULT, + fn get_NetworkAdapter(&mut self, out: *mut *mut NetworkAdapter) -> HRESULT, + fn GetLocalUsage(&mut self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, out: *mut *mut DataUsage) -> HRESULT, + fn GetLocalUsagePerRoamingStates(&mut self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: RoamingStates, out: *mut *mut DataUsage) -> HRESULT, + fn get_NetworkSecuritySettings(&mut self, out: *mut *mut NetworkSecuritySettings) -> HRESULT + }} + impl IConnectionProfile { + #[inline] pub unsafe fn get_profile_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProfileName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_connectivity_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetNetworkConnectivityLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_names(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNetworkNames)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_connection_cost(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConnectionCost)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_plan_status(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDataPlanStatus)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_adapter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkAdapter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_usage(&mut self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetLocalUsage)(self, startTime, endTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_usage_per_roaming_states(&mut self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: RoamingStates) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetLocalUsagePerRoamingStates)(self, startTime, endTime, states, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_security_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkSecuritySettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ConnectionCost: IConnectionCost} + RT_CLASS!{class DataPlanStatus: IDataPlanStatus} + RT_CLASS!{class NetworkAdapter: INetworkAdapter} + RT_CLASS!{class DataUsage: IDataUsage} + RT_CLASS!{class NetworkSecuritySettings: INetworkSecuritySettings} + DEFINE_IID!(IID_IWlanConnectionProfileDetails, 1444976843, 45914, 19441, 168, 132, 183, 85, 126, 136, 255, 134); + RT_INTERFACE!{interface IWlanConnectionProfileDetails(IWlanConnectionProfileDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IWlanConnectionProfileDetails] { + fn GetConnectedSsid(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IWlanConnectionProfileDetails { + #[inline] pub unsafe fn get_connected_ssid(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConnectedSsid)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IConnectivityInterval, 1336557567, 26438, 18468, 169, 100, 238, 216, 232, 127, 135, 9); + RT_INTERFACE!{interface IConnectivityInterval(IConnectivityIntervalVtbl): IInspectable(IInspectableVtbl) [IID_IConnectivityInterval] { + fn get_StartTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_ConnectionDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IConnectivityInterval { + #[inline] pub unsafe fn get_start_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_connection_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConnectionDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_INetworkUsage, 1239060430, 39301, 18727, 191, 91, 7, 43, 92, 101, 248, 217); + RT_INTERFACE!{interface INetworkUsage(INetworkUsageVtbl): IInspectable(IInspectableVtbl) [IID_INetworkUsage] { + fn get_BytesSent(&mut self, out: *mut u64) -> HRESULT, + fn get_BytesReceived(&mut self, out: *mut u64) -> HRESULT, + fn get_ConnectionDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl INetworkUsage { + #[inline] pub unsafe fn get_bytes_sent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BytesSent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bytes_received(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BytesReceived)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_connection_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConnectionDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAttributedNetworkUsage, 4150898745, 60578, 17899, 173, 225, 176, 54, 139, 117, 108, 73); + RT_INTERFACE!{interface IAttributedNetworkUsage(IAttributedNetworkUsageVtbl): IInspectable(IInspectableVtbl) [IID_IAttributedNetworkUsage] { + fn get_BytesSent(&mut self, out: *mut u64) -> HRESULT, + fn get_BytesReceived(&mut self, out: *mut u64) -> HRESULT, + fn get_AttributionId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AttributionName(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_AttributionThumbnail(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT + }} + impl IAttributedNetworkUsage { + #[inline] pub unsafe fn get_bytes_sent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BytesSent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bytes_received(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BytesReceived)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_attribution_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AttributionId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_attribution_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AttributionName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_attribution_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AttributionThumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IConnectionProfile2, 3791933765, 19615, 16396, 145, 80, 126, 199, 214, 226, 136, 138); + RT_INTERFACE!{interface IConnectionProfile2(IConnectionProfile2Vtbl): IInspectable(IInspectableVtbl) [IID_IConnectionProfile2] { + fn get_IsWwanConnectionProfile(&mut self, out: *mut bool) -> HRESULT, + fn get_IsWlanConnectionProfile(&mut self, out: *mut bool) -> HRESULT, + fn get_WwanConnectionProfileDetails(&mut self, out: *mut *mut WwanConnectionProfileDetails) -> HRESULT, + fn get_WlanConnectionProfileDetails(&mut self, out: *mut *mut WlanConnectionProfileDetails) -> HRESULT, + fn get_ServiceProviderGuid(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn GetSignalBars(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn GetDomainConnectivityLevel(&mut self, out: *mut DomainConnectivityLevel) -> HRESULT, + fn GetNetworkUsageAsync(&mut self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, granularity: DataUsageGranularity, states: NetworkUsageStates, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetConnectivityIntervalsAsync(&mut self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: NetworkUsageStates, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IConnectionProfile2 { + #[inline] pub unsafe fn get_is_wwan_connection_profile(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsWwanConnectionProfile)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_wlan_connection_profile(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsWlanConnectionProfile)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_wwan_connection_profile_details(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WwanConnectionProfileDetails)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_wlan_connection_profile_details(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WlanConnectionProfileDetails)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_provider_guid(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceProviderGuid)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_signal_bars(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSignalBars)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_connectivity_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetDomainConnectivityLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_usage_async(&mut self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, granularity: DataUsageGranularity, states: NetworkUsageStates) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNetworkUsageAsync)(self, startTime, endTime, granularity, states, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_connectivity_intervals_async(&mut self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: NetworkUsageStates) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConnectivityIntervalsAsync)(self, startTime, endTime, states, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WlanConnectionProfileDetails: IWlanConnectionProfileDetails} + RT_CLASS!{class NetworkUsage: INetworkUsage} + RT_CLASS!{class ConnectivityInterval: IConnectivityInterval} + DEFINE_IID!(IID_IConnectionProfile3, 1468802344, 19673, 16737, 128, 69, 32, 28, 253, 91, 17, 92); + RT_INTERFACE!{interface IConnectionProfile3(IConnectionProfile3Vtbl): IInspectable(IInspectableVtbl) [IID_IConnectionProfile3] { + fn GetAttributedNetworkUsageAsync(&mut self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: NetworkUsageStates, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IConnectionProfile3 { + #[inline] pub unsafe fn get_attributed_network_usage_async(&mut self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: NetworkUsageStates) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAttributedNetworkUsageAsync)(self, startTime, endTime, states, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AttributedNetworkUsage: IAttributedNetworkUsage} + DEFINE_IID!(IID_ILanIdentifierData, 2806940611, 54841, 17854, 163, 106, 196, 228, 174, 175, 109, 155); + RT_INTERFACE!{interface ILanIdentifierData(ILanIdentifierDataVtbl): IInspectable(IInspectableVtbl) [IID_ILanIdentifierData] { + fn get_Type(&mut self, out: *mut u32) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl ILanIdentifierData { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILanIdentifier, 1219122090, 4360, 17734, 166, 203, 154, 116, 218, 75, 123, 160); + RT_INTERFACE!{interface ILanIdentifier(ILanIdentifierVtbl): IInspectable(IInspectableVtbl) [IID_ILanIdentifier] { + fn get_InfrastructureId(&mut self, out: *mut *mut LanIdentifierData) -> HRESULT, + fn get_PortId(&mut self, out: *mut *mut LanIdentifierData) -> HRESULT, + fn get_NetworkAdapterId(&mut self, out: *mut Guid) -> HRESULT + }} + impl ILanIdentifier { + #[inline] pub unsafe fn get_infrastructure_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InfrastructureId)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_port_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PortId)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_adapter_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkAdapterId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class LanIdentifierData: ILanIdentifierData} + DEFINE_IID!(IID_NetworkStatusChangedEventHandler, 1908020287, 22926, 18896, 132, 235, 143, 235, 174, 220, 193, 149); + RT_DELEGATE!{delegate NetworkStatusChangedEventHandler(NetworkStatusChangedEventHandlerVtbl, NetworkStatusChangedEventHandlerImpl) [IID_NetworkStatusChangedEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable) -> HRESULT + }} + impl NetworkStatusChangedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_INetworkInformationStatics, 1349843025, 38157, 16741, 156, 21, 54, 86, 25, 72, 30, 234); + RT_INTERFACE!{static interface INetworkInformationStatics(INetworkInformationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_INetworkInformationStatics] { + fn GetConnectionProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetInternetConnectionProfile(&mut self, out: *mut *mut ConnectionProfile) -> HRESULT, + fn GetLanIdentifiers(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetHostNames(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetProxyConfigurationAsync(&mut self, uri: *mut super::super::foundation::Uri, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetSortedEndpointPairs(&mut self, destinationList: *mut super::super::foundation::collections::IIterable, sortOptions: super::HostNameSortOptions, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn add_NetworkStatusChanged(&mut self, networkStatusHandler: *mut NetworkStatusChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NetworkStatusChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl INetworkInformationStatics { + #[inline] pub unsafe fn get_connection_profiles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConnectionProfiles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_internet_connection_profile(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetInternetConnectionProfile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_lan_identifiers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetLanIdentifiers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_host_names(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetHostNames)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_proxy_configuration_async(&mut self, uri: &super::super::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetProxyConfigurationAsync)(self, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sorted_endpoint_pairs(&mut self, destinationList: &super::super::foundation::collections::IIterable, sortOptions: super::HostNameSortOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSortedEndpointPairs)(self, destinationList as *const _ as *mut _, sortOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_network_status_changed(&mut self, networkStatusHandler: &NetworkStatusChangedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NetworkStatusChanged)(self, networkStatusHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_network_status_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NetworkStatusChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ConnectionProfile: IConnectionProfile} + RT_CLASS!{class LanIdentifier: ILanIdentifier} + RT_CLASS!{class ProxyConfiguration: IProxyConfiguration} + DEFINE_IID!(IID_IConnectionProfileFilter, 541883592, 48429, 20109, 164, 179, 69, 94, 195, 55, 56, 138); + RT_INTERFACE!{interface IConnectionProfileFilter(IConnectionProfileFilterVtbl): IInspectable(IInspectableVtbl) [IID_IConnectionProfileFilter] { + fn put_IsConnected(&mut self, value: bool) -> HRESULT, + fn get_IsConnected(&mut self, out: *mut bool) -> HRESULT, + fn put_IsWwanConnectionProfile(&mut self, value: bool) -> HRESULT, + fn get_IsWwanConnectionProfile(&mut self, out: *mut bool) -> HRESULT, + fn put_IsWlanConnectionProfile(&mut self, value: bool) -> HRESULT, + fn get_IsWlanConnectionProfile(&mut self, out: *mut bool) -> HRESULT, + fn put_NetworkCostType(&mut self, value: NetworkCostType) -> HRESULT, + fn get_NetworkCostType(&mut self, out: *mut NetworkCostType) -> HRESULT, + fn put_ServiceProviderGuid(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ServiceProviderGuid(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IConnectionProfileFilter { + #[inline] pub unsafe fn set_is_connected(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsConnected)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_connected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsConnected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_wwan_connection_profile(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsWwanConnectionProfile)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_wwan_connection_profile(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsWwanConnectionProfile)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_wlan_connection_profile(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsWlanConnectionProfile)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_wlan_connection_profile(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsWlanConnectionProfile)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_network_cost_type(&mut self, value: NetworkCostType) -> Result<()> { + let hr = ((*self.lpVtbl).put_NetworkCostType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_cost_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkCostType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_service_provider_guid(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ServiceProviderGuid)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_provider_guid(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceProviderGuid)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IConnectionProfileFilter2, 3439759073, 50172, 20397, 157, 220, 89, 63, 170, 75, 120, 133); + RT_INTERFACE!{interface IConnectionProfileFilter2(IConnectionProfileFilter2Vtbl): IInspectable(IInspectableVtbl) [IID_IConnectionProfileFilter2] { + fn put_IsRoaming(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_IsRoaming(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_IsOverDataLimit(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_IsOverDataLimit(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_IsBackgroundDataUsageRestricted(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_IsBackgroundDataUsageRestricted(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_RawData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IConnectionProfileFilter2 { + #[inline] pub unsafe fn set_is_roaming(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsRoaming)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_roaming(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsRoaming)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_over_data_limit(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsOverDataLimit)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_over_data_limit(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsOverDataLimit)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_background_data_usage_restricted(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsBackgroundDataUsageRestricted)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_background_data_usage_restricted(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsBackgroundDataUsageRestricted)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_raw_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RawData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INetworkInformationStatics2, 1167912212, 10290, 18870, 186, 110, 226, 101, 240, 71, 134, 168); + RT_INTERFACE!{static interface INetworkInformationStatics2(INetworkInformationStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_INetworkInformationStatics2] { + fn FindConnectionProfilesAsync(&mut self, pProfileFilter: *mut ConnectionProfileFilter, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl INetworkInformationStatics2 { + #[inline] pub unsafe fn find_connection_profiles_async(&mut self, pProfileFilter: &ConnectionProfileFilter) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindConnectionProfilesAsync)(self, pProfileFilter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ConnectionProfileFilter: IConnectionProfileFilter} + DEFINE_IID!(IID_INetworkItem, 29117753, 62944, 17767, 162, 140, 66, 8, 12, 131, 27, 43); + RT_INTERFACE!{interface INetworkItem(INetworkItemVtbl): IInspectable(IInspectableVtbl) [IID_INetworkItem] { + fn get_NetworkId(&mut self, out: *mut Guid) -> HRESULT, + fn GetNetworkTypes(&mut self, out: *mut NetworkTypes) -> HRESULT + }} + impl INetworkItem { + #[inline] pub unsafe fn get_network_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_types(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetNetworkTypes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_INetworkAdapter, 995372547, 21384, 18796, 168, 163, 175, 253, 57, 174, 194, 230); + RT_INTERFACE!{interface INetworkAdapter(INetworkAdapterVtbl): IInspectable(IInspectableVtbl) [IID_INetworkAdapter] { + fn get_OutboundMaxBitsPerSecond(&mut self, out: *mut u64) -> HRESULT, + fn get_InboundMaxBitsPerSecond(&mut self, out: *mut u64) -> HRESULT, + fn get_IanaInterfaceType(&mut self, out: *mut u32) -> HRESULT, + fn get_NetworkItem(&mut self, out: *mut *mut NetworkItem) -> HRESULT, + fn get_NetworkAdapterId(&mut self, out: *mut Guid) -> HRESULT, + fn GetConnectedProfileAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl INetworkAdapter { + #[inline] pub unsafe fn get_outbound_max_bits_per_second(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutboundMaxBitsPerSecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_inbound_max_bits_per_second(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InboundMaxBitsPerSecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_iana_interface_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IanaInterfaceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_adapter_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkAdapterId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_connected_profile_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConnectedProfileAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NetworkItem: INetworkItem} + DEFINE_IID!(IID_IIPInformation, 3629204960, 5007, 18391, 155, 58, 54, 187, 72, 140, 239, 51); + RT_INTERFACE!{interface IIPInformation(IIPInformationVtbl): IInspectable(IInspectableVtbl) [IID_IIPInformation] { + fn get_NetworkAdapter(&mut self, out: *mut *mut NetworkAdapter) -> HRESULT, + fn get_PrefixLength(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IIPInformation { + #[inline] pub unsafe fn get_network_adapter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkAdapter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_prefix_length(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrefixLength)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProxyConfiguration, 4013580468, 36868, 19926, 183, 216, 179, 229, 2, 244, 170, 208); + RT_INTERFACE!{interface IProxyConfiguration(IProxyConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IProxyConfiguration] { + fn get_ProxyUris(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_CanConnectDirectly(&mut self, out: *mut bool) -> HRESULT + }} + impl IProxyConfiguration { + #[inline] pub unsafe fn get_proxy_uris(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProxyUris)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_connect_directly(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanConnectDirectly)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IConnectionSession, 4287651148, 63547, 16816, 138, 12, 20, 98, 217, 197, 107, 115); + RT_INTERFACE!{interface IConnectionSession(IConnectionSessionVtbl): IInspectable(IInspectableVtbl) [IID_IConnectionSession] { + fn get_ConnectionProfile(&mut self, out: *mut *mut ConnectionProfile) -> HRESULT + }} + impl IConnectionSession { + #[inline] pub unsafe fn get_connection_profile(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConnectionProfile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRoutePolicy, 296469676, 4039, 17124, 135, 66, 86, 153, 35, 177, 202, 17); + RT_INTERFACE!{interface IRoutePolicy(IRoutePolicyVtbl): IInspectable(IInspectableVtbl) [IID_IRoutePolicy] { + fn get_ConnectionProfile(&mut self, out: *mut *mut ConnectionProfile) -> HRESULT, + fn get_HostName(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn get_HostNameType(&mut self, out: *mut super::DomainNameType) -> HRESULT + }} + impl IRoutePolicy { + #[inline] pub unsafe fn get_connection_profile(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ConnectionProfile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_host_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HostName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_host_name_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HostNameType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRoutePolicyFactory, 906131763, 41358, 19893, 166, 151, 245, 143, 167, 54, 78, 68); + RT_INTERFACE!{static interface IRoutePolicyFactory(IRoutePolicyFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IRoutePolicyFactory] { + fn CreateRoutePolicy(&mut self, connectionProfile: *mut ConnectionProfile, hostName: *mut super::HostName, type_: super::DomainNameType, out: *mut *mut RoutePolicy) -> HRESULT + }} + impl IRoutePolicyFactory { + #[inline] pub unsafe fn create_route_policy(&mut self, connectionProfile: &ConnectionProfile, hostName: &super::HostName, type_: super::DomainNameType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateRoutePolicy)(self, connectionProfile as *const _ as *mut _, hostName as *const _ as *mut _, type_, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RoutePolicy: IRoutePolicy [IRoutePolicyFactory] [CLSID_RoutePolicy]} + DEFINE_CLSID!(CLSID_RoutePolicy = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,67,111,110,110,101,99,116,105,118,105,116,121,46,82,111,117,116,101,80,111,108,105,99,121,0]); + DEFINE_IID!(IID_ICellularApnContext, 1873095156, 61437, 17730, 154, 178, 112, 91, 191, 148, 148, 58); + RT_INTERFACE!{interface ICellularApnContext(ICellularApnContextVtbl): IInspectable(IInspectableVtbl) [IID_ICellularApnContext] { + fn get_ProviderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ProviderId(&mut self, value: HSTRING) -> HRESULT, + fn get_AccessPointName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AccessPointName(&mut self, value: HSTRING) -> HRESULT, + fn get_UserName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_UserName(&mut self, value: HSTRING) -> HRESULT, + fn get_Password(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Password(&mut self, value: HSTRING) -> HRESULT, + fn get_IsCompressionEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsCompressionEnabled(&mut self, value: bool) -> HRESULT, + fn get_AuthenticationType(&mut self, out: *mut CellularApnAuthenticationType) -> HRESULT, + fn put_AuthenticationType(&mut self, value: CellularApnAuthenticationType) -> HRESULT + }} + impl ICellularApnContext { + #[inline] pub unsafe fn get_provider_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProviderId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_provider_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProviderId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_access_point_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccessPointName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_access_point_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AccessPointName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_user_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_UserName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_password(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Password)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_password(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Password)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_compression_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCompressionEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_compression_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsCompressionEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_authentication_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AuthenticationType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_authentication_type(&mut self, value: CellularApnAuthenticationType) -> Result<()> { + let hr = ((*self.lpVtbl).put_AuthenticationType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IConnectivityManagerStatics, 1361106097, 20401, 18608, 175, 201, 66, 224, 9, 42, 129, 100); + RT_INTERFACE!{static interface IConnectivityManagerStatics(IConnectivityManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IConnectivityManagerStatics] { + fn AcquireConnectionAsync(&mut self, cellularApnContext: *mut CellularApnContext, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn AddHttpRoutePolicy(&mut self, routePolicy: *mut RoutePolicy) -> HRESULT, + fn RemoveHttpRoutePolicy(&mut self, routePolicy: *mut RoutePolicy) -> HRESULT + }} + impl IConnectivityManagerStatics { + #[inline] pub unsafe fn acquire_connection_async(&mut self, cellularApnContext: &CellularApnContext) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AcquireConnectionAsync)(self, cellularApnContext as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_http_route_policy(&mut self, routePolicy: &RoutePolicy) -> Result<()> { + let hr = ((*self.lpVtbl).AddHttpRoutePolicy)(self, routePolicy as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_http_route_policy(&mut self, routePolicy: &RoutePolicy) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveHttpRoutePolicy)(self, routePolicy as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CellularApnContext: ICellularApnContext} + RT_CLASS!{class ConnectionSession: IConnectionSession} + DEFINE_IID!(IID_INetworkStateChangeEventDetails, 520942387, 55206, 17629, 164, 233, 104, 124, 71, 107, 144, 61); + RT_INTERFACE!{interface INetworkStateChangeEventDetails(INetworkStateChangeEventDetailsVtbl): IInspectable(IInspectableVtbl) [IID_INetworkStateChangeEventDetails] { + fn get_HasNewInternetConnectionProfile(&mut self, out: *mut bool) -> HRESULT, + fn get_HasNewConnectionCost(&mut self, out: *mut bool) -> HRESULT, + fn get_HasNewNetworkConnectivityLevel(&mut self, out: *mut bool) -> HRESULT, + fn get_HasNewDomainConnectivityLevel(&mut self, out: *mut bool) -> HRESULT, + fn get_HasNewHostNameList(&mut self, out: *mut bool) -> HRESULT, + fn get_HasNewWwanRegistrationState(&mut self, out: *mut bool) -> HRESULT + }} + impl INetworkStateChangeEventDetails { + #[inline] pub unsafe fn get_has_new_internet_connection_profile(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasNewInternetConnectionProfile)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_new_connection_cost(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasNewConnectionCost)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_new_network_connectivity_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasNewNetworkConnectivityLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_new_domain_connectivity_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasNewDomainConnectivityLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_new_host_name_list(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasNewHostNameList)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_new_wwan_registration_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasNewWwanRegistrationState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_INetworkStateChangeEventDetails2, 3594764520, 12499, 20330, 173, 71, 106, 24, 115, 206, 179, 193); + RT_INTERFACE!{interface INetworkStateChangeEventDetails2(INetworkStateChangeEventDetails2Vtbl): IInspectable(IInspectableVtbl) [IID_INetworkStateChangeEventDetails2] { + fn get_HasNewTetheringOperationalState(&mut self, out: *mut bool) -> HRESULT, + fn get_HasNewTetheringClientCount(&mut self, out: *mut bool) -> HRESULT + }} + impl INetworkStateChangeEventDetails2 { + #[inline] pub unsafe fn get_has_new_tethering_operational_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasNewTetheringOperationalState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_new_tethering_client_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasNewTetheringClientCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{INetworkInformationStatics2 [CLSID_NetworkInformation]} + RT_ACTIVATABLE!{INetworkInformationStatics [CLSID_NetworkInformation]} + DEFINE_CLSID!(CLSID_NetworkInformation = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,67,111,110,110,101,99,116,105,118,105,116,121,46,78,101,116,119,111,114,107,73,110,102,111,114,109,97,116,105,111,110,0]); + RT_ACTIVATABLE!{IConnectivityManagerStatics [CLSID_ConnectivityManager]} + DEFINE_CLSID!(CLSID_ConnectivityManager = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,67,111,110,110,101,99,116,105,118,105,116,121,46,67,111,110,110,101,99,116,105,118,105,116,121,77,97,110,97,103,101,114,0]); + RT_CLASS!{class NetworkStateChangeEventDetails: INetworkStateChangeEventDetails} +} // Windows.Networking.Connectivity +pub mod networkoperators { // Windows.Networking.NetworkOperators +use ::prelude::*; + RT_ENUM! { enum DataClasses: u32 { + None (DataClasses_None) = 0, Gprs (DataClasses_Gprs) = 1, Edge (DataClasses_Edge) = 2, Umts (DataClasses_Umts) = 4, Hsdpa (DataClasses_Hsdpa) = 8, Hsupa (DataClasses_Hsupa) = 16, LteAdvanced (DataClasses_LteAdvanced) = 32, Cdma1xRtt (DataClasses_Cdma1xRtt) = 65536, Cdma1xEvdo (DataClasses_Cdma1xEvdo) = 131072, Cdma1xEvdoRevA (DataClasses_Cdma1xEvdoRevA) = 262144, Cdma1xEvdv (DataClasses_Cdma1xEvdv) = 524288, Cdma3xRtt (DataClasses_Cdma3xRtt) = 1048576, Cdma1xEvdoRevB (DataClasses_Cdma1xEvdoRevB) = 2097152, CdmaUmb (DataClasses_CdmaUmb) = 4194304, Custom (DataClasses_Custom) = 2147483648, + }} + RT_ENUM! { enum MobileBroadbandDeviceType: i32 { + Unknown (MobileBroadbandDeviceType_Unknown) = 0, Embedded (MobileBroadbandDeviceType_Embedded) = 1, Removable (MobileBroadbandDeviceType_Removable) = 2, Remote (MobileBroadbandDeviceType_Remote) = 3, + }} + RT_ENUM! { enum NetworkDeviceStatus: i32 { + DeviceNotReady (NetworkDeviceStatus_DeviceNotReady) = 0, DeviceReady (NetworkDeviceStatus_DeviceReady) = 1, SimNotInserted (NetworkDeviceStatus_SimNotInserted) = 2, BadSim (NetworkDeviceStatus_BadSim) = 3, DeviceHardwareFailure (NetworkDeviceStatus_DeviceHardwareFailure) = 4, AccountNotActivated (NetworkDeviceStatus_AccountNotActivated) = 5, DeviceLocked (NetworkDeviceStatus_DeviceLocked) = 6, DeviceBlocked (NetworkDeviceStatus_DeviceBlocked) = 7, + }} + RT_ENUM! { enum NetworkRegistrationState: i32 { + None (NetworkRegistrationState_None) = 0, Deregistered (NetworkRegistrationState_Deregistered) = 1, Searching (NetworkRegistrationState_Searching) = 2, Home (NetworkRegistrationState_Home) = 3, Roaming (NetworkRegistrationState_Roaming) = 4, Partner (NetworkRegistrationState_Partner) = 5, Denied (NetworkRegistrationState_Denied) = 6, + }} + RT_ENUM! { enum MobileBroadbandRadioState: i32 { + Off (MobileBroadbandRadioState_Off) = 0, On (MobileBroadbandRadioState_On) = 1, + }} + RT_ENUM! { enum NetworkOperatorEventMessageType: i32 { + Gsm (NetworkOperatorEventMessageType_Gsm) = 0, Cdma (NetworkOperatorEventMessageType_Cdma) = 1, Ussd (NetworkOperatorEventMessageType_Ussd) = 2, DataPlanThresholdReached (NetworkOperatorEventMessageType_DataPlanThresholdReached) = 3, DataPlanReset (NetworkOperatorEventMessageType_DataPlanReset) = 4, DataPlanDeleted (NetworkOperatorEventMessageType_DataPlanDeleted) = 5, ProfileConnected (NetworkOperatorEventMessageType_ProfileConnected) = 6, ProfileDisconnected (NetworkOperatorEventMessageType_ProfileDisconnected) = 7, RegisteredRoaming (NetworkOperatorEventMessageType_RegisteredRoaming) = 8, RegisteredHome (NetworkOperatorEventMessageType_RegisteredHome) = 9, TetheringEntitlementCheck (NetworkOperatorEventMessageType_TetheringEntitlementCheck) = 10, TetheringOperationalStateChanged (NetworkOperatorEventMessageType_TetheringOperationalStateChanged) = 11, TetheringNumberOfClientsChanged (NetworkOperatorEventMessageType_TetheringNumberOfClientsChanged) = 12, + }} + RT_ENUM! { enum MobileBroadbandAccountWatcherStatus: i32 { + Created (MobileBroadbandAccountWatcherStatus_Created) = 0, Started (MobileBroadbandAccountWatcherStatus_Started) = 1, EnumerationCompleted (MobileBroadbandAccountWatcherStatus_EnumerationCompleted) = 2, Stopped (MobileBroadbandAccountWatcherStatus_Stopped) = 3, Aborted (MobileBroadbandAccountWatcherStatus_Aborted) = 4, + }} + RT_ENUM! { enum TetheringOperationalState: i32 { + Unknown (TetheringOperationalState_Unknown) = 0, On (TetheringOperationalState_On) = 1, Off (TetheringOperationalState_Off) = 2, InTransition (TetheringOperationalState_InTransition) = 3, + }} + RT_ENUM! { enum TetheringCapability: i32 { + Enabled (TetheringCapability_Enabled) = 0, DisabledByGroupPolicy (TetheringCapability_DisabledByGroupPolicy) = 1, DisabledByHardwareLimitation (TetheringCapability_DisabledByHardwareLimitation) = 2, DisabledByOperator (TetheringCapability_DisabledByOperator) = 3, DisabledBySku (TetheringCapability_DisabledBySku) = 4, DisabledByRequiredAppNotInstalled (TetheringCapability_DisabledByRequiredAppNotInstalled) = 5, DisabledDueToUnknownCause (TetheringCapability_DisabledDueToUnknownCause) = 6, DisabledBySystemCapability (TetheringCapability_DisabledBySystemCapability) = 7, + }} + RT_ENUM! { enum TetheringOperationStatus: i32 { + Success (TetheringOperationStatus_Success) = 0, Unknown (TetheringOperationStatus_Unknown) = 1, MobileBroadbandDeviceOff (TetheringOperationStatus_MobileBroadbandDeviceOff) = 2, WiFiDeviceOff (TetheringOperationStatus_WiFiDeviceOff) = 3, EntitlementCheckTimeout (TetheringOperationStatus_EntitlementCheckTimeout) = 4, EntitlementCheckFailure (TetheringOperationStatus_EntitlementCheckFailure) = 5, OperationInProgress (TetheringOperationStatus_OperationInProgress) = 6, BluetoothDeviceOff (TetheringOperationStatus_BluetoothDeviceOff) = 7, NetworkLimitedConnectivity (TetheringOperationStatus_NetworkLimitedConnectivity) = 8, + }} + RT_ENUM! { enum MobileBroadbandPinLockState: i32 { + Unknown (MobileBroadbandPinLockState_Unknown) = 0, Unlocked (MobileBroadbandPinLockState_Unlocked) = 1, PinRequired (MobileBroadbandPinLockState_PinRequired) = 2, PinUnblockKeyRequired (MobileBroadbandPinLockState_PinUnblockKeyRequired) = 3, + }} + RT_ENUM! { enum MobileBroadbandPinType: i32 { + None (MobileBroadbandPinType_None) = 0, Custom (MobileBroadbandPinType_Custom) = 1, Pin1 (MobileBroadbandPinType_Pin1) = 2, Pin2 (MobileBroadbandPinType_Pin2) = 3, SimPin (MobileBroadbandPinType_SimPin) = 4, FirstSimPin (MobileBroadbandPinType_FirstSimPin) = 5, NetworkPin (MobileBroadbandPinType_NetworkPin) = 6, NetworkSubsetPin (MobileBroadbandPinType_NetworkSubsetPin) = 7, ServiceProviderPin (MobileBroadbandPinType_ServiceProviderPin) = 8, CorporatePin (MobileBroadbandPinType_CorporatePin) = 9, SubsidyLock (MobileBroadbandPinType_SubsidyLock) = 10, + }} + RT_ENUM! { enum MobileBroadbandPinFormat: i32 { + Unknown (MobileBroadbandPinFormat_Unknown) = 0, Numeric (MobileBroadbandPinFormat_Numeric) = 1, Alphanumeric (MobileBroadbandPinFormat_Alphanumeric) = 2, + }} + RT_ENUM! { enum MobileBroadbandUiccAppOperationStatus: i32 { + Success (MobileBroadbandUiccAppOperationStatus_Success) = 0, InvalidUiccFilePath (MobileBroadbandUiccAppOperationStatus_InvalidUiccFilePath) = 1, AccessConditionNotHeld (MobileBroadbandUiccAppOperationStatus_AccessConditionNotHeld) = 2, UiccBusy (MobileBroadbandUiccAppOperationStatus_UiccBusy) = 3, + }} + RT_ENUM! { enum UiccAppKind: i32 { + Unknown (UiccAppKind_Unknown) = 0, MF (UiccAppKind_MF) = 1, MFSim (UiccAppKind_MFSim) = 2, MFRuim (UiccAppKind_MFRuim) = 3, USim (UiccAppKind_USim) = 4, CSim (UiccAppKind_CSim) = 5, ISim (UiccAppKind_ISim) = 6, + }} + RT_ENUM! { enum UiccAppRecordKind: i32 { + Unknown (UiccAppRecordKind_Unknown) = 0, Transparent (UiccAppRecordKind_Transparent) = 1, RecordOriented (UiccAppRecordKind_RecordOriented) = 2, + }} + RT_ENUM! { enum UiccAccessCondition: i32 { + AlwaysAllowed (UiccAccessCondition_AlwaysAllowed) = 0, Pin1 (UiccAccessCondition_Pin1) = 1, Pin2 (UiccAccessCondition_Pin2) = 2, Pin3 (UiccAccessCondition_Pin3) = 3, Pin4 (UiccAccessCondition_Pin4) = 4, Administrative5 (UiccAccessCondition_Administrative5) = 5, Administrative6 (UiccAccessCondition_Administrative6) = 6, NeverAllowed (UiccAccessCondition_NeverAllowed) = 7, + }} + DEFINE_IID!(IID_IMobileBroadbandAccountStatics, 2860469540, 44993, 20424, 174, 154, 169, 23, 83, 16, 250, 173); + RT_INTERFACE!{static interface IMobileBroadbandAccountStatics(IMobileBroadbandAccountStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandAccountStatics] { + fn get_AvailableNetworkAccountIds(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn CreateFromNetworkAccountId(&mut self, networkAccountId: HSTRING, out: *mut *mut MobileBroadbandAccount) -> HRESULT + }} + impl IMobileBroadbandAccountStatics { + #[inline] pub unsafe fn get_available_network_account_ids(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AvailableNetworkAccountIds)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_network_account_id(&mut self, networkAccountId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromNetworkAccountId)(self, networkAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandAccount: IMobileBroadbandAccount} + RT_ACTIVATABLE!{IMobileBroadbandAccountStatics [CLSID_MobileBroadbandAccount]} + DEFINE_CLSID!(CLSID_MobileBroadbandAccount = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,115,46,77,111,98,105,108,101,66,114,111,97,100,98,97,110,100,65,99,99,111,117,110,116,0]); + DEFINE_IID!(IID_IMobileBroadbandAccount, 918703309, 52962, 17376, 166, 3, 238, 134, 163, 109, 101, 112); + RT_INTERFACE!{interface IMobileBroadbandAccount(IMobileBroadbandAccountVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandAccount] { + fn get_NetworkAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ServiceProviderGuid(&mut self, out: *mut Guid) -> HRESULT, + fn get_ServiceProviderName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CurrentNetwork(&mut self, out: *mut *mut MobileBroadbandNetwork) -> HRESULT, + fn get_CurrentDeviceInformation(&mut self, out: *mut *mut MobileBroadbandDeviceInformation) -> HRESULT + }} + impl IMobileBroadbandAccount { + #[inline] pub unsafe fn get_network_account_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_provider_guid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceProviderGuid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_provider_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceProviderName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_network(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentNetwork)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_device_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentDeviceInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandNetwork: IMobileBroadbandNetwork} + RT_CLASS!{class MobileBroadbandDeviceInformation: IMobileBroadbandDeviceInformation} + DEFINE_IID!(IID_IMobileBroadbandAccount2, 955592476, 4406, 16983, 149, 159, 182, 88, 163, 82, 182, 212); + RT_INTERFACE!{interface IMobileBroadbandAccount2(IMobileBroadbandAccount2Vtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandAccount2] { + fn GetConnectionProfiles(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMobileBroadbandAccount2 { + #[inline] pub unsafe fn get_connection_profiles(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConnectionProfiles)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMobileBroadbandDeviceInformation, 3872424296, 58241, 19566, 155, 232, 254, 21, 105, 105, 164, 70); + RT_INTERFACE!{interface IMobileBroadbandDeviceInformation(IMobileBroadbandDeviceInformationVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandDeviceInformation] { + fn get_NetworkDeviceStatus(&mut self, out: *mut NetworkDeviceStatus) -> HRESULT, + fn get_Manufacturer(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Model(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FirmwareInformation(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_CellularClass(&mut self, out: *mut super::super::devices::sms::CellularClass) -> HRESULT, + fn get_DataClasses(&mut self, out: *mut DataClasses) -> HRESULT, + fn get_CustomDataClass(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MobileEquipmentId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TelephoneNumbers(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SubscriberId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SimIccId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DeviceType(&mut self, out: *mut MobileBroadbandDeviceType) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CurrentRadioState(&mut self, out: *mut MobileBroadbandRadioState) -> HRESULT + }} + impl IMobileBroadbandDeviceInformation { + #[inline] pub unsafe fn get_network_device_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkDeviceStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_manufacturer(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Manufacturer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_model(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Model)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_firmware_information(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FirmwareInformation)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_cellular_class(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CellularClass)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_classes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DataClasses)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_data_class(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomDataClass)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mobile_equipment_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MobileEquipmentId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_telephone_numbers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TelephoneNumbers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subscriber_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SubscriberId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sim_icc_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SimIccId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_radio_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentRadioState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMobileBroadbandDeviceInformation2, 776370929, 63794, 18231, 167, 34, 3, 186, 114, 55, 12, 184); + RT_INTERFACE!{interface IMobileBroadbandDeviceInformation2(IMobileBroadbandDeviceInformation2Vtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandDeviceInformation2] { + fn get_PinManager(&mut self, out: *mut *mut MobileBroadbandPinManager) -> HRESULT, + fn get_Revision(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SerialNumber(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMobileBroadbandDeviceInformation2 { + #[inline] pub unsafe fn get_pin_manager(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PinManager)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_revision(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Revision)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_serial_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SerialNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandPinManager: IMobileBroadbandPinManager} + DEFINE_IID!(IID_IMobileBroadbandNetwork, 3412300428, 777, 19638, 168, 193, 106, 90, 60, 142, 31, 246); + RT_INTERFACE!{interface IMobileBroadbandNetwork(IMobileBroadbandNetworkVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandNetwork] { + fn get_NetworkAdapter(&mut self, out: *mut *mut super::connectivity::NetworkAdapter) -> HRESULT, + fn get_NetworkRegistrationState(&mut self, out: *mut NetworkRegistrationState) -> HRESULT, + fn get_RegistrationNetworkError(&mut self, out: *mut u32) -> HRESULT, + fn get_PacketAttachNetworkError(&mut self, out: *mut u32) -> HRESULT, + fn get_ActivationNetworkError(&mut self, out: *mut u32) -> HRESULT, + fn get_AccessPointName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RegisteredDataClass(&mut self, out: *mut DataClasses) -> HRESULT, + fn get_RegisteredProviderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RegisteredProviderName(&mut self, out: *mut HSTRING) -> HRESULT, + fn ShowConnectionUI(&mut self) -> HRESULT + }} + impl IMobileBroadbandNetwork { + #[inline] pub unsafe fn get_network_adapter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkAdapter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_registration_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkRegistrationState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_registration_network_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RegistrationNetworkError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_packet_attach_network_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PacketAttachNetworkError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_activation_network_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActivationNetworkError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_access_point_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccessPointName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_registered_data_class(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RegisteredDataClass)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_registered_provider_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RegisteredProviderId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_registered_provider_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RegisteredProviderName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_connection_ui(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ShowConnectionUI)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMobileBroadbandNetwork2, 1515576098, 25335, 19421, 186, 29, 71, 116, 65, 150, 11, 160); + RT_INTERFACE!{interface IMobileBroadbandNetwork2(IMobileBroadbandNetwork2Vtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandNetwork2] { + fn GetVoiceCallSupportAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_RegistrationUiccApps(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMobileBroadbandNetwork2 { + #[inline] pub unsafe fn get_voice_call_support_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVoiceCallSupportAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_registration_uicc_apps(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RegistrationUiccApps)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandUiccApp: IMobileBroadbandUiccApp} + DEFINE_IID!(IID_INetworkOperatorTetheringAccessPointConfiguration, 197919364, 16686, 16445, 172, 198, 183, 87, 227, 71, 116, 164); + RT_INTERFACE!{interface INetworkOperatorTetheringAccessPointConfiguration(INetworkOperatorTetheringAccessPointConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorTetheringAccessPointConfiguration] { + fn get_Ssid(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Ssid(&mut self, value: HSTRING) -> HRESULT, + fn get_Passphrase(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Passphrase(&mut self, value: HSTRING) -> HRESULT + }} + impl INetworkOperatorTetheringAccessPointConfiguration { + #[inline] pub unsafe fn get_ssid(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ssid)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_ssid(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Ssid)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_passphrase(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Passphrase)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_passphrase(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Passphrase)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class NetworkOperatorTetheringAccessPointConfiguration: INetworkOperatorTetheringAccessPointConfiguration} + DEFINE_IID!(IID_INetworkOperatorTetheringOperationResult, 3956409249, 442, 18285, 180, 179, 191, 61, 18, 200, 248, 12); + RT_INTERFACE!{interface INetworkOperatorTetheringOperationResult(INetworkOperatorTetheringOperationResultVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorTetheringOperationResult] { + fn get_Status(&mut self, out: *mut TetheringOperationStatus) -> HRESULT, + fn get_AdditionalErrorMessage(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl INetworkOperatorTetheringOperationResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_additional_error_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AdditionalErrorMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NetworkOperatorTetheringOperationResult: INetworkOperatorTetheringOperationResult} + DEFINE_IID!(IID_INetworkOperatorTetheringManagerStatics, 1052555980, 63683, 16476, 153, 100, 112, 161, 238, 171, 225, 148); + RT_INTERFACE!{static interface INetworkOperatorTetheringManagerStatics(INetworkOperatorTetheringManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorTetheringManagerStatics] { + fn GetTetheringCapability(&mut self, networkAccountId: HSTRING, out: *mut TetheringCapability) -> HRESULT, + fn CreateFromNetworkAccountId(&mut self, networkAccountId: HSTRING, out: *mut *mut NetworkOperatorTetheringManager) -> HRESULT + }} + impl INetworkOperatorTetheringManagerStatics { + #[inline] pub unsafe fn get_tethering_capability(&mut self, networkAccountId: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetTetheringCapability)(self, networkAccountId.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_network_account_id(&mut self, networkAccountId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromNetworkAccountId)(self, networkAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NetworkOperatorTetheringManager: INetworkOperatorTetheringManager} + RT_ACTIVATABLE!{INetworkOperatorTetheringManagerStatics2 [CLSID_NetworkOperatorTetheringManager]} + RT_ACTIVATABLE!{INetworkOperatorTetheringManagerStatics3 [CLSID_NetworkOperatorTetheringManager]} + RT_ACTIVATABLE!{INetworkOperatorTetheringManagerStatics [CLSID_NetworkOperatorTetheringManager]} + DEFINE_CLSID!(CLSID_NetworkOperatorTetheringManager = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,115,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,84,101,116,104,101,114,105,110,103,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_INetworkOperatorTetheringManagerStatics2, 1529041938, 13808, 18919, 155, 8, 22, 210, 120, 251, 170, 66); + RT_INTERFACE!{static interface INetworkOperatorTetheringManagerStatics2(INetworkOperatorTetheringManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorTetheringManagerStatics2] { + fn GetTetheringCapabilityFromConnectionProfile(&mut self, profile: *mut super::connectivity::ConnectionProfile, out: *mut TetheringCapability) -> HRESULT, + fn CreateFromConnectionProfile(&mut self, profile: *mut super::connectivity::ConnectionProfile, out: *mut *mut NetworkOperatorTetheringManager) -> HRESULT + }} + impl INetworkOperatorTetheringManagerStatics2 { + #[inline] pub unsafe fn get_tethering_capability_from_connection_profile(&mut self, profile: &super::connectivity::ConnectionProfile) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetTetheringCapabilityFromConnectionProfile)(self, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_connection_profile(&mut self, profile: &super::connectivity::ConnectionProfile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromConnectionProfile)(self, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INetworkOperatorTetheringManagerStatics3, 2413473206, 19193, 20257, 155, 88, 213, 62, 159, 36, 35, 30); + RT_INTERFACE!{static interface INetworkOperatorTetheringManagerStatics3(INetworkOperatorTetheringManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorTetheringManagerStatics3] { + fn CreateFromConnectionProfileWithTargetAdapter(&mut self, profile: *mut super::connectivity::ConnectionProfile, adapter: *mut super::connectivity::NetworkAdapter, out: *mut *mut NetworkOperatorTetheringManager) -> HRESULT + }} + impl INetworkOperatorTetheringManagerStatics3 { + #[inline] pub unsafe fn create_from_connection_profile_with_target_adapter(&mut self, profile: &super::connectivity::ConnectionProfile, adapter: &super::connectivity::NetworkAdapter) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromConnectionProfileWithTargetAdapter)(self, profile as *const _ as *mut _, adapter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INetworkOperatorTetheringManager, 3562704288, 3718, 19864, 139, 164, 221, 112, 212, 183, 100, 211); + RT_INTERFACE!{interface INetworkOperatorTetheringManager(INetworkOperatorTetheringManagerVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorTetheringManager] { + fn get_MaxClientCount(&mut self, out: *mut u32) -> HRESULT, + fn get_ClientCount(&mut self, out: *mut u32) -> HRESULT, + fn get_TetheringOperationalState(&mut self, out: *mut TetheringOperationalState) -> HRESULT, + fn GetCurrentAccessPointConfiguration(&mut self, out: *mut *mut NetworkOperatorTetheringAccessPointConfiguration) -> HRESULT, + fn ConfigureAccessPointAsync(&mut self, configuration: *mut NetworkOperatorTetheringAccessPointConfiguration, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StartTetheringAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn StopTetheringAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl INetworkOperatorTetheringManager { + #[inline] pub unsafe fn get_max_client_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxClientCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_client_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ClientCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tethering_operational_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TetheringOperationalState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_access_point_configuration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentAccessPointConfiguration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn configure_access_point_async(&mut self, configuration: &NetworkOperatorTetheringAccessPointConfiguration) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConfigureAccessPointAsync)(self, configuration as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_tethering_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartTetheringAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_tethering_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopTetheringAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INetworkOperatorTetheringClient, 1889346892, 22879, 18503, 187, 48, 100, 105, 53, 84, 41, 24); + RT_INTERFACE!{interface INetworkOperatorTetheringClient(INetworkOperatorTetheringClientVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorTetheringClient] { + fn get_MacAddress(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HostNames(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl INetworkOperatorTetheringClient { + #[inline] pub unsafe fn get_mac_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MacAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_host_names(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HostNames)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NetworkOperatorTetheringClient: INetworkOperatorTetheringClient} + DEFINE_IID!(IID_INetworkOperatorTetheringClientManager, 2444312598, 36298, 16933, 187, 237, 238, 248, 184, 215, 24, 215); + RT_INTERFACE!{interface INetworkOperatorTetheringClientManager(INetworkOperatorTetheringClientManagerVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorTetheringClientManager] { + fn GetTetheringClients(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl INetworkOperatorTetheringClientManager { + #[inline] pub unsafe fn get_tethering_clients(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTetheringClients)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMobileBroadbandAccountEventArgs, 945014912, 30686, 19460, 190, 173, 161, 35, 176, 140, 159, 89); + RT_INTERFACE!{interface IMobileBroadbandAccountEventArgs(IMobileBroadbandAccountEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandAccountEventArgs] { + fn get_NetworkAccountId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMobileBroadbandAccountEventArgs { + #[inline] pub unsafe fn get_network_account_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandAccountEventArgs: IMobileBroadbandAccountEventArgs} + DEFINE_IID!(IID_IMobileBroadbandAccountUpdatedEventArgs, 2076384648, 42685, 18913, 128, 171, 107, 145, 53, 74, 87, 212); + RT_INTERFACE!{interface IMobileBroadbandAccountUpdatedEventArgs(IMobileBroadbandAccountUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandAccountUpdatedEventArgs] { + fn get_NetworkAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HasDeviceInformationChanged(&mut self, out: *mut bool) -> HRESULT, + fn get_HasNetworkChanged(&mut self, out: *mut bool) -> HRESULT + }} + impl IMobileBroadbandAccountUpdatedEventArgs { + #[inline] pub unsafe fn get_network_account_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_device_information_changed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasDeviceInformationChanged)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_network_changed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasNetworkChanged)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandAccountUpdatedEventArgs: IMobileBroadbandAccountUpdatedEventArgs} + DEFINE_IID!(IID_IMobileBroadbandAccountWatcher, 1811100510, 9141, 17567, 146, 141, 94, 13, 62, 4, 71, 29); + RT_INTERFACE!{interface IMobileBroadbandAccountWatcher(IMobileBroadbandAccountWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandAccountWatcher] { + fn add_AccountAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccountAdded(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AccountUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccountUpdated(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AccountRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccountRemoved(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Status(&mut self, out: *mut MobileBroadbandAccountWatcherStatus) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IMobileBroadbandAccountWatcher { + #[inline] pub unsafe fn add_account_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AccountAdded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_account_added(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AccountAdded)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_account_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AccountUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_account_updated(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AccountUpdated)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_account_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AccountRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_account_removed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AccountRemoved)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_enumeration_completed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stopped(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandAccountWatcher: IMobileBroadbandAccountWatcher} + DEFINE_IID!(IID_IMobileBroadbandModemStatics, 4187936311, 55025, 19064, 140, 188, 100, 33, 166, 80, 99, 200); + RT_INTERFACE!{static interface IMobileBroadbandModemStatics(IMobileBroadbandModemStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandModemStatics] { + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn FromId(&mut self, deviceId: HSTRING, out: *mut *mut MobileBroadbandModem) -> HRESULT, + fn GetDefault(&mut self, out: *mut *mut MobileBroadbandModem) -> HRESULT + }} + impl IMobileBroadbandModemStatics { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id(&mut self, deviceId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromId)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandModem: IMobileBroadbandModem} + RT_ACTIVATABLE!{IMobileBroadbandModemStatics [CLSID_MobileBroadbandModem]} + DEFINE_CLSID!(CLSID_MobileBroadbandModem = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,115,46,77,111,98,105,108,101,66,114,111,97,100,98,97,110,100,77,111,100,101,109,0]); + DEFINE_IID!(IID_IMobileBroadbandModemConfiguration, 4242552227, 54989, 17184, 185, 130, 190, 157, 62, 199, 137, 15); + RT_INTERFACE!{interface IMobileBroadbandModemConfiguration(IMobileBroadbandModemConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandModemConfiguration] { + fn get_Uicc(&mut self, out: *mut *mut MobileBroadbandUicc) -> HRESULT, + fn get_HomeProviderId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HomeProviderName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMobileBroadbandModemConfiguration { + #[inline] pub unsafe fn get_uicc(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Uicc)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_home_provider_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HomeProviderId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_home_provider_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HomeProviderName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandUicc: IMobileBroadbandUicc} + RT_CLASS!{class MobileBroadbandModemConfiguration: IMobileBroadbandModemConfiguration} + DEFINE_IID!(IID_IMobileBroadbandModem, 3493161234, 59897, 20327, 160, 61, 67, 24, 154, 49, 107, 241); + RT_INTERFACE!{interface IMobileBroadbandModem(IMobileBroadbandModemVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandModem] { + fn get_CurrentAccount(&mut self, out: *mut *mut MobileBroadbandAccount) -> HRESULT, + fn get_DeviceInformation(&mut self, out: *mut *mut MobileBroadbandDeviceInformation) -> HRESULT, + fn get_MaxDeviceServiceCommandSizeInBytes(&mut self, out: *mut u32) -> HRESULT, + fn get_MaxDeviceServiceDataSizeInBytes(&mut self, out: *mut u32) -> HRESULT, + fn get_DeviceServices(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetDeviceService(&mut self, deviceServiceId: Guid, out: *mut *mut MobileBroadbandDeviceService) -> HRESULT, + fn get_IsResetSupported(&mut self, out: *mut bool) -> HRESULT, + fn ResetAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetCurrentConfigurationAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_CurrentNetwork(&mut self, out: *mut *mut MobileBroadbandNetwork) -> HRESULT + }} + impl IMobileBroadbandModem { + #[inline] pub unsafe fn get_current_account(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentAccount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_device_service_command_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxDeviceServiceCommandSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_device_service_data_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxDeviceServiceDataSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_services(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceServices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_service(&mut self, deviceServiceId: Guid) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceService)(self, deviceServiceId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_reset_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsResetSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn reset_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ResetAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_configuration_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentConfigurationAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_network(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentNetwork)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandDeviceServiceInformation: IMobileBroadbandDeviceServiceInformation} + RT_CLASS!{class MobileBroadbandDeviceService: IMobileBroadbandDeviceService} + DEFINE_IID!(IID_IMobileBroadbandPinManager, 2203483869, 28191, 19355, 164, 19, 43, 31, 80, 204, 54, 223); + RT_INTERFACE!{interface IMobileBroadbandPinManager(IMobileBroadbandPinManagerVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandPinManager] { + fn get_SupportedPins(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetPin(&mut self, pinType: MobileBroadbandPinType, out: *mut *mut MobileBroadbandPin) -> HRESULT + }} + impl IMobileBroadbandPinManager { + #[inline] pub unsafe fn get_supported_pins(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedPins)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pin(&mut self, pinType: MobileBroadbandPinType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPin)(self, pinType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandPin: IMobileBroadbandPin} + DEFINE_IID!(IID_IMobileBroadbandPinOperationResult, 299752498, 12775, 18933, 182, 99, 18, 61, 59, 239, 3, 98); + RT_INTERFACE!{interface IMobileBroadbandPinOperationResult(IMobileBroadbandPinOperationResultVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandPinOperationResult] { + fn get_IsSuccessful(&mut self, out: *mut bool) -> HRESULT, + fn get_AttemptsRemaining(&mut self, out: *mut u32) -> HRESULT + }} + impl IMobileBroadbandPinOperationResult { + #[inline] pub unsafe fn get_is_successful(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSuccessful)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_attempts_remaining(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AttemptsRemaining)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandPinOperationResult: IMobileBroadbandPinOperationResult} + DEFINE_IID!(IID_IMobileBroadbandPin, 3865171721, 59257, 17855, 130, 129, 117, 50, 61, 249, 227, 33); + RT_INTERFACE!{interface IMobileBroadbandPin(IMobileBroadbandPinVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandPin] { + fn get_Type(&mut self, out: *mut MobileBroadbandPinType) -> HRESULT, + fn get_LockState(&mut self, out: *mut MobileBroadbandPinLockState) -> HRESULT, + fn get_Format(&mut self, out: *mut MobileBroadbandPinFormat) -> HRESULT, + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT, + fn get_MaxLength(&mut self, out: *mut u32) -> HRESULT, + fn get_MinLength(&mut self, out: *mut u32) -> HRESULT, + fn get_AttemptsRemaining(&mut self, out: *mut u32) -> HRESULT, + fn EnableAsync(&mut self, currentPin: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DisableAsync(&mut self, currentPin: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn EnterAsync(&mut self, currentPin: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ChangeAsync(&mut self, currentPin: HSTRING, newPin: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn UnblockAsync(&mut self, pinUnblockKey: HSTRING, newPin: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMobileBroadbandPin { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_lock_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LockState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Format)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_attempts_remaining(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AttemptsRemaining)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn enable_async(&mut self, currentPin: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EnableAsync)(self, currentPin.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn disable_async(&mut self, currentPin: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DisableAsync)(self, currentPin.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn enter_async(&mut self, currentPin: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EnterAsync)(self, currentPin.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn change_async(&mut self, currentPin: &HStringArg, newPin: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ChangeAsync)(self, currentPin.get(), newPin.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn unblock_async(&mut self, pinUnblockKey: &HStringArg, newPin: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnblockAsync)(self, pinUnblockKey.get(), newPin.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMobileBroadbandDeviceServiceInformation, 1406573403, 50413, 17904, 128, 58, 217, 65, 122, 109, 152, 70); + RT_INTERFACE!{interface IMobileBroadbandDeviceServiceInformation(IMobileBroadbandDeviceServiceInformationVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandDeviceServiceInformation] { + fn get_DeviceServiceId(&mut self, out: *mut Guid) -> HRESULT, + fn get_IsDataReadSupported(&mut self, out: *mut bool) -> HRESULT, + fn get_IsDataWriteSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IMobileBroadbandDeviceServiceInformation { + #[inline] pub unsafe fn get_device_service_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeviceServiceId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_data_read_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDataReadSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_data_write_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDataWriteSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMobileBroadbandDeviceService, 582883922, 48512, 16556, 142, 31, 46, 7, 131, 106, 61, 189); + RT_INTERFACE!{interface IMobileBroadbandDeviceService(IMobileBroadbandDeviceServiceVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandDeviceService] { + fn get_DeviceServiceId(&mut self, out: *mut Guid) -> HRESULT, + fn get_SupportedCommands(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn OpenDataSession(&mut self, out: *mut *mut MobileBroadbandDeviceServiceDataSession) -> HRESULT, + fn OpenCommandSession(&mut self, out: *mut *mut MobileBroadbandDeviceServiceCommandSession) -> HRESULT + }} + impl IMobileBroadbandDeviceService { + #[inline] pub unsafe fn get_device_service_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeviceServiceId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_commands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedCommands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn open_data_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenDataSession)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn open_command_session(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenCommandSession)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandDeviceServiceDataSession: IMobileBroadbandDeviceServiceDataSession} + RT_CLASS!{class MobileBroadbandDeviceServiceCommandSession: IMobileBroadbandDeviceServiceCommandSession} + DEFINE_IID!(IID_IMobileBroadbandDeviceServiceDataReceivedEventArgs, 3064599518, 4992, 16611, 134, 24, 115, 203, 202, 72, 19, 140); + RT_INTERFACE!{interface IMobileBroadbandDeviceServiceDataReceivedEventArgs(IMobileBroadbandDeviceServiceDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandDeviceServiceDataReceivedEventArgs] { + #[cfg(feature="windows.storage")] fn get_ReceivedData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IMobileBroadbandDeviceServiceDataReceivedEventArgs { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_received_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ReceivedData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandDeviceServiceDataReceivedEventArgs: IMobileBroadbandDeviceServiceDataReceivedEventArgs} + DEFINE_IID!(IID_IMobileBroadbandDeviceServiceDataSession, 3671466803, 35791, 17033, 138, 55, 4, 92, 33, 105, 72, 106); + RT_INTERFACE!{interface IMobileBroadbandDeviceServiceDataSession(IMobileBroadbandDeviceServiceDataSessionVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandDeviceServiceDataSession] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn WriteDataAsync(&mut self, value: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn CloseSession(&mut self) -> HRESULT, + fn add_DataReceived(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataReceived(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMobileBroadbandDeviceServiceDataSession { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn write_data_async(&mut self, value: &super::super::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteDataAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn close_session(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).CloseSession)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_data_received(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DataReceived)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_data_received(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DataReceived)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMobileBroadbandDeviceServiceCommandResult, 2968808123, 38102, 17593, 165, 56, 240, 129, 11, 100, 83, 137); + RT_INTERFACE!{interface IMobileBroadbandDeviceServiceCommandResult(IMobileBroadbandDeviceServiceCommandResultVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandDeviceServiceCommandResult] { + fn get_StatusCode(&mut self, out: *mut u32) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_ResponseData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IMobileBroadbandDeviceServiceCommandResult { + #[inline] pub unsafe fn get_status_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StatusCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_response_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResponseData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandDeviceServiceCommandResult: IMobileBroadbandDeviceServiceCommandResult} + DEFINE_IID!(IID_IMobileBroadbandDeviceServiceCommandSession, 4228483653, 37179, 18708, 182, 195, 174, 99, 4, 89, 62, 117); + RT_INTERFACE!{interface IMobileBroadbandDeviceServiceCommandSession(IMobileBroadbandDeviceServiceCommandSessionVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandDeviceServiceCommandSession] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SendQueryCommandAsync(&mut self, commandId: u32, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SendSetCommandAsync(&mut self, commandId: u32, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CloseSession(&mut self) -> HRESULT + }} + impl IMobileBroadbandDeviceServiceCommandSession { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_query_command_async(&mut self, commandId: u32, data: &super::super::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendQueryCommandAsync)(self, commandId, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn send_set_command_async(&mut self, commandId: u32, data: &super::super::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendSetCommandAsync)(self, commandId, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn close_session(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).CloseSession)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMobileBroadbandUiccAppsResult, 1950953707, 33111, 19009, 132, 148, 107, 245, 76, 155, 29, 43); + RT_INTERFACE!{interface IMobileBroadbandUiccAppsResult(IMobileBroadbandUiccAppsResultVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandUiccAppsResult] { + fn get_Status(&mut self, out: *mut MobileBroadbandUiccAppOperationStatus) -> HRESULT, + fn get_UiccApps(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMobileBroadbandUiccAppsResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_uicc_apps(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UiccApps)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandUiccAppsResult: IMobileBroadbandUiccAppsResult} + DEFINE_IID!(IID_IMobileBroadbandUicc, 3862230673, 21082, 19682, 143, 206, 170, 65, 98, 87, 145, 84); + RT_INTERFACE!{interface IMobileBroadbandUicc(IMobileBroadbandUiccVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandUicc] { + fn get_SimIccId(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetUiccAppsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMobileBroadbandUicc { + #[inline] pub unsafe fn get_sim_icc_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SimIccId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uicc_apps_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetUiccAppsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMobileBroadbandUiccAppRecordDetailsResult, 3642320943, 48660, 18740, 152, 29, 47, 87, 185, 237, 131, 230); + RT_INTERFACE!{interface IMobileBroadbandUiccAppRecordDetailsResult(IMobileBroadbandUiccAppRecordDetailsResultVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandUiccAppRecordDetailsResult] { + fn get_Status(&mut self, out: *mut MobileBroadbandUiccAppOperationStatus) -> HRESULT, + fn get_Kind(&mut self, out: *mut UiccAppRecordKind) -> HRESULT, + fn get_RecordCount(&mut self, out: *mut i32) -> HRESULT, + fn get_RecordSize(&mut self, out: *mut i32) -> HRESULT, + fn get_ReadAccessCondition(&mut self, out: *mut UiccAccessCondition) -> HRESULT, + fn get_WriteAccessCondition(&mut self, out: *mut UiccAccessCondition) -> HRESULT + }} + impl IMobileBroadbandUiccAppRecordDetailsResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_record_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RecordCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_record_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RecordSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_read_access_condition(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadAccessCondition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_write_access_condition(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WriteAccessCondition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandUiccAppRecordDetailsResult: IMobileBroadbandUiccAppRecordDetailsResult} + DEFINE_IID!(IID_IMobileBroadbandUiccAppReadRecordResult, 1690915461, 13710, 18373, 130, 73, 105, 95, 56, 59, 43, 219); + RT_INTERFACE!{interface IMobileBroadbandUiccAppReadRecordResult(IMobileBroadbandUiccAppReadRecordResultVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandUiccAppReadRecordResult] { + fn get_Status(&mut self, out: *mut MobileBroadbandUiccAppOperationStatus) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IMobileBroadbandUiccAppReadRecordResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandUiccAppReadRecordResult: IMobileBroadbandUiccAppReadRecordResult} + DEFINE_IID!(IID_IMobileBroadbandUiccApp, 1293354326, 39073, 17373, 178, 236, 80, 201, 12, 242, 72, 223); + RT_INTERFACE!{interface IMobileBroadbandUiccApp(IMobileBroadbandUiccAppVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandUiccApp] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Id(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_Kind(&mut self, out: *mut UiccAppKind) -> HRESULT, + fn GetRecordDetailsAsync(&mut self, uiccFilePath: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ReadRecordAsync(&mut self, uiccFilePath: *mut super::super::foundation::collections::IIterable, recordIndex: i32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMobileBroadbandUiccApp { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_record_details_async(&mut self, uiccFilePath: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRecordDetailsAsync)(self, uiccFilePath as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_record_async(&mut self, uiccFilePath: &super::super::foundation::collections::IIterable, recordIndex: i32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadRecordAsync)(self, uiccFilePath as *const _ as *mut _, recordIndex, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMobileBroadbandNetworkRegistrationStateChange, 3199177953, 38415, 18868, 160, 141, 125, 133, 233, 104, 199, 236); + RT_INTERFACE!{interface IMobileBroadbandNetworkRegistrationStateChange(IMobileBroadbandNetworkRegistrationStateChangeVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandNetworkRegistrationStateChange] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Network(&mut self, out: *mut *mut MobileBroadbandNetwork) -> HRESULT + }} + impl IMobileBroadbandNetworkRegistrationStateChange { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_network(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Network)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandNetworkRegistrationStateChange: IMobileBroadbandNetworkRegistrationStateChange} + DEFINE_IID!(IID_IMobileBroadbandNetworkRegistrationStateChangeTriggerDetails, 2299747583, 10424, 18090, 177, 55, 28, 75, 15, 33, 237, 254); + RT_INTERFACE!{interface IMobileBroadbandNetworkRegistrationStateChangeTriggerDetails(IMobileBroadbandNetworkRegistrationStateChangeTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandNetworkRegistrationStateChangeTriggerDetails] { + fn get_NetworkRegistrationStateChanges(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMobileBroadbandNetworkRegistrationStateChangeTriggerDetails { + #[inline] pub unsafe fn get_network_registration_state_changes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkRegistrationStateChanges)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandNetworkRegistrationStateChangeTriggerDetails: IMobileBroadbandNetworkRegistrationStateChangeTriggerDetails} + DEFINE_IID!(IID_IMobileBroadbandRadioStateChange, 2958337377, 38963, 19181, 151, 23, 67, 72, 178, 26, 36, 179); + RT_INTERFACE!{interface IMobileBroadbandRadioStateChange(IMobileBroadbandRadioStateChangeVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandRadioStateChange] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RadioState(&mut self, out: *mut MobileBroadbandRadioState) -> HRESULT + }} + impl IMobileBroadbandRadioStateChange { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_radio_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RadioState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandRadioStateChange: IMobileBroadbandRadioStateChange} + DEFINE_IID!(IID_IMobileBroadbandRadioStateChangeTriggerDetails, 1898977998, 2364, 17094, 176, 219, 173, 31, 117, 166, 84, 69); + RT_INTERFACE!{interface IMobileBroadbandRadioStateChangeTriggerDetails(IMobileBroadbandRadioStateChangeTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandRadioStateChangeTriggerDetails] { + fn get_RadioStateChanges(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMobileBroadbandRadioStateChangeTriggerDetails { + #[inline] pub unsafe fn get_radio_state_changes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RadioStateChanges)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandRadioStateChangeTriggerDetails: IMobileBroadbandRadioStateChangeTriggerDetails} + DEFINE_IID!(IID_IMobileBroadbandPinLockStateChange, 3189139262, 7940, 20373, 139, 144, 231, 245, 89, 221, 231, 229); + RT_INTERFACE!{interface IMobileBroadbandPinLockStateChange(IMobileBroadbandPinLockStateChangeVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandPinLockStateChange] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PinType(&mut self, out: *mut MobileBroadbandPinType) -> HRESULT, + fn get_PinLockState(&mut self, out: *mut MobileBroadbandPinLockState) -> HRESULT + }} + impl IMobileBroadbandPinLockStateChange { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pin_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PinType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pin_lock_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PinLockState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandPinLockStateChange: IMobileBroadbandPinLockStateChange} + DEFINE_IID!(IID_IMobileBroadbandPinLockStateChangeTriggerDetails, 3543711889, 16017, 19768, 144, 54, 174, 232, 58, 110, 121, 173); + RT_INTERFACE!{interface IMobileBroadbandPinLockStateChangeTriggerDetails(IMobileBroadbandPinLockStateChangeTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandPinLockStateChangeTriggerDetails] { + fn get_PinLockStateChanges(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMobileBroadbandPinLockStateChangeTriggerDetails { + #[inline] pub unsafe fn get_pin_lock_state_changes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PinLockStateChanges)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandPinLockStateChangeTriggerDetails: IMobileBroadbandPinLockStateChangeTriggerDetails} + DEFINE_IID!(IID_IMobileBroadbandDeviceServiceTriggerDetails, 1241865072, 47534, 17496, 146, 65, 166, 165, 251, 241, 138, 12); + RT_INTERFACE!{interface IMobileBroadbandDeviceServiceTriggerDetails(IMobileBroadbandDeviceServiceTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandDeviceServiceTriggerDetails] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DeviceServiceId(&mut self, out: *mut Guid) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_ReceivedData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IMobileBroadbandDeviceServiceTriggerDetails { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_service_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeviceServiceId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_received_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ReceivedData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MobileBroadbandDeviceServiceTriggerDetails: IMobileBroadbandDeviceServiceTriggerDetails} + DEFINE_IID!(IID_IKnownCSimFilePathsStatics, 3025710829, 18929, 19490, 176, 115, 150, 213, 17, 191, 156, 53); + RT_INTERFACE!{static interface IKnownCSimFilePathsStatics(IKnownCSimFilePathsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownCSimFilePathsStatics] { + fn get_EFSpn(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Gid1(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Gid2(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IKnownCSimFilePathsStatics { + #[inline] pub unsafe fn get_efspn(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EFSpn)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gid1(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gid1)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gid2(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gid2)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKnownCSimFilePathsStatics [CLSID_KnownCSimFilePaths]} + DEFINE_CLSID!(CLSID_KnownCSimFilePaths = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,115,46,75,110,111,119,110,67,83,105,109,70,105,108,101,80,97,116,104,115,0]); + DEFINE_IID!(IID_IKnownRuimFilePathsStatics, 948160697, 65316, 17777, 168, 103, 9, 249, 96, 66, 110, 20); + RT_INTERFACE!{static interface IKnownRuimFilePathsStatics(IKnownRuimFilePathsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownRuimFilePathsStatics] { + fn get_EFSpn(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Gid1(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Gid2(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IKnownRuimFilePathsStatics { + #[inline] pub unsafe fn get_efspn(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EFSpn)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gid1(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gid1)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gid2(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gid2)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKnownRuimFilePathsStatics [CLSID_KnownRuimFilePaths]} + DEFINE_CLSID!(CLSID_KnownRuimFilePaths = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,115,46,75,110,111,119,110,82,117,105,109,70,105,108,101,80,97,116,104,115,0]); + DEFINE_IID!(IID_IKnownSimFilePathsStatics, 2160925283, 14245, 17363, 128, 163, 204, 210, 62, 143, 236, 238); + RT_INTERFACE!{static interface IKnownSimFilePathsStatics(IKnownSimFilePathsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownSimFilePathsStatics] { + fn get_EFOns(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_EFSpn(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Gid1(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Gid2(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IKnownSimFilePathsStatics { + #[inline] pub unsafe fn get_efons(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EFOns)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_efspn(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EFSpn)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gid1(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gid1)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gid2(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gid2)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKnownSimFilePathsStatics [CLSID_KnownSimFilePaths]} + DEFINE_CLSID!(CLSID_KnownSimFilePaths = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,115,46,75,110,111,119,110,83,105,109,70,105,108,101,80,97,116,104,115,0]); + DEFINE_IID!(IID_IKnownUSimFilePathsStatics, 2083841409, 7963, 17396, 149, 48, 139, 9, 45, 50, 215, 31); + RT_INTERFACE!{static interface IKnownUSimFilePathsStatics(IKnownUSimFilePathsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownUSimFilePathsStatics] { + fn get_EFSpn(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_EFOpl(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_EFPnn(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Gid1(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Gid2(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IKnownUSimFilePathsStatics { + #[inline] pub unsafe fn get_efspn(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EFSpn)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_efopl(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EFOpl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_efpnn(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EFPnn)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gid1(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gid1)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gid2(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Gid2)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKnownUSimFilePathsStatics [CLSID_KnownUSimFilePaths]} + DEFINE_CLSID!(CLSID_KnownUSimFilePaths = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,115,46,75,110,111,119,110,85,83,105,109,70,105,108,101,80,97,116,104,115,0]); + DEFINE_IID!(IID_IHotspotAuthenticationEventDetails, 3881224081, 4097, 19941, 131, 199, 222, 97, 216, 136, 49, 208); + RT_INTERFACE!{interface IHotspotAuthenticationEventDetails(IHotspotAuthenticationEventDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IHotspotAuthenticationEventDetails] { + fn get_EventToken(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IHotspotAuthenticationEventDetails { + #[inline] pub unsafe fn get_event_token(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EventToken)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class HotspotAuthenticationEventDetails: IHotspotAuthenticationEventDetails} + DEFINE_IID!(IID_IHotspotAuthenticationContextStatics, 3881224081, 4098, 19941, 131, 199, 222, 97, 216, 136, 49, 208); + RT_INTERFACE!{static interface IHotspotAuthenticationContextStatics(IHotspotAuthenticationContextStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IHotspotAuthenticationContextStatics] { + fn TryGetAuthenticationContext(&mut self, evenToken: HSTRING, context: *mut *mut HotspotAuthenticationContext, out: *mut bool) -> HRESULT + }} + impl IHotspotAuthenticationContextStatics { + #[inline] pub unsafe fn try_get_authentication_context(&mut self, evenToken: &HStringArg) -> Result<(ComPtr, bool)> { + let mut context = null_mut(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetAuthenticationContext)(self, evenToken.get(), &mut context, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(context), out)) } else { err(hr) } + } + } + RT_CLASS!{class HotspotAuthenticationContext: IHotspotAuthenticationContext} + RT_ACTIVATABLE!{IHotspotAuthenticationContextStatics [CLSID_HotspotAuthenticationContext]} + DEFINE_CLSID!(CLSID_HotspotAuthenticationContext = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,115,46,72,111,116,115,112,111,116,65,117,116,104,101,110,116,105,99,97,116,105,111,110,67,111,110,116,101,120,116,0]); + DEFINE_IID!(IID_IHotspotAuthenticationContext, 3881224081, 4099, 19941, 131, 199, 222, 97, 216, 136, 49, 208); + RT_INTERFACE!{interface IHotspotAuthenticationContext(IHotspotAuthenticationContextVtbl): IInspectable(IInspectableVtbl) [IID_IHotspotAuthenticationContext] { + fn get_WirelessNetworkId(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn get_NetworkAdapter(&mut self, out: *mut *mut super::connectivity::NetworkAdapter) -> HRESULT, + fn get_RedirectMessageUrl(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + #[cfg(not(feature="windows.data"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.data")] fn get_RedirectMessageXml(&mut self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, + fn get_AuthenticationUrl(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn IssueCredentials(&mut self, userName: HSTRING, password: HSTRING, extraParameters: HSTRING, markAsManualConnectOnFailure: bool) -> HRESULT, + fn AbortAuthentication(&mut self, markAsManual: bool) -> HRESULT, + fn SkipAuthentication(&mut self) -> HRESULT, + fn TriggerAttentionRequired(&mut self, packageRelativeApplicationId: HSTRING, applicationParameters: HSTRING) -> HRESULT + }} + impl IHotspotAuthenticationContext { + #[inline] pub unsafe fn get_wireless_network_id(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WirelessNetworkId)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_adapter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkAdapter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_redirect_message_url(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RedirectMessageUrl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_redirect_message_xml(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RedirectMessageXml)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_authentication_url(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AuthenticationUrl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn issue_credentials(&mut self, userName: &HStringArg, password: &HStringArg, extraParameters: &HStringArg, markAsManualConnectOnFailure: bool) -> Result<()> { + let hr = ((*self.lpVtbl).IssueCredentials)(self, userName.get(), password.get(), extraParameters.get(), markAsManualConnectOnFailure); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn abort_authentication(&mut self, markAsManual: bool) -> Result<()> { + let hr = ((*self.lpVtbl).AbortAuthentication)(self, markAsManual); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn skip_authentication(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SkipAuthentication)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn trigger_attention_required(&mut self, packageRelativeApplicationId: &HStringArg, applicationParameters: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).TriggerAttentionRequired)(self, packageRelativeApplicationId.get(), applicationParameters.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum HotspotAuthenticationResponseCode: i32 { + NoError (HotspotAuthenticationResponseCode_NoError) = 0, LoginSucceeded (HotspotAuthenticationResponseCode_LoginSucceeded) = 50, LoginFailed (HotspotAuthenticationResponseCode_LoginFailed) = 100, RadiusServerError (HotspotAuthenticationResponseCode_RadiusServerError) = 102, NetworkAdministratorError (HotspotAuthenticationResponseCode_NetworkAdministratorError) = 105, LoginAborted (HotspotAuthenticationResponseCode_LoginAborted) = 151, AccessGatewayInternalError (HotspotAuthenticationResponseCode_AccessGatewayInternalError) = 255, + }} + DEFINE_IID!(IID_IHotspotCredentialsAuthenticationResult, 3881224081, 4101, 19941, 131, 199, 222, 97, 216, 136, 49, 208); + RT_INTERFACE!{interface IHotspotCredentialsAuthenticationResult(IHotspotCredentialsAuthenticationResultVtbl): IInspectable(IInspectableVtbl) [IID_IHotspotCredentialsAuthenticationResult] { + fn get_HasNetworkErrorOccurred(&mut self, out: *mut bool) -> HRESULT, + fn get_ResponseCode(&mut self, out: *mut HotspotAuthenticationResponseCode) -> HRESULT, + fn get_LogoffUrl(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + #[cfg(feature="windows.data")] fn get_AuthenticationReplyXml(&mut self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT + }} + impl IHotspotCredentialsAuthenticationResult { + #[inline] pub unsafe fn get_has_network_error_occurred(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasNetworkErrorOccurred)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_response_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResponseCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_logoff_url(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LogoffUrl)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_authentication_reply_xml(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AuthenticationReplyXml)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class HotspotCredentialsAuthenticationResult: IHotspotCredentialsAuthenticationResult} + DEFINE_IID!(IID_IHotspotAuthenticationContext2, 3881224081, 4100, 19941, 131, 199, 222, 97, 216, 136, 49, 208); + RT_INTERFACE!{interface IHotspotAuthenticationContext2(IHotspotAuthenticationContext2Vtbl): IInspectable(IInspectableVtbl) [IID_IHotspotAuthenticationContext2] { + fn IssueCredentialsAsync(&mut self, userName: HSTRING, password: HSTRING, extraParameters: HSTRING, markAsManualConnectOnFailure: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IHotspotAuthenticationContext2 { + #[inline] pub unsafe fn issue_credentials_async(&mut self, userName: &HStringArg, password: &HStringArg, extraParameters: &HStringArg, markAsManualConnectOnFailure: bool) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).IssueCredentialsAsync)(self, userName.get(), password.get(), extraParameters.get(), markAsManualConnectOnFailure, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum ProfileMediaType: i32 { + Wlan (ProfileMediaType_Wlan) = 0, Wwan (ProfileMediaType_Wwan) = 1, + }} + DEFINE_IID!(IID_IProvisionFromXmlDocumentResults, 561447136, 33283, 4575, 173, 185, 244, 206, 70, 45, 145, 55); + RT_INTERFACE!{interface IProvisionFromXmlDocumentResults(IProvisionFromXmlDocumentResultsVtbl): IInspectable(IInspectableVtbl) [IID_IProvisionFromXmlDocumentResults] { + fn get_AllElementsProvisioned(&mut self, out: *mut bool) -> HRESULT, + fn get_ProvisionResultsXml(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IProvisionFromXmlDocumentResults { + #[inline] pub unsafe fn get_all_elements_provisioned(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllElementsProvisioned)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_provision_results_xml(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProvisionResultsXml)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProvisionFromXmlDocumentResults: IProvisionFromXmlDocumentResults} + RT_STRUCT! { struct ProfileUsage { + UsageInMegabytes: u32, LastSyncTime: super::super::foundation::DateTime, + }} + DEFINE_IID!(IID_IProvisionedProfile, 561447136, 33282, 4575, 173, 185, 244, 206, 70, 45, 145, 55); + RT_INTERFACE!{interface IProvisionedProfile(IProvisionedProfileVtbl): IInspectable(IInspectableVtbl) [IID_IProvisionedProfile] { + fn UpdateCost(&mut self, value: super::connectivity::NetworkCostType) -> HRESULT, + fn UpdateUsage(&mut self, value: ProfileUsage) -> HRESULT + }} + impl IProvisionedProfile { + #[inline] pub unsafe fn update_cost(&mut self, value: super::connectivity::NetworkCostType) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateCost)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn update_usage(&mut self, value: ProfileUsage) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateUsage)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ProvisionedProfile: IProvisionedProfile} + DEFINE_IID!(IID_IProvisioningAgent, 561447136, 33281, 4575, 173, 185, 244, 206, 70, 45, 145, 55); + RT_INTERFACE!{interface IProvisioningAgent(IProvisioningAgentVtbl): IInspectable(IInspectableVtbl) [IID_IProvisioningAgent] { + fn ProvisionFromXmlDocumentAsync(&mut self, provisioningXmlDocument: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetProvisionedProfile(&mut self, mediaType: ProfileMediaType, profileName: HSTRING, out: *mut *mut ProvisionedProfile) -> HRESULT + }} + impl IProvisioningAgent { + #[inline] pub unsafe fn provision_from_xml_document_async(&mut self, provisioningXmlDocument: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProvisionFromXmlDocumentAsync)(self, provisioningXmlDocument.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_provisioned_profile(&mut self, mediaType: ProfileMediaType, profileName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetProvisionedProfile)(self, mediaType, profileName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProvisioningAgentStaticMethods, 561447136, 33025, 4575, 173, 185, 244, 206, 70, 45, 145, 55); + RT_INTERFACE!{static interface IProvisioningAgentStaticMethods(IProvisioningAgentStaticMethodsVtbl): IInspectable(IInspectableVtbl) [IID_IProvisioningAgentStaticMethods] { + fn CreateFromNetworkAccountId(&mut self, networkAccountId: HSTRING, out: *mut *mut ProvisioningAgent) -> HRESULT + }} + impl IProvisioningAgentStaticMethods { + #[inline] pub unsafe fn create_from_network_account_id(&mut self, networkAccountId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromNetworkAccountId)(self, networkAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProvisioningAgent: IProvisioningAgent} + RT_ACTIVATABLE!{IProvisioningAgentStaticMethods [CLSID_ProvisioningAgent]} + DEFINE_CLSID!(CLSID_ProvisioningAgent = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,115,46,80,114,111,118,105,115,105,111,110,105,110,103,65,103,101,110,116,0]); + RT_ENUM! { enum UssdResultCode: i32 { + NoActionRequired (UssdResultCode_NoActionRequired) = 0, ActionRequired (UssdResultCode_ActionRequired) = 1, Terminated (UssdResultCode_Terminated) = 2, OtherLocalClient (UssdResultCode_OtherLocalClient) = 3, OperationNotSupported (UssdResultCode_OperationNotSupported) = 4, NetworkTimeout (UssdResultCode_NetworkTimeout) = 5, + }} + DEFINE_IID!(IID_IUssdMessage, 798674818, 8196, 19805, 191, 129, 42, 186, 27, 75, 228, 168); + RT_INTERFACE!{interface IUssdMessage(IUssdMessageVtbl): IInspectable(IInspectableVtbl) [IID_IUssdMessage] { + fn get_DataCodingScheme(&mut self, out: *mut u8) -> HRESULT, + fn put_DataCodingScheme(&mut self, value: u8) -> HRESULT, + fn GetPayload(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn SetPayload(&mut self, valueSize: u32, value: *mut u8) -> HRESULT, + fn get_PayloadAsText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PayloadAsText(&mut self, value: HSTRING) -> HRESULT + }} + impl IUssdMessage { + #[inline] pub unsafe fn get_data_coding_scheme(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DataCodingScheme)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_data_coding_scheme(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataCodingScheme)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_payload(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPayload)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_payload(&mut self, value: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).SetPayload)(self, value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_payload_as_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PayloadAsText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_payload_as_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PayloadAsText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUssdMessageFactory, 798674818, 4099, 19805, 191, 129, 42, 186, 27, 75, 228, 168); + RT_INTERFACE!{static interface IUssdMessageFactory(IUssdMessageFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IUssdMessageFactory] { + fn CreateMessage(&mut self, messageText: HSTRING, out: *mut *mut UssdMessage) -> HRESULT + }} + impl IUssdMessageFactory { + #[inline] pub unsafe fn create_message(&mut self, messageText: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMessage)(self, messageText.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UssdMessage: IUssdMessage [IUssdMessageFactory] [CLSID_UssdMessage]} + DEFINE_CLSID!(CLSID_UssdMessage = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,115,46,85,115,115,100,77,101,115,115,97,103,101,0]); + DEFINE_IID!(IID_IUssdReply, 798674818, 8197, 19805, 191, 129, 42, 186, 27, 75, 228, 168); + RT_INTERFACE!{interface IUssdReply(IUssdReplyVtbl): IInspectable(IInspectableVtbl) [IID_IUssdReply] { + fn get_ResultCode(&mut self, out: *mut UssdResultCode) -> HRESULT, + fn get_Message(&mut self, out: *mut *mut UssdMessage) -> HRESULT + }} + impl IUssdReply { + #[inline] pub unsafe fn get_result_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResultCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UssdReply: IUssdReply} + DEFINE_IID!(IID_IUssdSession, 798674818, 8194, 19805, 191, 129, 42, 186, 27, 75, 228, 168); + RT_INTERFACE!{interface IUssdSession(IUssdSessionVtbl): IInspectable(IInspectableVtbl) [IID_IUssdSession] { + fn SendMessageAndGetReplyAsync(&mut self, message: *mut UssdMessage, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn Close(&mut self) -> HRESULT + }} + impl IUssdSession { + #[inline] pub unsafe fn send_message_and_get_reply_async(&mut self, message: &UssdMessage) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendMessageAndGetReplyAsync)(self, message as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn close(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Close)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUssdSessionStatics, 798674818, 4097, 19805, 191, 129, 42, 186, 27, 75, 228, 168); + RT_INTERFACE!{static interface IUssdSessionStatics(IUssdSessionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUssdSessionStatics] { + fn CreateFromNetworkAccountId(&mut self, networkAccountId: HSTRING, out: *mut *mut UssdSession) -> HRESULT, + fn CreateFromNetworkInterfaceId(&mut self, networkInterfaceId: HSTRING, out: *mut *mut UssdSession) -> HRESULT + }} + impl IUssdSessionStatics { + #[inline] pub unsafe fn create_from_network_account_id(&mut self, networkAccountId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromNetworkAccountId)(self, networkAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_network_interface_id(&mut self, networkInterfaceId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromNetworkInterfaceId)(self, networkInterfaceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UssdSession: IUssdSession} + RT_ACTIVATABLE!{IUssdSessionStatics [CLSID_UssdSession]} + DEFINE_CLSID!(CLSID_UssdSession = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,78,101,116,119,111,114,107,79,112,101,114,97,116,111,114,115,46,85,115,115,100,83,101,115,115,105,111,110,0]); + RT_STRUCT! { struct LegacyNetworkOperatorsContract { + + }} + DEFINE_IID!(IID_INetworkOperatorNotificationEventDetails, 3160975825, 33505, 17544, 159, 44, 18, 118, 194, 70, 143, 172); + RT_INTERFACE!{interface INetworkOperatorNotificationEventDetails(INetworkOperatorNotificationEventDetailsVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorNotificationEventDetails] { + fn get_NotificationType(&mut self, out: *mut NetworkOperatorEventMessageType) -> HRESULT, + fn get_NetworkAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EncodingType(&mut self, out: *mut u8) -> HRESULT, + fn get_Message(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RuleId(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.devices")] fn get_SmsMessage(&mut self, out: *mut *mut super::super::devices::sms::ISmsMessage) -> HRESULT + }} + impl INetworkOperatorNotificationEventDetails { + #[inline] pub unsafe fn get_notification_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NotificationType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_account_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NetworkAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_encoding_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EncodingType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rule_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RuleId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_sms_message(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SmsMessage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INetworkOperatorTetheringEntitlementCheck, 17338733, 40602, 19190, 141, 163, 96, 73, 59, 25, 194, 4); + RT_INTERFACE!{interface INetworkOperatorTetheringEntitlementCheck(INetworkOperatorTetheringEntitlementCheckVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorTetheringEntitlementCheck] { + fn AuthorizeTethering(&mut self, allow: bool, entitlementFailureReason: HSTRING) -> HRESULT + }} + impl INetworkOperatorTetheringEntitlementCheck { + #[inline] pub unsafe fn authorize_tethering(&mut self, allow: bool, entitlementFailureReason: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AuthorizeTethering)(self, allow, entitlementFailureReason.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class NetworkOperatorNotificationEventDetails: INetworkOperatorNotificationEventDetails} +} // Windows.Networking.NetworkOperators +pub mod backgroundtransfer { // Windows.Networking.BackgroundTransfer +use ::prelude::*; + RT_ENUM! { enum BackgroundTransferStatus: i32 { + Idle (BackgroundTransferStatus_Idle) = 0, Running (BackgroundTransferStatus_Running) = 1, PausedByApplication (BackgroundTransferStatus_PausedByApplication) = 2, PausedCostedNetwork (BackgroundTransferStatus_PausedCostedNetwork) = 3, PausedNoNetwork (BackgroundTransferStatus_PausedNoNetwork) = 4, Completed (BackgroundTransferStatus_Completed) = 5, Canceled (BackgroundTransferStatus_Canceled) = 6, Error (BackgroundTransferStatus_Error) = 7, PausedSystemPolicy (BackgroundTransferStatus_PausedSystemPolicy) = 32, + }} + RT_ENUM! { enum BackgroundTransferCostPolicy: i32 { + Default (BackgroundTransferCostPolicy_Default) = 0, UnrestrictedOnly (BackgroundTransferCostPolicy_UnrestrictedOnly) = 1, Always (BackgroundTransferCostPolicy_Always) = 2, + }} + RT_ENUM! { enum BackgroundTransferPriority: i32 { + Default (BackgroundTransferPriority_Default) = 0, High (BackgroundTransferPriority_High) = 1, + }} + RT_ENUM! { enum BackgroundTransferBehavior: i32 { + Parallel (BackgroundTransferBehavior_Parallel) = 0, Serialized (BackgroundTransferBehavior_Serialized) = 1, + }} + RT_STRUCT! { struct BackgroundDownloadProgress { + BytesReceived: u64, TotalBytesToReceive: u64, Status: BackgroundTransferStatus, HasResponseChanged: bool, HasRestarted: bool, + }} + RT_STRUCT! { struct BackgroundUploadProgress { + BytesReceived: u64, BytesSent: u64, TotalBytesToReceive: u64, TotalBytesToSend: u64, Status: BackgroundTransferStatus, HasResponseChanged: bool, HasRestarted: bool, + }} + DEFINE_IID!(IID_IBackgroundTransferBase, 714973776, 51049, 17804, 175, 232, 254, 184, 212, 211, 178, 239); + RT_INTERFACE!{interface IBackgroundTransferBase(IBackgroundTransferBaseVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferBase] { + fn SetRequestHeader(&mut self, headerName: HSTRING, headerValue: HSTRING) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_ServerCredential(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.security")] fn put_ServerCredential(&mut self, credential: *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_ProxyCredential(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.security")] fn put_ProxyCredential(&mut self, credential: *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + fn get_Method(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Method(&mut self, value: HSTRING) -> HRESULT, + fn get_Group(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Group(&mut self, value: HSTRING) -> HRESULT, + fn get_CostPolicy(&mut self, out: *mut BackgroundTransferCostPolicy) -> HRESULT, + fn put_CostPolicy(&mut self, value: BackgroundTransferCostPolicy) -> HRESULT + }} + impl IBackgroundTransferBase { + #[inline] pub unsafe fn set_request_header(&mut self, headerName: &HStringArg, headerValue: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetRequestHeader)(self, headerName.get(), headerValue.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_server_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_server_credential(&mut self, credential: &super::super::security::credentials::PasswordCredential) -> Result<()> { + let hr = ((*self.lpVtbl).put_ServerCredential)(self, credential as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_proxy_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProxyCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_proxy_credential(&mut self, credential: &super::super::security::credentials::PasswordCredential) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProxyCredential)(self, credential as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_method(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Method)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_method(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Method)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_group(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Group)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_group(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Group)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cost_policy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CostPolicy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cost_policy(&mut self, value: BackgroundTransferCostPolicy) -> Result<()> { + let hr = ((*self.lpVtbl).put_CostPolicy)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUnconstrainedTransferRequestResult, 1277474847, 55620, 16658, 169, 142, 106, 105, 82, 43, 126, 187); + RT_INTERFACE!{interface IUnconstrainedTransferRequestResult(IUnconstrainedTransferRequestResultVtbl): IInspectable(IInspectableVtbl) [IID_IUnconstrainedTransferRequestResult] { + fn get_IsUnconstrained(&mut self, out: *mut bool) -> HRESULT + }} + impl IUnconstrainedTransferRequestResult { + #[inline] pub unsafe fn get_is_unconstrained(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsUnconstrained)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundDownloaderUserConsent, 1561651462, 37478, 18440, 189, 113, 89, 37, 242, 163, 19, 10); + RT_INTERFACE!{static interface IBackgroundDownloaderUserConsent(IBackgroundDownloaderUserConsentVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundDownloaderUserConsent] { + fn RequestUnconstrainedDownloadsAsync(&mut self, operations: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBackgroundDownloaderUserConsent { + #[inline] pub unsafe fn request_unconstrained_downloads_async(&mut self, operations: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestUnconstrainedDownloadsAsync)(self, operations as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DownloadOperation: IDownloadOperation} + RT_CLASS!{class UnconstrainedTransferRequestResult: IUnconstrainedTransferRequestResult} + DEFINE_IID!(IID_IBackgroundUploaderUserConsent, 1001620683, 1888, 17949, 144, 127, 81, 56, 248, 77, 68, 193); + RT_INTERFACE!{static interface IBackgroundUploaderUserConsent(IBackgroundUploaderUserConsentVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundUploaderUserConsent] { + fn RequestUnconstrainedUploadsAsync(&mut self, operations: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBackgroundUploaderUserConsent { + #[inline] pub unsafe fn request_unconstrained_uploads_async(&mut self, operations: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestUnconstrainedUploadsAsync)(self, operations as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UploadOperation: IUploadOperation} + DEFINE_IID!(IID_IBackgroundDownloader, 3251082035, 26185, 19229, 168, 38, 164, 179, 221, 35, 77, 11); + RT_INTERFACE!{interface IBackgroundDownloader(IBackgroundDownloaderVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundDownloader] { + #[cfg(feature="windows.storage")] fn CreateDownload(&mut self, uri: *mut super::super::foundation::Uri, resultFile: *mut super::super::storage::IStorageFile, out: *mut *mut DownloadOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateDownloadFromFile(&mut self, uri: *mut super::super::foundation::Uri, resultFile: *mut super::super::storage::IStorageFile, requestBodyFile: *mut super::super::storage::IStorageFile, out: *mut *mut DownloadOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateDownloadAsync(&mut self, uri: *mut super::super::foundation::Uri, resultFile: *mut super::super::storage::IStorageFile, requestBodyStream: *mut super::super::storage::streams::IInputStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBackgroundDownloader { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_download(&mut self, uri: &super::super::foundation::Uri, resultFile: &super::super::storage::IStorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDownload)(self, uri as *const _ as *mut _, resultFile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_download_from_file(&mut self, uri: &super::super::foundation::Uri, resultFile: &super::super::storage::IStorageFile, requestBodyFile: &super::super::storage::IStorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDownloadFromFile)(self, uri as *const _ as *mut _, resultFile as *const _ as *mut _, requestBodyFile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_download_async(&mut self, uri: &super::super::foundation::Uri, resultFile: &super::super::storage::IStorageFile, requestBodyStream: &super::super::storage::streams::IInputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDownloadAsync)(self, uri as *const _ as *mut _, resultFile as *const _ as *mut _, requestBodyStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundDownloader2, 2840221767, 13453, 18997, 137, 14, 138, 30, 243, 121, 132, 121); + RT_INTERFACE!{interface IBackgroundDownloader2(IBackgroundDownloader2Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundDownloader2] { + fn get_TransferGroup(&mut self, out: *mut *mut BackgroundTransferGroup) -> HRESULT, + fn put_TransferGroup(&mut self, value: *mut BackgroundTransferGroup) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_SuccessToastNotification(&mut self, out: *mut *mut super::super::ui::notifications::ToastNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_SuccessToastNotification(&mut self, value: *mut super::super::ui::notifications::ToastNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_FailureToastNotification(&mut self, out: *mut *mut super::super::ui::notifications::ToastNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_FailureToastNotification(&mut self, value: *mut super::super::ui::notifications::ToastNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_SuccessTileNotification(&mut self, out: *mut *mut super::super::ui::notifications::TileNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_SuccessTileNotification(&mut self, value: *mut super::super::ui::notifications::TileNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_FailureTileNotification(&mut self, out: *mut *mut super::super::ui::notifications::TileNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_FailureTileNotification(&mut self, value: *mut super::super::ui::notifications::TileNotification) -> HRESULT + }} + impl IBackgroundDownloader2 { + #[inline] pub unsafe fn get_transfer_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransferGroup)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_transfer_group(&mut self, value: &BackgroundTransferGroup) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransferGroup)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_success_toast_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SuccessToastNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_success_toast_notification(&mut self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuccessToastNotification)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_failure_toast_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FailureToastNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_failure_toast_notification(&mut self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { + let hr = ((*self.lpVtbl).put_FailureToastNotification)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_success_tile_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SuccessTileNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_success_tile_notification(&mut self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuccessTileNotification)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_failure_tile_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FailureTileNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_failure_tile_notification(&mut self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { + let hr = ((*self.lpVtbl).put_FailureTileNotification)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class BackgroundTransferGroup: IBackgroundTransferGroup} + RT_ACTIVATABLE!{IBackgroundTransferGroupStatics [CLSID_BackgroundTransferGroup]} + DEFINE_CLSID!(CLSID_BackgroundTransferGroup = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,66,97,99,107,103,114,111,117,110,100,84,114,97,110,115,102,101,114,46,66,97,99,107,103,114,111,117,110,100,84,114,97,110,115,102,101,114,71,114,111,117,112,0]); + DEFINE_IID!(IID_IBackgroundDownloader3, 3508177992, 34536, 18658, 182, 21, 105, 118, 170, 191, 134, 29); + RT_INTERFACE!{interface IBackgroundDownloader3(IBackgroundDownloader3Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundDownloader3] { + fn get_CompletionGroup(&mut self, out: *mut *mut BackgroundTransferCompletionGroup) -> HRESULT + }} + impl IBackgroundDownloader3 { + #[inline] pub unsafe fn get_completion_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CompletionGroup)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BackgroundTransferCompletionGroup: IBackgroundTransferCompletionGroup} + DEFINE_IID!(IID_IBackgroundUploader, 3314928046, 52909, 18011, 136, 1, 197, 90, 201, 10, 1, 206); + RT_INTERFACE!{interface IBackgroundUploader(IBackgroundUploaderVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundUploader] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateUpload(&mut self, uri: *mut super::super::foundation::Uri, sourceFile: *mut super::super::storage::IStorageFile, out: *mut *mut UploadOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateUploadFromStreamAsync(&mut self, uri: *mut super::super::foundation::Uri, sourceStream: *mut super::super::storage::streams::IInputStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateUploadWithFormDataAndAutoBoundaryAsync(&mut self, uri: *mut super::super::foundation::Uri, parts: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateUploadWithSubTypeAsync(&mut self, uri: *mut super::super::foundation::Uri, parts: *mut super::super::foundation::collections::IIterable, subType: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateUploadWithSubTypeAndBoundaryAsync(&mut self, uri: *mut super::super::foundation::Uri, parts: *mut super::super::foundation::collections::IIterable, subType: HSTRING, boundary: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IBackgroundUploader { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_upload(&mut self, uri: &super::super::foundation::Uri, sourceFile: &super::super::storage::IStorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUpload)(self, uri as *const _ as *mut _, sourceFile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_upload_from_stream_async(&mut self, uri: &super::super::foundation::Uri, sourceStream: &super::super::storage::streams::IInputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUploadFromStreamAsync)(self, uri as *const _ as *mut _, sourceStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_upload_with_form_data_and_auto_boundary_async(&mut self, uri: &super::super::foundation::Uri, parts: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUploadWithFormDataAndAutoBoundaryAsync)(self, uri as *const _ as *mut _, parts as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_upload_with_sub_type_async(&mut self, uri: &super::super::foundation::Uri, parts: &super::super::foundation::collections::IIterable, subType: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUploadWithSubTypeAsync)(self, uri as *const _ as *mut _, parts as *const _ as *mut _, subType.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_upload_with_sub_type_and_boundary_async(&mut self, uri: &super::super::foundation::Uri, parts: &super::super::foundation::collections::IIterable, subType: &HStringArg, boundary: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateUploadWithSubTypeAndBoundaryAsync)(self, uri as *const _ as *mut _, parts as *const _ as *mut _, subType.get(), boundary.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BackgroundTransferContentPart: IBackgroundTransferContentPart [IBackgroundTransferContentPartFactory] [CLSID_BackgroundTransferContentPart]} + DEFINE_CLSID!(CLSID_BackgroundTransferContentPart = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,66,97,99,107,103,114,111,117,110,100,84,114,97,110,115,102,101,114,46,66,97,99,107,103,114,111,117,110,100,84,114,97,110,115,102,101,114,67,111,110,116,101,110,116,80,97,114,116,0]); + DEFINE_IID!(IID_IBackgroundUploader2, 2382762702, 3124, 17507, 128, 127, 25, 138, 27, 139, 212, 173); + RT_INTERFACE!{interface IBackgroundUploader2(IBackgroundUploader2Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundUploader2] { + fn get_TransferGroup(&mut self, out: *mut *mut BackgroundTransferGroup) -> HRESULT, + fn put_TransferGroup(&mut self, value: *mut BackgroundTransferGroup) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_SuccessToastNotification(&mut self, out: *mut *mut super::super::ui::notifications::ToastNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_SuccessToastNotification(&mut self, value: *mut super::super::ui::notifications::ToastNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_FailureToastNotification(&mut self, out: *mut *mut super::super::ui::notifications::ToastNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_FailureToastNotification(&mut self, value: *mut super::super::ui::notifications::ToastNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_SuccessTileNotification(&mut self, out: *mut *mut super::super::ui::notifications::TileNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_SuccessTileNotification(&mut self, value: *mut super::super::ui::notifications::TileNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_FailureTileNotification(&mut self, out: *mut *mut super::super::ui::notifications::TileNotification) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_FailureTileNotification(&mut self, value: *mut super::super::ui::notifications::TileNotification) -> HRESULT + }} + impl IBackgroundUploader2 { + #[inline] pub unsafe fn get_transfer_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransferGroup)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_transfer_group(&mut self, value: &BackgroundTransferGroup) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransferGroup)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_success_toast_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SuccessToastNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_success_toast_notification(&mut self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuccessToastNotification)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_failure_toast_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FailureToastNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_failure_toast_notification(&mut self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { + let hr = ((*self.lpVtbl).put_FailureToastNotification)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_success_tile_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SuccessTileNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_success_tile_notification(&mut self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuccessTileNotification)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_failure_tile_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FailureTileNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_failure_tile_notification(&mut self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { + let hr = ((*self.lpVtbl).put_FailureTileNotification)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundUploader3, 3109983289, 23536, 19258, 140, 71, 44, 97, 153, 168, 84, 185); + RT_INTERFACE!{interface IBackgroundUploader3(IBackgroundUploader3Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundUploader3] { + fn get_CompletionGroup(&mut self, out: *mut *mut BackgroundTransferCompletionGroup) -> HRESULT + }} + impl IBackgroundUploader3 { + #[inline] pub unsafe fn get_completion_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CompletionGroup)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundTransferOperation, 3738200134, 37066, 17659, 143, 177, 18, 65, 84, 192, 213, 57); + RT_INTERFACE!{interface IBackgroundTransferOperation(IBackgroundTransferOperationVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferOperation] { + fn get_Guid(&mut self, out: *mut Guid) -> HRESULT, + fn get_RequestedUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_Method(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Group(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CostPolicy(&mut self, out: *mut BackgroundTransferCostPolicy) -> HRESULT, + fn put_CostPolicy(&mut self, value: BackgroundTransferCostPolicy) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetResultStreamAt(&mut self, position: u64, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT, + fn GetResponseInformation(&mut self, out: *mut *mut ResponseInformation) -> HRESULT + }} + impl IBackgroundTransferOperation { + #[inline] pub unsafe fn get_guid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Guid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_requested_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RequestedUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_method(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Method)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_group(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Group)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cost_policy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CostPolicy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cost_policy(&mut self, value: BackgroundTransferCostPolicy) -> Result<()> { + let hr = ((*self.lpVtbl).put_CostPolicy)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_result_stream_at(&mut self, position: u64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetResultStreamAt)(self, position, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_response_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetResponseInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ResponseInformation: IResponseInformation} + DEFINE_IID!(IID_IBackgroundTransferOperationPriority, 75842343, 21076, 19258, 145, 94, 10, 164, 146, 117, 192, 249); + RT_INTERFACE!{interface IBackgroundTransferOperationPriority(IBackgroundTransferOperationPriorityVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferOperationPriority] { + fn get_Priority(&mut self, out: *mut BackgroundTransferPriority) -> HRESULT, + fn put_Priority(&mut self, value: BackgroundTransferPriority) -> HRESULT + }} + impl IBackgroundTransferOperationPriority { + #[inline] pub unsafe fn get_priority(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Priority)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_priority(&mut self, value: BackgroundTransferPriority) -> Result<()> { + let hr = ((*self.lpVtbl).put_Priority)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDownloadOperation, 3179801520, 22292, 19977, 186, 104, 190, 247, 57, 3, 176, 215); + RT_INTERFACE!{interface IDownloadOperation(IDownloadOperationVtbl): IInspectable(IInspectableVtbl) [IID_IDownloadOperation] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_ResultFile(&mut self, out: *mut *mut super::super::storage::IStorageFile) -> HRESULT, + fn get_Progress(&mut self, out: *mut BackgroundDownloadProgress) -> HRESULT, + fn StartAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn AttachAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn Pause(&mut self) -> HRESULT, + fn Resume(&mut self) -> HRESULT + }} + impl IDownloadOperation { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_result_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResultFile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_progress(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn attach_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AttachAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pause(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Pause)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn resume(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Resume)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDownloadOperation2, 2748116288, 36764, 17235, 156, 212, 41, 13, 238, 56, 124, 56); + RT_INTERFACE!{interface IDownloadOperation2(IDownloadOperation2Vtbl): IInspectable(IInspectableVtbl) [IID_IDownloadOperation2] { + fn get_TransferGroup(&mut self, out: *mut *mut BackgroundTransferGroup) -> HRESULT + }} + impl IDownloadOperation2 { + #[inline] pub unsafe fn get_transfer_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransferGroup)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUploadOperation, 1045832928, 29577, 17228, 139, 53, 66, 127, 211, 107, 189, 174); + RT_INTERFACE!{interface IUploadOperation(IUploadOperationVtbl): IInspectable(IInspectableVtbl) [IID_IUploadOperation] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_SourceFile(&mut self, out: *mut *mut super::super::storage::IStorageFile) -> HRESULT, + fn get_Progress(&mut self, out: *mut BackgroundUploadProgress) -> HRESULT, + fn StartAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn AttachAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IUploadOperation { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_source_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceFile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_progress(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Progress)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn attach_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AttachAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUploadOperation2, 1432455666, 10100, 19958, 159, 165, 32, 159, 43, 251, 18, 247); + RT_INTERFACE!{interface IUploadOperation2(IUploadOperation2Vtbl): IInspectable(IInspectableVtbl) [IID_IUploadOperation2] { + fn get_TransferGroup(&mut self, out: *mut *mut BackgroundTransferGroup) -> HRESULT + }} + impl IUploadOperation2 { + #[inline] pub unsafe fn get_transfer_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransferGroup)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundDownloaderFactory, 646147108, 55454, 18164, 162, 154, 79, 77, 79, 20, 65, 85); + RT_INTERFACE!{static interface IBackgroundDownloaderFactory(IBackgroundDownloaderFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundDownloaderFactory] { + fn CreateWithCompletionGroup(&mut self, completionGroup: *mut BackgroundTransferCompletionGroup, out: *mut *mut BackgroundDownloader) -> HRESULT + }} + impl IBackgroundDownloaderFactory { + #[inline] pub unsafe fn create_with_completion_group(&mut self, completionGroup: &BackgroundTransferCompletionGroup) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithCompletionGroup)(self, completionGroup as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BackgroundDownloader: IBackgroundDownloader [IBackgroundDownloaderFactory] [CLSID_BackgroundDownloader]} + RT_ACTIVATABLE!{IBackgroundDownloaderStaticMethods [CLSID_BackgroundDownloader]} + RT_ACTIVATABLE!{IBackgroundDownloaderUserConsent [CLSID_BackgroundDownloader]} + RT_ACTIVATABLE!{IBackgroundDownloaderStaticMethods2 [CLSID_BackgroundDownloader]} + DEFINE_CLSID!(CLSID_BackgroundDownloader = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,66,97,99,107,103,114,111,117,110,100,84,114,97,110,115,102,101,114,46,66,97,99,107,103,114,111,117,110,100,68,111,119,110,108,111,97,100,101,114,0]); + DEFINE_IID!(IID_IBackgroundDownloaderStaticMethods, 1386633781, 50766, 17004, 153, 25, 84, 13, 13, 33, 166, 80); + RT_INTERFACE!{static interface IBackgroundDownloaderStaticMethods(IBackgroundDownloaderStaticMethodsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundDownloaderStaticMethods] { + fn GetCurrentDownloadsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetCurrentDownloadsForGroupAsync(&mut self, group: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IBackgroundDownloaderStaticMethods { + #[inline] pub unsafe fn get_current_downloads_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentDownloadsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_downloads_for_group_async(&mut self, group: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentDownloadsForGroupAsync)(self, group.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundDownloaderStaticMethods2, 799675175, 6868, 19621, 178, 205, 8, 219, 240, 116, 106, 254); + RT_INTERFACE!{static interface IBackgroundDownloaderStaticMethods2(IBackgroundDownloaderStaticMethods2Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundDownloaderStaticMethods2] { + fn GetCurrentDownloadsForTransferGroupAsync(&mut self, group: *mut BackgroundTransferGroup, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IBackgroundDownloaderStaticMethods2 { + #[inline] pub unsafe fn get_current_downloads_for_transfer_group_async(&mut self, group: &BackgroundTransferGroup) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentDownloadsForTransferGroupAsync)(self, group as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundUploaderFactory, 1935803335, 4327, 18592, 172, 60, 26, 199, 16, 149, 236, 87); + RT_INTERFACE!{static interface IBackgroundUploaderFactory(IBackgroundUploaderFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundUploaderFactory] { + fn CreateWithCompletionGroup(&mut self, completionGroup: *mut BackgroundTransferCompletionGroup, out: *mut *mut BackgroundUploader) -> HRESULT + }} + impl IBackgroundUploaderFactory { + #[inline] pub unsafe fn create_with_completion_group(&mut self, completionGroup: &BackgroundTransferCompletionGroup) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithCompletionGroup)(self, completionGroup as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BackgroundUploader: IBackgroundUploader [IBackgroundUploaderFactory] [CLSID_BackgroundUploader]} + RT_ACTIVATABLE!{IBackgroundUploaderStaticMethods2 [CLSID_BackgroundUploader]} + RT_ACTIVATABLE!{IBackgroundUploaderStaticMethods [CLSID_BackgroundUploader]} + RT_ACTIVATABLE!{IBackgroundUploaderUserConsent [CLSID_BackgroundUploader]} + DEFINE_CLSID!(CLSID_BackgroundUploader = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,66,97,99,107,103,114,111,117,110,100,84,114,97,110,115,102,101,114,46,66,97,99,107,103,114,111,117,110,100,85,112,108,111,97,100,101,114,0]); + DEFINE_IID!(IID_IBackgroundUploaderStaticMethods, 4068957435, 39685, 18241, 145, 33, 116, 10, 131, 226, 71, 223); + RT_INTERFACE!{static interface IBackgroundUploaderStaticMethods(IBackgroundUploaderStaticMethodsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundUploaderStaticMethods] { + fn GetCurrentUploadsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetCurrentUploadsForGroupAsync(&mut self, group: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IBackgroundUploaderStaticMethods { + #[inline] pub unsafe fn get_current_uploads_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentUploadsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_uploads_for_group_async(&mut self, group: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentUploadsForGroupAsync)(self, group.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundUploaderStaticMethods2, 3910773858, 59912, 17136, 162, 172, 7, 228, 103, 84, 144, 128); + RT_INTERFACE!{static interface IBackgroundUploaderStaticMethods2(IBackgroundUploaderStaticMethods2Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundUploaderStaticMethods2] { + fn GetCurrentUploadsForTransferGroupAsync(&mut self, group: *mut BackgroundTransferGroup, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IBackgroundUploaderStaticMethods2 { + #[inline] pub unsafe fn get_current_uploads_for_transfer_group_async(&mut self, group: &BackgroundTransferGroup) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentUploadsForTransferGroupAsync)(self, group as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IResponseInformation, 4173044242, 63251, 18322, 139, 104, 217, 210, 151, 249, 29, 46); + RT_INTERFACE!{interface IResponseInformation(IResponseInformationVtbl): IInspectable(IInspectableVtbl) [IID_IResponseInformation] { + fn get_IsResumable(&mut self, out: *mut bool) -> HRESULT, + fn get_ActualUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_StatusCode(&mut self, out: *mut u32) -> HRESULT, + fn get_Headers(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + }} + impl IResponseInformation { + #[inline] pub unsafe fn get_is_resumable(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsResumable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_actual_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActualUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StatusCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_headers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Headers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundTransferErrorStaticMethods, 2865969924, 4498, 19444, 139, 104, 57, 197, 173, 210, 68, 226); + RT_INTERFACE!{static interface IBackgroundTransferErrorStaticMethods(IBackgroundTransferErrorStaticMethodsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferErrorStaticMethods] { + #[cfg(feature="windows.web")] fn GetStatus(&mut self, hresult: i32, out: *mut super::super::web::WebErrorStatus) -> HRESULT + }} + impl IBackgroundTransferErrorStaticMethods { + #[cfg(feature="windows.web")] #[inline] pub unsafe fn get_status(&mut self, hresult: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStatus)(self, hresult, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundTransferContentPart, 3907081815, 55249, 20184, 131, 142, 103, 74, 194, 23, 172, 230); + RT_INTERFACE!{interface IBackgroundTransferContentPart(IBackgroundTransferContentPartVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferContentPart] { + fn SetHeader(&mut self, headerName: HSTRING, headerValue: HSTRING) -> HRESULT, + fn SetText(&mut self, value: HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn SetFile(&mut self, value: *mut super::super::storage::IStorageFile) -> HRESULT + }} + impl IBackgroundTransferContentPart { + #[inline] pub unsafe fn set_header(&mut self, headerName: &HStringArg, headerValue: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetHeader)(self, headerName.get(), headerValue.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_file(&mut self, value: &super::super::storage::IStorageFile) -> Result<()> { + let hr = ((*self.lpVtbl).SetFile)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundTransferContentPartFactory, 2431621289, 31233, 18955, 159, 128, 160, 176, 187, 55, 15, 141); + RT_INTERFACE!{static interface IBackgroundTransferContentPartFactory(IBackgroundTransferContentPartFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferContentPartFactory] { + fn CreateWithName(&mut self, name: HSTRING, out: *mut *mut BackgroundTransferContentPart) -> HRESULT, + fn CreateWithNameAndFileName(&mut self, name: HSTRING, fileName: HSTRING, out: *mut *mut BackgroundTransferContentPart) -> HRESULT + }} + impl IBackgroundTransferContentPartFactory { + #[inline] pub unsafe fn create_with_name(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithName)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_name_and_file_name(&mut self, name: &HStringArg, fileName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithNameAndFileName)(self, name.get(), fileName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundTransferGroup, 3636716516, 25689, 17728, 133, 235, 170, 161, 200, 144, 54, 119); + RT_INTERFACE!{interface IBackgroundTransferGroup(IBackgroundTransferGroupVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferGroup] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TransferBehavior(&mut self, out: *mut BackgroundTransferBehavior) -> HRESULT, + fn put_TransferBehavior(&mut self, value: BackgroundTransferBehavior) -> HRESULT + }} + impl IBackgroundTransferGroup { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transfer_behavior(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TransferBehavior)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_transfer_behavior(&mut self, value: BackgroundTransferBehavior) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransferBehavior)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundTransferGroupStatics, 49041586, 32024, 18779, 170, 34, 50, 169, 125, 69, 211, 226); + RT_INTERFACE!{static interface IBackgroundTransferGroupStatics(IBackgroundTransferGroupStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferGroupStatics] { + fn CreateGroup(&mut self, name: HSTRING, out: *mut *mut BackgroundTransferGroup) -> HRESULT + }} + impl IBackgroundTransferGroupStatics { + #[inline] pub unsafe fn create_group(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateGroup)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPrefetcherTime, 3814849800, 4906, 20446, 167, 204, 252, 176, 230, 101, 35, 175); + RT_INTERFACE!{static interface IContentPrefetcherTime(IContentPrefetcherTimeVtbl): IInspectable(IInspectableVtbl) [IID_IContentPrefetcherTime] { + fn get_LastSuccessfulPrefetchTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IContentPrefetcherTime { + #[inline] pub unsafe fn get_last_successful_prefetch_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LastSuccessfulPrefetchTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPrefetcher, 2832660308, 32193, 19673, 136, 16, 42, 106, 169, 65, 126, 17); + RT_INTERFACE!{static interface IContentPrefetcher(IContentPrefetcherVtbl): IInspectable(IInspectableVtbl) [IID_IContentPrefetcher] { + fn get_ContentUris(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_IndirectContentUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_IndirectContentUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + }} + impl IContentPrefetcher { + #[inline] pub unsafe fn get_content_uris(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentUris)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_indirect_content_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_IndirectContentUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_indirect_content_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IndirectContentUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundTransferCompletionGroup, 764609061, 39019, 22349, 121, 80, 10, 221, 71, 245, 215, 6); + RT_INTERFACE!{interface IBackgroundTransferCompletionGroup(IBackgroundTransferCompletionGroupVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferCompletionGroup] { + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_Trigger(&mut self, out: *mut *mut super::super::applicationmodel::background::IBackgroundTrigger) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn Enable(&mut self) -> HRESULT + }} + impl IBackgroundTransferCompletionGroup { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_trigger(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Trigger)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn enable(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Enable)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBackgroundTransferCompletionGroupTriggerDetails, 2070667910, 28231, 20790, 127, 203, 250, 67, 137, 244, 111, 91); + RT_INTERFACE!{interface IBackgroundTransferCompletionGroupTriggerDetails(IBackgroundTransferCompletionGroupTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferCompletionGroupTriggerDetails] { + fn get_Downloads(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Uploads(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IBackgroundTransferCompletionGroupTriggerDetails { + #[inline] pub unsafe fn get_downloads(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Downloads)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uploads(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Uploads)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IBackgroundTransferErrorStaticMethods [CLSID_BackgroundTransferError]} + DEFINE_CLSID!(CLSID_BackgroundTransferError = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,66,97,99,107,103,114,111,117,110,100,84,114,97,110,115,102,101,114,46,66,97,99,107,103,114,111,117,110,100,84,114,97,110,115,102,101,114,69,114,114,111,114,0]); + RT_ACTIVATABLE!{IContentPrefetcherTime [CLSID_ContentPrefetcher]} + RT_ACTIVATABLE!{IContentPrefetcher [CLSID_ContentPrefetcher]} + DEFINE_CLSID!(CLSID_ContentPrefetcher = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,66,97,99,107,103,114,111,117,110,100,84,114,97,110,115,102,101,114,46,67,111,110,116,101,110,116,80,114,101,102,101,116,99,104,101,114,0]); + RT_CLASS!{class BackgroundTransferCompletionGroupTriggerDetails: IBackgroundTransferCompletionGroupTriggerDetails} +} // Windows.Networking.BackgroundTransfer +pub mod proximity { // Windows.Networking.Proximity +use ::prelude::*; + DEFINE_IID!(IID_IProximityMessage, 4020963202, 63201, 18037, 160, 69, 216, 227, 32, 194, 72, 8); + RT_INTERFACE!{interface IProximityMessage(IProximityMessageVtbl): IInspectable(IInspectableVtbl) [IID_IProximityMessage] { + fn get_MessageType(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SubscriptionId(&mut self, out: *mut i64) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_DataAsString(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IProximityMessage { + #[inline] pub unsafe fn get_message_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MessageType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subscription_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SubscriptionId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_as_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataAsString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProximityMessage: IProximityMessage} + DEFINE_IID!(IID_MessageReceivedHandler, 4020963202, 63202, 18037, 160, 69, 216, 227, 32, 194, 72, 8); + RT_DELEGATE!{delegate MessageReceivedHandler(MessageReceivedHandlerVtbl, MessageReceivedHandlerImpl) [IID_MessageReceivedHandler] { + fn Invoke(&mut self, sender: *mut ProximityDevice, message: *mut ProximityMessage) -> HRESULT + }} + impl MessageReceivedHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &ProximityDevice, message: &ProximityMessage) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, message as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ProximityDevice: IProximityDevice} + RT_ACTIVATABLE!{IProximityDeviceStatics [CLSID_ProximityDevice]} + DEFINE_CLSID!(CLSID_ProximityDevice = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,80,114,111,120,105,109,105,116,121,46,80,114,111,120,105,109,105,116,121,68,101,118,105,99,101,0]); + DEFINE_IID!(IID_MessageTransmittedHandler, 4020898634, 63202, 19837, 133, 108, 120, 252, 142, 252, 2, 30); + RT_DELEGATE!{delegate MessageTransmittedHandler(MessageTransmittedHandlerVtbl, MessageTransmittedHandlerImpl) [IID_MessageTransmittedHandler] { + fn Invoke(&mut self, sender: *mut ProximityDevice, messageId: i64) -> HRESULT + }} + impl MessageTransmittedHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &ProximityDevice, messageId: i64) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, messageId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_DeviceArrivedEventHandler, 4020886121, 63201, 18889, 164, 158, 142, 15, 197, 143, 185, 17); + RT_DELEGATE!{delegate DeviceArrivedEventHandler(DeviceArrivedEventHandlerVtbl, DeviceArrivedEventHandlerImpl) [IID_DeviceArrivedEventHandler] { + fn Invoke(&mut self, sender: *mut ProximityDevice) -> HRESULT + }} + impl DeviceArrivedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &ProximityDevice) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_DeviceDepartedEventHandler, 4020886121, 63202, 18889, 164, 158, 142, 15, 197, 143, 185, 17); + RT_DELEGATE!{delegate DeviceDepartedEventHandler(DeviceDepartedEventHandlerVtbl, DeviceDepartedEventHandlerImpl) [IID_DeviceDepartedEventHandler] { + fn Invoke(&mut self, sender: *mut ProximityDevice) -> HRESULT + }} + impl DeviceDepartedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &ProximityDevice) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProximityDevice, 4020806994, 63201, 17193, 160, 252, 171, 107, 15, 210, 130, 98); + RT_INTERFACE!{interface IProximityDevice(IProximityDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IProximityDevice] { + fn SubscribeForMessage(&mut self, messageType: HSTRING, messageReceivedHandler: *mut MessageReceivedHandler, out: *mut i64) -> HRESULT, + fn PublishMessage(&mut self, messageType: HSTRING, message: HSTRING, out: *mut i64) -> HRESULT, + fn PublishMessageWithCallback(&mut self, messageType: HSTRING, message: HSTRING, messageTransmittedHandler: *mut MessageTransmittedHandler, out: *mut i64) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn PublishBinaryMessage(&mut self, messageType: HSTRING, message: *mut super::super::storage::streams::IBuffer, out: *mut i64) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn PublishBinaryMessageWithCallback(&mut self, messageType: HSTRING, message: *mut super::super::storage::streams::IBuffer, messageTransmittedHandler: *mut MessageTransmittedHandler, out: *mut i64) -> HRESULT, + fn PublishUriMessage(&mut self, message: *mut super::super::foundation::Uri, out: *mut i64) -> HRESULT, + fn PublishUriMessageWithCallback(&mut self, message: *mut super::super::foundation::Uri, messageTransmittedHandler: *mut MessageTransmittedHandler, out: *mut i64) -> HRESULT, + fn StopSubscribingForMessage(&mut self, subscriptionId: i64) -> HRESULT, + fn StopPublishingMessage(&mut self, messageId: i64) -> HRESULT, + fn add_DeviceArrived(&mut self, arrivedHandler: *mut DeviceArrivedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeviceArrived(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DeviceDeparted(&mut self, departedHandler: *mut DeviceDepartedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeviceDeparted(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_MaxMessageBytes(&mut self, out: *mut u32) -> HRESULT, + fn get_BitsPerSecond(&mut self, out: *mut u64) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IProximityDevice { + #[inline] pub unsafe fn subscribe_for_message(&mut self, messageType: &HStringArg, messageReceivedHandler: &MessageReceivedHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).SubscribeForMessage)(self, messageType.get(), messageReceivedHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn publish_message(&mut self, messageType: &HStringArg, message: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).PublishMessage)(self, messageType.get(), message.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn publish_message_with_callback(&mut self, messageType: &HStringArg, message: &HStringArg, messageTransmittedHandler: &MessageTransmittedHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).PublishMessageWithCallback)(self, messageType.get(), message.get(), messageTransmittedHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn publish_binary_message(&mut self, messageType: &HStringArg, message: &super::super::storage::streams::IBuffer) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).PublishBinaryMessage)(self, messageType.get(), message as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn publish_binary_message_with_callback(&mut self, messageType: &HStringArg, message: &super::super::storage::streams::IBuffer, messageTransmittedHandler: &MessageTransmittedHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).PublishBinaryMessageWithCallback)(self, messageType.get(), message as *const _ as *mut _, messageTransmittedHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn publish_uri_message(&mut self, message: &super::super::foundation::Uri) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).PublishUriMessage)(self, message as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn publish_uri_message_with_callback(&mut self, message: &super::super::foundation::Uri, messageTransmittedHandler: &MessageTransmittedHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).PublishUriMessageWithCallback)(self, message as *const _ as *mut _, messageTransmittedHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn stop_subscribing_for_message(&mut self, subscriptionId: i64) -> Result<()> { + let hr = ((*self.lpVtbl).StopSubscribingForMessage)(self, subscriptionId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop_publishing_message(&mut self, messageId: i64) -> Result<()> { + let hr = ((*self.lpVtbl).StopPublishingMessage)(self, messageId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_device_arrived(&mut self, arrivedHandler: &DeviceArrivedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DeviceArrived)(self, arrivedHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_device_arrived(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DeviceArrived)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_device_departed(&mut self, departedHandler: &DeviceDepartedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DeviceDeparted)(self, departedHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_device_departed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DeviceDeparted)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_message_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxMessageBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bits_per_second(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BitsPerSecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProximityDeviceStatics, 2437652509, 63201, 18372, 161, 76, 20, 138, 25, 3, 208, 198); + RT_INTERFACE!{static interface IProximityDeviceStatics(IProximityDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IProximityDeviceStatics] { + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT, + fn GetDefault(&mut self, out: *mut *mut ProximityDevice) -> HRESULT, + fn FromId(&mut self, deviceId: HSTRING, out: *mut *mut ProximityDevice) -> HRESULT + }} + impl IProximityDeviceStatics { + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_id(&mut self, deviceId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromId)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum TriggeredConnectState: i32 { + PeerFound (TriggeredConnectState_PeerFound) = 0, Listening (TriggeredConnectState_Listening) = 1, Connecting (TriggeredConnectState_Connecting) = 2, Completed (TriggeredConnectState_Completed) = 3, Canceled (TriggeredConnectState_Canceled) = 4, Failed (TriggeredConnectState_Failed) = 5, + }} + DEFINE_IID!(IID_ITriggeredConnectionStateChangedEventArgs, 3332866221, 63201, 19796, 150, 226, 51, 246, 32, 188, 168, 138); + RT_INTERFACE!{interface ITriggeredConnectionStateChangedEventArgs(ITriggeredConnectionStateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITriggeredConnectionStateChangedEventArgs] { + fn get_State(&mut self, out: *mut TriggeredConnectState) -> HRESULT, + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_Socket(&mut self, out: *mut *mut super::sockets::StreamSocket) -> HRESULT + }} + impl ITriggeredConnectionStateChangedEventArgs { + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_socket(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Socket)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TriggeredConnectionStateChangedEventArgs: ITriggeredConnectionStateChangedEventArgs} + DEFINE_IID!(IID_IPeerInformation, 537022216, 40959, 17908, 182, 233, 64, 139, 46, 190, 243, 115); + RT_INTERFACE!{interface IPeerInformation(IPeerInformationVtbl): IInspectable(IInspectableVtbl) [IID_IPeerInformation] { + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPeerInformation { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPeerInformationWithHostAndService, 3972517037, 7024, 20107, 146, 219, 187, 231, 129, 65, 147, 8); + RT_INTERFACE!{interface IPeerInformationWithHostAndService(IPeerInformationWithHostAndServiceVtbl): IInspectable(IInspectableVtbl) [IID_IPeerInformationWithHostAndService] { + fn get_HostName(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn get_ServiceName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPeerInformationWithHostAndService { + #[inline] pub unsafe fn get_host_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HostName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPeerInformation3, 2987352362, 56272, 16632, 149, 189, 45, 66, 9, 199, 131, 111); + RT_INTERFACE!{interface IPeerInformation3(IPeerInformation3Vtbl): IInspectable(IInspectableVtbl) [IID_IPeerInformation3] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_DiscoveryData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IPeerInformation3 { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_discovery_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DiscoveryData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PeerInformation: IPeerInformation} + DEFINE_IID!(IID_IConnectionRequestedEventArgs, 3949498798, 20254, 19558, 189, 13, 70, 146, 74, 148, 46, 8); + RT_INTERFACE!{interface IConnectionRequestedEventArgs(IConnectionRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IConnectionRequestedEventArgs] { + fn get_PeerInformation(&mut self, out: *mut *mut PeerInformation) -> HRESULT + }} + impl IConnectionRequestedEventArgs { + #[inline] pub unsafe fn get_peer_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PeerInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ConnectionRequestedEventArgs: IConnectionRequestedEventArgs} + RT_ENUM! { enum PeerWatcherStatus: i32 { + Created (PeerWatcherStatus_Created) = 0, Started (PeerWatcherStatus_Started) = 1, EnumerationCompleted (PeerWatcherStatus_EnumerationCompleted) = 2, Stopping (PeerWatcherStatus_Stopping) = 3, Stopped (PeerWatcherStatus_Stopped) = 4, Aborted (PeerWatcherStatus_Aborted) = 5, + }} + DEFINE_IID!(IID_IPeerWatcher, 1022239224, 12198, 18041, 150, 145, 3, 201, 74, 66, 15, 52); + RT_INTERFACE!{interface IPeerWatcher(IPeerWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IPeerWatcher] { + fn add_Added(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_Status(&mut self, out: *mut PeerWatcherStatus) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IPeerWatcher { + #[inline] pub unsafe fn add_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Added)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Added)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Removed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Removed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Updated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Updated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stopped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PeerWatcher: IPeerWatcher} + RT_ENUM! { enum PeerDiscoveryTypes: u32 { + None (PeerDiscoveryTypes_None) = 0, Browse (PeerDiscoveryTypes_Browse) = 1, Triggered (PeerDiscoveryTypes_Triggered) = 2, + }} + RT_ENUM! { enum PeerRole: i32 { + Peer (PeerRole_Peer) = 0, Host (PeerRole_Host) = 1, Client (PeerRole_Client) = 2, + }} + DEFINE_IID!(IID_IPeerFinderStatics, 2437626721, 63201, 18372, 161, 76, 20, 138, 25, 3, 208, 198); + RT_INTERFACE!{static interface IPeerFinderStatics(IPeerFinderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPeerFinderStatics] { + fn get_AllowBluetooth(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowBluetooth(&mut self, value: bool) -> HRESULT, + fn get_AllowInfrastructure(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowInfrastructure(&mut self, value: bool) -> HRESULT, + fn get_AllowWiFiDirect(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowWiFiDirect(&mut self, value: bool) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_SupportedDiscoveryTypes(&mut self, out: *mut PeerDiscoveryTypes) -> HRESULT, + fn get_AlternateIdentities(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn StartWithMessage(&mut self, peerMessage: HSTRING) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn add_TriggeredConnectionStateChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TriggeredConnectionStateChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ConnectionRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionRequested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn FindAllPeersAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn ConnectAsync(&mut self, peerInformation: *mut PeerInformation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPeerFinderStatics { + #[inline] pub unsafe fn get_allow_bluetooth(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowBluetooth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_bluetooth(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowBluetooth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_allow_infrastructure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowInfrastructure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_infrastructure(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowInfrastructure)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_allow_wi_fi_direct(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowWiFiDirect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_wi_fi_direct(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowWiFiDirect)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_discovery_types(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SupportedDiscoveryTypes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_alternate_identities(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlternateIdentities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_with_message(&mut self, peerMessage: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).StartWithMessage)(self, peerMessage.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_triggered_connection_state_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TriggeredConnectionStateChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_triggered_connection_state_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TriggeredConnectionStateChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_connection_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ConnectionRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_connection_requested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ConnectionRequested)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_peers_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllPeersAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_async(&mut self, peerInformation: &PeerInformation) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectAsync)(self, peerInformation as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPeerFinderStatics2, 3605478501, 64976, 19211, 147, 18, 134, 100, 8, 147, 93, 130); + RT_INTERFACE!{static interface IPeerFinderStatics2(IPeerFinderStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IPeerFinderStatics2] { + fn get_Role(&mut self, out: *mut PeerRole) -> HRESULT, + fn put_Role(&mut self, value: PeerRole) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_DiscoveryData(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_DiscoveryData(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn CreateWatcher(&mut self, out: *mut *mut PeerWatcher) -> HRESULT + }} + impl IPeerFinderStatics2 { + #[inline] pub unsafe fn get_role(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Role)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_role(&mut self, value: PeerRole) -> Result<()> { + let hr = ((*self.lpVtbl).put_Role)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_discovery_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DiscoveryData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_discovery_data(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_DiscoveryData)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn create_watcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPeerFinderStatics [CLSID_PeerFinder]} + RT_ACTIVATABLE!{IPeerFinderStatics2 [CLSID_PeerFinder]} + DEFINE_CLSID!(CLSID_PeerFinder = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,80,114,111,120,105,109,105,116,121,46,80,101,101,114,70,105,110,100,101,114,0]); +} // Windows.Networking.Proximity +pub mod servicediscovery { // Windows.Networking.ServiceDiscovery +pub mod dnssd { // Windows.Networking.ServiceDiscovery.Dnssd +use ::prelude::*; + RT_ENUM! { enum DnssdRegistrationStatus: i32 { + Success (DnssdRegistrationStatus_Success) = 0, InvalidServiceName (DnssdRegistrationStatus_InvalidServiceName) = 1, ServerError (DnssdRegistrationStatus_ServerError) = 2, SecurityError (DnssdRegistrationStatus_SecurityError) = 3, + }} + RT_ENUM! { enum DnssdServiceWatcherStatus: i32 { + Created (DnssdServiceWatcherStatus_Created) = 0, Started (DnssdServiceWatcherStatus_Started) = 1, EnumerationCompleted (DnssdServiceWatcherStatus_EnumerationCompleted) = 2, Stopping (DnssdServiceWatcherStatus_Stopping) = 3, Stopped (DnssdServiceWatcherStatus_Stopped) = 4, Aborted (DnssdServiceWatcherStatus_Aborted) = 5, + }} + DEFINE_IID!(IID_IDnssdServiceWatcher, 3426015681, 56189, 19305, 152, 61, 198, 248, 63, 32, 86, 130); + RT_INTERFACE!{interface IDnssdServiceWatcher(IDnssdServiceWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IDnssdServiceWatcher] { + fn add_Added(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_Status(&mut self, out: *mut DnssdServiceWatcherStatus) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IDnssdServiceWatcher { + #[inline] pub unsafe fn add_added(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Added)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_added(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Added)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stopped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DnssdServiceWatcher: IDnssdServiceWatcher} + RT_CLASS!{class DnssdServiceInstance: IDnssdServiceInstance [IDnssdServiceInstanceFactory] [CLSID_DnssdServiceInstance]} + DEFINE_CLSID!(CLSID_DnssdServiceInstance = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,83,101,114,118,105,99,101,68,105,115,99,111,118,101,114,121,46,68,110,115,115,100,46,68,110,115,115,100,83,101,114,118,105,99,101,73,110,115,116,97,110,99,101,0]); + DEFINE_IID!(IID_IDnssdRegistrationResult, 1031301842, 58886, 21328, 115, 234, 126, 151, 240, 102, 22, 47); + RT_INTERFACE!{interface IDnssdRegistrationResult(IDnssdRegistrationResultVtbl): IInspectable(IInspectableVtbl) [IID_IDnssdRegistrationResult] { + fn get_Status(&mut self, out: *mut DnssdRegistrationStatus) -> HRESULT, + fn get_IPAddress(&mut self, out: *mut *mut super::super::HostName) -> HRESULT, + fn get_HasInstanceNameChanged(&mut self, out: *mut bool) -> HRESULT + }} + impl IDnssdRegistrationResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ipaddress(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IPAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_instance_name_changed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasInstanceNameChanged)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDnssdServiceInstanceFactory, 1823498657, 50296, 17201, 150, 132, 74, 242, 24, 108, 10, 43); + RT_INTERFACE!{static interface IDnssdServiceInstanceFactory(IDnssdServiceInstanceFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDnssdServiceInstanceFactory] { + fn Create(&mut self, dnssdServiceInstanceName: HSTRING, hostName: *mut super::super::HostName, port: u16, out: *mut *mut DnssdServiceInstance) -> HRESULT + }} + impl IDnssdServiceInstanceFactory { + #[inline] pub unsafe fn create(&mut self, dnssdServiceInstanceName: &HStringArg, hostName: &super::super::HostName, port: u16) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, dnssdServiceInstanceName.get(), hostName as *const _ as *mut _, port, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDnssdServiceInstance, 3796294526, 39077, 19617, 185, 228, 194, 83, 211, 60, 53, 255); + RT_INTERFACE!{interface IDnssdServiceInstance(IDnssdServiceInstanceVtbl): IInspectable(IInspectableVtbl) [IID_IDnssdServiceInstance] { + fn get_DnssdServiceInstanceName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DnssdServiceInstanceName(&mut self, value: HSTRING) -> HRESULT, + fn get_HostName(&mut self, out: *mut *mut super::super::HostName) -> HRESULT, + fn put_HostName(&mut self, value: *mut super::super::HostName) -> HRESULT, + fn get_Port(&mut self, out: *mut u16) -> HRESULT, + fn put_Port(&mut self, value: u16) -> HRESULT, + fn get_Priority(&mut self, out: *mut u16) -> HRESULT, + fn put_Priority(&mut self, value: u16) -> HRESULT, + fn get_Weight(&mut self, out: *mut u16) -> HRESULT, + fn put_Weight(&mut self, value: u16) -> HRESULT, + fn get_TextAttributes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT, + fn RegisterStreamSocketListenerAsync1(&mut self, socket: *mut super::super::sockets::StreamSocketListener, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn RegisterStreamSocketListenerAsync2(&mut self, socket: *mut super::super::sockets::StreamSocketListener, adapter: *mut super::super::connectivity::NetworkAdapter, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn RegisterDatagramSocketAsync1(&mut self, socket: *mut super::super::sockets::DatagramSocket, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn RegisterDatagramSocketAsync2(&mut self, socket: *mut super::super::sockets::DatagramSocket, adapter: *mut super::super::connectivity::NetworkAdapter, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IDnssdServiceInstance { + #[inline] pub unsafe fn get_dnssd_service_instance_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DnssdServiceInstanceName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_dnssd_service_instance_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DnssdServiceInstanceName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_host_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HostName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_host_name(&mut self, value: &super::super::HostName) -> Result<()> { + let hr = ((*self.lpVtbl).put_HostName)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_port(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Port)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_port(&mut self, value: u16) -> Result<()> { + let hr = ((*self.lpVtbl).put_Port)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_priority(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Priority)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_priority(&mut self, value: u16) -> Result<()> { + let hr = ((*self.lpVtbl).put_Priority)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_weight(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Weight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_weight(&mut self, value: u16) -> Result<()> { + let hr = ((*self.lpVtbl).put_Weight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_attributes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextAttributes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn register_stream_socket_listener_async1(&mut self, socket: &super::super::sockets::StreamSocketListener) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RegisterStreamSocketListenerAsync1)(self, socket as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn register_stream_socket_listener_async2(&mut self, socket: &super::super::sockets::StreamSocketListener, adapter: &super::super::connectivity::NetworkAdapter) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RegisterStreamSocketListenerAsync2)(self, socket as *const _ as *mut _, adapter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn register_datagram_socket_async1(&mut self, socket: &super::super::sockets::DatagramSocket) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RegisterDatagramSocketAsync1)(self, socket as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn register_datagram_socket_async2(&mut self, socket: &super::super::sockets::DatagramSocket, adapter: &super::super::connectivity::NetworkAdapter) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RegisterDatagramSocketAsync2)(self, socket as *const _ as *mut _, adapter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DnssdRegistrationResult: IDnssdRegistrationResult} + RT_CLASS!{class DnssdServiceInstanceCollection: ::rt::gen::windows::foundation::collections::IVectorView} +} // Windows.Networking.ServiceDiscovery.Dnssd +} // Windows.Networking.ServiceDiscovery +pub mod sockets { // Windows.Networking.Sockets +use ::prelude::*; + RT_ENUM! { enum SocketMessageType: i32 { + Binary (SocketMessageType_Binary) = 0, Utf8 (SocketMessageType_Utf8) = 1, + }} + RT_ENUM! { enum SocketProtectionLevel: i32 { + PlainSocket (SocketProtectionLevel_PlainSocket) = 0, Ssl (SocketProtectionLevel_Ssl) = 1, SslAllowNullEncryption (SocketProtectionLevel_SslAllowNullEncryption) = 2, BluetoothEncryptionAllowNullAuthentication (SocketProtectionLevel_BluetoothEncryptionAllowNullAuthentication) = 3, BluetoothEncryptionWithAuthentication (SocketProtectionLevel_BluetoothEncryptionWithAuthentication) = 4, Ssl3AllowWeakEncryption (SocketProtectionLevel_Ssl3AllowWeakEncryption) = 5, Tls10 (SocketProtectionLevel_Tls10) = 6, Tls11 (SocketProtectionLevel_Tls11) = 7, Tls12 (SocketProtectionLevel_Tls12) = 8, + }} + RT_ENUM! { enum SocketQualityOfService: i32 { + Normal (SocketQualityOfService_Normal) = 0, LowLatency (SocketQualityOfService_LowLatency) = 1, + }} + RT_ENUM! { enum SocketErrorStatus: i32 { + Unknown (SocketErrorStatus_Unknown) = 0, OperationAborted (SocketErrorStatus_OperationAborted) = 1, HttpInvalidServerResponse (SocketErrorStatus_HttpInvalidServerResponse) = 2, ConnectionTimedOut (SocketErrorStatus_ConnectionTimedOut) = 3, AddressFamilyNotSupported (SocketErrorStatus_AddressFamilyNotSupported) = 4, SocketTypeNotSupported (SocketErrorStatus_SocketTypeNotSupported) = 5, HostNotFound (SocketErrorStatus_HostNotFound) = 6, NoDataRecordOfRequestedType (SocketErrorStatus_NoDataRecordOfRequestedType) = 7, NonAuthoritativeHostNotFound (SocketErrorStatus_NonAuthoritativeHostNotFound) = 8, ClassTypeNotFound (SocketErrorStatus_ClassTypeNotFound) = 9, AddressAlreadyInUse (SocketErrorStatus_AddressAlreadyInUse) = 10, CannotAssignRequestedAddress (SocketErrorStatus_CannotAssignRequestedAddress) = 11, ConnectionRefused (SocketErrorStatus_ConnectionRefused) = 12, NetworkIsUnreachable (SocketErrorStatus_NetworkIsUnreachable) = 13, UnreachableHost (SocketErrorStatus_UnreachableHost) = 14, NetworkIsDown (SocketErrorStatus_NetworkIsDown) = 15, NetworkDroppedConnectionOnReset (SocketErrorStatus_NetworkDroppedConnectionOnReset) = 16, SoftwareCausedConnectionAbort (SocketErrorStatus_SoftwareCausedConnectionAbort) = 17, ConnectionResetByPeer (SocketErrorStatus_ConnectionResetByPeer) = 18, HostIsDown (SocketErrorStatus_HostIsDown) = 19, NoAddressesFound (SocketErrorStatus_NoAddressesFound) = 20, TooManyOpenFiles (SocketErrorStatus_TooManyOpenFiles) = 21, MessageTooLong (SocketErrorStatus_MessageTooLong) = 22, CertificateExpired (SocketErrorStatus_CertificateExpired) = 23, CertificateUntrustedRoot (SocketErrorStatus_CertificateUntrustedRoot) = 24, CertificateCommonNameIsIncorrect (SocketErrorStatus_CertificateCommonNameIsIncorrect) = 25, CertificateWrongUsage (SocketErrorStatus_CertificateWrongUsage) = 26, CertificateRevoked (SocketErrorStatus_CertificateRevoked) = 27, CertificateNoRevocationCheck (SocketErrorStatus_CertificateNoRevocationCheck) = 28, CertificateRevocationServerOffline (SocketErrorStatus_CertificateRevocationServerOffline) = 29, CertificateIsInvalid (SocketErrorStatus_CertificateIsInvalid) = 30, + }} + RT_ENUM! { enum SocketSslErrorSeverity: i32 { + None (SocketSslErrorSeverity_None) = 0, Ignorable (SocketSslErrorSeverity_Ignorable) = 1, Fatal (SocketSslErrorSeverity_Fatal) = 2, + }} + RT_STRUCT! { struct RoundTripTimeStatistics { + Variance: u32, Max: u32, Min: u32, Sum: u32, + }} + RT_STRUCT! { struct BandwidthStatistics { + OutboundBitsPerSecond: u64, InboundBitsPerSecond: u64, OutboundBitsPerSecondInstability: u64, InboundBitsPerSecondInstability: u64, OutboundBandwidthPeaked: bool, InboundBandwidthPeaked: bool, + }} + RT_ENUM! { enum SocketActivityKind: i32 { + None (SocketActivityKind_None) = 0, StreamSocketListener (SocketActivityKind_StreamSocketListener) = 1, DatagramSocket (SocketActivityKind_DatagramSocket) = 2, StreamSocket (SocketActivityKind_StreamSocket) = 3, + }} + RT_ENUM! { enum SocketActivityTriggerReason: i32 { + None (SocketActivityTriggerReason_None) = 0, SocketActivity (SocketActivityTriggerReason_SocketActivity) = 1, ConnectionAccepted (SocketActivityTriggerReason_ConnectionAccepted) = 2, KeepAliveTimerExpired (SocketActivityTriggerReason_KeepAliveTimerExpired) = 3, SocketClosed (SocketActivityTriggerReason_SocketClosed) = 4, + }} + RT_ENUM! { enum SocketActivityConnectedStandbyAction: i32 { + DoNotWake (SocketActivityConnectedStandbyAction_DoNotWake) = 0, Wake (SocketActivityConnectedStandbyAction_Wake) = 1, + }} + DEFINE_IID!(IID_ISocketActivityInformation, 2374648548, 43134, 19316, 153, 104, 24, 91, 37, 17, 222, 254); + RT_INTERFACE!{interface ISocketActivityInformation(ISocketActivityInformationVtbl): IInspectable(IInspectableVtbl) [IID_ISocketActivityInformation] { + fn get_TaskId(&mut self, out: *mut Guid) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SocketKind(&mut self, out: *mut SocketActivityKind) -> HRESULT, + fn get_Context(&mut self, out: *mut *mut SocketActivityContext) -> HRESULT, + fn get_DatagramSocket(&mut self, out: *mut *mut DatagramSocket) -> HRESULT, + fn get_StreamSocket(&mut self, out: *mut *mut StreamSocket) -> HRESULT, + fn get_StreamSocketListener(&mut self, out: *mut *mut StreamSocketListener) -> HRESULT + }} + impl ISocketActivityInformation { + #[inline] pub unsafe fn get_task_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TaskId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_socket_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SocketKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_context(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Context)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_datagram_socket(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DatagramSocket)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stream_socket(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StreamSocket)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stream_socket_listener(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StreamSocketListener)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SocketActivityContext: ISocketActivityContext [ISocketActivityContextFactory] [CLSID_SocketActivityContext]} + DEFINE_CLSID!(CLSID_SocketActivityContext = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,83,111,99,107,101,116,115,46,83,111,99,107,101,116,65,99,116,105,118,105,116,121,67,111,110,116,101,120,116,0]); + RT_CLASS!{class DatagramSocket: IDatagramSocket} + RT_ACTIVATABLE!{IDatagramSocketStatics [CLSID_DatagramSocket]} + DEFINE_CLSID!(CLSID_DatagramSocket = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,83,111,99,107,101,116,115,46,68,97,116,97,103,114,97,109,83,111,99,107,101,116,0]); + RT_CLASS!{class StreamSocket: IStreamSocket} + RT_ACTIVATABLE!{IStreamSocketStatics [CLSID_StreamSocket]} + DEFINE_CLSID!(CLSID_StreamSocket = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,83,111,99,107,101,116,115,46,83,116,114,101,97,109,83,111,99,107,101,116,0]); + RT_CLASS!{class StreamSocketListener: IStreamSocketListener} + DEFINE_IID!(IID_ISocketActivityTriggerDetails, 1173620391, 64671, 20353, 172, 173, 53, 95, 239, 81, 230, 123); + RT_INTERFACE!{interface ISocketActivityTriggerDetails(ISocketActivityTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_ISocketActivityTriggerDetails] { + fn get_Reason(&mut self, out: *mut SocketActivityTriggerReason) -> HRESULT, + fn get_SocketInformation(&mut self, out: *mut *mut SocketActivityInformation) -> HRESULT + }} + impl ISocketActivityTriggerDetails { + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_socket_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SocketInformation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SocketActivityInformation: ISocketActivityInformation} + RT_ACTIVATABLE!{ISocketActivityInformationStatics [CLSID_SocketActivityInformation]} + DEFINE_CLSID!(CLSID_SocketActivityInformation = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,83,111,99,107,101,116,115,46,83,111,99,107,101,116,65,99,116,105,118,105,116,121,73,110,102,111,114,109,97,116,105,111,110,0]); + DEFINE_IID!(IID_ISocketActivityInformationStatics, 2238755962, 32381, 18230, 128, 65, 19, 39, 166, 84, 60, 86); + RT_INTERFACE!{static interface ISocketActivityInformationStatics(ISocketActivityInformationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISocketActivityInformationStatics] { + fn get_AllSockets(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + }} + impl ISocketActivityInformationStatics { + #[inline] pub unsafe fn get_all_sockets(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AllSockets)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISocketActivityContext, 1135627620, 19589, 17302, 166, 55, 29, 151, 63, 110, 189, 73); + RT_INTERFACE!{interface ISocketActivityContext(ISocketActivityContextVtbl): IInspectable(IInspectableVtbl) [IID_ISocketActivityContext] { + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl ISocketActivityContext { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISocketActivityContextFactory, 3114255299, 2188, 17288, 131, 174, 37, 37, 19, 142, 4, 154); + RT_INTERFACE!{static interface ISocketActivityContextFactory(ISocketActivityContextFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISocketActivityContextFactory] { + #[cfg(feature="windows.storage")] fn Create(&mut self, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut SocketActivityContext) -> HRESULT + }} + impl ISocketActivityContextFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create(&mut self, data: &super::super::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDatagramSocketMessageReceivedEventArgs, 2653805730, 5906, 19684, 177, 121, 140, 101, 44, 109, 16, 126); + RT_INTERFACE!{interface IDatagramSocketMessageReceivedEventArgs(IDatagramSocketMessageReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDatagramSocketMessageReceivedEventArgs] { + fn get_RemoteAddress(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn get_RemotePort(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LocalAddress(&mut self, out: *mut *mut super::HostName) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetDataReader(&mut self, out: *mut *mut super::super::storage::streams::DataReader) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetDataStream(&mut self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT + }} + impl IDatagramSocketMessageReceivedEventArgs { + #[inline] pub unsafe fn get_remote_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_port(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemotePort)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDataReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDataStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMessageWebSocketMessageReceivedEventArgs, 1200366252, 19531, 17133, 158, 215, 30, 249, 249, 79, 163, 213); + RT_INTERFACE!{interface IMessageWebSocketMessageReceivedEventArgs(IMessageWebSocketMessageReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMessageWebSocketMessageReceivedEventArgs] { + fn get_MessageType(&mut self, out: *mut SocketMessageType) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetDataReader(&mut self, out: *mut *mut super::super::storage::streams::DataReader) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetDataStream(&mut self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT + }} + impl IMessageWebSocketMessageReceivedEventArgs { + #[inline] pub unsafe fn get_message_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MessageType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDataReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDataStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebSocketClosedEventArgs, 3468135687, 53416, 18179, 160, 145, 200, 194, 192, 145, 91, 195); + RT_INTERFACE!{interface IWebSocketClosedEventArgs(IWebSocketClosedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWebSocketClosedEventArgs] { + fn get_Code(&mut self, out: *mut u16) -> HRESULT, + fn get_Reason(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IWebSocketClosedEventArgs { + #[inline] pub unsafe fn get_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Code)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDatagramSocketInformation, 1595561626, 22011, 18637, 151, 6, 122, 151, 79, 123, 21, 133); + RT_INTERFACE!{interface IDatagramSocketInformation(IDatagramSocketInformationVtbl): IInspectable(IInspectableVtbl) [IID_IDatagramSocketInformation] { + fn get_LocalAddress(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn get_LocalPort(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RemoteAddress(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn get_RemotePort(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IDatagramSocketInformation { + #[inline] pub unsafe fn get_local_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_port(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalPort)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_port(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemotePort)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDatagramSocketControl, 1387020078, 13466, 16693, 187, 88, 183, 155, 38, 71, 211, 144); + RT_INTERFACE!{interface IDatagramSocketControl(IDatagramSocketControlVtbl): IInspectable(IInspectableVtbl) [IID_IDatagramSocketControl] { + fn get_QualityOfService(&mut self, out: *mut SocketQualityOfService) -> HRESULT, + fn put_QualityOfService(&mut self, value: SocketQualityOfService) -> HRESULT, + fn get_OutboundUnicastHopLimit(&mut self, out: *mut u8) -> HRESULT, + fn put_OutboundUnicastHopLimit(&mut self, value: u8) -> HRESULT + }} + impl IDatagramSocketControl { + #[inline] pub unsafe fn get_quality_of_service(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_QualityOfService)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_quality_of_service(&mut self, value: SocketQualityOfService) -> Result<()> { + let hr = ((*self.lpVtbl).put_QualityOfService)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outbound_unicast_hop_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutboundUnicastHopLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outbound_unicast_hop_limit(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutboundUnicastHopLimit)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDatagramSocketControl2, 871028162, 38812, 17429, 130, 161, 60, 250, 246, 70, 193, 146); + RT_INTERFACE!{interface IDatagramSocketControl2(IDatagramSocketControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IDatagramSocketControl2] { + fn get_InboundBufferSizeInBytes(&mut self, out: *mut u32) -> HRESULT, + fn put_InboundBufferSizeInBytes(&mut self, value: u32) -> HRESULT, + fn get_DontFragment(&mut self, out: *mut bool) -> HRESULT, + fn put_DontFragment(&mut self, value: bool) -> HRESULT + }} + impl IDatagramSocketControl2 { + #[inline] pub unsafe fn get_inbound_buffer_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InboundBufferSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_inbound_buffer_size_in_bytes(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_InboundBufferSizeInBytes)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_dont_fragment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DontFragment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_dont_fragment(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_DontFragment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDatagramSocketControl3, 3572204118, 8045, 17816, 155, 87, 212, 42, 0, 29, 243, 73); + RT_INTERFACE!{interface IDatagramSocketControl3(IDatagramSocketControl3Vtbl): IInspectable(IInspectableVtbl) [IID_IDatagramSocketControl3] { + fn get_MulticastOnly(&mut self, out: *mut bool) -> HRESULT, + fn put_MulticastOnly(&mut self, value: bool) -> HRESULT + }} + impl IDatagramSocketControl3 { + #[inline] pub unsafe fn get_multicast_only(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MulticastOnly)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_multicast_only(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_MulticastOnly)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDatagramSocketStatics, 3922078446, 5268, 18977, 187, 126, 133, 137, 252, 117, 29, 157); + RT_INTERFACE!{static interface IDatagramSocketStatics(IDatagramSocketStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDatagramSocketStatics] { + fn GetEndpointPairsAsync(&mut self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetEndpointPairsWithSortOptionsAsync(&mut self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, sortOptions: super::HostNameSortOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IDatagramSocketStatics { + #[inline] pub unsafe fn get_endpoint_pairs_async(&mut self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetEndpointPairsAsync)(self, remoteHostName as *const _ as *mut _, remoteServiceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_endpoint_pairs_with_sort_options_async(&mut self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, sortOptions: super::HostNameSortOptions) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetEndpointPairsWithSortOptionsAsync)(self, remoteHostName as *const _ as *mut _, remoteServiceName.get(), sortOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDatagramSocket, 2145541051, 50108, 18039, 132, 70, 202, 40, 164, 101, 163, 175); + RT_INTERFACE!{interface IDatagramSocket(IDatagramSocketVtbl): IInspectable(IInspectableVtbl) [IID_IDatagramSocket] { + fn get_Control(&mut self, out: *mut *mut DatagramSocketControl) -> HRESULT, + fn get_Information(&mut self, out: *mut *mut DatagramSocketInformation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_OutputStream(&mut self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, + fn ConnectAsync(&mut self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ConnectWithEndpointPairAsync(&mut self, endpointPair: *mut super::EndpointPair, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn BindServiceNameAsync(&mut self, localServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn BindEndpointAsync(&mut self, localHostName: *mut super::HostName, localServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn JoinMulticastGroup(&mut self, host: *mut super::HostName) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetOutputStreamAsync(&mut self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetOutputStreamWithEndpointPairAsync(&mut self, endpointPair: *mut super::EndpointPair, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_MessageReceived(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceived(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IDatagramSocket { + #[inline] pub unsafe fn get_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Control)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Information)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutputStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_async(&mut self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectAsync)(self, remoteHostName as *const _ as *mut _, remoteServiceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_with_endpoint_pair_async(&mut self, endpointPair: &super::EndpointPair) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectWithEndpointPairAsync)(self, endpointPair as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn bind_service_name_async(&mut self, localServiceName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BindServiceNameAsync)(self, localServiceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn bind_endpoint_async(&mut self, localHostName: &super::HostName, localServiceName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BindEndpointAsync)(self, localHostName as *const _ as *mut _, localServiceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn join_multicast_group(&mut self, host: &super::HostName) -> Result<()> { + let hr = ((*self.lpVtbl).JoinMulticastGroup)(self, host as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream_async(&mut self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetOutputStreamAsync)(self, remoteHostName as *const _ as *mut _, remoteServiceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream_with_endpoint_pair_async(&mut self, endpointPair: &super::EndpointPair) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetOutputStreamWithEndpointPairAsync)(self, endpointPair as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_message_received(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MessageReceived)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_message_received(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MessageReceived)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DatagramSocketControl: IDatagramSocketControl} + RT_CLASS!{class DatagramSocketInformation: IDatagramSocketInformation} + RT_CLASS!{class DatagramSocketMessageReceivedEventArgs: IDatagramSocketMessageReceivedEventArgs} + DEFINE_IID!(IID_IDatagramSocket2, 3627787092, 39581, 16773, 162, 10, 20, 36, 201, 194, 167, 205); + RT_INTERFACE!{interface IDatagramSocket2(IDatagramSocket2Vtbl): IInspectable(IInspectableVtbl) [IID_IDatagramSocket2] { + fn BindServiceNameAndAdapterAsync(&mut self, localServiceName: HSTRING, adapter: *mut super::connectivity::NetworkAdapter, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IDatagramSocket2 { + #[inline] pub unsafe fn bind_service_name_and_adapter_async(&mut self, localServiceName: &HStringArg, adapter: &super::connectivity::NetworkAdapter) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BindServiceNameAndAdapterAsync)(self, localServiceName.get(), adapter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDatagramSocket3, 928272137, 43922, 17158, 154, 193, 12, 56, 18, 131, 217, 198); + RT_INTERFACE!{interface IDatagramSocket3(IDatagramSocket3Vtbl): IInspectable(IInspectableVtbl) [IID_IDatagramSocket3] { + fn CancelIOAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn EnableTransferOwnership(&mut self, taskId: Guid) -> HRESULT, + fn EnableTransferOwnershipWithConnectedStandbyAction(&mut self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> HRESULT, + fn TransferOwnership(&mut self, socketId: HSTRING) -> HRESULT, + fn TransferOwnershipWithContext(&mut self, socketId: HSTRING, data: *mut SocketActivityContext) -> HRESULT, + fn TransferOwnershipWithContextAndKeepAliveTime(&mut self, socketId: HSTRING, data: *mut SocketActivityContext, keepAliveTime: super::super::foundation::TimeSpan) -> HRESULT + }} + impl IDatagramSocket3 { + #[inline] pub unsafe fn cancel_ioasync(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CancelIOAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn enable_transfer_ownership(&mut self, taskId: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).EnableTransferOwnership)(self, taskId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn enable_transfer_ownership_with_connected_standby_action(&mut self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> Result<()> { + let hr = ((*self.lpVtbl).EnableTransferOwnershipWithConnectedStandbyAction)(self, taskId, connectedStandbyAction); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn transfer_ownership(&mut self, socketId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).TransferOwnership)(self, socketId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn transfer_ownership_with_context(&mut self, socketId: &HStringArg, data: &SocketActivityContext) -> Result<()> { + let hr = ((*self.lpVtbl).TransferOwnershipWithContext)(self, socketId.get(), data as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn transfer_ownership_with_context_and_keep_alive_time(&mut self, socketId: &HStringArg, data: &SocketActivityContext, keepAliveTime: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).TransferOwnershipWithContextAndKeepAliveTime)(self, socketId.get(), data as *const _ as *mut _, keepAliveTime); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketInformation, 998288944, 24168, 16901, 136, 240, 220, 133, 210, 226, 93, 237); + RT_INTERFACE!{interface IStreamSocketInformation(IStreamSocketInformationVtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketInformation] { + fn get_LocalAddress(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn get_LocalPort(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RemoteHostName(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn get_RemoteAddress(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn get_RemoteServiceName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RemotePort(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RoundTripTimeStatistics(&mut self, out: *mut RoundTripTimeStatistics) -> HRESULT, + fn get_BandwidthStatistics(&mut self, out: *mut BandwidthStatistics) -> HRESULT, + fn get_ProtectionLevel(&mut self, out: *mut SocketProtectionLevel) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_SessionKey(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IStreamSocketInformation { + #[inline] pub unsafe fn get_local_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_port(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalPort)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_host_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteHostName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_service_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteServiceName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_port(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemotePort)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_round_trip_time_statistics(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoundTripTimeStatistics)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bandwidth_statistics(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BandwidthStatistics)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_protection_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtectionLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_session_key(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SessionKey)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketInformation2, 314737746, 19420, 20196, 151, 106, 207, 19, 14, 157, 146, 227); + RT_INTERFACE!{interface IStreamSocketInformation2(IStreamSocketInformation2Vtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketInformation2] { + fn get_ServerCertificateErrorSeverity(&mut self, out: *mut SocketSslErrorSeverity) -> HRESULT, + #[cfg(feature="windows.security")] fn get_ServerCertificateErrors(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows.security")] fn get_ServerCertificate(&mut self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, + #[cfg(feature="windows.security")] fn get_ServerIntermediateCertificates(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IStreamSocketInformation2 { + #[inline] pub unsafe fn get_server_certificate_error_severity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServerCertificateErrorSeverity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_server_certificate_errors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerCertificateErrors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_server_certificate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerCertificate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_server_intermediate_certificates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerIntermediateCertificates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketControl, 4263882225, 37547, 19187, 153, 146, 15, 76, 133, 227, 108, 196); + RT_INTERFACE!{interface IStreamSocketControl(IStreamSocketControlVtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketControl] { + fn get_NoDelay(&mut self, out: *mut bool) -> HRESULT, + fn put_NoDelay(&mut self, value: bool) -> HRESULT, + fn get_KeepAlive(&mut self, out: *mut bool) -> HRESULT, + fn put_KeepAlive(&mut self, value: bool) -> HRESULT, + fn get_OutboundBufferSizeInBytes(&mut self, out: *mut u32) -> HRESULT, + fn put_OutboundBufferSizeInBytes(&mut self, value: u32) -> HRESULT, + fn get_QualityOfService(&mut self, out: *mut SocketQualityOfService) -> HRESULT, + fn put_QualityOfService(&mut self, value: SocketQualityOfService) -> HRESULT, + fn get_OutboundUnicastHopLimit(&mut self, out: *mut u8) -> HRESULT, + fn put_OutboundUnicastHopLimit(&mut self, value: u8) -> HRESULT + }} + impl IStreamSocketControl { + #[inline] pub unsafe fn get_no_delay(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NoDelay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_no_delay(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_NoDelay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_keep_alive(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeepAlive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_keep_alive(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeepAlive)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outbound_buffer_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutboundBufferSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outbound_buffer_size_in_bytes(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutboundBufferSizeInBytes)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_quality_of_service(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_QualityOfService)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_quality_of_service(&mut self, value: SocketQualityOfService) -> Result<()> { + let hr = ((*self.lpVtbl).put_QualityOfService)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outbound_unicast_hop_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutboundUnicastHopLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outbound_unicast_hop_limit(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutboundUnicastHopLimit)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketControl2, 3268450902, 1551, 17601, 184, 226, 31, 191, 96, 189, 98, 197); + RT_INTERFACE!{interface IStreamSocketControl2(IStreamSocketControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketControl2] { + #[cfg(feature="windows.security")] fn get_IgnorableServerCertificateErrors(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IStreamSocketControl2 { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_ignorable_server_certificate_errors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IgnorableServerCertificateErrors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketControl3, 3312075852, 20084, 16446, 137, 76, 179, 28, 174, 92, 115, 66); + RT_INTERFACE!{interface IStreamSocketControl3(IStreamSocketControl3Vtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketControl3] { + fn get_SerializeConnectionAttempts(&mut self, out: *mut bool) -> HRESULT, + fn put_SerializeConnectionAttempts(&mut self, value: bool) -> HRESULT, + #[cfg(feature="windows.security")] fn get_ClientCertificate(&mut self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, + #[cfg(feature="windows.security")] fn put_ClientCertificate(&mut self, value: *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT + }} + impl IStreamSocketControl3 { + #[inline] pub unsafe fn get_serialize_connection_attempts(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SerializeConnectionAttempts)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_serialize_connection_attempts(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SerializeConnectionAttempts)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_client_certificate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ClientCertificate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_client_certificate(&mut self, value: &super::super::security::cryptography::certificates::Certificate) -> Result<()> { + let hr = ((*self.lpVtbl).put_ClientCertificate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocket, 1772236019, 64635, 18519, 175, 56, 246, 231, 222, 106, 91, 73); + RT_INTERFACE!{interface IStreamSocket(IStreamSocketVtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocket] { + fn get_Control(&mut self, out: *mut *mut StreamSocketControl) -> HRESULT, + fn get_Information(&mut self, out: *mut *mut StreamSocketInformation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_InputStream(&mut self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_OutputStream(&mut self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, + fn ConnectWithEndpointPairAsync(&mut self, endpointPair: *mut super::EndpointPair, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ConnectAsync(&mut self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ConnectWithEndpointPairAndProtectionLevelAsync(&mut self, endpointPair: *mut super::EndpointPair, protectionLevel: SocketProtectionLevel, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ConnectWithProtectionLevelAsync(&mut self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, protectionLevel: SocketProtectionLevel, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn UpgradeToSslAsync(&mut self, protectionLevel: SocketProtectionLevel, validationHostName: *mut super::HostName, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IStreamSocket { + #[inline] pub unsafe fn get_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Control)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Information)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_input_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutputStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_with_endpoint_pair_async(&mut self, endpointPair: &super::EndpointPair) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectWithEndpointPairAsync)(self, endpointPair as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_async(&mut self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectAsync)(self, remoteHostName as *const _ as *mut _, remoteServiceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_with_endpoint_pair_and_protection_level_async(&mut self, endpointPair: &super::EndpointPair, protectionLevel: SocketProtectionLevel) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectWithEndpointPairAndProtectionLevelAsync)(self, endpointPair as *const _ as *mut _, protectionLevel, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_with_protection_level_async(&mut self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, protectionLevel: SocketProtectionLevel) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectWithProtectionLevelAsync)(self, remoteHostName as *const _ as *mut _, remoteServiceName.get(), protectionLevel, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn upgrade_to_ssl_async(&mut self, protectionLevel: SocketProtectionLevel, validationHostName: &super::HostName) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpgradeToSslAsync)(self, protectionLevel, validationHostName as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StreamSocketControl: IStreamSocketControl} + RT_CLASS!{class StreamSocketInformation: IStreamSocketInformation} + DEFINE_IID!(IID_IStreamSocket2, 701556085, 62228, 19721, 173, 240, 15, 189, 150, 127, 189, 159); + RT_INTERFACE!{interface IStreamSocket2(IStreamSocket2Vtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocket2] { + fn ConnectWithProtectionLevelAndAdapterAsync(&mut self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, protectionLevel: SocketProtectionLevel, adapter: *mut super::connectivity::NetworkAdapter, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IStreamSocket2 { + #[inline] pub unsafe fn connect_with_protection_level_and_adapter_async(&mut self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, protectionLevel: SocketProtectionLevel, adapter: &super::connectivity::NetworkAdapter) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectWithProtectionLevelAndAdapterAsync)(self, remoteHostName as *const _ as *mut _, remoteServiceName.get(), protectionLevel, adapter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocket3, 1061358336, 40232, 18516, 186, 195, 35, 1, 148, 30, 194, 35); + RT_INTERFACE!{interface IStreamSocket3(IStreamSocket3Vtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocket3] { + fn CancelIOAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn EnableTransferOwnership(&mut self, taskId: Guid) -> HRESULT, + fn EnableTransferOwnershipWithConnectedStandbyAction(&mut self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> HRESULT, + fn TransferOwnership(&mut self, socketId: HSTRING) -> HRESULT, + fn TransferOwnershipWithContext(&mut self, socketId: HSTRING, data: *mut SocketActivityContext) -> HRESULT, + fn TransferOwnershipWithContextAndKeepAliveTime(&mut self, socketId: HSTRING, data: *mut SocketActivityContext, keepAliveTime: super::super::foundation::TimeSpan) -> HRESULT + }} + impl IStreamSocket3 { + #[inline] pub unsafe fn cancel_ioasync(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CancelIOAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn enable_transfer_ownership(&mut self, taskId: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).EnableTransferOwnership)(self, taskId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn enable_transfer_ownership_with_connected_standby_action(&mut self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> Result<()> { + let hr = ((*self.lpVtbl).EnableTransferOwnershipWithConnectedStandbyAction)(self, taskId, connectedStandbyAction); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn transfer_ownership(&mut self, socketId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).TransferOwnership)(self, socketId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn transfer_ownership_with_context(&mut self, socketId: &HStringArg, data: &SocketActivityContext) -> Result<()> { + let hr = ((*self.lpVtbl).TransferOwnershipWithContext)(self, socketId.get(), data as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn transfer_ownership_with_context_and_keep_alive_time(&mut self, socketId: &HStringArg, data: &SocketActivityContext, keepAliveTime: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).TransferOwnershipWithContextAndKeepAliveTime)(self, socketId.get(), data as *const _ as *mut _, keepAliveTime); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketStatics, 2753608778, 28206, 19189, 181, 86, 53, 90, 224, 205, 79, 41); + RT_INTERFACE!{static interface IStreamSocketStatics(IStreamSocketStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketStatics] { + fn GetEndpointPairsAsync(&mut self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetEndpointPairsWithSortOptionsAsync(&mut self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, sortOptions: super::HostNameSortOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IStreamSocketStatics { + #[inline] pub unsafe fn get_endpoint_pairs_async(&mut self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetEndpointPairsAsync)(self, remoteHostName as *const _ as *mut _, remoteServiceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_endpoint_pairs_with_sort_options_async(&mut self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, sortOptions: super::HostNameSortOptions) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetEndpointPairsWithSortOptionsAsync)(self, remoteHostName as *const _ as *mut _, remoteServiceName.get(), sortOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketListenerControl, 551077238, 36234, 19898, 151, 34, 161, 108, 77, 152, 73, 128); + RT_INTERFACE!{interface IStreamSocketListenerControl(IStreamSocketListenerControlVtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketListenerControl] { + fn get_QualityOfService(&mut self, out: *mut SocketQualityOfService) -> HRESULT, + fn put_QualityOfService(&mut self, value: SocketQualityOfService) -> HRESULT + }} + impl IStreamSocketListenerControl { + #[inline] pub unsafe fn get_quality_of_service(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_QualityOfService)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_quality_of_service(&mut self, value: SocketQualityOfService) -> Result<()> { + let hr = ((*self.lpVtbl).put_QualityOfService)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketListenerControl2, 2492184165, 11326, 16459, 184, 176, 142, 178, 73, 162, 176, 161); + RT_INTERFACE!{interface IStreamSocketListenerControl2(IStreamSocketListenerControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketListenerControl2] { + fn get_NoDelay(&mut self, out: *mut bool) -> HRESULT, + fn put_NoDelay(&mut self, value: bool) -> HRESULT, + fn get_KeepAlive(&mut self, out: *mut bool) -> HRESULT, + fn put_KeepAlive(&mut self, value: bool) -> HRESULT, + fn get_OutboundBufferSizeInBytes(&mut self, out: *mut u32) -> HRESULT, + fn put_OutboundBufferSizeInBytes(&mut self, value: u32) -> HRESULT, + fn get_OutboundUnicastHopLimit(&mut self, out: *mut u8) -> HRESULT, + fn put_OutboundUnicastHopLimit(&mut self, value: u8) -> HRESULT + }} + impl IStreamSocketListenerControl2 { + #[inline] pub unsafe fn get_no_delay(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NoDelay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_no_delay(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_NoDelay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_keep_alive(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeepAlive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_keep_alive(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeepAlive)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outbound_buffer_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutboundBufferSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outbound_buffer_size_in_bytes(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutboundBufferSizeInBytes)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outbound_unicast_hop_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutboundUnicastHopLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outbound_unicast_hop_limit(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutboundUnicastHopLimit)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketListenerInformation, 3861620783, 42554, 17163, 191, 98, 41, 233, 62, 86, 51, 180); + RT_INTERFACE!{interface IStreamSocketListenerInformation(IStreamSocketListenerInformationVtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketListenerInformation] { + fn get_LocalPort(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStreamSocketListenerInformation { + #[inline] pub unsafe fn get_local_port(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalPort)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketListenerConnectionReceivedEventArgs, 205991593, 14143, 17531, 133, 177, 221, 212, 84, 136, 3, 186); + RT_INTERFACE!{interface IStreamSocketListenerConnectionReceivedEventArgs(IStreamSocketListenerConnectionReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketListenerConnectionReceivedEventArgs] { + fn get_Socket(&mut self, out: *mut *mut StreamSocket) -> HRESULT + }} + impl IStreamSocketListenerConnectionReceivedEventArgs { + #[inline] pub unsafe fn get_socket(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Socket)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketListener, 4283511863, 57247, 19952, 191, 130, 14, 197, 215, 179, 90, 174); + RT_INTERFACE!{interface IStreamSocketListener(IStreamSocketListenerVtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketListener] { + fn get_Control(&mut self, out: *mut *mut StreamSocketListenerControl) -> HRESULT, + fn get_Information(&mut self, out: *mut *mut StreamSocketListenerInformation) -> HRESULT, + fn BindServiceNameAsync(&mut self, localServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn BindEndpointAsync(&mut self, localHostName: *mut super::HostName, localServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn add_ConnectionReceived(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionReceived(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IStreamSocketListener { + #[inline] pub unsafe fn get_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Control)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Information)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn bind_service_name_async(&mut self, localServiceName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BindServiceNameAsync)(self, localServiceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn bind_endpoint_async(&mut self, localHostName: &super::HostName, localServiceName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BindEndpointAsync)(self, localHostName as *const _ as *mut _, localServiceName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_connection_received(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ConnectionReceived)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_connection_received(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ConnectionReceived)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class StreamSocketListenerControl: IStreamSocketListenerControl} + RT_CLASS!{class StreamSocketListenerInformation: IStreamSocketListenerInformation} + RT_CLASS!{class StreamSocketListenerConnectionReceivedEventArgs: IStreamSocketListenerConnectionReceivedEventArgs} + DEFINE_IID!(IID_IStreamSocketListener2, 1703788862, 47934, 17496, 178, 50, 237, 16, 136, 105, 75, 152); + RT_INTERFACE!{interface IStreamSocketListener2(IStreamSocketListener2Vtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketListener2] { + fn BindServiceNameWithProtectionLevelAsync(&mut self, localServiceName: HSTRING, protectionLevel: SocketProtectionLevel, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn BindServiceNameWithProtectionLevelAndAdapterAsync(&mut self, localServiceName: HSTRING, protectionLevel: SocketProtectionLevel, adapter: *mut super::connectivity::NetworkAdapter, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IStreamSocketListener2 { + #[inline] pub unsafe fn bind_service_name_with_protection_level_async(&mut self, localServiceName: &HStringArg, protectionLevel: SocketProtectionLevel) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BindServiceNameWithProtectionLevelAsync)(self, localServiceName.get(), protectionLevel, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn bind_service_name_with_protection_level_and_adapter_async(&mut self, localServiceName: &HStringArg, protectionLevel: SocketProtectionLevel, adapter: &super::connectivity::NetworkAdapter) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BindServiceNameWithProtectionLevelAndAdapterAsync)(self, localServiceName.get(), protectionLevel, adapter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamSocketListener3, 1201152028, 48632, 18713, 133, 66, 40, 212, 80, 231, 69, 7); + RT_INTERFACE!{interface IStreamSocketListener3(IStreamSocketListener3Vtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketListener3] { + fn CancelIOAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn EnableTransferOwnership(&mut self, taskId: Guid) -> HRESULT, + fn EnableTransferOwnershipWithConnectedStandbyAction(&mut self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> HRESULT, + fn TransferOwnership(&mut self, socketId: HSTRING) -> HRESULT, + fn TransferOwnershipWithContext(&mut self, socketId: HSTRING, data: *mut SocketActivityContext) -> HRESULT + }} + impl IStreamSocketListener3 { + #[inline] pub unsafe fn cancel_ioasync(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CancelIOAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn enable_transfer_ownership(&mut self, taskId: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).EnableTransferOwnership)(self, taskId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn enable_transfer_ownership_with_connected_standby_action(&mut self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> Result<()> { + let hr = ((*self.lpVtbl).EnableTransferOwnershipWithConnectedStandbyAction)(self, taskId, connectedStandbyAction); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn transfer_ownership(&mut self, socketId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).TransferOwnership)(self, socketId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn transfer_ownership_with_context(&mut self, socketId: &HStringArg, data: &SocketActivityContext) -> Result<()> { + let hr = ((*self.lpVtbl).TransferOwnershipWithContext)(self, socketId.get(), data as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebSocketServerCustomValidationRequestedEventArgs, 4293918280, 554, 19127, 139, 54, 225, 10, 244, 100, 14, 107); + RT_INTERFACE!{interface IWebSocketServerCustomValidationRequestedEventArgs(IWebSocketServerCustomValidationRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWebSocketServerCustomValidationRequestedEventArgs] { + #[cfg(not(feature="windows.security"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_ServerCertificate(&mut self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, + fn get_ServerCertificateErrorSeverity(&mut self, out: *mut SocketSslErrorSeverity) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_ServerCertificateErrors(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_ServerIntermediateCertificates(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn Reject(&mut self) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IWebSocketServerCustomValidationRequestedEventArgs { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_server_certificate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerCertificate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_server_certificate_error_severity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServerCertificateErrorSeverity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_server_certificate_errors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerCertificateErrors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_server_intermediate_certificates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerIntermediateCertificates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn reject(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Reject)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebSocketControl, 784645571, 55717, 17754, 152, 17, 222, 36, 212, 83, 55, 233); + RT_INTERFACE!{interface IWebSocketControl(IWebSocketControlVtbl): IInspectable(IInspectableVtbl) [IID_IWebSocketControl] { + fn get_OutboundBufferSizeInBytes(&mut self, out: *mut u32) -> HRESULT, + fn put_OutboundBufferSizeInBytes(&mut self, value: u32) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_ServerCredential(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.security")] fn put_ServerCredential(&mut self, value: *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_ProxyCredential(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.security")] fn put_ProxyCredential(&mut self, value: *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + fn get_SupportedProtocols(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IWebSocketControl { + #[inline] pub unsafe fn get_outbound_buffer_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OutboundBufferSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outbound_buffer_size_in_bytes(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_OutboundBufferSizeInBytes)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_server_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_server_credential(&mut self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { + let hr = ((*self.lpVtbl).put_ServerCredential)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_proxy_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProxyCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn set_proxy_credential(&mut self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProxyCredential)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_protocols(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedProtocols)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebSocketControl2, 2042871299, 62154, 17950, 175, 78, 150, 101, 188, 45, 6, 32); + RT_INTERFACE!{interface IWebSocketControl2(IWebSocketControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IWebSocketControl2] { + #[cfg(feature="windows.security")] fn get_IgnorableServerCertificateErrors(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IWebSocketControl2 { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_ignorable_server_certificate_errors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IgnorableServerCertificateErrors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebSocketInformation, 1577181974, 51498, 18341, 178, 95, 7, 132, 118, 57, 209, 129); + RT_INTERFACE!{interface IWebSocketInformation(IWebSocketInformationVtbl): IInspectable(IInspectableVtbl) [IID_IWebSocketInformation] { + fn get_LocalAddress(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn get_BandwidthStatistics(&mut self, out: *mut BandwidthStatistics) -> HRESULT, + fn get_Protocol(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IWebSocketInformation { + #[inline] pub unsafe fn get_local_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bandwidth_statistics(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BandwidthStatistics)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_protocol(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Protocol)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebSocketInformation2, 3458021838, 41399, 19779, 130, 105, 141, 91, 152, 27, 212, 122); + RT_INTERFACE!{interface IWebSocketInformation2(IWebSocketInformation2Vtbl): IInspectable(IInspectableVtbl) [IID_IWebSocketInformation2] { + #[cfg(feature="windows.security")] fn get_ServerCertificate(&mut self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, + fn get_ServerCertificateErrorSeverity(&mut self, out: *mut SocketSslErrorSeverity) -> HRESULT, + #[cfg(feature="windows.security")] fn get_ServerCertificateErrors(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows.security")] fn get_ServerIntermediateCertificates(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IWebSocketInformation2 { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_server_certificate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerCertificate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_server_certificate_error_severity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServerCertificateErrorSeverity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_server_certificate_errors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerCertificateErrors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_server_intermediate_certificates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerIntermediateCertificates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebSocket, 4168563055, 39345, 19992, 188, 8, 133, 12, 154, 223, 21, 110); + RT_INTERFACE!{interface IWebSocket(IWebSocketVtbl): IInspectable(IInspectableVtbl) [IID_IWebSocket] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_OutputStream(&mut self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, + fn ConnectAsync(&mut self, uri: *mut super::super::foundation::Uri, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SetRequestHeader(&mut self, headerName: HSTRING, headerValue: HSTRING) -> HRESULT, + fn add_Closed(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn CloseWithStatus(&mut self, code: u16, reason: HSTRING) -> HRESULT + }} + impl IWebSocket { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_output_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OutputStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_async(&mut self, uri: &super::super::foundation::Uri) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectAsync)(self, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_request_header(&mut self, headerName: &HStringArg, headerValue: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetRequestHeader)(self, headerName.get(), headerValue.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_closed(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Closed)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Closed)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn close_with_status(&mut self, code: u16, reason: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).CloseWithStatus)(self, code, reason.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class WebSocketClosedEventArgs: IWebSocketClosedEventArgs} + DEFINE_IID!(IID_IMessageWebSocketControl, 2165848202, 50729, 20234, 128, 251, 129, 252, 5, 83, 136, 98); + RT_INTERFACE!{interface IMessageWebSocketControl(IMessageWebSocketControlVtbl): IInspectable(IInspectableVtbl) [IID_IMessageWebSocketControl] { + fn get_MaxMessageSize(&mut self, out: *mut u32) -> HRESULT, + fn put_MaxMessageSize(&mut self, value: u32) -> HRESULT, + fn get_MessageType(&mut self, out: *mut SocketMessageType) -> HRESULT, + fn put_MessageType(&mut self, value: SocketMessageType) -> HRESULT + }} + impl IMessageWebSocketControl { + #[inline] pub unsafe fn get_max_message_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxMessageSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_message_size(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxMessageSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_message_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MessageType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_message_type(&mut self, value: SocketMessageType) -> Result<()> { + let hr = ((*self.lpVtbl).put_MessageType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMessageWebSocket, 863141128, 13525, 18246, 173, 123, 141, 222, 91, 194, 239, 136); + RT_INTERFACE!{interface IMessageWebSocket(IMessageWebSocketVtbl): IInspectable(IInspectableVtbl) [IID_IMessageWebSocket] { + fn get_Control(&mut self, out: *mut *mut MessageWebSocketControl) -> HRESULT, + fn get_Information(&mut self, out: *mut *mut MessageWebSocketInformation) -> HRESULT, + fn add_MessageReceived(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceived(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMessageWebSocket { + #[inline] pub unsafe fn get_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Control)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Information)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_message_received(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_MessageReceived)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_message_received(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_MessageReceived)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MessageWebSocketControl: IMessageWebSocketControl} + RT_CLASS!{class MessageWebSocketInformation: IWebSocketInformation} + RT_CLASS!{class MessageWebSocket: IMessageWebSocket} + RT_CLASS!{class MessageWebSocketMessageReceivedEventArgs: IMessageWebSocketMessageReceivedEventArgs} + DEFINE_IID!(IID_IMessageWebSocket2, 3201355495, 63944, 17418, 154, 213, 115, 114, 129, 217, 116, 46); + RT_INTERFACE!{interface IMessageWebSocket2(IMessageWebSocket2Vtbl): IInspectable(IInspectableVtbl) [IID_IMessageWebSocket2] { + fn add_ServerCustomValidationRequested(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServerCustomValidationRequested(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMessageWebSocket2 { + #[inline] pub unsafe fn add_server_custom_validation_requested(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ServerCustomValidationRequested)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_server_custom_validation_requested(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ServerCustomValidationRequested)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class WebSocketServerCustomValidationRequestedEventArgs: IWebSocketServerCustomValidationRequestedEventArgs} + DEFINE_IID!(IID_IStreamWebSocketControl, 3035920561, 42074, 18651, 149, 58, 100, 91, 125, 150, 76, 7); + RT_INTERFACE!{interface IStreamWebSocketControl(IStreamWebSocketControlVtbl): IInspectable(IInspectableVtbl) [IID_IStreamWebSocketControl] { + fn get_NoDelay(&mut self, out: *mut bool) -> HRESULT, + fn put_NoDelay(&mut self, value: bool) -> HRESULT + }} + impl IStreamWebSocketControl { + #[inline] pub unsafe fn get_no_delay(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NoDelay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_no_delay(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_NoDelay)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStreamWebSocket, 3175762392, 45705, 17851, 151, 235, 199, 82, 82, 5, 168, 67); + RT_INTERFACE!{interface IStreamWebSocket(IStreamWebSocketVtbl): IInspectable(IInspectableVtbl) [IID_IStreamWebSocket] { + fn get_Control(&mut self, out: *mut *mut StreamWebSocketControl) -> HRESULT, + fn get_Information(&mut self, out: *mut *mut StreamWebSocketInformation) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_InputStream(&mut self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT + }} + impl IStreamWebSocket { + #[inline] pub unsafe fn get_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Control)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_information(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Information)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_input_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StreamWebSocketControl: IStreamWebSocketControl} + RT_CLASS!{class StreamWebSocketInformation: IWebSocketInformation} + DEFINE_IID!(IID_IStreamWebSocket2, 2857175243, 37877, 18040, 130, 54, 87, 204, 229, 65, 126, 213); + RT_INTERFACE!{interface IStreamWebSocket2(IStreamWebSocket2Vtbl): IInspectable(IInspectableVtbl) [IID_IStreamWebSocket2] { + fn add_ServerCustomValidationRequested(&mut self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServerCustomValidationRequested(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IStreamWebSocket2 { + #[inline] pub unsafe fn add_server_custom_validation_requested(&mut self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ServerCustomValidationRequested)(self, eventHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_server_custom_validation_requested(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ServerCustomValidationRequested)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class StreamWebSocket: IStreamWebSocket} + DEFINE_IID!(IID_ISocketErrorStatics, 2189637620, 32086, 19854, 183, 180, 160, 125, 215, 193, 188, 169); + RT_INTERFACE!{static interface ISocketErrorStatics(ISocketErrorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISocketErrorStatics] { + fn GetStatus(&mut self, hresult: i32, out: *mut SocketErrorStatus) -> HRESULT + }} + impl ISocketErrorStatics { + #[inline] pub unsafe fn get_status(&mut self, hresult: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStatus)(self, hresult, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebSocketErrorStatics, 667808603, 8033, 18185, 142, 2, 97, 40, 58, 218, 78, 157); + RT_INTERFACE!{static interface IWebSocketErrorStatics(IWebSocketErrorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWebSocketErrorStatics] { + #[cfg(feature="windows.web")] fn GetStatus(&mut self, hresult: i32, out: *mut super::super::web::WebErrorStatus) -> HRESULT + }} + impl IWebSocketErrorStatics { + #[cfg(feature="windows.web")] #[inline] pub unsafe fn get_status(&mut self, hresult: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStatus)(self, hresult, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebSocketKeepAlive: super::super::applicationmodel::background::IBackgroundTask} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebSocketKeepAlive: IInspectable} + RT_ACTIVATABLE!{ISocketErrorStatics [CLSID_SocketError]} + DEFINE_CLSID!(CLSID_SocketError = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,83,111,99,107,101,116,115,46,83,111,99,107,101,116,69,114,114,111,114,0]); + RT_ACTIVATABLE!{IWebSocketErrorStatics [CLSID_WebSocketError]} + DEFINE_CLSID!(CLSID_WebSocketError = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,83,111,99,107,101,116,115,46,87,101,98,83,111,99,107,101,116,69,114,114,111,114,0]); + RT_CLASS!{class SocketActivityTriggerDetails: ISocketActivityTriggerDetails} + RT_STRUCT! { struct ControlChannelTriggerContract { + + }} + RT_ENUM! { enum ControlChannelTriggerStatus: i32 { + HardwareSlotRequested (ControlChannelTriggerStatus_HardwareSlotRequested) = 0, SoftwareSlotAllocated (ControlChannelTriggerStatus_SoftwareSlotAllocated) = 1, HardwareSlotAllocated (ControlChannelTriggerStatus_HardwareSlotAllocated) = 2, PolicyError (ControlChannelTriggerStatus_PolicyError) = 3, SystemError (ControlChannelTriggerStatus_SystemError) = 4, TransportDisconnected (ControlChannelTriggerStatus_TransportDisconnected) = 5, ServiceUnavailable (ControlChannelTriggerStatus_ServiceUnavailable) = 6, + }} + RT_ENUM! { enum ControlChannelTriggerResourceType: i32 { + RequestSoftwareSlot (ControlChannelTriggerResourceType_RequestSoftwareSlot) = 0, RequestHardwareSlot (ControlChannelTriggerResourceType_RequestHardwareSlot) = 1, + }} + RT_ENUM! { enum ControlChannelTriggerResetReason: i32 { + FastUserSwitched (ControlChannelTriggerResetReason_FastUserSwitched) = 0, LowPowerExit (ControlChannelTriggerResetReason_LowPowerExit) = 1, QuietHoursExit (ControlChannelTriggerResetReason_QuietHoursExit) = 2, ApplicationRestart (ControlChannelTriggerResetReason_ApplicationRestart) = 3, + }} + DEFINE_IID!(IID_IControlChannelTrigger, 2098475431, 61078, 16616, 161, 153, 135, 3, 205, 150, 158, 195); + RT_INTERFACE!{interface IControlChannelTrigger(IControlChannelTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IControlChannelTrigger] { + fn get_ControlChannelTriggerId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ServerKeepAliveIntervalInMinutes(&mut self, out: *mut u32) -> HRESULT, + fn put_ServerKeepAliveIntervalInMinutes(&mut self, value: u32) -> HRESULT, + fn get_CurrentKeepAliveIntervalInMinutes(&mut self, out: *mut u32) -> HRESULT, + fn get_TransportObject(&mut self, out: *mut *mut IInspectable) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_KeepAliveTrigger(&mut self, out: *mut *mut super::super::applicationmodel::background::IBackgroundTrigger) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_PushNotificationTrigger(&mut self, out: *mut *mut super::super::applicationmodel::background::IBackgroundTrigger) -> HRESULT, + fn UsingTransport(&mut self, transport: *mut IInspectable) -> HRESULT, + fn WaitForPushEnabled(&mut self, out: *mut ControlChannelTriggerStatus) -> HRESULT, + fn DecreaseNetworkKeepAliveInterval(&mut self) -> HRESULT, + fn FlushTransport(&mut self) -> HRESULT + }} + impl IControlChannelTrigger { + #[inline] pub unsafe fn get_control_channel_trigger_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ControlChannelTriggerId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_server_keep_alive_interval_in_minutes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServerKeepAliveIntervalInMinutes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_server_keep_alive_interval_in_minutes(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ServerKeepAliveIntervalInMinutes)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_keep_alive_interval_in_minutes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentKeepAliveIntervalInMinutes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_transport_object(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransportObject)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_keep_alive_trigger(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeepAliveTrigger)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_push_notification_trigger(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PushNotificationTrigger)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn using_transport(&mut self, transport: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).UsingTransport)(self, transport as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn wait_for_push_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).WaitForPushEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn decrease_network_keep_alive_interval(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DecreaseNetworkKeepAliveInterval)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn flush_transport(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).FlushTransport)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IControlChannelTriggerFactory, 3662380272, 36209, 17519, 136, 195, 185, 81, 132, 162, 214, 205); + RT_INTERFACE!{static interface IControlChannelTriggerFactory(IControlChannelTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IControlChannelTriggerFactory] { + fn CreateControlChannelTrigger(&mut self, channelId: HSTRING, serverKeepAliveIntervalInMinutes: u32, out: *mut *mut ControlChannelTrigger) -> HRESULT, + fn CreateControlChannelTriggerEx(&mut self, channelId: HSTRING, serverKeepAliveIntervalInMinutes: u32, resourceRequestType: ControlChannelTriggerResourceType, out: *mut *mut ControlChannelTrigger) -> HRESULT + }} + impl IControlChannelTriggerFactory { + #[inline] pub unsafe fn create_control_channel_trigger(&mut self, channelId: &HStringArg, serverKeepAliveIntervalInMinutes: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateControlChannelTrigger)(self, channelId.get(), serverKeepAliveIntervalInMinutes, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_control_channel_trigger_ex(&mut self, channelId: &HStringArg, serverKeepAliveIntervalInMinutes: u32, resourceRequestType: ControlChannelTriggerResourceType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateControlChannelTriggerEx)(self, channelId.get(), serverKeepAliveIntervalInMinutes, resourceRequestType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ControlChannelTrigger: IControlChannelTrigger [IControlChannelTriggerFactory] [CLSID_ControlChannelTrigger]} + DEFINE_CLSID!(CLSID_ControlChannelTrigger = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,83,111,99,107,101,116,115,46,67,111,110,116,114,111,108,67,104,97,110,110,101,108,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IControlChannelTriggerEventDetails, 456581191, 35259, 16950, 150, 172, 113, 208, 18, 187, 72, 105); + RT_INTERFACE!{interface IControlChannelTriggerEventDetails(IControlChannelTriggerEventDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IControlChannelTriggerEventDetails] { + fn get_ControlChannelTrigger(&mut self, out: *mut *mut ControlChannelTrigger) -> HRESULT + }} + impl IControlChannelTriggerEventDetails { + #[inline] pub unsafe fn get_control_channel_trigger(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ControlChannelTrigger)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IControlChannelTriggerResetEventDetails, 1750139790, 36548, 17150, 155, 178, 33, 233, 27, 123, 252, 177); + RT_INTERFACE!{interface IControlChannelTriggerResetEventDetails(IControlChannelTriggerResetEventDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IControlChannelTriggerResetEventDetails] { + fn get_ResetReason(&mut self, out: *mut ControlChannelTriggerResetReason) -> HRESULT, + fn get_HardwareSlotReset(&mut self, out: *mut bool) -> HRESULT, + fn get_SoftwareSlotReset(&mut self, out: *mut bool) -> HRESULT + }} + impl IControlChannelTriggerResetEventDetails { + #[inline] pub unsafe fn get_reset_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResetReason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_hardware_slot_reset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HardwareSlotReset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_software_slot_reset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SoftwareSlotReset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IControlChannelTrigger2, 2936066615, 20926, 17684, 151, 37, 53, 86, 225, 135, 149, 128); + RT_INTERFACE!{interface IControlChannelTrigger2(IControlChannelTrigger2Vtbl): IInspectable(IInspectableVtbl) [IID_IControlChannelTrigger2] { + fn get_IsWakeFromLowPowerSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IControlChannelTrigger2 { + #[inline] pub unsafe fn get_is_wake_from_low_power_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsWakeFromLowPowerSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Networking.Sockets +pub mod vpn { // Windows.Networking.Vpn +use ::prelude::*; + DEFINE_IID!(IID_IVpnPlugIn, 3468135687, 53416, 18179, 160, 145, 200, 194, 192, 145, 91, 196); + RT_INTERFACE!{interface IVpnPlugIn(IVpnPlugInVtbl): IInspectable(IInspectableVtbl) [IID_IVpnPlugIn] { + fn Connect(&mut self, channel: *mut VpnChannel) -> HRESULT, + fn Disconnect(&mut self, channel: *mut VpnChannel) -> HRESULT, + fn GetKeepAlivePayload(&mut self, channel: *mut VpnChannel, keepAlivePacket: *mut *mut VpnPacketBuffer) -> HRESULT, + fn Encapsulate(&mut self, channel: *mut VpnChannel, packets: *mut VpnPacketBufferList, encapulatedPackets: *mut VpnPacketBufferList) -> HRESULT, + fn Decapsulate(&mut self, channel: *mut VpnChannel, encapBuffer: *mut VpnPacketBuffer, decapsulatedPackets: *mut VpnPacketBufferList, controlPacketsToSend: *mut VpnPacketBufferList) -> HRESULT + }} + impl IVpnPlugIn { + #[inline] pub unsafe fn connect(&mut self, channel: &VpnChannel) -> Result<()> { + let hr = ((*self.lpVtbl).Connect)(self, channel as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn disconnect(&mut self, channel: &VpnChannel) -> Result<()> { + let hr = ((*self.lpVtbl).Disconnect)(self, channel as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_keep_alive_payload(&mut self, channel: &VpnChannel) -> Result> { + let mut keepAlivePacket = null_mut(); + let hr = ((*self.lpVtbl).GetKeepAlivePayload)(self, channel as *const _ as *mut _, &mut keepAlivePacket); + if hr == S_OK { Ok(ComPtr::wrap(keepAlivePacket)) } else { err(hr) } + } + #[inline] pub unsafe fn encapsulate(&mut self, channel: &VpnChannel, packets: &VpnPacketBufferList, encapulatedPackets: &VpnPacketBufferList) -> Result<()> { + let hr = ((*self.lpVtbl).Encapsulate)(self, channel as *const _ as *mut _, packets as *const _ as *mut _, encapulatedPackets as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn decapsulate(&mut self, channel: &VpnChannel, encapBuffer: &VpnPacketBuffer, decapsulatedPackets: &VpnPacketBufferList, controlPacketsToSend: &VpnPacketBufferList) -> Result<()> { + let hr = ((*self.lpVtbl).Decapsulate)(self, channel as *const _ as *mut _, encapBuffer as *const _ as *mut _, decapsulatedPackets as *const _ as *mut _, controlPacketsToSend as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum VpnDataPathType: i32 { + Send (VpnDataPathType_Send) = 0, Receive (VpnDataPathType_Receive) = 1, + }} + RT_ENUM! { enum VpnChannelActivityEventType: i32 { + Idle (VpnChannelActivityEventType_Idle) = 0, Active (VpnChannelActivityEventType_Active) = 1, + }} + RT_ENUM! { enum VpnCredentialType: i32 { + UsernamePassword (VpnCredentialType_UsernamePassword) = 0, UsernameOtpPin (VpnCredentialType_UsernameOtpPin) = 1, UsernamePasswordAndPin (VpnCredentialType_UsernamePasswordAndPin) = 2, UsernamePasswordChange (VpnCredentialType_UsernamePasswordChange) = 3, SmartCard (VpnCredentialType_SmartCard) = 4, ProtectedCertificate (VpnCredentialType_ProtectedCertificate) = 5, UnProtectedCertificate (VpnCredentialType_UnProtectedCertificate) = 6, + }} + RT_ENUM! { enum VpnPacketBufferStatus: i32 { + Ok (VpnPacketBufferStatus_Ok) = 0, InvalidBufferSize (VpnPacketBufferStatus_InvalidBufferSize) = 1, + }} + RT_ENUM! { enum VpnChannelRequestCredentialsOptions: u32 { + None (VpnChannelRequestCredentialsOptions_None) = 0, Retrying (VpnChannelRequestCredentialsOptions_Retrying) = 1, UseForSingleSignIn (VpnChannelRequestCredentialsOptions_UseForSingleSignIn) = 2, + }} + RT_ENUM! { enum VpnDomainNameType: i32 { + Suffix (VpnDomainNameType_Suffix) = 0, FullyQualified (VpnDomainNameType_FullyQualified) = 1, Reserved (VpnDomainNameType_Reserved) = 65535, + }} + DEFINE_IID!(IID_IVpnCustomPrompt, 2603531899, 34773, 17212, 180, 246, 238, 230, 170, 104, 162, 68); + RT_INTERFACE!{interface IVpnCustomPrompt(IVpnCustomPromptVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCustomPrompt] { + fn put_Label(&mut self, value: HSTRING) -> HRESULT, + fn get_Label(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Compulsory(&mut self, value: bool) -> HRESULT, + fn get_Compulsory(&mut self, out: *mut bool) -> HRESULT, + fn put_Bordered(&mut self, value: bool) -> HRESULT, + fn get_Bordered(&mut self, out: *mut bool) -> HRESULT + }} + impl IVpnCustomPrompt { + #[inline] pub unsafe fn set_label(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Label)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_label(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Label)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_compulsory(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Compulsory)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_compulsory(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Compulsory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bordered(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Bordered)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bordered(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bordered)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnCustomEditBox, 805493152, 53183, 19467, 143, 60, 102, 245, 3, 194, 11, 57); + RT_INTERFACE!{interface IVpnCustomEditBox(IVpnCustomEditBoxVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCustomEditBox] { + fn put_DefaultText(&mut self, value: HSTRING) -> HRESULT, + fn get_DefaultText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_NoEcho(&mut self, value: bool) -> HRESULT, + fn get_NoEcho(&mut self, out: *mut bool) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IVpnCustomEditBox { + #[inline] pub unsafe fn set_default_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DefaultText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_no_echo(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_NoEcho)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_no_echo(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NoEcho)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnCustomComboBox, 2586056078, 56225, 19567, 130, 112, 220, 243, 201, 118, 28, 76); + RT_INTERFACE!{interface IVpnCustomComboBox(IVpnCustomComboBoxVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCustomComboBox] { + fn put_OptionsText(&mut self, value: *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_OptionsText(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Selected(&mut self, out: *mut u32) -> HRESULT + }} + impl IVpnCustomComboBox { + #[inline] pub unsafe fn set_options_text(&mut self, value: &super::super::foundation::collections::IVectorView) -> Result<()> { + let hr = ((*self.lpVtbl).put_OptionsText)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_options_text(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OptionsText)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Selected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnCustomTextBox, 3668231114, 36643, 19766, 145, 241, 118, 217, 55, 130, 121, 66); + RT_INTERFACE!{interface IVpnCustomTextBox(IVpnCustomTextBoxVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCustomTextBox] { + fn put_DisplayText(&mut self, value: HSTRING) -> HRESULT, + fn get_DisplayText(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IVpnCustomTextBox { + #[inline] pub unsafe fn set_display_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnCustomCheckBox, 1132955475, 965, 20065, 147, 215, 169, 87, 113, 76, 66, 130); + RT_INTERFACE!{interface IVpnCustomCheckBox(IVpnCustomCheckBoxVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCustomCheckBox] { + fn put_InitialCheckState(&mut self, value: bool) -> HRESULT, + fn get_InitialCheckState(&mut self, out: *mut bool) -> HRESULT, + fn get_Checked(&mut self, out: *mut bool) -> HRESULT + }} + impl IVpnCustomCheckBox { + #[inline] pub unsafe fn set_initial_check_state(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_InitialCheckState)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_initial_check_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InitialCheckState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_checked(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Checked)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnCustomErrorBox, 2663706546, 51522, 17071, 178, 35, 88, 139, 72, 50, 135, 33); + RT_INTERFACE!{interface IVpnCustomErrorBox(IVpnCustomErrorBoxVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCustomErrorBox] { + + }} + DEFINE_IID!(IID_IVpnRouteFactory, 3186275839, 17871, 19353, 131, 251, 219, 59, 194, 103, 43, 2); + RT_INTERFACE!{static interface IVpnRouteFactory(IVpnRouteFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVpnRouteFactory] { + fn CreateVpnRoute(&mut self, address: *mut super::HostName, prefixSize: u8, out: *mut *mut VpnRoute) -> HRESULT + }} + impl IVpnRouteFactory { + #[inline] pub unsafe fn create_vpn_route(&mut self, address: &super::HostName, prefixSize: u8) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateVpnRoute)(self, address as *const _ as *mut _, prefixSize, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VpnRoute: IVpnRoute [IVpnRouteFactory] [CLSID_VpnRoute]} + DEFINE_CLSID!(CLSID_VpnRoute = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,86,112,110,46,86,112,110,82,111,117,116,101,0]); + DEFINE_IID!(IID_IVpnRoute, 3044219779, 2409, 18073, 147, 142, 119, 118, 219, 41, 207, 179); + RT_INTERFACE!{interface IVpnRoute(IVpnRouteVtbl): IInspectable(IInspectableVtbl) [IID_IVpnRoute] { + fn put_Address(&mut self, value: *mut super::HostName) -> HRESULT, + fn get_Address(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn put_PrefixSize(&mut self, value: u8) -> HRESULT, + fn get_PrefixSize(&mut self, out: *mut u8) -> HRESULT + }} + impl IVpnRoute { + #[inline] pub unsafe fn set_address(&mut self, value: &super::HostName) -> Result<()> { + let hr = ((*self.lpVtbl).put_Address)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Address)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_prefix_size(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_PrefixSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_prefix_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrefixSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnRouteAssignment, 3680820770, 52793, 19062, 149, 80, 246, 16, 57, 248, 14, 72); + RT_INTERFACE!{interface IVpnRouteAssignment(IVpnRouteAssignmentVtbl): IInspectable(IInspectableVtbl) [IID_IVpnRouteAssignment] { + fn put_Ipv4InclusionRoutes(&mut self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_Ipv6InclusionRoutes(&mut self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Ipv4InclusionRoutes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Ipv6InclusionRoutes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_Ipv4ExclusionRoutes(&mut self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_Ipv6ExclusionRoutes(&mut self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Ipv4ExclusionRoutes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Ipv6ExclusionRoutes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_ExcludeLocalSubnets(&mut self, value: bool) -> HRESULT, + fn get_ExcludeLocalSubnets(&mut self, out: *mut bool) -> HRESULT + }} + impl IVpnRouteAssignment { + #[inline] pub unsafe fn set_ipv4_inclusion_routes(&mut self, value: &super::super::foundation::collections::IVector) -> Result<()> { + let hr = ((*self.lpVtbl).put_Ipv4InclusionRoutes)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_ipv6_inclusion_routes(&mut self, value: &super::super::foundation::collections::IVector) -> Result<()> { + let hr = ((*self.lpVtbl).put_Ipv6InclusionRoutes)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ipv4_inclusion_routes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ipv4InclusionRoutes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ipv6_inclusion_routes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ipv6InclusionRoutes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_ipv4_exclusion_routes(&mut self, value: &super::super::foundation::collections::IVector) -> Result<()> { + let hr = ((*self.lpVtbl).put_Ipv4ExclusionRoutes)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_ipv6_exclusion_routes(&mut self, value: &super::super::foundation::collections::IVector) -> Result<()> { + let hr = ((*self.lpVtbl).put_Ipv6ExclusionRoutes)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ipv4_exclusion_routes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ipv4ExclusionRoutes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ipv6_exclusion_routes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ipv6ExclusionRoutes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_exclude_local_subnets(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExcludeLocalSubnets)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_exclude_local_subnets(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExcludeLocalSubnets)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnNamespaceInfoFactory, 3409876250, 45262, 17451, 172, 187, 95, 153, 178, 2, 195, 28); + RT_INTERFACE!{static interface IVpnNamespaceInfoFactory(IVpnNamespaceInfoFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVpnNamespaceInfoFactory] { + fn CreateVpnNamespaceInfo(&mut self, name: HSTRING, dnsServerList: *mut super::super::foundation::collections::IVector, proxyServerList: *mut super::super::foundation::collections::IVector, out: *mut *mut VpnNamespaceInfo) -> HRESULT + }} + impl IVpnNamespaceInfoFactory { + #[inline] pub unsafe fn create_vpn_namespace_info(&mut self, name: &HStringArg, dnsServerList: &super::super::foundation::collections::IVector, proxyServerList: &super::super::foundation::collections::IVector) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateVpnNamespaceInfo)(self, name.get(), dnsServerList as *const _ as *mut _, proxyServerList as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VpnNamespaceInfo: IVpnNamespaceInfo [IVpnNamespaceInfoFactory] [CLSID_VpnNamespaceInfo]} + DEFINE_CLSID!(CLSID_VpnNamespaceInfo = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,86,112,110,46,86,112,110,78,97,109,101,115,112,97,99,101,73,110,102,111,0]); + DEFINE_IID!(IID_IVpnNamespaceInfo, 820902723, 17487, 17605, 129, 103, 163, 90, 145, 241, 175, 148); + RT_INTERFACE!{interface IVpnNamespaceInfo(IVpnNamespaceInfoVtbl): IInspectable(IInspectableVtbl) [IID_IVpnNamespaceInfo] { + fn put_Namespace(&mut self, value: HSTRING) -> HRESULT, + fn get_Namespace(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DnsServers(&mut self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_DnsServers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_WebProxyServers(&mut self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_WebProxyServers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IVpnNamespaceInfo { + #[inline] pub unsafe fn set_namespace(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Namespace)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_namespace(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Namespace)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_dns_servers(&mut self, value: &super::super::foundation::collections::IVector) -> Result<()> { + let hr = ((*self.lpVtbl).put_DnsServers)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_dns_servers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DnsServers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_web_proxy_servers(&mut self, value: &super::super::foundation::collections::IVector) -> Result<()> { + let hr = ((*self.lpVtbl).put_WebProxyServers)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_web_proxy_servers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebProxyServers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnNamespaceAssignment, 3623344920, 12413, 19470, 189, 98, 143, 162, 112, 187, 173, 214); + RT_INTERFACE!{interface IVpnNamespaceAssignment(IVpnNamespaceAssignmentVtbl): IInspectable(IInspectableVtbl) [IID_IVpnNamespaceAssignment] { + fn put_NamespaceList(&mut self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_NamespaceList(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_ProxyAutoConfigUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_ProxyAutoConfigUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + }} + impl IVpnNamespaceAssignment { + #[inline] pub unsafe fn set_namespace_list(&mut self, value: &super::super::foundation::collections::IVector) -> Result<()> { + let hr = ((*self.lpVtbl).put_NamespaceList)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_namespace_list(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NamespaceList)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_proxy_auto_config_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProxyAutoConfigUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_proxy_auto_config_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProxyAutoConfigUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnInterfaceIdFactory, 2653805730, 5906, 19684, 177, 121, 140, 101, 44, 109, 16, 0); + RT_INTERFACE!{static interface IVpnInterfaceIdFactory(IVpnInterfaceIdFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVpnInterfaceIdFactory] { + fn CreateVpnInterfaceId(&mut self, addressSize: u32, address: *mut u8, out: *mut *mut VpnInterfaceId) -> HRESULT + }} + impl IVpnInterfaceIdFactory { + #[inline] pub unsafe fn create_vpn_interface_id(&mut self, address: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateVpnInterfaceId)(self, address.len() as u32, address.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VpnInterfaceId: IVpnInterfaceId [IVpnInterfaceIdFactory] [CLSID_VpnInterfaceId]} + DEFINE_CLSID!(CLSID_VpnInterfaceId = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,86,112,110,46,86,112,110,73,110,116,101,114,102,97,99,101,73,100,0]); + DEFINE_IID!(IID_IVpnInterfaceId, 2653805730, 5906, 19684, 177, 121, 140, 101, 44, 109, 16, 17); + RT_INTERFACE!{interface IVpnInterfaceId(IVpnInterfaceIdVtbl): IInspectable(IInspectableVtbl) [IID_IVpnInterfaceId] { + fn GetAddressInfo(&mut self, idSize: *mut u32, id: *mut *mut u8) -> HRESULT + }} + impl IVpnInterfaceId { + #[inline] pub unsafe fn get_address_info(&mut self) -> Result> { + let mut idSize = 0; let mut id = null_mut(); + let hr = ((*self.lpVtbl).GetAddressInfo)(self, &mut idSize, &mut id); + if hr == S_OK { Ok(ComArray::from_raw(idSize, id)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnPickedCredential, 2591636167, 34900, 20050, 173, 151, 36, 221, 154, 132, 43, 206); + RT_INTERFACE!{interface IVpnPickedCredential(IVpnPickedCredentialVtbl): IInspectable(IInspectableVtbl) [IID_IVpnPickedCredential] { + #[cfg(feature="windows.security")] fn get_PasskeyCredential(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + fn get_AdditionalPin(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.security")] fn get_OldPasswordCredential(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT + }} + impl IVpnPickedCredential { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_passkey_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PasskeyCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_additional_pin(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AdditionalPin)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_old_password_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OldPasswordCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnCredential, 3085404915, 42093, 16459, 135, 41, 24, 50, 82, 40, 83, 172); + RT_INTERFACE!{interface IVpnCredential(IVpnCredentialVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCredential] { + #[cfg(feature="windows.security")] fn get_PasskeyCredential(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + #[cfg(feature="windows.security")] fn get_CertificateCredential(&mut self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, + fn get_AdditionalPin(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.security")] fn get_OldPasswordCredential(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT + }} + impl IVpnCredential { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_passkey_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PasskeyCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_certificate_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CertificateCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_additional_pin(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AdditionalPin)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_old_password_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OldPasswordCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnSystemHealth, 2577987759, 49390, 20085, 129, 122, 242, 49, 174, 229, 18, 61); + RT_INTERFACE!{interface IVpnSystemHealth(IVpnSystemHealthVtbl): IInspectable(IInspectableVtbl) [IID_IVpnSystemHealth] { + #[cfg(feature="windows.storage")] fn get_StatementOfHealth(&mut self, out: *mut *mut super::super::storage::streams::Buffer) -> HRESULT + }} + impl IVpnSystemHealth { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_statement_of_health(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StatementOfHealth)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnChannelConfiguration, 237886626, 8210, 20452, 177, 121, 140, 101, 44, 109, 16, 126); + RT_INTERFACE!{interface IVpnChannelConfiguration(IVpnChannelConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IVpnChannelConfiguration] { + fn get_ServerServiceName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ServerHostNameList(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_CustomField(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IVpnChannelConfiguration { + #[inline] pub unsafe fn get_server_service_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerServiceName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_server_host_name_list(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerHostNameList)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_field(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomField)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnChannelConfiguration2, 4077606732, 30756, 18204, 161, 24, 99, 219, 201, 58, 228, 199); + RT_INTERFACE!{interface IVpnChannelConfiguration2(IVpnChannelConfiguration2Vtbl): IInspectable(IInspectableVtbl) [IID_IVpnChannelConfiguration2] { + fn get_ServerUris(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IVpnChannelConfiguration2 { + #[inline] pub unsafe fn get_server_uris(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerUris)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnChannelActivityEventArgs, 2741799154, 45020, 18293, 133, 93, 212, 172, 10, 53, 252, 85); + RT_INTERFACE!{interface IVpnChannelActivityEventArgs(IVpnChannelActivityEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVpnChannelActivityEventArgs] { + fn get_Type(&mut self, out: *mut VpnChannelActivityEventType) -> HRESULT + }} + impl IVpnChannelActivityEventArgs { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnChannel, 1254591751, 53672, 17155, 160, 145, 200, 210, 224, 145, 91, 195); + RT_INTERFACE!{interface IVpnChannel(IVpnChannelVtbl): IInspectable(IInspectableVtbl) [IID_IVpnChannel] { + fn AssociateTransport(&mut self, mainOuterTunnelTransport: *mut IInspectable, optionalOuterTunnelTransport: *mut IInspectable) -> HRESULT, + fn Start(&mut self, assignedClientIPv4list: *mut super::super::foundation::collections::IVectorView, assignedClientIPv6list: *mut super::super::foundation::collections::IVectorView, vpnInterfaceId: *mut VpnInterfaceId, routeScope: *mut VpnRouteAssignment, namespaceScope: *mut VpnNamespaceAssignment, mtuSize: u32, maxFrameSize: u32, optimizeForLowCostNetwork: bool, mainOuterTunnelTransport: *mut IInspectable, optionalOuterTunnelTransport: *mut IInspectable) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.security")] fn RequestCredentials(&mut self, credType: VpnCredentialType, isRetry: bool, isSingleSignOnCredential: bool, certificate: *mut super::super::security::cryptography::certificates::Certificate, out: *mut *mut VpnPickedCredential) -> HRESULT, + fn RequestVpnPacketBuffer(&mut self, type_: VpnDataPathType, vpnPacketBuffer: *mut *mut VpnPacketBuffer) -> HRESULT, + fn LogDiagnosticMessage(&mut self, message: HSTRING) -> HRESULT, + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_Configuration(&mut self, out: *mut *mut VpnChannelConfiguration) -> HRESULT, + fn add_ActivityChange(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ActivityChange(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn put_PlugInContext(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_PlugInContext(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_SystemHealth(&mut self, out: *mut *mut VpnSystemHealth) -> HRESULT, + fn RequestCustomPrompt(&mut self, customPrompt: *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn SetErrorMessage(&mut self, message: HSTRING) -> HRESULT, + fn SetAllowedSslTlsVersions(&mut self, tunnelTransport: *mut IInspectable, useTls12: bool) -> HRESULT + }} + impl IVpnChannel { + #[inline] pub unsafe fn associate_transport(&mut self, mainOuterTunnelTransport: &IInspectable, optionalOuterTunnelTransport: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).AssociateTransport)(self, mainOuterTunnelTransport as *const _ as *mut _, optionalOuterTunnelTransport as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self, assignedClientIPv4list: &super::super::foundation::collections::IVectorView, assignedClientIPv6list: &super::super::foundation::collections::IVectorView, vpnInterfaceId: &VpnInterfaceId, routeScope: &VpnRouteAssignment, namespaceScope: &VpnNamespaceAssignment, mtuSize: u32, maxFrameSize: u32, optimizeForLowCostNetwork: bool, mainOuterTunnelTransport: &IInspectable, optionalOuterTunnelTransport: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self, assignedClientIPv4list as *const _ as *mut _, assignedClientIPv6list as *const _ as *mut _, vpnInterfaceId as *const _ as *mut _, routeScope as *const _ as *mut _, namespaceScope as *const _ as *mut _, mtuSize, maxFrameSize, optimizeForLowCostNetwork, mainOuterTunnelTransport as *const _ as *mut _, optionalOuterTunnelTransport as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn request_credentials(&mut self, credType: VpnCredentialType, isRetry: bool, isSingleSignOnCredential: bool, certificate: &super::super::security::cryptography::certificates::Certificate) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestCredentials)(self, credType, isRetry, isSingleSignOnCredential, certificate as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_vpn_packet_buffer(&mut self, type_: VpnDataPathType) -> Result> { + let mut vpnPacketBuffer = null_mut(); + let hr = ((*self.lpVtbl).RequestVpnPacketBuffer)(self, type_, &mut vpnPacketBuffer); + if hr == S_OK { Ok(ComPtr::wrap(vpnPacketBuffer)) } else { err(hr) } + } + #[inline] pub unsafe fn log_diagnostic_message(&mut self, message: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).LogDiagnosticMessage)(self, message.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_configuration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Configuration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_activity_change(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ActivityChange)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_activity_change(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ActivityChange)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_plug_in_context(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlugInContext)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_plug_in_context(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlugInContext)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_health(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SystemHealth)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_custom_prompt(&mut self, customPrompt: &super::super::foundation::collections::IVectorView) -> Result<()> { + let hr = ((*self.lpVtbl).RequestCustomPrompt)(self, customPrompt as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_error_message(&mut self, message: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetErrorMessage)(self, message.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_allowed_ssl_tls_versions(&mut self, tunnelTransport: &IInspectable, useTls12: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetAllowedSslTlsVersions)(self, tunnelTransport as *const _ as *mut _, useTls12); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class VpnRouteAssignment: IVpnRouteAssignment} + RT_CLASS!{class VpnNamespaceAssignment: IVpnNamespaceAssignment} + RT_CLASS!{class VpnPickedCredential: IVpnPickedCredential} + RT_CLASS!{class VpnPacketBuffer: IVpnPacketBuffer [IVpnPacketBufferFactory] [CLSID_VpnPacketBuffer]} + DEFINE_CLSID!(CLSID_VpnPacketBuffer = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,86,112,110,46,86,112,110,80,97,99,107,101,116,66,117,102,102,101,114,0]); + RT_CLASS!{class VpnChannelConfiguration: IVpnChannelConfiguration} + RT_CLASS!{class VpnChannel: IVpnChannel} + RT_ACTIVATABLE!{IVpnChannelStatics [CLSID_VpnChannel]} + DEFINE_CLSID!(CLSID_VpnChannel = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,86,112,110,46,86,112,110,67,104,97,110,110,101,108,0]); + RT_CLASS!{class VpnChannelActivityEventArgs: IVpnChannelActivityEventArgs} + RT_CLASS!{class VpnSystemHealth: IVpnSystemHealth} + DEFINE_IID!(IID_IVpnChannel2, 576049509, 39227, 17961, 173, 96, 241, 195, 243, 83, 127, 80); + RT_INTERFACE!{interface IVpnChannel2(IVpnChannel2Vtbl): IInspectable(IInspectableVtbl) [IID_IVpnChannel2] { + fn StartWithMainTransport(&mut self, assignedClientIPv4list: *mut super::super::foundation::collections::IVectorView, assignedClientIPv6list: *mut super::super::foundation::collections::IVectorView, vpnInterfaceId: *mut VpnInterfaceId, assignedRoutes: *mut VpnRouteAssignment, assignedDomainName: *mut VpnDomainNameAssignment, mtuSize: u32, maxFrameSize: u32, reserved: bool, mainOuterTunnelTransport: *mut IInspectable) -> HRESULT, + fn StartExistingTransports(&mut self, assignedClientIPv4list: *mut super::super::foundation::collections::IVectorView, assignedClientIPv6list: *mut super::super::foundation::collections::IVectorView, vpnInterfaceId: *mut VpnInterfaceId, assignedRoutes: *mut VpnRouteAssignment, assignedDomainName: *mut VpnDomainNameAssignment, mtuSize: u32, maxFrameSize: u32, reserved: bool) -> HRESULT, + fn add_ActivityStateChange(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ActivityStateChange(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetVpnSendPacketBuffer(&mut self, out: *mut *mut VpnPacketBuffer) -> HRESULT, + fn GetVpnReceivePacketBuffer(&mut self, out: *mut *mut VpnPacketBuffer) -> HRESULT, + fn RequestCustomPromptAsync(&mut self, customPromptElement: *mut super::super::foundation::collections::IVectorView, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.security")] fn RequestCredentialsWithCertificateAsync(&mut self, credType: VpnCredentialType, credOptions: u32, certificate: *mut super::super::security::cryptography::certificates::Certificate, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestCredentialsWithOptionsAsync(&mut self, credType: VpnCredentialType, credOptions: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestCredentialsSimpleAsync(&mut self, credType: VpnCredentialType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TerminateConnection(&mut self, message: HSTRING) -> HRESULT, + fn StartWithTrafficFilter(&mut self, assignedClientIpv4List: *mut super::super::foundation::collections::IVectorView, assignedClientIpv6List: *mut super::super::foundation::collections::IVectorView, vpnInterfaceId: *mut VpnInterfaceId, assignedRoutes: *mut VpnRouteAssignment, assignedNamespace: *mut VpnDomainNameAssignment, mtuSize: u32, maxFrameSize: u32, reserved: bool, mainOuterTunnelTransport: *mut IInspectable, optionalOuterTunnelTransport: *mut IInspectable, assignedTrafficFilters: *mut VpnTrafficFilterAssignment) -> HRESULT + }} + impl IVpnChannel2 { + #[inline] pub unsafe fn start_with_main_transport(&mut self, assignedClientIPv4list: &super::super::foundation::collections::IVectorView, assignedClientIPv6list: &super::super::foundation::collections::IVectorView, vpnInterfaceId: &VpnInterfaceId, assignedRoutes: &VpnRouteAssignment, assignedDomainName: &VpnDomainNameAssignment, mtuSize: u32, maxFrameSize: u32, reserved: bool, mainOuterTunnelTransport: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).StartWithMainTransport)(self, assignedClientIPv4list as *const _ as *mut _, assignedClientIPv6list as *const _ as *mut _, vpnInterfaceId as *const _ as *mut _, assignedRoutes as *const _ as *mut _, assignedDomainName as *const _ as *mut _, mtuSize, maxFrameSize, reserved, mainOuterTunnelTransport as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_existing_transports(&mut self, assignedClientIPv4list: &super::super::foundation::collections::IVectorView, assignedClientIPv6list: &super::super::foundation::collections::IVectorView, vpnInterfaceId: &VpnInterfaceId, assignedRoutes: &VpnRouteAssignment, assignedDomainName: &VpnDomainNameAssignment, mtuSize: u32, maxFrameSize: u32, reserved: bool) -> Result<()> { + let hr = ((*self.lpVtbl).StartExistingTransports)(self, assignedClientIPv4list as *const _ as *mut _, assignedClientIPv6list as *const _ as *mut _, vpnInterfaceId as *const _ as *mut _, assignedRoutes as *const _ as *mut _, assignedDomainName as *const _ as *mut _, mtuSize, maxFrameSize, reserved); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_activity_state_change(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ActivityStateChange)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_activity_state_change(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ActivityStateChange)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_vpn_send_packet_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVpnSendPacketBuffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vpn_receive_packet_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVpnReceivePacketBuffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_custom_prompt_async(&mut self, customPromptElement: &super::super::foundation::collections::IVectorView) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestCustomPromptAsync)(self, customPromptElement as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn request_credentials_with_certificate_async(&mut self, credType: VpnCredentialType, credOptions: u32, certificate: &super::super::security::cryptography::certificates::Certificate) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestCredentialsWithCertificateAsync)(self, credType, credOptions, certificate as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_credentials_with_options_async(&mut self, credType: VpnCredentialType, credOptions: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestCredentialsWithOptionsAsync)(self, credType, credOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_credentials_simple_async(&mut self, credType: VpnCredentialType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestCredentialsSimpleAsync)(self, credType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn terminate_connection(&mut self, message: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).TerminateConnection)(self, message.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_with_traffic_filter(&mut self, assignedClientIpv4List: &super::super::foundation::collections::IVectorView, assignedClientIpv6List: &super::super::foundation::collections::IVectorView, vpnInterfaceId: &VpnInterfaceId, assignedRoutes: &VpnRouteAssignment, assignedNamespace: &VpnDomainNameAssignment, mtuSize: u32, maxFrameSize: u32, reserved: bool, mainOuterTunnelTransport: &IInspectable, optionalOuterTunnelTransport: &IInspectable, assignedTrafficFilters: &VpnTrafficFilterAssignment) -> Result<()> { + let hr = ((*self.lpVtbl).StartWithTrafficFilter)(self, assignedClientIpv4List as *const _ as *mut _, assignedClientIpv6List as *const _ as *mut _, vpnInterfaceId as *const _ as *mut _, assignedRoutes as *const _ as *mut _, assignedNamespace as *const _ as *mut _, mtuSize, maxFrameSize, reserved, mainOuterTunnelTransport as *const _ as *mut _, optionalOuterTunnelTransport as *const _ as *mut _, assignedTrafficFilters as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class VpnDomainNameAssignment: IVpnDomainNameAssignment} + RT_CLASS!{class VpnChannelActivityStateChangedArgs: IVpnChannelActivityStateChangedArgs} + DEFINE_IID!(IID_IVpnCustomPromptElement, 1941788216, 28420, 16461, 147, 221, 80, 164, 73, 36, 163, 139); + RT_INTERFACE!{interface IVpnCustomPromptElement(IVpnCustomPromptElementVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCustomPromptElement] { + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Compulsory(&mut self, value: bool) -> HRESULT, + fn get_Compulsory(&mut self, out: *mut bool) -> HRESULT, + fn put_Emphasized(&mut self, value: bool) -> HRESULT, + fn get_Emphasized(&mut self, out: *mut bool) -> HRESULT + }} + impl IVpnCustomPromptElement { + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_compulsory(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Compulsory)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_compulsory(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Compulsory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_emphasized(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Emphasized)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_emphasized(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Emphasized)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class VpnCredential: IVpnCredential} + RT_CLASS!{class VpnTrafficFilterAssignment: IVpnTrafficFilterAssignment} + DEFINE_IID!(IID_IVpnChannelStatics, 2297103917, 59416, 20477, 152, 166, 54, 62, 55, 54, 201, 93); + RT_INTERFACE!{static interface IVpnChannelStatics(IVpnChannelStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IVpnChannelStatics] { + fn ProcessEventAsync(&mut self, thirdPartyPlugIn: *mut IInspectable, event: *mut IInspectable) -> HRESULT + }} + impl IVpnChannelStatics { + #[inline] pub unsafe fn process_event_async(&mut self, thirdPartyPlugIn: &IInspectable, event: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).ProcessEventAsync)(self, thirdPartyPlugIn as *const _ as *mut _, event as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnPacketBufferFactory, 2653805730, 5906, 19684, 177, 121, 140, 101, 44, 109, 153, 153); + RT_INTERFACE!{static interface IVpnPacketBufferFactory(IVpnPacketBufferFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVpnPacketBufferFactory] { + fn CreateVpnPacketBuffer(&mut self, parentBuffer: *mut VpnPacketBuffer, offset: u32, length: u32, out: *mut *mut VpnPacketBuffer) -> HRESULT + }} + impl IVpnPacketBufferFactory { + #[inline] pub unsafe fn create_vpn_packet_buffer(&mut self, parentBuffer: &VpnPacketBuffer, offset: u32, length: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateVpnPacketBuffer)(self, parentBuffer as *const _ as *mut _, offset, length, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnPacketBuffer, 3271070204, 19804, 19043, 183, 13, 78, 48, 126, 172, 206, 85); + RT_INTERFACE!{interface IVpnPacketBuffer(IVpnPacketBufferVtbl): IInspectable(IInspectableVtbl) [IID_IVpnPacketBuffer] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Buffer(&mut self, out: *mut *mut super::super::storage::streams::Buffer) -> HRESULT, + fn put_Status(&mut self, value: VpnPacketBufferStatus) -> HRESULT, + fn get_Status(&mut self, out: *mut VpnPacketBufferStatus) -> HRESULT, + fn put_TransportAffinity(&mut self, value: u32) -> HRESULT, + fn get_TransportAffinity(&mut self, out: *mut u32) -> HRESULT + }} + impl IVpnPacketBuffer { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Buffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_status(&mut self, value: VpnPacketBufferStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_Status)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_transport_affinity(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransportAffinity)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_transport_affinity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TransportAffinity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnPacketBuffer2, 1717473776, 34821, 19445, 166, 25, 46, 132, 136, 46, 107, 79); + RT_INTERFACE!{interface IVpnPacketBuffer2(IVpnPacketBuffer2Vtbl): IInspectable(IInspectableVtbl) [IID_IVpnPacketBuffer2] { + fn get_AppId(&mut self, out: *mut *mut VpnAppId) -> HRESULT + }} + impl IVpnPacketBuffer2 { + #[inline] pub unsafe fn get_app_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppId)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VpnAppId: IVpnAppId [IVpnAppIdFactory] [CLSID_VpnAppId]} + DEFINE_CLSID!(CLSID_VpnAppId = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,86,112,110,46,86,112,110,65,112,112,73,100,0]); + DEFINE_IID!(IID_IVpnPacketBufferList, 3271070204, 19804, 19043, 183, 13, 78, 48, 126, 172, 206, 119); + RT_INTERFACE!{interface IVpnPacketBufferList(IVpnPacketBufferListVtbl): IInspectable(IInspectableVtbl) [IID_IVpnPacketBufferList] { + fn Append(&mut self, nextVpnPacketBuffer: *mut VpnPacketBuffer) -> HRESULT, + fn AddAtBegin(&mut self, nextVpnPacketBuffer: *mut VpnPacketBuffer) -> HRESULT, + fn RemoveAtEnd(&mut self, out: *mut *mut VpnPacketBuffer) -> HRESULT, + fn RemoveAtBegin(&mut self, out: *mut *mut VpnPacketBuffer) -> HRESULT, + fn Clear(&mut self) -> HRESULT, + fn put_Status(&mut self, value: VpnPacketBufferStatus) -> HRESULT, + fn get_Status(&mut self, out: *mut VpnPacketBufferStatus) -> HRESULT, + fn get_Size(&mut self, out: *mut u32) -> HRESULT + }} + impl IVpnPacketBufferList { + #[inline] pub unsafe fn append(&mut self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).Append)(self, nextVpnPacketBuffer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_at_begin(&mut self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).AddAtBegin)(self, nextVpnPacketBuffer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_at_end(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RemoveAtEnd)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn remove_at_begin(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RemoveAtBegin)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_status(&mut self, value: VpnPacketBufferStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_Status)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnPacketBufferList2, 1048236005, 59934, 18474, 141, 152, 192, 101, 245, 125, 137, 234); + RT_INTERFACE!{interface IVpnPacketBufferList2(IVpnPacketBufferList2Vtbl): IInspectable(IInspectableVtbl) [IID_IVpnPacketBufferList2] { + fn AddLeadingPacket(&mut self, nextVpnPacketBuffer: *mut VpnPacketBuffer) -> HRESULT, + fn RemoveLeadingPacket(&mut self, out: *mut *mut VpnPacketBuffer) -> HRESULT, + fn AddTrailingPacket(&mut self, nextVpnPacketBuffer: *mut VpnPacketBuffer) -> HRESULT, + fn RemoveTrailingPacket(&mut self, out: *mut *mut VpnPacketBuffer) -> HRESULT + }} + impl IVpnPacketBufferList2 { + #[inline] pub unsafe fn add_leading_packet(&mut self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).AddLeadingPacket)(self, nextVpnPacketBuffer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_leading_packet(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RemoveLeadingPacket)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_trailing_packet(&mut self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).AddTrailingPacket)(self, nextVpnPacketBuffer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_trailing_packet(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RemoveTrailingPacket)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnCustomPromptTextInput, 3386547317, 37180, 18389, 136, 186, 72, 252, 72, 147, 2, 53); + RT_INTERFACE!{interface IVpnCustomPromptTextInput(IVpnCustomPromptTextInputVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCustomPromptTextInput] { + fn put_PlaceholderText(&mut self, value: HSTRING) -> HRESULT, + fn get_PlaceholderText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_IsTextHidden(&mut self, value: bool) -> HRESULT, + fn get_IsTextHidden(&mut self, out: *mut bool) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IVpnCustomPromptTextInput { + #[inline] pub unsafe fn set_placeholder_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlaceholderText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_placeholder_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaceholderText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_text_hidden(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTextHidden)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_text_hidden(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTextHidden)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnCustomPromptOptionSelector, 999240921, 36545, 20117, 154, 78, 123, 166, 77, 56, 243, 48); + RT_INTERFACE!{interface IVpnCustomPromptOptionSelector(IVpnCustomPromptOptionSelectorVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCustomPromptOptionSelector] { + fn get_Options(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_SelectedIndex(&mut self, out: *mut u32) -> HRESULT + }} + impl IVpnCustomPromptOptionSelector { + #[inline] pub unsafe fn get_options(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Options)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectedIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnCustomPromptBooleanInput, 3301549726, 65351, 17703, 159, 39, 164, 146, 146, 1, 153, 121); + RT_INTERFACE!{interface IVpnCustomPromptBooleanInput(IVpnCustomPromptBooleanInputVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCustomPromptBooleanInput] { + fn put_InitialValue(&mut self, value: bool) -> HRESULT, + fn get_InitialValue(&mut self, out: *mut bool) -> HRESULT, + fn get_Value(&mut self, out: *mut bool) -> HRESULT + }} + impl IVpnCustomPromptBooleanInput { + #[inline] pub unsafe fn set_initial_value(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_InitialValue)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_initial_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InitialValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnCustomPromptText, 1003011566, 14914, 18851, 171, 221, 7, 178, 237, 234, 117, 45); + RT_INTERFACE!{interface IVpnCustomPromptText(IVpnCustomPromptTextVtbl): IInspectable(IInspectableVtbl) [IID_IVpnCustomPromptText] { + fn put_Text(&mut self, value: HSTRING) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IVpnCustomPromptText { + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Text)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnChannelActivityStateChangedArgs, 1031079269, 64960, 19390, 162, 59, 69, 255, 252, 109, 151, 161); + RT_INTERFACE!{interface IVpnChannelActivityStateChangedArgs(IVpnChannelActivityStateChangedArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVpnChannelActivityStateChangedArgs] { + fn get_ActivityState(&mut self, out: *mut VpnChannelActivityEventType) -> HRESULT + }} + impl IVpnChannelActivityStateChangedArgs { + #[inline] pub unsafe fn get_activity_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActivityState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnDomainNameInfoFactory, 621263733, 655, 18056, 141, 58, 196, 83, 29, 243, 125, 168); + RT_INTERFACE!{static interface IVpnDomainNameInfoFactory(IVpnDomainNameInfoFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVpnDomainNameInfoFactory] { + fn CreateVpnDomainNameInfo(&mut self, name: HSTRING, nameType: VpnDomainNameType, dnsServerList: *mut super::super::foundation::collections::IIterable, proxyServerList: *mut super::super::foundation::collections::IIterable, out: *mut *mut VpnDomainNameInfo) -> HRESULT + }} + impl IVpnDomainNameInfoFactory { + #[inline] pub unsafe fn create_vpn_domain_name_info(&mut self, name: &HStringArg, nameType: VpnDomainNameType, dnsServerList: &super::super::foundation::collections::IIterable, proxyServerList: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateVpnDomainNameInfo)(self, name.get(), nameType, dnsServerList as *const _ as *mut _, proxyServerList as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VpnDomainNameInfo: IVpnDomainNameInfo [IVpnDomainNameInfoFactory] [CLSID_VpnDomainNameInfo]} + DEFINE_CLSID!(CLSID_VpnDomainNameInfo = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,86,112,110,46,86,112,110,68,111,109,97,105,110,78,97,109,101,73,110,102,111,0]); + DEFINE_IID!(IID_IVpnDomainNameInfo, 2905520175, 60046, 20346, 132, 62, 26, 135, 227, 46, 27, 154); + RT_INTERFACE!{interface IVpnDomainNameInfo(IVpnDomainNameInfoVtbl): IInspectable(IInspectableVtbl) [IID_IVpnDomainNameInfo] { + fn put_DomainName(&mut self, value: *mut super::HostName) -> HRESULT, + fn get_DomainName(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn put_DomainNameType(&mut self, value: VpnDomainNameType) -> HRESULT, + fn get_DomainNameType(&mut self, out: *mut VpnDomainNameType) -> HRESULT, + fn get_DnsServers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_WebProxyServers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IVpnDomainNameInfo { + #[inline] pub unsafe fn set_domain_name(&mut self, value: &super::HostName) -> Result<()> { + let hr = ((*self.lpVtbl).put_DomainName)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DomainName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_domain_name_type(&mut self, value: VpnDomainNameType) -> Result<()> { + let hr = ((*self.lpVtbl).put_DomainNameType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_name_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DomainNameType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dns_servers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DnsServers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_web_proxy_servers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebProxyServers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnDomainNameInfo2, 2877755729, 27731, 18472, 152, 131, 216, 134, 222, 16, 68, 7); + RT_INTERFACE!{interface IVpnDomainNameInfo2(IVpnDomainNameInfo2Vtbl): IInspectable(IInspectableVtbl) [IID_IVpnDomainNameInfo2] { + fn get_WebProxyUris(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IVpnDomainNameInfo2 { + #[inline] pub unsafe fn get_web_proxy_uris(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebProxyUris)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnDomainNameAssignment, 1094037825, 52443, 18869, 148, 1, 3, 154, 138, 231, 103, 233); + RT_INTERFACE!{interface IVpnDomainNameAssignment(IVpnDomainNameAssignmentVtbl): IInspectable(IInspectableVtbl) [IID_IVpnDomainNameAssignment] { + fn get_DomainNameList(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_ProxyAutoConfigurationUri(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_ProxyAutoConfigurationUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + }} + impl IVpnDomainNameAssignment { + #[inline] pub unsafe fn get_domain_name_list(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DomainNameList)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_proxy_auto_configuration_uri(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProxyAutoConfigurationUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_proxy_auto_configuration_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProxyAutoConfigurationUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum VpnAppIdType: i32 { + PackageFamilyName (VpnAppIdType_PackageFamilyName) = 0, FullyQualifiedBinaryName (VpnAppIdType_FullyQualifiedBinaryName) = 1, FilePath (VpnAppIdType_FilePath) = 2, + }} + DEFINE_IID!(IID_IVpnAppIdFactory, 1185807658, 2731, 20443, 130, 29, 211, 221, 201, 25, 120, 139); + RT_INTERFACE!{static interface IVpnAppIdFactory(IVpnAppIdFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVpnAppIdFactory] { + fn Create(&mut self, type_: VpnAppIdType, value: HSTRING, out: *mut *mut VpnAppId) -> HRESULT + }} + impl IVpnAppIdFactory { + #[inline] pub unsafe fn create(&mut self, type_: VpnAppIdType, value: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, type_, value.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnAppId, 2064033333, 23640, 16857, 148, 167, 191, 188, 241, 216, 202, 84); + RT_INTERFACE!{interface IVpnAppId(IVpnAppIdVtbl): IInspectable(IInspectableVtbl) [IID_IVpnAppId] { + fn get_Type(&mut self, out: *mut VpnAppIdType) -> HRESULT, + fn put_Type(&mut self, value: VpnAppIdType) -> HRESULT, + fn get_Value(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Value(&mut self, value: HSTRING) -> HRESULT + }} + impl IVpnAppId { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_type(&mut self, value: VpnAppIdType) -> Result<()> { + let hr = ((*self.lpVtbl).put_Type)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnTrafficFilterFactory, 1208828373, 32665, 18252, 134, 238, 150, 223, 22, 131, 24, 241); + RT_INTERFACE!{static interface IVpnTrafficFilterFactory(IVpnTrafficFilterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVpnTrafficFilterFactory] { + fn Create(&mut self, appId: *mut VpnAppId, out: *mut *mut VpnTrafficFilter) -> HRESULT + }} + impl IVpnTrafficFilterFactory { + #[inline] pub unsafe fn create(&mut self, appId: &VpnAppId) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, appId as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VpnTrafficFilter: IVpnTrafficFilter [IVpnTrafficFilterFactory] [CLSID_VpnTrafficFilter]} + DEFINE_CLSID!(CLSID_VpnTrafficFilter = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,86,112,110,46,86,112,110,84,114,97,102,102,105,99,70,105,108,116,101,114,0]); + RT_ENUM! { enum VpnIPProtocol: i32 { + None (VpnIPProtocol_None) = 0, Tcp (VpnIPProtocol_Tcp) = 6, Udp (VpnIPProtocol_Udp) = 17, Icmp (VpnIPProtocol_Icmp) = 1, Ipv6Icmp (VpnIPProtocol_Ipv6Icmp) = 58, Igmp (VpnIPProtocol_Igmp) = 2, Pgm (VpnIPProtocol_Pgm) = 113, + }} + RT_ENUM! { enum VpnRoutingPolicyType: i32 { + SplitRouting (VpnRoutingPolicyType_SplitRouting) = 0, ForceAllTrafficOverVpn (VpnRoutingPolicyType_ForceAllTrafficOverVpn) = 1, + }} + DEFINE_IID!(IID_IVpnTrafficFilter, 795417440, 27807, 18421, 172, 54, 187, 27, 4, 46, 44, 80); + RT_INTERFACE!{interface IVpnTrafficFilter(IVpnTrafficFilterVtbl): IInspectable(IInspectableVtbl) [IID_IVpnTrafficFilter] { + fn get_AppId(&mut self, out: *mut *mut VpnAppId) -> HRESULT, + fn put_AppId(&mut self, value: *mut VpnAppId) -> HRESULT, + fn get_AppClaims(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Protocol(&mut self, out: *mut VpnIPProtocol) -> HRESULT, + fn put_Protocol(&mut self, value: VpnIPProtocol) -> HRESULT, + fn get_LocalPortRanges(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_RemotePortRanges(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_LocalAddressRanges(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_RemoteAddressRanges(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_RoutingPolicyType(&mut self, out: *mut VpnRoutingPolicyType) -> HRESULT, + fn put_RoutingPolicyType(&mut self, value: VpnRoutingPolicyType) -> HRESULT + }} + impl IVpnTrafficFilter { + #[inline] pub unsafe fn get_app_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppId)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_app_id(&mut self, value: &VpnAppId) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppId)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_claims(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppClaims)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_protocol(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Protocol)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_protocol(&mut self, value: VpnIPProtocol) -> Result<()> { + let hr = ((*self.lpVtbl).put_Protocol)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_port_ranges(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalPortRanges)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_port_ranges(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemotePortRanges)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_address_ranges(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalAddressRanges)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_address_ranges(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteAddressRanges)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_routing_policy_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoutingPolicyType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_routing_policy_type(&mut self, value: VpnRoutingPolicyType) -> Result<()> { + let hr = ((*self.lpVtbl).put_RoutingPolicyType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnTrafficFilterAssignment, 1456264284, 58980, 18206, 137, 205, 96, 22, 3, 185, 224, 243); + RT_INTERFACE!{interface IVpnTrafficFilterAssignment(IVpnTrafficFilterAssignmentVtbl): IInspectable(IInspectableVtbl) [IID_IVpnTrafficFilterAssignment] { + fn get_TrafficFilterList(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_AllowOutbound(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowOutbound(&mut self, value: bool) -> HRESULT, + fn get_AllowInbound(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowInbound(&mut self, value: bool) -> HRESULT + }} + impl IVpnTrafficFilterAssignment { + #[inline] pub unsafe fn get_traffic_filter_list(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TrafficFilterList)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_allow_outbound(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowOutbound)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_outbound(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowOutbound)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_allow_inbound(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowInbound)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_inbound(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowInbound)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnProfile, 2020980561, 45271, 17371, 138, 147, 211, 254, 36, 121, 229, 106); + RT_INTERFACE!{interface IVpnProfile(IVpnProfileVtbl): IInspectable(IInspectableVtbl) [IID_IVpnProfile] { + fn get_ProfileName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ProfileName(&mut self, value: HSTRING) -> HRESULT, + fn get_AppTriggers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Routes(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_DomainNameInfoList(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_TrafficFilters(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_RememberCredentials(&mut self, out: *mut bool) -> HRESULT, + fn put_RememberCredentials(&mut self, value: bool) -> HRESULT, + fn get_AlwaysOn(&mut self, out: *mut bool) -> HRESULT, + fn put_AlwaysOn(&mut self, value: bool) -> HRESULT + }} + impl IVpnProfile { + #[inline] pub unsafe fn get_profile_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProfileName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_profile_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProfileName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_triggers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppTriggers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_routes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Routes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_name_info_list(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DomainNameInfoList)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_traffic_filters(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TrafficFilters)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remember_credentials(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RememberCredentials)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_remember_credentials(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_RememberCredentials)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_always_on(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlwaysOn)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_always_on(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AlwaysOn)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnPlugInProfile, 249499044, 20224, 17801, 141, 123, 75, 249, 136, 246, 84, 44); + RT_INTERFACE!{interface IVpnPlugInProfile(IVpnPlugInProfileVtbl): IInspectable(IInspectableVtbl) [IID_IVpnPlugInProfile] { + fn get_ServerUris(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_CustomConfiguration(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CustomConfiguration(&mut self, value: HSTRING) -> HRESULT, + fn get_VpnPluginPackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_VpnPluginPackageFamilyName(&mut self, value: HSTRING) -> HRESULT + }} + impl IVpnPlugInProfile { + #[inline] pub unsafe fn get_server_uris(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerUris)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_configuration(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomConfiguration)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_custom_configuration(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CustomConfiguration)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_vpn_plugin_package_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VpnPluginPackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_vpn_plugin_package_family_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_VpnPluginPackageFamilyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum VpnManagementConnectionStatus: i32 { + Disconnected (VpnManagementConnectionStatus_Disconnected) = 0, Disconnecting (VpnManagementConnectionStatus_Disconnecting) = 1, Connected (VpnManagementConnectionStatus_Connected) = 2, Connecting (VpnManagementConnectionStatus_Connecting) = 3, + }} + DEFINE_IID!(IID_IVpnPlugInProfile2, 1629243538, 53140, 19158, 186, 153, 0, 244, 255, 52, 86, 94); + RT_INTERFACE!{interface IVpnPlugInProfile2(IVpnPlugInProfile2Vtbl): IInspectable(IInspectableVtbl) [IID_IVpnPlugInProfile2] { + fn get_RequireVpnClientAppUI(&mut self, out: *mut bool) -> HRESULT, + fn put_RequireVpnClientAppUI(&mut self, value: bool) -> HRESULT, + fn get_ConnectionStatus(&mut self, out: *mut VpnManagementConnectionStatus) -> HRESULT + }} + impl IVpnPlugInProfile2 { + #[inline] pub unsafe fn get_require_vpn_client_app_ui(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequireVpnClientAppUI)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_require_vpn_client_app_ui(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_RequireVpnClientAppUI)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_connection_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConnectionStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum VpnNativeProtocolType: i32 { + Pptp (VpnNativeProtocolType_Pptp) = 0, L2tp (VpnNativeProtocolType_L2tp) = 1, IpsecIkev2 (VpnNativeProtocolType_IpsecIkev2) = 2, + }} + RT_ENUM! { enum VpnAuthenticationMethod: i32 { + Mschapv2 (VpnAuthenticationMethod_Mschapv2) = 0, Eap (VpnAuthenticationMethod_Eap) = 1, Certificate (VpnAuthenticationMethod_Certificate) = 2, PresharedKey (VpnAuthenticationMethod_PresharedKey) = 3, + }} + DEFINE_IID!(IID_IVpnNativeProfile, 2762924702, 25623, 17203, 152, 66, 240, 166, 109, 182, 152, 2); + RT_INTERFACE!{interface IVpnNativeProfile(IVpnNativeProfileVtbl): IInspectable(IInspectableVtbl) [IID_IVpnNativeProfile] { + fn get_Servers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_RoutingPolicyType(&mut self, out: *mut VpnRoutingPolicyType) -> HRESULT, + fn put_RoutingPolicyType(&mut self, value: VpnRoutingPolicyType) -> HRESULT, + fn get_NativeProtocolType(&mut self, out: *mut VpnNativeProtocolType) -> HRESULT, + fn put_NativeProtocolType(&mut self, value: VpnNativeProtocolType) -> HRESULT, + fn get_UserAuthenticationMethod(&mut self, out: *mut VpnAuthenticationMethod) -> HRESULT, + fn put_UserAuthenticationMethod(&mut self, value: VpnAuthenticationMethod) -> HRESULT, + fn get_TunnelAuthenticationMethod(&mut self, out: *mut VpnAuthenticationMethod) -> HRESULT, + fn put_TunnelAuthenticationMethod(&mut self, value: VpnAuthenticationMethod) -> HRESULT, + fn get_EapConfiguration(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_EapConfiguration(&mut self, value: HSTRING) -> HRESULT + }} + impl IVpnNativeProfile { + #[inline] pub unsafe fn get_servers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Servers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_routing_policy_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoutingPolicyType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_routing_policy_type(&mut self, value: VpnRoutingPolicyType) -> Result<()> { + let hr = ((*self.lpVtbl).put_RoutingPolicyType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_native_protocol_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NativeProtocolType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_native_protocol_type(&mut self, value: VpnNativeProtocolType) -> Result<()> { + let hr = ((*self.lpVtbl).put_NativeProtocolType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_authentication_method(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UserAuthenticationMethod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_user_authentication_method(&mut self, value: VpnAuthenticationMethod) -> Result<()> { + let hr = ((*self.lpVtbl).put_UserAuthenticationMethod)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tunnel_authentication_method(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TunnelAuthenticationMethod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_tunnel_authentication_method(&mut self, value: VpnAuthenticationMethod) -> Result<()> { + let hr = ((*self.lpVtbl).put_TunnelAuthenticationMethod)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_eap_configuration(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EapConfiguration)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_eap_configuration(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_EapConfiguration)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVpnNativeProfile2, 267134055, 52661, 19143, 181, 163, 10, 251, 94, 196, 118, 130); + RT_INTERFACE!{interface IVpnNativeProfile2(IVpnNativeProfile2Vtbl): IInspectable(IInspectableVtbl) [IID_IVpnNativeProfile2] { + fn get_RequireVpnClientAppUI(&mut self, out: *mut bool) -> HRESULT, + fn put_RequireVpnClientAppUI(&mut self, value: bool) -> HRESULT, + fn get_ConnectionStatus(&mut self, out: *mut VpnManagementConnectionStatus) -> HRESULT + }} + impl IVpnNativeProfile2 { + #[inline] pub unsafe fn get_require_vpn_client_app_ui(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequireVpnClientAppUI)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_require_vpn_client_app_ui(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_RequireVpnClientAppUI)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_connection_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConnectionStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum VpnManagementErrorStatus: i32 { + Ok (VpnManagementErrorStatus_Ok) = 0, Other (VpnManagementErrorStatus_Other) = 1, InvalidXmlSyntax (VpnManagementErrorStatus_InvalidXmlSyntax) = 2, ProfileNameTooLong (VpnManagementErrorStatus_ProfileNameTooLong) = 3, ProfileInvalidAppId (VpnManagementErrorStatus_ProfileInvalidAppId) = 4, AccessDenied (VpnManagementErrorStatus_AccessDenied) = 5, CannotFindProfile (VpnManagementErrorStatus_CannotFindProfile) = 6, AlreadyDisconnecting (VpnManagementErrorStatus_AlreadyDisconnecting) = 7, AlreadyConnected (VpnManagementErrorStatus_AlreadyConnected) = 8, GeneralAuthenticationFailure (VpnManagementErrorStatus_GeneralAuthenticationFailure) = 9, EapFailure (VpnManagementErrorStatus_EapFailure) = 10, SmartCardFailure (VpnManagementErrorStatus_SmartCardFailure) = 11, CertificateFailure (VpnManagementErrorStatus_CertificateFailure) = 12, ServerConfiguration (VpnManagementErrorStatus_ServerConfiguration) = 13, NoConnection (VpnManagementErrorStatus_NoConnection) = 14, ServerConnection (VpnManagementErrorStatus_ServerConnection) = 15, UserNamePassword (VpnManagementErrorStatus_UserNamePassword) = 16, DnsNotResolvable (VpnManagementErrorStatus_DnsNotResolvable) = 17, InvalidIP (VpnManagementErrorStatus_InvalidIP) = 18, + }} + DEFINE_IID!(IID_IVpnManagementAgent, 423007949, 42436, 19134, 133, 43, 120, 91, 228, 203, 62, 52); + RT_INTERFACE!{interface IVpnManagementAgent(IVpnManagementAgentVtbl): IInspectable(IInspectableVtbl) [IID_IVpnManagementAgent] { + fn AddProfileFromXmlAsync(&mut self, xml: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn AddProfileFromObjectAsync(&mut self, profile: *mut IVpnProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn UpdateProfileFromXmlAsync(&mut self, xml: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn UpdateProfileFromObjectAsync(&mut self, profile: *mut IVpnProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetProfilesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn DeleteProfileAsync(&mut self, profile: *mut IVpnProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ConnectProfileAsync(&mut self, profile: *mut IVpnProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.security"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.security")] fn ConnectProfileWithPasswordCredentialAsync(&mut self, profile: *mut IVpnProfile, passwordCredential: *mut super::super::security::credentials::PasswordCredential, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DisconnectProfileAsync(&mut self, profile: *mut IVpnProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IVpnManagementAgent { + #[inline] pub unsafe fn add_profile_from_xml_async(&mut self, xml: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddProfileFromXmlAsync)(self, xml.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_profile_from_object_async(&mut self, profile: &IVpnProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddProfileFromObjectAsync)(self, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_profile_from_xml_async(&mut self, xml: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateProfileFromXmlAsync)(self, xml.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_profile_from_object_async(&mut self, profile: &IVpnProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateProfileFromObjectAsync)(self, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_profiles_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetProfilesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_profile_async(&mut self, profile: &IVpnProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteProfileAsync)(self, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn connect_profile_async(&mut self, profile: &IVpnProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectProfileAsync)(self, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn connect_profile_with_password_credential_async(&mut self, profile: &IVpnProfile, passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConnectProfileWithPasswordCredentialAsync)(self, profile as *const _ as *mut _, passwordCredential as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn disconnect_profile_async(&mut self, profile: &IVpnProfile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DisconnectProfileAsync)(self, profile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VpnPacketBufferList: IVpnPacketBufferList} + RT_CLASS!{class VpnCustomEditBox: IVpnCustomEditBox} + RT_CLASS!{class VpnCustomPromptTextInput: IVpnCustomPromptTextInput} + RT_CLASS!{class VpnCustomComboBox: IVpnCustomComboBox} + RT_CLASS!{class VpnCustomPromptOptionSelector: IVpnCustomPromptOptionSelector} + RT_CLASS!{class VpnCustomTextBox: IVpnCustomTextBox} + RT_CLASS!{class VpnCustomPromptText: IVpnCustomPromptText} + RT_CLASS!{class VpnCustomCheckBox: IVpnCustomCheckBox} + RT_CLASS!{class VpnCustomPromptBooleanInput: IVpnCustomPromptBooleanInput} + RT_CLASS!{class VpnCustomErrorBox: IVpnCustomErrorBox} + RT_CLASS!{class VpnPlugInProfile: IVpnPlugInProfile} + RT_CLASS!{class VpnNativeProfile: IVpnNativeProfile} + RT_CLASS!{class VpnManagementAgent: IVpnManagementAgent} +} // Windows.Networking.Vpn +pub mod pushnotifications { // Windows.Networking.PushNotifications +use ::prelude::*; + RT_ENUM! { enum PushNotificationType: i32 { + Toast (PushNotificationType_Toast) = 0, Tile (PushNotificationType_Tile) = 1, Badge (PushNotificationType_Badge) = 2, Raw (PushNotificationType_Raw) = 3, TileFlyout (PushNotificationType_TileFlyout) = 4, + }} + DEFINE_IID!(IID_IPushNotificationChannelManagerStatics, 2343541605, 30625, 17800, 189, 25, 134, 21, 41, 169, 220, 240); + RT_INTERFACE!{static interface IPushNotificationChannelManagerStatics(IPushNotificationChannelManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPushNotificationChannelManagerStatics] { + fn CreatePushNotificationChannelForApplicationAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreatePushNotificationChannelForApplicationAsyncWithId(&mut self, applicationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreatePushNotificationChannelForSecondaryTileAsync(&mut self, tileId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPushNotificationChannelManagerStatics { + #[inline] pub unsafe fn create_push_notification_channel_for_application_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePushNotificationChannelForApplicationAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_push_notification_channel_for_application_async_with_id(&mut self, applicationId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePushNotificationChannelForApplicationAsyncWithId)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_push_notification_channel_for_secondary_tile_async(&mut self, tileId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePushNotificationChannelForSecondaryTileAsync)(self, tileId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PushNotificationChannel: IPushNotificationChannel} + DEFINE_IID!(IID_IPushNotificationChannelManagerStatics2, 3024397917, 42985, 19240, 149, 14, 243, 117, 169, 7, 249, 223); + RT_INTERFACE!{static interface IPushNotificationChannelManagerStatics2(IPushNotificationChannelManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IPushNotificationChannelManagerStatics2] { + #[cfg(feature="windows.system")] fn GetForUser(&mut self, user: *mut super::super::system::User, out: *mut *mut PushNotificationChannelManagerForUser) -> HRESULT + }} + impl IPushNotificationChannelManagerStatics2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user(&mut self, user: &super::super::system::User) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForUser)(self, user as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PushNotificationChannelManagerForUser: IPushNotificationChannelManagerForUser} + DEFINE_IID!(IID_IPushNotificationChannelManagerForUser, 2764330756, 4482, 17095, 136, 144, 245, 99, 196, 137, 13, 196); + RT_INTERFACE!{interface IPushNotificationChannelManagerForUser(IPushNotificationChannelManagerForUserVtbl): IInspectable(IInspectableVtbl) [IID_IPushNotificationChannelManagerForUser] { + fn CreatePushNotificationChannelForApplicationAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreatePushNotificationChannelForApplicationAsyncWithId(&mut self, applicationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreatePushNotificationChannelForSecondaryTileAsync(&mut self, tileId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT + }} + impl IPushNotificationChannelManagerForUser { + #[inline] pub unsafe fn create_push_notification_channel_for_application_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePushNotificationChannelForApplicationAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_push_notification_channel_for_application_async_with_id(&mut self, applicationId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePushNotificationChannelForApplicationAsyncWithId)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_push_notification_channel_for_secondary_tile_async(&mut self, tileId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePushNotificationChannelForSecondaryTileAsync)(self, tileId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPushNotificationChannel, 724045870, 61195, 20281, 155, 138, 163, 193, 148, 222, 112, 129); + RT_INTERFACE!{interface IPushNotificationChannel(IPushNotificationChannelVtbl): IInspectable(IInspectableVtbl) [IID_IPushNotificationChannel] { + fn get_Uri(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ExpirationTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn Close(&mut self) -> HRESULT, + fn add_PushNotificationReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PushNotificationReceived(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPushNotificationChannel { + #[inline] pub unsafe fn get_uri(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExpirationTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn close(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Close)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_push_notification_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PushNotificationReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_push_notification_received(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PushNotificationReceived)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class PushNotificationReceivedEventArgs: IPushNotificationReceivedEventArgs} + DEFINE_IID!(IID_IPushNotificationReceivedEventArgs, 3506855436, 14029, 18508, 185, 53, 10, 153, 183, 83, 207, 0); + RT_INTERFACE!{interface IPushNotificationReceivedEventArgs(IPushNotificationReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPushNotificationReceivedEventArgs] { + fn put_Cancel(&mut self, value: bool) -> HRESULT, + fn get_Cancel(&mut self, out: *mut bool) -> HRESULT, + fn get_NotificationType(&mut self, out: *mut PushNotificationType) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_ToastNotification(&mut self, out: *mut *mut super::super::ui::notifications::ToastNotification) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_TileNotification(&mut self, out: *mut *mut super::super::ui::notifications::TileNotification) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_BadgeNotification(&mut self, out: *mut *mut super::super::ui::notifications::BadgeNotification) -> HRESULT, + fn get_RawNotification(&mut self, out: *mut *mut RawNotification) -> HRESULT + }} + impl IPushNotificationReceivedEventArgs { + #[inline] pub unsafe fn set_cancel(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Cancel)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cancel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Cancel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_notification_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NotificationType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_toast_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ToastNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_tile_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TileNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_badge_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BadgeNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_raw_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RawNotification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RawNotification: IRawNotification} + DEFINE_IID!(IID_IRawNotification, 438465153, 15225, 17068, 153, 99, 34, 171, 0, 212, 240, 183); + RT_INTERFACE!{interface IRawNotification(IRawNotificationVtbl): IInspectable(IInspectableVtbl) [IID_IRawNotification] { + fn get_Content(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IRawNotification { + #[inline] pub unsafe fn get_content(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPushNotificationChannelManagerStatics2 [CLSID_PushNotificationChannelManager]} + RT_ACTIVATABLE!{IPushNotificationChannelManagerStatics [CLSID_PushNotificationChannelManager]} + DEFINE_CLSID!(CLSID_PushNotificationChannelManager = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,80,117,115,104,78,111,116,105,102,105,99,97,116,105,111,110,115,46,80,117,115,104,78,111,116,105,102,105,99,97,116,105,111,110,67,104,97,110,110,101,108,77,97,110,97,103,101,114,0]); +} // Windows.Networking.PushNotifications +pub mod xboxlive { // Windows.Networking.XboxLive +use ::prelude::*; + RT_STRUCT! { struct XboxLiveSecureSocketsContract { + + }} + RT_ENUM! { enum XboxLiveNetworkAccessKind: i32 { + Open (XboxLiveNetworkAccessKind_Open) = 0, Moderate (XboxLiveNetworkAccessKind_Moderate) = 1, Strict (XboxLiveNetworkAccessKind_Strict) = 2, + }} + RT_ENUM! { enum XboxLiveSocketKind: i32 { + None (XboxLiveSocketKind_None) = 0, Datagram (XboxLiveSocketKind_Datagram) = 1, Stream (XboxLiveSocketKind_Stream) = 2, + }} + RT_ENUM! { enum XboxLiveEndpointPairCreationBehaviors: u32 { + None (XboxLiveEndpointPairCreationBehaviors_None) = 0, ReevaluatePath (XboxLiveEndpointPairCreationBehaviors_ReevaluatePath) = 1, + }} + RT_ENUM! { enum XboxLiveEndpointPairCreationStatus: i32 { + Succeeded (XboxLiveEndpointPairCreationStatus_Succeeded) = 0, NoLocalNetworks (XboxLiveEndpointPairCreationStatus_NoLocalNetworks) = 1, NoCompatibleNetworkPaths (XboxLiveEndpointPairCreationStatus_NoCompatibleNetworkPaths) = 2, LocalSystemNotAuthorized (XboxLiveEndpointPairCreationStatus_LocalSystemNotAuthorized) = 3, Canceled (XboxLiveEndpointPairCreationStatus_Canceled) = 4, TimedOut (XboxLiveEndpointPairCreationStatus_TimedOut) = 5, RemoteSystemNotAuthorized (XboxLiveEndpointPairCreationStatus_RemoteSystemNotAuthorized) = 6, RefusedDueToConfiguration (XboxLiveEndpointPairCreationStatus_RefusedDueToConfiguration) = 7, UnexpectedInternalError (XboxLiveEndpointPairCreationStatus_UnexpectedInternalError) = 8, + }} + RT_ENUM! { enum XboxLiveEndpointPairState: i32 { + Invalid (XboxLiveEndpointPairState_Invalid) = 0, CreatingOutbound (XboxLiveEndpointPairState_CreatingOutbound) = 1, CreatingInbound (XboxLiveEndpointPairState_CreatingInbound) = 2, Ready (XboxLiveEndpointPairState_Ready) = 3, DeletingLocally (XboxLiveEndpointPairState_DeletingLocally) = 4, RemoteEndpointTerminating (XboxLiveEndpointPairState_RemoteEndpointTerminating) = 5, Deleted (XboxLiveEndpointPairState_Deleted) = 6, + }} + RT_ENUM! { enum XboxLiveQualityOfServiceMetric: i32 { + AverageLatencyInMilliseconds (XboxLiveQualityOfServiceMetric_AverageLatencyInMilliseconds) = 0, MinLatencyInMilliseconds (XboxLiveQualityOfServiceMetric_MinLatencyInMilliseconds) = 1, MaxLatencyInMilliseconds (XboxLiveQualityOfServiceMetric_MaxLatencyInMilliseconds) = 2, AverageOutboundBitsPerSecond (XboxLiveQualityOfServiceMetric_AverageOutboundBitsPerSecond) = 3, MinOutboundBitsPerSecond (XboxLiveQualityOfServiceMetric_MinOutboundBitsPerSecond) = 4, MaxOutboundBitsPerSecond (XboxLiveQualityOfServiceMetric_MaxOutboundBitsPerSecond) = 5, AverageInboundBitsPerSecond (XboxLiveQualityOfServiceMetric_AverageInboundBitsPerSecond) = 6, MinInboundBitsPerSecond (XboxLiveQualityOfServiceMetric_MinInboundBitsPerSecond) = 7, MaxInboundBitsPerSecond (XboxLiveQualityOfServiceMetric_MaxInboundBitsPerSecond) = 8, + }} + RT_ENUM! { enum XboxLiveQualityOfServiceMeasurementStatus: i32 { + NotStarted (XboxLiveQualityOfServiceMeasurementStatus_NotStarted) = 0, InProgress (XboxLiveQualityOfServiceMeasurementStatus_InProgress) = 1, InProgressWithProvisionalResults (XboxLiveQualityOfServiceMeasurementStatus_InProgressWithProvisionalResults) = 2, Succeeded (XboxLiveQualityOfServiceMeasurementStatus_Succeeded) = 3, NoLocalNetworks (XboxLiveQualityOfServiceMeasurementStatus_NoLocalNetworks) = 4, NoCompatibleNetworkPaths (XboxLiveQualityOfServiceMeasurementStatus_NoCompatibleNetworkPaths) = 5, LocalSystemNotAuthorized (XboxLiveQualityOfServiceMeasurementStatus_LocalSystemNotAuthorized) = 6, Canceled (XboxLiveQualityOfServiceMeasurementStatus_Canceled) = 7, TimedOut (XboxLiveQualityOfServiceMeasurementStatus_TimedOut) = 8, RemoteSystemNotAuthorized (XboxLiveQualityOfServiceMeasurementStatus_RemoteSystemNotAuthorized) = 9, RefusedDueToConfiguration (XboxLiveQualityOfServiceMeasurementStatus_RefusedDueToConfiguration) = 10, UnexpectedInternalError (XboxLiveQualityOfServiceMeasurementStatus_UnexpectedInternalError) = 11, + }} + DEFINE_IID!(IID_IXboxLiveDeviceAddressStatics, 1498720281, 19065, 18737, 130, 124, 127, 80, 62, 150, 50, 99); + RT_INTERFACE!{static interface IXboxLiveDeviceAddressStatics(IXboxLiveDeviceAddressStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveDeviceAddressStatics] { + fn CreateFromSnapshotBase64(&mut self, base64: HSTRING, out: *mut *mut XboxLiveDeviceAddress) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFromSnapshotBuffer(&mut self, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut XboxLiveDeviceAddress) -> HRESULT, + fn CreateFromSnapshotBytes(&mut self, bufferSize: u32, buffer: *mut u8, out: *mut *mut XboxLiveDeviceAddress) -> HRESULT, + fn GetLocal(&mut self, out: *mut *mut XboxLiveDeviceAddress) -> HRESULT, + fn get_MaxSnapshotBytesSize(&mut self, out: *mut u32) -> HRESULT + }} + impl IXboxLiveDeviceAddressStatics { + #[inline] pub unsafe fn create_from_snapshot_base64(&mut self, base64: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromSnapshotBase64)(self, base64.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_snapshot_buffer(&mut self, buffer: &super::super::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromSnapshotBuffer)(self, buffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_snapshot_bytes(&mut self, buffer: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromSnapshotBytes)(self, buffer.len() as u32, buffer.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_local(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetLocal)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_snapshot_bytes_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxSnapshotBytesSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class XboxLiveDeviceAddress: IXboxLiveDeviceAddress} + RT_ACTIVATABLE!{IXboxLiveDeviceAddressStatics [CLSID_XboxLiveDeviceAddress]} + DEFINE_CLSID!(CLSID_XboxLiveDeviceAddress = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,88,98,111,120,76,105,118,101,46,88,98,111,120,76,105,118,101,68,101,118,105,99,101,65,100,100,114,101,115,115,0]); + DEFINE_IID!(IID_IXboxLiveDeviceAddress, 4122727033, 15494, 19287, 163, 26, 185, 70, 36, 8, 253, 1); + RT_INTERFACE!{interface IXboxLiveDeviceAddress(IXboxLiveDeviceAddressVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveDeviceAddress] { + fn add_SnapshotChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SnapshotChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetSnapshotAsBase64(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetSnapshotAsBuffer(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn GetSnapshotAsBytes(&mut self, bufferSize: u32, buffer: *mut u8, bytesWritten: *mut u32) -> HRESULT, + fn Compare(&mut self, otherDeviceAddress: *mut XboxLiveDeviceAddress, out: *mut i32) -> HRESULT, + fn get_IsValid(&mut self, out: *mut bool) -> HRESULT, + fn get_IsLocal(&mut self, out: *mut bool) -> HRESULT, + fn get_NetworkAccessKind(&mut self, out: *mut XboxLiveNetworkAccessKind) -> HRESULT + }} + impl IXboxLiveDeviceAddress { + #[inline] pub unsafe fn add_snapshot_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SnapshotChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_snapshot_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SnapshotChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_snapshot_as_base64(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSnapshotAsBase64)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_snapshot_as_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSnapshotAsBuffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_snapshot_as_bytes(&mut self, bufferSize: u32, buffer: *mut u8) -> Result { + let mut bytesWritten = zeroed(); + let hr = ((*self.lpVtbl).GetSnapshotAsBytes)(self, bufferSize, buffer, &mut bytesWritten); + if hr == S_OK { Ok(bytesWritten) } else { err(hr) } + } + #[inline] pub unsafe fn compare(&mut self, otherDeviceAddress: &XboxLiveDeviceAddress) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Compare)(self, otherDeviceAddress as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_valid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsValid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_local(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsLocal)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_access_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkAccessKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IXboxLiveInboundEndpointPairCreatedEventArgs, 3692575586, 8890, 18642, 128, 222, 194, 57, 104, 189, 25, 139); + RT_INTERFACE!{interface IXboxLiveInboundEndpointPairCreatedEventArgs(IXboxLiveInboundEndpointPairCreatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveInboundEndpointPairCreatedEventArgs] { + fn get_EndpointPair(&mut self, out: *mut *mut XboxLiveEndpointPair) -> HRESULT + }} + impl IXboxLiveInboundEndpointPairCreatedEventArgs { + #[inline] pub unsafe fn get_endpoint_pair(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EndpointPair)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class XboxLiveEndpointPair: IXboxLiveEndpointPair} + RT_ACTIVATABLE!{IXboxLiveEndpointPairStatics [CLSID_XboxLiveEndpointPair]} + DEFINE_CLSID!(CLSID_XboxLiveEndpointPair = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,88,98,111,120,76,105,118,101,46,88,98,111,120,76,105,118,101,69,110,100,112,111,105,110,116,80,97,105,114,0]); + DEFINE_IID!(IID_IXboxLiveEndpointPairCreationResult, 3651713941, 10923, 19742, 151, 148, 51, 236, 192, 220, 240, 254); + RT_INTERFACE!{interface IXboxLiveEndpointPairCreationResult(IXboxLiveEndpointPairCreationResultVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveEndpointPairCreationResult] { + fn get_DeviceAddress(&mut self, out: *mut *mut XboxLiveDeviceAddress) -> HRESULT, + fn get_Status(&mut self, out: *mut XboxLiveEndpointPairCreationStatus) -> HRESULT, + fn get_IsExistingPathEvaluation(&mut self, out: *mut bool) -> HRESULT, + fn get_EndpointPair(&mut self, out: *mut *mut XboxLiveEndpointPair) -> HRESULT + }} + impl IXboxLiveEndpointPairCreationResult { + #[inline] pub unsafe fn get_device_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_existing_path_evaluation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsExistingPathEvaluation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_endpoint_pair(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EndpointPair)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IXboxLiveEndpointPairTemplateStatics, 504566651, 29563, 18979, 188, 100, 8, 112, 247, 86, 85, 186); + RT_INTERFACE!{static interface IXboxLiveEndpointPairTemplateStatics(IXboxLiveEndpointPairTemplateStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveEndpointPairTemplateStatics] { + fn GetTemplateByName(&mut self, name: HSTRING, out: *mut *mut XboxLiveEndpointPairTemplate) -> HRESULT, + fn get_Templates(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IXboxLiveEndpointPairTemplateStatics { + #[inline] pub unsafe fn get_template_by_name(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTemplateByName)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_templates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Templates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class XboxLiveEndpointPairTemplate: IXboxLiveEndpointPairTemplate} + RT_ACTIVATABLE!{IXboxLiveEndpointPairTemplateStatics [CLSID_XboxLiveEndpointPairTemplate]} + DEFINE_CLSID!(CLSID_XboxLiveEndpointPairTemplate = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,88,98,111,120,76,105,118,101,46,88,98,111,120,76,105,118,101,69,110,100,112,111,105,110,116,80,97,105,114,84,101,109,112,108,97,116,101,0]); + DEFINE_IID!(IID_IXboxLiveEndpointPairTemplate, 1797811919, 13399, 16590, 185, 161, 192, 207, 224, 33, 62, 167); + RT_INTERFACE!{interface IXboxLiveEndpointPairTemplate(IXboxLiveEndpointPairTemplateVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveEndpointPairTemplate] { + fn add_InboundEndpointPairCreated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_InboundEndpointPairCreated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn CreateEndpointPairDefaultAsync(&mut self, deviceAddress: *mut XboxLiveDeviceAddress, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateEndpointPairWithBehaviorsAsync(&mut self, deviceAddress: *mut XboxLiveDeviceAddress, behaviors: XboxLiveEndpointPairCreationBehaviors, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateEndpointPairForPortsDefaultAsync(&mut self, deviceAddress: *mut XboxLiveDeviceAddress, initiatorPort: HSTRING, acceptorPort: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateEndpointPairForPortsWithBehaviorsAsync(&mut self, deviceAddress: *mut XboxLiveDeviceAddress, initiatorPort: HSTRING, acceptorPort: HSTRING, behaviors: XboxLiveEndpointPairCreationBehaviors, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SocketKind(&mut self, out: *mut XboxLiveSocketKind) -> HRESULT, + fn get_InitiatorBoundPortRangeLower(&mut self, out: *mut u16) -> HRESULT, + fn get_InitiatorBoundPortRangeUpper(&mut self, out: *mut u16) -> HRESULT, + fn get_AcceptorBoundPortRangeLower(&mut self, out: *mut u16) -> HRESULT, + fn get_AcceptorBoundPortRangeUpper(&mut self, out: *mut u16) -> HRESULT, + fn get_EndpointPairs(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IXboxLiveEndpointPairTemplate { + #[inline] pub unsafe fn add_inbound_endpoint_pair_created(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_InboundEndpointPairCreated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_inbound_endpoint_pair_created(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_InboundEndpointPairCreated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn create_endpoint_pair_default_async(&mut self, deviceAddress: &XboxLiveDeviceAddress) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateEndpointPairDefaultAsync)(self, deviceAddress as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_endpoint_pair_with_behaviors_async(&mut self, deviceAddress: &XboxLiveDeviceAddress, behaviors: XboxLiveEndpointPairCreationBehaviors) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateEndpointPairWithBehaviorsAsync)(self, deviceAddress as *const _ as *mut _, behaviors, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_endpoint_pair_for_ports_default_async(&mut self, deviceAddress: &XboxLiveDeviceAddress, initiatorPort: &HStringArg, acceptorPort: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateEndpointPairForPortsDefaultAsync)(self, deviceAddress as *const _ as *mut _, initiatorPort.get(), acceptorPort.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_endpoint_pair_for_ports_with_behaviors_async(&mut self, deviceAddress: &XboxLiveDeviceAddress, initiatorPort: &HStringArg, acceptorPort: &HStringArg, behaviors: XboxLiveEndpointPairCreationBehaviors) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateEndpointPairForPortsWithBehaviorsAsync)(self, deviceAddress as *const _ as *mut _, initiatorPort.get(), acceptorPort.get(), behaviors, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_socket_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SocketKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_initiator_bound_port_range_lower(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InitiatorBoundPortRangeLower)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_initiator_bound_port_range_upper(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InitiatorBoundPortRangeUpper)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_acceptor_bound_port_range_lower(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AcceptorBoundPortRangeLower)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_acceptor_bound_port_range_upper(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AcceptorBoundPortRangeUpper)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_endpoint_pairs(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EndpointPairs)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class XboxLiveInboundEndpointPairCreatedEventArgs: IXboxLiveInboundEndpointPairCreatedEventArgs} + RT_CLASS!{class XboxLiveEndpointPairCreationResult: IXboxLiveEndpointPairCreationResult} + DEFINE_IID!(IID_IXboxLiveEndpointPairStateChangedEventArgs, 1496202069, 56840, 17639, 172, 59, 185, 185, 161, 105, 88, 58); + RT_INTERFACE!{interface IXboxLiveEndpointPairStateChangedEventArgs(IXboxLiveEndpointPairStateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveEndpointPairStateChangedEventArgs] { + fn get_OldState(&mut self, out: *mut XboxLiveEndpointPairState) -> HRESULT, + fn get_NewState(&mut self, out: *mut XboxLiveEndpointPairState) -> HRESULT + }} + impl IXboxLiveEndpointPairStateChangedEventArgs { + #[inline] pub unsafe fn get_old_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OldState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IXboxLiveEndpointPairStatics, 1680960304, 8570, 16963, 142, 225, 103, 41, 40, 29, 39, 219); + RT_INTERFACE!{static interface IXboxLiveEndpointPairStatics(IXboxLiveEndpointPairStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveEndpointPairStatics] { + fn FindEndpointPairBySocketAddressBytes(&mut self, localSocketAddressSize: u32, localSocketAddress: *mut u8, remoteSocketAddressSize: u32, remoteSocketAddress: *mut u8, out: *mut *mut XboxLiveEndpointPair) -> HRESULT, + fn FindEndpointPairByHostNamesAndPorts(&mut self, localHostName: *mut super::HostName, localPort: HSTRING, remoteHostName: *mut super::HostName, remotePort: HSTRING, out: *mut *mut XboxLiveEndpointPair) -> HRESULT + }} + impl IXboxLiveEndpointPairStatics { + #[inline] pub unsafe fn find_endpoint_pair_by_socket_address_bytes(&mut self, localSocketAddress: &[u8], remoteSocketAddress: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindEndpointPairBySocketAddressBytes)(self, localSocketAddress.len() as u32, localSocketAddress.as_ptr() as *mut _, remoteSocketAddress.len() as u32, remoteSocketAddress.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_endpoint_pair_by_host_names_and_ports(&mut self, localHostName: &super::HostName, localPort: &HStringArg, remoteHostName: &super::HostName, remotePort: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindEndpointPairByHostNamesAndPorts)(self, localHostName as *const _ as *mut _, localPort.get(), remoteHostName as *const _ as *mut _, remotePort.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IXboxLiveEndpointPair, 513442715, 33086, 17632, 184, 127, 200, 122, 9, 52, 117, 228); + RT_INTERFACE!{interface IXboxLiveEndpointPair(IXboxLiveEndpointPairVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveEndpointPair] { + fn add_StateChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn DeleteAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetRemoteSocketAddressBytes(&mut self, socketAddressSize: u32, socketAddress: *mut u8) -> HRESULT, + fn GetLocalSocketAddressBytes(&mut self, socketAddressSize: u32, socketAddress: *mut u8) -> HRESULT, + fn get_State(&mut self, out: *mut XboxLiveEndpointPairState) -> HRESULT, + fn get_Template(&mut self, out: *mut *mut XboxLiveEndpointPairTemplate) -> HRESULT, + fn get_RemoteDeviceAddress(&mut self, out: *mut *mut XboxLiveDeviceAddress) -> HRESULT, + fn get_RemoteHostName(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn get_RemotePort(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LocalHostName(&mut self, out: *mut *mut super::HostName) -> HRESULT, + fn get_LocalPort(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IXboxLiveEndpointPair { + #[inline] pub unsafe fn add_state_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StateChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_state_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn delete_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_socket_address_bytes(&mut self, socketAddressSize: u32, socketAddress: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).GetRemoteSocketAddressBytes)(self, socketAddressSize, socketAddress); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_socket_address_bytes(&mut self, socketAddressSize: u32, socketAddress: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).GetLocalSocketAddressBytes)(self, socketAddressSize, socketAddress); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Template)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_device_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteDeviceAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_host_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteHostName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_port(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemotePort)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_host_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalHostName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_port(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalPort)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class XboxLiveEndpointPairStateChangedEventArgs: IXboxLiveEndpointPairStateChangedEventArgs} + DEFINE_IID!(IID_IXboxLiveQualityOfServiceMetricResult, 2934723537, 13665, 18306, 176, 207, 211, 174, 41, 217, 250, 135); + RT_INTERFACE!{interface IXboxLiveQualityOfServiceMetricResult(IXboxLiveQualityOfServiceMetricResultVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveQualityOfServiceMetricResult] { + fn get_Status(&mut self, out: *mut XboxLiveQualityOfServiceMeasurementStatus) -> HRESULT, + fn get_DeviceAddress(&mut self, out: *mut *mut XboxLiveDeviceAddress) -> HRESULT, + fn get_Metric(&mut self, out: *mut XboxLiveQualityOfServiceMetric) -> HRESULT, + fn get_Value(&mut self, out: *mut u64) -> HRESULT + }} + impl IXboxLiveQualityOfServiceMetricResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_metric(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Metric)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IXboxLiveQualityOfServicePrivatePayloadResult, 1516438190, 28472, 16832, 159, 204, 234, 108, 185, 120, 202, 252); + RT_INTERFACE!{interface IXboxLiveQualityOfServicePrivatePayloadResult(IXboxLiveQualityOfServicePrivatePayloadResultVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveQualityOfServicePrivatePayloadResult] { + fn get_Status(&mut self, out: *mut XboxLiveQualityOfServiceMeasurementStatus) -> HRESULT, + fn get_DeviceAddress(&mut self, out: *mut *mut XboxLiveDeviceAddress) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Value(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IXboxLiveQualityOfServicePrivatePayloadResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IXboxLiveQualityOfServiceMeasurementStatics, 1848978890, 9167, 17418, 176, 119, 94, 48, 133, 122, 130, 52); + RT_INTERFACE!{static interface IXboxLiveQualityOfServiceMeasurementStatics(IXboxLiveQualityOfServiceMeasurementStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveQualityOfServiceMeasurementStatics] { + fn PublishPrivatePayloadBytes(&mut self, payloadSize: u32, payload: *mut u8) -> HRESULT, + fn ClearPrivatePayload(&mut self) -> HRESULT, + fn get_MaxSimultaneousProbeConnections(&mut self, out: *mut u32) -> HRESULT, + fn put_MaxSimultaneousProbeConnections(&mut self, value: u32) -> HRESULT, + fn get_IsSystemOutboundBandwidthConstrained(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSystemOutboundBandwidthConstrained(&mut self, value: bool) -> HRESULT, + fn get_IsSystemInboundBandwidthConstrained(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSystemInboundBandwidthConstrained(&mut self, value: bool) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_PublishedPrivatePayload(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_PublishedPrivatePayload(&mut self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_MaxPrivatePayloadSize(&mut self, out: *mut u32) -> HRESULT + }} + impl IXboxLiveQualityOfServiceMeasurementStatics { + #[inline] pub unsafe fn publish_private_payload_bytes(&mut self, payload: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).PublishPrivatePayloadBytes)(self, payload.len() as u32, payload.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear_private_payload(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ClearPrivatePayload)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_simultaneous_probe_connections(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxSimultaneousProbeConnections)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_simultaneous_probe_connections(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxSimultaneousProbeConnections)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_system_outbound_bandwidth_constrained(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSystemOutboundBandwidthConstrained)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_system_outbound_bandwidth_constrained(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSystemOutboundBandwidthConstrained)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_system_inbound_bandwidth_constrained(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSystemInboundBandwidthConstrained)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_system_inbound_bandwidth_constrained(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSystemInboundBandwidthConstrained)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_published_private_payload(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PublishedPrivatePayload)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_published_private_payload(&mut self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_PublishedPrivatePayload)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_private_payload_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPrivatePayloadSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IXboxLiveQualityOfServiceMeasurement, 1298672590, 42454, 18406, 162, 54, 207, 222, 95, 189, 242, 237); + RT_INTERFACE!{interface IXboxLiveQualityOfServiceMeasurement(IXboxLiveQualityOfServiceMeasurementVtbl): IInspectable(IInspectableVtbl) [IID_IXboxLiveQualityOfServiceMeasurement] { + fn MeasureAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetMetricResultsForDevice(&mut self, deviceAddress: *mut XboxLiveDeviceAddress, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetMetricResultsForMetric(&mut self, metric: XboxLiveQualityOfServiceMetric, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetMetricResult(&mut self, deviceAddress: *mut XboxLiveDeviceAddress, metric: XboxLiveQualityOfServiceMetric, out: *mut *mut XboxLiveQualityOfServiceMetricResult) -> HRESULT, + fn GetPrivatePayloadResult(&mut self, deviceAddress: *mut XboxLiveDeviceAddress, out: *mut *mut XboxLiveQualityOfServicePrivatePayloadResult) -> HRESULT, + fn get_Metrics(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_DeviceAddresses(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ShouldRequestPrivatePayloads(&mut self, out: *mut bool) -> HRESULT, + fn put_ShouldRequestPrivatePayloads(&mut self, value: bool) -> HRESULT, + fn get_TimeoutInMilliseconds(&mut self, out: *mut u32) -> HRESULT, + fn put_TimeoutInMilliseconds(&mut self, value: u32) -> HRESULT, + fn get_NumberOfProbesToAttempt(&mut self, out: *mut u32) -> HRESULT, + fn put_NumberOfProbesToAttempt(&mut self, value: u32) -> HRESULT, + fn get_NumberOfResultsPending(&mut self, out: *mut u32) -> HRESULT, + fn get_MetricResults(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_PrivatePayloadResults(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IXboxLiveQualityOfServiceMeasurement { + #[inline] pub unsafe fn measure_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MeasureAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_metric_results_for_device(&mut self, deviceAddress: &XboxLiveDeviceAddress) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMetricResultsForDevice)(self, deviceAddress as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_metric_results_for_metric(&mut self, metric: XboxLiveQualityOfServiceMetric) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMetricResultsForMetric)(self, metric, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_metric_result(&mut self, deviceAddress: &XboxLiveDeviceAddress, metric: XboxLiveQualityOfServiceMetric) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMetricResult)(self, deviceAddress as *const _ as *mut _, metric, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_private_payload_result(&mut self, deviceAddress: &XboxLiveDeviceAddress) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPrivatePayloadResult)(self, deviceAddress as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_metrics(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Metrics)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_addresses(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceAddresses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_should_request_private_payloads(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShouldRequestPrivatePayloads)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_should_request_private_payloads(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShouldRequestPrivatePayloads)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_timeout_in_milliseconds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeoutInMilliseconds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_timeout_in_milliseconds(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TimeoutInMilliseconds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_probes_to_attempt(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfProbesToAttempt)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_number_of_probes_to_attempt(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_NumberOfProbesToAttempt)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_number_of_results_pending(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NumberOfResultsPending)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_metric_results(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MetricResults)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_private_payload_results(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrivatePayloadResults)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class XboxLiveQualityOfServiceMetricResult: IXboxLiveQualityOfServiceMetricResult} + RT_CLASS!{class XboxLiveQualityOfServicePrivatePayloadResult: IXboxLiveQualityOfServicePrivatePayloadResult} + RT_CLASS!{class XboxLiveQualityOfServiceMeasurement: IXboxLiveQualityOfServiceMeasurement} + RT_ACTIVATABLE!{IXboxLiveQualityOfServiceMeasurementStatics [CLSID_XboxLiveQualityOfServiceMeasurement]} + DEFINE_CLSID!(CLSID_XboxLiveQualityOfServiceMeasurement = &[87,105,110,100,111,119,115,46,78,101,116,119,111,114,107,105,110,103,46,88,98,111,120,76,105,118,101,46,88,98,111,120,76,105,118,101,81,117,97,108,105,116,121,79,102,83,101,114,118,105,99,101,77,101,97,115,117,114,101,109,101,110,116,0]); +} // Windows.Networking.XboxLive +} // Windows.Networking +#[cfg(feature="windows.perception")] +pub mod perception { // Windows.Perception +use ::prelude::*; + DEFINE_IID!(IID_IPerceptionTimestamp, 2277656580, 41518, 19163, 186, 38, 215, 142, 246, 57, 188, 244); + RT_INTERFACE!{interface IPerceptionTimestamp(IPerceptionTimestampVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionTimestamp] { + fn get_TargetTime(&mut self, out: *mut super::foundation::DateTime) -> HRESULT, + fn get_PredictionAmount(&mut self, out: *mut super::foundation::TimeSpan) -> HRESULT + }} + impl IPerceptionTimestamp { + #[inline] pub unsafe fn get_target_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TargetTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_prediction_amount(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PredictionAmount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PerceptionTimestamp: IPerceptionTimestamp} + DEFINE_IID!(IID_IPerceptionTimestampHelperStatics, 1202065876, 43487, 20188, 133, 93, 244, 211, 57, 217, 103, 172); + RT_INTERFACE!{static interface IPerceptionTimestampHelperStatics(IPerceptionTimestampHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionTimestampHelperStatics] { + fn FromHistoricalTargetTime(&mut self, targetTime: super::foundation::DateTime, out: *mut *mut PerceptionTimestamp) -> HRESULT + }} + impl IPerceptionTimestampHelperStatics { + #[inline] pub unsafe fn from_historical_target_time(&mut self, targetTime: super::foundation::DateTime) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromHistoricalTargetTime)(self, targetTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPerceptionTimestampHelperStatics [CLSID_PerceptionTimestampHelper]} + DEFINE_CLSID!(CLSID_PerceptionTimestampHelper = &[87,105,110,100,111,119,115,46,80,101,114,99,101,112,116,105,111,110,46,80,101,114,99,101,112,116,105,111,110,84,105,109,101,115,116,97,109,112,72,101,108,112,101,114,0]); +pub mod spatial { // Windows.Perception.Spatial +use ::prelude::*; + DEFINE_IID!(IID_ISpatialCoordinateSystem, 1777060427, 24739, 13702, 166, 83, 89, 167, 189, 103, 109, 7); + RT_INTERFACE!{interface ISpatialCoordinateSystem(ISpatialCoordinateSystemVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialCoordinateSystem] { + fn TryGetTransformTo(&mut self, target: *mut SpatialCoordinateSystem, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl ISpatialCoordinateSystem { + #[inline] pub unsafe fn try_get_transform_to(&mut self, target: &SpatialCoordinateSystem) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetTransformTo)(self, target as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialCoordinateSystem: ISpatialCoordinateSystem} + RT_ENUM! { enum SpatialPerceptionAccessStatus: i32 { + Unspecified (SpatialPerceptionAccessStatus_Unspecified) = 0, Allowed (SpatialPerceptionAccessStatus_Allowed) = 1, DeniedByUser (SpatialPerceptionAccessStatus_DeniedByUser) = 2, DeniedBySystem (SpatialPerceptionAccessStatus_DeniedBySystem) = 3, + }} + RT_ENUM! { enum SpatialLocatability: i32 { + Unavailable (SpatialLocatability_Unavailable) = 0, OrientationOnly (SpatialLocatability_OrientationOnly) = 1, PositionalTrackingActivating (SpatialLocatability_PositionalTrackingActivating) = 2, PositionalTrackingActive (SpatialLocatability_PositionalTrackingActive) = 3, PositionalTrackingInhibited (SpatialLocatability_PositionalTrackingInhibited) = 4, + }} + DEFINE_IID!(IID_ISpatialAnchorRawCoordinateSystemAdjustedEventArgs, 2716343992, 22215, 12567, 162, 228, 129, 224, 252, 242, 142, 0); + RT_INTERFACE!{interface ISpatialAnchorRawCoordinateSystemAdjustedEventArgs(ISpatialAnchorRawCoordinateSystemAdjustedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialAnchorRawCoordinateSystemAdjustedEventArgs] { + fn get_OldRawCoordinateSystemToNewRawCoordinateSystemTransform(&mut self, out: *mut super::super::foundation::numerics::Matrix4x4) -> HRESULT + }} + impl ISpatialAnchorRawCoordinateSystemAdjustedEventArgs { + #[inline] pub unsafe fn get_old_raw_coordinate_system_to_new_raw_coordinate_system_transform(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OldRawCoordinateSystemToNewRawCoordinateSystemTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialAnchor, 86631886, 7476, 14082, 188, 236, 234, 191, 245, 120, 168, 105); + RT_INTERFACE!{interface ISpatialAnchor(ISpatialAnchorVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialAnchor] { + fn get_CoordinateSystem(&mut self, out: *mut *mut SpatialCoordinateSystem) -> HRESULT, + fn get_RawCoordinateSystem(&mut self, out: *mut *mut SpatialCoordinateSystem) -> HRESULT, + fn add_RawCoordinateSystemAdjusted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RawCoordinateSystemAdjusted(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISpatialAnchor { + #[inline] pub unsafe fn get_coordinate_system(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CoordinateSystem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_raw_coordinate_system(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RawCoordinateSystem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_raw_coordinate_system_adjusted(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RawCoordinateSystemAdjusted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_raw_coordinate_system_adjusted(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RawCoordinateSystemAdjusted)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SpatialAnchor: ISpatialAnchor} + RT_ACTIVATABLE!{ISpatialAnchorStatics [CLSID_SpatialAnchor]} + DEFINE_CLSID!(CLSID_SpatialAnchor = &[87,105,110,100,111,119,115,46,80,101,114,99,101,112,116,105,111,110,46,83,112,97,116,105,97,108,46,83,112,97,116,105,97,108,65,110,99,104,111,114,0]); + RT_CLASS!{class SpatialAnchorRawCoordinateSystemAdjustedEventArgs: ISpatialAnchorRawCoordinateSystemAdjustedEventArgs} + DEFINE_IID!(IID_ISpatialAnchor2, 3977758984, 42645, 19702, 146, 253, 151, 38, 59, 167, 16, 71); + RT_INTERFACE!{interface ISpatialAnchor2(ISpatialAnchor2Vtbl): IInspectable(IInspectableVtbl) [IID_ISpatialAnchor2] { + fn get_RemovedByUser(&mut self, out: *mut bool) -> HRESULT + }} + impl ISpatialAnchor2 { + #[inline] pub unsafe fn get_removed_by_user(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RemovedByUser)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialAnchorStatics, 2844952130, 372, 12572, 174, 121, 14, 81, 7, 102, 159, 22); + RT_INTERFACE!{static interface ISpatialAnchorStatics(ISpatialAnchorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialAnchorStatics] { + fn TryCreateRelativeTo(&mut self, coordinateSystem: *mut SpatialCoordinateSystem, out: *mut *mut SpatialAnchor) -> HRESULT, + fn TryCreateWithPositionRelativeTo(&mut self, coordinateSystem: *mut SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, out: *mut *mut SpatialAnchor) -> HRESULT, + fn TryCreateWithPositionAndOrientationRelativeTo(&mut self, coordinateSystem: *mut SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, orientation: super::super::foundation::numerics::Quaternion, out: *mut *mut SpatialAnchor) -> HRESULT + }} + impl ISpatialAnchorStatics { + #[inline] pub unsafe fn try_create_relative_to(&mut self, coordinateSystem: &SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryCreateRelativeTo)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_create_with_position_relative_to(&mut self, coordinateSystem: &SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryCreateWithPositionRelativeTo)(self, coordinateSystem as *const _ as *mut _, position, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_create_with_position_and_orientation_relative_to(&mut self, coordinateSystem: &SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, orientation: super::super::foundation::numerics::Quaternion) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryCreateWithPositionAndOrientationRelativeTo)(self, coordinateSystem as *const _ as *mut _, position, orientation, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialAnchorStore, 2965124662, 18538, 15536, 158, 111, 18, 69, 22, 92, 77, 182); + RT_INTERFACE!{interface ISpatialAnchorStore(ISpatialAnchorStoreVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialAnchorStore] { + fn GetAllSavedAnchors(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn TrySave(&mut self, id: HSTRING, anchor: *mut SpatialAnchor, out: *mut bool) -> HRESULT, + fn Remove(&mut self, id: HSTRING) -> HRESULT, + fn Clear(&mut self) -> HRESULT + }} + impl ISpatialAnchorStore { + #[inline] pub unsafe fn get_all_saved_anchors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAllSavedAnchors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_save(&mut self, id: &HStringArg, anchor: &SpatialAnchor) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySave)(self, id.get(), anchor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove(&mut self, id: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).Remove)(self, id.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialAnchorManagerStatics, 2296581803, 62391, 16907, 176, 134, 138, 128, 192, 125, 145, 13); + RT_INTERFACE!{static interface ISpatialAnchorManagerStatics(ISpatialAnchorManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialAnchorManagerStatics] { + fn RequestStoreAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISpatialAnchorManagerStatics { + #[inline] pub unsafe fn request_store_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStoreAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialAnchorStore: ISpatialAnchorStore} + DEFINE_IID!(IID_ISpatialAnchorTransferManagerStatics, 62650809, 4824, 19406, 136, 53, 197, 223, 58, 192, 173, 171); + RT_INTERFACE!{static interface ISpatialAnchorTransferManagerStatics(ISpatialAnchorTransferManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialAnchorTransferManagerStatics] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn TryImportAnchorsAsync(&mut self, stream: *mut super::super::storage::streams::IInputStream, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn TryExportAnchorsAsync(&mut self, anchors: *mut super::super::foundation::collections::IIterable>, stream: *mut super::super::storage::streams::IOutputStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISpatialAnchorTransferManagerStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn try_import_anchors_async(&mut self, stream: &super::super::storage::streams::IInputStream) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryImportAnchorsAsync)(self, stream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn try_export_anchors_async(&mut self, anchors: &super::super::foundation::collections::IIterable>, stream: &super::super::storage::streams::IOutputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryExportAnchorsAsync)(self, anchors as *const _ as *mut _, stream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialLocatorPositionalTrackingDeactivatingEventArgs, 3098034275, 58356, 13963, 144, 97, 158, 169, 209, 214, 204, 22); + RT_INTERFACE!{interface ISpatialLocatorPositionalTrackingDeactivatingEventArgs(ISpatialLocatorPositionalTrackingDeactivatingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialLocatorPositionalTrackingDeactivatingEventArgs] { + fn get_Canceled(&mut self, out: *mut bool) -> HRESULT, + fn put_Canceled(&mut self, value: bool) -> HRESULT + }} + impl ISpatialLocatorPositionalTrackingDeactivatingEventArgs { + #[inline] pub unsafe fn get_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Canceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_canceled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Canceled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialLocatorAttachedFrameOfReference, 3782692598, 8015, 18844, 150, 37, 239, 94, 110, 215, 160, 72); + RT_INTERFACE!{interface ISpatialLocatorAttachedFrameOfReference(ISpatialLocatorAttachedFrameOfReferenceVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialLocatorAttachedFrameOfReference] { + fn get_RelativePosition(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_RelativePosition(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_RelativeOrientation(&mut self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT, + fn put_RelativeOrientation(&mut self, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn AdjustHeading(&mut self, headingOffsetInRadians: f64) -> HRESULT, + fn GetStationaryCoordinateSystemAtTimestamp(&mut self, timestamp: *mut super::PerceptionTimestamp, out: *mut *mut SpatialCoordinateSystem) -> HRESULT, + fn TryGetRelativeHeadingAtTimestamp(&mut self, timestamp: *mut super::PerceptionTimestamp, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl ISpatialLocatorAttachedFrameOfReference { + #[inline] pub unsafe fn get_relative_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RelativePosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_relative_position(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_RelativePosition)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_relative_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RelativeOrientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_relative_orientation(&mut self, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + let hr = ((*self.lpVtbl).put_RelativeOrientation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn adjust_heading(&mut self, headingOffsetInRadians: f64) -> Result<()> { + let hr = ((*self.lpVtbl).AdjustHeading)(self, headingOffsetInRadians); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stationary_coordinate_system_at_timestamp(&mut self, timestamp: &super::PerceptionTimestamp) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStationaryCoordinateSystemAtTimestamp)(self, timestamp as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_relative_heading_at_timestamp(&mut self, timestamp: &super::PerceptionTimestamp) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetRelativeHeadingAtTimestamp)(self, timestamp as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialStationaryFrameOfReference, 165399737, 48376, 15999, 190, 126, 126, 220, 203, 177, 120, 168); + RT_INTERFACE!{interface ISpatialStationaryFrameOfReference(ISpatialStationaryFrameOfReferenceVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialStationaryFrameOfReference] { + fn get_CoordinateSystem(&mut self, out: *mut *mut SpatialCoordinateSystem) -> HRESULT + }} + impl ISpatialStationaryFrameOfReference { + #[inline] pub unsafe fn get_coordinate_system(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CoordinateSystem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialLocation, 495047325, 9377, 14293, 143, 161, 57, 180, 249, 173, 103, 226); + RT_INTERFACE!{interface ISpatialLocation(ISpatialLocationVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialLocation] { + fn get_Position(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Orientation(&mut self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT, + fn get_AbsoluteLinearVelocity(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_AbsoluteLinearAcceleration(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_AbsoluteAngularVelocity(&mut self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT, + fn get_AbsoluteAngularAcceleration(&mut self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT + }} + impl ISpatialLocation { + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_absolute_linear_velocity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AbsoluteLinearVelocity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_absolute_linear_acceleration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AbsoluteLinearAcceleration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_absolute_angular_velocity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AbsoluteAngularVelocity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_absolute_angular_acceleration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AbsoluteAngularAcceleration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialLocator, 4131883301, 40460, 15286, 153, 126, 182, 78, 204, 162, 76, 244); + RT_INTERFACE!{interface ISpatialLocator(ISpatialLocatorVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialLocator] { + fn get_Locatability(&mut self, out: *mut SpatialLocatability) -> HRESULT, + fn add_LocatabilityChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LocatabilityChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PositionalTrackingDeactivating(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PositionalTrackingDeactivating(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn TryLocateAtTimestamp(&mut self, timestamp: *mut super::PerceptionTimestamp, coordinateSystem: *mut SpatialCoordinateSystem, out: *mut *mut SpatialLocation) -> HRESULT, + fn CreateAttachedFrameOfReferenceAtCurrentHeading(&mut self, out: *mut *mut SpatialLocatorAttachedFrameOfReference) -> HRESULT, + fn CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition(&mut self, relativePosition: super::super::foundation::numerics::Vector3, out: *mut *mut SpatialLocatorAttachedFrameOfReference) -> HRESULT, + fn CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation(&mut self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, out: *mut *mut SpatialLocatorAttachedFrameOfReference) -> HRESULT, + fn CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading(&mut self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, relativeHeadingInRadians: f64, out: *mut *mut SpatialLocatorAttachedFrameOfReference) -> HRESULT, + fn CreateStationaryFrameOfReferenceAtCurrentLocation(&mut self, out: *mut *mut SpatialStationaryFrameOfReference) -> HRESULT, + fn CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition(&mut self, relativePosition: super::super::foundation::numerics::Vector3, out: *mut *mut SpatialStationaryFrameOfReference) -> HRESULT, + fn CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation(&mut self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, out: *mut *mut SpatialStationaryFrameOfReference) -> HRESULT, + fn CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading(&mut self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, relativeHeadingInRadians: f64, out: *mut *mut SpatialStationaryFrameOfReference) -> HRESULT + }} + impl ISpatialLocator { + #[inline] pub unsafe fn get_locatability(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Locatability)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_locatability_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LocatabilityChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_locatability_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LocatabilityChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_positional_tracking_deactivating(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PositionalTrackingDeactivating)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_positional_tracking_deactivating(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PositionalTrackingDeactivating)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_locate_at_timestamp(&mut self, timestamp: &super::PerceptionTimestamp, coordinateSystem: &SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryLocateAtTimestamp)(self, timestamp as *const _ as *mut _, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_attached_frame_of_reference_at_current_heading(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAttachedFrameOfReferenceAtCurrentHeading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_attached_frame_of_reference_at_current_heading_with_position(&mut self, relativePosition: super::super::foundation::numerics::Vector3) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition)(self, relativePosition, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_attached_frame_of_reference_at_current_heading_with_position_and_orientation(&mut self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation)(self, relativePosition, relativeOrientation, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_attached_frame_of_reference_at_current_heading_with_position_and_orientation_and_relative_heading(&mut self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, relativeHeadingInRadians: f64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading)(self, relativePosition, relativeOrientation, relativeHeadingInRadians, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_stationary_frame_of_reference_at_current_location(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStationaryFrameOfReferenceAtCurrentLocation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_stationary_frame_of_reference_at_current_location_with_position(&mut self, relativePosition: super::super::foundation::numerics::Vector3) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition)(self, relativePosition, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_stationary_frame_of_reference_at_current_location_with_position_and_orientation(&mut self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation)(self, relativePosition, relativeOrientation, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_stationary_frame_of_reference_at_current_location_with_position_and_orientation_and_relative_heading(&mut self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, relativeHeadingInRadians: f64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading)(self, relativePosition, relativeOrientation, relativeHeadingInRadians, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialLocator: ISpatialLocator} + RT_ACTIVATABLE!{ISpatialLocatorStatics [CLSID_SpatialLocator]} + DEFINE_CLSID!(CLSID_SpatialLocator = &[87,105,110,100,111,119,115,46,80,101,114,99,101,112,116,105,111,110,46,83,112,97,116,105,97,108,46,83,112,97,116,105,97,108,76,111,99,97,116,111,114,0]); + RT_CLASS!{class SpatialLocatorPositionalTrackingDeactivatingEventArgs: ISpatialLocatorPositionalTrackingDeactivatingEventArgs} + RT_CLASS!{class SpatialLocation: ISpatialLocation} + RT_CLASS!{class SpatialLocatorAttachedFrameOfReference: ISpatialLocatorAttachedFrameOfReference} + RT_CLASS!{class SpatialStationaryFrameOfReference: ISpatialStationaryFrameOfReference} + DEFINE_IID!(IID_ISpatialLocatorStatics, 3077452608, 42946, 13851, 187, 130, 86, 233, 59, 137, 177, 187); + RT_INTERFACE!{static interface ISpatialLocatorStatics(ISpatialLocatorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialLocatorStatics] { + fn GetDefault(&mut self, out: *mut *mut SpatialLocator) -> HRESULT + }} + impl ISpatialLocatorStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ISpatialAnchorManagerStatics [CLSID_SpatialAnchorManager]} + DEFINE_CLSID!(CLSID_SpatialAnchorManager = &[87,105,110,100,111,119,115,46,80,101,114,99,101,112,116,105,111,110,46,83,112,97,116,105,97,108,46,83,112,97,116,105,97,108,65,110,99,104,111,114,77,97,110,97,103,101,114,0]); + RT_ACTIVATABLE!{ISpatialAnchorTransferManagerStatics [CLSID_SpatialAnchorTransferManager]} + DEFINE_CLSID!(CLSID_SpatialAnchorTransferManager = &[87,105,110,100,111,119,115,46,80,101,114,99,101,112,116,105,111,110,46,83,112,97,116,105,97,108,46,83,112,97,116,105,97,108,65,110,99,104,111,114,84,114,97,110,115,102,101,114,77,97,110,97,103,101,114,0]); + RT_STRUCT! { struct SpatialBoundingFrustum { + Near: super::super::foundation::numerics::Plane, Far: super::super::foundation::numerics::Plane, Right: super::super::foundation::numerics::Plane, Left: super::super::foundation::numerics::Plane, Top: super::super::foundation::numerics::Plane, Bottom: super::super::foundation::numerics::Plane, + }} + RT_STRUCT! { struct SpatialBoundingBox { + Center: super::super::foundation::numerics::Vector3, Extents: super::super::foundation::numerics::Vector3, + }} + RT_STRUCT! { struct SpatialBoundingOrientedBox { + Center: super::super::foundation::numerics::Vector3, Extents: super::super::foundation::numerics::Vector3, Orientation: super::super::foundation::numerics::Quaternion, + }} + RT_STRUCT! { struct SpatialBoundingSphere { + Center: super::super::foundation::numerics::Vector3, Radius: f32, + }} + DEFINE_IID!(IID_ISpatialBoundingVolume, 4213204442, 26819, 13279, 183, 175, 76, 120, 114, 7, 153, 156); + RT_INTERFACE!{interface ISpatialBoundingVolume(ISpatialBoundingVolumeVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialBoundingVolume] { + + }} + DEFINE_IID!(IID_ISpatialBoundingVolumeStatics, 92836119, 46049, 14040, 176, 23, 86, 97, 129, 165, 177, 150); + RT_INTERFACE!{static interface ISpatialBoundingVolumeStatics(ISpatialBoundingVolumeStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialBoundingVolumeStatics] { + fn FromBox(&mut self, coordinateSystem: *mut SpatialCoordinateSystem, box_: SpatialBoundingBox, out: *mut *mut SpatialBoundingVolume) -> HRESULT, + fn FromOrientedBox(&mut self, coordinateSystem: *mut SpatialCoordinateSystem, box_: SpatialBoundingOrientedBox, out: *mut *mut SpatialBoundingVolume) -> HRESULT, + fn FromSphere(&mut self, coordinateSystem: *mut SpatialCoordinateSystem, sphere: SpatialBoundingSphere, out: *mut *mut SpatialBoundingVolume) -> HRESULT, + fn FromFrustum(&mut self, coordinateSystem: *mut SpatialCoordinateSystem, frustum: SpatialBoundingFrustum, out: *mut *mut SpatialBoundingVolume) -> HRESULT + }} + impl ISpatialBoundingVolumeStatics { + #[inline] pub unsafe fn from_box(&mut self, coordinateSystem: &SpatialCoordinateSystem, box_: SpatialBoundingBox) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromBox)(self, coordinateSystem as *const _ as *mut _, box_, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_oriented_box(&mut self, coordinateSystem: &SpatialCoordinateSystem, box_: SpatialBoundingOrientedBox) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromOrientedBox)(self, coordinateSystem as *const _ as *mut _, box_, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_sphere(&mut self, coordinateSystem: &SpatialCoordinateSystem, sphere: SpatialBoundingSphere) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromSphere)(self, coordinateSystem as *const _ as *mut _, sphere, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn from_frustum(&mut self, coordinateSystem: &SpatialCoordinateSystem, frustum: SpatialBoundingFrustum) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromFrustum)(self, coordinateSystem as *const _ as *mut _, frustum, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialBoundingVolume: ISpatialBoundingVolume} + RT_ACTIVATABLE!{ISpatialBoundingVolumeStatics [CLSID_SpatialBoundingVolume]} + DEFINE_CLSID!(CLSID_SpatialBoundingVolume = &[87,105,110,100,111,119,115,46,80,101,114,99,101,112,116,105,111,110,46,83,112,97,116,105,97,108,46,83,112,97,116,105,97,108,66,111,117,110,100,105,110,103,86,111,108,117,109,101,0]); +pub mod surfaces { // Windows.Perception.Spatial.Surfaces +use ::prelude::*; + DEFINE_IID!(IID_ISpatialSurfaceMeshBuffer, 2479839712, 34591, 13304, 152, 178, 3, 209, 1, 69, 143, 111); + RT_INTERFACE!{interface ISpatialSurfaceMeshBuffer(ISpatialSurfaceMeshBufferVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialSurfaceMeshBuffer] { + #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_Format(&mut self, out: *mut ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> HRESULT, + fn get_Stride(&mut self, out: *mut u32) -> HRESULT, + fn get_ElementCount(&mut self, out: *mut u32) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Data(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl ISpatialSurfaceMeshBuffer { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_format(&mut self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Format)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_stride(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Stride)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_element_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ElementCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialSurfaceMesh, 277829593, 57101, 14672, 160, 253, 249, 114, 199, 124, 39, 180); + RT_INTERFACE!{interface ISpatialSurfaceMesh(ISpatialSurfaceMeshVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialSurfaceMesh] { + fn get_SurfaceInfo(&mut self, out: *mut *mut SpatialSurfaceInfo) -> HRESULT, + fn get_CoordinateSystem(&mut self, out: *mut *mut super::SpatialCoordinateSystem) -> HRESULT, + fn get_TriangleIndices(&mut self, out: *mut *mut SpatialSurfaceMeshBuffer) -> HRESULT, + fn get_VertexPositions(&mut self, out: *mut *mut SpatialSurfaceMeshBuffer) -> HRESULT, + fn get_VertexPositionScale(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_VertexNormals(&mut self, out: *mut *mut SpatialSurfaceMeshBuffer) -> HRESULT + }} + impl ISpatialSurfaceMesh { + #[inline] pub unsafe fn get_surface_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SurfaceInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_coordinate_system(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CoordinateSystem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_triangle_indices(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TriangleIndices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertex_positions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VertexPositions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertex_position_scale(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VertexPositionScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertex_normals(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VertexNormals)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialSurfaceInfo: ISpatialSurfaceInfo} + RT_CLASS!{class SpatialSurfaceMeshBuffer: ISpatialSurfaceMeshBuffer} + DEFINE_IID!(IID_ISpatialSurfaceMeshOptionsStatics, 2603879103, 38785, 17669, 137, 53, 1, 53, 117, 202, 174, 94); + RT_INTERFACE!{static interface ISpatialSurfaceMeshOptionsStatics(ISpatialSurfaceMeshOptionsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialSurfaceMeshOptionsStatics] { + #[cfg(feature="windows.graphics")] fn get_SupportedVertexPositionFormats(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::graphics::directx::DirectXPixelFormat>) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_SupportedTriangleIndexFormats(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::graphics::directx::DirectXPixelFormat>) -> HRESULT, + #[cfg(feature="windows.graphics")] fn get_SupportedVertexNormalFormats(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::graphics::directx::DirectXPixelFormat>) -> HRESULT + }} + impl ISpatialSurfaceMeshOptionsStatics { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_supported_vertex_position_formats(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedVertexPositionFormats)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_supported_triangle_index_formats(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedTriangleIndexFormats)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_supported_vertex_normal_formats(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedVertexNormalFormats)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialSurfaceMeshOptions, 3530923913, 13682, 15661, 161, 13, 95, 238, 147, 148, 170, 55); + RT_INTERFACE!{interface ISpatialSurfaceMeshOptions(ISpatialSurfaceMeshOptionsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialSurfaceMeshOptions] { + #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_VertexPositionFormat(&mut self, out: *mut ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn put_VertexPositionFormat(&mut self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_TriangleIndexFormat(&mut self, out: *mut ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn put_TriangleIndexFormat(&mut self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_VertexNormalFormat(&mut self, out: *mut ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn put_VertexNormalFormat(&mut self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> HRESULT, + fn get_IncludeVertexNormals(&mut self, out: *mut bool) -> HRESULT, + fn put_IncludeVertexNormals(&mut self, value: bool) -> HRESULT + }} + impl ISpatialSurfaceMeshOptions { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_vertex_position_format(&mut self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VertexPositionFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_vertex_position_format(&mut self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_VertexPositionFormat)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_triangle_index_format(&mut self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TriangleIndexFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_triangle_index_format(&mut self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_TriangleIndexFormat)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_vertex_normal_format(&mut self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VertexNormalFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_vertex_normal_format(&mut self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_VertexNormalFormat)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_include_vertex_normals(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncludeVertexNormals)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_include_vertex_normals(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IncludeVertexNormals)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialSurfaceInfo, 4176079847, 14775, 14690, 187, 3, 87, 245, 110, 31, 176, 161); + RT_INTERFACE!{interface ISpatialSurfaceInfo(ISpatialSurfaceInfoVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialSurfaceInfo] { + fn get_Id(&mut self, out: *mut Guid) -> HRESULT, + fn get_UpdateTime(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn TryGetBounds(&mut self, coordinateSystem: *mut super::SpatialCoordinateSystem, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn TryComputeLatestMeshAsync(&mut self, maxTrianglesPerCubicMeter: f64, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn TryComputeLatestMeshWithOptionsAsync(&mut self, maxTrianglesPerCubicMeter: f64, options: *mut SpatialSurfaceMeshOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl ISpatialSurfaceInfo { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_update_time(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UpdateTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_bounds(&mut self, coordinateSystem: &super::SpatialCoordinateSystem) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetBounds)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_compute_latest_mesh_async(&mut self, maxTrianglesPerCubicMeter: f64) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryComputeLatestMeshAsync)(self, maxTrianglesPerCubicMeter, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_compute_latest_mesh_with_options_async(&mut self, maxTrianglesPerCubicMeter: f64, options: &SpatialSurfaceMeshOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryComputeLatestMeshWithOptionsAsync)(self, maxTrianglesPerCubicMeter, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialSurfaceMesh: ISpatialSurfaceMesh} + RT_CLASS!{class SpatialSurfaceMeshOptions: ISpatialSurfaceMeshOptions} + RT_ACTIVATABLE!{ISpatialSurfaceMeshOptionsStatics [CLSID_SpatialSurfaceMeshOptions]} + DEFINE_CLSID!(CLSID_SpatialSurfaceMeshOptions = &[87,105,110,100,111,119,115,46,80,101,114,99,101,112,116,105,111,110,46,83,112,97,116,105,97,108,46,83,117,114,102,97,99,101,115,46,83,112,97,116,105,97,108,83,117,114,102,97,99,101,77,101,115,104,79,112,116,105,111,110,115,0]); + DEFINE_IID!(IID_ISpatialSurfaceObserverStatics, 374952429, 8456, 16744, 145, 117, 135, 224, 39, 188, 146, 133); + RT_INTERFACE!{static interface ISpatialSurfaceObserverStatics(ISpatialSurfaceObserverStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialSurfaceObserverStatics] { + fn RequestAccessAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl ISpatialSurfaceObserverStatics { + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialSurfaceObserver, 280401945, 56778, 13443, 172, 58, 116, 143, 232, 200, 109, 245); + RT_INTERFACE!{interface ISpatialSurfaceObserver(ISpatialSurfaceObserverVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialSurfaceObserver] { + fn GetObservedSurfaces(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn SetBoundingVolume(&mut self, bounds: *mut super::SpatialBoundingVolume) -> HRESULT, + fn SetBoundingVolumes(&mut self, bounds: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn add_ObservedSurfacesChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ObservedSurfacesChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISpatialSurfaceObserver { + #[inline] pub unsafe fn get_observed_surfaces(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetObservedSurfaces)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_bounding_volume(&mut self, bounds: &super::SpatialBoundingVolume) -> Result<()> { + let hr = ((*self.lpVtbl).SetBoundingVolume)(self, bounds as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_bounding_volumes(&mut self, bounds: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).SetBoundingVolumes)(self, bounds as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_observed_surfaces_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ObservedSurfacesChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_observed_surfaces_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ObservedSurfacesChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SpatialSurfaceObserver: ISpatialSurfaceObserver} + RT_ACTIVATABLE!{ISpatialSurfaceObserverStatics [CLSID_SpatialSurfaceObserver]} + DEFINE_CLSID!(CLSID_SpatialSurfaceObserver = &[87,105,110,100,111,119,115,46,80,101,114,99,101,112,116,105,111,110,46,83,112,97,116,105,97,108,46,83,117,114,102,97,99,101,115,46,83,112,97,116,105,97,108,83,117,114,102,97,99,101,79,98,115,101,114,118,101,114,0]); +} // Windows.Perception.Spatial.Surfaces +} // Windows.Perception.Spatial +pub mod people { // Windows.Perception.People +use ::prelude::*; + DEFINE_IID!(IID_IHeadPose, 2136655269, 18907, 14239, 148, 41, 50, 162, 250, 243, 79, 166); + RT_INTERFACE!{interface IHeadPose(IHeadPoseVtbl): IInspectable(IInspectableVtbl) [IID_IHeadPose] { + fn get_Position(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_ForwardDirection(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_UpDirection(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT + }} + impl IHeadPose { + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_forward_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ForwardDirection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_up_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UpDirection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class HeadPose: IHeadPose} +} // Windows.Perception.People +pub mod automation { // Windows.Perception.Automation +pub mod core { // Windows.Perception.Automation.Core +use ::prelude::*; + RT_STRUCT! { struct PerceptionAutomationCoreContract { + + }} + DEFINE_IID!(IID_ICorePerceptionAutomationStatics, 196101441, 19682, 18723, 154, 118, 129, 135, 236, 197, 145, 18); + RT_INTERFACE!{static interface ICorePerceptionAutomationStatics(ICorePerceptionAutomationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICorePerceptionAutomationStatics] { + fn SetActivationFactoryProvider(&mut self, provider: *mut ::rt::gen::windows::foundation::IGetActivationFactory) -> HRESULT + }} + impl ICorePerceptionAutomationStatics { + #[inline] pub unsafe fn set_activation_factory_provider(&mut self, provider: &::rt::gen::windows::foundation::IGetActivationFactory) -> Result<()> { + let hr = ((*self.lpVtbl).SetActivationFactoryProvider)(self, provider as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ICorePerceptionAutomationStatics [CLSID_CorePerceptionAutomation]} + DEFINE_CLSID!(CLSID_CorePerceptionAutomation = &[87,105,110,100,111,119,115,46,80,101,114,99,101,112,116,105,111,110,46,65,117,116,111,109,97,116,105,111,110,46,67,111,114,101,46,67,111,114,101,80,101,114,99,101,112,116,105,111,110,65,117,116,111,109,97,116,105,111,110,0]); +} // Windows.Perception.Automation.Core +} // Windows.Perception.Automation +} // Windows.Perception +#[cfg(feature="windows.security")] +pub mod security { // Windows.Security +pub mod credentials { // Windows.Security.Credentials +use ::prelude::*; + RT_ENUM! { enum WebAccountState: i32 { + None (WebAccountState_None) = 0, Connected (WebAccountState_Connected) = 1, Error (WebAccountState_Error) = 2, + }} + RT_ENUM! { enum WebAccountPictureSize: i32 { + Size64x64 (WebAccountPictureSize_Size64x64) = 64, Size208x208 (WebAccountPictureSize_Size208x208) = 208, Size424x424 (WebAccountPictureSize_Size424x424) = 424, Size1080x1080 (WebAccountPictureSize_Size1080x1080) = 1080, + }} + DEFINE_IID!(IID_IWebAccountFactory, 2895838009, 7657, 20114, 183, 143, 5, 129, 168, 127, 110, 92); + RT_INTERFACE!{static interface IWebAccountFactory(IWebAccountFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountFactory] { + fn CreateWebAccount(&mut self, webAccountProvider: *mut WebAccountProvider, userName: HSTRING, state: WebAccountState, out: *mut *mut WebAccount) -> HRESULT + }} + impl IWebAccountFactory { + #[inline] pub unsafe fn create_web_account(&mut self, webAccountProvider: &WebAccountProvider, userName: &HStringArg, state: WebAccountState) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWebAccount)(self, webAccountProvider as *const _ as *mut _, userName.get(), state, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebAccountProvider: IWebAccountProvider [IWebAccountProviderFactory] [CLSID_WebAccountProvider]} + DEFINE_CLSID!(CLSID_WebAccountProvider = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,101,100,101,110,116,105,97,108,115,46,87,101,98,65,99,99,111,117,110,116,80,114,111,118,105,100,101,114,0]); + RT_CLASS!{class WebAccount: IWebAccount [IWebAccountFactory] [CLSID_WebAccount]} + DEFINE_CLSID!(CLSID_WebAccount = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,101,100,101,110,116,105,97,108,115,46,87,101,98,65,99,99,111,117,110,116,0]); + DEFINE_IID!(IID_IWebAccount, 1766276786, 32817, 18878, 128, 187, 150, 203, 70, 217, 154, 186); + RT_INTERFACE!{interface IWebAccount(IWebAccountVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccount] { + fn get_WebAccountProvider(&mut self, out: *mut *mut WebAccountProvider) -> HRESULT, + fn get_UserName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_State(&mut self, out: *mut WebAccountState) -> HRESULT + }} + impl IWebAccount { + #[inline] pub unsafe fn get_web_account_provider(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebAccountProvider)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccount2, 2069288696, 39179, 20149, 148, 167, 86, 33, 243, 168, 184, 36); + RT_INTERFACE!{interface IWebAccount2(IWebAccount2Vtbl): IInspectable(IInspectableVtbl) [IID_IWebAccount2] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetPictureAsync(&mut self, desizedSize: WebAccountPictureSize, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SignOutAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SignOutWithClientIdAsync(&mut self, clientId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IWebAccount2 { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_picture_async(&mut self, desizedSize: WebAccountPictureSize) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPictureAsync)(self, desizedSize, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn sign_out_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SignOutAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn sign_out_with_client_id_async(&mut self, clientId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SignOutWithClientIdAsync)(self, clientId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProviderFactory, 494304753, 57825, 19354, 167, 116, 92, 124, 126, 59, 243, 113); + RT_INTERFACE!{static interface IWebAccountProviderFactory(IWebAccountProviderFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderFactory] { + fn CreateWebAccountProvider(&mut self, id: HSTRING, displayName: HSTRING, iconUri: *mut super::super::foundation::Uri, out: *mut *mut WebAccountProvider) -> HRESULT + }} + impl IWebAccountProviderFactory { + #[inline] pub unsafe fn create_web_account_provider(&mut self, id: &HStringArg, displayName: &HStringArg, iconUri: &super::super::foundation::Uri) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWebAccountProvider)(self, id.get(), displayName.get(), iconUri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProvider, 702335171, 31417, 19068, 163, 54, 185, 66, 249, 219, 247, 199); + RT_INTERFACE!{interface IWebAccountProvider(IWebAccountProviderVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProvider] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IconUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + }} + impl IWebAccountProvider { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_icon_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IconUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProvider2, 1241639685, 20034, 16852, 181, 24, 224, 8, 165, 22, 54, 20); + RT_INTERFACE!{interface IWebAccountProvider2(IWebAccountProvider2Vtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProvider2] { + fn get_DisplayPurpose(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Authority(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IWebAccountProvider2 { + #[inline] pub unsafe fn get_display_purpose(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayPurpose)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_authority(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Authority)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProvider3, 3659288971, 38669, 19785, 130, 92, 242, 112, 111, 140, 167, 254); + RT_INTERFACE!{interface IWebAccountProvider3(IWebAccountProvider3Vtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProvider3] { + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT + }} + impl IWebAccountProvider3 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum KeyCredentialStatus: i32 { + Success (KeyCredentialStatus_Success) = 0, UnknownError (KeyCredentialStatus_UnknownError) = 1, NotFound (KeyCredentialStatus_NotFound) = 2, UserCanceled (KeyCredentialStatus_UserCanceled) = 3, UserPrefersPassword (KeyCredentialStatus_UserPrefersPassword) = 4, CredentialAlreadyExists (KeyCredentialStatus_CredentialAlreadyExists) = 5, SecurityDeviceLocked (KeyCredentialStatus_SecurityDeviceLocked) = 6, + }} + RT_ENUM! { enum KeyCredentialAttestationStatus: i32 { + Success (KeyCredentialAttestationStatus_Success) = 0, UnknownError (KeyCredentialAttestationStatus_UnknownError) = 1, NotSupported (KeyCredentialAttestationStatus_NotSupported) = 2, TemporaryFailure (KeyCredentialAttestationStatus_TemporaryFailure) = 3, + }} + RT_ENUM! { enum KeyCredentialCreationOption: i32 { + ReplaceExisting (KeyCredentialCreationOption_ReplaceExisting) = 0, FailIfExists (KeyCredentialCreationOption_FailIfExists) = 1, + }} + DEFINE_IID!(IID_IKeyCredentialManagerStatics, 1789675147, 3825, 19680, 130, 144, 65, 6, 218, 106, 99, 181); + RT_INTERFACE!{static interface IKeyCredentialManagerStatics(IKeyCredentialManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKeyCredentialManagerStatics] { + fn IsSupportedAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RenewAttestationAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RequestCreateAsync(&mut self, name: HSTRING, option: KeyCredentialCreationOption, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn OpenAsync(&mut self, name: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DeleteAsync(&mut self, name: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IKeyCredentialManagerStatics { + #[inline] pub unsafe fn is_supported_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).IsSupportedAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn renew_attestation_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RenewAttestationAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_create_async(&mut self, name: &HStringArg, option: KeyCredentialCreationOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestCreateAsync)(self, name.get(), option, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn open_async(&mut self, name: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenAsync)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_async(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAsync)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class KeyCredentialRetrievalResult: IKeyCredentialRetrievalResult} + DEFINE_IID!(IID_IKeyCredential, 2508582797, 17787, 18503, 177, 26, 250, 150, 11, 189, 177, 56); + RT_INTERFACE!{interface IKeyCredential(IKeyCredentialVtbl): IInspectable(IInspectableVtbl) [IID_IKeyCredential] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RetrievePublicKeyWithDefaultBlobType(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RetrievePublicKeyWithBlobType(&mut self, blobType: super::cryptography::core::CryptographicPublicKeyBlobType, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn RequestSignAsync(&mut self, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAttestationAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IKeyCredential { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn retrieve_public_key_with_default_blob_type(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RetrievePublicKeyWithDefaultBlobType)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn retrieve_public_key_with_blob_type(&mut self, blobType: super::cryptography::core::CryptographicPublicKeyBlobType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RetrievePublicKeyWithBlobType)(self, blobType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn request_sign_async(&mut self, data: &super::super::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestSignAsync)(self, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_attestation_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAttestationAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class KeyCredentialOperationResult: IKeyCredentialOperationResult} + RT_CLASS!{class KeyCredentialAttestationResult: IKeyCredentialAttestationResult} + DEFINE_IID!(IID_IKeyCredentialRetrievalResult, 1489860355, 36231, 16969, 155, 88, 246, 89, 140, 201, 100, 78); + RT_INTERFACE!{interface IKeyCredentialRetrievalResult(IKeyCredentialRetrievalResultVtbl): IInspectable(IInspectableVtbl) [IID_IKeyCredentialRetrievalResult] { + fn get_Credential(&mut self, out: *mut *mut KeyCredential) -> HRESULT, + fn get_Status(&mut self, out: *mut KeyCredentialStatus) -> HRESULT + }} + impl IKeyCredentialRetrievalResult { + #[inline] pub unsafe fn get_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Credential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class KeyCredential: IKeyCredential} + DEFINE_IID!(IID_IKeyCredentialOperationResult, 4114056897, 21089, 19677, 151, 109, 204, 144, 154, 199, 22, 32); + RT_INTERFACE!{interface IKeyCredentialOperationResult(IKeyCredentialOperationResultVtbl): IInspectable(IInspectableVtbl) [IID_IKeyCredentialOperationResult] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Result(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_Status(&mut self, out: *mut KeyCredentialStatus) -> HRESULT + }} + impl IKeyCredentialOperationResult { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_result(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Result)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyCredentialAttestationResult, 2024453025, 41921, 16643, 182, 204, 71, 44, 68, 23, 28, 187); + RT_INTERFACE!{interface IKeyCredentialAttestationResult(IKeyCredentialAttestationResultVtbl): IInspectable(IInspectableVtbl) [IID_IKeyCredentialAttestationResult] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_CertificateChainBuffer(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_AttestationBuffer(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_Status(&mut self, out: *mut KeyCredentialAttestationStatus) -> HRESULT + }} + impl IKeyCredentialAttestationResult { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_certificate_chain_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CertificateChainBuffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_attestation_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AttestationBuffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKeyCredentialManagerStatics [CLSID_KeyCredentialManager]} + DEFINE_CLSID!(CLSID_KeyCredentialManager = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,101,100,101,110,116,105,97,108,115,46,75,101,121,67,114,101,100,101,110,116,105,97,108,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IPasswordCredential, 1790019977, 50976, 16807, 166, 193, 254, 173, 179, 99, 41, 160); + RT_INTERFACE!{interface IPasswordCredential(IPasswordCredentialVtbl): IInspectable(IInspectableVtbl) [IID_IPasswordCredential] { + fn get_Resource(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Resource(&mut self, resource: HSTRING) -> HRESULT, + fn get_UserName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_UserName(&mut self, userName: HSTRING) -> HRESULT, + fn get_Password(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Password(&mut self, password: HSTRING) -> HRESULT, + fn RetrievePassword(&mut self) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + }} + impl IPasswordCredential { + #[inline] pub unsafe fn get_resource(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Resource)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_resource(&mut self, resource: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Resource)(self, resource.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_user_name(&mut self, userName: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_UserName)(self, userName.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_password(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Password)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_password(&mut self, password: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Password)(self, password.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn retrieve_password(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RetrievePassword)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PasswordCredential: IPasswordCredential [ICredentialFactory] [CLSID_PasswordCredential]} + DEFINE_CLSID!(CLSID_PasswordCredential = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,101,100,101,110,116,105,97,108,115,46,80,97,115,115,119,111,114,100,67,114,101,100,101,110,116,105,97,108,0]); + DEFINE_IID!(IID_ICredentialFactory, 1424954273, 48934, 18357, 151, 221, 222, 119, 155, 124, 173, 88); + RT_INTERFACE!{static interface ICredentialFactory(ICredentialFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICredentialFactory] { + fn CreatePasswordCredential(&mut self, resource: HSTRING, userName: HSTRING, password: HSTRING, out: *mut *mut PasswordCredential) -> HRESULT + }} + impl ICredentialFactory { + #[inline] pub unsafe fn create_password_credential(&mut self, resource: &HStringArg, userName: &HStringArg, password: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePasswordCredential)(self, resource.get(), userName.get(), password.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPasswordVault, 1643981835, 51412, 18625, 165, 79, 188, 90, 100, 32, 90, 242); + RT_INTERFACE!{interface IPasswordVault(IPasswordVaultVtbl): IInspectable(IInspectableVtbl) [IID_IPasswordVault] { + fn Add(&mut self, credential: *mut PasswordCredential) -> HRESULT, + fn Remove(&mut self, credential: *mut PasswordCredential) -> HRESULT, + fn Retrieve(&mut self, resource: HSTRING, userName: HSTRING, out: *mut *mut PasswordCredential) -> HRESULT, + fn FindAllByResource(&mut self, resource: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn FindAllByUserName(&mut self, userName: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn RetrieveAll(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IPasswordVault { + #[inline] pub unsafe fn add(&mut self, credential: &PasswordCredential) -> Result<()> { + let hr = ((*self.lpVtbl).Add)(self, credential as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove(&mut self, credential: &PasswordCredential) -> Result<()> { + let hr = ((*self.lpVtbl).Remove)(self, credential as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn retrieve(&mut self, resource: &HStringArg, userName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Retrieve)(self, resource.get(), userName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_by_resource(&mut self, resource: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllByResource)(self, resource.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_by_user_name(&mut self, userName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllByUserName)(self, userName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn retrieve_all(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RetrieveAll)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PasswordVault: IPasswordVault} + RT_CLASS!{class PasswordCredentialPropertyStore: super::super::foundation::collections::IPropertySet} +pub mod ui { // Windows.Security.Credentials.UI +use ::prelude::*; + RT_ENUM! { enum AuthenticationProtocol: i32 { + Basic (AuthenticationProtocol_Basic) = 0, Digest (AuthenticationProtocol_Digest) = 1, Ntlm (AuthenticationProtocol_Ntlm) = 2, Kerberos (AuthenticationProtocol_Kerberos) = 3, Negotiate (AuthenticationProtocol_Negotiate) = 4, CredSsp (AuthenticationProtocol_CredSsp) = 5, Custom (AuthenticationProtocol_Custom) = 6, + }} + RT_ENUM! { enum CredentialSaveOption: i32 { + Unselected (CredentialSaveOption_Unselected) = 0, Selected (CredentialSaveOption_Selected) = 1, Hidden (CredentialSaveOption_Hidden) = 2, + }} + DEFINE_IID!(IID_ICredentialPickerOptions, 2522483532, 38394, 18047, 153, 43, 11, 34, 229, 133, 155, 246); + RT_INTERFACE!{interface ICredentialPickerOptions(ICredentialPickerOptionsVtbl): IInspectable(IInspectableVtbl) [IID_ICredentialPickerOptions] { + fn put_Caption(&mut self, value: HSTRING) -> HRESULT, + fn get_Caption(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Message(&mut self, value: HSTRING) -> HRESULT, + fn get_Message(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ErrorCode(&mut self, value: u32) -> HRESULT, + fn get_ErrorCode(&mut self, out: *mut u32) -> HRESULT, + fn put_TargetName(&mut self, value: HSTRING) -> HRESULT, + fn get_TargetName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AuthenticationProtocol(&mut self, value: AuthenticationProtocol) -> HRESULT, + fn get_AuthenticationProtocol(&mut self, out: *mut AuthenticationProtocol) -> HRESULT, + fn put_CustomAuthenticationProtocol(&mut self, value: HSTRING) -> HRESULT, + fn get_CustomAuthenticationProtocol(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy12(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_PreviousCredential(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy13(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_PreviousCredential(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn put_AlwaysDisplayDialog(&mut self, value: bool) -> HRESULT, + fn get_AlwaysDisplayDialog(&mut self, out: *mut bool) -> HRESULT, + fn put_CallerSavesCredential(&mut self, value: bool) -> HRESULT, + fn get_CallerSavesCredential(&mut self, out: *mut bool) -> HRESULT, + fn put_CredentialSaveOption(&mut self, value: CredentialSaveOption) -> HRESULT, + fn get_CredentialSaveOption(&mut self, out: *mut CredentialSaveOption) -> HRESULT + }} + impl ICredentialPickerOptions { + #[inline] pub unsafe fn set_caption(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Caption)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_caption(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Caption)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_message(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Message)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_error_code(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ErrorCode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_target_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_target_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TargetName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_authentication_protocol(&mut self, value: AuthenticationProtocol) -> Result<()> { + let hr = ((*self.lpVtbl).put_AuthenticationProtocol)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_authentication_protocol(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AuthenticationProtocol)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_custom_authentication_protocol(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CustomAuthenticationProtocol)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_authentication_protocol(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomAuthenticationProtocol)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_previous_credential(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreviousCredential)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_previous_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreviousCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_always_display_dialog(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AlwaysDisplayDialog)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_always_display_dialog(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlwaysDisplayDialog)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_caller_saves_credential(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CallerSavesCredential)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_caller_saves_credential(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CallerSavesCredential)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_credential_save_option(&mut self, value: CredentialSaveOption) -> Result<()> { + let hr = ((*self.lpVtbl).put_CredentialSaveOption)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_credential_save_option(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CredentialSaveOption)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CredentialPickerOptions: ICredentialPickerOptions} + DEFINE_IID!(IID_ICredentialPickerStatics, 2855951475, 51690, 18306, 153, 251, 230, 215, 233, 56, 225, 45); + RT_INTERFACE!{static interface ICredentialPickerStatics(ICredentialPickerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICredentialPickerStatics] { + fn PickWithOptionsAsync(&mut self, options: *mut CredentialPickerOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn PickWithMessageAsync(&mut self, targetName: HSTRING, message: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn PickWithCaptionAsync(&mut self, targetName: HSTRING, message: HSTRING, caption: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl ICredentialPickerStatics { + #[inline] pub unsafe fn pick_with_options_async(&mut self, options: &CredentialPickerOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickWithOptionsAsync)(self, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pick_with_message_async(&mut self, targetName: &HStringArg, message: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickWithMessageAsync)(self, targetName.get(), message.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pick_with_caption_async(&mut self, targetName: &HStringArg, message: &HStringArg, caption: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickWithCaptionAsync)(self, targetName.get(), message.get(), caption.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CredentialPickerResults: ICredentialPickerResults} + RT_ACTIVATABLE!{ICredentialPickerStatics [CLSID_CredentialPicker]} + DEFINE_CLSID!(CLSID_CredentialPicker = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,101,100,101,110,116,105,97,108,115,46,85,73,46,67,114,101,100,101,110,116,105,97,108,80,105,99,107,101,114,0]); + DEFINE_IID!(IID_ICredentialPickerResults, 424212890, 52272, 16652, 156, 56, 204, 8, 132, 197, 179, 215); + RT_INTERFACE!{interface ICredentialPickerResults(ICredentialPickerResultsVtbl): IInspectable(IInspectableVtbl) [IID_ICredentialPickerResults] { + fn get_ErrorCode(&mut self, out: *mut u32) -> HRESULT, + fn get_CredentialSaveOption(&mut self, out: *mut CredentialSaveOption) -> HRESULT, + fn get_CredentialSaved(&mut self, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Credential(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn get_CredentialDomainName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CredentialUserName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CredentialPassword(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICredentialPickerResults { + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_credential_save_option(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CredentialSaveOption)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_credential_saved(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CredentialSaved)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Credential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_credential_domain_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CredentialDomainName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_credential_user_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CredentialUserName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_credential_password(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CredentialPassword)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum UserConsentVerifierAvailability: i32 { + Available (UserConsentVerifierAvailability_Available) = 0, DeviceNotPresent (UserConsentVerifierAvailability_DeviceNotPresent) = 1, NotConfiguredForUser (UserConsentVerifierAvailability_NotConfiguredForUser) = 2, DisabledByPolicy (UserConsentVerifierAvailability_DisabledByPolicy) = 3, DeviceBusy (UserConsentVerifierAvailability_DeviceBusy) = 4, + }} + RT_ENUM! { enum UserConsentVerificationResult: i32 { + Verified (UserConsentVerificationResult_Verified) = 0, DeviceNotPresent (UserConsentVerificationResult_DeviceNotPresent) = 1, NotConfiguredForUser (UserConsentVerificationResult_NotConfiguredForUser) = 2, DisabledByPolicy (UserConsentVerificationResult_DisabledByPolicy) = 3, DeviceBusy (UserConsentVerificationResult_DeviceBusy) = 4, RetriesExhausted (UserConsentVerificationResult_RetriesExhausted) = 5, Canceled (UserConsentVerificationResult_Canceled) = 6, + }} + DEFINE_IID!(IID_IUserConsentVerifierStatics, 2941206417, 22092, 19932, 184, 181, 151, 52, 71, 98, 124, 101); + RT_INTERFACE!{static interface IUserConsentVerifierStatics(IUserConsentVerifierStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUserConsentVerifierStatics] { + fn CheckAvailabilityAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn RequestVerificationAsync(&mut self, message: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IUserConsentVerifierStatics { + #[inline] pub unsafe fn check_availability_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CheckAvailabilityAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_verification_async(&mut self, message: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestVerificationAsync)(self, message.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IUserConsentVerifierStatics [CLSID_UserConsentVerifier]} + DEFINE_CLSID!(CLSID_UserConsentVerifier = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,101,100,101,110,116,105,97,108,115,46,85,73,46,85,115,101,114,67,111,110,115,101,110,116,86,101,114,105,102,105,101,114,0]); +} // Windows.Security.Credentials.UI +} // Windows.Security.Credentials +pub mod enterprisedata { // Windows.Security.EnterpriseData +use ::prelude::*; + RT_ENUM! { enum ProtectionPolicyEvaluationResult: i32 { + Allowed (ProtectionPolicyEvaluationResult_Allowed) = 0, Blocked (ProtectionPolicyEvaluationResult_Blocked) = 1, ConsentRequired (ProtectionPolicyEvaluationResult_ConsentRequired) = 2, + }} + RT_STRUCT! { struct EnterpriseDataContract { + + }} + RT_ENUM! { enum FileProtectionStatus: i32 { + Undetermined (FileProtectionStatus_Undetermined) = 0, Unknown (FileProtectionStatus_Unknown) = 0, Unprotected (FileProtectionStatus_Unprotected) = 1, Revoked (FileProtectionStatus_Revoked) = 2, Protected (FileProtectionStatus_Protected) = 3, ProtectedByOtherUser (FileProtectionStatus_ProtectedByOtherUser) = 4, ProtectedToOtherEnterprise (FileProtectionStatus_ProtectedToOtherEnterprise) = 5, NotProtectable (FileProtectionStatus_NotProtectable) = 6, ProtectedToOtherIdentity (FileProtectionStatus_ProtectedToOtherIdentity) = 7, LicenseExpired (FileProtectionStatus_LicenseExpired) = 8, AccessSuspended (FileProtectionStatus_AccessSuspended) = 9, FileInUse (FileProtectionStatus_FileInUse) = 10, + }} + RT_ENUM! { enum ProtectedImportExportStatus: i32 { + Ok (ProtectedImportExportStatus_Ok) = 0, Undetermined (ProtectedImportExportStatus_Undetermined) = 1, Unprotected (ProtectedImportExportStatus_Unprotected) = 2, Revoked (ProtectedImportExportStatus_Revoked) = 3, NotRoamable (ProtectedImportExportStatus_NotRoamable) = 4, ProtectedToOtherIdentity (ProtectedImportExportStatus_ProtectedToOtherIdentity) = 5, LicenseExpired (ProtectedImportExportStatus_LicenseExpired) = 6, AccessSuspended (ProtectedImportExportStatus_AccessSuspended) = 7, + }} + RT_ENUM! { enum DataProtectionStatus: i32 { + ProtectedToOtherIdentity (DataProtectionStatus_ProtectedToOtherIdentity) = 0, Protected (DataProtectionStatus_Protected) = 1, Revoked (DataProtectionStatus_Revoked) = 2, Unprotected (DataProtectionStatus_Unprotected) = 3, LicenseExpired (DataProtectionStatus_LicenseExpired) = 4, AccessSuspended (DataProtectionStatus_AccessSuspended) = 5, + }} + DEFINE_IID!(IID_IFileRevocationManagerStatics, 627817533, 7261, 16992, 140, 117, 145, 68, 207, 183, 139, 169); + RT_INTERFACE!{static interface IFileRevocationManagerStatics(IFileRevocationManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFileRevocationManagerStatics] { + #[cfg(feature="windows.storage")] fn ProtectAsync(&mut self, storageItem: *mut super::super::storage::IStorageItem, enterpriseIdentity: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn CopyProtectionAsync(&mut self, sourceStorageItem: *mut super::super::storage::IStorageItem, targetStorageItem: *mut super::super::storage::IStorageItem, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn Revoke(&mut self, enterpriseIdentity: HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetStatusAsync(&mut self, storageItem: *mut super::super::storage::IStorageItem, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IFileRevocationManagerStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn protect_async(&mut self, storageItem: &super::super::storage::IStorageItem, enterpriseIdentity: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProtectAsync)(self, storageItem as *const _ as *mut _, enterpriseIdentity.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn copy_protection_async(&mut self, sourceStorageItem: &super::super::storage::IStorageItem, targetStorageItem: &super::super::storage::IStorageItem) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyProtectionAsync)(self, sourceStorageItem as *const _ as *mut _, targetStorageItem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn revoke(&mut self, enterpriseIdentity: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).Revoke)(self, enterpriseIdentity.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_status_async(&mut self, storageItem: &super::super::storage::IStorageItem) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStatusAsync)(self, storageItem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileProtectionManagerStatics, 1481047195, 58899, 17003, 187, 56, 136, 203, 161, 220, 154, 219); + RT_INTERFACE!{static interface IFileProtectionManagerStatics(IFileProtectionManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFileProtectionManagerStatics] { + #[cfg(feature="windows.storage")] fn ProtectAsync(&mut self, target: *mut super::super::storage::IStorageItem, identity: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn CopyProtectionAsync(&mut self, source: *mut super::super::storage::IStorageItem, target: *mut super::super::storage::IStorageItem, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetProtectionInfoAsync(&mut self, source: *mut super::super::storage::IStorageItem, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn SaveFileAsContainerAsync(&mut self, protectedFile: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn LoadFileFromContainerAsync(&mut self, containerFile: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn LoadFileFromContainerWithTargetAsync(&mut self, containerFile: *mut super::super::storage::IStorageFile, target: *mut super::super::storage::IStorageItem, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateProtectedAndOpenAsync(&mut self, parentFolder: *mut super::super::storage::IStorageFolder, desiredName: HSTRING, identity: HSTRING, collisionOption: super::super::storage::CreationCollisionOption, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IFileProtectionManagerStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn protect_async(&mut self, target: &super::super::storage::IStorageItem, identity: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProtectAsync)(self, target as *const _ as *mut _, identity.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn copy_protection_async(&mut self, source: &super::super::storage::IStorageItem, target: &super::super::storage::IStorageItem) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyProtectionAsync)(self, source as *const _ as *mut _, target as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_protection_info_async(&mut self, source: &super::super::storage::IStorageItem) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetProtectionInfoAsync)(self, source as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn save_file_as_container_async(&mut self, protectedFile: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveFileAsContainerAsync)(self, protectedFile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_file_from_container_async(&mut self, containerFile: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadFileFromContainerAsync)(self, containerFile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_file_from_container_with_target_async(&mut self, containerFile: &super::super::storage::IStorageFile, target: &super::super::storage::IStorageItem) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadFileFromContainerWithTargetAsync)(self, containerFile as *const _ as *mut _, target as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_protected_and_open_async(&mut self, parentFolder: &super::super::storage::IStorageFolder, desiredName: &HStringArg, identity: &HStringArg, collisionOption: super::super::storage::CreationCollisionOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateProtectedAndOpenAsync)(self, parentFolder as *const _ as *mut _, desiredName.get(), identity.get(), collisionOption, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FileProtectionInfo: IFileProtectionInfo} + RT_CLASS!{class ProtectedContainerExportResult: IProtectedContainerExportResult} + RT_CLASS!{class ProtectedContainerImportResult: IProtectedContainerImportResult} + RT_CLASS!{class ProtectedFileCreateResult: IProtectedFileCreateResult} + DEFINE_IID!(IID_IFileProtectionManagerStatics2, 2211620677, 1155, 16811, 178, 213, 188, 127, 35, 215, 78, 187); + RT_INTERFACE!{static interface IFileProtectionManagerStatics2(IFileProtectionManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IFileProtectionManagerStatics2] { + #[cfg(feature="windows.storage")] fn IsContainerAsync(&mut self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn LoadFileFromContainerWithTargetAndNameCollisionOptionAsync(&mut self, containerFile: *mut super::super::storage::IStorageFile, target: *mut super::super::storage::IStorageItem, collisionOption: super::super::storage::NameCollisionOption, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn SaveFileAsContainerWithSharingAsync(&mut self, protectedFile: *mut super::super::storage::IStorageFile, sharedWithIdentities: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IFileProtectionManagerStatics2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn is_container_async(&mut self, file: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).IsContainerAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_file_from_container_with_target_and_name_collision_option_async(&mut self, containerFile: &super::super::storage::IStorageFile, target: &super::super::storage::IStorageItem, collisionOption: super::super::storage::NameCollisionOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadFileFromContainerWithTargetAndNameCollisionOptionAsync)(self, containerFile as *const _ as *mut _, target as *const _ as *mut _, collisionOption, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn save_file_as_container_with_sharing_async(&mut self, protectedFile: &super::super::storage::IStorageFile, sharedWithIdentities: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveFileAsContainerWithSharingAsync)(self, protectedFile as *const _ as *mut _, sharedWithIdentities as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProtectedFileCreateResult, 686026090, 59879, 18947, 159, 83, 189, 177, 97, 114, 105, 155); + RT_INTERFACE!{interface IProtectedFileCreateResult(IProtectedFileCreateResultVtbl): IInspectable(IInspectableVtbl) [IID_IProtectedFileCreateResult] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_File(&mut self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Stream(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + fn get_ProtectionInfo(&mut self, out: *mut *mut FileProtectionInfo) -> HRESULT + }} + impl IProtectedFileCreateResult { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_File)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Stream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_protection_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProtectionInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileProtectionInfo, 1323918470, 5246, 19920, 143, 175, 82, 83, 237, 145, 173, 12); + RT_INTERFACE!{interface IFileProtectionInfo(IFileProtectionInfoVtbl): IInspectable(IInspectableVtbl) [IID_IFileProtectionInfo] { + fn get_Status(&mut self, out: *mut FileProtectionStatus) -> HRESULT, + fn get_IsRoamable(&mut self, out: *mut bool) -> HRESULT, + fn get_Identity(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IFileProtectionInfo { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_roamable(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsRoamable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_identity(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Identity)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProtectedContainerExportResult, 961081237, 63483, 19266, 175, 176, 223, 112, 180, 21, 67, 193); + RT_INTERFACE!{interface IProtectedContainerExportResult(IProtectedContainerExportResultVtbl): IInspectable(IInspectableVtbl) [IID_IProtectedContainerExportResult] { + fn get_Status(&mut self, out: *mut ProtectedImportExportStatus) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_File(&mut self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT + }} + impl IProtectedContainerExportResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_File)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProtectedContainerImportResult, 3451355345, 59323, 19738, 147, 57, 52, 220, 65, 20, 159, 155); + RT_INTERFACE!{interface IProtectedContainerImportResult(IProtectedContainerImportResultVtbl): IInspectable(IInspectableVtbl) [IID_IProtectedContainerImportResult] { + fn get_Status(&mut self, out: *mut ProtectedImportExportStatus) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_File(&mut self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT + }} + impl IProtectedContainerImportResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_File)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataProtectionManagerStatics, 3054803828, 37188, 20196, 138, 138, 48, 181, 243, 97, 67, 14); + RT_INTERFACE!{static interface IDataProtectionManagerStatics(IDataProtectionManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDataProtectionManagerStatics] { + #[cfg(feature="windows.storage")] fn ProtectAsync(&mut self, data: *mut super::super::storage::streams::IBuffer, identity: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn UnprotectAsync(&mut self, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn ProtectStreamAsync(&mut self, unprotectedStream: *mut super::super::storage::streams::IInputStream, identity: HSTRING, protectedStream: *mut super::super::storage::streams::IOutputStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn UnprotectStreamAsync(&mut self, protectedStream: *mut super::super::storage::streams::IInputStream, unprotectedStream: *mut super::super::storage::streams::IOutputStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetProtectionInfoAsync(&mut self, protectedData: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetStreamProtectionInfoAsync(&mut self, protectedStream: *mut super::super::storage::streams::IInputStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IDataProtectionManagerStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn protect_async(&mut self, data: &super::super::storage::streams::IBuffer, identity: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProtectAsync)(self, data as *const _ as *mut _, identity.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn unprotect_async(&mut self, data: &super::super::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnprotectAsync)(self, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn protect_stream_async(&mut self, unprotectedStream: &super::super::storage::streams::IInputStream, identity: &HStringArg, protectedStream: &super::super::storage::streams::IOutputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProtectStreamAsync)(self, unprotectedStream as *const _ as *mut _, identity.get(), protectedStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn unprotect_stream_async(&mut self, protectedStream: &super::super::storage::streams::IInputStream, unprotectedStream: &super::super::storage::streams::IOutputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnprotectStreamAsync)(self, protectedStream as *const _ as *mut _, unprotectedStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_protection_info_async(&mut self, protectedData: &super::super::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetProtectionInfoAsync)(self, protectedData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_stream_protection_info_async(&mut self, protectedStream: &super::super::storage::streams::IInputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStreamProtectionInfoAsync)(self, protectedStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BufferProtectUnprotectResult: IBufferProtectUnprotectResult} + RT_CLASS!{class DataProtectionInfo: IDataProtectionInfo} + DEFINE_IID!(IID_IDataProtectionInfo, 2216734913, 24113, 17413, 149, 64, 63, 148, 58, 240, 203, 38); + RT_INTERFACE!{interface IDataProtectionInfo(IDataProtectionInfoVtbl): IInspectable(IInspectableVtbl) [IID_IDataProtectionInfo] { + fn get_Status(&mut self, out: *mut DataProtectionStatus) -> HRESULT, + fn get_Identity(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IDataProtectionInfo { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_identity(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Identity)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBufferProtectUnprotectResult, 1201233628, 27884, 20026, 178, 81, 158, 116, 133, 215, 158, 122); + RT_INTERFACE!{interface IBufferProtectUnprotectResult(IBufferProtectUnprotectResultVtbl): IInspectable(IInspectableVtbl) [IID_IBufferProtectUnprotectResult] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Buffer(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_ProtectionInfo(&mut self, out: *mut *mut DataProtectionInfo) -> HRESULT + }} + impl IBufferProtectUnprotectResult { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Buffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_protection_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProtectionInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum ProtectionPolicyAuditAction: i32 { + Decrypt (ProtectionPolicyAuditAction_Decrypt) = 0, CopyToLocation (ProtectionPolicyAuditAction_CopyToLocation) = 1, SendToRecipient (ProtectionPolicyAuditAction_SendToRecipient) = 2, Other (ProtectionPolicyAuditAction_Other) = 3, + }} + RT_ENUM! { enum ProtectionPolicyRequestAccessBehavior: i32 { + Decrypt (ProtectionPolicyRequestAccessBehavior_Decrypt) = 0, TreatOverridePolicyAsBlock (ProtectionPolicyRequestAccessBehavior_TreatOverridePolicyAsBlock) = 1, + }} + DEFINE_IID!(IID_IProtectionPolicyAuditInfoFactory, 2127829003, 37608, 17109, 131, 212, 37, 68, 11, 66, 53, 73); + RT_INTERFACE!{static interface IProtectionPolicyAuditInfoFactory(IProtectionPolicyAuditInfoFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IProtectionPolicyAuditInfoFactory] { + fn Create(&mut self, action: ProtectionPolicyAuditAction, dataDescription: HSTRING, sourceDescription: HSTRING, targetDescription: HSTRING, out: *mut *mut ProtectionPolicyAuditInfo) -> HRESULT, + fn CreateWithActionAndDataDescription(&mut self, action: ProtectionPolicyAuditAction, dataDescription: HSTRING, out: *mut *mut ProtectionPolicyAuditInfo) -> HRESULT + }} + impl IProtectionPolicyAuditInfoFactory { + #[inline] pub unsafe fn create(&mut self, action: ProtectionPolicyAuditAction, dataDescription: &HStringArg, sourceDescription: &HStringArg, targetDescription: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, action, dataDescription.get(), sourceDescription.get(), targetDescription.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_action_and_data_description(&mut self, action: ProtectionPolicyAuditAction, dataDescription: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithActionAndDataDescription)(self, action, dataDescription.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProtectionPolicyAuditInfo: IProtectionPolicyAuditInfo [IProtectionPolicyAuditInfoFactory] [CLSID_ProtectionPolicyAuditInfo]} + DEFINE_CLSID!(CLSID_ProtectionPolicyAuditInfo = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,69,110,116,101,114,112,114,105,115,101,68,97,116,97,46,80,114,111,116,101,99,116,105,111,110,80,111,108,105,99,121,65,117,100,105,116,73,110,102,111,0]); + DEFINE_IID!(IID_IProtectionPolicyAuditInfo, 1113241572, 65207, 17660, 179, 187, 195, 196, 215, 236, 190, 187); + RT_INTERFACE!{interface IProtectionPolicyAuditInfo(IProtectionPolicyAuditInfoVtbl): IInspectable(IInspectableVtbl) [IID_IProtectionPolicyAuditInfo] { + fn put_Action(&mut self, value: ProtectionPolicyAuditAction) -> HRESULT, + fn get_Action(&mut self, out: *mut ProtectionPolicyAuditAction) -> HRESULT, + fn put_DataDescription(&mut self, value: HSTRING) -> HRESULT, + fn get_DataDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SourceDescription(&mut self, value: HSTRING) -> HRESULT, + fn get_SourceDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_TargetDescription(&mut self, value: HSTRING) -> HRESULT, + fn get_TargetDescription(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IProtectionPolicyAuditInfo { + #[inline] pub unsafe fn set_action(&mut self, value: ProtectionPolicyAuditAction) -> Result<()> { + let hr = ((*self.lpVtbl).put_Action)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_action(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Action)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_data_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataDescription)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_source_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SourceDescription)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_target_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetDescription)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_target_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TargetDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProtectionPolicyManager, 3580902936, 41101, 18406, 162, 64, 153, 52, 215, 22, 94, 181); + RT_INTERFACE!{interface IProtectionPolicyManager(IProtectionPolicyManagerVtbl): IInspectable(IInspectableVtbl) [IID_IProtectionPolicyManager] { + fn put_Identity(&mut self, value: HSTRING) -> HRESULT, + fn get_Identity(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IProtectionPolicyManager { + #[inline] pub unsafe fn set_identity(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Identity)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_identity(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Identity)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProtectionPolicyManager2, 2885112442, 33845, 16767, 153, 182, 81, 190, 175, 54, 88, 136); + RT_INTERFACE!{interface IProtectionPolicyManager2(IProtectionPolicyManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IProtectionPolicyManager2] { + fn put_ShowEnterpriseIndicator(&mut self, value: bool) -> HRESULT, + fn get_ShowEnterpriseIndicator(&mut self, out: *mut bool) -> HRESULT + }} + impl IProtectionPolicyManager2 { + #[inline] pub unsafe fn set_show_enterprise_indicator(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShowEnterpriseIndicator)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_show_enterprise_indicator(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShowEnterpriseIndicator)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProtectionPolicyManagerStatics, 3233807462, 35901, 19798, 136, 4, 198, 143, 10, 211, 46, 197); + RT_INTERFACE!{static interface IProtectionPolicyManagerStatics(IProtectionPolicyManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IProtectionPolicyManagerStatics] { + fn IsIdentityManaged(&mut self, identity: HSTRING, out: *mut bool) -> HRESULT, + fn TryApplyProcessUIPolicy(&mut self, identity: HSTRING, out: *mut bool) -> HRESULT, + fn ClearProcessUIPolicy(&mut self) -> HRESULT, + fn CreateCurrentThreadNetworkContext(&mut self, identity: HSTRING, out: *mut *mut ThreadNetworkContext) -> HRESULT, + #[cfg(not(feature="windows.networking"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.networking")] fn GetPrimaryManagedIdentityForNetworkEndpointAsync(&mut self, endpointHost: *mut super::super::networking::HostName, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RevokeContent(&mut self, identity: HSTRING) -> HRESULT, + fn GetForCurrentView(&mut self, out: *mut *mut ProtectionPolicyManager) -> HRESULT, + fn add_ProtectedAccessSuspending(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProtectedAccessSuspending(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ProtectedAccessResumed(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProtectedAccessResumed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ProtectedContentRevoked(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProtectedContentRevoked(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn CheckAccess(&mut self, sourceIdentity: HSTRING, targetIdentity: HSTRING, out: *mut ProtectionPolicyEvaluationResult) -> HRESULT, + fn RequestAccessAsync(&mut self, sourceIdentity: HSTRING, targetIdentity: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IProtectionPolicyManagerStatics { + #[inline] pub unsafe fn is_identity_managed(&mut self, identity: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsIdentityManaged)(self, identity.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_apply_process_uipolicy(&mut self, identity: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryApplyProcessUIPolicy)(self, identity.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn clear_process_uipolicy(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ClearProcessUIPolicy)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn create_current_thread_network_context(&mut self, identity: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCurrentThreadNetworkContext)(self, identity.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_primary_managed_identity_for_network_endpoint_async(&mut self, endpointHost: &super::super::networking::HostName) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPrimaryManagedIdentityForNetworkEndpointAsync)(self, endpointHost as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn revoke_content(&mut self, identity: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RevokeContent)(self, identity.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_protected_access_suspending(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ProtectedAccessSuspending)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_protected_access_suspending(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ProtectedAccessSuspending)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_protected_access_resumed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ProtectedAccessResumed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_protected_access_resumed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ProtectedAccessResumed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_protected_content_revoked(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ProtectedContentRevoked)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_protected_content_revoked(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ProtectedContentRevoked)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn check_access(&mut self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CheckAccess)(self, sourceIdentity.get(), targetIdentity.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_async(&mut self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, sourceIdentity.get(), targetIdentity.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ThreadNetworkContext: IThreadNetworkContext} + RT_CLASS!{class ProtectionPolicyManager: IProtectionPolicyManager} + RT_ACTIVATABLE!{IProtectionPolicyManagerStatics [CLSID_ProtectionPolicyManager]} + RT_ACTIVATABLE!{IProtectionPolicyManagerStatics2 [CLSID_ProtectionPolicyManager]} + RT_ACTIVATABLE!{IProtectionPolicyManagerStatics3 [CLSID_ProtectionPolicyManager]} + DEFINE_CLSID!(CLSID_ProtectionPolicyManager = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,69,110,116,101,114,112,114,105,115,101,68,97,116,97,46,80,114,111,116,101,99,116,105,111,110,80,111,108,105,99,121,77,97,110,97,103,101,114,0]); + RT_CLASS!{class ProtectedAccessSuspendingEventArgs: IProtectedAccessSuspendingEventArgs} + RT_CLASS!{class ProtectedAccessResumedEventArgs: IProtectedAccessResumedEventArgs} + RT_CLASS!{class ProtectedContentRevokedEventArgs: IProtectedContentRevokedEventArgs} + RT_ENUM! { enum EnforcementLevel: i32 { + NoProtection (EnforcementLevel_NoProtection) = 0, Silent (EnforcementLevel_Silent) = 1, Override (EnforcementLevel_Override) = 2, Block (EnforcementLevel_Block) = 3, + }} + DEFINE_IID!(IID_IProtectionPolicyManagerStatics2, 3062864524, 14816, 17993, 178, 228, 7, 10, 184, 165, 121, 179); + RT_INTERFACE!{static interface IProtectionPolicyManagerStatics2(IProtectionPolicyManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IProtectionPolicyManagerStatics2] { + fn HasContentBeenRevokedSince(&mut self, identity: HSTRING, since: super::super::foundation::DateTime, out: *mut bool) -> HRESULT, + fn CheckAccessForApp(&mut self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, out: *mut ProtectionPolicyEvaluationResult) -> HRESULT, + fn RequestAccessForAppAsync(&mut self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetEnforcementLevel(&mut self, identity: HSTRING, out: *mut EnforcementLevel) -> HRESULT, + fn IsUserDecryptionAllowed(&mut self, identity: HSTRING, out: *mut bool) -> HRESULT, + fn IsProtectionUnderLockRequired(&mut self, identity: HSTRING, out: *mut bool) -> HRESULT, + fn add_PolicyChanged(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PolicyChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_IsProtectionEnabled(&mut self, out: *mut bool) -> HRESULT + }} + impl IProtectionPolicyManagerStatics2 { + #[inline] pub unsafe fn has_content_been_revoked_since(&mut self, identity: &HStringArg, since: super::super::foundation::DateTime) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).HasContentBeenRevokedSince)(self, identity.get(), since, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn check_access_for_app(&mut self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CheckAccessForApp)(self, sourceIdentity.get(), appPackageFamilyName.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_for_app_async(&mut self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessForAppAsync)(self, sourceIdentity.get(), appPackageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_enforcement_level(&mut self, identity: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetEnforcementLevel)(self, identity.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_user_decryption_allowed(&mut self, identity: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsUserDecryptionAllowed)(self, identity.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_protection_under_lock_required(&mut self, identity: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsProtectionUnderLockRequired)(self, identity.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_policy_changed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PolicyChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_policy_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PolicyChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_protection_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsProtectionEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProtectionPolicyManagerStatics3, 1224711820, 27247, 19871, 188, 237, 24, 171, 83, 122, 160, 21); + RT_INTERFACE!{static interface IProtectionPolicyManagerStatics3(IProtectionPolicyManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IProtectionPolicyManagerStatics3] { + fn RequestAccessWithAuditingInfoAsync(&mut self, sourceIdentity: HSTRING, targetIdentity: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessWithMessageAsync(&mut self, sourceIdentity: HSTRING, targetIdentity: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessForAppWithAuditingInfoAsync(&mut self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessForAppWithMessageAsync(&mut self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn LogAuditEvent(&mut self, sourceIdentity: HSTRING, targetIdentity: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo) -> HRESULT + }} + impl IProtectionPolicyManagerStatics3 { + #[inline] pub unsafe fn request_access_with_auditing_info_async(&mut self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessWithAuditingInfoAsync)(self, sourceIdentity.get(), targetIdentity.get(), auditInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_with_message_async(&mut self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessWithMessageAsync)(self, sourceIdentity.get(), targetIdentity.get(), auditInfo as *const _ as *mut _, messageFromApp.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_for_app_with_auditing_info_async(&mut self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessForAppWithAuditingInfoAsync)(self, sourceIdentity.get(), appPackageFamilyName.get(), auditInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_for_app_with_message_async(&mut self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessForAppWithMessageAsync)(self, sourceIdentity.get(), appPackageFamilyName.get(), auditInfo as *const _ as *mut _, messageFromApp.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn log_audit_event(&mut self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result<()> { + let hr = ((*self.lpVtbl).LogAuditEvent)(self, sourceIdentity.get(), targetIdentity.get(), auditInfo as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IThreadNetworkContext, 4199459049, 61203, 16474, 177, 44, 215, 52, 140, 111, 65, 252); + RT_INTERFACE!{interface IThreadNetworkContext(IThreadNetworkContextVtbl): IInspectable(IInspectableVtbl) [IID_IThreadNetworkContext] { + + }} + DEFINE_IID!(IID_IProtectedAccessSuspendingEventArgs, 1973523424, 41796, 17055, 185, 117, 4, 252, 31, 136, 193, 133); + RT_INTERFACE!{interface IProtectedAccessSuspendingEventArgs(IProtectedAccessSuspendingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IProtectedAccessSuspendingEventArgs] { + fn get_Identities(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Deadline(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + }} + impl IProtectedAccessSuspendingEventArgs { + #[inline] pub unsafe fn get_identities(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Identities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deadline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProtectedAccessResumedEventArgs, 2890779225, 23936, 20117, 140, 95, 133, 57, 69, 14, 235, 224); + RT_INTERFACE!{interface IProtectedAccessResumedEventArgs(IProtectedAccessResumedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IProtectedAccessResumedEventArgs] { + fn get_Identities(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IProtectedAccessResumedEventArgs { + #[inline] pub unsafe fn get_identities(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Identities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProtectedContentRevokedEventArgs, 1667786785, 22713, 18414, 147, 217, 240, 247, 65, 207, 67, 240); + RT_INTERFACE!{interface IProtectedContentRevokedEventArgs(IProtectedContentRevokedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IProtectedContentRevokedEventArgs] { + fn get_Identities(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IProtectedContentRevokedEventArgs { + #[inline] pub unsafe fn get_identities(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Identities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IFileRevocationManagerStatics [CLSID_FileRevocationManager]} + DEFINE_CLSID!(CLSID_FileRevocationManager = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,69,110,116,101,114,112,114,105,115,101,68,97,116,97,46,70,105,108,101,82,101,118,111,99,97,116,105,111,110,77,97,110,97,103,101,114,0]); + RT_ACTIVATABLE!{IFileProtectionManagerStatics2 [CLSID_FileProtectionManager]} + RT_ACTIVATABLE!{IFileProtectionManagerStatics [CLSID_FileProtectionManager]} + DEFINE_CLSID!(CLSID_FileProtectionManager = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,69,110,116,101,114,112,114,105,115,101,68,97,116,97,46,70,105,108,101,80,114,111,116,101,99,116,105,111,110,77,97,110,97,103,101,114,0]); + RT_ACTIVATABLE!{IDataProtectionManagerStatics [CLSID_DataProtectionManager]} + DEFINE_CLSID!(CLSID_DataProtectionManager = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,69,110,116,101,114,112,114,105,115,101,68,97,116,97,46,68,97,116,97,80,114,111,116,101,99,116,105,111,110,77,97,110,97,103,101,114,0]); +} // Windows.Security.EnterpriseData +pub mod exchangeactivesyncprovisioning { // Windows.Security.ExchangeActiveSyncProvisioning +use ::prelude::*; + DEFINE_IID!(IID_IEasClientDeviceInformation, 1423956353, 6504, 19619, 185, 88, 229, 149, 209, 101, 5, 235); + RT_INTERFACE!{interface IEasClientDeviceInformation(IEasClientDeviceInformationVtbl): IInspectable(IInspectableVtbl) [IID_IEasClientDeviceInformation] { + fn get_Id(&mut self, out: *mut Guid) -> HRESULT, + fn get_OperatingSystem(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SystemManufacturer(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SystemProductName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SystemSku(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IEasClientDeviceInformation { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_operating_system(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OperatingSystem)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_manufacturer(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SystemManufacturer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_product_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SystemProductName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_sku(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SystemSku)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEasClientDeviceInformation2, 4289943843, 47910, 19818, 129, 188, 22, 90, 238, 10, 215, 84); + RT_INTERFACE!{interface IEasClientDeviceInformation2(IEasClientDeviceInformation2Vtbl): IInspectable(IInspectableVtbl) [IID_IEasClientDeviceInformation2] { + fn get_SystemHardwareVersion(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SystemFirmwareVersion(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IEasClientDeviceInformation2 { + #[inline] pub unsafe fn get_system_hardware_version(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SystemHardwareVersion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_firmware_version(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SystemFirmwareVersion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EasClientDeviceInformation: IEasClientDeviceInformation} + RT_STRUCT! { struct EasContract { + + }} + RT_ENUM! { enum EasRequireEncryptionResult: i32 { + NotEvaluated (EasRequireEncryptionResult_NotEvaluated) = 0, Compliant (EasRequireEncryptionResult_Compliant) = 1, CanBeCompliant (EasRequireEncryptionResult_CanBeCompliant) = 2, NotProvisionedOnAllVolumes (EasRequireEncryptionResult_NotProvisionedOnAllVolumes) = 3, DeFixedDataNotSupported (EasRequireEncryptionResult_DeFixedDataNotSupported) = 4, FixedDataNotSupported (EasRequireEncryptionResult_FixedDataNotSupported) = 4, DeHardwareNotCompliant (EasRequireEncryptionResult_DeHardwareNotCompliant) = 5, HardwareNotCompliant (EasRequireEncryptionResult_HardwareNotCompliant) = 5, DeWinReNotConfigured (EasRequireEncryptionResult_DeWinReNotConfigured) = 6, LockNotConfigured (EasRequireEncryptionResult_LockNotConfigured) = 6, DeProtectionSuspended (EasRequireEncryptionResult_DeProtectionSuspended) = 7, ProtectionSuspended (EasRequireEncryptionResult_ProtectionSuspended) = 7, DeOsVolumeNotProtected (EasRequireEncryptionResult_DeOsVolumeNotProtected) = 8, OsVolumeNotProtected (EasRequireEncryptionResult_OsVolumeNotProtected) = 8, DeProtectionNotYetEnabled (EasRequireEncryptionResult_DeProtectionNotYetEnabled) = 9, ProtectionNotYetEnabled (EasRequireEncryptionResult_ProtectionNotYetEnabled) = 9, NoFeatureLicense (EasRequireEncryptionResult_NoFeatureLicense) = 10, OsNotProtected (EasRequireEncryptionResult_OsNotProtected) = 11, UnexpectedFailure (EasRequireEncryptionResult_UnexpectedFailure) = 12, + }} + RT_ENUM! { enum EasEncryptionProviderType: i32 { + NotEvaluated (EasEncryptionProviderType_NotEvaluated) = 0, WindowsEncryption (EasEncryptionProviderType_WindowsEncryption) = 1, OtherEncryption (EasEncryptionProviderType_OtherEncryption) = 2, + }} + RT_ENUM! { enum EasMinPasswordLengthResult: i32 { + NotEvaluated (EasMinPasswordLengthResult_NotEvaluated) = 0, Compliant (EasMinPasswordLengthResult_Compliant) = 1, CanBeCompliant (EasMinPasswordLengthResult_CanBeCompliant) = 2, RequestedPolicyIsStricter (EasMinPasswordLengthResult_RequestedPolicyIsStricter) = 3, RequestedPolicyNotEnforceable (EasMinPasswordLengthResult_RequestedPolicyNotEnforceable) = 4, InvalidParameter (EasMinPasswordLengthResult_InvalidParameter) = 5, CurrentUserHasBlankPassword (EasMinPasswordLengthResult_CurrentUserHasBlankPassword) = 6, AdminsHaveBlankPassword (EasMinPasswordLengthResult_AdminsHaveBlankPassword) = 7, UserCannotChangePassword (EasMinPasswordLengthResult_UserCannotChangePassword) = 8, AdminsCannotChangePassword (EasMinPasswordLengthResult_AdminsCannotChangePassword) = 9, LocalControlledUsersCannotChangePassword (EasMinPasswordLengthResult_LocalControlledUsersCannotChangePassword) = 10, ConnectedAdminsProviderPolicyIsWeak (EasMinPasswordLengthResult_ConnectedAdminsProviderPolicyIsWeak) = 11, ConnectedUserProviderPolicyIsWeak (EasMinPasswordLengthResult_ConnectedUserProviderPolicyIsWeak) = 12, ChangeConnectedAdminsPassword (EasMinPasswordLengthResult_ChangeConnectedAdminsPassword) = 13, ChangeConnectedUserPassword (EasMinPasswordLengthResult_ChangeConnectedUserPassword) = 14, + }} + RT_ENUM! { enum EasDisallowConvenienceLogonResult: i32 { + NotEvaluated (EasDisallowConvenienceLogonResult_NotEvaluated) = 0, Compliant (EasDisallowConvenienceLogonResult_Compliant) = 1, CanBeCompliant (EasDisallowConvenienceLogonResult_CanBeCompliant) = 2, RequestedPolicyIsStricter (EasDisallowConvenienceLogonResult_RequestedPolicyIsStricter) = 3, + }} + RT_ENUM! { enum EasMinPasswordComplexCharactersResult: i32 { + NotEvaluated (EasMinPasswordComplexCharactersResult_NotEvaluated) = 0, Compliant (EasMinPasswordComplexCharactersResult_Compliant) = 1, CanBeCompliant (EasMinPasswordComplexCharactersResult_CanBeCompliant) = 2, RequestedPolicyIsStricter (EasMinPasswordComplexCharactersResult_RequestedPolicyIsStricter) = 3, RequestedPolicyNotEnforceable (EasMinPasswordComplexCharactersResult_RequestedPolicyNotEnforceable) = 4, InvalidParameter (EasMinPasswordComplexCharactersResult_InvalidParameter) = 5, CurrentUserHasBlankPassword (EasMinPasswordComplexCharactersResult_CurrentUserHasBlankPassword) = 6, AdminsHaveBlankPassword (EasMinPasswordComplexCharactersResult_AdminsHaveBlankPassword) = 7, UserCannotChangePassword (EasMinPasswordComplexCharactersResult_UserCannotChangePassword) = 8, AdminsCannotChangePassword (EasMinPasswordComplexCharactersResult_AdminsCannotChangePassword) = 9, LocalControlledUsersCannotChangePassword (EasMinPasswordComplexCharactersResult_LocalControlledUsersCannotChangePassword) = 10, ConnectedAdminsProviderPolicyIsWeak (EasMinPasswordComplexCharactersResult_ConnectedAdminsProviderPolicyIsWeak) = 11, ConnectedUserProviderPolicyIsWeak (EasMinPasswordComplexCharactersResult_ConnectedUserProviderPolicyIsWeak) = 12, ChangeConnectedAdminsPassword (EasMinPasswordComplexCharactersResult_ChangeConnectedAdminsPassword) = 13, ChangeConnectedUserPassword (EasMinPasswordComplexCharactersResult_ChangeConnectedUserPassword) = 14, + }} + RT_ENUM! { enum EasPasswordExpirationResult: i32 { + NotEvaluated (EasPasswordExpirationResult_NotEvaluated) = 0, Compliant (EasPasswordExpirationResult_Compliant) = 1, CanBeCompliant (EasPasswordExpirationResult_CanBeCompliant) = 2, RequestedPolicyIsStricter (EasPasswordExpirationResult_RequestedPolicyIsStricter) = 3, RequestedExpirationIncompatible (EasPasswordExpirationResult_RequestedExpirationIncompatible) = 4, InvalidParameter (EasPasswordExpirationResult_InvalidParameter) = 5, UserCannotChangePassword (EasPasswordExpirationResult_UserCannotChangePassword) = 6, AdminsCannotChangePassword (EasPasswordExpirationResult_AdminsCannotChangePassword) = 7, LocalControlledUsersCannotChangePassword (EasPasswordExpirationResult_LocalControlledUsersCannotChangePassword) = 8, + }} + RT_ENUM! { enum EasPasswordHistoryResult: i32 { + NotEvaluated (EasPasswordHistoryResult_NotEvaluated) = 0, Compliant (EasPasswordHistoryResult_Compliant) = 1, CanBeCompliant (EasPasswordHistoryResult_CanBeCompliant) = 2, RequestedPolicyIsStricter (EasPasswordHistoryResult_RequestedPolicyIsStricter) = 3, InvalidParameter (EasPasswordHistoryResult_InvalidParameter) = 4, + }} + RT_ENUM! { enum EasMaxPasswordFailedAttemptsResult: i32 { + NotEvaluated (EasMaxPasswordFailedAttemptsResult_NotEvaluated) = 0, Compliant (EasMaxPasswordFailedAttemptsResult_Compliant) = 1, CanBeCompliant (EasMaxPasswordFailedAttemptsResult_CanBeCompliant) = 2, RequestedPolicyIsStricter (EasMaxPasswordFailedAttemptsResult_RequestedPolicyIsStricter) = 3, InvalidParameter (EasMaxPasswordFailedAttemptsResult_InvalidParameter) = 4, + }} + RT_ENUM! { enum EasMaxInactivityTimeLockResult: i32 { + NotEvaluated (EasMaxInactivityTimeLockResult_NotEvaluated) = 0, Compliant (EasMaxInactivityTimeLockResult_Compliant) = 1, CanBeCompliant (EasMaxInactivityTimeLockResult_CanBeCompliant) = 2, RequestedPolicyIsStricter (EasMaxInactivityTimeLockResult_RequestedPolicyIsStricter) = 3, InvalidParameter (EasMaxInactivityTimeLockResult_InvalidParameter) = 4, + }} + DEFINE_IID!(IID_IEasClientSecurityPolicy, 1169630050, 57274, 19099, 172, 237, 111, 226, 173, 203, 100, 32); + RT_INTERFACE!{interface IEasClientSecurityPolicy(IEasClientSecurityPolicyVtbl): IInspectable(IInspectableVtbl) [IID_IEasClientSecurityPolicy] { + fn get_RequireEncryption(&mut self, out: *mut bool) -> HRESULT, + fn put_RequireEncryption(&mut self, value: bool) -> HRESULT, + fn get_MinPasswordLength(&mut self, out: *mut u8) -> HRESULT, + fn put_MinPasswordLength(&mut self, value: u8) -> HRESULT, + fn get_DisallowConvenienceLogon(&mut self, out: *mut bool) -> HRESULT, + fn put_DisallowConvenienceLogon(&mut self, value: bool) -> HRESULT, + fn get_MinPasswordComplexCharacters(&mut self, out: *mut u8) -> HRESULT, + fn put_MinPasswordComplexCharacters(&mut self, value: u8) -> HRESULT, + fn get_PasswordExpiration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_PasswordExpiration(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_PasswordHistory(&mut self, out: *mut u32) -> HRESULT, + fn put_PasswordHistory(&mut self, value: u32) -> HRESULT, + fn get_MaxPasswordFailedAttempts(&mut self, out: *mut u8) -> HRESULT, + fn put_MaxPasswordFailedAttempts(&mut self, value: u8) -> HRESULT, + fn get_MaxInactivityTimeLock(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_MaxInactivityTimeLock(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn CheckCompliance(&mut self, out: *mut *mut EasComplianceResults) -> HRESULT, + fn ApplyAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IEasClientSecurityPolicy { + #[inline] pub unsafe fn get_require_encryption(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequireEncryption)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_require_encryption(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_RequireEncryption)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_password_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinPasswordLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_password_length(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinPasswordLength)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_disallow_convenience_logon(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DisallowConvenienceLogon)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_disallow_convenience_logon(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisallowConvenienceLogon)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_password_complex_characters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinPasswordComplexCharacters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_password_complex_characters(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinPasswordComplexCharacters)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_password_expiration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PasswordExpiration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_password_expiration(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_PasswordExpiration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_password_history(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PasswordHistory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_password_history(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_PasswordHistory)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_password_failed_attempts(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPasswordFailedAttempts)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_password_failed_attempts(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxPasswordFailedAttempts)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_inactivity_time_lock(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxInactivityTimeLock)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_inactivity_time_lock(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxInactivityTimeLock)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn check_compliance(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CheckCompliance)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn apply_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ApplyAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EasComplianceResults: IEasComplianceResults} + DEFINE_IID!(IID_IEasComplianceResults, 1178347932, 32537, 19558, 180, 3, 203, 69, 221, 87, 162, 179); + RT_INTERFACE!{interface IEasComplianceResults(IEasComplianceResultsVtbl): IInspectable(IInspectableVtbl) [IID_IEasComplianceResults] { + fn get_Compliant(&mut self, out: *mut bool) -> HRESULT, + fn get_RequireEncryptionResult(&mut self, out: *mut EasRequireEncryptionResult) -> HRESULT, + fn get_MinPasswordLengthResult(&mut self, out: *mut EasMinPasswordLengthResult) -> HRESULT, + fn get_DisallowConvenienceLogonResult(&mut self, out: *mut EasDisallowConvenienceLogonResult) -> HRESULT, + fn get_MinPasswordComplexCharactersResult(&mut self, out: *mut EasMinPasswordComplexCharactersResult) -> HRESULT, + fn get_PasswordExpirationResult(&mut self, out: *mut EasPasswordExpirationResult) -> HRESULT, + fn get_PasswordHistoryResult(&mut self, out: *mut EasPasswordHistoryResult) -> HRESULT, + fn get_MaxPasswordFailedAttemptsResult(&mut self, out: *mut EasMaxPasswordFailedAttemptsResult) -> HRESULT, + fn get_MaxInactivityTimeLockResult(&mut self, out: *mut EasMaxInactivityTimeLockResult) -> HRESULT + }} + impl IEasComplianceResults { + #[inline] pub unsafe fn get_compliant(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Compliant)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_require_encryption_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequireEncryptionResult)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_password_length_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinPasswordLengthResult)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_disallow_convenience_logon_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DisallowConvenienceLogonResult)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_password_complex_characters_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinPasswordComplexCharactersResult)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_password_expiration_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PasswordExpirationResult)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_password_history_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PasswordHistoryResult)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_password_failed_attempts_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPasswordFailedAttemptsResult)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_inactivity_time_lock_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxInactivityTimeLockResult)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IEasComplianceResults2, 801005769, 6824, 18421, 136, 187, 203, 62, 240, 191, 251, 21); + RT_INTERFACE!{interface IEasComplianceResults2(IEasComplianceResults2Vtbl): IInspectable(IInspectableVtbl) [IID_IEasComplianceResults2] { + fn get_EncryptionProviderType(&mut self, out: *mut EasEncryptionProviderType) -> HRESULT + }} + impl IEasComplianceResults2 { + #[inline] pub unsafe fn get_encryption_provider_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EncryptionProviderType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class EasClientSecurityPolicy: IEasClientSecurityPolicy} +} // Windows.Security.ExchangeActiveSyncProvisioning +pub mod authentication { // Windows.Security.Authentication +pub mod identity { // Windows.Security.Authentication.Identity +use ::prelude::*; + DEFINE_IID!(IID_IEnterpriseKeyCredentialRegistrationInfo, 942807756, 26411, 18467, 182, 3, 107, 60, 117, 61, 175, 151); + RT_INTERFACE!{interface IEnterpriseKeyCredentialRegistrationInfo(IEnterpriseKeyCredentialRegistrationInfoVtbl): IInspectable(IInspectableVtbl) [IID_IEnterpriseKeyCredentialRegistrationInfo] { + fn get_TenantId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TenantName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KeyId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KeyName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IEnterpriseKeyCredentialRegistrationInfo { + #[inline] pub unsafe fn get_tenant_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TenantId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tenant_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TenantName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subject(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EnterpriseKeyCredentialRegistrationInfo: IEnterpriseKeyCredentialRegistrationInfo} + DEFINE_IID!(IID_IEnterpriseKeyCredentialRegistrationManagerStatics, 2008571550, 44276, 19392, 186, 194, 64, 187, 70, 239, 187, 63); + RT_INTERFACE!{static interface IEnterpriseKeyCredentialRegistrationManagerStatics(IEnterpriseKeyCredentialRegistrationManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IEnterpriseKeyCredentialRegistrationManagerStatics] { + fn get_Current(&mut self, out: *mut *mut EnterpriseKeyCredentialRegistrationManager) -> HRESULT + }} + impl IEnterpriseKeyCredentialRegistrationManagerStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EnterpriseKeyCredentialRegistrationManager: IEnterpriseKeyCredentialRegistrationManager} + RT_ACTIVATABLE!{IEnterpriseKeyCredentialRegistrationManagerStatics [CLSID_EnterpriseKeyCredentialRegistrationManager]} + DEFINE_CLSID!(CLSID_EnterpriseKeyCredentialRegistrationManager = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,73,100,101,110,116,105,116,121,46,69,110,116,101,114,112,114,105,115,101,75,101,121,67,114,101,100,101,110,116,105,97,108,82,101,103,105,115,116,114,97,116,105,111,110,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IEnterpriseKeyCredentialRegistrationManager, 2213789247, 41567, 19642, 187, 142, 189, 195, 45, 3, 194, 151); + RT_INTERFACE!{interface IEnterpriseKeyCredentialRegistrationManager(IEnterpriseKeyCredentialRegistrationManagerVtbl): IInspectable(IInspectableVtbl) [IID_IEnterpriseKeyCredentialRegistrationManager] { + fn GetRegistrationsAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + }} + impl IEnterpriseKeyCredentialRegistrationManager { + #[inline] pub unsafe fn get_registrations_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRegistrationsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +pub mod provider { // Windows.Security.Authentication.Identity.Provider +use ::prelude::*; + RT_ENUM! { enum SecondaryAuthenticationFactorDeviceCapabilities: u32 { + None (SecondaryAuthenticationFactorDeviceCapabilities_None) = 0, SecureStorage (SecondaryAuthenticationFactorDeviceCapabilities_SecureStorage) = 1, StoreKeys (SecondaryAuthenticationFactorDeviceCapabilities_StoreKeys) = 2, ConfirmUserIntentToAuthenticate (SecondaryAuthenticationFactorDeviceCapabilities_ConfirmUserIntentToAuthenticate) = 4, SupportSecureUserPresenceCheck (SecondaryAuthenticationFactorDeviceCapabilities_SupportSecureUserPresenceCheck) = 8, TransmittedDataIsEncrypted (SecondaryAuthenticationFactorDeviceCapabilities_TransmittedDataIsEncrypted) = 16, HMacSha256 (SecondaryAuthenticationFactorDeviceCapabilities_HMacSha256) = 32, + }} + RT_ENUM! { enum SecondaryAuthenticationFactorDeviceFindScope: i32 { + User (SecondaryAuthenticationFactorDeviceFindScope_User) = 0, AllUsers (SecondaryAuthenticationFactorDeviceFindScope_AllUsers) = 1, + }} + RT_ENUM! { enum SecondaryAuthenticationFactorAuthenticationStage: i32 { + NotStarted (SecondaryAuthenticationFactorAuthenticationStage_NotStarted) = 0, WaitingForUserConfirmation (SecondaryAuthenticationFactorAuthenticationStage_WaitingForUserConfirmation) = 1, CollectingCredential (SecondaryAuthenticationFactorAuthenticationStage_CollectingCredential) = 2, SuspendingAuthentication (SecondaryAuthenticationFactorAuthenticationStage_SuspendingAuthentication) = 3, CredentialCollected (SecondaryAuthenticationFactorAuthenticationStage_CredentialCollected) = 4, CredentialAuthenticated (SecondaryAuthenticationFactorAuthenticationStage_CredentialAuthenticated) = 5, StoppingAuthentication (SecondaryAuthenticationFactorAuthenticationStage_StoppingAuthentication) = 6, ReadyForLock (SecondaryAuthenticationFactorAuthenticationStage_ReadyForLock) = 7, + }} + RT_ENUM! { enum SecondaryAuthenticationFactorRegistrationStatus: i32 { + Failed (SecondaryAuthenticationFactorRegistrationStatus_Failed) = 0, Started (SecondaryAuthenticationFactorRegistrationStatus_Started) = 1, CanceledByUser (SecondaryAuthenticationFactorRegistrationStatus_CanceledByUser) = 2, PinSetupRequired (SecondaryAuthenticationFactorRegistrationStatus_PinSetupRequired) = 3, DisabledByPolicy (SecondaryAuthenticationFactorRegistrationStatus_DisabledByPolicy) = 4, + }} + RT_ENUM! { enum SecondaryAuthenticationFactorAuthenticationStatus: i32 { + Failed (SecondaryAuthenticationFactorAuthenticationStatus_Failed) = 0, Started (SecondaryAuthenticationFactorAuthenticationStatus_Started) = 1, UnknownDevice (SecondaryAuthenticationFactorAuthenticationStatus_UnknownDevice) = 2, DisabledByPolicy (SecondaryAuthenticationFactorAuthenticationStatus_DisabledByPolicy) = 3, InvalidAuthenticationStage (SecondaryAuthenticationFactorAuthenticationStatus_InvalidAuthenticationStage) = 4, + }} + RT_ENUM! { enum SecondaryAuthenticationFactorFinishAuthenticationStatus: i32 { + Failed (SecondaryAuthenticationFactorFinishAuthenticationStatus_Failed) = 0, Completed (SecondaryAuthenticationFactorFinishAuthenticationStatus_Completed) = 1, NonceExpired (SecondaryAuthenticationFactorFinishAuthenticationStatus_NonceExpired) = 2, + }} + RT_ENUM! { enum SecondaryAuthenticationFactorAuthenticationScenario: i32 { + SignIn (SecondaryAuthenticationFactorAuthenticationScenario_SignIn) = 0, CredentialPrompt (SecondaryAuthenticationFactorAuthenticationScenario_CredentialPrompt) = 1, + }} + RT_ENUM! { enum SecondaryAuthenticationFactorAuthenticationMessage: i32 { + Invalid (SecondaryAuthenticationFactorAuthenticationMessage_Invalid) = 0, SwipeUpWelcome (SecondaryAuthenticationFactorAuthenticationMessage_SwipeUpWelcome) = 1, TapWelcome (SecondaryAuthenticationFactorAuthenticationMessage_TapWelcome) = 2, DeviceNeedsAttention (SecondaryAuthenticationFactorAuthenticationMessage_DeviceNeedsAttention) = 3, LookingForDevice (SecondaryAuthenticationFactorAuthenticationMessage_LookingForDevice) = 4, LookingForDevicePluggedin (SecondaryAuthenticationFactorAuthenticationMessage_LookingForDevicePluggedin) = 5, BluetoothIsDisabled (SecondaryAuthenticationFactorAuthenticationMessage_BluetoothIsDisabled) = 6, NfcIsDisabled (SecondaryAuthenticationFactorAuthenticationMessage_NfcIsDisabled) = 7, WiFiIsDisabled (SecondaryAuthenticationFactorAuthenticationMessage_WiFiIsDisabled) = 8, ExtraTapIsRequired (SecondaryAuthenticationFactorAuthenticationMessage_ExtraTapIsRequired) = 9, DisabledByPolicy (SecondaryAuthenticationFactorAuthenticationMessage_DisabledByPolicy) = 10, TapOnDeviceRequired (SecondaryAuthenticationFactorAuthenticationMessage_TapOnDeviceRequired) = 11, HoldFinger (SecondaryAuthenticationFactorAuthenticationMessage_HoldFinger) = 12, ScanFinger (SecondaryAuthenticationFactorAuthenticationMessage_ScanFinger) = 13, UnauthorizedUser (SecondaryAuthenticationFactorAuthenticationMessage_UnauthorizedUser) = 14, ReregisterRequired (SecondaryAuthenticationFactorAuthenticationMessage_ReregisterRequired) = 15, TryAgain (SecondaryAuthenticationFactorAuthenticationMessage_TryAgain) = 16, SayPassphrase (SecondaryAuthenticationFactorAuthenticationMessage_SayPassphrase) = 17, ReadyToSignIn (SecondaryAuthenticationFactorAuthenticationMessage_ReadyToSignIn) = 18, UseAnotherSignInOption (SecondaryAuthenticationFactorAuthenticationMessage_UseAnotherSignInOption) = 19, + }} + DEFINE_IID!(IID_ISecondaryAuthenticationFactorRegistrationResult, 2768123376, 44515, 18817, 175, 107, 236, 25, 89, 33, 104, 42); + RT_INTERFACE!{interface ISecondaryAuthenticationFactorRegistrationResult(ISecondaryAuthenticationFactorRegistrationResultVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorRegistrationResult] { + fn get_Status(&mut self, out: *mut SecondaryAuthenticationFactorRegistrationStatus) -> HRESULT, + fn get_Registration(&mut self, out: *mut *mut SecondaryAuthenticationFactorRegistration) -> HRESULT + }} + impl ISecondaryAuthenticationFactorRegistrationResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_registration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Registration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SecondaryAuthenticationFactorRegistration: ISecondaryAuthenticationFactorRegistration} + RT_ACTIVATABLE!{ISecondaryAuthenticationFactorRegistrationStatics [CLSID_SecondaryAuthenticationFactorRegistration]} + DEFINE_CLSID!(CLSID_SecondaryAuthenticationFactorRegistration = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,73,100,101,110,116,105,116,121,46,80,114,111,118,105,100,101,114,46,83,101,99,111,110,100,97,114,121,65,117,116,104,101,110,116,105,99,97,116,105,111,110,70,97,99,116,111,114,82,101,103,105,115,116,114,97,116,105,111,110,0]); + RT_CLASS!{class SecondaryAuthenticationFactorRegistrationResult: ISecondaryAuthenticationFactorRegistrationResult} + DEFINE_IID!(IID_ISecondaryAuthenticationFactorAuthenticationResult, 2629523847, 61293, 19394, 191, 73, 70, 23, 81, 90, 15, 154); + RT_INTERFACE!{interface ISecondaryAuthenticationFactorAuthenticationResult(ISecondaryAuthenticationFactorAuthenticationResultVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorAuthenticationResult] { + fn get_Status(&mut self, out: *mut SecondaryAuthenticationFactorAuthenticationStatus) -> HRESULT, + fn get_Authentication(&mut self, out: *mut *mut SecondaryAuthenticationFactorAuthentication) -> HRESULT + }} + impl ISecondaryAuthenticationFactorAuthenticationResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_authentication(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Authentication)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SecondaryAuthenticationFactorAuthentication: ISecondaryAuthenticationFactorAuthentication} + RT_ACTIVATABLE!{ISecondaryAuthenticationFactorAuthenticationStatics [CLSID_SecondaryAuthenticationFactorAuthentication]} + DEFINE_CLSID!(CLSID_SecondaryAuthenticationFactorAuthentication = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,73,100,101,110,116,105,116,121,46,80,114,111,118,105,100,101,114,46,83,101,99,111,110,100,97,114,121,65,117,116,104,101,110,116,105,99,97,116,105,111,110,70,97,99,116,111,114,65,117,116,104,101,110,116,105,99,97,116,105,111,110,0]); + RT_CLASS!{class SecondaryAuthenticationFactorAuthenticationResult: ISecondaryAuthenticationFactorAuthenticationResult} + DEFINE_IID!(IID_ISecondaryAuthenticationFactorRegistrationStatics, 450826085, 58295, 16725, 153, 127, 183, 86, 239, 101, 190, 186); + RT_INTERFACE!{static interface ISecondaryAuthenticationFactorRegistrationStatics(ISecondaryAuthenticationFactorRegistrationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorRegistrationStatics] { + #[cfg(feature="windows.storage")] fn RequestStartRegisteringDeviceAsync(&mut self, deviceId: HSTRING, capabilities: SecondaryAuthenticationFactorDeviceCapabilities, deviceFriendlyName: HSTRING, deviceModelNumber: HSTRING, deviceKey: *mut ::rt::gen::windows::storage::streams::IBuffer, mutualAuthenticationKey: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn FindAllRegisteredDeviceInfoAsync(&mut self, queryType: SecondaryAuthenticationFactorDeviceFindScope, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn UnregisterDeviceAsync(&mut self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows.storage")] fn UpdateDeviceConfigurationDataAsync(&mut self, deviceId: HSTRING, deviceConfigurationData: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl ISecondaryAuthenticationFactorRegistrationStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn request_start_registering_device_async(&mut self, deviceId: &HStringArg, capabilities: SecondaryAuthenticationFactorDeviceCapabilities, deviceFriendlyName: &HStringArg, deviceModelNumber: &HStringArg, deviceKey: &::rt::gen::windows::storage::streams::IBuffer, mutualAuthenticationKey: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStartRegisteringDeviceAsync)(self, deviceId.get(), capabilities, deviceFriendlyName.get(), deviceModelNumber.get(), deviceKey as *const _ as *mut _, mutualAuthenticationKey as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_registered_device_info_async(&mut self, queryType: SecondaryAuthenticationFactorDeviceFindScope) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllRegisteredDeviceInfoAsync)(self, queryType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn unregister_device_async(&mut self, deviceId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnregisterDeviceAsync)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn update_device_configuration_data_async(&mut self, deviceId: &HStringArg, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateDeviceConfigurationDataAsync)(self, deviceId.get(), deviceConfigurationData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SecondaryAuthenticationFactorInfo: ISecondaryAuthenticationFactorInfo} + DEFINE_IID!(IID_ISecondaryAuthenticationFactorRegistration, 2672606132, 36026, 18608, 132, 13, 219, 178, 42, 84, 198, 120); + RT_INTERFACE!{interface ISecondaryAuthenticationFactorRegistration(ISecondaryAuthenticationFactorRegistrationVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorRegistration] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn FinishRegisteringDeviceAsync(&mut self, deviceConfigurationData: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn AbortRegisteringDeviceAsync(&mut self, errorLogMessage: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl ISecondaryAuthenticationFactorRegistration { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn finish_registering_device_async(&mut self, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FinishRegisteringDeviceAsync)(self, deviceConfigurationData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn abort_registering_device_async(&mut self, errorLogMessage: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AbortRegisteringDeviceAsync)(self, errorLogMessage.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISecondaryAuthenticationFactorAuthenticationStatics, 1062741590, 10488, 19983, 174, 140, 88, 152, 185, 174, 36, 105); + RT_INTERFACE!{static interface ISecondaryAuthenticationFactorAuthenticationStatics(ISecondaryAuthenticationFactorAuthenticationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorAuthenticationStatics] { + fn ShowNotificationMessageAsync(&mut self, deviceName: HSTRING, message: SecondaryAuthenticationFactorAuthenticationMessage, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn StartAuthenticationAsync(&mut self, deviceId: HSTRING, serviceAuthenticationNonce: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn add_AuthenticationStageChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::EventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AuthenticationStageChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn GetAuthenticationStageInfoAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl ISecondaryAuthenticationFactorAuthenticationStatics { + #[inline] pub unsafe fn show_notification_message_async(&mut self, deviceName: &HStringArg, message: SecondaryAuthenticationFactorAuthenticationMessage) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowNotificationMessageAsync)(self, deviceName.get(), message, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn start_authentication_async(&mut self, deviceId: &HStringArg, serviceAuthenticationNonce: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartAuthenticationAsync)(self, deviceId.get(), serviceAuthenticationNonce as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_authentication_stage_changed(&mut self, handler: &::rt::gen::windows::foundation::EventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AuthenticationStageChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_authentication_stage_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AuthenticationStageChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_authentication_stage_info_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAuthenticationStageInfoAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SecondaryAuthenticationFactorAuthenticationStageChangedEventArgs: ISecondaryAuthenticationFactorAuthenticationStageChangedEventArgs} + RT_CLASS!{class SecondaryAuthenticationFactorAuthenticationStageInfo: ISecondaryAuthenticationFactorAuthenticationStageInfo} + DEFINE_IID!(IID_ISecondaryAuthenticationFactorAuthentication, 34215653, 27173, 16547, 140, 0, 80, 160, 35, 246, 25, 209); + RT_INTERFACE!{interface ISecondaryAuthenticationFactorAuthentication(ISecondaryAuthenticationFactorAuthenticationVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorAuthentication] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_ServiceAuthenticationHmac(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_SessionNonce(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_DeviceNonce(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_DeviceConfigurationData(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn FinishAuthenticationAsync(&mut self, deviceHmac: *mut ::rt::gen::windows::storage::streams::IBuffer, sessionHmac: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn AbortAuthenticationAsync(&mut self, errorLogMessage: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl ISecondaryAuthenticationFactorAuthentication { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_service_authentication_hmac(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceAuthenticationHmac)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_session_nonce(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SessionNonce)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_device_nonce(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceNonce)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_device_configuration_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceConfigurationData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn finish_authentication_async(&mut self, deviceHmac: &::rt::gen::windows::storage::streams::IBuffer, sessionHmac: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FinishAuthenticationAsync)(self, deviceHmac as *const _ as *mut _, sessionHmac as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn abort_authentication_async(&mut self, errorLogMessage: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AbortAuthenticationAsync)(self, errorLogMessage.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISecondaryAuthenticationFactorInfo, 506177633, 34099, 20430, 131, 155, 236, 183, 36, 16, 172, 20); + RT_INTERFACE!{interface ISecondaryAuthenticationFactorInfo(ISecondaryAuthenticationFactorInfoVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorInfo] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DeviceFriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DeviceModelNumber(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_DeviceConfigurationData(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl ISecondaryAuthenticationFactorInfo { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceFriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_model_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceModelNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_device_configuration_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceConfigurationData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISecondaryAuthenticationFactorAuthenticationStageInfo, 1459536523, 59562, 19471, 142, 76, 165, 89, 231, 58, 221, 136); + RT_INTERFACE!{interface ISecondaryAuthenticationFactorAuthenticationStageInfo(ISecondaryAuthenticationFactorAuthenticationStageInfoVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorAuthenticationStageInfo] { + fn get_Stage(&mut self, out: *mut SecondaryAuthenticationFactorAuthenticationStage) -> HRESULT, + fn get_Scenario(&mut self, out: *mut SecondaryAuthenticationFactorAuthenticationScenario) -> HRESULT, + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISecondaryAuthenticationFactorAuthenticationStageInfo { + #[inline] pub unsafe fn get_stage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Stage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scenario(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Scenario)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISecondaryAuthenticationFactorAuthenticationStageChangedEventArgs, 3567644246, 29329, 16499, 188, 31, 204, 184, 245, 175, 223, 150); + RT_INTERFACE!{interface ISecondaryAuthenticationFactorAuthenticationStageChangedEventArgs(ISecondaryAuthenticationFactorAuthenticationStageChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorAuthenticationStageChangedEventArgs] { + fn get_StageInfo(&mut self, out: *mut *mut SecondaryAuthenticationFactorAuthenticationStageInfo) -> HRESULT + }} + impl ISecondaryAuthenticationFactorAuthenticationStageChangedEventArgs { + #[inline] pub unsafe fn get_stage_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StageInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Security.Authentication.Identity.Provider +pub mod core { // Windows.Security.Authentication.Identity.Core +use ::prelude::*; + RT_ENUM! { enum MicrosoftAccountMultiFactorServiceResponse: i32 { + Success (MicrosoftAccountMultiFactorServiceResponse_Success) = 0, Error (MicrosoftAccountMultiFactorServiceResponse_Error) = 1, NoNetworkConnection (MicrosoftAccountMultiFactorServiceResponse_NoNetworkConnection) = 2, ServiceUnavailable (MicrosoftAccountMultiFactorServiceResponse_ServiceUnavailable) = 3, TotpSetupDenied (MicrosoftAccountMultiFactorServiceResponse_TotpSetupDenied) = 4, NgcNotSetup (MicrosoftAccountMultiFactorServiceResponse_NgcNotSetup) = 5, SessionAlreadyDenied (MicrosoftAccountMultiFactorServiceResponse_SessionAlreadyDenied) = 6, SessionAlreadyApproved (MicrosoftAccountMultiFactorServiceResponse_SessionAlreadyApproved) = 7, SessionExpired (MicrosoftAccountMultiFactorServiceResponse_SessionExpired) = 8, NgcNonceExpired (MicrosoftAccountMultiFactorServiceResponse_NgcNonceExpired) = 9, InvalidSessionId (MicrosoftAccountMultiFactorServiceResponse_InvalidSessionId) = 10, InvalidSessionType (MicrosoftAccountMultiFactorServiceResponse_InvalidSessionType) = 11, InvalidOperation (MicrosoftAccountMultiFactorServiceResponse_InvalidOperation) = 12, InvalidStateTransition (MicrosoftAccountMultiFactorServiceResponse_InvalidStateTransition) = 13, DeviceNotFound (MicrosoftAccountMultiFactorServiceResponse_DeviceNotFound) = 14, FlowDisabled (MicrosoftAccountMultiFactorServiceResponse_FlowDisabled) = 15, SessionNotApproved (MicrosoftAccountMultiFactorServiceResponse_SessionNotApproved) = 16, OperationCanceledByUser (MicrosoftAccountMultiFactorServiceResponse_OperationCanceledByUser) = 17, NgcDisabledByServer (MicrosoftAccountMultiFactorServiceResponse_NgcDisabledByServer) = 18, NgcKeyNotFoundOnServer (MicrosoftAccountMultiFactorServiceResponse_NgcKeyNotFoundOnServer) = 19, UIRequired (MicrosoftAccountMultiFactorServiceResponse_UIRequired) = 20, DeviceIdChanged (MicrosoftAccountMultiFactorServiceResponse_DeviceIdChanged) = 21, + }} + RT_ENUM! { enum MicrosoftAccountMultiFactorSessionAuthenticationStatus: i32 { + Authenticated (MicrosoftAccountMultiFactorSessionAuthenticationStatus_Authenticated) = 0, Unauthenticated (MicrosoftAccountMultiFactorSessionAuthenticationStatus_Unauthenticated) = 1, + }} + RT_ENUM! { enum MicrosoftAccountMultiFactorAuthenticationType: i32 { + User (MicrosoftAccountMultiFactorAuthenticationType_User) = 0, Device (MicrosoftAccountMultiFactorAuthenticationType_Device) = 1, + }} + RT_ENUM! { enum MicrosoftAccountMultiFactorSessionApprovalStatus: i32 { + Pending (MicrosoftAccountMultiFactorSessionApprovalStatus_Pending) = 0, Approved (MicrosoftAccountMultiFactorSessionApprovalStatus_Approved) = 1, Denied (MicrosoftAccountMultiFactorSessionApprovalStatus_Denied) = 2, + }} + DEFINE_IID!(IID_IMicrosoftAccountMultiFactorSessionInfo, 1602137012, 41592, 17973, 183, 101, 180, 148, 235, 38, 10, 244); + RT_INTERFACE!{interface IMicrosoftAccountMultiFactorSessionInfo(IMicrosoftAccountMultiFactorSessionInfoVtbl): IInspectable(IInspectableVtbl) [IID_IMicrosoftAccountMultiFactorSessionInfo] { + fn get_UserAccountId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SessionId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplaySessionId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ApprovalStatus(&mut self, out: *mut MicrosoftAccountMultiFactorSessionApprovalStatus) -> HRESULT, + fn get_AuthenticationType(&mut self, out: *mut MicrosoftAccountMultiFactorAuthenticationType) -> HRESULT, + fn get_RequestTime(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_ExpirationTime(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + }} + impl IMicrosoftAccountMultiFactorSessionInfo { + #[inline] pub unsafe fn get_user_account_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserAccountId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_session_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SessionId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_session_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplaySessionId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_approval_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ApprovalStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_authentication_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AuthenticationType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_request_time(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_time(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExpirationTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMicrosoftAccountMultiFactorGetSessionsResult, 1310960032, 59898, 18810, 149, 222, 109, 87, 71, 191, 151, 76); + RT_INTERFACE!{interface IMicrosoftAccountMultiFactorGetSessionsResult(IMicrosoftAccountMultiFactorGetSessionsResultVtbl): IInspectable(IInspectableVtbl) [IID_IMicrosoftAccountMultiFactorGetSessionsResult] { + fn get_Sessions(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_ServiceResponse(&mut self, out: *mut MicrosoftAccountMultiFactorServiceResponse) -> HRESULT + }} + impl IMicrosoftAccountMultiFactorGetSessionsResult { + #[inline] pub unsafe fn get_sessions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sessions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_response(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceResponse)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MicrosoftAccountMultiFactorSessionInfo: IMicrosoftAccountMultiFactorSessionInfo} + DEFINE_IID!(IID_IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo, 2860434939, 55871, 16520, 162, 13, 86, 24, 175, 173, 178, 229); + RT_INTERFACE!{interface IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo(IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfoVtbl): IInspectable(IInspectableVtbl) [IID_IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo] { + fn get_Sessions(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_UnregisteredAccounts(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_ServiceResponse(&mut self, out: *mut MicrosoftAccountMultiFactorServiceResponse) -> HRESULT + }} + impl IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo { + #[inline] pub unsafe fn get_sessions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sessions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_unregistered_accounts(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UnregisteredAccounts)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_response(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceResponse)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMicrosoftAccountMultiFactorOneTimeCodedInfo, 2193237579, 55420, 18024, 169, 118, 64, 207, 174, 84, 125, 8); + RT_INTERFACE!{interface IMicrosoftAccountMultiFactorOneTimeCodedInfo(IMicrosoftAccountMultiFactorOneTimeCodedInfoVtbl): IInspectable(IInspectableVtbl) [IID_IMicrosoftAccountMultiFactorOneTimeCodedInfo] { + fn get_Code(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TimeInterval(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_TimeToLive(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_ServiceResponse(&mut self, out: *mut MicrosoftAccountMultiFactorServiceResponse) -> HRESULT + }} + impl IMicrosoftAccountMultiFactorOneTimeCodedInfo { + #[inline] pub unsafe fn get_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Code)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_interval(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeInterval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_to_live(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeToLive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_response(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ServiceResponse)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMicrosoftAccountMultiFactorAuthenticationManager, 265502885, 62836, 17184, 160, 142, 10, 25, 168, 35, 34, 170); + RT_INTERFACE!{interface IMicrosoftAccountMultiFactorAuthenticationManager(IMicrosoftAccountMultiFactorAuthenticationManagerVtbl): IInspectable(IInspectableVtbl) [IID_IMicrosoftAccountMultiFactorAuthenticationManager] { + fn GetOneTimePassCodeAsync(&mut self, userAccountId: HSTRING, codeLength: u32, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn AddDeviceAsync(&mut self, userAccountId: HSTRING, authenticationToken: HSTRING, wnsChannelId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn RemoveDeviceAsync(&mut self, userAccountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn UpdateWnsChannelAsync(&mut self, userAccountId: HSTRING, channelUri: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetSessionsAsync(&mut self, userAccountIdList: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetSessionsAndUnregisteredAccountsAsync(&mut self, userAccountIdList: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn ApproveSessionUsingAuthSessionInfoAsync(&mut self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, authenticationSessionInfo: *mut MicrosoftAccountMultiFactorSessionInfo, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn ApproveSessionAsync(&mut self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, userAccountId: HSTRING, sessionId: HSTRING, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn DenySessionUsingAuthSessionInfoAsync(&mut self, authenticationSessionInfo: *mut MicrosoftAccountMultiFactorSessionInfo, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn DenySessionAsync(&mut self, userAccountId: HSTRING, sessionId: HSTRING, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IMicrosoftAccountMultiFactorAuthenticationManager { + #[inline] pub unsafe fn get_one_time_pass_code_async(&mut self, userAccountId: &HStringArg, codeLength: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetOneTimePassCodeAsync)(self, userAccountId.get(), codeLength, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_device_async(&mut self, userAccountId: &HStringArg, authenticationToken: &HStringArg, wnsChannelId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddDeviceAsync)(self, userAccountId.get(), authenticationToken.get(), wnsChannelId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn remove_device_async(&mut self, userAccountId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RemoveDeviceAsync)(self, userAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_wns_channel_async(&mut self, userAccountId: &HStringArg, channelUri: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateWnsChannelAsync)(self, userAccountId.get(), channelUri.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sessions_async(&mut self, userAccountIdList: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSessionsAsync)(self, userAccountIdList as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sessions_and_unregistered_accounts_async(&mut self, userAccountIdList: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSessionsAndUnregisteredAccountsAsync)(self, userAccountIdList as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn approve_session_using_auth_session_info_async(&mut self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, authenticationSessionInfo: &MicrosoftAccountMultiFactorSessionInfo) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ApproveSessionUsingAuthSessionInfoAsync)(self, sessionAuthentictionStatus, authenticationSessionInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn approve_session_async(&mut self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, userAccountId: &HStringArg, sessionId: &HStringArg, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ApproveSessionAsync)(self, sessionAuthentictionStatus, userAccountId.get(), sessionId.get(), sessionAuthenticationType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn deny_session_using_auth_session_info_async(&mut self, authenticationSessionInfo: &MicrosoftAccountMultiFactorSessionInfo) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DenySessionUsingAuthSessionInfoAsync)(self, authenticationSessionInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn deny_session_async(&mut self, userAccountId: &HStringArg, sessionId: &HStringArg, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DenySessionAsync)(self, userAccountId.get(), sessionId.get(), sessionAuthenticationType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MicrosoftAccountMultiFactorOneTimeCodedInfo: IMicrosoftAccountMultiFactorOneTimeCodedInfo} + RT_CLASS!{class MicrosoftAccountMultiFactorGetSessionsResult: IMicrosoftAccountMultiFactorGetSessionsResult} + RT_CLASS!{class MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo: IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo} + DEFINE_IID!(IID_IMicrosoftAccountMultiFactorAuthenticatorStatics, 3647259366, 62534, 19569, 139, 121, 110, 164, 2, 74, 169, 184); + RT_INTERFACE!{static interface IMicrosoftAccountMultiFactorAuthenticatorStatics(IMicrosoftAccountMultiFactorAuthenticatorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMicrosoftAccountMultiFactorAuthenticatorStatics] { + fn get_Current(&mut self, out: *mut *mut MicrosoftAccountMultiFactorAuthenticationManager) -> HRESULT + }} + impl IMicrosoftAccountMultiFactorAuthenticatorStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MicrosoftAccountMultiFactorAuthenticationManager: IMicrosoftAccountMultiFactorAuthenticationManager} + RT_ACTIVATABLE!{IMicrosoftAccountMultiFactorAuthenticatorStatics [CLSID_MicrosoftAccountMultiFactorAuthenticationManager]} + DEFINE_CLSID!(CLSID_MicrosoftAccountMultiFactorAuthenticationManager = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,73,100,101,110,116,105,116,121,46,67,111,114,101,46,77,105,99,114,111,115,111,102,116,65,99,99,111,117,110,116,77,117,108,116,105,70,97,99,116,111,114,65,117,116,104,101,110,116,105,99,97,116,105,111,110,77,97,110,97,103,101,114,0]); +} // Windows.Security.Authentication.Identity.Core +} // Windows.Security.Authentication.Identity +pub mod onlineid { // Windows.Security.Authentication.OnlineId +use ::prelude::*; + RT_ENUM! { enum CredentialPromptType: i32 { + PromptIfNeeded (CredentialPromptType_PromptIfNeeded) = 0, RetypeCredentials (CredentialPromptType_RetypeCredentials) = 1, DoNotPrompt (CredentialPromptType_DoNotPrompt) = 2, + }} + DEFINE_IID!(IID_IOnlineIdServiceTicketRequest, 695485907, 64355, 16693, 137, 9, 78, 53, 76, 6, 20, 102); + RT_INTERFACE!{interface IOnlineIdServiceTicketRequest(IOnlineIdServiceTicketRequestVtbl): IInspectable(IInspectableVtbl) [IID_IOnlineIdServiceTicketRequest] { + fn get_Service(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Policy(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IOnlineIdServiceTicketRequest { + #[inline] pub unsafe fn get_service(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Service)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_policy(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Policy)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IOnlineIdServiceTicketRequestFactory, 3199928840, 40563, 16503, 150, 20, 8, 97, 76, 11, 194, 69); + RT_INTERFACE!{static interface IOnlineIdServiceTicketRequestFactory(IOnlineIdServiceTicketRequestFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IOnlineIdServiceTicketRequestFactory] { + fn CreateOnlineIdServiceTicketRequest(&mut self, service: HSTRING, policy: HSTRING, out: *mut *mut OnlineIdServiceTicketRequest) -> HRESULT, + fn CreateOnlineIdServiceTicketRequestAdvanced(&mut self, service: HSTRING, out: *mut *mut OnlineIdServiceTicketRequest) -> HRESULT + }} + impl IOnlineIdServiceTicketRequestFactory { + #[inline] pub unsafe fn create_online_id_service_ticket_request(&mut self, service: &HStringArg, policy: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateOnlineIdServiceTicketRequest)(self, service.get(), policy.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_online_id_service_ticket_request_advanced(&mut self, service: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateOnlineIdServiceTicketRequestAdvanced)(self, service.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class OnlineIdServiceTicketRequest: IOnlineIdServiceTicketRequest [IOnlineIdServiceTicketRequestFactory] [CLSID_OnlineIdServiceTicketRequest]} + DEFINE_CLSID!(CLSID_OnlineIdServiceTicketRequest = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,79,110,108,105,110,101,73,100,46,79,110,108,105,110,101,73,100,83,101,114,118,105,99,101,84,105,99,107,101,116,82,101,113,117,101,115,116,0]); + DEFINE_IID!(IID_IOnlineIdServiceTicket, 3378271359, 55169, 19092, 172, 184, 197, 152, 116, 35, 140, 38); + RT_INTERFACE!{interface IOnlineIdServiceTicket(IOnlineIdServiceTicketVtbl): IInspectable(IInspectableVtbl) [IID_IOnlineIdServiceTicket] { + fn get_Value(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Request(&mut self, out: *mut *mut OnlineIdServiceTicketRequest) -> HRESULT, + fn get_ErrorCode(&mut self, out: *mut i32) -> HRESULT + }} + impl IOnlineIdServiceTicket { + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserIdentity, 558291405, 1858, 19427, 138, 28, 124, 122, 230, 121, 170, 136); + RT_INTERFACE!{interface IUserIdentity(IUserIdentityVtbl): IInspectable(IInspectableVtbl) [IID_IUserIdentity] { + fn get_Tickets(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SafeCustomerId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SignInName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FirstName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LastName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsBetaAccount(&mut self, out: *mut bool) -> HRESULT, + fn get_IsConfirmedPC(&mut self, out: *mut bool) -> HRESULT + }} + impl IUserIdentity { + #[inline] pub unsafe fn get_tickets(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tickets)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_safe_customer_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SafeCustomerId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sign_in_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SignInName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FirstName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LastName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_beta_account(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsBetaAccount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_confirmed_pc(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsConfirmedPC)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class OnlineIdServiceTicket: IOnlineIdServiceTicket} + DEFINE_IID!(IID_IOnlineIdAuthenticator, 2684614026, 10667, 18455, 184, 132, 215, 81, 109, 173, 24, 185); + RT_INTERFACE!{interface IOnlineIdAuthenticator(IOnlineIdAuthenticatorVtbl): IInspectable(IInspectableVtbl) [IID_IOnlineIdAuthenticator] { + fn AuthenticateUserAsync(&mut self, request: *mut OnlineIdServiceTicketRequest, out: *mut *mut UserAuthenticationOperation) -> HRESULT, + fn AuthenticateUserAsyncAdvanced(&mut self, requests: *mut ::rt::gen::windows::foundation::collections::IIterable, credentialPromptType: CredentialPromptType, out: *mut *mut UserAuthenticationOperation) -> HRESULT, + fn SignOutUserAsync(&mut self, out: *mut *mut SignOutUserOperation) -> HRESULT, + fn put_ApplicationId(&mut self, value: Guid) -> HRESULT, + fn get_ApplicationId(&mut self, out: *mut Guid) -> HRESULT, + fn get_CanSignOut(&mut self, out: *mut bool) -> HRESULT, + fn get_AuthenticatedSafeCustomerId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IOnlineIdAuthenticator { + #[inline] pub unsafe fn authenticate_user_async(&mut self, request: &OnlineIdServiceTicketRequest) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AuthenticateUserAsync)(self, request as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn authenticate_user_async_advanced(&mut self, requests: &::rt::gen::windows::foundation::collections::IIterable, credentialPromptType: CredentialPromptType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AuthenticateUserAsyncAdvanced)(self, requests as *const _ as *mut _, credentialPromptType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn sign_out_user_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SignOutUserAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_application_id(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).put_ApplicationId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_application_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ApplicationId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_sign_out(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanSignOut)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_authenticated_safe_customer_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AuthenticatedSafeCustomerId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UserAuthenticationOperation: ::rt::gen::windows::foundation::IAsyncOperation} + RT_CLASS!{class SignOutUserOperation: ::rt::gen::windows::foundation::IAsyncAction} + RT_CLASS!{class UserIdentity: IUserIdentity} + RT_CLASS!{class OnlineIdAuthenticator: IOnlineIdAuthenticator} +} // Windows.Security.Authentication.OnlineId +pub mod web { // Windows.Security.Authentication.Web +use ::prelude::*; + RT_ENUM! { enum TokenBindingKeyType: i32 { + Rsa2048 (TokenBindingKeyType_Rsa2048) = 0, EcdsaP256 (TokenBindingKeyType_EcdsaP256) = 1, AnyExisting (TokenBindingKeyType_AnyExisting) = 2, + }} + RT_ENUM! { enum WebAuthenticationStatus: i32 { + Success (WebAuthenticationStatus_Success) = 0, UserCancel (WebAuthenticationStatus_UserCancel) = 1, ErrorHttp (WebAuthenticationStatus_ErrorHttp) = 2, + }} + RT_ENUM! { enum WebAuthenticationOptions: u32 { + None (WebAuthenticationOptions_None) = 0, SilentMode (WebAuthenticationOptions_SilentMode) = 1, UseTitle (WebAuthenticationOptions_UseTitle) = 2, UseHttpPost (WebAuthenticationOptions_UseHttpPost) = 4, UseCorporateNetwork (WebAuthenticationOptions_UseCorporateNetwork) = 8, + }} + DEFINE_IID!(IID_IWebAuthenticationResult, 1677732683, 60905, 18186, 165, 205, 3, 35, 250, 246, 226, 98); + RT_INTERFACE!{interface IWebAuthenticationResult(IWebAuthenticationResultVtbl): IInspectable(IInspectableVtbl) [IID_IWebAuthenticationResult] { + fn get_ResponseData(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ResponseStatus(&mut self, out: *mut WebAuthenticationStatus) -> HRESULT, + fn get_ResponseErrorDetail(&mut self, out: *mut u32) -> HRESULT + }} + impl IWebAuthenticationResult { + #[inline] pub unsafe fn get_response_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResponseData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_response_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResponseStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_response_error_detail(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResponseErrorDetail)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class WebAuthenticationResult: IWebAuthenticationResult} + DEFINE_IID!(IID_IWebAuthenticationBrokerStatics, 789880602, 58995, 16565, 188, 34, 32, 26, 104, 100, 163, 123); + RT_INTERFACE!{static interface IWebAuthenticationBrokerStatics(IWebAuthenticationBrokerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWebAuthenticationBrokerStatics] { + fn AuthenticateWithCallbackUriAsync(&mut self, options: WebAuthenticationOptions, requestUri: *mut ::rt::gen::windows::foundation::Uri, callbackUri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn AuthenticateWithoutCallbackUriAsync(&mut self, options: WebAuthenticationOptions, requestUri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetCurrentApplicationCallbackUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT + }} + impl IWebAuthenticationBrokerStatics { + #[inline] pub unsafe fn authenticate_with_callback_uri_async(&mut self, options: WebAuthenticationOptions, requestUri: &::rt::gen::windows::foundation::Uri, callbackUri: &::rt::gen::windows::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AuthenticateWithCallbackUriAsync)(self, options, requestUri as *const _ as *mut _, callbackUri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn authenticate_without_callback_uri_async(&mut self, options: WebAuthenticationOptions, requestUri: &::rt::gen::windows::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AuthenticateWithoutCallbackUriAsync)(self, options, requestUri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_application_callback_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentApplicationCallbackUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAuthenticationBrokerStatics2, 1942879134, 5351, 16858, 169, 113, 170, 244, 65, 11, 98, 30); + RT_INTERFACE!{static interface IWebAuthenticationBrokerStatics2(IWebAuthenticationBrokerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IWebAuthenticationBrokerStatics2] { + fn AuthenticateAndContinue(&mut self, requestUri: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn AuthenticateWithCallbackUriAndContinue(&mut self, requestUri: *mut ::rt::gen::windows::foundation::Uri, callbackUri: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue(&mut self, requestUri: *mut ::rt::gen::windows::foundation::Uri, callbackUri: *mut ::rt::gen::windows::foundation::Uri, continuationData: *mut ::rt::gen::windows::foundation::collections::ValueSet, options: WebAuthenticationOptions) -> HRESULT, + fn AuthenticateSilentlyAsync(&mut self, requestUri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn AuthenticateSilentlyWithOptionsAsync(&mut self, requestUri: *mut ::rt::gen::windows::foundation::Uri, options: WebAuthenticationOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IWebAuthenticationBrokerStatics2 { + #[inline] pub unsafe fn authenticate_and_continue(&mut self, requestUri: &::rt::gen::windows::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).AuthenticateAndContinue)(self, requestUri as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn authenticate_with_callback_uri_and_continue(&mut self, requestUri: &::rt::gen::windows::foundation::Uri, callbackUri: &::rt::gen::windows::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).AuthenticateWithCallbackUriAndContinue)(self, requestUri as *const _ as *mut _, callbackUri as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn authenticate_with_callback_uri_continuation_data_and_options_and_continue(&mut self, requestUri: &::rt::gen::windows::foundation::Uri, callbackUri: &::rt::gen::windows::foundation::Uri, continuationData: &::rt::gen::windows::foundation::collections::ValueSet, options: WebAuthenticationOptions) -> Result<()> { + let hr = ((*self.lpVtbl).AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue)(self, requestUri as *const _ as *mut _, callbackUri as *const _ as *mut _, continuationData as *const _ as *mut _, options); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn authenticate_silently_async(&mut self, requestUri: &::rt::gen::windows::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AuthenticateSilentlyAsync)(self, requestUri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn authenticate_silently_with_options_async(&mut self, requestUri: &::rt::gen::windows::foundation::Uri, options: WebAuthenticationOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AuthenticateSilentlyWithOptionsAsync)(self, requestUri as *const _ as *mut _, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IWebAuthenticationBrokerStatics [CLSID_WebAuthenticationBroker]} + RT_ACTIVATABLE!{IWebAuthenticationBrokerStatics2 [CLSID_WebAuthenticationBroker]} + DEFINE_CLSID!(CLSID_WebAuthenticationBroker = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,87,101,98,46,87,101,98,65,117,116,104,101,110,116,105,99,97,116,105,111,110,66,114,111,107,101,114,0]); +pub mod provider { // Windows.Security.Authentication.Web.Provider +use ::prelude::*; + RT_ENUM! { enum WebAccountProviderOperationKind: i32 { + RequestToken (WebAccountProviderOperationKind_RequestToken) = 0, GetTokenSilently (WebAccountProviderOperationKind_GetTokenSilently) = 1, AddAccount (WebAccountProviderOperationKind_AddAccount) = 2, ManageAccount (WebAccountProviderOperationKind_ManageAccount) = 3, DeleteAccount (WebAccountProviderOperationKind_DeleteAccount) = 4, RetrieveCookies (WebAccountProviderOperationKind_RetrieveCookies) = 5, SignOutAccount (WebAccountProviderOperationKind_SignOutAccount) = 6, + }} + DEFINE_IID!(IID_IWebAccountProviderOperation, 1834820646, 4273, 16794, 164, 78, 249, 197, 22, 21, 116, 230); + RT_INTERFACE!{interface IWebAccountProviderOperation(IWebAccountProviderOperationVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderOperation] { + fn get_Kind(&mut self, out: *mut WebAccountProviderOperationKind) -> HRESULT + }} + impl IWebAccountProviderOperation { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum WebAccountSelectionOptions: u32 { + Default (WebAccountSelectionOptions_Default) = 0, New (WebAccountSelectionOptions_New) = 1, + }} + DEFINE_IID!(IID_IWebProviderTokenRequest, 504919947, 34821, 17739, 159, 17, 70, 141, 42, 241, 9, 90); + RT_INTERFACE!{interface IWebProviderTokenRequest(IWebProviderTokenRequestVtbl): IInspectable(IInspectableVtbl) [IID_IWebProviderTokenRequest] { + fn get_ClientRequest(&mut self, out: *mut *mut super::core::WebTokenRequest) -> HRESULT, + fn get_WebAccounts(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_WebAccountSelectionOptions(&mut self, out: *mut WebAccountSelectionOptions) -> HRESULT, + fn get_ApplicationCallbackUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn GetApplicationTokenBindingKeyAsync(&mut self, keyType: super::TokenBindingKeyType, target: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IWebProviderTokenRequest { + #[inline] pub unsafe fn get_client_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ClientRequest)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_web_accounts(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebAccounts)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_web_account_selection_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WebAccountSelectionOptions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_application_callback_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ApplicationCallbackUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_application_token_binding_key_async(&mut self, keyType: super::TokenBindingKeyType, target: &::rt::gen::windows::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetApplicationTokenBindingKeyAsync)(self, keyType, target as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebProviderTokenRequest2, 3050778188, 4273, 19110, 136, 177, 11, 108, 158, 12, 30, 70); + RT_INTERFACE!{interface IWebProviderTokenRequest2(IWebProviderTokenRequest2Vtbl): IInspectable(IInspectableVtbl) [IID_IWebProviderTokenRequest2] { + #[cfg(feature="windows.storage")] fn GetApplicationTokenBindingKeyIdAsync(&mut self, keyType: super::TokenBindingKeyType, target: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT + }} + impl IWebProviderTokenRequest2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_application_token_binding_key_id_async(&mut self, keyType: super::TokenBindingKeyType, target: &::rt::gen::windows::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetApplicationTokenBindingKeyIdAsync)(self, keyType, target as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebProviderTokenRequest: IWebProviderTokenRequest} + DEFINE_IID!(IID_IWebProviderTokenResponse, 4011931539, 61269, 16774, 183, 206, 140, 178, 231, 249, 132, 158); + RT_INTERFACE!{interface IWebProviderTokenResponse(IWebProviderTokenResponseVtbl): IInspectable(IInspectableVtbl) [IID_IWebProviderTokenResponse] { + fn get_ClientResponse(&mut self, out: *mut *mut super::core::WebTokenResponse) -> HRESULT + }} + impl IWebProviderTokenResponse { + #[inline] pub unsafe fn get_client_response(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ClientResponse)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebProviderTokenResponseFactory, 4199143834, 9658, 16503, 156, 250, 157, 180, 222, 167, 183, 26); + RT_INTERFACE!{static interface IWebProviderTokenResponseFactory(IWebProviderTokenResponseFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWebProviderTokenResponseFactory] { + fn Create(&mut self, webTokenResponse: *mut super::core::WebTokenResponse, out: *mut *mut WebProviderTokenResponse) -> HRESULT + }} + impl IWebProviderTokenResponseFactory { + #[inline] pub unsafe fn create(&mut self, webTokenResponse: &super::core::WebTokenResponse) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, webTokenResponse as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebProviderTokenResponse: IWebProviderTokenResponse [IWebProviderTokenResponseFactory] [CLSID_WebProviderTokenResponse]} + DEFINE_CLSID!(CLSID_WebProviderTokenResponse = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,87,101,98,46,80,114,111,118,105,100,101,114,46,87,101,98,80,114,111,118,105,100,101,114,84,111,107,101,110,82,101,115,112,111,110,115,101,0]); + RT_ENUM! { enum WebAccountClientViewType: i32 { + IdOnly (WebAccountClientViewType_IdOnly) = 0, IdAndProperties (WebAccountClientViewType_IdAndProperties) = 1, + }} + DEFINE_IID!(IID_IWebAccountClientView, 3887949498, 3015, 19558, 191, 212, 101, 211, 8, 44, 188, 168); + RT_INTERFACE!{interface IWebAccountClientView(IWebAccountClientViewVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountClientView] { + fn get_ApplicationCallbackUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_Type(&mut self, out: *mut WebAccountClientViewType) -> HRESULT, + fn get_AccountPairwiseId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IWebAccountClientView { + #[inline] pub unsafe fn get_application_callback_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ApplicationCallbackUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_account_pairwise_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccountPairwiseId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountClientViewFactory, 1634539172, 56866, 18517, 163, 38, 6, 206, 191, 42, 63, 35); + RT_INTERFACE!{static interface IWebAccountClientViewFactory(IWebAccountClientViewFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountClientViewFactory] { + fn Create(&mut self, viewType: WebAccountClientViewType, applicationCallbackUri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut WebAccountClientView) -> HRESULT, + fn CreateWithPairwiseId(&mut self, viewType: WebAccountClientViewType, applicationCallbackUri: *mut ::rt::gen::windows::foundation::Uri, accountPairwiseId: HSTRING, out: *mut *mut WebAccountClientView) -> HRESULT + }} + impl IWebAccountClientViewFactory { + #[inline] pub unsafe fn create(&mut self, viewType: WebAccountClientViewType, applicationCallbackUri: &::rt::gen::windows::foundation::Uri) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, viewType, applicationCallbackUri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_pairwise_id(&mut self, viewType: WebAccountClientViewType, applicationCallbackUri: &::rt::gen::windows::foundation::Uri, accountPairwiseId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithPairwiseId)(self, viewType, applicationCallbackUri as *const _ as *mut _, accountPairwiseId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebAccountClientView: IWebAccountClientView [IWebAccountClientViewFactory] [CLSID_WebAccountClientView]} + DEFINE_CLSID!(CLSID_WebAccountClientView = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,87,101,98,46,80,114,111,118,105,100,101,114,46,87,101,98,65,99,99,111,117,110,116,67,108,105,101,110,116,86,105,101,119,0]); + RT_ENUM! { enum WebAccountScope: i32 { + PerUser (WebAccountScope_PerUser) = 0, PerApplication (WebAccountScope_PerApplication) = 1, + }} + DEFINE_IID!(IID_IWebAccountManagerStatics, 3001606566, 54426, 16434, 132, 191, 26, 40, 71, 116, 123, 241); + RT_INTERFACE!{static interface IWebAccountManagerStatics(IWebAccountManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountManagerStatics] { + fn UpdateWebAccountPropertiesAsync(&mut self, webAccount: *mut super::super::super::credentials::WebAccount, webAccountUserName: HSTRING, additionalProperties: *mut ::rt::gen::windows::foundation::collections::IMapView, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn AddWebAccountAsync(&mut self, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut ::rt::gen::windows::foundation::collections::IMapView, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn DeleteWebAccountAsync(&mut self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn FindAllProviderWebAccountsAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + #[cfg(not(feature="windows.web"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.web")] fn PushCookiesAsync(&mut self, uri: *mut ::rt::gen::windows::foundation::Uri, cookies: *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::web::http::HttpCookie>, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn SetViewAsync(&mut self, webAccount: *mut super::super::super::credentials::WebAccount, view: *mut WebAccountClientView, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ClearViewAsync(&mut self, webAccount: *mut super::super::super::credentials::WebAccount, applicationCallbackUri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn GetViewsAsync(&mut self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SetWebAccountPictureAsync(&mut self, webAccount: *mut super::super::super::credentials::WebAccount, webAccountPicture: *mut ::rt::gen::windows::storage::streams::IRandomAccessStream, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ClearWebAccountPictureAsync(&mut self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IWebAccountManagerStatics { + #[inline] pub unsafe fn update_web_account_properties_async(&mut self, webAccount: &super::super::super::credentials::WebAccount, webAccountUserName: &HStringArg, additionalProperties: &::rt::gen::windows::foundation::collections::IMapView) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateWebAccountPropertiesAsync)(self, webAccount as *const _ as *mut _, webAccountUserName.get(), additionalProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_web_account_async(&mut self, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddWebAccountAsync)(self, webAccountId.get(), webAccountUserName.get(), props as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_web_account_async(&mut self, webAccount: &super::super::super::credentials::WebAccount) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteWebAccountAsync)(self, webAccount as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_provider_web_accounts_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllProviderWebAccountsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.web")] #[inline] pub unsafe fn push_cookies_async(&mut self, uri: &::rt::gen::windows::foundation::Uri, cookies: &::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::web::http::HttpCookie>) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PushCookiesAsync)(self, uri as *const _ as *mut _, cookies as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_view_async(&mut self, webAccount: &super::super::super::credentials::WebAccount, view: &WebAccountClientView) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetViewAsync)(self, webAccount as *const _ as *mut _, view as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_view_async(&mut self, webAccount: &super::super::super::credentials::WebAccount, applicationCallbackUri: &::rt::gen::windows::foundation::Uri) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearViewAsync)(self, webAccount as *const _ as *mut _, applicationCallbackUri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_views_async(&mut self, webAccount: &super::super::super::credentials::WebAccount) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetViewsAsync)(self, webAccount as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_web_account_picture_async(&mut self, webAccount: &super::super::super::credentials::WebAccount, webAccountPicture: &::rt::gen::windows::storage::streams::IRandomAccessStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetWebAccountPictureAsync)(self, webAccount as *const _ as *mut _, webAccountPicture as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_web_account_picture_async(&mut self, webAccount: &super::super::super::credentials::WebAccount) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearWebAccountPictureAsync)(self, webAccount as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountManagerStatics2, 1755818025, 11615, 18003, 139, 176, 189, 47, 166, 189, 45, 135); + RT_INTERFACE!{static interface IWebAccountManagerStatics2(IWebAccountManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountManagerStatics2] { + fn PullCookiesAsync(&mut self, uriString: HSTRING, callerPFN: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IWebAccountManagerStatics2 { + #[inline] pub unsafe fn pull_cookies_async(&mut self, uriString: &HStringArg, callerPFN: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PullCookiesAsync)(self, uriString.get(), callerPFN.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountScopeManagerStatics, 1550639996, 4786, 16954, 191, 61, 133, 184, 215, 229, 54, 86); + RT_INTERFACE!{static interface IWebAccountScopeManagerStatics(IWebAccountScopeManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountScopeManagerStatics] { + fn AddWebAccountWithScopeAsync(&mut self, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut ::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn SetScopeAsync(&mut self, webAccount: *mut super::super::super::credentials::WebAccount, scope: WebAccountScope, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn GetScope(&mut self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut WebAccountScope) -> HRESULT + }} + impl IWebAccountScopeManagerStatics { + #[inline] pub unsafe fn add_web_account_with_scope_async(&mut self, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddWebAccountWithScopeAsync)(self, webAccountId.get(), webAccountUserName.get(), props as *const _ as *mut _, scope, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_scope_async(&mut self, webAccount: &super::super::super::credentials::WebAccount, scope: WebAccountScope) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetScopeAsync)(self, webAccount as *const _ as *mut _, scope, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_scope(&mut self, webAccount: &super::super::super::credentials::WebAccount) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetScope)(self, webAccount as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountMapManagerStatics, 3908715631, 14875, 18596, 142, 144, 30, 89, 202, 111, 84, 219); + RT_INTERFACE!{static interface IWebAccountMapManagerStatics(IWebAccountMapManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountMapManagerStatics] { + fn AddWebAccountWithScopeAndMapAsync(&mut self, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut ::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn SetPerAppToPerUserAccountAsync(&mut self, perAppAccount: *mut super::super::super::credentials::WebAccount, perUserWebAccountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn GetPerUserFromPerAppAccountAsync(&mut self, perAppAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn ClearPerUserFromPerAppAccountAsync(&mut self, perAppAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IWebAccountMapManagerStatics { + #[inline] pub unsafe fn add_web_account_with_scope_and_map_async(&mut self, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddWebAccountWithScopeAndMapAsync)(self, webAccountId.get(), webAccountUserName.get(), props as *const _ as *mut _, scope, perUserWebAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_per_app_to_per_user_account_async(&mut self, perAppAccount: &super::super::super::credentials::WebAccount, perUserWebAccountId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetPerAppToPerUserAccountAsync)(self, perAppAccount as *const _ as *mut _, perUserWebAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_per_user_from_per_app_account_async(&mut self, perAppAccount: &super::super::super::credentials::WebAccount) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPerUserFromPerAppAccountAsync)(self, perAppAccount as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_per_user_from_per_app_account_async(&mut self, perAppAccount: &super::super::super::credentials::WebAccount) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearPerUserFromPerAppAccountAsync)(self, perAppAccount as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IWebAccountManagerStatics [CLSID_WebAccountManager]} + RT_ACTIVATABLE!{IWebAccountMapManagerStatics [CLSID_WebAccountManager]} + RT_ACTIVATABLE!{IWebAccountScopeManagerStatics [CLSID_WebAccountManager]} + RT_ACTIVATABLE!{IWebAccountManagerStatics2 [CLSID_WebAccountManager]} + DEFINE_CLSID!(CLSID_WebAccountManager = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,87,101,98,46,80,114,111,118,105,100,101,114,46,87,101,98,65,99,99,111,117,110,116,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IWebAccountProviderBaseReportOperation, 3148131515, 39227, 19799, 187, 228, 20, 33, 227, 102, 139, 76); + RT_INTERFACE!{interface IWebAccountProviderBaseReportOperation(IWebAccountProviderBaseReportOperationVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderBaseReportOperation] { + fn ReportCompleted(&mut self) -> HRESULT, + fn ReportError(&mut self, value: *mut super::core::WebProviderError) -> HRESULT + }} + impl IWebAccountProviderBaseReportOperation { + #[inline] pub unsafe fn report_completed(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompleted)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn report_error(&mut self, value: &super::core::WebProviderError) -> Result<()> { + let hr = ((*self.lpVtbl).ReportError)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProviderUIReportOperation, 687837907, 36736, 17147, 148, 79, 178, 16, 123, 189, 66, 230); + RT_INTERFACE!{interface IWebAccountProviderUIReportOperation(IWebAccountProviderUIReportOperationVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderUIReportOperation] { + fn ReportUserCanceled(&mut self) -> HRESULT + }} + impl IWebAccountProviderUIReportOperation { + #[inline] pub unsafe fn report_user_canceled(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportUserCanceled)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProviderSilentReportOperation, 3769976312, 15119, 17626, 146, 76, 123, 24, 186, 170, 98, 169); + RT_INTERFACE!{interface IWebAccountProviderSilentReportOperation(IWebAccountProviderSilentReportOperationVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderSilentReportOperation] { + fn ReportUserInteractionRequired(&mut self) -> HRESULT, + fn ReportUserInteractionRequiredWithError(&mut self, value: *mut super::core::WebProviderError) -> HRESULT + }} + impl IWebAccountProviderSilentReportOperation { + #[inline] pub unsafe fn report_user_interaction_required(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportUserInteractionRequired)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn report_user_interaction_required_with_error(&mut self, value: &super::core::WebProviderError) -> Result<()> { + let hr = ((*self.lpVtbl).ReportUserInteractionRequiredWithError)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProviderTokenOperation, 2512786366, 8244, 19512, 148, 52, 210, 108, 20, 178, 180, 178); + RT_INTERFACE!{interface IWebAccountProviderTokenOperation(IWebAccountProviderTokenOperationVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderTokenOperation] { + fn get_ProviderRequest(&mut self, out: *mut *mut WebProviderTokenRequest) -> HRESULT, + fn get_ProviderResponses(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn put_CacheExpirationTime(&mut self, value: ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_CacheExpirationTime(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + }} + impl IWebAccountProviderTokenOperation { + #[inline] pub unsafe fn get_provider_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProviderRequest)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_provider_responses(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProviderResponses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_cache_expiration_time(&mut self, value: ::rt::gen::windows::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_CacheExpirationTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cache_expiration_time(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CacheExpirationTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProviderAddAccountOperation, 1944837327, 17272, 19577, 147, 53, 165, 215, 171, 129, 89, 78); + RT_INTERFACE!{interface IWebAccountProviderAddAccountOperation(IWebAccountProviderAddAccountOperationVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderAddAccountOperation] { + fn ReportCompleted(&mut self) -> HRESULT + }} + impl IWebAccountProviderAddAccountOperation { + #[inline] pub unsafe fn report_completed(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompleted)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProviderManageAccountOperation, 3978353756, 53787, 17982, 169, 183, 193, 253, 14, 218, 233, 120); + RT_INTERFACE!{interface IWebAccountProviderManageAccountOperation(IWebAccountProviderManageAccountOperationVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderManageAccountOperation] { + fn get_WebAccount(&mut self, out: *mut *mut super::super::super::credentials::WebAccount) -> HRESULT, + fn ReportCompleted(&mut self) -> HRESULT + }} + impl IWebAccountProviderManageAccountOperation { + #[inline] pub unsafe fn get_web_account(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebAccount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_completed(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompleted)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProviderDeleteAccountOperation, 180046008, 40449, 18889, 163, 85, 125, 72, 202, 247, 214, 202); + RT_INTERFACE!{interface IWebAccountProviderDeleteAccountOperation(IWebAccountProviderDeleteAccountOperationVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderDeleteAccountOperation] { + fn get_WebAccount(&mut self, out: *mut *mut super::super::super::credentials::WebAccount) -> HRESULT + }} + impl IWebAccountProviderDeleteAccountOperation { + #[inline] pub unsafe fn get_web_account(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebAccount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProviderSignOutAccountOperation, 3096502813, 3157, 18364, 140, 114, 4, 166, 252, 124, 172, 7); + RT_INTERFACE!{interface IWebAccountProviderSignOutAccountOperation(IWebAccountProviderSignOutAccountOperationVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderSignOutAccountOperation] { + fn get_WebAccount(&mut self, out: *mut *mut super::super::super::credentials::WebAccount) -> HRESULT, + fn get_ApplicationCallbackUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_ClientId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IWebAccountProviderSignOutAccountOperation { + #[inline] pub unsafe fn get_web_account(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebAccount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_application_callback_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ApplicationCallbackUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_client_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ClientId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProviderRetrieveCookiesOperation, 1510212673, 4003, 19121, 160, 28, 32, 177, 16, 53, 133, 148); + RT_INTERFACE!{interface IWebAccountProviderRetrieveCookiesOperation(IWebAccountProviderRetrieveCookiesOperationVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderRetrieveCookiesOperation] { + fn get_Context(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + #[cfg(not(feature="windows.web"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.web")] fn get_Cookies(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector<::rt::gen::windows::web::http::HttpCookie>) -> HRESULT, + fn put_Uri(&mut self, uri: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_Uri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_ApplicationCallbackUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT + }} + impl IWebAccountProviderRetrieveCookiesOperation { + #[inline] pub unsafe fn get_context(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Context)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.web")] #[inline] pub unsafe fn get_cookies(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Cookies)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_uri(&mut self, uri: &::rt::gen::windows::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Uri)(self, uri as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_application_callback_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ApplicationCallbackUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebAccountProviderRequestTokenOperation: IWebAccountProviderTokenOperation} + RT_CLASS!{class WebAccountProviderGetTokenSilentOperation: IWebAccountProviderTokenOperation} + RT_CLASS!{class WebAccountProviderAddAccountOperation: IWebAccountProviderAddAccountOperation} + RT_CLASS!{class WebAccountProviderManageAccountOperation: IWebAccountProviderManageAccountOperation} + RT_CLASS!{class WebAccountProviderDeleteAccountOperation: IWebAccountProviderDeleteAccountOperation} + RT_CLASS!{class WebAccountProviderSignOutAccountOperation: IWebAccountProviderSignOutAccountOperation} + RT_CLASS!{class WebAccountProviderRetrieveCookiesOperation: IWebAccountProviderRetrieveCookiesOperation} + DEFINE_IID!(IID_IWebAccountProviderTokenObjects, 1083123787, 4904, 17115, 137, 164, 11, 206, 122, 113, 125, 142); + RT_INTERFACE!{interface IWebAccountProviderTokenObjects(IWebAccountProviderTokenObjectsVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderTokenObjects] { + fn get_Operation(&mut self, out: *mut *mut IWebAccountProviderOperation) -> HRESULT + }} + impl IWebAccountProviderTokenObjects { + #[inline] pub unsafe fn get_operation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Operation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebAccountProviderTriggerDetails: IWebAccountProviderTokenObjects} +} // Windows.Security.Authentication.Web.Provider +pub mod core { // Windows.Security.Authentication.Web.Core +use ::prelude::*; + RT_ENUM! { enum WebTokenRequestPromptType: i32 { + Default (WebTokenRequestPromptType_Default) = 0, ForceAuthentication (WebTokenRequestPromptType_ForceAuthentication) = 1, + }} + DEFINE_IID!(IID_IWebTokenRequest, 3078311272, 44491, 18035, 179, 100, 12, 247, 179, 92, 175, 151); + RT_INTERFACE!{interface IWebTokenRequest(IWebTokenRequestVtbl): IInspectable(IInspectableVtbl) [IID_IWebTokenRequest] { + fn get_WebAccountProvider(&mut self, out: *mut *mut super::super::super::credentials::WebAccountProvider) -> HRESULT, + fn get_Scope(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ClientId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PromptType(&mut self, out: *mut WebTokenRequestPromptType) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT + }} + impl IWebTokenRequest { + #[inline] pub unsafe fn get_web_account_provider(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebAccountProvider)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_scope(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Scope)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_client_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ClientId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_prompt_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PromptType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebTokenRequest2, 3607150713, 12488, 17303, 150, 84, 150, 28, 59, 232, 184, 85); + RT_INTERFACE!{interface IWebTokenRequest2(IWebTokenRequest2Vtbl): IInspectable(IInspectableVtbl) [IID_IWebTokenRequest2] { + fn get_AppProperties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT + }} + impl IWebTokenRequest2 { + #[inline] pub unsafe fn get_app_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountEventArgs, 1874264957, 16974, 17644, 151, 124, 239, 36, 21, 70, 42, 90); + RT_INTERFACE!{interface IWebAccountEventArgs(IWebAccountEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountEventArgs] { + fn get_Account(&mut self, out: *mut *mut super::super::super::credentials::WebAccount) -> HRESULT + }} + impl IWebAccountEventArgs { + #[inline] pub unsafe fn get_account(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Account)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebAccountEventArgs: IWebAccountEventArgs} + DEFINE_IID!(IID_IWebTokenRequestFactory, 1827804188, 4080, 19559, 184, 79, 153, 221, 190, 74, 114, 201); + RT_INTERFACE!{static interface IWebTokenRequestFactory(IWebTokenRequestFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWebTokenRequestFactory] { + fn Create(&mut self, provider: *mut super::super::super::credentials::WebAccountProvider, scope: HSTRING, clientId: HSTRING, out: *mut *mut WebTokenRequest) -> HRESULT, + fn CreateWithPromptType(&mut self, provider: *mut super::super::super::credentials::WebAccountProvider, scope: HSTRING, clientId: HSTRING, promptType: WebTokenRequestPromptType, out: *mut *mut WebTokenRequest) -> HRESULT, + fn CreateWithProvider(&mut self, provider: *mut super::super::super::credentials::WebAccountProvider, out: *mut *mut WebTokenRequest) -> HRESULT, + fn CreateWithScope(&mut self, provider: *mut super::super::super::credentials::WebAccountProvider, scope: HSTRING, out: *mut *mut WebTokenRequest) -> HRESULT + }} + impl IWebTokenRequestFactory { + #[inline] pub unsafe fn create(&mut self, provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg, clientId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, provider as *const _ as *mut _, scope.get(), clientId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_prompt_type(&mut self, provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg, clientId: &HStringArg, promptType: WebTokenRequestPromptType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithPromptType)(self, provider as *const _ as *mut _, scope.get(), clientId.get(), promptType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_provider(&mut self, provider: &super::super::super::credentials::WebAccountProvider) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithProvider)(self, provider as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_scope(&mut self, provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithScope)(self, provider as *const _ as *mut _, scope.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebTokenRequest: IWebTokenRequest [IWebTokenRequestFactory] [CLSID_WebTokenRequest]} + DEFINE_CLSID!(CLSID_WebTokenRequest = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,87,101,98,46,67,111,114,101,46,87,101,98,84,111,107,101,110,82,101,113,117,101,115,116,0]); + DEFINE_IID!(IID_IWebAuthenticationCoreManagerStatics, 1791655058, 42369, 17529, 156, 16, 117, 46, 255, 68, 253, 52); + RT_INTERFACE!{static interface IWebAuthenticationCoreManagerStatics(IWebAuthenticationCoreManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWebAuthenticationCoreManagerStatics] { + fn GetTokenSilentlyAsync(&mut self, request: *mut WebTokenRequest, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetTokenSilentlyWithWebAccountAsync(&mut self, request: *mut WebTokenRequest, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn RequestTokenAsync(&mut self, request: *mut WebTokenRequest, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn RequestTokenWithWebAccountAsync(&mut self, request: *mut WebTokenRequest, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn FindAccountAsync(&mut self, provider: *mut super::super::super::credentials::WebAccountProvider, webAccountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn FindAccountProviderAsync(&mut self, webAccountProviderId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn FindAccountProviderWithAuthorityAsync(&mut self, webAccountProviderId: HSTRING, authority: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IWebAuthenticationCoreManagerStatics { + #[inline] pub unsafe fn get_token_silently_async(&mut self, request: &WebTokenRequest) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTokenSilentlyAsync)(self, request as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_token_silently_with_web_account_async(&mut self, request: &WebTokenRequest, webAccount: &super::super::super::credentials::WebAccount) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTokenSilentlyWithWebAccountAsync)(self, request as *const _ as *mut _, webAccount as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_token_async(&mut self, request: &WebTokenRequest) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestTokenAsync)(self, request as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_token_with_web_account_async(&mut self, request: &WebTokenRequest, webAccount: &super::super::super::credentials::WebAccount) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestTokenWithWebAccountAsync)(self, request as *const _ as *mut _, webAccount as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_account_async(&mut self, provider: &super::super::super::credentials::WebAccountProvider, webAccountId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAccountAsync)(self, provider as *const _ as *mut _, webAccountId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_account_provider_async(&mut self, webAccountProviderId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAccountProviderAsync)(self, webAccountProviderId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_account_provider_with_authority_async(&mut self, webAccountProviderId: &HStringArg, authority: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAccountProviderWithAuthorityAsync)(self, webAccountProviderId.get(), authority.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAuthenticationCoreManagerStatics2, 4119074890, 35671, 18464, 182, 164, 112, 165, 182, 252, 244, 74); + RT_INTERFACE!{static interface IWebAuthenticationCoreManagerStatics2(IWebAuthenticationCoreManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IWebAuthenticationCoreManagerStatics2] { + #[cfg(feature="windows.system")] fn FindAccountProviderWithAuthorityForUserAsync(&mut self, webAccountProviderId: HSTRING, authority: HSTRING, user: *mut ::rt::gen::windows::system::User, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IWebAuthenticationCoreManagerStatics2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn find_account_provider_with_authority_for_user_async(&mut self, webAccountProviderId: &HStringArg, authority: &HStringArg, user: &::rt::gen::windows::system::User) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAccountProviderWithAuthorityForUserAsync)(self, webAccountProviderId.get(), authority.get(), user as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAuthenticationCoreManagerStatics3, 604303026, 35108, 19859, 171, 58, 153, 104, 139, 65, 157, 86); + RT_INTERFACE!{static interface IWebAuthenticationCoreManagerStatics3(IWebAuthenticationCoreManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IWebAuthenticationCoreManagerStatics3] { + fn CreateWebAccountMonitor(&mut self, webAccounts: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut WebAccountMonitor) -> HRESULT + }} + impl IWebAuthenticationCoreManagerStatics3 { + #[inline] pub unsafe fn create_web_account_monitor(&mut self, webAccounts: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWebAccountMonitor)(self, webAccounts as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebAccountMonitor: IWebAccountMonitor} + RT_ACTIVATABLE!{IWebAuthenticationCoreManagerStatics3 [CLSID_WebAuthenticationCoreManager]} + RT_ACTIVATABLE!{IWebAuthenticationCoreManagerStatics2 [CLSID_WebAuthenticationCoreManager]} + RT_ACTIVATABLE!{IWebAuthenticationCoreManagerStatics [CLSID_WebAuthenticationCoreManager]} + DEFINE_CLSID!(CLSID_WebAuthenticationCoreManager = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,87,101,98,46,67,111,114,101,46,87,101,98,65,117,116,104,101,110,116,105,99,97,116,105,111,110,67,111,114,101,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IWebAccountMonitor, 1950742013, 43677, 17945, 141, 93, 193, 56, 164, 237, 227, 229); + RT_INTERFACE!{interface IWebAccountMonitor(IWebAccountMonitorVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountMonitor] { + fn add_Updated(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_DefaultSignInAccountChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DefaultSignInAccountChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IWebAccountMonitor { + #[inline] pub unsafe fn add_updated(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Updated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_updated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Updated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_removed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Removed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_removed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Removed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_default_sign_in_account_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DefaultSignInAccountChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_default_sign_in_account_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DefaultSignInAccountChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum WebTokenRequestStatus: i32 { + Success (WebTokenRequestStatus_Success) = 0, UserCancel (WebTokenRequestStatus_UserCancel) = 1, AccountSwitch (WebTokenRequestStatus_AccountSwitch) = 2, UserInteractionRequired (WebTokenRequestStatus_UserInteractionRequired) = 3, AccountProviderNotAvailable (WebTokenRequestStatus_AccountProviderNotAvailable) = 4, ProviderError (WebTokenRequestStatus_ProviderError) = 5, + }} + DEFINE_IID!(IID_IWebProviderError, 3675855793, 20677, 18441, 141, 202, 9, 201, 148, 16, 36, 92); + RT_INTERFACE!{interface IWebProviderError(IWebProviderErrorVtbl): IInspectable(IInspectableVtbl) [IID_IWebProviderError] { + fn get_ErrorCode(&mut self, out: *mut u32) -> HRESULT, + fn get_ErrorMessage(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT + }} + impl IWebProviderError { + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_error_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ErrorMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebProviderErrorFactory, 3821275693, 35311, 20023, 132, 127, 168, 185, 213, 163, 41, 16); + RT_INTERFACE!{static interface IWebProviderErrorFactory(IWebProviderErrorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWebProviderErrorFactory] { + fn Create(&mut self, errorCode: u32, errorMessage: HSTRING, out: *mut *mut WebProviderError) -> HRESULT + }} + impl IWebProviderErrorFactory { + #[inline] pub unsafe fn create(&mut self, errorCode: u32, errorMessage: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, errorCode, errorMessage.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebProviderError: IWebProviderError [IWebProviderErrorFactory] [CLSID_WebProviderError]} + DEFINE_CLSID!(CLSID_WebProviderError = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,87,101,98,46,67,111,114,101,46,87,101,98,80,114,111,118,105,100,101,114,69,114,114,111,114,0]); + DEFINE_IID!(IID_IWebTokenRequestResult, 3240788741, 53752, 17539, 141, 84, 56, 254, 41, 39, 132, 255); + RT_INTERFACE!{interface IWebTokenRequestResult(IWebTokenRequestResultVtbl): IInspectable(IInspectableVtbl) [IID_IWebTokenRequestResult] { + fn get_ResponseData(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_ResponseStatus(&mut self, out: *mut WebTokenRequestStatus) -> HRESULT, + fn get_ResponseError(&mut self, out: *mut *mut WebProviderError) -> HRESULT, + fn InvalidateCacheAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IWebTokenRequestResult { + #[inline] pub unsafe fn get_response_data(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResponseData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_response_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ResponseStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_response_error(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ResponseError)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn invalidate_cache_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).InvalidateCacheAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebTokenResponse: IWebTokenResponse [IWebTokenResponseFactory] [CLSID_WebTokenResponse]} + DEFINE_CLSID!(CLSID_WebTokenResponse = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,65,117,116,104,101,110,116,105,99,97,116,105,111,110,46,87,101,98,46,67,111,114,101,46,87,101,98,84,111,107,101,110,82,101,115,112,111,110,115,101,0]); + RT_CLASS!{class WebTokenRequestResult: IWebTokenRequestResult} + DEFINE_IID!(IID_IWebTokenResponse, 1739048394, 33782, 17606, 163, 177, 14, 182, 158, 65, 250, 138); + RT_INTERFACE!{interface IWebTokenResponse(IWebTokenResponseVtbl): IInspectable(IInspectableVtbl) [IID_IWebTokenResponse] { + fn get_Token(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ProviderError(&mut self, out: *mut *mut WebProviderError) -> HRESULT, + fn get_WebAccount(&mut self, out: *mut *mut super::super::super::credentials::WebAccount) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT + }} + impl IWebTokenResponse { + #[inline] pub unsafe fn get_token(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Token)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_provider_error(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProviderError)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_web_account(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebAccount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebTokenResponseFactory, 2875979768, 21584, 20214, 151, 247, 5, 43, 4, 49, 192, 240); + RT_INTERFACE!{static interface IWebTokenResponseFactory(IWebTokenResponseFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWebTokenResponseFactory] { + fn CreateWithToken(&mut self, token: HSTRING, out: *mut *mut WebTokenResponse) -> HRESULT, + fn CreateWithTokenAndAccount(&mut self, token: HSTRING, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut WebTokenResponse) -> HRESULT, + fn CreateWithTokenAccountAndError(&mut self, token: HSTRING, webAccount: *mut super::super::super::credentials::WebAccount, error: *mut WebProviderError, out: *mut *mut WebTokenResponse) -> HRESULT + }} + impl IWebTokenResponseFactory { + #[inline] pub unsafe fn create_with_token(&mut self, token: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithToken)(self, token.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_token_and_account(&mut self, token: &HStringArg, webAccount: &super::super::super::credentials::WebAccount) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithTokenAndAccount)(self, token.get(), webAccount as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_token_account_and_error(&mut self, token: &HStringArg, webAccount: &super::super::super::credentials::WebAccount, error: &WebProviderError) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithTokenAccountAndError)(self, token.get(), webAccount as *const _ as *mut _, error as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Security.Authentication.Web.Core +} // Windows.Security.Authentication.Web +} // Windows.Security.Authentication +pub mod cryptography { // Windows.Security.Cryptography +use ::prelude::*; + RT_ENUM! { enum BinaryStringEncoding: i32 { + Utf8 (BinaryStringEncoding_Utf8) = 0, Utf16LE (BinaryStringEncoding_Utf16LE) = 1, Utf16BE (BinaryStringEncoding_Utf16BE) = 2, + }} + DEFINE_IID!(IID_ICryptographicBufferStatics, 839613986, 15536, 19679, 134, 99, 29, 40, 145, 0, 101, 235); + RT_INTERFACE!{static interface ICryptographicBufferStatics(ICryptographicBufferStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICryptographicBufferStatics] { + #[cfg(feature="windows.storage")] fn Compare(&mut self, object1: *mut super::super::storage::streams::IBuffer, object2: *mut super::super::storage::streams::IBuffer, out: *mut bool) -> HRESULT, + #[cfg(feature="windows.storage")] fn GenerateRandom(&mut self, length: u32, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn GenerateRandomNumber(&mut self, out: *mut u32) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateFromByteArray(&mut self, valueSize: u32, value: *mut u8, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn CopyToByteArray(&mut self, buffer: *mut super::super::storage::streams::IBuffer, valueSize: *mut u32, value: *mut *mut u8) -> HRESULT, + #[cfg(feature="windows.storage")] fn DecodeFromHexString(&mut self, value: HSTRING, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn EncodeToHexString(&mut self, buffer: *mut super::super::storage::streams::IBuffer, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn DecodeFromBase64String(&mut self, value: HSTRING, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn EncodeToBase64String(&mut self, buffer: *mut super::super::storage::streams::IBuffer, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn ConvertStringToBinary(&mut self, value: HSTRING, encoding: BinaryStringEncoding, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn ConvertBinaryToString(&mut self, encoding: BinaryStringEncoding, buffer: *mut super::super::storage::streams::IBuffer, out: *mut HSTRING) -> HRESULT + }} + impl ICryptographicBufferStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn compare(&mut self, object1: &super::super::storage::streams::IBuffer, object2: &super::super::storage::streams::IBuffer) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Compare)(self, object1 as *const _ as *mut _, object2 as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn generate_random(&mut self, length: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GenerateRandom)(self, length, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn generate_random_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GenerateRandomNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_byte_array(&mut self, value: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromByteArray)(self, value.len() as u32, value.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn copy_to_byte_array(&mut self, buffer: &super::super::storage::streams::IBuffer) -> Result> { + let mut valueSize = 0; let mut value = null_mut(); + let hr = ((*self.lpVtbl).CopyToByteArray)(self, buffer as *const _ as *mut _, &mut valueSize, &mut value); + if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn decode_from_hex_string(&mut self, value: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DecodeFromHexString)(self, value.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn encode_to_hex_string(&mut self, buffer: &super::super::storage::streams::IBuffer) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EncodeToHexString)(self, buffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn decode_from_base64_string(&mut self, value: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DecodeFromBase64String)(self, value.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn encode_to_base64_string(&mut self, buffer: &super::super::storage::streams::IBuffer) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EncodeToBase64String)(self, buffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn convert_string_to_binary(&mut self, value: &HStringArg, encoding: BinaryStringEncoding) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConvertStringToBinary)(self, value.get(), encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn convert_binary_to_string(&mut self, encoding: BinaryStringEncoding, buffer: &super::super::storage::streams::IBuffer) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConvertBinaryToString)(self, encoding, buffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ICryptographicBufferStatics [CLSID_CryptographicBuffer]} + DEFINE_CLSID!(CLSID_CryptographicBuffer = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,114,121,112,116,111,103,114,97,112,104,105,99,66,117,102,102,101,114,0]); +pub mod certificates { // Windows.Security.Cryptography.Certificates +use ::prelude::*; + RT_ENUM! { enum EnrollKeyUsages: u32 { + None (EnrollKeyUsages_None) = 0, Decryption (EnrollKeyUsages_Decryption) = 1, Signing (EnrollKeyUsages_Signing) = 2, KeyAgreement (EnrollKeyUsages_KeyAgreement) = 4, All (EnrollKeyUsages_All) = 16777215, + }} + RT_ENUM! { enum KeyProtectionLevel: i32 { + NoConsent (KeyProtectionLevel_NoConsent) = 0, ConsentOnly (KeyProtectionLevel_ConsentOnly) = 1, ConsentWithPassword (KeyProtectionLevel_ConsentWithPassword) = 2, ConsentWithFingerprint (KeyProtectionLevel_ConsentWithFingerprint) = 3, + }} + RT_ENUM! { enum ExportOption: i32 { + NotExportable (ExportOption_NotExportable) = 0, Exportable (ExportOption_Exportable) = 1, + }} + RT_ENUM! { enum KeySize: i32 { + Invalid (KeySize_Invalid) = 0, Rsa2048 (KeySize_Rsa2048) = 2048, Rsa4096 (KeySize_Rsa4096) = 4096, + }} + RT_ENUM! { enum InstallOptions: u32 { + None (InstallOptions_None) = 0, DeleteExpired (InstallOptions_DeleteExpired) = 1, + }} + RT_ENUM! { enum CertificateChainPolicy: i32 { + Base (CertificateChainPolicy_Base) = 0, Ssl (CertificateChainPolicy_Ssl) = 1, NTAuthentication (CertificateChainPolicy_NTAuthentication) = 2, MicrosoftRoot (CertificateChainPolicy_MicrosoftRoot) = 3, + }} + RT_ENUM! { enum ChainValidationResult: i32 { + Success (ChainValidationResult_Success) = 0, Untrusted (ChainValidationResult_Untrusted) = 1, Revoked (ChainValidationResult_Revoked) = 2, Expired (ChainValidationResult_Expired) = 3, IncompleteChain (ChainValidationResult_IncompleteChain) = 4, InvalidSignature (ChainValidationResult_InvalidSignature) = 5, WrongUsage (ChainValidationResult_WrongUsage) = 6, InvalidName (ChainValidationResult_InvalidName) = 7, InvalidCertificateAuthorityPolicy (ChainValidationResult_InvalidCertificateAuthorityPolicy) = 8, BasicConstraintsError (ChainValidationResult_BasicConstraintsError) = 9, UnknownCriticalExtension (ChainValidationResult_UnknownCriticalExtension) = 10, RevocationInformationMissing (ChainValidationResult_RevocationInformationMissing) = 11, RevocationFailure (ChainValidationResult_RevocationFailure) = 12, OtherErrors (ChainValidationResult_OtherErrors) = 13, + }} + RT_ENUM! { enum SignatureValidationResult: i32 { + Success (SignatureValidationResult_Success) = 0, InvalidParameter (SignatureValidationResult_InvalidParameter) = 1, BadMessage (SignatureValidationResult_BadMessage) = 2, InvalidSignature (SignatureValidationResult_InvalidSignature) = 3, OtherErrors (SignatureValidationResult_OtherErrors) = 4, + }} + DEFINE_IID!(IID_ICertificateRequestProperties, 1216251126, 38114, 19918, 136, 51, 26, 112, 10, 55, 162, 154); + RT_INTERFACE!{interface ICertificateRequestProperties(ICertificateRequestPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ICertificateRequestProperties] { + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Subject(&mut self, value: HSTRING) -> HRESULT, + fn get_KeyAlgorithmName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_KeyAlgorithmName(&mut self, value: HSTRING) -> HRESULT, + fn get_KeySize(&mut self, out: *mut u32) -> HRESULT, + fn put_KeySize(&mut self, value: u32) -> HRESULT, + fn get_FriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_FriendlyName(&mut self, value: HSTRING) -> HRESULT, + fn get_HashAlgorithmName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_HashAlgorithmName(&mut self, value: HSTRING) -> HRESULT, + fn get_Exportable(&mut self, out: *mut ExportOption) -> HRESULT, + fn put_Exportable(&mut self, value: ExportOption) -> HRESULT, + fn get_KeyUsages(&mut self, out: *mut EnrollKeyUsages) -> HRESULT, + fn put_KeyUsages(&mut self, value: EnrollKeyUsages) -> HRESULT, + fn get_KeyProtectionLevel(&mut self, out: *mut KeyProtectionLevel) -> HRESULT, + fn put_KeyProtectionLevel(&mut self, value: KeyProtectionLevel) -> HRESULT, + fn get_KeyStorageProviderName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_KeyStorageProviderName(&mut self, value: HSTRING) -> HRESULT + }} + impl ICertificateRequestProperties { + #[inline] pub unsafe fn get_subject(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_subject(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Subject)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_algorithm_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyAlgorithmName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_algorithm_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeyAlgorithmName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeySize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_size(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeySize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_friendly_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_FriendlyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hash_algorithm_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HashAlgorithmName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_hash_algorithm_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_HashAlgorithmName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_exportable(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Exportable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_exportable(&mut self, value: ExportOption) -> Result<()> { + let hr = ((*self.lpVtbl).put_Exportable)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_usages(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyUsages)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_usages(&mut self, value: EnrollKeyUsages) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeyUsages)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_protection_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyProtectionLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_protection_level(&mut self, value: KeyProtectionLevel) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeyProtectionLevel)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_storage_provider_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyStorageProviderName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_storage_provider_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeyStorageProviderName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICertificateRequestProperties2, 1033947476, 55103, 20467, 160, 166, 6, 119, 192, 173, 160, 91); + RT_INTERFACE!{interface ICertificateRequestProperties2(ICertificateRequestProperties2Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificateRequestProperties2] { + fn get_SmartcardReaderName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SmartcardReaderName(&mut self, value: HSTRING) -> HRESULT, + fn get_SigningCertificate(&mut self, out: *mut *mut Certificate) -> HRESULT, + fn put_SigningCertificate(&mut self, value: *mut Certificate) -> HRESULT, + fn get_AttestationCredentialCertificate(&mut self, out: *mut *mut Certificate) -> HRESULT, + fn put_AttestationCredentialCertificate(&mut self, value: *mut Certificate) -> HRESULT + }} + impl ICertificateRequestProperties2 { + #[inline] pub unsafe fn get_smartcard_reader_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SmartcardReaderName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_smartcard_reader_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SmartcardReaderName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_signing_certificate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SigningCertificate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_signing_certificate(&mut self, value: &Certificate) -> Result<()> { + let hr = ((*self.lpVtbl).put_SigningCertificate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_attestation_credential_certificate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AttestationCredentialCertificate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_attestation_credential_certificate(&mut self, value: &Certificate) -> Result<()> { + let hr = ((*self.lpVtbl).put_AttestationCredentialCertificate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Certificate: ICertificate [ICertificateFactory] [CLSID_Certificate]} + DEFINE_CLSID!(CLSID_Certificate = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,101,114,116,105,102,105,99,97,116,101,115,46,67,101,114,116,105,102,105,99,97,116,101,0]); + DEFINE_IID!(IID_ICertificateRequestProperties3, 3867670038, 29517, 18097, 157, 76, 110, 223, 219, 252, 132, 91); + RT_INTERFACE!{interface ICertificateRequestProperties3(ICertificateRequestProperties3Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificateRequestProperties3] { + fn get_CurveName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CurveName(&mut self, value: HSTRING) -> HRESULT, + fn get_CurveParameters(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn put_CurveParameters(&mut self, valueSize: u32, value: *mut u8) -> HRESULT, + fn get_ContainerNamePrefix(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ContainerNamePrefix(&mut self, value: HSTRING) -> HRESULT, + fn get_ContainerName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ContainerName(&mut self, value: HSTRING) -> HRESULT, + fn get_UseExistingKey(&mut self, out: *mut bool) -> HRESULT, + fn put_UseExistingKey(&mut self, value: bool) -> HRESULT + }} + impl ICertificateRequestProperties3 { + #[inline] pub unsafe fn get_curve_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurveName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_curve_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CurveName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_curve_parameters(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurveParameters)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_curve_parameters(&mut self, value: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).put_CurveParameters)(self, value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_container_name_prefix(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContainerNamePrefix)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_container_name_prefix(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContainerNamePrefix)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_container_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContainerName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_container_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContainerName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_use_existing_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UseExistingKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_use_existing_key(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_UseExistingKey)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CertificateRequestProperties: ICertificateRequestProperties} + DEFINE_IID!(IID_ICertificateEnrollmentManagerStatics, 2286350143, 43398, 18683, 159, 215, 154, 236, 6, 147, 91, 241); + RT_INTERFACE!{static interface ICertificateEnrollmentManagerStatics(ICertificateEnrollmentManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICertificateEnrollmentManagerStatics] { + fn CreateRequestAsync(&mut self, request: *mut CertificateRequestProperties, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn InstallCertificateAsync(&mut self, certificate: HSTRING, installOption: InstallOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ImportPfxDataAsync(&mut self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl ICertificateEnrollmentManagerStatics { + #[inline] pub unsafe fn create_request_async(&mut self, request: &CertificateRequestProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateRequestAsync)(self, request as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn install_certificate_async(&mut self, certificate: &HStringArg, installOption: InstallOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).InstallCertificateAsync)(self, certificate.get(), installOption, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn import_pfx_data_async(&mut self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportPfxDataAsync)(self, pfxData.get(), password.get(), exportable, keyProtectionLevel, installOption, friendlyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICertificateEnrollmentManagerStatics2, 3696958515, 25641, 16404, 153, 156, 93, 151, 53, 128, 45, 29); + RT_INTERFACE!{static interface ICertificateEnrollmentManagerStatics2(ICertificateEnrollmentManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificateEnrollmentManagerStatics2] { + fn get_UserCertificateEnrollmentManager(&mut self, out: *mut *mut UserCertificateEnrollmentManager) -> HRESULT, + fn ImportPfxDataToKspAsync(&mut self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, keyStorageProvider: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl ICertificateEnrollmentManagerStatics2 { + #[inline] pub unsafe fn get_user_certificate_enrollment_manager(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserCertificateEnrollmentManager)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn import_pfx_data_to_ksp_async(&mut self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg, keyStorageProvider: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportPfxDataToKspAsync)(self, pfxData.get(), password.get(), exportable, keyProtectionLevel, installOption, friendlyName.get(), keyStorageProvider.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UserCertificateEnrollmentManager: IUserCertificateEnrollmentManager} + DEFINE_IID!(IID_ICertificateEnrollmentManagerStatics3, 4260135614, 24956, 16986, 183, 45, 57, 139, 38, 172, 114, 100); + RT_INTERFACE!{static interface ICertificateEnrollmentManagerStatics3(ICertificateEnrollmentManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificateEnrollmentManagerStatics3] { + fn ImportPfxDataToKspWithParametersAsync(&mut self, pfxData: HSTRING, password: HSTRING, pfxImportParameters: *mut PfxImportParameters, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl ICertificateEnrollmentManagerStatics3 { + #[inline] pub unsafe fn import_pfx_data_to_ksp_with_parameters_async(&mut self, pfxData: &HStringArg, password: &HStringArg, pfxImportParameters: &PfxImportParameters) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportPfxDataToKspWithParametersAsync)(self, pfxData.get(), password.get(), pfxImportParameters as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PfxImportParameters: IPfxImportParameters} + RT_ACTIVATABLE!{ICertificateEnrollmentManagerStatics [CLSID_CertificateEnrollmentManager]} + RT_ACTIVATABLE!{ICertificateEnrollmentManagerStatics2 [CLSID_CertificateEnrollmentManager]} + RT_ACTIVATABLE!{ICertificateEnrollmentManagerStatics3 [CLSID_CertificateEnrollmentManager]} + DEFINE_CLSID!(CLSID_CertificateEnrollmentManager = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,101,114,116,105,102,105,99,97,116,101,115,46,67,101,114,116,105,102,105,99,97,116,101,69,110,114,111,108,108,109,101,110,116,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IKeyAttestationHelperStatics, 373875270, 63044, 17190, 136, 190, 58, 241, 2, 211, 14, 12); + RT_INTERFACE!{static interface IKeyAttestationHelperStatics(IKeyAttestationHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKeyAttestationHelperStatics] { + fn DecryptTpmAttestationCredentialAsync(&mut self, credential: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetTpmAttestationCredentialId(&mut self, credential: HSTRING, out: *mut HSTRING) -> HRESULT + }} + impl IKeyAttestationHelperStatics { + #[inline] pub unsafe fn decrypt_tpm_attestation_credential_async(&mut self, credential: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DecryptTpmAttestationCredentialAsync)(self, credential.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tpm_attestation_credential_id(&mut self, credential: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTpmAttestationCredentialId)(self, credential.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyAttestationHelperStatics2, 2623081260, 42694, 19038, 158, 100, 232, 93, 82, 121, 223, 151); + RT_INTERFACE!{static interface IKeyAttestationHelperStatics2(IKeyAttestationHelperStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IKeyAttestationHelperStatics2] { + fn DecryptTpmAttestationCredentialWithContainerNameAsync(&mut self, credential: HSTRING, containerName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl IKeyAttestationHelperStatics2 { + #[inline] pub unsafe fn decrypt_tpm_attestation_credential_with_container_name_async(&mut self, credential: &HStringArg, containerName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DecryptTpmAttestationCredentialWithContainerNameAsync)(self, credential.get(), containerName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKeyAttestationHelperStatics [CLSID_KeyAttestationHelper]} + RT_ACTIVATABLE!{IKeyAttestationHelperStatics2 [CLSID_KeyAttestationHelper]} + DEFINE_CLSID!(CLSID_KeyAttestationHelper = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,101,114,116,105,102,105,99,97,116,101,115,46,75,101,121,65,116,116,101,115,116,97,116,105,111,110,72,101,108,112,101,114,0]); + DEFINE_IID!(IID_ICertificateStoresStatics, 4226598713, 50942, 19943, 153, 207, 116, 195, 229, 150, 224, 50); + RT_INTERFACE!{static interface ICertificateStoresStatics(ICertificateStoresStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICertificateStoresStatics] { + fn FindAllAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn FindAllWithQueryAsync(&mut self, query: *mut CertificateQuery, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn get_TrustedRootCertificationAuthorities(&mut self, out: *mut *mut CertificateStore) -> HRESULT, + fn get_IntermediateCertificationAuthorities(&mut self, out: *mut *mut CertificateStore) -> HRESULT, + fn GetStoreByName(&mut self, storeName: HSTRING, out: *mut *mut CertificateStore) -> HRESULT + }} + impl ICertificateStoresStatics { + #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_with_query_async(&mut self, query: &CertificateQuery) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllWithQueryAsync)(self, query as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_trusted_root_certification_authorities(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TrustedRootCertificationAuthorities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_intermediate_certification_authorities(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IntermediateCertificationAuthorities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_store_by_name(&mut self, storeName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStoreByName)(self, storeName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CertificateQuery: ICertificateQuery} + RT_CLASS!{class CertificateStore: ICertificateStore} + DEFINE_IID!(IID_ICertificateStoresStatics2, 4203744121, 41172, 19340, 188, 85, 192, 163, 126, 177, 65, 237); + RT_INTERFACE!{static interface ICertificateStoresStatics2(ICertificateStoresStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificateStoresStatics2] { + fn GetUserStoreByName(&mut self, storeName: HSTRING, out: *mut *mut UserCertificateStore) -> HRESULT + }} + impl ICertificateStoresStatics2 { + #[inline] pub unsafe fn get_user_store_by_name(&mut self, storeName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetUserStoreByName)(self, storeName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UserCertificateStore: IUserCertificateStore} + RT_ACTIVATABLE!{ICertificateStoresStatics2 [CLSID_CertificateStores]} + RT_ACTIVATABLE!{ICertificateStoresStatics [CLSID_CertificateStores]} + DEFINE_CLSID!(CLSID_CertificateStores = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,101,114,116,105,102,105,99,97,116,101,115,46,67,101,114,116,105,102,105,99,97,116,101,83,116,111,114,101,115,0]); + DEFINE_IID!(IID_IUserCertificateEnrollmentManager, 2519807768, 8929, 18457, 178, 11, 171, 70, 166, 236, 160, 110); + RT_INTERFACE!{interface IUserCertificateEnrollmentManager(IUserCertificateEnrollmentManagerVtbl): IInspectable(IInspectableVtbl) [IID_IUserCertificateEnrollmentManager] { + fn CreateRequestAsync(&mut self, request: *mut CertificateRequestProperties, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn InstallCertificateAsync(&mut self, certificate: HSTRING, installOption: InstallOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ImportPfxDataAsync(&mut self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ImportPfxDataToKspAsync(&mut self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, keyStorageProvider: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IUserCertificateEnrollmentManager { + #[inline] pub unsafe fn create_request_async(&mut self, request: &CertificateRequestProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateRequestAsync)(self, request as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn install_certificate_async(&mut self, certificate: &HStringArg, installOption: InstallOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).InstallCertificateAsync)(self, certificate.get(), installOption, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn import_pfx_data_async(&mut self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportPfxDataAsync)(self, pfxData.get(), password.get(), exportable, keyProtectionLevel, installOption, friendlyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn import_pfx_data_to_ksp_async(&mut self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg, keyStorageProvider: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportPfxDataToKspAsync)(self, pfxData.get(), password.get(), exportable, keyProtectionLevel, installOption, friendlyName.get(), keyStorageProvider.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserCertificateEnrollmentManager2, 229481649, 26078, 18730, 184, 109, 252, 92, 72, 44, 55, 71); + RT_INTERFACE!{interface IUserCertificateEnrollmentManager2(IUserCertificateEnrollmentManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IUserCertificateEnrollmentManager2] { + fn ImportPfxDataToKspWithParametersAsync(&mut self, pfxData: HSTRING, password: HSTRING, pfxImportParameters: *mut PfxImportParameters, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IUserCertificateEnrollmentManager2 { + #[inline] pub unsafe fn import_pfx_data_to_ksp_with_parameters_async(&mut self, pfxData: &HStringArg, password: &HStringArg, pfxImportParameters: &PfxImportParameters) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportPfxDataToKspWithParametersAsync)(self, pfxData.get(), password.get(), pfxImportParameters as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICertificateStore, 2965370656, 13390, 17201, 175, 20, 167, 247, 167, 235, 201, 58); + RT_INTERFACE!{interface ICertificateStore(ICertificateStoreVtbl): IInspectable(IInspectableVtbl) [IID_ICertificateStore] { + fn Add(&mut self, certificate: *mut Certificate) -> HRESULT, + fn Delete(&mut self, certificate: *mut Certificate) -> HRESULT + }} + impl ICertificateStore { + #[inline] pub unsafe fn add(&mut self, certificate: &Certificate) -> Result<()> { + let hr = ((*self.lpVtbl).Add)(self, certificate as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn delete(&mut self, certificate: &Certificate) -> Result<()> { + let hr = ((*self.lpVtbl).Delete)(self, certificate as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICertificateStore2, 3353775690, 16765, 19738, 186, 189, 21, 104, 126, 84, 153, 116); + RT_INTERFACE!{interface ICertificateStore2(ICertificateStore2Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificateStore2] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICertificateStore2 { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserCertificateStore, 3388677507, 30879, 19278, 145, 128, 4, 90, 117, 122, 172, 109); + RT_INTERFACE!{interface IUserCertificateStore(IUserCertificateStoreVtbl): IInspectable(IInspectableVtbl) [IID_IUserCertificateStore] { + fn RequestAddAsync(&mut self, certificate: *mut Certificate, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn RequestDeleteAsync(&mut self, certificate: *mut Certificate, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IUserCertificateStore { + #[inline] pub unsafe fn request_add_async(&mut self, certificate: &Certificate) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAddAsync)(self, certificate as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_delete_async(&mut self, certificate: &Certificate) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestDeleteAsync)(self, certificate as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStandardCertificateStoreNamesStatics, 202722011, 42134, 16888, 143, 229, 158, 150, 243, 110, 251, 248); + RT_INTERFACE!{static interface IStandardCertificateStoreNamesStatics(IStandardCertificateStoreNamesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStandardCertificateStoreNamesStatics] { + fn get_Personal(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TrustedRootCertificationAuthorities(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IntermediateCertificationAuthorities(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStandardCertificateStoreNamesStatics { + #[inline] pub unsafe fn get_personal(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Personal)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_trusted_root_certification_authorities(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TrustedRootCertificationAuthorities)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_intermediate_certification_authorities(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IntermediateCertificationAuthorities)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IStandardCertificateStoreNamesStatics [CLSID_StandardCertificateStoreNames]} + DEFINE_CLSID!(CLSID_StandardCertificateStoreNames = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,101,114,116,105,102,105,99,97,116,101,115,46,83,116,97,110,100,97,114,100,67,101,114,116,105,102,105,99,97,116,101,83,116,111,114,101,78,97,109,101,115,0]); + DEFINE_IID!(IID_IKeyAlgorithmNamesStatics, 1200645591, 31431, 17793, 140, 59, 208, 112, 39, 20, 4, 72); + RT_INTERFACE!{static interface IKeyAlgorithmNamesStatics(IKeyAlgorithmNamesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKeyAlgorithmNamesStatics] { + fn get_Rsa(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Dsa(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Ecdh256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Ecdh384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Ecdh521(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Ecdsa256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Ecdsa384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Ecdsa521(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKeyAlgorithmNamesStatics { + #[inline] pub unsafe fn get_rsa(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Rsa)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_dsa(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Dsa)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdh256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ecdh256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdh384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ecdh384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdh521(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ecdh521)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdsa256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ecdsa256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdsa384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ecdsa384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdsa521(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ecdsa521)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyAlgorithmNamesStatics2, 3382400646, 57853, 19018, 137, 61, 162, 111, 51, 221, 139, 180); + RT_INTERFACE!{static interface IKeyAlgorithmNamesStatics2(IKeyAlgorithmNamesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IKeyAlgorithmNamesStatics2] { + fn get_Ecdsa(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Ecdh(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKeyAlgorithmNamesStatics2 { + #[inline] pub unsafe fn get_ecdsa(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ecdsa)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdh(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ecdh)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKeyAlgorithmNamesStatics [CLSID_KeyAlgorithmNames]} + RT_ACTIVATABLE!{IKeyAlgorithmNamesStatics2 [CLSID_KeyAlgorithmNames]} + DEFINE_CLSID!(CLSID_KeyAlgorithmNames = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,101,114,116,105,102,105,99,97,116,101,115,46,75,101,121,65,108,103,111,114,105,116,104,109,78,97,109,101,115,0]); + DEFINE_IID!(IID_IKeyStorageProviderNamesStatics, 2937613024, 21801, 17922, 189, 148, 10, 171, 145, 149, 123, 92); + RT_INTERFACE!{static interface IKeyStorageProviderNamesStatics(IKeyStorageProviderNamesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKeyStorageProviderNamesStatics] { + fn get_SoftwareKeyStorageProvider(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SmartcardKeyStorageProvider(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PlatformKeyStorageProvider(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKeyStorageProviderNamesStatics { + #[inline] pub unsafe fn get_software_key_storage_provider(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SoftwareKeyStorageProvider)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_smartcard_key_storage_provider(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SmartcardKeyStorageProvider)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_platform_key_storage_provider(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlatformKeyStorageProvider)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyStorageProviderNamesStatics2, 640513085, 39982, 16844, 136, 18, 196, 217, 113, 221, 124, 96); + RT_INTERFACE!{static interface IKeyStorageProviderNamesStatics2(IKeyStorageProviderNamesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IKeyStorageProviderNamesStatics2] { + fn get_PassportKeyStorageProvider(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKeyStorageProviderNamesStatics2 { + #[inline] pub unsafe fn get_passport_key_storage_provider(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PassportKeyStorageProvider)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKeyStorageProviderNamesStatics2 [CLSID_KeyStorageProviderNames]} + RT_ACTIVATABLE!{IKeyStorageProviderNamesStatics [CLSID_KeyStorageProviderNames]} + DEFINE_CLSID!(CLSID_KeyStorageProviderNames = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,101,114,116,105,102,105,99,97,116,101,115,46,75,101,121,83,116,111,114,97,103,101,80,114,111,118,105,100,101,114,78,97,109,101,115,0]); + DEFINE_IID!(IID_IChainBuildingParameters, 1110157602, 31885, 18359, 181, 155, 177, 39, 3, 115, 58, 195); + RT_INTERFACE!{interface IChainBuildingParameters(IChainBuildingParametersVtbl): IInspectable(IInspectableVtbl) [IID_IChainBuildingParameters] { + fn get_EnhancedKeyUsages(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_ValidationTimestamp(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn put_ValidationTimestamp(&mut self, value: ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_RevocationCheckEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_RevocationCheckEnabled(&mut self, value: bool) -> HRESULT, + fn get_NetworkRetrievalEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_NetworkRetrievalEnabled(&mut self, value: bool) -> HRESULT, + fn get_AuthorityInformationAccessEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_AuthorityInformationAccessEnabled(&mut self, value: bool) -> HRESULT, + fn get_CurrentTimeValidationEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_CurrentTimeValidationEnabled(&mut self, value: bool) -> HRESULT, + fn get_ExclusiveTrustRoots(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + }} + impl IChainBuildingParameters { + #[inline] pub unsafe fn get_enhanced_key_usages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EnhancedKeyUsages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_validation_timestamp(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ValidationTimestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_validation_timestamp(&mut self, value: ::rt::gen::windows::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_ValidationTimestamp)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_revocation_check_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RevocationCheckEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_revocation_check_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_RevocationCheckEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_network_retrieval_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NetworkRetrievalEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_network_retrieval_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_NetworkRetrievalEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_authority_information_access_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AuthorityInformationAccessEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_authority_information_access_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AuthorityInformationAccessEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_time_validation_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentTimeValidationEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_current_time_validation_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CurrentTimeValidationEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_exclusive_trust_roots(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExclusiveTrustRoots)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ChainBuildingParameters: IChainBuildingParameters} + DEFINE_IID!(IID_IChainValidationParameters, 3295951690, 32432, 19286, 160, 64, 185, 200, 230, 85, 221, 243); + RT_INTERFACE!{interface IChainValidationParameters(IChainValidationParametersVtbl): IInspectable(IInspectableVtbl) [IID_IChainValidationParameters] { + fn get_CertificateChainPolicy(&mut self, out: *mut CertificateChainPolicy) -> HRESULT, + fn put_CertificateChainPolicy(&mut self, value: CertificateChainPolicy) -> HRESULT, + #[cfg(feature="windows.networking")] fn get_ServerDnsName(&mut self, out: *mut *mut ::rt::gen::windows::networking::HostName) -> HRESULT, + #[cfg(feature="windows.networking")] fn put_ServerDnsName(&mut self, value: *mut ::rt::gen::windows::networking::HostName) -> HRESULT + }} + impl IChainValidationParameters { + #[inline] pub unsafe fn get_certificate_chain_policy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CertificateChainPolicy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_certificate_chain_policy(&mut self, value: CertificateChainPolicy) -> Result<()> { + let hr = ((*self.lpVtbl).put_CertificateChainPolicy)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn get_server_dns_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServerDnsName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn set_server_dns_name(&mut self, value: &::rt::gen::windows::networking::HostName) -> Result<()> { + let hr = ((*self.lpVtbl).put_ServerDnsName)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ChainValidationParameters: IChainValidationParameters} + DEFINE_IID!(IID_ICertificateQuery, 1527261745, 42792, 18710, 181, 238, 255, 203, 138, 207, 36, 23); + RT_INTERFACE!{interface ICertificateQuery(ICertificateQueryVtbl): IInspectable(IInspectableVtbl) [IID_ICertificateQuery] { + fn get_EnhancedKeyUsages(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_IssuerName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_IssuerName(&mut self, value: HSTRING) -> HRESULT, + fn get_FriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_FriendlyName(&mut self, value: HSTRING) -> HRESULT, + fn get_Thumbprint(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn put_Thumbprint(&mut self, valueSize: u32, value: *mut u8) -> HRESULT, + fn get_HardwareOnly(&mut self, out: *mut bool) -> HRESULT, + fn put_HardwareOnly(&mut self, value: bool) -> HRESULT + }} + impl ICertificateQuery { + #[inline] pub unsafe fn get_enhanced_key_usages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EnhancedKeyUsages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_issuer_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IssuerName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_issuer_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_IssuerName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_friendly_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_FriendlyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbprint(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbprint)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_thumbprint(&mut self, value: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).put_Thumbprint)(self, value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hardware_only(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HardwareOnly)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_hardware_only(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_HardwareOnly)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICertificateQuery2, 2472151799, 3033, 20341, 184, 194, 226, 122, 127, 116, 238, 205); + RT_INTERFACE!{interface ICertificateQuery2(ICertificateQuery2Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificateQuery2] { + fn get_IncludeDuplicates(&mut self, out: *mut bool) -> HRESULT, + fn put_IncludeDuplicates(&mut self, value: bool) -> HRESULT, + fn get_IncludeExpiredCertificates(&mut self, out: *mut bool) -> HRESULT, + fn put_IncludeExpiredCertificates(&mut self, value: bool) -> HRESULT, + fn get_StoreName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_StoreName(&mut self, value: HSTRING) -> HRESULT + }} + impl ICertificateQuery2 { + #[inline] pub unsafe fn get_include_duplicates(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncludeDuplicates)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_include_duplicates(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IncludeDuplicates)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_include_expired_certificates(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IncludeExpiredCertificates)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_include_expired_certificates(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IncludeExpiredCertificates)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_store_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StoreName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_store_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_StoreName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICertificateChain, 549409669, 13969, 17665, 166, 44, 253, 151, 39, 139, 49, 238); + RT_INTERFACE!{interface ICertificateChain(ICertificateChainVtbl): IInspectable(IInspectableVtbl) [IID_ICertificateChain] { + fn Validate(&mut self, out: *mut ChainValidationResult) -> HRESULT, + fn ValidateWithParameters(&mut self, parameter: *mut ChainValidationParameters, out: *mut ChainValidationResult) -> HRESULT, + fn GetCertificates(&mut self, includeRoot: bool, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl ICertificateChain { + #[inline] pub unsafe fn validate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Validate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn validate_with_parameters(&mut self, parameter: &ChainValidationParameters) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ValidateWithParameters)(self, parameter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_certificates(&mut self, includeRoot: bool) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCertificates)(self, includeRoot, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CertificateChain: ICertificateChain} + DEFINE_IID!(IID_ICertificate, 859796492, 1240, 17331, 178, 120, 140, 95, 204, 155, 229, 160); + RT_INTERFACE!{interface ICertificate(ICertificateVtbl): IInspectable(IInspectableVtbl) [IID_ICertificate] { + fn BuildChainAsync(&mut self, certificates: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn BuildChainWithParametersAsync(&mut self, certificates: *mut ::rt::gen::windows::foundation::collections::IIterable, parameters: *mut ChainBuildingParameters, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn get_SerialNumber(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn GetHashValue(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn GetHashValueWithAlgorithm(&mut self, hashAlgorithmName: HSTRING, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetCertificateBlob(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn get_Subject(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Issuer(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HasPrivateKey(&mut self, out: *mut bool) -> HRESULT, + fn get_IsStronglyProtected(&mut self, out: *mut bool) -> HRESULT, + fn get_ValidFrom(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_ValidTo(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_EnhancedKeyUsages(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn put_FriendlyName(&mut self, value: HSTRING) -> HRESULT, + fn get_FriendlyName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICertificate { + #[inline] pub unsafe fn build_chain_async(&mut self, certificates: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BuildChainAsync)(self, certificates as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn build_chain_with_parameters_async(&mut self, certificates: &::rt::gen::windows::foundation::collections::IIterable, parameters: &ChainBuildingParameters) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BuildChainWithParametersAsync)(self, certificates as *const _ as *mut _, parameters as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_serial_number(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SerialNumber)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hash_value(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetHashValue)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hash_value_with_algorithm(&mut self, hashAlgorithmName: &HStringArg) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetHashValueWithAlgorithm)(self, hashAlgorithmName.get(), &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_certificate_blob(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCertificateBlob)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subject(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subject)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_issuer(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Issuer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_private_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasPrivateKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_strongly_protected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStronglyProtected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_valid_from(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ValidFrom)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_valid_to(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ValidTo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_enhanced_key_usages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EnhancedKeyUsages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_friendly_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_FriendlyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICertificate2, 397948748, 35365, 19862, 164, 146, 143, 194, 154, 196, 253, 166); + RT_INTERFACE!{interface ICertificate2(ICertificate2Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificate2] { + fn get_IsSecurityDeviceBound(&mut self, out: *mut bool) -> HRESULT, + fn get_KeyUsages(&mut self, out: *mut *mut CertificateKeyUsages) -> HRESULT, + fn get_KeyAlgorithmName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SignatureAlgorithmName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SignatureHashAlgorithmName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SubjectAlternativeName(&mut self, out: *mut *mut SubjectAlternativeNameInfo) -> HRESULT + }} + impl ICertificate2 { + #[inline] pub unsafe fn get_is_security_device_bound(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSecurityDeviceBound)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_usages(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyUsages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_algorithm_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyAlgorithmName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_signature_algorithm_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SignatureAlgorithmName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_signature_hash_algorithm_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SignatureHashAlgorithmName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subject_alternative_name(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SubjectAlternativeName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CertificateKeyUsages: ICertificateKeyUsages} + RT_CLASS!{class SubjectAlternativeNameInfo: ISubjectAlternativeNameInfo} + DEFINE_IID!(IID_ICertificate3, 3193022822, 44639, 18002, 172, 231, 198, 215, 231, 114, 76, 243); + RT_INTERFACE!{interface ICertificate3(ICertificate3Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificate3] { + fn get_IsPerUser(&mut self, out: *mut bool) -> HRESULT, + fn get_StoreName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_KeyStorageProviderName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICertificate3 { + #[inline] pub unsafe fn get_is_per_user(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPerUser)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_store_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StoreName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_storage_provider_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyStorageProviderName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICertificateFactory, 397681180, 19375, 17570, 150, 8, 4, 251, 98, 177, 105, 66); + RT_INTERFACE!{static interface ICertificateFactory(ICertificateFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICertificateFactory] { + #[cfg(feature="windows.storage")] fn CreateCertificate(&mut self, certBlob: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut Certificate) -> HRESULT + }} + impl ICertificateFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_certificate(&mut self, certBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCertificate)(self, certBlob as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICmsTimestampInfo, 794755314, 11288, 20360, 132, 53, 197, 52, 8, 96, 118, 245); + RT_INTERFACE!{interface ICmsTimestampInfo(ICmsTimestampInfoVtbl): IInspectable(IInspectableVtbl) [IID_ICmsTimestampInfo] { + fn get_SigningCertificate(&mut self, out: *mut *mut Certificate) -> HRESULT, + fn get_Certificates(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + }} + impl ICmsTimestampInfo { + #[inline] pub unsafe fn get_signing_certificate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SigningCertificate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_certificates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Certificates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CmsTimestampInfo: ICmsTimestampInfo} + DEFINE_IID!(IID_ICmsSignerInfo, 1355817179, 7471, 19482, 181, 197, 208, 24, 143, 249, 31, 71); + RT_INTERFACE!{interface ICmsSignerInfo(ICmsSignerInfoVtbl): IInspectable(IInspectableVtbl) [IID_ICmsSignerInfo] { + fn get_Certificate(&mut self, out: *mut *mut Certificate) -> HRESULT, + fn put_Certificate(&mut self, value: *mut Certificate) -> HRESULT, + fn get_HashAlgorithmName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_HashAlgorithmName(&mut self, value: HSTRING) -> HRESULT, + fn get_TimestampInfo(&mut self, out: *mut *mut CmsTimestampInfo) -> HRESULT + }} + impl ICmsSignerInfo { + #[inline] pub unsafe fn get_certificate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Certificate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_certificate(&mut self, value: &Certificate) -> Result<()> { + let hr = ((*self.lpVtbl).put_Certificate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hash_algorithm_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HashAlgorithmName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_hash_algorithm_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_HashAlgorithmName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TimestampInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISubjectAlternativeNameInfo, 1479039473, 22173, 19488, 190, 123, 78, 28, 154, 11, 197, 43); + RT_INTERFACE!{interface ISubjectAlternativeNameInfo(ISubjectAlternativeNameInfoVtbl): IInspectable(IInspectableVtbl) [IID_ISubjectAlternativeNameInfo] { + fn get_EmailName(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_IPAddress(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Url(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_DnsName(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_DistinguishedName(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_PrincipalName(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl ISubjectAlternativeNameInfo { + #[inline] pub unsafe fn get_email_name(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EmailName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ipaddress(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IPAddress)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_url(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Url)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_dns_name(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DnsName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_distinguished_name(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DistinguishedName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_principal_name(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrincipalName)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPfxImportParameters, 1745696017, 39432, 18376, 134, 74, 46, 221, 77, 142, 180, 108); + RT_INTERFACE!{interface IPfxImportParameters(IPfxImportParametersVtbl): IInspectable(IInspectableVtbl) [IID_IPfxImportParameters] { + fn get_Exportable(&mut self, out: *mut ExportOption) -> HRESULT, + fn put_Exportable(&mut self, value: ExportOption) -> HRESULT, + fn get_KeyProtectionLevel(&mut self, out: *mut KeyProtectionLevel) -> HRESULT, + fn put_KeyProtectionLevel(&mut self, value: KeyProtectionLevel) -> HRESULT, + fn get_InstallOptions(&mut self, out: *mut InstallOptions) -> HRESULT, + fn put_InstallOptions(&mut self, value: InstallOptions) -> HRESULT, + fn get_FriendlyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_FriendlyName(&mut self, value: HSTRING) -> HRESULT, + fn get_KeyStorageProviderName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_KeyStorageProviderName(&mut self, value: HSTRING) -> HRESULT, + fn get_ContainerNamePrefix(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ContainerNamePrefix(&mut self, value: HSTRING) -> HRESULT, + fn get_ReaderName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ReaderName(&mut self, value: HSTRING) -> HRESULT + }} + impl IPfxImportParameters { + #[inline] pub unsafe fn get_exportable(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Exportable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_exportable(&mut self, value: ExportOption) -> Result<()> { + let hr = ((*self.lpVtbl).put_Exportable)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_protection_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyProtectionLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_protection_level(&mut self, value: KeyProtectionLevel) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeyProtectionLevel)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_install_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InstallOptions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_install_options(&mut self, value: InstallOptions) -> Result<()> { + let hr = ((*self.lpVtbl).put_InstallOptions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_friendly_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FriendlyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_friendly_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_FriendlyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_storage_provider_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyStorageProviderName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_storage_provider_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeyStorageProviderName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_container_name_prefix(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContainerNamePrefix)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_container_name_prefix(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContainerNamePrefix)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_reader_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ReaderName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_reader_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ReaderName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICertificateKeyUsages, 1791369327, 57807, 18538, 180, 133, 166, 156, 131, 228, 111, 209); + RT_INTERFACE!{interface ICertificateKeyUsages(ICertificateKeyUsagesVtbl): IInspectable(IInspectableVtbl) [IID_ICertificateKeyUsages] { + fn get_EncipherOnly(&mut self, out: *mut bool) -> HRESULT, + fn put_EncipherOnly(&mut self, value: bool) -> HRESULT, + fn get_CrlSign(&mut self, out: *mut bool) -> HRESULT, + fn put_CrlSign(&mut self, value: bool) -> HRESULT, + fn get_KeyCertificateSign(&mut self, out: *mut bool) -> HRESULT, + fn put_KeyCertificateSign(&mut self, value: bool) -> HRESULT, + fn get_KeyAgreement(&mut self, out: *mut bool) -> HRESULT, + fn put_KeyAgreement(&mut self, value: bool) -> HRESULT, + fn get_DataEncipherment(&mut self, out: *mut bool) -> HRESULT, + fn put_DataEncipherment(&mut self, value: bool) -> HRESULT, + fn get_KeyEncipherment(&mut self, out: *mut bool) -> HRESULT, + fn put_KeyEncipherment(&mut self, value: bool) -> HRESULT, + fn get_NonRepudiation(&mut self, out: *mut bool) -> HRESULT, + fn put_NonRepudiation(&mut self, value: bool) -> HRESULT, + fn get_DigitalSignature(&mut self, out: *mut bool) -> HRESULT, + fn put_DigitalSignature(&mut self, value: bool) -> HRESULT + }} + impl ICertificateKeyUsages { + #[inline] pub unsafe fn get_encipher_only(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EncipherOnly)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_encipher_only(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_EncipherOnly)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_crl_sign(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CrlSign)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_crl_sign(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CrlSign)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_certificate_sign(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyCertificateSign)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_certificate_sign(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeyCertificateSign)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_agreement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyAgreement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_agreement(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeyAgreement)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_encipherment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DataEncipherment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_data_encipherment(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataEncipherment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_encipherment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyEncipherment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_encipherment(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeyEncipherment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_non_repudiation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NonRepudiation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_non_repudiation(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_NonRepudiation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_digital_signature(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DigitalSignature)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_digital_signature(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_DigitalSignature)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CmsSignerInfo: ICmsSignerInfo} + DEFINE_IID!(IID_ICmsAttachedSignature, 1636408733, 14167, 20171, 189, 220, 12, 163, 87, 215, 169, 54); + RT_INTERFACE!{interface ICmsAttachedSignature(ICmsAttachedSignatureVtbl): IInspectable(IInspectableVtbl) [IID_ICmsAttachedSignature] { + fn get_Certificates(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Content(&mut self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, + fn get_Signers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn VerifySignature(&mut self, out: *mut SignatureValidationResult) -> HRESULT + }} + impl ICmsAttachedSignature { + #[inline] pub unsafe fn get_certificates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Certificates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut outSize = 0; let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut outSize, &mut out); + if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_signers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Signers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn verify_signature(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).VerifySignature)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICmsAttachedSignatureFactory, 3502832661, 63319, 19556, 163, 98, 82, 204, 28, 119, 207, 251); + RT_INTERFACE!{static interface ICmsAttachedSignatureFactory(ICmsAttachedSignatureFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICmsAttachedSignatureFactory] { + #[cfg(feature="windows.storage")] fn CreateCmsAttachedSignature(&mut self, inputBlob: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut CmsAttachedSignature) -> HRESULT + }} + impl ICmsAttachedSignatureFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_cms_attached_signature(&mut self, inputBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCmsAttachedSignature)(self, inputBlob as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CmsAttachedSignature: ICmsAttachedSignature [ICmsAttachedSignatureFactory] [CLSID_CmsAttachedSignature]} + RT_ACTIVATABLE!{ICmsAttachedSignatureStatics [CLSID_CmsAttachedSignature]} + DEFINE_CLSID!(CLSID_CmsAttachedSignature = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,101,114,116,105,102,105,99,97,116,101,115,46,67,109,115,65,116,116,97,99,104,101,100,83,105,103,110,97,116,117,114,101,0]); + DEFINE_IID!(IID_ICmsAttachedSignatureStatics, 2274925710, 45229, 18829, 167, 245, 120, 181, 155, 206, 75, 54); + RT_INTERFACE!{static interface ICmsAttachedSignatureStatics(ICmsAttachedSignatureStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICmsAttachedSignatureStatics] { + #[cfg(feature="windows.storage")] fn GenerateSignatureAsync(&mut self, data: *mut ::rt::gen::windows::storage::streams::IBuffer, signers: *mut ::rt::gen::windows::foundation::collections::IIterable, certificates: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT + }} + impl ICmsAttachedSignatureStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn generate_signature_async(&mut self, data: &::rt::gen::windows::storage::streams::IBuffer, signers: &::rt::gen::windows::foundation::collections::IIterable, certificates: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GenerateSignatureAsync)(self, data as *const _ as *mut _, signers as *const _ as *mut _, certificates as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICmsDetachedSignature, 253686100, 63070, 17718, 131, 57, 89, 68, 8, 29, 178, 202); + RT_INTERFACE!{interface ICmsDetachedSignature(ICmsDetachedSignatureVtbl): IInspectable(IInspectableVtbl) [IID_ICmsDetachedSignature] { + fn get_Certificates(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Signers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows.storage")] fn VerifySignatureAsync(&mut self, data: *mut ::rt::gen::windows::storage::streams::IInputStream, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl ICmsDetachedSignature { + #[inline] pub unsafe fn get_certificates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Certificates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_signers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Signers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn verify_signature_async(&mut self, data: &::rt::gen::windows::storage::streams::IInputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).VerifySignatureAsync)(self, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICmsDetachedSignatureFactory, 3299554563, 44671, 17287, 173, 25, 0, 241, 80, 228, 142, 187); + RT_INTERFACE!{static interface ICmsDetachedSignatureFactory(ICmsDetachedSignatureFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICmsDetachedSignatureFactory] { + #[cfg(feature="windows.storage")] fn CreateCmsDetachedSignature(&mut self, inputBlob: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut CmsDetachedSignature) -> HRESULT + }} + impl ICmsDetachedSignatureFactory { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_cms_detached_signature(&mut self, inputBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCmsDetachedSignature)(self, inputBlob as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CmsDetachedSignature: ICmsDetachedSignature [ICmsDetachedSignatureFactory] [CLSID_CmsDetachedSignature]} + RT_ACTIVATABLE!{ICmsDetachedSignatureStatics [CLSID_CmsDetachedSignature]} + DEFINE_CLSID!(CLSID_CmsDetachedSignature = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,101,114,116,105,102,105,99,97,116,101,115,46,67,109,115,68,101,116,97,99,104,101,100,83,105,103,110,97,116,117,114,101,0]); + DEFINE_IID!(IID_ICmsDetachedSignatureStatics, 1024543997, 49051, 18050, 155, 230, 145, 245, 124, 5, 56, 8); + RT_INTERFACE!{static interface ICmsDetachedSignatureStatics(ICmsDetachedSignatureStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICmsDetachedSignatureStatics] { + #[cfg(feature="windows.storage")] fn GenerateSignatureAsync(&mut self, data: *mut ::rt::gen::windows::storage::streams::IInputStream, signers: *mut ::rt::gen::windows::foundation::collections::IIterable, certificates: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT + }} + impl ICmsDetachedSignatureStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn generate_signature_async(&mut self, data: &::rt::gen::windows::storage::streams::IInputStream, signers: &::rt::gen::windows::foundation::collections::IIterable, certificates: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GenerateSignatureAsync)(self, data as *const _ as *mut _, signers as *const _ as *mut _, certificates as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Security.Cryptography.Certificates +pub mod core { // Windows.Security.Cryptography.Core +use ::prelude::*; + RT_ENUM! { enum CryptographicPrivateKeyBlobType: i32 { + Pkcs8RawPrivateKeyInfo (CryptographicPrivateKeyBlobType_Pkcs8RawPrivateKeyInfo) = 0, Pkcs1RsaPrivateKey (CryptographicPrivateKeyBlobType_Pkcs1RsaPrivateKey) = 1, BCryptPrivateKey (CryptographicPrivateKeyBlobType_BCryptPrivateKey) = 2, Capi1PrivateKey (CryptographicPrivateKeyBlobType_Capi1PrivateKey) = 3, BCryptEccFullPrivateKey (CryptographicPrivateKeyBlobType_BCryptEccFullPrivateKey) = 4, + }} + RT_ENUM! { enum CryptographicPublicKeyBlobType: i32 { + X509SubjectPublicKeyInfo (CryptographicPublicKeyBlobType_X509SubjectPublicKeyInfo) = 0, Pkcs1RsaPublicKey (CryptographicPublicKeyBlobType_Pkcs1RsaPublicKey) = 1, BCryptPublicKey (CryptographicPublicKeyBlobType_BCryptPublicKey) = 2, Capi1PublicKey (CryptographicPublicKeyBlobType_Capi1PublicKey) = 3, BCryptEccFullPublicKey (CryptographicPublicKeyBlobType_BCryptEccFullPublicKey) = 4, + }} + RT_ENUM! { enum Capi1KdfTargetAlgorithm: i32 { + NotAes (Capi1KdfTargetAlgorithm_NotAes) = 0, Aes (Capi1KdfTargetAlgorithm_Aes) = 1, + }} + RT_ENUM! { enum CryptographicPadding: i32 { + None (CryptographicPadding_None) = 0, RsaOaep (CryptographicPadding_RsaOaep) = 1, RsaPkcs1V15 (CryptographicPadding_RsaPkcs1V15) = 2, RsaPss (CryptographicPadding_RsaPss) = 3, + }} + DEFINE_IID!(IID_IKeyDerivationParameters, 2079349095, 1147, 19084, 150, 74, 70, 159, 253, 85, 34, 226); + RT_INTERFACE!{interface IKeyDerivationParameters(IKeyDerivationParametersVtbl): IInspectable(IInspectableVtbl) [IID_IKeyDerivationParameters] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_KdfGenericBinary(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_KdfGenericBinary(&mut self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn get_IterationCount(&mut self, out: *mut u32) -> HRESULT + }} + impl IKeyDerivationParameters { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_kdf_generic_binary(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KdfGenericBinary)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_kdf_generic_binary(&mut self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).put_KdfGenericBinary)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_iteration_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IterationCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyDerivationParameters2, 3443615441, 16766, 20300, 182, 102, 192, 216, 121, 243, 248, 224); + RT_INTERFACE!{interface IKeyDerivationParameters2(IKeyDerivationParameters2Vtbl): IInspectable(IInspectableVtbl) [IID_IKeyDerivationParameters2] { + fn get_Capi1KdfTargetAlgorithm(&mut self, out: *mut Capi1KdfTargetAlgorithm) -> HRESULT, + fn put_Capi1KdfTargetAlgorithm(&mut self, value: Capi1KdfTargetAlgorithm) -> HRESULT + }} + impl IKeyDerivationParameters2 { + #[inline] pub unsafe fn get_capi1_kdf_target_algorithm(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Capi1KdfTargetAlgorithm)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_capi1_kdf_target_algorithm(&mut self, value: Capi1KdfTargetAlgorithm) -> Result<()> { + let hr = ((*self.lpVtbl).put_Capi1KdfTargetAlgorithm)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyDerivationParametersStatics, 3935707070, 62335, 16710, 157, 254, 164, 86, 241, 115, 95, 75); + RT_INTERFACE!{static interface IKeyDerivationParametersStatics(IKeyDerivationParametersStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKeyDerivationParametersStatics] { + #[cfg(feature="windows.storage")] fn BuildForPbkdf2(&mut self, pbkdf2Salt: *mut ::rt::gen::windows::storage::streams::IBuffer, iterationCount: u32, out: *mut *mut KeyDerivationParameters) -> HRESULT, + #[cfg(feature="windows.storage")] fn BuildForSP800108(&mut self, label: *mut ::rt::gen::windows::storage::streams::IBuffer, context: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut KeyDerivationParameters) -> HRESULT, + #[cfg(feature="windows.storage")] fn BuildForSP80056a(&mut self, algorithmId: *mut ::rt::gen::windows::storage::streams::IBuffer, partyUInfo: *mut ::rt::gen::windows::storage::streams::IBuffer, partyVInfo: *mut ::rt::gen::windows::storage::streams::IBuffer, suppPubInfo: *mut ::rt::gen::windows::storage::streams::IBuffer, suppPrivInfo: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut KeyDerivationParameters) -> HRESULT + }} + impl IKeyDerivationParametersStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn build_for_pbkdf2(&mut self, pbkdf2Salt: &::rt::gen::windows::storage::streams::IBuffer, iterationCount: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BuildForPbkdf2)(self, pbkdf2Salt as *const _ as *mut _, iterationCount, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn build_for_sp800108(&mut self, label: &::rt::gen::windows::storage::streams::IBuffer, context: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BuildForSP800108)(self, label as *const _ as *mut _, context as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn build_for_sp80056a(&mut self, algorithmId: &::rt::gen::windows::storage::streams::IBuffer, partyUInfo: &::rt::gen::windows::storage::streams::IBuffer, partyVInfo: &::rt::gen::windows::storage::streams::IBuffer, suppPubInfo: &::rt::gen::windows::storage::streams::IBuffer, suppPrivInfo: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BuildForSP80056a)(self, algorithmId as *const _ as *mut _, partyUInfo as *const _ as *mut _, partyVInfo as *const _ as *mut _, suppPubInfo as *const _ as *mut _, suppPrivInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class KeyDerivationParameters: IKeyDerivationParameters} + RT_ACTIVATABLE!{IKeyDerivationParametersStatics [CLSID_KeyDerivationParameters]} + RT_ACTIVATABLE!{IKeyDerivationParametersStatics2 [CLSID_KeyDerivationParameters]} + DEFINE_CLSID!(CLSID_KeyDerivationParameters = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,75,101,121,68,101,114,105,118,97,116,105,111,110,80,97,114,97,109,101,116,101,114,115,0]); + DEFINE_IID!(IID_IKeyDerivationParametersStatics2, 2776120789, 22755, 20219, 178, 131, 161, 101, 49, 38, 225, 190); + RT_INTERFACE!{static interface IKeyDerivationParametersStatics2(IKeyDerivationParametersStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IKeyDerivationParametersStatics2] { + fn BuildForCapi1Kdf(&mut self, capi1KdfTargetAlgorithm: Capi1KdfTargetAlgorithm, out: *mut *mut KeyDerivationParameters) -> HRESULT + }} + impl IKeyDerivationParametersStatics2 { + #[inline] pub unsafe fn build_for_capi1_kdf(&mut self, capi1KdfTargetAlgorithm: Capi1KdfTargetAlgorithm) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BuildForCapi1Kdf)(self, capi1KdfTargetAlgorithm, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICryptographicKey, 3978967920, 36475, 16393, 132, 1, 255, 209, 166, 46, 235, 39); + RT_INTERFACE!{interface ICryptographicKey(ICryptographicKeyVtbl): IInspectable(IInspectableVtbl) [IID_ICryptographicKey] { + fn get_KeySize(&mut self, out: *mut u32) -> HRESULT, + #[cfg(feature="windows.storage")] fn ExportDefaultPrivateKeyBlobType(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn ExportPrivateKeyWithBlobType(&mut self, blobType: CryptographicPrivateKeyBlobType, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn ExportDefaultPublicKeyBlobType(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn ExportPublicKeyWithBlobType(&mut self, blobType: CryptographicPublicKeyBlobType, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl ICryptographicKey { + #[inline] pub unsafe fn get_key_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeySize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn export_default_private_key_blob_type(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ExportDefaultPrivateKeyBlobType)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn export_private_key_with_blob_type(&mut self, blobType: CryptographicPrivateKeyBlobType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ExportPrivateKeyWithBlobType)(self, blobType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn export_default_public_key_blob_type(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ExportDefaultPublicKeyBlobType)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn export_public_key_with_blob_type(&mut self, blobType: CryptographicPublicKeyBlobType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ExportPublicKeyWithBlobType)(self, blobType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CryptographicKey: ICryptographicKey} + DEFINE_IID!(IID_IHashComputation, 1493488054, 44337, 17923, 163, 164, 177, 189, 169, 142, 37, 98); + RT_INTERFACE!{interface IHashComputation(IHashComputationVtbl): IInspectable(IInspectableVtbl) [IID_IHashComputation] { + #[cfg(feature="windows.storage")] fn Append(&mut self, data: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetValueAndReset(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl IHashComputation { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn append(&mut self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).Append)(self, data as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_value_and_reset(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetValueAndReset)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CryptographicHash: IHashComputation} + DEFINE_IID!(IID_IHashAlgorithmProvider, 3197841536, 45763, 16939, 188, 225, 236, 144, 239, 181, 215, 181); + RT_INTERFACE!{interface IHashAlgorithmProvider(IHashAlgorithmProviderVtbl): IInspectable(IInspectableVtbl) [IID_IHashAlgorithmProvider] { + fn get_AlgorithmName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HashLength(&mut self, out: *mut u32) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn HashData(&mut self, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + fn CreateHash(&mut self, out: *mut *mut CryptographicHash) -> HRESULT + }} + impl IHashAlgorithmProvider { + #[inline] pub unsafe fn get_algorithm_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlgorithmName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hash_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HashLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn hash_data(&mut self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).HashData)(self, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_hash(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateHash)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMacAlgorithmProvider, 1245693379, 7357, 16846, 160, 146, 170, 11, 197, 210, 210, 245); + RT_INTERFACE!{interface IMacAlgorithmProvider(IMacAlgorithmProviderVtbl): IInspectable(IInspectableVtbl) [IID_IMacAlgorithmProvider] { + fn get_AlgorithmName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MacLength(&mut self, out: *mut u32) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateKey(&mut self, keyMaterial: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut CryptographicKey) -> HRESULT + }} + impl IMacAlgorithmProvider { + #[inline] pub unsafe fn get_algorithm_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlgorithmName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mac_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MacLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_key(&mut self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateKey)(self, keyMaterial as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMacAlgorithmProvider2, 1839409685, 55601, 17133, 142, 126, 195, 1, 202, 238, 17, 156); + RT_INTERFACE!{interface IMacAlgorithmProvider2(IMacAlgorithmProvider2Vtbl): IInspectable(IInspectableVtbl) [IID_IMacAlgorithmProvider2] { + #[cfg(feature="windows.storage")] fn CreateHash(&mut self, keyMaterial: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut CryptographicHash) -> HRESULT + }} + impl IMacAlgorithmProvider2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_hash(&mut self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateHash)(self, keyMaterial as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyDerivationAlgorithmProvider, 3791366203, 18033, 17335, 145, 88, 118, 58, 170, 152, 182, 191); + RT_INTERFACE!{interface IKeyDerivationAlgorithmProvider(IKeyDerivationAlgorithmProviderVtbl): IInspectable(IInspectableVtbl) [IID_IKeyDerivationAlgorithmProvider] { + fn get_AlgorithmName(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateKey(&mut self, keyMaterial: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut CryptographicKey) -> HRESULT + }} + impl IKeyDerivationAlgorithmProvider { + #[inline] pub unsafe fn get_algorithm_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlgorithmName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_key(&mut self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateKey)(self, keyMaterial as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISymmetricKeyAlgorithmProvider, 1031686707, 15312, 18690, 138, 200, 71, 13, 80, 210, 19, 118); + RT_INTERFACE!{interface ISymmetricKeyAlgorithmProvider(ISymmetricKeyAlgorithmProviderVtbl): IInspectable(IInspectableVtbl) [IID_ISymmetricKeyAlgorithmProvider] { + fn get_AlgorithmName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BlockLength(&mut self, out: *mut u32) -> HRESULT, + #[cfg(feature="windows.storage")] fn CreateSymmetricKey(&mut self, keyMaterial: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut CryptographicKey) -> HRESULT + }} + impl ISymmetricKeyAlgorithmProvider { + #[inline] pub unsafe fn get_algorithm_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlgorithmName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_block_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BlockLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_symmetric_key(&mut self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSymmetricKey)(self, keyMaterial as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAsymmetricKeyAlgorithmProvider, 3906142007, 25177, 20104, 183, 224, 148, 25, 31, 222, 105, 158); + RT_INTERFACE!{interface IAsymmetricKeyAlgorithmProvider(IAsymmetricKeyAlgorithmProviderVtbl): IInspectable(IInspectableVtbl) [IID_IAsymmetricKeyAlgorithmProvider] { + fn get_AlgorithmName(&mut self, out: *mut HSTRING) -> HRESULT, + fn CreateKeyPair(&mut self, keySize: u32, out: *mut *mut CryptographicKey) -> HRESULT, + #[cfg(feature="windows.storage")] fn ImportDefaultPrivateKeyBlob(&mut self, keyBlob: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut CryptographicKey) -> HRESULT, + #[cfg(feature="windows.storage")] fn ImportKeyPairWithBlobType(&mut self, keyBlob: *mut ::rt::gen::windows::storage::streams::IBuffer, blobType: CryptographicPrivateKeyBlobType, out: *mut *mut CryptographicKey) -> HRESULT, + #[cfg(feature="windows.storage")] fn ImportDefaultPublicKeyBlob(&mut self, keyBlob: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut CryptographicKey) -> HRESULT, + #[cfg(feature="windows.storage")] fn ImportPublicKeyWithBlobType(&mut self, keyBlob: *mut ::rt::gen::windows::storage::streams::IBuffer, blobType: CryptographicPublicKeyBlobType, out: *mut *mut CryptographicKey) -> HRESULT + }} + impl IAsymmetricKeyAlgorithmProvider { + #[inline] pub unsafe fn get_algorithm_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlgorithmName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_key_pair(&mut self, keySize: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateKeyPair)(self, keySize, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn import_default_private_key_blob(&mut self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportDefaultPrivateKeyBlob)(self, keyBlob as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn import_key_pair_with_blob_type(&mut self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer, blobType: CryptographicPrivateKeyBlobType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportKeyPairWithBlobType)(self, keyBlob as *const _ as *mut _, blobType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn import_default_public_key_blob(&mut self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportDefaultPublicKeyBlob)(self, keyBlob as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn import_public_key_with_blob_type(&mut self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer, blobType: CryptographicPublicKeyBlobType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ImportPublicKeyWithBlobType)(self, keyBlob as *const _ as *mut _, blobType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAsymmetricKeyAlgorithmProvider2, 1311910526, 31821, 18839, 172, 79, 27, 132, 139, 54, 48, 110); + RT_INTERFACE!{interface IAsymmetricKeyAlgorithmProvider2(IAsymmetricKeyAlgorithmProvider2Vtbl): IInspectable(IInspectableVtbl) [IID_IAsymmetricKeyAlgorithmProvider2] { + fn CreateKeyPairWithCurveName(&mut self, curveName: HSTRING, out: *mut *mut CryptographicKey) -> HRESULT, + fn CreateKeyPairWithCurveParameters(&mut self, parametersSize: u32, parameters: *mut u8, out: *mut *mut CryptographicKey) -> HRESULT + }} + impl IAsymmetricKeyAlgorithmProvider2 { + #[inline] pub unsafe fn create_key_pair_with_curve_name(&mut self, curveName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateKeyPairWithCurveName)(self, curveName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_key_pair_with_curve_parameters(&mut self, parameters: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateKeyPairWithCurveParameters)(self, parameters.len() as u32, parameters.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPersistedKeyProviderStatics, 1999063060, 55764, 19701, 182, 104, 224, 69, 125, 243, 8, 148); + RT_INTERFACE!{static interface IPersistedKeyProviderStatics(IPersistedKeyProviderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPersistedKeyProviderStatics] { + fn OpenKeyPairFromCertificateAsync(&mut self, certificate: *mut super::certificates::Certificate, hashAlgorithmName: HSTRING, padding: CryptographicPadding, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn OpenPublicKeyFromCertificate(&mut self, certificate: *mut super::certificates::Certificate, hashAlgorithmName: HSTRING, padding: CryptographicPadding, out: *mut *mut CryptographicKey) -> HRESULT + }} + impl IPersistedKeyProviderStatics { + #[inline] pub unsafe fn open_key_pair_from_certificate_async(&mut self, certificate: &super::certificates::Certificate, hashAlgorithmName: &HStringArg, padding: CryptographicPadding) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenKeyPairFromCertificateAsync)(self, certificate as *const _ as *mut _, hashAlgorithmName.get(), padding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn open_public_key_from_certificate(&mut self, certificate: &super::certificates::Certificate, hashAlgorithmName: &HStringArg, padding: CryptographicPadding) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenPublicKeyFromCertificate)(self, certificate as *const _ as *mut _, hashAlgorithmName.get(), padding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPersistedKeyProviderStatics [CLSID_PersistedKeyProvider]} + DEFINE_CLSID!(CLSID_PersistedKeyProvider = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,80,101,114,115,105,115,116,101,100,75,101,121,80,114,111,118,105,100,101,114,0]); + DEFINE_IID!(IID_IEncryptedAndAuthenticatedData, 1873031143, 7883, 19200, 190, 165, 96, 184, 63, 134, 47, 23); + RT_INTERFACE!{interface IEncryptedAndAuthenticatedData(IEncryptedAndAuthenticatedDataVtbl): IInspectable(IInspectableVtbl) [IID_IEncryptedAndAuthenticatedData] { + #[cfg(feature="windows.storage")] fn get_EncryptedData(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_AuthenticationTag(&mut self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl IEncryptedAndAuthenticatedData { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_encrypted_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EncryptedData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_authentication_tag(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AuthenticationTag)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EncryptedAndAuthenticatedData: IEncryptedAndAuthenticatedData} + DEFINE_IID!(IID_ICryptographicEngineStatics, 2682914361, 28663, 19589, 160, 149, 149, 235, 49, 113, 94, 185); + RT_INTERFACE!{static interface ICryptographicEngineStatics(ICryptographicEngineStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICryptographicEngineStatics] { + #[cfg(feature="windows.storage")] fn Encrypt(&mut self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, iv: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn Decrypt(&mut self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, iv: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn EncryptAndAuthenticate(&mut self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, nonce: *mut ::rt::gen::windows::storage::streams::IBuffer, authenticatedData: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut EncryptedAndAuthenticatedData) -> HRESULT, + #[cfg(feature="windows.storage")] fn DecryptAndAuthenticate(&mut self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, nonce: *mut ::rt::gen::windows::storage::streams::IBuffer, authenticationTag: *mut ::rt::gen::windows::storage::streams::IBuffer, authenticatedData: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn Sign(&mut self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn VerifySignature(&mut self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, signature: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut bool) -> HRESULT, + #[cfg(feature="windows.storage")] fn DeriveKeyMaterial(&mut self, key: *mut CryptographicKey, parameters: *mut KeyDerivationParameters, desiredKeySize: u32, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT + }} + impl ICryptographicEngineStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn encrypt(&mut self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Encrypt)(self, key as *const _ as *mut _, data as *const _ as *mut _, iv as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn decrypt(&mut self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Decrypt)(self, key as *const _ as *mut _, data as *const _ as *mut _, iv as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn encrypt_and_authenticate(&mut self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, nonce: &::rt::gen::windows::storage::streams::IBuffer, authenticatedData: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EncryptAndAuthenticate)(self, key as *const _ as *mut _, data as *const _ as *mut _, nonce as *const _ as *mut _, authenticatedData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn decrypt_and_authenticate(&mut self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, nonce: &::rt::gen::windows::storage::streams::IBuffer, authenticationTag: &::rt::gen::windows::storage::streams::IBuffer, authenticatedData: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DecryptAndAuthenticate)(self, key as *const _ as *mut _, data as *const _ as *mut _, nonce as *const _ as *mut _, authenticationTag as *const _ as *mut _, authenticatedData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn sign(&mut self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Sign)(self, key as *const _ as *mut _, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn verify_signature(&mut self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, signature: &::rt::gen::windows::storage::streams::IBuffer) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).VerifySignature)(self, key as *const _ as *mut _, data as *const _ as *mut _, signature as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn derive_key_material(&mut self, key: &CryptographicKey, parameters: &KeyDerivationParameters, desiredKeySize: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeriveKeyMaterial)(self, key as *const _ as *mut _, parameters as *const _ as *mut _, desiredKeySize, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICryptographicEngineStatics2, 1733904638, 57247, 16785, 146, 199, 108, 230, 245, 132, 32, 224); + RT_INTERFACE!{static interface ICryptographicEngineStatics2(ICryptographicEngineStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ICryptographicEngineStatics2] { + #[cfg(feature="windows.storage")] fn SignHashedData(&mut self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn VerifySignatureWithHashInput(&mut self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, signature: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut bool) -> HRESULT, + #[cfg(feature="windows.storage")] fn DecryptAsync(&mut self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, iv: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT, + #[cfg(feature="windows.storage")] fn SignAsync(&mut self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT, + #[cfg(feature="windows.storage")] fn SignHashedDataAsync(&mut self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT + }} + impl ICryptographicEngineStatics2 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn sign_hashed_data(&mut self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SignHashedData)(self, key as *const _ as *mut _, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn verify_signature_with_hash_input(&mut self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, signature: &::rt::gen::windows::storage::streams::IBuffer) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).VerifySignatureWithHashInput)(self, key as *const _ as *mut _, data as *const _ as *mut _, signature as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn decrypt_async(&mut self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DecryptAsync)(self, key as *const _ as *mut _, data as *const _ as *mut _, iv as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn sign_async(&mut self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SignAsync)(self, key as *const _ as *mut _, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn sign_hashed_data_async(&mut self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SignHashedDataAsync)(self, key as *const _ as *mut _, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ICryptographicEngineStatics2 [CLSID_CryptographicEngine]} + RT_ACTIVATABLE!{ICryptographicEngineStatics [CLSID_CryptographicEngine]} + DEFINE_CLSID!(CLSID_CryptographicEngine = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,67,114,121,112,116,111,103,114,97,112,104,105,99,69,110,103,105,110,101,0]); + DEFINE_IID!(IID_IHashAlgorithmProviderStatics, 2678888257, 23748, 17206, 174, 56, 98, 18, 183, 90, 145, 90); + RT_INTERFACE!{static interface IHashAlgorithmProviderStatics(IHashAlgorithmProviderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IHashAlgorithmProviderStatics] { + fn OpenAlgorithm(&mut self, algorithm: HSTRING, out: *mut *mut HashAlgorithmProvider) -> HRESULT + }} + impl IHashAlgorithmProviderStatics { + #[inline] pub unsafe fn open_algorithm(&mut self, algorithm: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenAlgorithm)(self, algorithm.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class HashAlgorithmProvider: IHashAlgorithmProvider} + RT_ACTIVATABLE!{IHashAlgorithmProviderStatics [CLSID_HashAlgorithmProvider]} + DEFINE_CLSID!(CLSID_HashAlgorithmProvider = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,72,97,115,104,65,108,103,111,114,105,116,104,109,80,114,111,118,105,100,101,114,0]); + DEFINE_IID!(IID_IMacAlgorithmProviderStatics, 3384656199, 52343, 19952, 158, 78, 185, 33, 224, 128, 100, 76); + RT_INTERFACE!{static interface IMacAlgorithmProviderStatics(IMacAlgorithmProviderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMacAlgorithmProviderStatics] { + fn OpenAlgorithm(&mut self, algorithm: HSTRING, out: *mut *mut MacAlgorithmProvider) -> HRESULT + }} + impl IMacAlgorithmProviderStatics { + #[inline] pub unsafe fn open_algorithm(&mut self, algorithm: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenAlgorithm)(self, algorithm.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MacAlgorithmProvider: IMacAlgorithmProvider} + RT_ACTIVATABLE!{IMacAlgorithmProviderStatics [CLSID_MacAlgorithmProvider]} + DEFINE_CLSID!(CLSID_MacAlgorithmProvider = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,77,97,99,65,108,103,111,114,105,116,104,109,80,114,111,118,105,100,101,114,0]); + DEFINE_IID!(IID_IKeyDerivationAlgorithmProviderStatics, 170002810, 2588, 17467, 148, 24, 185, 73, 138, 235, 22, 3); + RT_INTERFACE!{static interface IKeyDerivationAlgorithmProviderStatics(IKeyDerivationAlgorithmProviderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKeyDerivationAlgorithmProviderStatics] { + fn OpenAlgorithm(&mut self, algorithm: HSTRING, out: *mut *mut KeyDerivationAlgorithmProvider) -> HRESULT + }} + impl IKeyDerivationAlgorithmProviderStatics { + #[inline] pub unsafe fn open_algorithm(&mut self, algorithm: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenAlgorithm)(self, algorithm.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class KeyDerivationAlgorithmProvider: IKeyDerivationAlgorithmProvider} + RT_ACTIVATABLE!{IKeyDerivationAlgorithmProviderStatics [CLSID_KeyDerivationAlgorithmProvider]} + DEFINE_CLSID!(CLSID_KeyDerivationAlgorithmProvider = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,75,101,121,68,101,114,105,118,97,116,105,111,110,65,108,103,111,114,105,116,104,109,80,114,111,118,105,100,101,114,0]); + DEFINE_IID!(IID_ISymmetricKeyAlgorithmProviderStatics, 2369463078, 7991, 18719, 182, 14, 245, 67, 27, 38, 180, 131); + RT_INTERFACE!{static interface ISymmetricKeyAlgorithmProviderStatics(ISymmetricKeyAlgorithmProviderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISymmetricKeyAlgorithmProviderStatics] { + fn OpenAlgorithm(&mut self, algorithm: HSTRING, out: *mut *mut SymmetricKeyAlgorithmProvider) -> HRESULT + }} + impl ISymmetricKeyAlgorithmProviderStatics { + #[inline] pub unsafe fn open_algorithm(&mut self, algorithm: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenAlgorithm)(self, algorithm.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SymmetricKeyAlgorithmProvider: ISymmetricKeyAlgorithmProvider} + RT_ACTIVATABLE!{ISymmetricKeyAlgorithmProviderStatics [CLSID_SymmetricKeyAlgorithmProvider]} + DEFINE_CLSID!(CLSID_SymmetricKeyAlgorithmProvider = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,83,121,109,109,101,116,114,105,99,75,101,121,65,108,103,111,114,105,116,104,109,80,114,111,118,105,100,101,114,0]); + DEFINE_IID!(IID_IAsymmetricKeyAlgorithmProviderStatics, 1113316888, 42995, 18342, 168, 210, 196, 141, 96, 51, 166, 92); + RT_INTERFACE!{static interface IAsymmetricKeyAlgorithmProviderStatics(IAsymmetricKeyAlgorithmProviderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAsymmetricKeyAlgorithmProviderStatics] { + fn OpenAlgorithm(&mut self, algorithm: HSTRING, out: *mut *mut AsymmetricKeyAlgorithmProvider) -> HRESULT + }} + impl IAsymmetricKeyAlgorithmProviderStatics { + #[inline] pub unsafe fn open_algorithm(&mut self, algorithm: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenAlgorithm)(self, algorithm.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AsymmetricKeyAlgorithmProvider: IAsymmetricKeyAlgorithmProvider} + RT_ACTIVATABLE!{IAsymmetricKeyAlgorithmProviderStatics [CLSID_AsymmetricKeyAlgorithmProvider]} + DEFINE_CLSID!(CLSID_AsymmetricKeyAlgorithmProvider = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,65,115,121,109,109,101,116,114,105,99,75,101,121,65,108,103,111,114,105,116,104,109,80,114,111,118,105,100,101,114,0]); + DEFINE_IID!(IID_IHashAlgorithmNamesStatics, 1801323798, 56982, 20234, 141, 87, 220, 201, 218, 227, 108, 118); + RT_INTERFACE!{static interface IHashAlgorithmNamesStatics(IHashAlgorithmNamesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IHashAlgorithmNamesStatics] { + fn get_Md5(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sha1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sha384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sha512(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IHashAlgorithmNamesStatics { + #[inline] pub unsafe fn get_md5(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Md5)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sha1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sha1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sha384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sha384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sha512(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sha512)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IHashAlgorithmNamesStatics [CLSID_HashAlgorithmNames]} + DEFINE_CLSID!(CLSID_HashAlgorithmNames = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,72,97,115,104,65,108,103,111,114,105,116,104,109,78,97,109,101,115,0]); + DEFINE_IID!(IID_IMacAlgorithmNamesStatics, 1094788728, 64286, 17316, 137, 94, 169, 2, 110, 67, 144, 163); + RT_INTERFACE!{static interface IMacAlgorithmNamesStatics(IMacAlgorithmNamesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMacAlgorithmNamesStatics] { + fn get_HmacMd5(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HmacSha1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HmacSha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HmacSha384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HmacSha512(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AesCmac(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMacAlgorithmNamesStatics { + #[inline] pub unsafe fn get_hmac_md5(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HmacMd5)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hmac_sha1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HmacSha1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hmac_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HmacSha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hmac_sha384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HmacSha384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hmac_sha512(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HmacSha512)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_aes_cmac(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AesCmac)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IMacAlgorithmNamesStatics [CLSID_MacAlgorithmNames]} + DEFINE_CLSID!(CLSID_MacAlgorithmNames = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,77,97,99,65,108,103,111,114,105,116,104,109,78,97,109,101,115,0]); + DEFINE_IID!(IID_ISymmetricAlgorithmNamesStatics, 1752199803, 51606, 20142, 132, 215, 121, 178, 174, 183, 59, 156); + RT_INTERFACE!{static interface ISymmetricAlgorithmNamesStatics(ISymmetricAlgorithmNamesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISymmetricAlgorithmNamesStatics] { + fn get_DesCbc(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DesEcb(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TripleDesCbc(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TripleDesEcb(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Rc2Cbc(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Rc2Ecb(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AesCbc(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AesEcb(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AesGcm(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AesCcm(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AesCbcPkcs7(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AesEcbPkcs7(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DesCbcPkcs7(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DesEcbPkcs7(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TripleDesCbcPkcs7(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TripleDesEcbPkcs7(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Rc2CbcPkcs7(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Rc2EcbPkcs7(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Rc4(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISymmetricAlgorithmNamesStatics { + #[inline] pub unsafe fn get_des_cbc(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesCbc)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_des_ecb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesEcb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_triple_des_cbc(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TripleDesCbc)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_triple_des_ecb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TripleDesEcb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rc2_cbc(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Rc2Cbc)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rc2_ecb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Rc2Ecb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_aes_cbc(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AesCbc)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_aes_ecb(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AesEcb)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_aes_gcm(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AesGcm)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_aes_ccm(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AesCcm)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_aes_cbc_pkcs7(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AesCbcPkcs7)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_aes_ecb_pkcs7(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AesEcbPkcs7)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_des_cbc_pkcs7(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesCbcPkcs7)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_des_ecb_pkcs7(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesEcbPkcs7)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_triple_des_cbc_pkcs7(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TripleDesCbcPkcs7)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_triple_des_ecb_pkcs7(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TripleDesEcbPkcs7)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rc2_cbc_pkcs7(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Rc2CbcPkcs7)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rc2_ecb_pkcs7(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Rc2EcbPkcs7)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rc4(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Rc4)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ISymmetricAlgorithmNamesStatics [CLSID_SymmetricAlgorithmNames]} + DEFINE_CLSID!(CLSID_SymmetricAlgorithmNames = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,83,121,109,109,101,116,114,105,99,65,108,103,111,114,105,116,104,109,78,97,109,101,115,0]); + DEFINE_IID!(IID_IAsymmetricAlgorithmNamesStatics, 3405184228, 26560, 18090, 132, 249, 117, 46, 119, 68, 159, 155); + RT_INTERFACE!{static interface IAsymmetricAlgorithmNamesStatics(IAsymmetricAlgorithmNamesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAsymmetricAlgorithmNamesStatics] { + fn get_RsaPkcs1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaOaepSha1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaOaepSha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaOaepSha384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaOaepSha512(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EcdsaP256Sha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EcdsaP384Sha384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EcdsaP521Sha512(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DsaSha1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DsaSha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaSignPkcs1Sha1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaSignPkcs1Sha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaSignPkcs1Sha384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaSignPkcs1Sha512(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaSignPssSha1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaSignPssSha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaSignPssSha384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RsaSignPssSha512(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAsymmetricAlgorithmNamesStatics { + #[inline] pub unsafe fn get_rsa_pkcs1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaPkcs1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_oaep_sha1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaOaepSha1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_oaep_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaOaepSha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_oaep_sha384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaOaepSha384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_oaep_sha512(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaOaepSha512)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdsa_p256_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EcdsaP256Sha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdsa_p384_sha384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EcdsaP384Sha384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdsa_p521_sha512(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EcdsaP521Sha512)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_dsa_sha1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DsaSha1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_dsa_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DsaSha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_sign_pkcs1_sha1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaSignPkcs1Sha1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_sign_pkcs1_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaSignPkcs1Sha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_sign_pkcs1_sha384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaSignPkcs1Sha384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_sign_pkcs1_sha512(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaSignPkcs1Sha512)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_sign_pss_sha1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaSignPssSha1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_sign_pss_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaSignPssSha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_sign_pss_sha384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaSignPssSha384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rsa_sign_pss_sha512(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RsaSignPssSha512)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAsymmetricAlgorithmNamesStatics2, 4047618262, 19455, 20259, 186, 102, 96, 69, 177, 55, 213, 223); + RT_INTERFACE!{static interface IAsymmetricAlgorithmNamesStatics2(IAsymmetricAlgorithmNamesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAsymmetricAlgorithmNamesStatics2] { + fn get_EcdsaSha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EcdsaSha384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EcdsaSha512(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAsymmetricAlgorithmNamesStatics2 { + #[inline] pub unsafe fn get_ecdsa_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EcdsaSha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdsa_sha384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EcdsaSha384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ecdsa_sha512(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EcdsaSha512)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IAsymmetricAlgorithmNamesStatics [CLSID_AsymmetricAlgorithmNames]} + RT_ACTIVATABLE!{IAsymmetricAlgorithmNamesStatics2 [CLSID_AsymmetricAlgorithmNames]} + DEFINE_CLSID!(CLSID_AsymmetricAlgorithmNames = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,65,115,121,109,109,101,116,114,105,99,65,108,103,111,114,105,116,104,109,78,97,109,101,115,0]); + DEFINE_IID!(IID_IEccCurveNamesStatics, 3019870988, 44779, 16542, 183, 212, 155, 149, 41, 90, 174, 207); + RT_INTERFACE!{static interface IEccCurveNamesStatics(IEccCurveNamesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IEccCurveNamesStatics] { + fn get_BrainpoolP160r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP160t1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP192r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP192t1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP224r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP224t1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP256r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP256t1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP320r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP320t1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP384r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP384t1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP512r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BrainpoolP512t1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Curve25519(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Ec192wapi(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NistP192(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NistP224(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NistP256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NistP384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NistP521(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NumsP256t1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NumsP384t1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NumsP512t1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SecP160k1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SecP160r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SecP160r2(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SecP192k1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SecP192r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SecP224k1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SecP224r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SecP256k1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SecP256r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SecP384r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SecP521r1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Wtls7(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Wtls9(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Wtls12(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_X962P192v1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_X962P192v2(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_X962P192v3(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_X962P239v1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_X962P239v2(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_X962P239v3(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_X962P256v1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AllEccCurveNames(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IEccCurveNamesStatics { + #[inline] pub unsafe fn get_brainpool_p160r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP160r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p160t1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP160t1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p192r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP192r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p192t1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP192t1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p224r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP224r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p224t1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP224t1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p256r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP256r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p256t1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP256t1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p320r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP320r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p320t1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP320t1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p384r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP384r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p384t1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP384t1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p512r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP512r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_brainpool_p512t1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BrainpoolP512t1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_curve25519(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Curve25519)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_ec192wapi(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Ec192wapi)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nist_p192(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NistP192)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nist_p224(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NistP224)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nist_p256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NistP256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nist_p384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NistP384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nist_p521(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NistP521)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nums_p256t1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NumsP256t1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nums_p384t1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NumsP384t1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nums_p512t1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NumsP512t1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sec_p160k1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecP160k1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sec_p160r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecP160r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sec_p160r2(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecP160r2)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sec_p192k1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecP192k1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sec_p192r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecP192r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sec_p224k1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecP224k1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sec_p224r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecP224r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sec_p256k1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecP256k1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sec_p256r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecP256r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sec_p384r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecP384r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sec_p521r1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SecP521r1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_wtls7(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Wtls7)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_wtls9(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Wtls9)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_wtls12(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Wtls12)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_x962_p192v1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_X962P192v1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_x962_p192v2(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_X962P192v2)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_x962_p192v3(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_X962P192v3)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_x962_p239v1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_X962P239v1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_x962_p239v2(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_X962P239v2)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_x962_p239v3(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_X962P239v3)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_x962_p256v1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_X962P256v1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_all_ecc_curve_names(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AllEccCurveNames)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IEccCurveNamesStatics [CLSID_EccCurveNames]} + DEFINE_CLSID!(CLSID_EccCurveNames = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,69,99,99,67,117,114,118,101,78,97,109,101,115,0]); + DEFINE_IID!(IID_IKeyDerivationAlgorithmNamesStatics, 2070820414, 38098, 18233, 165, 123, 2, 46, 12, 58, 64, 42); + RT_INTERFACE!{static interface IKeyDerivationAlgorithmNamesStatics(IKeyDerivationAlgorithmNamesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKeyDerivationAlgorithmNamesStatics] { + fn get_Pbkdf2Md5(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Pbkdf2Sha1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Pbkdf2Sha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Pbkdf2Sha384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Pbkdf2Sha512(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sp800108CtrHmacMd5(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sp800108CtrHmacSha1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sp800108CtrHmacSha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sp800108CtrHmacSha384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sp800108CtrHmacSha512(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sp80056aConcatMd5(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sp80056aConcatSha1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sp80056aConcatSha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sp80056aConcatSha384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Sp80056aConcatSha512(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKeyDerivationAlgorithmNamesStatics { + #[inline] pub unsafe fn get_pbkdf2_md5(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pbkdf2Md5)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pbkdf2_sha1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pbkdf2Sha1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pbkdf2_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pbkdf2Sha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pbkdf2_sha384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pbkdf2Sha384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pbkdf2_sha512(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Pbkdf2Sha512)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sp800108_ctr_hmac_md5(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sp800108CtrHmacMd5)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sp800108_ctr_hmac_sha1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sp800108CtrHmacSha1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sp800108_ctr_hmac_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sp800108CtrHmacSha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sp800108_ctr_hmac_sha384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sp800108CtrHmacSha384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sp800108_ctr_hmac_sha512(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sp800108CtrHmacSha512)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sp80056a_concat_md5(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sp80056aConcatMd5)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sp80056a_concat_sha1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sp80056aConcatSha1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sp80056a_concat_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sp80056aConcatSha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sp80056a_concat_sha384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sp80056aConcatSha384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sp80056a_concat_sha512(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Sp80056aConcatSha512)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyDerivationAlgorithmNamesStatics2, 1469398955, 24644, 18031, 151, 244, 51, 123, 120, 8, 56, 77); + RT_INTERFACE!{static interface IKeyDerivationAlgorithmNamesStatics2(IKeyDerivationAlgorithmNamesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IKeyDerivationAlgorithmNamesStatics2] { + fn get_CapiKdfMd5(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CapiKdfSha1(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CapiKdfSha256(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CapiKdfSha384(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CapiKdfSha512(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKeyDerivationAlgorithmNamesStatics2 { + #[inline] pub unsafe fn get_capi_kdf_md5(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CapiKdfMd5)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capi_kdf_sha1(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CapiKdfSha1)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capi_kdf_sha256(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CapiKdfSha256)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capi_kdf_sha384(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CapiKdfSha384)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capi_kdf_sha512(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CapiKdfSha512)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKeyDerivationAlgorithmNamesStatics2 [CLSID_KeyDerivationAlgorithmNames]} + RT_ACTIVATABLE!{IKeyDerivationAlgorithmNamesStatics [CLSID_KeyDerivationAlgorithmNames]} + DEFINE_CLSID!(CLSID_KeyDerivationAlgorithmNames = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,67,111,114,101,46,75,101,121,68,101,114,105,118,97,116,105,111,110,65,108,103,111,114,105,116,104,109,78,97,109,101,115,0]); +} // Windows.Security.Cryptography.Core +pub mod dataprotection { // Windows.Security.Cryptography.DataProtection +use ::prelude::*; + DEFINE_IID!(IID_IDataProtectionProvider, 157522248, 60706, 17008, 189, 28, 109, 114, 192, 15, 135, 135); + RT_INTERFACE!{interface IDataProtectionProvider(IDataProtectionProviderVtbl): IInspectable(IInspectableVtbl) [IID_IDataProtectionProvider] { + #[cfg(feature="windows.storage")] fn ProtectAsync(&mut self, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT, + #[cfg(feature="windows.storage")] fn UnprotectAsync(&mut self, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT, + #[cfg(feature="windows.storage")] fn ProtectStreamAsync(&mut self, src: *mut ::rt::gen::windows::storage::streams::IInputStream, dest: *mut ::rt::gen::windows::storage::streams::IOutputStream, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows.storage")] fn UnprotectStreamAsync(&mut self, src: *mut ::rt::gen::windows::storage::streams::IInputStream, dest: *mut ::rt::gen::windows::storage::streams::IOutputStream, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IDataProtectionProvider { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn protect_async(&mut self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProtectAsync)(self, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn unprotect_async(&mut self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnprotectAsync)(self, data as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn protect_stream_async(&mut self, src: &::rt::gen::windows::storage::streams::IInputStream, dest: &::rt::gen::windows::storage::streams::IOutputStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProtectStreamAsync)(self, src as *const _ as *mut _, dest as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn unprotect_stream_async(&mut self, src: &::rt::gen::windows::storage::streams::IInputStream, dest: &::rt::gen::windows::storage::streams::IOutputStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UnprotectStreamAsync)(self, src as *const _ as *mut _, dest as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataProtectionProviderFactory, 2918399404, 18738, 19679, 172, 65, 114, 20, 51, 53, 20, 202); + RT_INTERFACE!{static interface IDataProtectionProviderFactory(IDataProtectionProviderFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDataProtectionProviderFactory] { + fn CreateOverloadExplicit(&mut self, protectionDescriptor: HSTRING, out: *mut *mut DataProtectionProvider) -> HRESULT + }} + impl IDataProtectionProviderFactory { + #[inline] pub unsafe fn create_overload_explicit(&mut self, protectionDescriptor: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateOverloadExplicit)(self, protectionDescriptor.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DataProtectionProvider: IDataProtectionProvider [IDataProtectionProviderFactory] [CLSID_DataProtectionProvider]} + DEFINE_CLSID!(CLSID_DataProtectionProvider = &[87,105,110,100,111,119,115,46,83,101,99,117,114,105,116,121,46,67,114,121,112,116,111,103,114,97,112,104,121,46,68,97,116,97,80,114,111,116,101,99,116,105,111,110,46,68,97,116,97,80,114,111,116,101,99,116,105,111,110,80,114,111,118,105,100,101,114,0]); +} // Windows.Security.Cryptography.DataProtection +} // Windows.Security.Cryptography +} // Windows.Security +#[cfg(feature="windows.services")] +pub mod services { // Windows.Services +pub mod store { // Windows.Services.Store +use ::prelude::*; + RT_STRUCT! { struct StoreContract { + + }} + RT_ENUM! { enum StorePurchaseStatus: i32 { + Succeeded (StorePurchaseStatus_Succeeded) = 0, AlreadyPurchased (StorePurchaseStatus_AlreadyPurchased) = 1, NotPurchased (StorePurchaseStatus_NotPurchased) = 2, NetworkError (StorePurchaseStatus_NetworkError) = 3, ServerError (StorePurchaseStatus_ServerError) = 4, + }} + RT_ENUM! { enum StoreConsumableStatus: i32 { + Succeeded (StoreConsumableStatus_Succeeded) = 0, InsufficentQuantity (StoreConsumableStatus_InsufficentQuantity) = 1, NetworkError (StoreConsumableStatus_NetworkError) = 2, ServerError (StoreConsumableStatus_ServerError) = 3, + }} + RT_ENUM! { enum StoreDurationUnit: i32 { + Minute (StoreDurationUnit_Minute) = 0, Hour (StoreDurationUnit_Hour) = 1, Day (StoreDurationUnit_Day) = 2, Week (StoreDurationUnit_Week) = 3, Month (StoreDurationUnit_Month) = 4, Year (StoreDurationUnit_Year) = 5, + }} + RT_ENUM! { enum StorePackageUpdateState: i32 { + Pending (StorePackageUpdateState_Pending) = 0, Downloading (StorePackageUpdateState_Downloading) = 1, Deploying (StorePackageUpdateState_Deploying) = 2, Completed (StorePackageUpdateState_Completed) = 3, Canceled (StorePackageUpdateState_Canceled) = 4, OtherError (StorePackageUpdateState_OtherError) = 5, ErrorLowBattery (StorePackageUpdateState_ErrorLowBattery) = 6, ErrorWiFiRecommended (StorePackageUpdateState_ErrorWiFiRecommended) = 7, ErrorWiFiRequired (StorePackageUpdateState_ErrorWiFiRequired) = 8, + }} + RT_STRUCT! { struct StorePackageUpdateStatus { + PackageFamilyName: HSTRING, PackageDownloadSizeInBytes: u64, PackageBytesDownloaded: u64, PackageDownloadProgress: f64, TotalDownloadProgress: f64, PackageUpdateState: StorePackageUpdateState, + }} + DEFINE_IID!(IID_IStoreProductPagedQueryResult, 3374782661, 19925, 18537, 164, 98, 236, 198, 135, 46, 67, 197); + RT_INTERFACE!{interface IStoreProductPagedQueryResult(IStoreProductPagedQueryResultVtbl): IInspectable(IInspectableVtbl) [IID_IStoreProductPagedQueryResult] { + fn get_Products(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_HasMoreResults(&mut self, out: *mut bool) -> HRESULT, + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT, + fn GetNextAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStoreProductPagedQueryResult { + #[inline] pub unsafe fn get_products(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Products)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_more_results(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasMoreResults)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_next_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNextAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StoreProduct: IStoreProduct} + RT_CLASS!{class StoreProductPagedQueryResult: IStoreProductPagedQueryResult} + DEFINE_IID!(IID_IStoreProductQueryResult, 3624265413, 54358, 20470, 128, 73, 144, 118, 213, 22, 95, 115); + RT_INTERFACE!{interface IStoreProductQueryResult(IStoreProductQueryResultVtbl): IInspectable(IInspectableVtbl) [IID_IStoreProductQueryResult] { + fn get_Products(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IStoreProductQueryResult { + #[inline] pub unsafe fn get_products(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Products)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreProductResult, 3077001075, 15495, 20193, 130, 1, 244, 40, 53, 155, 211, 175); + RT_INTERFACE!{interface IStoreProductResult(IStoreProductResultVtbl): IInspectable(IInspectableVtbl) [IID_IStoreProductResult] { + fn get_Product(&mut self, out: *mut *mut StoreProduct) -> HRESULT, + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IStoreProductResult { + #[inline] pub unsafe fn get_product(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Product)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorePurchaseProperties, 2204268787, 65415, 17252, 165, 180, 253, 33, 83, 235, 228, 59); + RT_INTERFACE!{interface IStorePurchaseProperties(IStorePurchasePropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IStorePurchaseProperties] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_ExtendedJsonData(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ExtendedJsonData(&mut self, value: HSTRING) -> HRESULT + }} + impl IStorePurchaseProperties { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_json_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_extended_json_data(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExtendedJsonData)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorePurchasePropertiesFactory, 2808673694, 65277, 18591, 154, 23, 34, 165, 147, 230, 139, 157); + RT_INTERFACE!{static interface IStorePurchasePropertiesFactory(IStorePurchasePropertiesFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IStorePurchasePropertiesFactory] { + fn Create(&mut self, name: HSTRING, out: *mut *mut StorePurchaseProperties) -> HRESULT + }} + impl IStorePurchasePropertiesFactory { + #[inline] pub unsafe fn create(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StorePurchaseProperties: IStorePurchaseProperties [IStorePurchasePropertiesFactory] [CLSID_StorePurchaseProperties]} + DEFINE_CLSID!(CLSID_StorePurchaseProperties = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,83,116,111,114,101,46,83,116,111,114,101,80,117,114,99,104,97,115,101,80,114,111,112,101,114,116,105,101,115,0]); + DEFINE_IID!(IID_IStoreCollectionData, 2326053811, 23475, 17434, 42, 180, 77, 171, 115, 213, 206, 103); + RT_INTERFACE!{interface IStoreCollectionData(IStoreCollectionDataVtbl): IInspectable(IInspectableVtbl) [IID_IStoreCollectionData] { + fn get_IsTrial(&mut self, out: *mut bool) -> HRESULT, + fn get_CampaignId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DeveloperOfferId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AcquiredDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_StartDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_EndDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_TrialTimeRemaining(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_ExtendedJsonData(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStoreCollectionData { + #[inline] pub unsafe fn get_is_trial(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTrial)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_campaign_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CampaignId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_developer_offer_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeveloperOfferId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_acquired_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AcquiredDate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_start_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartDate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_end_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndDate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_trial_time_remaining(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrialTimeRemaining)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_json_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreLicense, 651990393, 19535, 20272, 188, 137, 100, 159, 96, 227, 96, 85); + RT_INTERFACE!{interface IStoreLicense(IStoreLicenseVtbl): IInspectable(IInspectableVtbl) [IID_IStoreLicense] { + fn get_SkuStoreId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn get_ExpirationDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_ExtendedJsonData(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_InAppOfferToken(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStoreLicense { + #[inline] pub unsafe fn get_sku_store_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SkuStoreId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_json_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_in_app_offer_token(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InAppOfferToken)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreAppLicense, 4085905886, 29632, 17870, 155, 171, 178, 254, 62, 94, 175, 211); + RT_INTERFACE!{interface IStoreAppLicense(IStoreAppLicenseVtbl): IInspectable(IInspectableVtbl) [IID_IStoreAppLicense] { + fn get_SkuStoreId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn get_IsTrial(&mut self, out: *mut bool) -> HRESULT, + fn get_ExpirationDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_ExtendedJsonData(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AddOnLicenses(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_TrialTimeRemaining(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_IsTrialOwnedByThisUser(&mut self, out: *mut bool) -> HRESULT, + fn get_TrialUniqueId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStoreAppLicense { + #[inline] pub unsafe fn get_sku_store_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SkuStoreId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_trial(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTrial)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExpirationDate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_json_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_add_on_licenses(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AddOnLicenses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_trial_time_remaining(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrialTimeRemaining)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_trial_owned_by_this_user(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTrialOwnedByThisUser)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_trial_unique_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TrialUniqueId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StoreLicense: IStoreLicense} + DEFINE_IID!(IID_IStoreSendRequestResult, 3342515808, 33394, 17666, 138, 105, 110, 117, 21, 58, 66, 153); + RT_INTERFACE!{interface IStoreSendRequestResult(IStoreSendRequestResultVtbl): IInspectable(IInspectableVtbl) [IID_IStoreSendRequestResult] { + fn get_Response(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IStoreSendRequestResult { + #[inline] pub unsafe fn get_response(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Response)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreProduct, 839789650, 55136, 17674, 164, 43, 103, 209, 233, 1, 172, 144); + RT_INTERFACE!{interface IStoreProduct(IStoreProductVtbl): IInspectable(IInspectableVtbl) [IID_IStoreProduct] { + fn get_StoreId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ProductKind(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HasDigitalDownload(&mut self, out: *mut bool) -> HRESULT, + fn get_Keywords(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Images(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Videos(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Skus(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_IsInUserCollection(&mut self, out: *mut bool) -> HRESULT, + fn get_Price(&mut self, out: *mut *mut StorePrice) -> HRESULT, + fn get_ExtendedJsonData(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LinkUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn GetIsAnySkuInstalledAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseWithPurchasePropertiesAsync(&mut self, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_InAppOfferToken(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStoreProduct { + #[inline] pub unsafe fn get_store_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StoreId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_product_kind(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProductKind)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_digital_download(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasDigitalDownload)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_keywords(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Keywords)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_images(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Images)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_videos(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Videos)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_skus(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Skus)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_in_user_collection(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInUserCollection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_price(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Price)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_json_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_link_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LinkUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_any_sku_installed_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIsAnySkuInstalledAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_purchase_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestPurchaseAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_purchase_with_purchase_properties_async(&mut self, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestPurchaseWithPurchasePropertiesAsync)(self, storePurchaseProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_in_app_offer_token(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InAppOfferToken)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StoreImage: IStoreImage} + RT_CLASS!{class StoreVideo: IStoreVideo} + RT_CLASS!{class StoreSku: IStoreSku} + RT_CLASS!{class StorePrice: IStorePrice} + RT_CLASS!{class StorePurchaseResult: IStorePurchaseResult} + DEFINE_IID!(IID_IStoreImage, 136303176, 44468, 19300, 169, 147, 120, 71, 137, 146, 110, 213); + RT_INTERFACE!{interface IStoreImage(IStoreImageVtbl): IInspectable(IInspectableVtbl) [IID_IStoreImage] { + fn get_Uri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_ImagePurposeTag(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Width(&mut self, out: *mut u32) -> HRESULT, + fn get_Height(&mut self, out: *mut u32) -> HRESULT, + fn get_Caption(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStoreImage { + #[inline] pub unsafe fn get_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_image_purpose_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ImagePurposeTag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_caption(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Caption)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreVideo, 4067209604, 28510, 19906, 136, 108, 60, 99, 8, 60, 47, 148); + RT_INTERFACE!{interface IStoreVideo(IStoreVideoVtbl): IInspectable(IInspectableVtbl) [IID_IStoreVideo] { + fn get_Uri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_VideoPurposeTag(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Width(&mut self, out: *mut u32) -> HRESULT, + fn get_Height(&mut self, out: *mut u32) -> HRESULT, + fn get_Caption(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PreviewImage(&mut self, out: *mut *mut StoreImage) -> HRESULT + }} + impl IStoreVideo { + #[inline] pub unsafe fn get_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Uri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_purpose_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoPurposeTag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_caption(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Caption)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_preview_image(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreviewImage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreSku, 964587349, 17472, 20227, 134, 60, 145, 243, 254, 200, 61, 121); + RT_INTERFACE!{interface IStoreSku(IStoreSkuVtbl): IInspectable(IInspectableVtbl) [IID_IStoreSku] { + fn get_StoreId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsTrial(&mut self, out: *mut bool) -> HRESULT, + fn get_CustomDeveloperData(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Images(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Videos(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Availabilities(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Price(&mut self, out: *mut *mut StorePrice) -> HRESULT, + fn get_ExtendedJsonData(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsInUserCollection(&mut self, out: *mut bool) -> HRESULT, + fn get_BundledSkus(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_CollectionData(&mut self, out: *mut *mut StoreCollectionData) -> HRESULT, + fn GetIsInstalledAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseWithPurchasePropertiesAsync(&mut self, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_IsSubscription(&mut self, out: *mut bool) -> HRESULT, + fn get_SubscriptionInfo(&mut self, out: *mut *mut StoreSubscriptionInfo) -> HRESULT + }} + impl IStoreSku { + #[inline] pub unsafe fn get_store_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StoreId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_trial(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTrial)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_developer_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomDeveloperData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_images(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Images)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_videos(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Videos)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_availabilities(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Availabilities)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_price(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Price)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_json_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_in_user_collection(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInUserCollection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bundled_skus(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BundledSkus)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_collection_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CollectionData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_installed_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIsInstalledAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_purchase_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestPurchaseAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_purchase_with_purchase_properties_async(&mut self, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestPurchaseWithPurchasePropertiesAsync)(self, storePurchaseProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_subscription(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSubscription)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_subscription_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SubscriptionInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StoreAvailability: IStoreAvailability} + RT_CLASS!{class StoreCollectionData: IStoreCollectionData} + RT_CLASS!{class StoreSubscriptionInfo: IStoreSubscriptionInfo} + DEFINE_IID!(IID_IStoreAvailability, 4194698021, 4093, 17555, 173, 67, 241, 249, 145, 143, 105, 250); + RT_INTERFACE!{interface IStoreAvailability(IStoreAvailabilityVtbl): IInspectable(IInspectableVtbl) [IID_IStoreAvailability] { + fn get_StoreId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EndDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Price(&mut self, out: *mut *mut StorePrice) -> HRESULT, + fn get_ExtendedJsonData(&mut self, out: *mut HSTRING) -> HRESULT, + fn RequestPurchaseAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseWithPurchasePropertiesAsync(&mut self, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStoreAvailability { + #[inline] pub unsafe fn get_store_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StoreId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_end_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndDate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_price(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Price)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_json_data(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_purchase_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestPurchaseAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_purchase_with_purchase_properties_async(&mut self, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestPurchaseWithPurchasePropertiesAsync)(self, storePurchaseProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorePrice, 1438291140, 5617, 16508, 143, 6, 0, 99, 128, 244, 223, 11); + RT_INTERFACE!{interface IStorePrice(IStorePriceVtbl): IInspectable(IInspectableVtbl) [IID_IStorePrice] { + fn get_FormattedBasePrice(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FormattedPrice(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsOnSale(&mut self, out: *mut bool) -> HRESULT, + fn get_SaleEndDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_CurrencyCode(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FormattedRecurrencePrice(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStorePrice { + #[inline] pub unsafe fn get_formatted_base_price(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FormattedBasePrice)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_formatted_price(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FormattedPrice)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_on_sale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsOnSale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sale_end_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SaleEndDate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_currency_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrencyCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_formatted_recurrence_price(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FormattedRecurrencePrice)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreSubscriptionInfo, 1099528042, 1369, 17324, 169, 198, 58, 176, 1, 31, 184, 235); + RT_INTERFACE!{interface IStoreSubscriptionInfo(IStoreSubscriptionInfoVtbl): IInspectable(IInspectableVtbl) [IID_IStoreSubscriptionInfo] { + fn get_BillingPeriod(&mut self, out: *mut u32) -> HRESULT, + fn get_BillingPeriodUnit(&mut self, out: *mut StoreDurationUnit) -> HRESULT, + fn get_HasTrialPeriod(&mut self, out: *mut bool) -> HRESULT, + fn get_TrialPeriod(&mut self, out: *mut u32) -> HRESULT, + fn get_TrialPeriodUnit(&mut self, out: *mut StoreDurationUnit) -> HRESULT + }} + impl IStoreSubscriptionInfo { + #[inline] pub unsafe fn get_billing_period(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BillingPeriod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_billing_period_unit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BillingPeriodUnit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_trial_period(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasTrialPeriod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_trial_period(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrialPeriod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_trial_period_unit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrialPeriodUnit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreConsumableResult, 3932007282, 27136, 16466, 190, 91, 191, 218, 180, 67, 51, 82); + RT_INTERFACE!{interface IStoreConsumableResult(IStoreConsumableResultVtbl): IInspectable(IInspectableVtbl) [IID_IStoreConsumableResult] { + fn get_Status(&mut self, out: *mut StoreConsumableStatus) -> HRESULT, + fn get_TrackingId(&mut self, out: *mut Guid) -> HRESULT, + fn get_BalanceRemaining(&mut self, out: *mut u32) -> HRESULT, + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IStoreConsumableResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tracking_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrackingId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_balance_remaining(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BalanceRemaining)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorePurchaseResult, 2916255058, 63850, 17981, 167, 187, 194, 11, 79, 202, 105, 82); + RT_INTERFACE!{interface IStorePurchaseResult(IStorePurchaseResultVtbl): IInspectable(IInspectableVtbl) [IID_IStorePurchaseResult] { + fn get_Status(&mut self, out: *mut StorePurchaseStatus) -> HRESULT, + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IStorePurchaseResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreContextStatics, 2617699935, 5568, 20082, 147, 48, 214, 25, 28, 235, 209, 156); + RT_INTERFACE!{static interface IStoreContextStatics(IStoreContextStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStoreContextStatics] { + fn GetDefault(&mut self, out: *mut *mut StoreContext) -> HRESULT, + #[cfg(feature="windows.system")] fn GetForUser(&mut self, user: *mut super::super::system::User, out: *mut *mut StoreContext) -> HRESULT + }} + impl IStoreContextStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user(&mut self, user: &super::super::system::User) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForUser)(self, user as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StoreContext: IStoreContext} + RT_ACTIVATABLE!{IStoreContextStatics [CLSID_StoreContext]} + DEFINE_CLSID!(CLSID_StoreContext = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,83,116,111,114,101,46,83,116,111,114,101,67,111,110,116,101,120,116,0]); + DEFINE_IID!(IID_IStoreRequestHelperStatics, 1827005945, 41161, 19244, 150, 166, 161, 113, 198, 48, 3, 141); + RT_INTERFACE!{static interface IStoreRequestHelperStatics(IStoreRequestHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStoreRequestHelperStatics] { + fn SendRequestAsync(&mut self, context: *mut StoreContext, requestKind: u32, parametersAsJson: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStoreRequestHelperStatics { + #[inline] pub unsafe fn send_request_async(&mut self, context: &StoreContext, requestKind: u32, parametersAsJson: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SendRequestAsync)(self, context as *const _ as *mut _, requestKind, parametersAsJson.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StoreSendRequestResult: IStoreSendRequestResult} + DEFINE_IID!(IID_IStoreContext, 2895689406, 62717, 18706, 186, 189, 80, 53, 229, 232, 188, 171); + RT_INTERFACE!{interface IStoreContext(IStoreContextVtbl): IInspectable(IInspectableVtbl) [IID_IStoreContext] { + #[cfg(not(feature="windows.system"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT, + fn add_OfflineLicensesChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_OfflineLicensesChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetCustomerPurchaseIdAsync(&mut self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetCustomerCollectionsIdAsync(&mut self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAppLicenseAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetStoreProductForCurrentAppAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetStoreProductsAsync(&mut self, productKinds: *mut super::super::foundation::collections::IIterable, storeIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAssociatedStoreProductsAsync(&mut self, productKinds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAssociatedStoreProductsWithPagingAsync(&mut self, productKinds: *mut super::super::foundation::collections::IIterable, maxItemsToRetrievePerPage: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetUserCollectionAsync(&mut self, productKinds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetUserCollectionWithPagingAsync(&mut self, productKinds: *mut super::super::foundation::collections::IIterable, maxItemsToRetrievePerPage: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ReportConsumableFulfillmentAsync(&mut self, productStoreId: HSTRING, quantity: u32, trackingId: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetConsumableBalanceRemainingAsync(&mut self, productStoreId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy14(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn AcquireStoreLicenseForOptionalPackageAsync(&mut self, optionalPackage: *mut super::super::applicationmodel::Package, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseAsync(&mut self, storeId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseWithPurchasePropertiesAsync(&mut self, storeId: HSTRING, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAppAndOptionalStorePackageUpdatesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn RequestDownloadStorePackageUpdatesAsync(&mut self, storePackageUpdates: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RequestDownloadAndInstallStorePackageUpdatesAsync(&mut self, storePackageUpdates: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RequestDownloadAndInstallStorePackagesAsync(&mut self, storeIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IStoreContext { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_offline_licenses_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_OfflineLicensesChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_offline_licenses_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_OfflineLicensesChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_customer_purchase_id_async(&mut self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCustomerPurchaseIdAsync)(self, serviceTicket.get(), publisherUserId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_customer_collections_id_async(&mut self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCustomerCollectionsIdAsync)(self, serviceTicket.get(), publisherUserId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_license_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAppLicenseAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_store_product_for_current_app_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStoreProductForCurrentAppAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_store_products_async(&mut self, productKinds: &super::super::foundation::collections::IIterable, storeIds: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStoreProductsAsync)(self, productKinds as *const _ as *mut _, storeIds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_associated_store_products_async(&mut self, productKinds: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAssociatedStoreProductsAsync)(self, productKinds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_associated_store_products_with_paging_async(&mut self, productKinds: &super::super::foundation::collections::IIterable, maxItemsToRetrievePerPage: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAssociatedStoreProductsWithPagingAsync)(self, productKinds as *const _ as *mut _, maxItemsToRetrievePerPage, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_collection_async(&mut self, productKinds: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetUserCollectionAsync)(self, productKinds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_collection_with_paging_async(&mut self, productKinds: &super::super::foundation::collections::IIterable, maxItemsToRetrievePerPage: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetUserCollectionWithPagingAsync)(self, productKinds as *const _ as *mut _, maxItemsToRetrievePerPage, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn report_consumable_fulfillment_async(&mut self, productStoreId: &HStringArg, quantity: u32, trackingId: Guid) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReportConsumableFulfillmentAsync)(self, productStoreId.get(), quantity, trackingId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_consumable_balance_remaining_async(&mut self, productStoreId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetConsumableBalanceRemainingAsync)(self, productStoreId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn acquire_store_license_for_optional_package_async(&mut self, optionalPackage: &super::super::applicationmodel::Package) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AcquireStoreLicenseForOptionalPackageAsync)(self, optionalPackage as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_purchase_async(&mut self, storeId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestPurchaseAsync)(self, storeId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_purchase_with_purchase_properties_async(&mut self, storeId: &HStringArg, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestPurchaseWithPurchasePropertiesAsync)(self, storeId.get(), storePurchaseProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_and_optional_store_package_updates_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAppAndOptionalStorePackageUpdatesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_download_store_package_updates_async(&mut self, storePackageUpdates: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestDownloadStorePackageUpdatesAsync)(self, storePackageUpdates as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_download_and_install_store_package_updates_async(&mut self, storePackageUpdates: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestDownloadAndInstallStorePackageUpdatesAsync)(self, storePackageUpdates as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_download_and_install_store_packages_async(&mut self, storeIds: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestDownloadAndInstallStorePackagesAsync)(self, storeIds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StoreAppLicense: IStoreAppLicense} + RT_CLASS!{class StoreProductResult: IStoreProductResult} + RT_CLASS!{class StoreProductQueryResult: IStoreProductQueryResult} + RT_CLASS!{class StoreConsumableResult: IStoreConsumableResult} + RT_CLASS!{class StoreAcquireLicenseResult: IStoreAcquireLicenseResult} + RT_CLASS!{class StorePackageUpdate: IStorePackageUpdate} + RT_CLASS!{class StorePackageUpdateResult: IStorePackageUpdateResult} + DEFINE_IID!(IID_IStorePackageUpdate, 336568656, 15551, 18997, 185, 31, 72, 39, 28, 49, 176, 114); + RT_INTERFACE!{interface IStorePackageUpdate(IStorePackageUpdateVtbl): IInspectable(IInspectableVtbl) [IID_IStorePackageUpdate] { + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_Package(&mut self, out: *mut *mut super::super::applicationmodel::Package) -> HRESULT, + fn get_Mandatory(&mut self, out: *mut bool) -> HRESULT + }} + impl IStorePackageUpdate { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_package(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mandatory(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mandatory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorePackageUpdateResult, 3885056749, 25081, 18579, 180, 254, 207, 25, 22, 3, 175, 123); + RT_INTERFACE!{interface IStorePackageUpdateResult(IStorePackageUpdateResultVtbl): IInspectable(IInspectableVtbl) [IID_IStorePackageUpdateResult] { + fn get_OverallState(&mut self, out: *mut StorePackageUpdateState) -> HRESULT, + fn get_StorePackageUpdateStatuses(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IStorePackageUpdateResult { + #[inline] pub unsafe fn get_overall_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OverallState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_store_package_update_statuses(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StorePackageUpdateStatuses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStoreAcquireLicenseResult, 4225209453, 61504, 19635, 154, 57, 41, 188, 236, 219, 226, 45); + RT_INTERFACE!{interface IStoreAcquireLicenseResult(IStoreAcquireLicenseResultVtbl): IInspectable(IInspectableVtbl) [IID_IStoreAcquireLicenseResult] { + fn get_StorePackageLicense(&mut self, out: *mut *mut StorePackageLicense) -> HRESULT, + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IStoreAcquireLicenseResult { + #[inline] pub unsafe fn get_store_package_license(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StorePackageLicense)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class StorePackageLicense: IStorePackageLicense} + DEFINE_IID!(IID_IStorePackageLicense, 205936404, 5345, 18803, 189, 20, 247, 119, 36, 39, 30, 153); + RT_INTERFACE!{interface IStorePackageLicense(IStorePackageLicenseVtbl): IInspectable(IInspectableVtbl) [IID_IStorePackageLicense] { + fn add_LicenseLost(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LicenseLost(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_Package(&mut self, out: *mut *mut super::super::applicationmodel::Package) -> HRESULT, + fn get_IsValid(&mut self, out: *mut bool) -> HRESULT, + fn ReleaseLicense(&mut self) -> HRESULT + }} + impl IStorePackageLicense { + #[inline] pub unsafe fn add_license_lost(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LicenseLost)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_license_lost(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LicenseLost)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_package(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Package)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_valid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsValid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn release_license(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReleaseLicense)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IStoreRequestHelperStatics [CLSID_StoreRequestHelper]} + DEFINE_CLSID!(CLSID_StoreRequestHelper = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,83,116,111,114,101,46,83,116,111,114,101,82,101,113,117,101,115,116,72,101,108,112,101,114,0]); +} // Windows.Services.Store +pub mod maps { // Windows.Services.Maps +use ::prelude::*; + RT_ENUM! { enum MapRouteOptimization: i32 { + Time (MapRouteOptimization_Time) = 0, Distance (MapRouteOptimization_Distance) = 1, TimeWithTraffic (MapRouteOptimization_TimeWithTraffic) = 2, + }} + RT_ENUM! { enum MapRouteRestrictions: u32 { + None (MapRouteRestrictions_None) = 0, Highways (MapRouteRestrictions_Highways) = 1, TollRoads (MapRouteRestrictions_TollRoads) = 2, Ferries (MapRouteRestrictions_Ferries) = 4, Tunnels (MapRouteRestrictions_Tunnels) = 8, DirtRoads (MapRouteRestrictions_DirtRoads) = 16, Motorail (MapRouteRestrictions_Motorail) = 32, + }} + RT_ENUM! { enum MapRouteManeuverKind: i32 { + None (MapRouteManeuverKind_None) = 0, Start (MapRouteManeuverKind_Start) = 1, Stopover (MapRouteManeuverKind_Stopover) = 2, StopoverResume (MapRouteManeuverKind_StopoverResume) = 3, End (MapRouteManeuverKind_End) = 4, GoStraight (MapRouteManeuverKind_GoStraight) = 5, UTurnLeft (MapRouteManeuverKind_UTurnLeft) = 6, UTurnRight (MapRouteManeuverKind_UTurnRight) = 7, TurnKeepLeft (MapRouteManeuverKind_TurnKeepLeft) = 8, TurnKeepRight (MapRouteManeuverKind_TurnKeepRight) = 9, TurnLightLeft (MapRouteManeuverKind_TurnLightLeft) = 10, TurnLightRight (MapRouteManeuverKind_TurnLightRight) = 11, TurnLeft (MapRouteManeuverKind_TurnLeft) = 12, TurnRight (MapRouteManeuverKind_TurnRight) = 13, TurnHardLeft (MapRouteManeuverKind_TurnHardLeft) = 14, TurnHardRight (MapRouteManeuverKind_TurnHardRight) = 15, FreewayEnterLeft (MapRouteManeuverKind_FreewayEnterLeft) = 16, FreewayEnterRight (MapRouteManeuverKind_FreewayEnterRight) = 17, FreewayLeaveLeft (MapRouteManeuverKind_FreewayLeaveLeft) = 18, FreewayLeaveRight (MapRouteManeuverKind_FreewayLeaveRight) = 19, FreewayContinueLeft (MapRouteManeuverKind_FreewayContinueLeft) = 20, FreewayContinueRight (MapRouteManeuverKind_FreewayContinueRight) = 21, TrafficCircleLeft (MapRouteManeuverKind_TrafficCircleLeft) = 22, TrafficCircleRight (MapRouteManeuverKind_TrafficCircleRight) = 23, TakeFerry (MapRouteManeuverKind_TakeFerry) = 24, + }} + RT_ENUM! { enum MapManeuverNotices: u32 { + None (MapManeuverNotices_None) = 0, Toll (MapManeuverNotices_Toll) = 1, Unpaved (MapManeuverNotices_Unpaved) = 2, + }} + RT_ENUM! { enum MapLocationFinderStatus: i32 { + Success (MapLocationFinderStatus_Success) = 0, UnknownError (MapLocationFinderStatus_UnknownError) = 1, InvalidCredentials (MapLocationFinderStatus_InvalidCredentials) = 2, BadLocation (MapLocationFinderStatus_BadLocation) = 3, IndexFailure (MapLocationFinderStatus_IndexFailure) = 4, NetworkFailure (MapLocationFinderStatus_NetworkFailure) = 5, NotSupported (MapLocationFinderStatus_NotSupported) = 6, + }} + RT_ENUM! { enum MapRouteFinderStatus: i32 { + Success (MapRouteFinderStatus_Success) = 0, UnknownError (MapRouteFinderStatus_UnknownError) = 1, InvalidCredentials (MapRouteFinderStatus_InvalidCredentials) = 2, NoRouteFound (MapRouteFinderStatus_NoRouteFound) = 3, NoRouteFoundWithGivenOptions (MapRouteFinderStatus_NoRouteFoundWithGivenOptions) = 4, StartPointNotFound (MapRouteFinderStatus_StartPointNotFound) = 5, EndPointNotFound (MapRouteFinderStatus_EndPointNotFound) = 6, NoPedestrianRouteFound (MapRouteFinderStatus_NoPedestrianRouteFound) = 7, NetworkFailure (MapRouteFinderStatus_NetworkFailure) = 8, NotSupported (MapRouteFinderStatus_NotSupported) = 9, + }} + RT_ENUM! { enum MapLocationDesiredAccuracy: i32 { + High (MapLocationDesiredAccuracy_High) = 0, Low (MapLocationDesiredAccuracy_Low) = 1, + }} + DEFINE_IID!(IID_IMapRouteDrivingOptions, 1746220621, 50908, 18071, 164, 82, 177, 143, 143, 11, 103, 161); + RT_INTERFACE!{interface IMapRouteDrivingOptions(IMapRouteDrivingOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteDrivingOptions] { + fn get_MaxAlternateRouteCount(&mut self, out: *mut u32) -> HRESULT, + fn put_MaxAlternateRouteCount(&mut self, value: u32) -> HRESULT, + fn get_InitialHeading(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_InitialHeading(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_RouteOptimization(&mut self, out: *mut MapRouteOptimization) -> HRESULT, + fn put_RouteOptimization(&mut self, value: MapRouteOptimization) -> HRESULT, + fn get_RouteRestrictions(&mut self, out: *mut MapRouteRestrictions) -> HRESULT, + fn put_RouteRestrictions(&mut self, value: MapRouteRestrictions) -> HRESULT + }} + impl IMapRouteDrivingOptions { + #[inline] pub unsafe fn get_max_alternate_route_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxAlternateRouteCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_alternate_route_count(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxAlternateRouteCount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_initial_heading(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InitialHeading)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_initial_heading(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_InitialHeading)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_route_optimization(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RouteOptimization)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_route_optimization(&mut self, value: MapRouteOptimization) -> Result<()> { + let hr = ((*self.lpVtbl).put_RouteOptimization)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_route_restrictions(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RouteRestrictions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_route_restrictions(&mut self, value: MapRouteRestrictions) -> Result<()> { + let hr = ((*self.lpVtbl).put_RouteRestrictions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMapAddress, 3483871603, 41908, 17556, 179, 255, 203, 169, 77, 182, 150, 153); + RT_INTERFACE!{interface IMapAddress(IMapAddressVtbl): IInspectable(IInspectableVtbl) [IID_IMapAddress] { + fn get_BuildingName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BuildingFloor(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BuildingRoom(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BuildingWing(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_StreetNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Street(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Neighborhood(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_District(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Town(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Region(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RegionCode(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Country(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CountryCode(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PostCode(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Continent(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMapAddress { + #[inline] pub unsafe fn get_building_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BuildingName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_building_floor(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BuildingFloor)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_building_room(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BuildingRoom)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_building_wing(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BuildingWing)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_street_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StreetNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_street(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Street)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_neighborhood(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Neighborhood)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_district(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_District)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_town(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Town)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_region(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Region)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_region_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RegionCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_country(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Country)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_country_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CountryCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_post_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PostCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_continent(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Continent)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMapAddress2, 1976397297, 58797, 17833, 191, 64, 108, 242, 86, 193, 221, 19); + RT_INTERFACE!{interface IMapAddress2(IMapAddress2Vtbl): IInspectable(IInspectableVtbl) [IID_IMapAddress2] { + fn get_FormattedAddress(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMapAddress2 { + #[inline] pub unsafe fn get_formatted_address(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FormattedAddress)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMapLocation, 1007107927, 3492, 17128, 158, 226, 169, 111, 207, 35, 113, 220); + RT_INTERFACE!{interface IMapLocation(IMapLocationVtbl): IInspectable(IInspectableVtbl) [IID_IMapLocation] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_Point(&mut self, out: *mut *mut super::super::devices::geolocation::Geopoint) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Address(&mut self, out: *mut *mut MapAddress) -> HRESULT + }} + impl IMapLocation { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_point(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Point)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Address)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MapAddress: IMapAddress} + DEFINE_IID!(IID_IMapLocationFinderResult, 1139929465, 59596, 17910, 190, 210, 84, 204, 191, 150, 93, 154); + RT_INTERFACE!{interface IMapLocationFinderResult(IMapLocationFinderResultVtbl): IInspectable(IInspectableVtbl) [IID_IMapLocationFinderResult] { + fn get_Locations(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Status(&mut self, out: *mut MapLocationFinderStatus) -> HRESULT + }} + impl IMapLocationFinderResult { + #[inline] pub unsafe fn get_locations(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Locations)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MapLocation: IMapLocation} + DEFINE_IID!(IID_IMapRouteManeuver, 3982235632, 42667, 19813, 160, 134, 250, 138, 126, 52, 13, 242); + RT_INTERFACE!{interface IMapRouteManeuver(IMapRouteManeuverVtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteManeuver] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_StartingPoint(&mut self, out: *mut *mut super::super::devices::geolocation::Geopoint) -> HRESULT, + fn get_LengthInMeters(&mut self, out: *mut f64) -> HRESULT, + fn get_InstructionText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Kind(&mut self, out: *mut MapRouteManeuverKind) -> HRESULT, + fn get_ExitNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ManeuverNotices(&mut self, out: *mut MapManeuverNotices) -> HRESULT + }} + impl IMapRouteManeuver { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_starting_point(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StartingPoint)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_length_in_meters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LengthInMeters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_instruction_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InstructionText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_exit_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExitNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_maneuver_notices(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ManeuverNotices)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMapRouteManeuver2, 1568394652, 31899, 16863, 131, 139, 234, 226, 30, 75, 5, 169); + RT_INTERFACE!{interface IMapRouteManeuver2(IMapRouteManeuver2Vtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteManeuver2] { + fn get_StartHeading(&mut self, out: *mut f64) -> HRESULT, + fn get_EndHeading(&mut self, out: *mut f64) -> HRESULT, + fn get_StreetName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMapRouteManeuver2 { + #[inline] pub unsafe fn get_start_heading(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartHeading)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_end_heading(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndHeading)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_street_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StreetName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMapRouteLeg, 2532881142, 23482, 19735, 157, 182, 26, 38, 63, 236, 116, 113); + RT_INTERFACE!{interface IMapRouteLeg(IMapRouteLegVtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteLeg] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_BoundingBox(&mut self, out: *mut *mut super::super::devices::geolocation::GeoboundingBox) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_Path(&mut self, out: *mut *mut super::super::devices::geolocation::Geopath) -> HRESULT, + fn get_LengthInMeters(&mut self, out: *mut f64) -> HRESULT, + fn get_EstimatedDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Maneuvers(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMapRouteLeg { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_bounding_box(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BoundingBox)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_path(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Path)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_length_in_meters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LengthInMeters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_estimated_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EstimatedDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_maneuvers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Maneuvers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MapRouteManeuver: IMapRouteManeuver} + DEFINE_IID!(IID_IMapRoute, 4211586866, 22605, 17795, 156, 96, 100, 31, 234, 39, 67, 73); + RT_INTERFACE!{interface IMapRoute(IMapRouteVtbl): IInspectable(IInspectableVtbl) [IID_IMapRoute] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_BoundingBox(&mut self, out: *mut *mut super::super::devices::geolocation::GeoboundingBox) -> HRESULT, + fn get_LengthInMeters(&mut self, out: *mut f64) -> HRESULT, + fn get_EstimatedDuration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_Path(&mut self, out: *mut *mut super::super::devices::geolocation::Geopath) -> HRESULT, + fn get_Legs(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_IsTrafficBased(&mut self, out: *mut bool) -> HRESULT + }} + impl IMapRoute { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_bounding_box(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BoundingBox)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_length_in_meters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LengthInMeters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_estimated_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EstimatedDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_path(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Path)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_legs(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Legs)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_traffic_based(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTrafficBased)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MapRouteLeg: IMapRouteLeg} + DEFINE_IID!(IID_IMapRoute2, 3519403020, 8723, 19120, 162, 96, 70, 179, 129, 105, 190, 172); + RT_INTERFACE!{interface IMapRoute2(IMapRoute2Vtbl): IInspectable(IInspectableVtbl) [IID_IMapRoute2] { + fn get_ViolatedRestrictions(&mut self, out: *mut MapRouteRestrictions) -> HRESULT, + fn get_HasBlockedRoads(&mut self, out: *mut bool) -> HRESULT + }} + impl IMapRoute2 { + #[inline] pub unsafe fn get_violated_restrictions(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ViolatedRestrictions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_blocked_roads(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasBlockedRoads)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMapRouteFinderResult, 2825429786, 37922, 18092, 140, 161, 177, 97, 77, 75, 251, 226); + RT_INTERFACE!{interface IMapRouteFinderResult(IMapRouteFinderResultVtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteFinderResult] { + fn get_Route(&mut self, out: *mut *mut MapRoute) -> HRESULT, + fn get_Status(&mut self, out: *mut MapRouteFinderStatus) -> HRESULT + }} + impl IMapRouteFinderResult { + #[inline] pub unsafe fn get_route(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Route)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class MapRoute: IMapRoute} + DEFINE_IID!(IID_IMapRouteFinderResult2, 544250989, 55564, 18120, 145, 198, 125, 75, 228, 239, 178, 21); + RT_INTERFACE!{interface IMapRouteFinderResult2(IMapRouteFinderResult2Vtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteFinderResult2] { + fn get_AlternateRoutes(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IMapRouteFinderResult2 { + #[inline] pub unsafe fn get_alternate_routes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlternateRoutes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMapLocationFinderStatics, 831183709, 7261, 20277, 162, 223, 170, 202, 148, 149, 149, 23); + RT_INTERFACE!{static interface IMapLocationFinderStatics(IMapLocationFinderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMapLocationFinderStatics] { + #[cfg(feature="windows.devices")] fn FindLocationsAtAsync(&mut self, queryPoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn FindLocationsAsync(&mut self, searchText: HSTRING, referencePoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn FindLocationsWithMaxCountAsync(&mut self, searchText: HSTRING, referencePoint: *mut super::super::devices::geolocation::Geopoint, maxCount: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMapLocationFinderStatics { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn find_locations_at_async(&mut self, queryPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindLocationsAtAsync)(self, queryPoint as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn find_locations_async(&mut self, searchText: &HStringArg, referencePoint: &super::super::devices::geolocation::Geopoint) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindLocationsAsync)(self, searchText.get(), referencePoint as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn find_locations_with_max_count_async(&mut self, searchText: &HStringArg, referencePoint: &super::super::devices::geolocation::Geopoint, maxCount: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindLocationsWithMaxCountAsync)(self, searchText.get(), referencePoint as *const _ as *mut _, maxCount, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MapLocationFinderResult: IMapLocationFinderResult} + DEFINE_IID!(IID_IMapLocationFinderStatics2, 2509933462, 25733, 19965, 133, 26, 51, 172, 49, 126, 58, 246); + RT_INTERFACE!{static interface IMapLocationFinderStatics2(IMapLocationFinderStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMapLocationFinderStatics2] { + #[cfg(feature="windows.devices")] fn FindLocationsAtWithAccuracyAsync(&mut self, queryPoint: *mut super::super::devices::geolocation::Geopoint, accuracy: MapLocationDesiredAccuracy, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMapLocationFinderStatics2 { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn find_locations_at_with_accuracy_async(&mut self, queryPoint: &super::super::devices::geolocation::Geopoint, accuracy: MapLocationDesiredAccuracy) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindLocationsAtWithAccuracyAsync)(self, queryPoint as *const _ as *mut _, accuracy, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMapRouteFinderStatics, 3097871631, 7268, 19514, 129, 235, 31, 124, 21, 42, 251, 187); + RT_INTERFACE!{static interface IMapRouteFinderStatics(IMapRouteFinderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteFinderStatics] { + #[cfg(feature="windows.devices")] fn GetDrivingRouteAsync(&mut self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn GetDrivingRouteWithOptimizationAsync(&mut self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn GetDrivingRouteWithOptimizationAndRestrictionsAsync(&mut self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync(&mut self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn GetDrivingRouteFromWaypointsAsync(&mut self, wayPoints: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn GetDrivingRouteFromWaypointsAndOptimizationAsync(&mut self, wayPoints: *mut super::super::foundation::collections::IIterable, optimization: MapRouteOptimization, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn GetDrivingRouteFromWaypointsOptimizationAndRestrictionsAsync(&mut self, wayPoints: *mut super::super::foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn GetDrivingRouteFromWaypointsOptimizationRestrictionsAndHeadingAsync(&mut self, wayPoints: *mut super::super::foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn GetWalkingRouteAsync(&mut self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn GetWalkingRouteFromWaypointsAsync(&mut self, wayPoints: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMapRouteFinderStatics { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_driving_route_async(&mut self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDrivingRouteAsync)(self, startPoint as *const _ as *mut _, endPoint as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_driving_route_with_optimization_async(&mut self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDrivingRouteWithOptimizationAsync)(self, startPoint as *const _ as *mut _, endPoint as *const _ as *mut _, optimization, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_driving_route_with_optimization_and_restrictions_async(&mut self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDrivingRouteWithOptimizationAndRestrictionsAsync)(self, startPoint as *const _ as *mut _, endPoint as *const _ as *mut _, optimization, restrictions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_driving_route_with_optimization_restrictions_and_heading_async(&mut self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync)(self, startPoint as *const _ as *mut _, endPoint as *const _ as *mut _, optimization, restrictions, headingInDegrees, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_driving_route_from_waypoints_async(&mut self, wayPoints: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDrivingRouteFromWaypointsAsync)(self, wayPoints as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_driving_route_from_waypoints_and_optimization_async(&mut self, wayPoints: &super::super::foundation::collections::IIterable, optimization: MapRouteOptimization) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDrivingRouteFromWaypointsAndOptimizationAsync)(self, wayPoints as *const _ as *mut _, optimization, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_driving_route_from_waypoints_optimization_and_restrictions_async(&mut self, wayPoints: &super::super::foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDrivingRouteFromWaypointsOptimizationAndRestrictionsAsync)(self, wayPoints as *const _ as *mut _, optimization, restrictions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_driving_route_from_waypoints_optimization_restrictions_and_heading_async(&mut self, wayPoints: &super::super::foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDrivingRouteFromWaypointsOptimizationRestrictionsAndHeadingAsync)(self, wayPoints as *const _ as *mut _, optimization, restrictions, headingInDegrees, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_walking_route_async(&mut self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetWalkingRouteAsync)(self, startPoint as *const _ as *mut _, endPoint as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_walking_route_from_waypoints_async(&mut self, wayPoints: &super::super::foundation::collections::IIterable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetWalkingRouteFromWaypointsAsync)(self, wayPoints as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MapRouteFinderResult: IMapRouteFinderResult} + DEFINE_IID!(IID_IMapRouteFinderStatics2, 2949393523, 30560, 18863, 179, 189, 186, 241, 53, 183, 3, 225); + RT_INTERFACE!{static interface IMapRouteFinderStatics2(IMapRouteFinderStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteFinderStatics2] { + #[cfg(feature="windows.devices")] fn GetDrivingRouteWithOptionsAsync(&mut self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, options: *mut MapRouteDrivingOptions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IMapRouteFinderStatics2 { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_driving_route_with_options_async(&mut self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, options: &MapRouteDrivingOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDrivingRouteWithOptionsAsync)(self, startPoint as *const _ as *mut _, endPoint as *const _ as *mut _, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MapRouteDrivingOptions: IMapRouteDrivingOptions} + DEFINE_IID!(IID_IMapServiceStatics, 21278085, 49228, 19677, 135, 26, 160, 114, 109, 9, 124, 212); + RT_INTERFACE!{static interface IMapServiceStatics(IMapServiceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMapServiceStatics] { + fn put_ServiceToken(&mut self, value: HSTRING) -> HRESULT, + fn get_ServiceToken(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMapServiceStatics { + #[inline] pub unsafe fn set_service_token(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ServiceToken)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_service_token(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ServiceToken)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMapManagerStatics, 937682197, 33460, 19796, 143, 217, 175, 38, 36, 179, 1, 28); + RT_INTERFACE!{static interface IMapManagerStatics(IMapManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMapManagerStatics] { + fn ShowDownloadedMapsUI(&mut self) -> HRESULT, + fn ShowMapsUpdateUI(&mut self) -> HRESULT + }} + impl IMapManagerStatics { + #[inline] pub unsafe fn show_downloaded_maps_ui(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ShowDownloadedMapsUI)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show_maps_update_ui(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ShowMapsUpdateUI)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMapServiceStatics2, 4162404077, 40069, 16553, 136, 150, 15, 195, 253, 43, 124, 42); + RT_INTERFACE!{static interface IMapServiceStatics2(IMapServiceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMapServiceStatics2] { + fn get_WorldViewRegionCode(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMapServiceStatics2 { + #[inline] pub unsafe fn get_world_view_region_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WorldViewRegionCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMapServiceStatics3, 168939040, 25511, 18516, 179, 85, 214, 220, 218, 34, 61, 27); + RT_INTERFACE!{static interface IMapServiceStatics3(IMapServiceStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IMapServiceStatics3] { + fn get_DataAttributions(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMapServiceStatics3 { + #[inline] pub unsafe fn get_data_attributions(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataAttributions)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IMapLocationFinderStatics2 [CLSID_MapLocationFinder]} + RT_ACTIVATABLE!{IMapLocationFinderStatics [CLSID_MapLocationFinder]} + DEFINE_CLSID!(CLSID_MapLocationFinder = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,77,97,112,76,111,99,97,116,105,111,110,70,105,110,100,101,114,0]); + RT_ACTIVATABLE!{IMapRouteFinderStatics [CLSID_MapRouteFinder]} + RT_ACTIVATABLE!{IMapRouteFinderStatics2 [CLSID_MapRouteFinder]} + DEFINE_CLSID!(CLSID_MapRouteFinder = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,77,97,112,82,111,117,116,101,70,105,110,100,101,114,0]); + RT_ACTIVATABLE!{IMapServiceStatics2 [CLSID_MapService]} + RT_ACTIVATABLE!{IMapServiceStatics3 [CLSID_MapService]} + RT_ACTIVATABLE!{IMapServiceStatics [CLSID_MapService]} + DEFINE_CLSID!(CLSID_MapService = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,77,97,112,83,101,114,118,105,99,101,0]); + RT_ACTIVATABLE!{IMapManagerStatics [CLSID_MapManager]} + DEFINE_CLSID!(CLSID_MapManager = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,77,97,112,77,97,110,97,103,101,114,0]); + RT_STRUCT! { struct LocalSearchContract { + + }} + RT_STRUCT! { struct GuidanceContract { + + }} +pub mod localsearch { // Windows.Services.Maps.LocalSearch +use ::prelude::*; + RT_ENUM! { enum LocalLocationFinderStatus: i32 { + Success (LocalLocationFinderStatus_Success) = 0, UnknownError (LocalLocationFinderStatus_UnknownError) = 1, InvalidCredentials (LocalLocationFinderStatus_InvalidCredentials) = 2, InvalidCategory (LocalLocationFinderStatus_InvalidCategory) = 3, InvalidSearchTerm (LocalLocationFinderStatus_InvalidSearchTerm) = 4, InvalidSearchArea (LocalLocationFinderStatus_InvalidSearchArea) = 5, NetworkFailure (LocalLocationFinderStatus_NetworkFailure) = 6, NotSupported (LocalLocationFinderStatus_NotSupported) = 7, + }} + DEFINE_IID!(IID_ILocalLocation, 3138382251, 17666, 20268, 148, 169, 13, 96, 222, 14, 33, 99); + RT_INTERFACE!{interface ILocalLocation(ILocalLocationVtbl): IInspectable(IInspectableVtbl) [IID_ILocalLocation] { + fn get_Address(&mut self, out: *mut *mut super::MapAddress) -> HRESULT, + fn get_Identifier(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_Point(&mut self, out: *mut *mut ::rt::gen::windows::devices::geolocation::Geopoint) -> HRESULT, + fn get_PhoneNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DataAttribution(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ILocalLocation { + #[inline] pub unsafe fn get_address(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Address)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_identifier(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Identifier)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_point(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Point)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_phone_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhoneNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_attribution(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataAttribution)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILocalLocationFinderResult, 3499846854, 62264, 16785, 159, 216, 84, 64, 185, 166, 143, 82); + RT_INTERFACE!{interface ILocalLocationFinderResult(ILocalLocationFinderResultVtbl): IInspectable(IInspectableVtbl) [IID_ILocalLocationFinderResult] { + fn get_LocalLocations(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Status(&mut self, out: *mut LocalLocationFinderStatus) -> HRESULT + }} + impl ILocalLocationFinderResult { + #[inline] pub unsafe fn get_local_locations(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalLocations)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class LocalLocation: ILocalLocation} + DEFINE_IID!(IID_ILocalLocationFinderStatics, 3538907972, 41182, 18634, 129, 168, 7, 199, 220, 253, 55, 171); + RT_INTERFACE!{static interface ILocalLocationFinderStatics(ILocalLocationFinderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILocalLocationFinderStatics] { + #[cfg(feature="windows.devices")] fn FindLocalLocationsAsync(&mut self, searchTerm: HSTRING, searchArea: *mut ::rt::gen::windows::devices::geolocation::Geocircle, localCategory: HSTRING, maxResults: u32, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + }} + impl ILocalLocationFinderStatics { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn find_local_locations_async(&mut self, searchTerm: &HStringArg, searchArea: &::rt::gen::windows::devices::geolocation::Geocircle, localCategory: &HStringArg, maxResults: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindLocalLocationsAsync)(self, searchTerm.get(), searchArea as *const _ as *mut _, localCategory.get(), maxResults, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LocalLocationFinderResult: ILocalLocationFinderResult} + DEFINE_IID!(IID_ILocalCategoriesStatics, 4103313909, 33377, 17185, 153, 116, 239, 146, 212, 154, 141, 202); + RT_INTERFACE!{static interface ILocalCategoriesStatics(ILocalCategoriesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILocalCategoriesStatics] { + fn get_BankAndCreditUnions(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_EatDrink(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Hospitals(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HotelsAndMotels(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_All(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Parking(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SeeDo(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Shop(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ILocalCategoriesStatics { + #[inline] pub unsafe fn get_bank_and_credit_unions(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BankAndCreditUnions)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_eat_drink(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EatDrink)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hospitals(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Hospitals)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hotels_and_motels(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HotelsAndMotels)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_all(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_All)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_parking(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Parking)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_see_do(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SeeDo)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_shop(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Shop)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILocalLocationHoursOfOperationItem, 592743538, 41415, 17393, 164, 240, 16, 145, 195, 158, 198, 64); + RT_INTERFACE!{interface ILocalLocationHoursOfOperationItem(ILocalLocationHoursOfOperationItemVtbl): IInspectable(IInspectableVtbl) [IID_ILocalLocationHoursOfOperationItem] { + #[cfg(not(feature="windows.globalization"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.globalization")] fn get_Day(&mut self, out: *mut ::rt::gen::windows::globalization::DayOfWeek) -> HRESULT, + fn get_Start(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Span(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT + }} + impl ILocalLocationHoursOfOperationItem { + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_day(&mut self) -> Result<::rt::gen::windows::globalization::DayOfWeek> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Day)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_start(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Start)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_span(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Span)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILocalLocationRatingInfo, 3407719254, 13140, 17169, 139, 192, 162, 212, 213, 235, 128, 110); + RT_INTERFACE!{interface ILocalLocationRatingInfo(ILocalLocationRatingInfoVtbl): IInspectable(IInspectableVtbl) [IID_ILocalLocationRatingInfo] { + fn get_AggregateRating(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_RatingCount(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_ProviderIdentifier(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ILocalLocationRatingInfo { + #[inline] pub unsafe fn get_aggregate_rating(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AggregateRating)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rating_count(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RatingCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_provider_identifier(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProviderIdentifier)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILocalLocation2, 1855860860, 60597, 20476, 187, 140, 186, 80, 186, 140, 45, 198); + RT_INTERFACE!{interface ILocalLocation2(ILocalLocation2Vtbl): IInspectable(IInspectableVtbl) [IID_ILocalLocation2] { + fn get_Category(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RatingInfo(&mut self, out: *mut *mut LocalLocationRatingInfo) -> HRESULT, + fn get_HoursOfOperation(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl ILocalLocation2 { + #[inline] pub unsafe fn get_category(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Category)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rating_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RatingInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hours_of_operation(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HoursOfOperation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LocalLocationRatingInfo: ILocalLocationRatingInfo} + RT_CLASS!{class LocalLocationHoursOfOperationItem: ILocalLocationHoursOfOperationItem} + RT_ACTIVATABLE!{ILocalLocationFinderStatics [CLSID_LocalLocationFinder]} + DEFINE_CLSID!(CLSID_LocalLocationFinder = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,76,111,99,97,108,83,101,97,114,99,104,46,76,111,99,97,108,76,111,99,97,116,105,111,110,70,105,110,100,101,114,0]); + RT_ACTIVATABLE!{ILocalCategoriesStatics [CLSID_LocalCategories]} + DEFINE_CLSID!(CLSID_LocalCategories = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,76,111,99,97,108,83,101,97,114,99,104,46,76,111,99,97,108,67,97,116,101,103,111,114,105,101,115,0]); +} // Windows.Services.Maps.LocalSearch +pub mod guidance { // Windows.Services.Maps.Guidance +use ::prelude::*; + DEFINE_IID!(IID_IGuidanceRoadSignpost, 4054263990, 63354, 18242, 131, 18, 83, 48, 15, 152, 69, 240); + RT_INTERFACE!{interface IGuidanceRoadSignpost(IGuidanceRoadSignpostVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceRoadSignpost] { + fn get_ExitNumber(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Exit(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_BackgroundColor(&mut self, out: *mut ::rt::gen::windows::ui::Color) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_ForegroundColor(&mut self, out: *mut ::rt::gen::windows::ui::Color) -> HRESULT, + fn get_ExitDirections(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IGuidanceRoadSignpost { + #[inline] pub unsafe fn get_exit_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExitNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_exit(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Exit)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_background_color(&mut self) -> Result<::rt::gen::windows::ui::Color> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BackgroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_foreground_color(&mut self) -> Result<::rt::gen::windows::ui::Color> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ForegroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_exit_directions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExitDirections)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GuidanceRoadSignpost: IGuidanceRoadSignpost} + RT_ENUM! { enum GuidanceManeuverKind: i32 { + None (GuidanceManeuverKind_None) = 0, GoStraight (GuidanceManeuverKind_GoStraight) = 1, UTurnRight (GuidanceManeuverKind_UTurnRight) = 2, UTurnLeft (GuidanceManeuverKind_UTurnLeft) = 3, TurnKeepRight (GuidanceManeuverKind_TurnKeepRight) = 4, TurnLightRight (GuidanceManeuverKind_TurnLightRight) = 5, TurnRight (GuidanceManeuverKind_TurnRight) = 6, TurnHardRight (GuidanceManeuverKind_TurnHardRight) = 7, KeepMiddle (GuidanceManeuverKind_KeepMiddle) = 8, TurnKeepLeft (GuidanceManeuverKind_TurnKeepLeft) = 9, TurnLightLeft (GuidanceManeuverKind_TurnLightLeft) = 10, TurnLeft (GuidanceManeuverKind_TurnLeft) = 11, TurnHardLeft (GuidanceManeuverKind_TurnHardLeft) = 12, FreewayEnterRight (GuidanceManeuverKind_FreewayEnterRight) = 13, FreewayEnterLeft (GuidanceManeuverKind_FreewayEnterLeft) = 14, FreewayLeaveRight (GuidanceManeuverKind_FreewayLeaveRight) = 15, FreewayLeaveLeft (GuidanceManeuverKind_FreewayLeaveLeft) = 16, FreewayKeepRight (GuidanceManeuverKind_FreewayKeepRight) = 17, FreewayKeepLeft (GuidanceManeuverKind_FreewayKeepLeft) = 18, TrafficCircleRight1 (GuidanceManeuverKind_TrafficCircleRight1) = 19, TrafficCircleRight2 (GuidanceManeuverKind_TrafficCircleRight2) = 20, TrafficCircleRight3 (GuidanceManeuverKind_TrafficCircleRight3) = 21, TrafficCircleRight4 (GuidanceManeuverKind_TrafficCircleRight4) = 22, TrafficCircleRight5 (GuidanceManeuverKind_TrafficCircleRight5) = 23, TrafficCircleRight6 (GuidanceManeuverKind_TrafficCircleRight6) = 24, TrafficCircleRight7 (GuidanceManeuverKind_TrafficCircleRight7) = 25, TrafficCircleRight8 (GuidanceManeuverKind_TrafficCircleRight8) = 26, TrafficCircleRight9 (GuidanceManeuverKind_TrafficCircleRight9) = 27, TrafficCircleRight10 (GuidanceManeuverKind_TrafficCircleRight10) = 28, TrafficCircleRight11 (GuidanceManeuverKind_TrafficCircleRight11) = 29, TrafficCircleRight12 (GuidanceManeuverKind_TrafficCircleRight12) = 30, TrafficCircleLeft1 (GuidanceManeuverKind_TrafficCircleLeft1) = 31, TrafficCircleLeft2 (GuidanceManeuverKind_TrafficCircleLeft2) = 32, TrafficCircleLeft3 (GuidanceManeuverKind_TrafficCircleLeft3) = 33, TrafficCircleLeft4 (GuidanceManeuverKind_TrafficCircleLeft4) = 34, TrafficCircleLeft5 (GuidanceManeuverKind_TrafficCircleLeft5) = 35, TrafficCircleLeft6 (GuidanceManeuverKind_TrafficCircleLeft6) = 36, TrafficCircleLeft7 (GuidanceManeuverKind_TrafficCircleLeft7) = 37, TrafficCircleLeft8 (GuidanceManeuverKind_TrafficCircleLeft8) = 38, TrafficCircleLeft9 (GuidanceManeuverKind_TrafficCircleLeft9) = 39, TrafficCircleLeft10 (GuidanceManeuverKind_TrafficCircleLeft10) = 40, TrafficCircleLeft11 (GuidanceManeuverKind_TrafficCircleLeft11) = 41, TrafficCircleLeft12 (GuidanceManeuverKind_TrafficCircleLeft12) = 42, Start (GuidanceManeuverKind_Start) = 43, End (GuidanceManeuverKind_End) = 44, TakeFerry (GuidanceManeuverKind_TakeFerry) = 45, PassTransitStation (GuidanceManeuverKind_PassTransitStation) = 46, LeaveTransitStation (GuidanceManeuverKind_LeaveTransitStation) = 47, + }} + RT_ENUM! { enum GuidanceMode: i32 { + None (GuidanceMode_None) = 0, Simulation (GuidanceMode_Simulation) = 1, Navigation (GuidanceMode_Navigation) = 2, Tracking (GuidanceMode_Tracking) = 3, + }} + RT_ENUM! { enum GuidanceAudioMeasurementSystem: i32 { + Meters (GuidanceAudioMeasurementSystem_Meters) = 0, MilesAndYards (GuidanceAudioMeasurementSystem_MilesAndYards) = 1, MilesAndFeet (GuidanceAudioMeasurementSystem_MilesAndFeet) = 2, + }} + RT_ENUM! { enum GuidanceAudioNotifications: u32 { + None (GuidanceAudioNotifications_None) = 0, Maneuver (GuidanceAudioNotifications_Maneuver) = 1, Route (GuidanceAudioNotifications_Route) = 2, Gps (GuidanceAudioNotifications_Gps) = 4, SpeedLimit (GuidanceAudioNotifications_SpeedLimit) = 8, Traffic (GuidanceAudioNotifications_Traffic) = 16, TrafficCamera (GuidanceAudioNotifications_TrafficCamera) = 32, + }} + RT_ENUM! { enum GuidanceAudioNotificationKind: i32 { + Maneuver (GuidanceAudioNotificationKind_Maneuver) = 0, Route (GuidanceAudioNotificationKind_Route) = 1, Gps (GuidanceAudioNotificationKind_Gps) = 2, SpeedLimit (GuidanceAudioNotificationKind_SpeedLimit) = 3, Traffic (GuidanceAudioNotificationKind_Traffic) = 4, TrafficCamera (GuidanceAudioNotificationKind_TrafficCamera) = 5, + }} + RT_ENUM! { enum GuidanceLaneMarkers: u32 { + None (GuidanceLaneMarkers_None) = 0, LightRight (GuidanceLaneMarkers_LightRight) = 1, Right (GuidanceLaneMarkers_Right) = 2, HardRight (GuidanceLaneMarkers_HardRight) = 4, Straight (GuidanceLaneMarkers_Straight) = 8, UTurnLeft (GuidanceLaneMarkers_UTurnLeft) = 16, HardLeft (GuidanceLaneMarkers_HardLeft) = 32, Left (GuidanceLaneMarkers_Left) = 64, LightLeft (GuidanceLaneMarkers_LightLeft) = 128, UTurnRight (GuidanceLaneMarkers_UTurnRight) = 256, Unknown (GuidanceLaneMarkers_Unknown) = 4294967295, + }} + DEFINE_IID!(IID_IGuidanceManeuver, 4228461164, 60617, 18728, 162, 161, 114, 50, 185, 155, 148, 161); + RT_INTERFACE!{interface IGuidanceManeuver(IGuidanceManeuverVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceManeuver] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_StartLocation(&mut self, out: *mut *mut ::rt::gen::windows::devices::geolocation::Geopoint) -> HRESULT, + fn get_DistanceFromRouteStart(&mut self, out: *mut i32) -> HRESULT, + fn get_DistanceFromPreviousManeuver(&mut self, out: *mut i32) -> HRESULT, + fn get_DepartureRoadName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NextRoadName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DepartureShortRoadName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NextShortRoadName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Kind(&mut self, out: *mut GuidanceManeuverKind) -> HRESULT, + fn get_StartAngle(&mut self, out: *mut i32) -> HRESULT, + fn get_EndAngle(&mut self, out: *mut i32) -> HRESULT, + fn get_RoadSignpost(&mut self, out: *mut *mut GuidanceRoadSignpost) -> HRESULT, + fn get_InstructionText(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IGuidanceManeuver { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_start_location(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StartLocation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_distance_from_route_start(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DistanceFromRouteStart)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_distance_from_previous_maneuver(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DistanceFromPreviousManeuver)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_departure_road_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DepartureRoadName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_next_road_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NextRoadName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_departure_short_road_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DepartureShortRoadName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_next_short_road_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NextShortRoadName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_start_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_end_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_road_signpost(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RoadSignpost)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_instruction_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InstructionText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GuidanceManeuver: IGuidanceManeuver} + DEFINE_IID!(IID_IGuidanceUpdatedEventArgs, 4255913483, 40589, 19939, 169, 250, 176, 99, 33, 209, 141, 185); + RT_INTERFACE!{interface IGuidanceUpdatedEventArgs(IGuidanceUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceUpdatedEventArgs] { + fn get_Mode(&mut self, out: *mut GuidanceMode) -> HRESULT, + fn get_NextManeuver(&mut self, out: *mut *mut GuidanceManeuver) -> HRESULT, + fn get_NextManeuverDistance(&mut self, out: *mut i32) -> HRESULT, + fn get_AfterNextManeuver(&mut self, out: *mut *mut GuidanceManeuver) -> HRESULT, + fn get_AfterNextManeuverDistance(&mut self, out: *mut i32) -> HRESULT, + fn get_DistanceToDestination(&mut self, out: *mut i32) -> HRESULT, + fn get_ElapsedDistance(&mut self, out: *mut i32) -> HRESULT, + fn get_ElapsedTime(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_TimeToDestination(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_RoadName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Route(&mut self, out: *mut *mut GuidanceRoute) -> HRESULT, + fn get_CurrentLocation(&mut self, out: *mut *mut GuidanceMapMatchedCoordinate) -> HRESULT, + fn get_IsNewManeuver(&mut self, out: *mut bool) -> HRESULT, + fn get_LaneInfo(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IGuidanceUpdatedEventArgs { + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_next_maneuver(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NextManeuver)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_next_maneuver_distance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NextManeuverDistance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_after_next_maneuver(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AfterNextManeuver)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_after_next_maneuver_distance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AfterNextManeuverDistance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_distance_to_destination(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DistanceToDestination)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_elapsed_distance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ElapsedDistance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_elapsed_time(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ElapsedTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_to_destination(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeToDestination)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_road_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RoadName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_route(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Route)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_location(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentLocation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_new_maneuver(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsNewManeuver)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_lane_info(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LaneInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GuidanceRoute: IGuidanceRoute} + RT_ACTIVATABLE!{IGuidanceRouteStatics [CLSID_GuidanceRoute]} + DEFINE_CLSID!(CLSID_GuidanceRoute = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,71,117,105,100,97,110,99,101,46,71,117,105,100,97,110,99,101,82,111,117,116,101,0]); + RT_CLASS!{class GuidanceMapMatchedCoordinate: IGuidanceMapMatchedCoordinate} + RT_CLASS!{class GuidanceLaneInfo: IGuidanceLaneInfo} + RT_CLASS!{class GuidanceUpdatedEventArgs: IGuidanceUpdatedEventArgs} + DEFINE_IID!(IID_IGuidanceReroutedEventArgs, 291323912, 54568, 17742, 187, 148, 165, 3, 65, 210, 201, 241); + RT_INTERFACE!{interface IGuidanceReroutedEventArgs(IGuidanceReroutedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceReroutedEventArgs] { + fn get_Route(&mut self, out: *mut *mut GuidanceRoute) -> HRESULT + }} + impl IGuidanceReroutedEventArgs { + #[inline] pub unsafe fn get_route(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Route)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GuidanceReroutedEventArgs: IGuidanceReroutedEventArgs} + DEFINE_IID!(IID_IGuidanceAudioNotificationRequestedEventArgs, 3391791690, 51138, 19788, 157, 124, 73, 149, 118, 188, 237, 219); + RT_INTERFACE!{interface IGuidanceAudioNotificationRequestedEventArgs(IGuidanceAudioNotificationRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceAudioNotificationRequestedEventArgs] { + fn get_AudioNotification(&mut self, out: *mut GuidanceAudioNotificationKind) -> HRESULT, + fn get_AudioFilePaths(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_AudioText(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IGuidanceAudioNotificationRequestedEventArgs { + #[inline] pub unsafe fn get_audio_notification(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioNotification)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_file_paths(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudioFilePaths)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AudioText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GuidanceAudioNotificationRequestedEventArgs: IGuidanceAudioNotificationRequestedEventArgs} + DEFINE_IID!(IID_IGuidanceNavigator, 150044407, 36415, 19866, 190, 138, 16, 143, 154, 1, 44, 103); + RT_INTERFACE!{interface IGuidanceNavigator(IGuidanceNavigatorVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceNavigator] { + fn StartNavigating(&mut self, route: *mut GuidanceRoute) -> HRESULT, + fn StartSimulating(&mut self, route: *mut GuidanceRoute, speedInMetersPerSecond: i32) -> HRESULT, + fn StartTracking(&mut self) -> HRESULT, + fn Pause(&mut self) -> HRESULT, + fn Resume(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn RepeatLastAudioNotification(&mut self) -> HRESULT, + fn get_AudioMeasurementSystem(&mut self, out: *mut GuidanceAudioMeasurementSystem) -> HRESULT, + fn put_AudioMeasurementSystem(&mut self, value: GuidanceAudioMeasurementSystem) -> HRESULT, + fn get_AudioNotifications(&mut self, out: *mut GuidanceAudioNotifications) -> HRESULT, + fn put_AudioNotifications(&mut self, value: GuidanceAudioNotifications) -> HRESULT, + fn add_GuidanceUpdated(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_GuidanceUpdated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_DestinationReached(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DestinationReached(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Rerouting(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Rerouting(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Rerouted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Rerouted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_RerouteFailed(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RerouteFailed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_UserLocationLost(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UserLocationLost(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_UserLocationRestored(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UserLocationRestored(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn SetGuidanceVoice(&mut self, voiceId: i32, voiceFolder: HSTRING) -> HRESULT, + #[cfg(feature="windows.devices")] fn UpdateUserLocation(&mut self, userLocation: *mut ::rt::gen::windows::devices::geolocation::Geocoordinate) -> HRESULT, + #[cfg(feature="windows.devices")] fn UpdateUserLocationWithPositionOverride(&mut self, userLocation: *mut ::rt::gen::windows::devices::geolocation::Geocoordinate, positionOverride: ::rt::gen::windows::devices::geolocation::BasicGeoposition) -> HRESULT + }} + impl IGuidanceNavigator { + #[inline] pub unsafe fn start_navigating(&mut self, route: &GuidanceRoute) -> Result<()> { + let hr = ((*self.lpVtbl).StartNavigating)(self, route as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_simulating(&mut self, route: &GuidanceRoute, speedInMetersPerSecond: i32) -> Result<()> { + let hr = ((*self.lpVtbl).StartSimulating)(self, route as *const _ as *mut _, speedInMetersPerSecond); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_tracking(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).StartTracking)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn pause(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Pause)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn resume(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Resume)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn repeat_last_audio_notification(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RepeatLastAudioNotification)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_measurement_system(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioMeasurementSystem)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_audio_measurement_system(&mut self, value: GuidanceAudioMeasurementSystem) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioMeasurementSystem)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio_notifications(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AudioNotifications)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_audio_notifications(&mut self, value: GuidanceAudioNotifications) -> Result<()> { + let hr = ((*self.lpVtbl).put_AudioNotifications)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_guidance_updated(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_GuidanceUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_guidance_updated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_GuidanceUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_destination_reached(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DestinationReached)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_destination_reached(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DestinationReached)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rerouting(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Rerouting)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_rerouting(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Rerouting)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rerouted(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Rerouted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_rerouted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Rerouted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_reroute_failed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RerouteFailed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_reroute_failed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RerouteFailed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_user_location_lost(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UserLocationLost)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_user_location_lost(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UserLocationLost)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_user_location_restored(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UserLocationRestored)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_user_location_restored(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UserLocationRestored)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_guidance_voice(&mut self, voiceId: i32, voiceFolder: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetGuidanceVoice)(self, voiceId, voiceFolder.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn update_user_location(&mut self, userLocation: &::rt::gen::windows::devices::geolocation::Geocoordinate) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateUserLocation)(self, userLocation as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn update_user_location_with_position_override(&mut self, userLocation: &::rt::gen::windows::devices::geolocation::Geocoordinate, positionOverride: ::rt::gen::windows::devices::geolocation::BasicGeoposition) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateUserLocationWithPositionOverride)(self, userLocation as *const _ as *mut _, positionOverride); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class GuidanceNavigator: IGuidanceNavigator} + RT_ACTIVATABLE!{IGuidanceNavigatorStatics [CLSID_GuidanceNavigator]} + RT_ACTIVATABLE!{IGuidanceNavigatorStatics2 [CLSID_GuidanceNavigator]} + DEFINE_CLSID!(CLSID_GuidanceNavigator = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,71,117,105,100,97,110,99,101,46,71,117,105,100,97,110,99,101,78,97,118,105,103,97,116,111,114,0]); + DEFINE_IID!(IID_IGuidanceNavigator2, 1826377937, 1052, 19443, 182, 51, 161, 1, 252, 47, 107, 87); + RT_INTERFACE!{interface IGuidanceNavigator2(IGuidanceNavigator2Vtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceNavigator2] { + fn add_AudioNotificationRequested(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioNotificationRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_IsGuidanceAudioMuted(&mut self, out: *mut bool) -> HRESULT, + fn put_IsGuidanceAudioMuted(&mut self, value: bool) -> HRESULT + }} + impl IGuidanceNavigator2 { + #[inline] pub unsafe fn add_audio_notification_requested(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AudioNotificationRequested)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_audio_notification_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AudioNotificationRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_guidance_audio_muted(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsGuidanceAudioMuted)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_guidance_audio_muted(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsGuidanceAudioMuted)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGuidanceNavigatorStatics, 16618771, 17494, 20070, 161, 67, 58, 221, 107, 224, 132, 38); + RT_INTERFACE!{static interface IGuidanceNavigatorStatics(IGuidanceNavigatorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceNavigatorStatics] { + fn GetCurrent(&mut self, out: *mut *mut GuidanceNavigator) -> HRESULT + }} + impl IGuidanceNavigatorStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGuidanceNavigatorStatics2, 1422246882, 30596, 19589, 140, 149, 208, 198, 239, 180, 57, 101); + RT_INTERFACE!{static interface IGuidanceNavigatorStatics2(IGuidanceNavigatorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceNavigatorStatics2] { + fn get_UseAppProvidedVoice(&mut self, out: *mut bool) -> HRESULT + }} + impl IGuidanceNavigatorStatics2 { + #[inline] pub unsafe fn get_use_app_provided_voice(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UseAppProvidedVoice)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGuidanceRoadSegment, 3005700262, 48760, 19555, 175, 231, 108, 41, 87, 71, 155, 62); + RT_INTERFACE!{interface IGuidanceRoadSegment(IGuidanceRoadSegmentVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceRoadSegment] { + fn get_RoadName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ShortRoadName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SpeedLimit(&mut self, out: *mut f64) -> HRESULT, + fn get_TravelTime(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_Path(&mut self, out: *mut *mut ::rt::gen::windows::devices::geolocation::Geopath) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsHighway(&mut self, out: *mut bool) -> HRESULT, + fn get_IsTunnel(&mut self, out: *mut bool) -> HRESULT, + fn get_IsTollRoad(&mut self, out: *mut bool) -> HRESULT + }} + impl IGuidanceRoadSegment { + #[inline] pub unsafe fn get_road_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RoadName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_short_road_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ShortRoadName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_speed_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpeedLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_travel_time(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TravelTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_path(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Path)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_highway(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsHighway)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_tunnel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTunnel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_toll_road(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTollRoad)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class GuidanceRoadSegment: IGuidanceRoadSegment} + DEFINE_IID!(IID_IGuidanceMapMatchedCoordinate, 3081548136, 10514, 19097, 175, 241, 121, 134, 9, 185, 129, 254); + RT_INTERFACE!{interface IGuidanceMapMatchedCoordinate(IGuidanceMapMatchedCoordinateVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceMapMatchedCoordinate] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_Location(&mut self, out: *mut *mut ::rt::gen::windows::devices::geolocation::Geopoint) -> HRESULT, + fn get_CurrentHeading(&mut self, out: *mut f64) -> HRESULT, + fn get_CurrentSpeed(&mut self, out: *mut f64) -> HRESULT, + fn get_IsOnStreet(&mut self, out: *mut bool) -> HRESULT, + fn get_Road(&mut self, out: *mut *mut GuidanceRoadSegment) -> HRESULT + }} + impl IGuidanceMapMatchedCoordinate { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_location(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Location)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_heading(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentHeading)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_speed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentSpeed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_on_street(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsOnStreet)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_road(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Road)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGuidanceTelemetryCollectorStatics, 911417415, 61792, 17659, 181, 120, 148, 87, 124, 160, 89, 144); + RT_INTERFACE!{static interface IGuidanceTelemetryCollectorStatics(IGuidanceTelemetryCollectorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceTelemetryCollectorStatics] { + fn GetCurrent(&mut self, out: *mut *mut GuidanceTelemetryCollector) -> HRESULT + }} + impl IGuidanceTelemetryCollectorStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class GuidanceTelemetryCollector: IGuidanceTelemetryCollector} + RT_ACTIVATABLE!{IGuidanceTelemetryCollectorStatics [CLSID_GuidanceTelemetryCollector]} + DEFINE_CLSID!(CLSID_GuidanceTelemetryCollector = &[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,71,117,105,100,97,110,99,101,46,71,117,105,100,97,110,99,101,84,101,108,101,109,101,116,114,121,67,111,108,108,101,99,116,111,114,0]); + DEFINE_IID!(IID_IGuidanceTelemetryCollector, 3676278181, 47224, 19858, 152, 221, 52, 125, 35, 211, 130, 98); + RT_INTERFACE!{interface IGuidanceTelemetryCollector(IGuidanceTelemetryCollectorVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceTelemetryCollector] { + fn get_Enabled(&mut self, out: *mut bool) -> HRESULT, + fn put_Enabled(&mut self, value: bool) -> HRESULT, + fn ClearLocalData(&mut self) -> HRESULT, + fn get_SpeedTrigger(&mut self, out: *mut f64) -> HRESULT, + fn put_SpeedTrigger(&mut self, value: f64) -> HRESULT, + fn get_UploadFrequency(&mut self, out: *mut i32) -> HRESULT, + fn put_UploadFrequency(&mut self, value: i32) -> HRESULT + }} + impl IGuidanceTelemetryCollector { + #[inline] pub unsafe fn get_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Enabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Enabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear_local_data(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ClearLocalData)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_speed_trigger(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpeedTrigger)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_speed_trigger(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_SpeedTrigger)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_upload_frequency(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UploadFrequency)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_upload_frequency(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_UploadFrequency)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGuidanceRouteStatics, 4117598826, 21997, 18881, 176, 156, 75, 130, 35, 181, 13, 179); + RT_INTERFACE!{static interface IGuidanceRouteStatics(IGuidanceRouteStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceRouteStatics] { + fn CanCreateFromMapRoute(&mut self, mapRoute: *mut super::MapRoute, out: *mut bool) -> HRESULT, + fn TryCreateFromMapRoute(&mut self, mapRoute: *mut super::MapRoute, out: *mut *mut GuidanceRoute) -> HRESULT + }} + impl IGuidanceRouteStatics { + #[inline] pub unsafe fn can_create_from_map_route(&mut self, mapRoute: &super::MapRoute) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanCreateFromMapRoute)(self, mapRoute as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_create_from_map_route(&mut self, mapRoute: &super::MapRoute) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryCreateFromMapRoute)(self, mapRoute as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGuidanceRoute, 974410845, 32794, 16573, 162, 134, 175, 178, 1, 12, 206, 108); + RT_INTERFACE!{interface IGuidanceRoute(IGuidanceRouteVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceRoute] { + fn get_Duration(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Distance(&mut self, out: *mut i32) -> HRESULT, + fn get_Maneuvers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_BoundingBox(&mut self, out: *mut *mut ::rt::gen::windows::devices::geolocation::GeoboundingBox) -> HRESULT, + #[cfg(not(feature="windows.devices"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_Path(&mut self, out: *mut *mut ::rt::gen::windows::devices::geolocation::Geopath) -> HRESULT, + fn get_RoadSegments(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn ConvertToMapRoute(&mut self, out: *mut *mut super::MapRoute) -> HRESULT + }} + impl IGuidanceRoute { + #[inline] pub unsafe fn get_duration(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_distance(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Distance)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_maneuvers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Maneuvers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_bounding_box(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BoundingBox)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_path(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Path)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_road_segments(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RoadSegments)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn convert_to_map_route(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ConvertToMapRoute)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGuidanceLaneInfo, 2214908180, 25985, 17335, 172, 21, 201, 7, 155, 249, 13, 241); + RT_INTERFACE!{interface IGuidanceLaneInfo(IGuidanceLaneInfoVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceLaneInfo] { + fn get_LaneMarkers(&mut self, out: *mut GuidanceLaneMarkers) -> HRESULT, + fn get_IsOnRoute(&mut self, out: *mut bool) -> HRESULT + }} + impl IGuidanceLaneInfo { + #[inline] pub unsafe fn get_lane_markers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LaneMarkers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_on_route(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsOnRoute)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.Services.Maps.Guidance +} // Windows.Services.Maps +} // Windows.Services +#[cfg(feature="windows.storage")] +pub mod storage { // Windows.Storage +use ::prelude::*; + RT_ENUM! { enum KnownLibraryId: i32 { + Music (KnownLibraryId_Music) = 0, Pictures (KnownLibraryId_Pictures) = 1, Videos (KnownLibraryId_Videos) = 2, Documents (KnownLibraryId_Documents) = 3, + }} + DEFINE_IID!(IID_IStorageLibraryStatics, 1107863259, 26698, 18886, 158, 89, 144, 18, 30, 224, 80, 214); + RT_INTERFACE!{static interface IStorageLibraryStatics(IStorageLibraryStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibraryStatics] { + fn GetLibraryAsync(&mut self, libraryId: KnownLibraryId, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStorageLibraryStatics { + #[inline] pub unsafe fn get_library_async(&mut self, libraryId: KnownLibraryId) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetLibraryAsync)(self, libraryId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StorageLibrary: IStorageLibrary} + RT_ACTIVATABLE!{IStorageLibraryStatics2 [CLSID_StorageLibrary]} + RT_ACTIVATABLE!{IStorageLibraryStatics [CLSID_StorageLibrary]} + DEFINE_CLSID!(CLSID_StorageLibrary = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,116,111,114,97,103,101,76,105,98,114,97,114,121,0]); + DEFINE_IID!(IID_IStorageLibraryStatics2, 4289760732, 64117, 18069, 185, 209, 127, 129, 249, 120, 50, 227); + RT_INTERFACE!{static interface IStorageLibraryStatics2(IStorageLibraryStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibraryStatics2] { + #[cfg(feature="windows.system")] fn GetLibraryForUserAsync(&mut self, user: *mut super::system::User, libraryId: KnownLibraryId, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStorageLibraryStatics2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_library_for_user_async(&mut self, user: &super::system::User, libraryId: KnownLibraryId) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetLibraryForUserAsync)(self, user as *const _ as *mut _, libraryId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageLibrary, 517828867, 3678, 19820, 181, 232, 147, 24, 152, 61, 106, 3); + RT_INTERFACE!{interface IStorageLibrary(IStorageLibraryVtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibrary] { + fn RequestAddFolderAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn RequestRemoveFolderAsync(&mut self, folder: *mut StorageFolder, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn get_Folders(&mut self, out: *mut *mut super::foundation::collections::IObservableVector) -> HRESULT, + fn get_SaveFolder(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn add_DefinitionChanged(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DefinitionChanged(&mut self, eventCookie: super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IStorageLibrary { + #[inline] pub unsafe fn request_add_folder_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAddFolderAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_remove_folder_async(&mut self, folder: &StorageFolder) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestRemoveFolderAsync)(self, folder as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folders(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Folders)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_save_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SaveFolder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_definition_changed(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DefinitionChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_definition_changed(&mut self, eventCookie: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DefinitionChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class StorageFolder: IStorageFolder} + RT_ACTIVATABLE!{IStorageFolderStatics [CLSID_StorageFolder]} + DEFINE_CLSID!(CLSID_StorageFolder = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,116,111,114,97,103,101,70,111,108,100,101,114,0]); + DEFINE_IID!(IID_IStorageLibrary2, 1527571272, 64691, 16433, 175, 176, 166, 141, 123, 212, 69, 52); + RT_INTERFACE!{interface IStorageLibrary2(IStorageLibrary2Vtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibrary2] { + fn get_ChangeTracker(&mut self, out: *mut *mut StorageLibraryChangeTracker) -> HRESULT + }} + impl IStorageLibrary2 { + #[inline] pub unsafe fn get_change_tracker(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChangeTracker)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StorageLibraryChangeTracker: IStorageLibraryChangeTracker} + RT_ENUM! { enum KnownFolderId: i32 { + AppCaptures (KnownFolderId_AppCaptures) = 0, CameraRoll (KnownFolderId_CameraRoll) = 1, DocumentsLibrary (KnownFolderId_DocumentsLibrary) = 2, HomeGroup (KnownFolderId_HomeGroup) = 3, MediaServerDevices (KnownFolderId_MediaServerDevices) = 4, MusicLibrary (KnownFolderId_MusicLibrary) = 5, Objects3D (KnownFolderId_Objects3D) = 6, PicturesLibrary (KnownFolderId_PicturesLibrary) = 7, Playlists (KnownFolderId_Playlists) = 8, RecordedCalls (KnownFolderId_RecordedCalls) = 9, RemovableDevices (KnownFolderId_RemovableDevices) = 10, SavedPictures (KnownFolderId_SavedPictures) = 11, Screenshots (KnownFolderId_Screenshots) = 12, VideosLibrary (KnownFolderId_VideosLibrary) = 13, + }} + DEFINE_IID!(IID_IKnownFoldersStatics, 1512731936, 18434, 17709, 154, 217, 67, 81, 173, 167, 236, 53); + RT_INTERFACE!{static interface IKnownFoldersStatics(IKnownFoldersStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownFoldersStatics] { + fn get_MusicLibrary(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn get_PicturesLibrary(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn get_VideosLibrary(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn get_DocumentsLibrary(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn get_HomeGroup(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn get_RemovableDevices(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn get_MediaServerDevices(&mut self, out: *mut *mut StorageFolder) -> HRESULT + }} + impl IKnownFoldersStatics { + #[inline] pub unsafe fn get_music_library(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MusicLibrary)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pictures_library(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PicturesLibrary)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_videos_library(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideosLibrary)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_documents_library(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DocumentsLibrary)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_home_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HomeGroup)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_removable_devices(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemovableDevices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_media_server_devices(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MediaServerDevices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownFoldersStatics2, 424399053, 53102, 19719, 157, 83, 233, 22, 58, 37, 54, 233); + RT_INTERFACE!{static interface IKnownFoldersStatics2(IKnownFoldersStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IKnownFoldersStatics2] { + fn get_Objects3D(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn get_AppCaptures(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn get_RecordedCalls(&mut self, out: *mut *mut StorageFolder) -> HRESULT + }} + impl IKnownFoldersStatics2 { + #[inline] pub unsafe fn get_objects3_d(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Objects3D)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_captures(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppCaptures)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_recorded_calls(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RecordedCalls)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownFoldersStatics3, 3306767169, 38722, 20181, 130, 61, 252, 20, 1, 20, 135, 100); + RT_INTERFACE!{static interface IKnownFoldersStatics3(IKnownFoldersStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IKnownFoldersStatics3] { + #[cfg(feature="windows.system")] fn GetFolderForUserAsync(&mut self, user: *mut super::system::User, folderId: KnownFolderId, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IKnownFoldersStatics3 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_folder_for_user_async(&mut self, user: &super::system::User, folderId: KnownFolderId) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFolderForUserAsync)(self, user as *const _ as *mut _, folderId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownFoldersPlaylistsStatics, 3671452886, 12399, 19818, 180, 150, 70, 186, 142, 177, 6, 206); + RT_INTERFACE!{static interface IKnownFoldersPlaylistsStatics(IKnownFoldersPlaylistsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownFoldersPlaylistsStatics] { + fn get_Playlists(&mut self, out: *mut *mut StorageFolder) -> HRESULT + }} + impl IKnownFoldersPlaylistsStatics { + #[inline] pub unsafe fn get_playlists(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Playlists)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownFoldersCameraRollStatics, 1561419366, 10216, 18735, 184, 229, 47, 144, 137, 108, 212, 205); + RT_INTERFACE!{static interface IKnownFoldersCameraRollStatics(IKnownFoldersCameraRollStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownFoldersCameraRollStatics] { + fn get_CameraRoll(&mut self, out: *mut *mut StorageFolder) -> HRESULT + }} + impl IKnownFoldersCameraRollStatics { + #[inline] pub unsafe fn get_camera_roll(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CameraRoll)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownFoldersSavedPicturesStatics, 89953258, 9533, 18044, 182, 202, 169, 125, 161, 233, 161, 141); + RT_INTERFACE!{static interface IKnownFoldersSavedPicturesStatics(IKnownFoldersSavedPicturesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownFoldersSavedPicturesStatics] { + fn get_SavedPictures(&mut self, out: *mut *mut StorageFolder) -> HRESULT + }} + impl IKnownFoldersSavedPicturesStatics { + #[inline] pub unsafe fn get_saved_pictures(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SavedPictures)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKnownFoldersStatics [CLSID_KnownFolders]} + RT_ACTIVATABLE!{IKnownFoldersStatics2 [CLSID_KnownFolders]} + RT_ACTIVATABLE!{IKnownFoldersCameraRollStatics [CLSID_KnownFolders]} + RT_ACTIVATABLE!{IKnownFoldersStatics3 [CLSID_KnownFolders]} + RT_ACTIVATABLE!{IKnownFoldersSavedPicturesStatics [CLSID_KnownFolders]} + RT_ACTIVATABLE!{IKnownFoldersPlaylistsStatics [CLSID_KnownFolders]} + DEFINE_CLSID!(CLSID_KnownFolders = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,75,110,111,119,110,70,111,108,100,101,114,115,0]); + RT_ENUM! { enum CreationCollisionOption: i32 { + GenerateUniqueName (CreationCollisionOption_GenerateUniqueName) = 0, ReplaceExisting (CreationCollisionOption_ReplaceExisting) = 1, FailIfExists (CreationCollisionOption_FailIfExists) = 2, OpenIfExists (CreationCollisionOption_OpenIfExists) = 3, + }} + DEFINE_IID!(IID_IDownloadsFolderStatics, 663105232, 16462, 18399, 161, 226, 227, 115, 8, 190, 123, 55); + RT_INTERFACE!{static interface IDownloadsFolderStatics(IDownloadsFolderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDownloadsFolderStatics] { + fn CreateFileAsync(&mut self, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFolderAsync(&mut self, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFileWithCollisionOptionAsync(&mut self, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFolderWithCollisionOptionAsync(&mut self, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IDownloadsFolderStatics { + #[inline] pub unsafe fn create_file_async(&mut self, desiredName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileAsync)(self, desiredName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_folder_async(&mut self, desiredName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFolderAsync)(self, desiredName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_file_with_collision_option_async(&mut self, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileWithCollisionOptionAsync)(self, desiredName.get(), option, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_folder_with_collision_option_async(&mut self, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFolderWithCollisionOptionAsync)(self, desiredName.get(), option, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StorageFile: IStorageFile} + RT_ACTIVATABLE!{IStorageFileStatics [CLSID_StorageFile]} + DEFINE_CLSID!(CLSID_StorageFile = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,116,111,114,97,103,101,70,105,108,101,0]); + DEFINE_IID!(IID_IDownloadsFolderStatics2, 3912254909, 36600, 20366, 141, 21, 172, 14, 38, 95, 57, 13); + RT_INTERFACE!{static interface IDownloadsFolderStatics2(IDownloadsFolderStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IDownloadsFolderStatics2] { + #[cfg(feature="windows.system")] fn CreateFileForUserAsync(&mut self, user: *mut super::system::User, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.system")] fn CreateFolderForUserAsync(&mut self, user: *mut super::system::User, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.system")] fn CreateFileForUserWithCollisionOptionAsync(&mut self, user: *mut super::system::User, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.system")] fn CreateFolderForUserWithCollisionOptionAsync(&mut self, user: *mut super::system::User, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IDownloadsFolderStatics2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn create_file_for_user_async(&mut self, user: &super::system::User, desiredName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileForUserAsync)(self, user as *const _ as *mut _, desiredName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn create_folder_for_user_async(&mut self, user: &super::system::User, desiredName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFolderForUserAsync)(self, user as *const _ as *mut _, desiredName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn create_file_for_user_with_collision_option_async(&mut self, user: &super::system::User, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileForUserWithCollisionOptionAsync)(self, user as *const _ as *mut _, desiredName.get(), option, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn create_folder_for_user_with_collision_option_async(&mut self, user: &super::system::User, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFolderForUserWithCollisionOptionAsync)(self, user as *const _ as *mut _, desiredName.get(), option, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IDownloadsFolderStatics [CLSID_DownloadsFolder]} + RT_ACTIVATABLE!{IDownloadsFolderStatics2 [CLSID_DownloadsFolder]} + DEFINE_CLSID!(CLSID_DownloadsFolder = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,68,111,119,110,108,111,97,100,115,70,111,108,100,101,114,0]); + RT_ENUM! { enum NameCollisionOption: i32 { + GenerateUniqueName (NameCollisionOption_GenerateUniqueName) = 0, ReplaceExisting (NameCollisionOption_ReplaceExisting) = 1, FailIfExists (NameCollisionOption_FailIfExists) = 2, + }} + RT_ENUM! { enum StorageDeleteOption: i32 { + Default (StorageDeleteOption_Default) = 0, PermanentDelete (StorageDeleteOption_PermanentDelete) = 1, + }} + RT_ENUM! { enum StorageItemTypes: u32 { + None (StorageItemTypes_None) = 0, File (StorageItemTypes_File) = 1, Folder (StorageItemTypes_Folder) = 2, + }} + RT_ENUM! { enum FileAttributes: u32 { + Normal (FileAttributes_Normal) = 0, ReadOnly (FileAttributes_ReadOnly) = 1, Directory (FileAttributes_Directory) = 16, Archive (FileAttributes_Archive) = 32, Temporary (FileAttributes_Temporary) = 256, LocallyIncomplete (FileAttributes_LocallyIncomplete) = 512, + }} + RT_ENUM! { enum FileAccessMode: i32 { + Read (FileAccessMode_Read) = 0, ReadWrite (FileAccessMode_ReadWrite) = 1, + }} + RT_ENUM! { enum StorageLibraryChangeType: i32 { + Created (StorageLibraryChangeType_Created) = 0, Deleted (StorageLibraryChangeType_Deleted) = 1, MovedOrRenamed (StorageLibraryChangeType_MovedOrRenamed) = 2, ContentsChanged (StorageLibraryChangeType_ContentsChanged) = 3, MovedOutOfLibrary (StorageLibraryChangeType_MovedOutOfLibrary) = 4, MovedIntoLibrary (StorageLibraryChangeType_MovedIntoLibrary) = 5, ContentsReplaced (StorageLibraryChangeType_ContentsReplaced) = 6, IndexingStatusChanged (StorageLibraryChangeType_IndexingStatusChanged) = 7, EncryptionChanged (StorageLibraryChangeType_EncryptionChanged) = 8, ChangeTrackingLost (StorageLibraryChangeType_ChangeTrackingLost) = 9, + }} + DEFINE_IID!(IID_IStorageLibraryChange, 9964323, 11234, 18697, 170, 72, 21, 159, 82, 3, 165, 30); + RT_INTERFACE!{interface IStorageLibraryChange(IStorageLibraryChangeVtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibraryChange] { + fn get_ChangeType(&mut self, out: *mut StorageLibraryChangeType) -> HRESULT, + fn get_Path(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PreviousPath(&mut self, out: *mut HSTRING) -> HRESULT, + fn IsOfType(&mut self, type_: StorageItemTypes, out: *mut bool) -> HRESULT, + fn GetStorageItemAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStorageLibraryChange { + #[inline] pub unsafe fn get_change_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ChangeType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_path(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Path)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_previous_path(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreviousPath)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_of_type(&mut self, type_: StorageItemTypes) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsOfType)(self, type_, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_storage_item_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStorageItemAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageItem, 1107798422, 51759, 17143, 189, 232, 139, 16, 69, 122, 127, 48); + RT_INTERFACE!{interface IStorageItem(IStorageItemVtbl): IInspectable(IInspectableVtbl) [IID_IStorageItem] { + fn RenameAsyncOverloadDefaultOptions(&mut self, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn RenameAsync(&mut self, desiredName: HSTRING, option: NameCollisionOption, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn DeleteAsyncOverloadDefaultOptions(&mut self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn DeleteAsync(&mut self, option: StorageDeleteOption, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn GetBasicPropertiesAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Path(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Attributes(&mut self, out: *mut FileAttributes) -> HRESULT, + fn get_DateCreated(&mut self, out: *mut super::foundation::DateTime) -> HRESULT, + fn IsOfType(&mut self, type_: StorageItemTypes, out: *mut bool) -> HRESULT + }} + impl IStorageItem { + #[inline] pub unsafe fn rename_async_overload_default_options(&mut self, desiredName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RenameAsyncOverloadDefaultOptions)(self, desiredName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn rename_async(&mut self, desiredName: &HStringArg, option: NameCollisionOption) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RenameAsync)(self, desiredName.get(), option, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_async_overload_default_options(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAsyncOverloadDefaultOptions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_async(&mut self, option: StorageDeleteOption) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAsync)(self, option, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_basic_properties_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBasicPropertiesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_path(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Path)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_attributes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Attributes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_date_created(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DateCreated)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_of_type(&mut self, type_: StorageItemTypes) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsOfType)(self, type_, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class StorageLibraryChange: IStorageLibraryChange} + DEFINE_IID!(IID_IStorageLibraryChangeReader, 4060462211, 64674, 16889, 137, 84, 238, 46, 153, 30, 185, 111); + RT_INTERFACE!{interface IStorageLibraryChangeReader(IStorageLibraryChangeReaderVtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibraryChangeReader] { + fn ReadBatchAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn AcceptChangesAsync(&mut self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + }} + impl IStorageLibraryChangeReader { + #[inline] pub unsafe fn read_batch_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBatchAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn accept_changes_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AcceptChangesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StorageLibraryChangeReader: IStorageLibraryChangeReader} + DEFINE_IID!(IID_IStorageLibraryChangeTracker, 2652205846, 24691, 17654, 150, 129, 116, 146, 209, 40, 108, 144); + RT_INTERFACE!{interface IStorageLibraryChangeTracker(IStorageLibraryChangeTrackerVtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibraryChangeTracker] { + fn GetChangeReader(&mut self, out: *mut *mut StorageLibraryChangeReader) -> HRESULT, + fn Enable(&mut self) -> HRESULT, + fn Reset(&mut self) -> HRESULT + }} + impl IStorageLibraryChangeTracker { + #[inline] pub unsafe fn get_change_reader(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetChangeReader)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn enable(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Enable)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn reset(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Reset)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum StreamedFileFailureMode: i32 { + Failed (StreamedFileFailureMode_Failed) = 0, CurrentlyUnavailable (StreamedFileFailureMode_CurrentlyUnavailable) = 1, Incomplete (StreamedFileFailureMode_Incomplete) = 2, + }} + DEFINE_IID!(IID_IStreamedFileDataRequest, 376700110, 55997, 19792, 190, 238, 24, 11, 138, 129, 145, 182); + RT_INTERFACE!{interface IStreamedFileDataRequest(IStreamedFileDataRequestVtbl): IInspectable(IInspectableVtbl) [IID_IStreamedFileDataRequest] { + fn FailAndClose(&mut self, failureMode: StreamedFileFailureMode) -> HRESULT + }} + impl IStreamedFileDataRequest { + #[inline] pub unsafe fn fail_and_close(&mut self, failureMode: StreamedFileFailureMode) -> Result<()> { + let hr = ((*self.lpVtbl).FailAndClose)(self, failureMode); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class StreamedFileDataRequest: streams::IOutputStream} + DEFINE_IID!(IID_StreamedFileDataRequestedHandler, 4277577764, 12257, 19719, 163, 91, 183, 124, 80, 181, 244, 204); + RT_DELEGATE!{delegate StreamedFileDataRequestedHandler(StreamedFileDataRequestedHandlerVtbl, StreamedFileDataRequestedHandlerImpl) [IID_StreamedFileDataRequestedHandler] { + fn Invoke(&mut self, stream: *mut StreamedFileDataRequest) -> HRESULT + }} + impl StreamedFileDataRequestedHandler { + #[inline] pub unsafe fn invoke(&mut self, stream: &StreamedFileDataRequest) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, stream as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageFileStatics, 1501873936, 56050, 17352, 139, 180, 164, 211, 234, 207, 208, 63); + RT_INTERFACE!{static interface IStorageFileStatics(IStorageFileStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStorageFileStatics] { + fn GetFileFromPathAsync(&mut self, path: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetFileFromApplicationUriAsync(&mut self, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CreateStreamedFileAsync(&mut self, displayNameWithExtension: HSTRING, dataRequested: *mut StreamedFileDataRequestedHandler, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn ReplaceWithStreamedFileAsync(&mut self, fileToReplace: *mut IStorageFile, dataRequested: *mut StreamedFileDataRequestedHandler, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CreateStreamedFileFromUriAsync(&mut self, displayNameWithExtension: HSTRING, uri: *mut super::foundation::Uri, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn ReplaceWithStreamedFileFromUriAsync(&mut self, fileToReplace: *mut IStorageFile, uri: *mut super::foundation::Uri, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStorageFileStatics { + #[inline] pub unsafe fn get_file_from_path_async(&mut self, path: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFileFromPathAsync)(self, path.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_from_application_uri_async(&mut self, uri: &super::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFileFromApplicationUriAsync)(self, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_streamed_file_async(&mut self, displayNameWithExtension: &HStringArg, dataRequested: &StreamedFileDataRequestedHandler, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStreamedFileAsync)(self, displayNameWithExtension.get(), dataRequested as *const _ as *mut _, thumbnail as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn replace_with_streamed_file_async(&mut self, fileToReplace: &IStorageFile, dataRequested: &StreamedFileDataRequestedHandler, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReplaceWithStreamedFileAsync)(self, fileToReplace as *const _ as *mut _, dataRequested as *const _ as *mut _, thumbnail as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_streamed_file_from_uri_async(&mut self, displayNameWithExtension: &HStringArg, uri: &super::foundation::Uri, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStreamedFileFromUriAsync)(self, displayNameWithExtension.get(), uri as *const _ as *mut _, thumbnail as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn replace_with_streamed_file_from_uri_async(&mut self, fileToReplace: &IStorageFile, uri: &super::foundation::Uri, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReplaceWithStreamedFileFromUriAsync)(self, fileToReplace as *const _ as *mut _, uri as *const _ as *mut _, thumbnail as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StorageStreamTransaction: IStorageStreamTransaction} + DEFINE_IID!(IID_IStorageFolder, 1926351736, 46063, 20341, 168, 11, 111, 217, 218, 226, 148, 75); + RT_INTERFACE!{interface IStorageFolder(IStorageFolderVtbl): IInspectable(IInspectableVtbl) [IID_IStorageFolder] { + fn CreateFileAsyncOverloadDefaultOptions(&mut self, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFileAsync(&mut self, desiredName: HSTRING, options: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFolderAsyncOverloadDefaultOptions(&mut self, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFolderAsync(&mut self, desiredName: HSTRING, options: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetFileAsync(&mut self, name: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetFolderAsync(&mut self, name: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetItemAsync(&mut self, name: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetFilesAsyncOverloadDefaultOptionsStartAndCount(&mut self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsyncOverloadDefaultOptionsStartAndCount(&mut self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn GetItemsAsyncOverloadDefaultStartAndCount(&mut self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IStorageFolder { + #[inline] pub unsafe fn create_file_async_overload_default_options(&mut self, desiredName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileAsyncOverloadDefaultOptions)(self, desiredName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_file_async(&mut self, desiredName: &HStringArg, options: CreationCollisionOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileAsync)(self, desiredName.get(), options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_folder_async_overload_default_options(&mut self, desiredName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFolderAsyncOverloadDefaultOptions)(self, desiredName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_folder_async(&mut self, desiredName: &HStringArg, options: CreationCollisionOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFolderAsync)(self, desiredName.get(), options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_async(&mut self, name: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFileAsync)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folder_async(&mut self, name: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFolderAsync)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_async(&mut self, name: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemAsync)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_files_async_overload_default_options_start_and_count(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFilesAsyncOverloadDefaultOptionsStartAndCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folders_async_overload_default_options_start_and_count(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFoldersAsyncOverloadDefaultOptionsStartAndCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_items_async_overload_default_start_and_count(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemsAsyncOverloadDefaultStartAndCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageFile, 4198457734, 16916, 17036, 166, 76, 20, 201, 172, 115, 21, 234); + RT_INTERFACE!{interface IStorageFile(IStorageFileVtbl): IInspectable(IInspectableVtbl) [IID_IStorageFile] { + fn get_FileType(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ContentType(&mut self, out: *mut HSTRING) -> HRESULT, + fn OpenAsync(&mut self, accessMode: FileAccessMode, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn OpenTransactedWriteAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CopyOverloadDefaultNameAndOptions(&mut self, destinationFolder: *mut IStorageFolder, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CopyOverloadDefaultOptions(&mut self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CopyOverload(&mut self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, option: NameCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn CopyAndReplaceAsync(&mut self, fileToReplace: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn MoveOverloadDefaultNameAndOptions(&mut self, destinationFolder: *mut IStorageFolder, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn MoveOverloadDefaultOptions(&mut self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn MoveOverload(&mut self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, option: NameCollisionOption, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn MoveAndReplaceAsync(&mut self, fileToReplace: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + }} + impl IStorageFile { + #[inline] pub unsafe fn get_file_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FileType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn open_async(&mut self, accessMode: FileAccessMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenAsync)(self, accessMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn open_transacted_write_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenTransactedWriteAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn copy_overload_default_name_and_options(&mut self, destinationFolder: &IStorageFolder) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyOverloadDefaultNameAndOptions)(self, destinationFolder as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn copy_overload_default_options(&mut self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyOverloadDefaultOptions)(self, destinationFolder as *const _ as *mut _, desiredNewName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn copy_overload(&mut self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg, option: NameCollisionOption) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyOverload)(self, destinationFolder as *const _ as *mut _, desiredNewName.get(), option, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn copy_and_replace_async(&mut self, fileToReplace: &IStorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyAndReplaceAsync)(self, fileToReplace as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn move_overload_default_name_and_options(&mut self, destinationFolder: &IStorageFolder) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MoveOverloadDefaultNameAndOptions)(self, destinationFolder as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn move_overload_default_options(&mut self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MoveOverloadDefaultOptions)(self, destinationFolder as *const _ as *mut _, desiredNewName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn move_overload(&mut self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg, option: NameCollisionOption) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MoveOverload)(self, destinationFolder as *const _ as *mut _, desiredNewName.get(), option, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn move_and_replace_async(&mut self, fileToReplace: &IStorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).MoveAndReplaceAsync)(self, fileToReplace as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageFolderStatics, 150153215, 34261, 18617, 174, 233, 40, 81, 30, 51, 159, 159); + RT_INTERFACE!{static interface IStorageFolderStatics(IStorageFolderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStorageFolderStatics] { + fn GetFolderFromPathAsync(&mut self, path: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStorageFolderStatics { + #[inline] pub unsafe fn get_folder_from_path_async(&mut self, path: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFolderFromPathAsync)(self, path.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageItem2, 1408837330, 2108, 17027, 180, 91, 129, 192, 7, 35, 126, 68); + RT_INTERFACE!{interface IStorageItem2(IStorageItem2Vtbl): IInspectable(IInspectableVtbl) [IID_IStorageItem2] { + fn GetParentAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn IsEqual(&mut self, item: *mut IStorageItem, out: *mut bool) -> HRESULT + }} + impl IStorageItem2 { + #[inline] pub unsafe fn get_parent_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetParentAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_equal(&mut self, item: &IStorageItem) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEqual)(self, item as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageItemProperties, 2254849144, 32809, 18174, 167, 137, 28, 47, 62, 47, 251, 92); + RT_INTERFACE!{interface IStorageItemProperties(IStorageItemPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IStorageItemProperties] { + fn GetThumbnailAsyncOverloadDefaultSizeDefaultOptions(&mut self, mode: fileproperties::ThumbnailMode, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetThumbnailAsyncOverloadDefaultOptions(&mut self, mode: fileproperties::ThumbnailMode, requestedSize: u32, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetThumbnailAsync(&mut self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayType(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FolderRelativeId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut fileproperties::StorageItemContentProperties) -> HRESULT + }} + impl IStorageItemProperties { + #[inline] pub unsafe fn get_thumbnail_async_overload_default_size_default_options(&mut self, mode: fileproperties::ThumbnailMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetThumbnailAsyncOverloadDefaultSizeDefaultOptions)(self, mode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail_async_overload_default_options(&mut self, mode: fileproperties::ThumbnailMode, requestedSize: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetThumbnailAsyncOverloadDefaultOptions)(self, mode, requestedSize, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail_async(&mut self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetThumbnailAsync)(self, mode, requestedSize, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folder_relative_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FolderRelativeId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageItemProperties2, 2391189841, 1209, 19410, 146, 157, 254, 243, 247, 22, 33, 208); + RT_INTERFACE!{interface IStorageItemProperties2(IStorageItemProperties2Vtbl): IInspectable(IInspectableVtbl) [IID_IStorageItemProperties2] { + fn GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions(&mut self, mode: fileproperties::ThumbnailMode, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetScaledImageAsThumbnailAsyncOverloadDefaultOptions(&mut self, mode: fileproperties::ThumbnailMode, requestedSize: u32, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetScaledImageAsThumbnailAsync(&mut self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStorageItemProperties2 { + #[inline] pub unsafe fn get_scaled_image_as_thumbnail_async_overload_default_size_default_options(&mut self, mode: fileproperties::ThumbnailMode) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions)(self, mode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_scaled_image_as_thumbnail_async_overload_default_options(&mut self, mode: fileproperties::ThumbnailMode, requestedSize: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetScaledImageAsThumbnailAsyncOverloadDefaultOptions)(self, mode, requestedSize, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_scaled_image_as_thumbnail_async(&mut self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetScaledImageAsThumbnailAsync)(self, mode, requestedSize, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageItemPropertiesWithProvider, 2249978779, 25448, 19950, 180, 14, 116, 104, 74, 92, 231, 20); + RT_INTERFACE!{interface IStorageItemPropertiesWithProvider(IStorageItemPropertiesWithProviderVtbl): IInspectable(IInspectableVtbl) [IID_IStorageItemPropertiesWithProvider] { + fn get_Provider(&mut self, out: *mut *mut StorageProvider) -> HRESULT + }} + impl IStorageItemPropertiesWithProvider { + #[inline] pub unsafe fn get_provider(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Provider)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StorageProvider: IStorageProvider} + DEFINE_IID!(IID_IStorageFilePropertiesWithAvailability, 2949365403, 22571, 16691, 150, 72, 228, 76, 164, 110, 228, 145); + RT_INTERFACE!{interface IStorageFilePropertiesWithAvailability(IStorageFilePropertiesWithAvailabilityVtbl): IInspectable(IInspectableVtbl) [IID_IStorageFilePropertiesWithAvailability] { + fn get_IsAvailable(&mut self, out: *mut bool) -> HRESULT + }} + impl IStorageFilePropertiesWithAvailability { + #[inline] pub unsafe fn get_is_available(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsAvailable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageProvider, 3875925716, 54392, 18390, 186, 70, 26, 142, 190, 17, 74, 32); + RT_INTERFACE!{interface IStorageProvider(IStorageProviderVtbl): IInspectable(IInspectableVtbl) [IID_IStorageProvider] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IStorageProvider { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageFolder2, 3894929593, 2265, 19086, 160, 172, 254, 94, 211, 203, 187, 211); + RT_INTERFACE!{interface IStorageFolder2(IStorageFolder2Vtbl): IInspectable(IInspectableVtbl) [IID_IStorageFolder2] { + fn TryGetItemAsync(&mut self, name: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStorageFolder2 { + #[inline] pub unsafe fn try_get_item_async(&mut self, name: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetItemAsync)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum StorageOpenOptions: u32 { + None (StorageOpenOptions_None) = 0, AllowOnlyReaders (StorageOpenOptions_AllowOnlyReaders) = 1, + }} + DEFINE_IID!(IID_IStorageFile2, 2504936399, 2679, 17147, 183, 119, 194, 237, 88, 165, 46, 68); + RT_INTERFACE!{interface IStorageFile2(IStorageFile2Vtbl): IInspectable(IInspectableVtbl) [IID_IStorageFile2] { + fn OpenWithOptionsAsync(&mut self, accessMode: FileAccessMode, options: StorageOpenOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn OpenTransactedWriteWithOptionsAsync(&mut self, options: StorageOpenOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStorageFile2 { + #[inline] pub unsafe fn open_with_options_async(&mut self, accessMode: FileAccessMode, options: StorageOpenOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenWithOptionsAsync)(self, accessMode, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn open_transacted_write_with_options_async(&mut self, options: StorageOpenOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenTransactedWriteWithOptionsAsync)(self, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileIOStatics, 2289308139, 32596, 18226, 165, 240, 94, 67, 227, 184, 194, 245); + RT_INTERFACE!{static interface IFileIOStatics(IFileIOStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFileIOStatics] { + fn ReadTextAsync(&mut self, file: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn ReadTextWithEncodingAsync(&mut self, file: *mut IStorageFile, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn WriteTextAsync(&mut self, file: *mut IStorageFile, contents: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn WriteTextWithEncodingAsync(&mut self, file: *mut IStorageFile, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn AppendTextAsync(&mut self, file: *mut IStorageFile, contents: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn AppendTextWithEncodingAsync(&mut self, file: *mut IStorageFile, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn ReadLinesAsync(&mut self, file: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn ReadLinesWithEncodingAsync(&mut self, file: *mut IStorageFile, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn WriteLinesAsync(&mut self, file: *mut IStorageFile, lines: *mut super::foundation::collections::IIterable, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn WriteLinesWithEncodingAsync(&mut self, file: *mut IStorageFile, lines: *mut super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn AppendLinesAsync(&mut self, file: *mut IStorageFile, lines: *mut super::foundation::collections::IIterable, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn AppendLinesWithEncodingAsync(&mut self, file: *mut IStorageFile, lines: *mut super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn ReadBufferAsync(&mut self, file: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn WriteBufferAsync(&mut self, file: *mut IStorageFile, buffer: *mut streams::IBuffer, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn WriteBytesAsync(&mut self, file: *mut IStorageFile, bufferSize: u32, buffer: *mut u8, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + }} + impl IFileIOStatics { + #[inline] pub unsafe fn read_text_async(&mut self, file: &IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadTextAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_text_with_encoding_async(&mut self, file: &IStorageFile, encoding: streams::UnicodeEncoding) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadTextWithEncodingAsync)(self, file as *const _ as *mut _, encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_text_async(&mut self, file: &IStorageFile, contents: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteTextAsync)(self, file as *const _ as *mut _, contents.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_text_with_encoding_async(&mut self, file: &IStorageFile, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteTextWithEncodingAsync)(self, file as *const _ as *mut _, contents.get(), encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn append_text_async(&mut self, file: &IStorageFile, contents: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AppendTextAsync)(self, file as *const _ as *mut _, contents.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn append_text_with_encoding_async(&mut self, file: &IStorageFile, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AppendTextWithEncodingAsync)(self, file as *const _ as *mut _, contents.get(), encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_lines_async(&mut self, file: &IStorageFile) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadLinesAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_lines_with_encoding_async(&mut self, file: &IStorageFile, encoding: streams::UnicodeEncoding) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadLinesWithEncodingAsync)(self, file as *const _ as *mut _, encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_lines_async(&mut self, file: &IStorageFile, lines: &super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteLinesAsync)(self, file as *const _ as *mut _, lines as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_lines_with_encoding_async(&mut self, file: &IStorageFile, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteLinesWithEncodingAsync)(self, file as *const _ as *mut _, lines as *const _ as *mut _, encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn append_lines_async(&mut self, file: &IStorageFile, lines: &super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AppendLinesAsync)(self, file as *const _ as *mut _, lines as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn append_lines_with_encoding_async(&mut self, file: &IStorageFile, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AppendLinesWithEncodingAsync)(self, file as *const _ as *mut _, lines as *const _ as *mut _, encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_buffer_async(&mut self, file: &IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBufferAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_buffer_async(&mut self, file: &IStorageFile, buffer: &streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteBufferAsync)(self, file as *const _ as *mut _, buffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_bytes_async(&mut self, file: &IStorageFile, buffer: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteBytesAsync)(self, file as *const _ as *mut _, buffer.len() as u32, buffer.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IFileIOStatics [CLSID_FileIO]} + DEFINE_CLSID!(CLSID_FileIO = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,70,105,108,101,73,79,0]); + DEFINE_IID!(IID_IPathIOStatics, 254752600, 36551, 17281, 146, 43, 143, 108, 7, 210, 136, 243); + RT_INTERFACE!{static interface IPathIOStatics(IPathIOStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPathIOStatics] { + fn ReadTextAsync(&mut self, absolutePath: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn ReadTextWithEncodingAsync(&mut self, absolutePath: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn WriteTextAsync(&mut self, absolutePath: HSTRING, contents: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn WriteTextWithEncodingAsync(&mut self, absolutePath: HSTRING, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn AppendTextAsync(&mut self, absolutePath: HSTRING, contents: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn AppendTextWithEncodingAsync(&mut self, absolutePath: HSTRING, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn ReadLinesAsync(&mut self, absolutePath: HSTRING, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn ReadLinesWithEncodingAsync(&mut self, absolutePath: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn WriteLinesAsync(&mut self, absolutePath: HSTRING, lines: *mut super::foundation::collections::IIterable, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn WriteLinesWithEncodingAsync(&mut self, absolutePath: HSTRING, lines: *mut super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn AppendLinesAsync(&mut self, absolutePath: HSTRING, lines: *mut super::foundation::collections::IIterable, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn AppendLinesWithEncodingAsync(&mut self, absolutePath: HSTRING, lines: *mut super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn ReadBufferAsync(&mut self, absolutePath: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn WriteBufferAsync(&mut self, absolutePath: HSTRING, buffer: *mut streams::IBuffer, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn WriteBytesAsync(&mut self, absolutePath: HSTRING, bufferSize: u32, buffer: *mut u8, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + }} + impl IPathIOStatics { + #[inline] pub unsafe fn read_text_async(&mut self, absolutePath: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadTextAsync)(self, absolutePath.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_text_with_encoding_async(&mut self, absolutePath: &HStringArg, encoding: streams::UnicodeEncoding) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadTextWithEncodingAsync)(self, absolutePath.get(), encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_text_async(&mut self, absolutePath: &HStringArg, contents: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteTextAsync)(self, absolutePath.get(), contents.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_text_with_encoding_async(&mut self, absolutePath: &HStringArg, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteTextWithEncodingAsync)(self, absolutePath.get(), contents.get(), encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn append_text_async(&mut self, absolutePath: &HStringArg, contents: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AppendTextAsync)(self, absolutePath.get(), contents.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn append_text_with_encoding_async(&mut self, absolutePath: &HStringArg, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AppendTextWithEncodingAsync)(self, absolutePath.get(), contents.get(), encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_lines_async(&mut self, absolutePath: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadLinesAsync)(self, absolutePath.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_lines_with_encoding_async(&mut self, absolutePath: &HStringArg, encoding: streams::UnicodeEncoding) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadLinesWithEncodingAsync)(self, absolutePath.get(), encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_lines_async(&mut self, absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteLinesAsync)(self, absolutePath.get(), lines as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_lines_with_encoding_async(&mut self, absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteLinesWithEncodingAsync)(self, absolutePath.get(), lines as *const _ as *mut _, encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn append_lines_async(&mut self, absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AppendLinesAsync)(self, absolutePath.get(), lines as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn append_lines_with_encoding_async(&mut self, absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AppendLinesWithEncodingAsync)(self, absolutePath.get(), lines as *const _ as *mut _, encoding, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_buffer_async(&mut self, absolutePath: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBufferAsync)(self, absolutePath.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_buffer_async(&mut self, absolutePath: &HStringArg, buffer: &streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteBufferAsync)(self, absolutePath.get(), buffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn write_bytes_async(&mut self, absolutePath: &HStringArg, buffer: &[u8]) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteBytesAsync)(self, absolutePath.get(), buffer.len() as u32, buffer.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPathIOStatics [CLSID_PathIO]} + DEFINE_CLSID!(CLSID_PathIO = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,80,97,116,104,73,79,0]); + DEFINE_IID!(IID_ICachedFileManagerStatics, 2415665738, 59266, 18781, 182, 20, 101, 76, 79, 11, 35, 112); + RT_INTERFACE!{static interface ICachedFileManagerStatics(ICachedFileManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICachedFileManagerStatics] { + fn DeferUpdates(&mut self, file: *mut IStorageFile) -> HRESULT, + fn CompleteUpdatesAsync(&mut self, file: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICachedFileManagerStatics { + #[inline] pub unsafe fn defer_updates(&mut self, file: &IStorageFile) -> Result<()> { + let hr = ((*self.lpVtbl).DeferUpdates)(self, file as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn complete_updates_async(&mut self, file: &IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CompleteUpdatesAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ICachedFileManagerStatics [CLSID_CachedFileManager]} + DEFINE_CLSID!(CLSID_CachedFileManager = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,67,97,99,104,101,100,70,105,108,101,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_ISystemAudioProperties, 1066350775, 12428, 18401, 146, 77, 134, 69, 52, 142, 93, 183); + RT_INTERFACE!{interface ISystemAudioProperties(ISystemAudioPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISystemAudioProperties] { + fn get_EncodingBitrate(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISystemAudioProperties { + #[inline] pub unsafe fn get_encoding_bitrate(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EncodingBitrate)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SystemAudioProperties: ISystemAudioProperties} + DEFINE_IID!(IID_ISystemGPSProperties, 3237244596, 49524, 18458, 188, 37, 146, 25, 134, 246, 166, 243); + RT_INTERFACE!{interface ISystemGPSProperties(ISystemGPSPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISystemGPSProperties] { + fn get_LatitudeDecimal(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LongitudeDecimal(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISystemGPSProperties { + #[inline] pub unsafe fn get_latitude_decimal(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LatitudeDecimal)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_longitude_decimal(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LongitudeDecimal)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SystemGPSProperties: ISystemGPSProperties} + DEFINE_IID!(IID_ISystemImageProperties, 18558512, 35641, 17160, 190, 161, 232, 170, 97, 228, 120, 38); + RT_INTERFACE!{interface ISystemImageProperties(ISystemImagePropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISystemImageProperties] { + fn get_HorizontalSize(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_VerticalSize(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISystemImageProperties { + #[inline] pub unsafe fn get_horizontal_size(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HorizontalSize)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_size(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VerticalSize)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SystemImageProperties: ISystemImageProperties} + DEFINE_IID!(IID_ISystemMediaProperties, 2754294550, 33813, 16604, 140, 68, 152, 54, 29, 35, 84, 48); + RT_INTERFACE!{interface ISystemMediaProperties(ISystemMediaPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISystemMediaProperties] { + fn get_Duration(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Producer(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Publisher(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SubTitle(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Writer(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Year(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISystemMediaProperties { + #[inline] pub unsafe fn get_duration(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_producer(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Producer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_publisher(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Publisher)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_sub_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SubTitle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_writer(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Writer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_year(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Year)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SystemMediaProperties: ISystemMediaProperties} + DEFINE_IID!(IID_ISystemMusicProperties, 3027863765, 26543, 19395, 141, 57, 91, 137, 2, 32, 38, 161); + RT_INTERFACE!{interface ISystemMusicProperties(ISystemMusicPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISystemMusicProperties] { + fn get_AlbumArtist(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AlbumTitle(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Artist(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Composer(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Conductor(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayArtist(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Genre(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TrackNumber(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISystemMusicProperties { + #[inline] pub unsafe fn get_album_artist(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlbumArtist)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_album_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlbumTitle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_artist(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Artist)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_composer(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Composer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_conductor(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Conductor)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_artist(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayArtist)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_genre(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Genre)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_track_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TrackNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SystemMusicProperties: ISystemMusicProperties} + DEFINE_IID!(IID_ISystemPhotoProperties, 1194654781, 43809, 17444, 183, 53, 244, 53, 58, 86, 200, 252); + RT_INTERFACE!{interface ISystemPhotoProperties(ISystemPhotoPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISystemPhotoProperties] { + fn get_CameraManufacturer(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CameraModel(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DateTaken(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Orientation(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PeopleNames(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISystemPhotoProperties { + #[inline] pub unsafe fn get_camera_manufacturer(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CameraManufacturer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_camera_model(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CameraModel)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_date_taken(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DateTaken)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_people_names(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PeopleNames)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SystemPhotoProperties: ISystemPhotoProperties} + DEFINE_IID!(IID_ISystemVideoProperties, 541128469, 26616, 17186, 155, 128, 79, 169, 254, 251, 131, 232); + RT_INTERFACE!{interface ISystemVideoProperties(ISystemVideoPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISystemVideoProperties] { + fn get_Director(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FrameHeight(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FrameWidth(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Orientation(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TotalBitrate(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISystemVideoProperties { + #[inline] pub unsafe fn get_director(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Director)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_height(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameHeight)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_width(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrameWidth)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_total_bitrate(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TotalBitrate)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SystemVideoProperties: ISystemVideoProperties} + DEFINE_IID!(IID_ISystemProperties, 2440720833, 34291, 19921, 176, 1, 165, 11, 253, 33, 200, 210); + RT_INTERFACE!{static interface ISystemProperties(ISystemPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISystemProperties] { + fn get_Author(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Comment(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ItemNameDisplay(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Keywords(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Rating(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Audio(&mut self, out: *mut *mut SystemAudioProperties) -> HRESULT, + fn get_GPS(&mut self, out: *mut *mut SystemGPSProperties) -> HRESULT, + fn get_Media(&mut self, out: *mut *mut SystemMediaProperties) -> HRESULT, + fn get_Music(&mut self, out: *mut *mut SystemMusicProperties) -> HRESULT, + fn get_Photo(&mut self, out: *mut *mut SystemPhotoProperties) -> HRESULT, + fn get_Video(&mut self, out: *mut *mut SystemVideoProperties) -> HRESULT, + fn get_Image(&mut self, out: *mut *mut SystemImageProperties) -> HRESULT + }} + impl ISystemProperties { + #[inline] pub unsafe fn get_author(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Author)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_comment(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Comment)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_name_display(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemNameDisplay)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_keywords(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Keywords)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rating(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Rating)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_audio(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Audio)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_gps(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GPS)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_media(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Media)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_music(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Music)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_photo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Photo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Video)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_image(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Image)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ISystemProperties [CLSID_SystemProperties]} + DEFINE_CLSID!(CLSID_SystemProperties = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,121,115,116,101,109,80,114,111,112,101,114,116,105,101,115,0]); + DEFINE_IID!(IID_IStorageStreamTransaction, 4135383907, 42301, 19860, 174, 44, 103, 35, 45, 147, 172, 221); + RT_INTERFACE!{interface IStorageStreamTransaction(IStorageStreamTransactionVtbl): IInspectable(IInspectableVtbl) [IID_IStorageStreamTransaction] { + fn get_Stream(&mut self, out: *mut *mut streams::IRandomAccessStream) -> HRESULT, + fn CommitAsync(&mut self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + }} + impl IStorageStreamTransaction { + #[inline] pub unsafe fn get_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Stream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn commit_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CommitAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum ApplicationDataLocality: i32 { + Local (ApplicationDataLocality_Local) = 0, Roaming (ApplicationDataLocality_Roaming) = 1, Temporary (ApplicationDataLocality_Temporary) = 2, LocalCache (ApplicationDataLocality_LocalCache) = 3, + }} + RT_ENUM! { enum ApplicationDataCreateDisposition: i32 { + Always (ApplicationDataCreateDisposition_Always) = 0, Existing (ApplicationDataCreateDisposition_Existing) = 1, + }} + DEFINE_IID!(IID_IApplicationDataStatics, 1444025467, 59459, 17891, 148, 216, 6, 22, 158, 60, 142, 23); + RT_INTERFACE!{static interface IApplicationDataStatics(IApplicationDataStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationDataStatics] { + fn get_Current(&mut self, out: *mut *mut ApplicationData) -> HRESULT + }} + impl IApplicationDataStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ApplicationData: IApplicationData} + RT_ACTIVATABLE!{IApplicationDataStatics [CLSID_ApplicationData]} + RT_ACTIVATABLE!{IApplicationDataStatics2 [CLSID_ApplicationData]} + DEFINE_CLSID!(CLSID_ApplicationData = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,65,112,112,108,105,99,97,116,105,111,110,68,97,116,97,0]); + DEFINE_IID!(IID_IApplicationDataStatics2, 3445645841, 53065, 16548, 164, 124, 199, 240, 219, 186, 129, 7); + RT_INTERFACE!{static interface IApplicationDataStatics2(IApplicationDataStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationDataStatics2] { + #[cfg(feature="windows.system")] fn GetForUserAsync(&mut self, user: *mut super::system::User, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IApplicationDataStatics2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user_async(&mut self, user: &super::system::User) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForUserAsync)(self, user as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationData, 3285872567, 46916, 19269, 176, 184, 34, 58, 9, 56, 208, 220); + RT_INTERFACE!{interface IApplicationData(IApplicationDataVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationData] { + fn get_Version(&mut self, out: *mut u32) -> HRESULT, + fn SetVersionAsync(&mut self, desiredVersion: u32, handler: *mut ApplicationDataSetVersionHandler, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn ClearAllAsync(&mut self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn ClearAsync(&mut self, locality: ApplicationDataLocality, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn get_LocalSettings(&mut self, out: *mut *mut ApplicationDataContainer) -> HRESULT, + fn get_RoamingSettings(&mut self, out: *mut *mut ApplicationDataContainer) -> HRESULT, + fn get_LocalFolder(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn get_RoamingFolder(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn get_TemporaryFolder(&mut self, out: *mut *mut StorageFolder) -> HRESULT, + fn add_DataChanged(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataChanged(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn SignalDataChanged(&mut self) -> HRESULT, + fn get_RoamingStorageQuota(&mut self, out: *mut u64) -> HRESULT + }} + impl IApplicationData { + #[inline] pub unsafe fn get_version(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Version)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_version_async(&mut self, desiredVersion: u32, handler: &ApplicationDataSetVersionHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetVersionAsync)(self, desiredVersion, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_all_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_async(&mut self, locality: ApplicationDataLocality) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearAsync)(self, locality, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_roaming_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RoamingSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_local_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalFolder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_roaming_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RoamingFolder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_temporary_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TemporaryFolder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_data_changed(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DataChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_data_changed(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DataChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn signal_data_changed(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SignalDataChanged)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_roaming_storage_quota(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoamingStorageQuota)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ApplicationDataSetVersionHandler, 2690093542, 52383, 18055, 172, 171, 163, 100, 253, 120, 84, 99); + RT_DELEGATE!{delegate ApplicationDataSetVersionHandler(ApplicationDataSetVersionHandlerVtbl, ApplicationDataSetVersionHandlerImpl) [IID_ApplicationDataSetVersionHandler] { + fn Invoke(&mut self, setVersionRequest: *mut SetVersionRequest) -> HRESULT + }} + impl ApplicationDataSetVersionHandler { + #[inline] pub unsafe fn invoke(&mut self, setVersionRequest: &SetVersionRequest) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, setVersionRequest as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SetVersionRequest: ISetVersionRequest} + RT_CLASS!{class ApplicationDataContainer: IApplicationDataContainer} + DEFINE_IID!(IID_IApplicationData2, 2657471849, 2979, 20018, 190, 41, 176, 45, 230, 96, 118, 56); + RT_INTERFACE!{interface IApplicationData2(IApplicationData2Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationData2] { + fn get_LocalCacheFolder(&mut self, out: *mut *mut StorageFolder) -> HRESULT + }} + impl IApplicationData2 { + #[inline] pub unsafe fn get_local_cache_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LocalCacheFolder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationData3, 3693227252, 10098, 19485, 170, 44, 201, 247, 67, 173, 232, 209); + RT_INTERFACE!{interface IApplicationData3(IApplicationData3Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationData3] { + fn GetPublisherCacheFolder(&mut self, folderName: HSTRING, out: *mut *mut StorageFolder) -> HRESULT, + fn ClearPublisherCacheFolderAsync(&mut self, folderName: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn get_SharedLocalFolder(&mut self, out: *mut *mut StorageFolder) -> HRESULT + }} + impl IApplicationData3 { + #[inline] pub unsafe fn get_publisher_cache_folder(&mut self, folderName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPublisherCacheFolder)(self, folderName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_publisher_cache_folder_async(&mut self, folderName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ClearPublisherCacheFolderAsync)(self, folderName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_shared_local_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SharedLocalFolder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISetVersionRequest, 3116854171, 4182, 20073, 131, 48, 22, 38, 25, 149, 111, 155); + RT_INTERFACE!{interface ISetVersionRequest(ISetVersionRequestVtbl): IInspectable(IInspectableVtbl) [IID_ISetVersionRequest] { + fn get_CurrentVersion(&mut self, out: *mut u32) -> HRESULT, + fn get_DesiredVersion(&mut self, out: *mut u32) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut SetVersionDeferral) -> HRESULT + }} + impl ISetVersionRequest { + #[inline] pub unsafe fn get_current_version(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentVersion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_version(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredVersion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SetVersionDeferral: ISetVersionDeferral} + DEFINE_IID!(IID_ISetVersionDeferral, 53807266, 30746, 17274, 176, 120, 63, 50, 186, 220, 254, 71); + RT_INTERFACE!{interface ISetVersionDeferral(ISetVersionDeferralVtbl): IInspectable(IInspectableVtbl) [IID_ISetVersionDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl ISetVersionDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationDataContainer, 3316579614, 62567, 16570, 133, 102, 171, 100, 10, 68, 30, 29); + RT_INTERFACE!{interface IApplicationDataContainer(IApplicationDataContainerVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationDataContainer] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Locality(&mut self, out: *mut ApplicationDataLocality) -> HRESULT, + fn get_Values(&mut self, out: *mut *mut super::foundation::collections::IPropertySet) -> HRESULT, + fn get_Containers(&mut self, out: *mut *mut super::foundation::collections::IMapView) -> HRESULT, + fn CreateContainer(&mut self, name: HSTRING, disposition: ApplicationDataCreateDisposition, out: *mut *mut ApplicationDataContainer) -> HRESULT, + fn DeleteContainer(&mut self, name: HSTRING) -> HRESULT + }} + impl IApplicationDataContainer { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_locality(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Locality)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_values(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Values)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_containers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Containers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_container(&mut self, name: &HStringArg, disposition: ApplicationDataCreateDisposition) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateContainer)(self, name.get(), disposition, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_container(&mut self, name: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).DeleteContainer)(self, name.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ApplicationDataContainerSettings: super::foundation::collections::IPropertySet} + RT_CLASS!{class ApplicationDataCompositeValue: super::foundation::collections::IPropertySet} +pub mod streams { // Windows.Storage.Streams +use ::prelude::*; + RT_ENUM! { enum ByteOrder: i32 { + LittleEndian (ByteOrder_LittleEndian) = 0, BigEndian (ByteOrder_BigEndian) = 1, + }} + RT_ENUM! { enum UnicodeEncoding: i32 { + Utf8 (UnicodeEncoding_Utf8) = 0, Utf16LE (UnicodeEncoding_Utf16LE) = 1, Utf16BE (UnicodeEncoding_Utf16BE) = 2, + }} + RT_CLASS!{class DataReaderLoadOperation: super::super::foundation::IAsyncOperation} + DEFINE_IID!(IID_IDataReader, 3803512873, 46273, 17172, 164, 184, 251, 129, 58, 47, 39, 94); + RT_INTERFACE!{interface IDataReader(IDataReaderVtbl): IInspectable(IInspectableVtbl) [IID_IDataReader] { + fn get_UnconsumedBufferLength(&mut self, out: *mut u32) -> HRESULT, + fn get_UnicodeEncoding(&mut self, out: *mut UnicodeEncoding) -> HRESULT, + fn put_UnicodeEncoding(&mut self, value: UnicodeEncoding) -> HRESULT, + fn get_ByteOrder(&mut self, out: *mut ByteOrder) -> HRESULT, + fn put_ByteOrder(&mut self, value: ByteOrder) -> HRESULT, + fn get_InputStreamOptions(&mut self, out: *mut InputStreamOptions) -> HRESULT, + fn put_InputStreamOptions(&mut self, value: InputStreamOptions) -> HRESULT, + fn ReadByte(&mut self, out: *mut u8) -> HRESULT, + fn ReadBytes(&mut self, valueSize: u32, value: *mut u8) -> HRESULT, + fn ReadBuffer(&mut self, length: u32, out: *mut *mut IBuffer) -> HRESULT, + fn ReadBoolean(&mut self, out: *mut bool) -> HRESULT, + fn ReadGuid(&mut self, out: *mut Guid) -> HRESULT, + fn ReadInt16(&mut self, out: *mut i16) -> HRESULT, + fn ReadInt32(&mut self, out: *mut i32) -> HRESULT, + fn ReadInt64(&mut self, out: *mut i64) -> HRESULT, + fn ReadUInt16(&mut self, out: *mut u16) -> HRESULT, + fn ReadUInt32(&mut self, out: *mut u32) -> HRESULT, + fn ReadUInt64(&mut self, out: *mut u64) -> HRESULT, + fn ReadSingle(&mut self, out: *mut f32) -> HRESULT, + fn ReadDouble(&mut self, out: *mut f64) -> HRESULT, + fn ReadString(&mut self, codeUnitCount: u32, out: *mut HSTRING) -> HRESULT, + fn ReadDateTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn ReadTimeSpan(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn LoadAsync(&mut self, count: u32, out: *mut *mut DataReaderLoadOperation) -> HRESULT, + fn DetachBuffer(&mut self, out: *mut *mut IBuffer) -> HRESULT, + fn DetachStream(&mut self, out: *mut *mut IInputStream) -> HRESULT + }} + impl IDataReader { + #[inline] pub unsafe fn get_unconsumed_buffer_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UnconsumedBufferLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_unicode_encoding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UnicodeEncoding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_unicode_encoding(&mut self, value: UnicodeEncoding) -> Result<()> { + let hr = ((*self.lpVtbl).put_UnicodeEncoding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_byte_order(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ByteOrder)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_byte_order(&mut self, value: ByteOrder) -> Result<()> { + let hr = ((*self.lpVtbl).put_ByteOrder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_stream_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InputStreamOptions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_input_stream_options(&mut self, value: InputStreamOptions) -> Result<()> { + let hr = ((*self.lpVtbl).put_InputStreamOptions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn read_byte(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadByte)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_bytes(&mut self, valueSize: u32, value: *mut u8) -> Result<()> { + let hr = ((*self.lpVtbl).ReadBytes)(self, valueSize, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn read_buffer(&mut self, length: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadBuffer)(self, length, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_boolean(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadBoolean)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_guid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadGuid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_int16(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadInt16)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_int32(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadInt32)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_int64(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadInt64)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_uint16(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadUInt16)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_uint32(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadUInt32)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_uint64(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadUInt64)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_single(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadSingle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_double(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadDouble)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_string(&mut self, codeUnitCount: u32) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadString)(self, codeUnitCount, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn read_date_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadDateTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn read_time_span(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ReadTimeSpan)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn load_async(&mut self, count: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadAsync)(self, count, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn detach_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DetachBuffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn detach_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DetachStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataReaderFactory, 3612506183, 22490, 19989, 145, 76, 6, 128, 102, 153, 160, 152); + RT_INTERFACE!{static interface IDataReaderFactory(IDataReaderFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDataReaderFactory] { + fn CreateDataReader(&mut self, inputStream: *mut IInputStream, out: *mut *mut DataReader) -> HRESULT + }} + impl IDataReaderFactory { + #[inline] pub unsafe fn create_data_reader(&mut self, inputStream: &IInputStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDataReader)(self, inputStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DataReader: IDataReader [IDataReaderFactory] [CLSID_DataReader]} + RT_ACTIVATABLE!{IDataReaderStatics [CLSID_DataReader]} + DEFINE_CLSID!(CLSID_DataReader = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,116,114,101,97,109,115,46,68,97,116,97,82,101,97,100,101,114,0]); + DEFINE_IID!(IID_IDataReaderStatics, 301776840, 63802, 18203, 177, 33, 243, 121, 227, 73, 49, 60); + RT_INTERFACE!{static interface IDataReaderStatics(IDataReaderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDataReaderStatics] { + fn FromBuffer(&mut self, buffer: *mut IBuffer, out: *mut *mut DataReader) -> HRESULT + }} + impl IDataReaderStatics { + #[inline] pub unsafe fn from_buffer(&mut self, buffer: &IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FromBuffer)(self, buffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DataWriterStoreOperation: super::super::foundation::IAsyncOperation} + DEFINE_IID!(IID_IDataWriter, 1689817701, 54081, 18722, 179, 138, 221, 74, 248, 128, 140, 78); + RT_INTERFACE!{interface IDataWriter(IDataWriterVtbl): IInspectable(IInspectableVtbl) [IID_IDataWriter] { + fn get_UnstoredBufferLength(&mut self, out: *mut u32) -> HRESULT, + fn get_UnicodeEncoding(&mut self, out: *mut UnicodeEncoding) -> HRESULT, + fn put_UnicodeEncoding(&mut self, value: UnicodeEncoding) -> HRESULT, + fn get_ByteOrder(&mut self, out: *mut ByteOrder) -> HRESULT, + fn put_ByteOrder(&mut self, value: ByteOrder) -> HRESULT, + fn WriteByte(&mut self, value: u8) -> HRESULT, + fn WriteBytes(&mut self, valueSize: u32, value: *mut u8) -> HRESULT, + fn WriteBuffer(&mut self, buffer: *mut IBuffer) -> HRESULT, + fn WriteBufferRange(&mut self, buffer: *mut IBuffer, start: u32, count: u32) -> HRESULT, + fn WriteBoolean(&mut self, value: bool) -> HRESULT, + fn WriteGuid(&mut self, value: Guid) -> HRESULT, + fn WriteInt16(&mut self, value: i16) -> HRESULT, + fn WriteInt32(&mut self, value: i32) -> HRESULT, + fn WriteInt64(&mut self, value: i64) -> HRESULT, + fn WriteUInt16(&mut self, value: u16) -> HRESULT, + fn WriteUInt32(&mut self, value: u32) -> HRESULT, + fn WriteUInt64(&mut self, value: u64) -> HRESULT, + fn WriteSingle(&mut self, value: f32) -> HRESULT, + fn WriteDouble(&mut self, value: f64) -> HRESULT, + fn WriteDateTime(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn WriteTimeSpan(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn WriteString(&mut self, value: HSTRING, out: *mut u32) -> HRESULT, + fn MeasureString(&mut self, value: HSTRING, out: *mut u32) -> HRESULT, + fn StoreAsync(&mut self, out: *mut *mut DataWriterStoreOperation) -> HRESULT, + fn FlushAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DetachBuffer(&mut self, out: *mut *mut IBuffer) -> HRESULT, + fn DetachStream(&mut self, out: *mut *mut IOutputStream) -> HRESULT + }} + impl IDataWriter { + #[inline] pub unsafe fn get_unstored_buffer_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UnstoredBufferLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_unicode_encoding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UnicodeEncoding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_unicode_encoding(&mut self, value: UnicodeEncoding) -> Result<()> { + let hr = ((*self.lpVtbl).put_UnicodeEncoding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_byte_order(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ByteOrder)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_byte_order(&mut self, value: ByteOrder) -> Result<()> { + let hr = ((*self.lpVtbl).put_ByteOrder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_byte(&mut self, value: u8) -> Result<()> { + let hr = ((*self.lpVtbl).WriteByte)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_bytes(&mut self, value: &[u8]) -> Result<()> { + let hr = ((*self.lpVtbl).WriteBytes)(self, value.len() as u32, value.as_ptr() as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_buffer(&mut self, buffer: &IBuffer) -> Result<()> { + let hr = ((*self.lpVtbl).WriteBuffer)(self, buffer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_buffer_range(&mut self, buffer: &IBuffer, start: u32, count: u32) -> Result<()> { + let hr = ((*self.lpVtbl).WriteBufferRange)(self, buffer as *const _ as *mut _, start, count); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_boolean(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).WriteBoolean)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_guid(&mut self, value: Guid) -> Result<()> { + let hr = ((*self.lpVtbl).WriteGuid)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_int16(&mut self, value: i16) -> Result<()> { + let hr = ((*self.lpVtbl).WriteInt16)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_int32(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).WriteInt32)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_int64(&mut self, value: i64) -> Result<()> { + let hr = ((*self.lpVtbl).WriteInt64)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_uint16(&mut self, value: u16) -> Result<()> { + let hr = ((*self.lpVtbl).WriteUInt16)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_uint32(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).WriteUInt32)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_uint64(&mut self, value: u64) -> Result<()> { + let hr = ((*self.lpVtbl).WriteUInt64)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_single(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).WriteSingle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_double(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).WriteDouble)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_date_time(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).WriteDateTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_time_span(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).WriteTimeSpan)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn write_string(&mut self, value: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).WriteString)(self, value.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn measure_string(&mut self, value: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).MeasureString)(self, value.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn store_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StoreAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn flush_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FlushAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn detach_buffer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DetachBuffer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn detach_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DetachStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataWriterFactory, 864839618, 35716, 19499, 156, 80, 123, 135, 103, 132, 122, 31); + RT_INTERFACE!{static interface IDataWriterFactory(IDataWriterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDataWriterFactory] { + fn CreateDataWriter(&mut self, outputStream: *mut IOutputStream, out: *mut *mut DataWriter) -> HRESULT + }} + impl IDataWriterFactory { + #[inline] pub unsafe fn create_data_writer(&mut self, outputStream: &IOutputStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDataWriter)(self, outputStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class DataWriter: IDataWriter [IDataWriterFactory] [CLSID_DataWriter]} + DEFINE_CLSID!(CLSID_DataWriter = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,116,114,101,97,109,115,46,68,97,116,97,87,114,105,116,101,114,0]); + DEFINE_IID!(IID_IRandomAccessStreamReference, 871248180, 7638, 20026, 128, 103, 209, 193, 98, 232, 100, 43); + RT_INTERFACE!{interface IRandomAccessStreamReference(IRandomAccessStreamReferenceVtbl): IInspectable(IInspectableVtbl) [IID_IRandomAccessStreamReference] { + fn OpenReadAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IRandomAccessStreamReference { + #[inline] pub unsafe fn open_read_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenReadAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRandomAccessStreamStatics, 1380773327, 28201, 19685, 149, 115, 107, 117, 61, 182, 108, 58); + RT_INTERFACE!{static interface IRandomAccessStreamStatics(IRandomAccessStreamStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRandomAccessStreamStatics] { + fn CopyAsync(&mut self, source: *mut IInputStream, destination: *mut IOutputStream, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn CopySizeAsync(&mut self, source: *mut IInputStream, destination: *mut IOutputStream, bytesToCopy: u64, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn CopyAndCloseAsync(&mut self, source: *mut IInputStream, destination: *mut IOutputStream, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IRandomAccessStreamStatics { + #[inline] pub unsafe fn copy_async(&mut self, source: &IInputStream, destination: &IOutputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyAsync)(self, source as *const _ as *mut _, destination as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn copy_size_async(&mut self, source: &IInputStream, destination: &IOutputStream, bytesToCopy: u64) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopySizeAsync)(self, source as *const _ as *mut _, destination as *const _ as *mut _, bytesToCopy, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn copy_and_close_async(&mut self, source: &IInputStream, destination: &IOutputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyAndCloseAsync)(self, source as *const _ as *mut _, destination as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IRandomAccessStreamStatics [CLSID_RandomAccessStream]} + DEFINE_CLSID!(CLSID_RandomAccessStream = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,116,114,101,97,109,115,46,82,97,110,100,111,109,65,99,99,101,115,115,83,116,114,101,97,109,0]); + DEFINE_IID!(IID_IBufferFactory, 1907331405, 49423, 18507, 188, 80, 20, 188, 98, 59, 58, 39); + RT_INTERFACE!{static interface IBufferFactory(IBufferFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBufferFactory] { + fn Create(&mut self, capacity: u32, out: *mut *mut Buffer) -> HRESULT + }} + impl IBufferFactory { + #[inline] pub unsafe fn create(&mut self, capacity: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, capacity, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Buffer: IBuffer [IBufferFactory] [CLSID_Buffer]} + RT_ACTIVATABLE!{IBufferStatics [CLSID_Buffer]} + DEFINE_CLSID!(CLSID_Buffer = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,116,114,101,97,109,115,46,66,117,102,102,101,114,0]); + DEFINE_IID!(IID_IBuffer, 2421821408, 48211, 4575, 140, 73, 0, 30, 79, 198, 134, 218); + RT_INTERFACE!{interface IBuffer(IBufferVtbl): IInspectable(IInspectableVtbl) [IID_IBuffer] { + fn get_Capacity(&mut self, out: *mut u32) -> HRESULT, + fn get_Length(&mut self, out: *mut u32) -> HRESULT, + fn put_Length(&mut self, value: u32) -> HRESULT + }} + impl IBuffer { + #[inline] pub unsafe fn get_capacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Capacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_length(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Length)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBufferStatics, 3909215835, 55062, 18266, 169, 10, 175, 114, 41, 177, 231, 65); + RT_INTERFACE!{static interface IBufferStatics(IBufferStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBufferStatics] { + fn CreateCopyFromMemoryBuffer(&mut self, input: *mut super::super::foundation::IMemoryBuffer, out: *mut *mut Buffer) -> HRESULT, + fn CreateMemoryBufferOverIBuffer(&mut self, input: *mut IBuffer, out: *mut *mut super::super::foundation::MemoryBuffer) -> HRESULT + }} + impl IBufferStatics { + #[inline] pub unsafe fn create_copy_from_memory_buffer(&mut self, input: &super::super::foundation::IMemoryBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCopyFromMemoryBuffer)(self, input as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_memory_buffer_over_ibuffer(&mut self, input: &IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMemoryBufferOverIBuffer)(self, input as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum InputStreamOptions: u32 { + None (InputStreamOptions_None) = 0, Partial (InputStreamOptions_Partial) = 1, ReadAhead (InputStreamOptions_ReadAhead) = 2, + }} + DEFINE_IID!(IID_IContentTypeProvider, 2547030181, 15257, 19945, 136, 165, 225, 29, 47, 80, 199, 149); + RT_INTERFACE!{interface IContentTypeProvider(IContentTypeProviderVtbl): IInspectable(IInspectableVtbl) [IID_IContentTypeProvider] { + fn get_ContentType(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IContentTypeProvider { + #[inline] pub unsafe fn get_content_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInputStreamReference, 1133681944, 24265, 19290, 145, 156, 66, 5, 176, 200, 4, 182); + RT_INTERFACE!{interface IInputStreamReference(IInputStreamReferenceVtbl): IInspectable(IInspectableVtbl) [IID_IInputStreamReference] { + fn OpenSequentialReadAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IInputStreamReference { + #[inline] pub unsafe fn open_sequential_read_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OpenSequentialReadAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRandomAccessStreamReferenceStatics, 2238908892, 16319, 20093, 152, 111, 239, 59, 26, 7, 169, 100); + RT_INTERFACE!{static interface IRandomAccessStreamReferenceStatics(IRandomAccessStreamReferenceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRandomAccessStreamReferenceStatics] { + fn CreateFromFile(&mut self, file: *mut super::IStorageFile, out: *mut *mut RandomAccessStreamReference) -> HRESULT, + fn CreateFromUri(&mut self, uri: *mut super::super::foundation::Uri, out: *mut *mut RandomAccessStreamReference) -> HRESULT, + fn CreateFromStream(&mut self, stream: *mut IRandomAccessStream, out: *mut *mut RandomAccessStreamReference) -> HRESULT + }} + impl IRandomAccessStreamReferenceStatics { + #[inline] pub unsafe fn create_from_file(&mut self, file: &super::IStorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromFile)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_uri(&mut self, uri: &super::super::foundation::Uri) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromUri)(self, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_stream(&mut self, stream: &IRandomAccessStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromStream)(self, stream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RandomAccessStreamReference: IRandomAccessStreamReference} + RT_ACTIVATABLE!{IRandomAccessStreamReferenceStatics [CLSID_RandomAccessStreamReference]} + DEFINE_CLSID!(CLSID_RandomAccessStreamReference = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,116,114,101,97,109,115,46,82,97,110,100,111,109,65,99,99,101,115,115,83,116,114,101,97,109,82,101,102,101,114,101,110,99,101,0]); + RT_CLASS!{class FileRandomAccessStream: IRandomAccessStream} + RT_CLASS!{class FileInputStream: IInputStream} + RT_CLASS!{class FileOutputStream: IOutputStream} + RT_CLASS!{class RandomAccessStreamOverStream: IRandomAccessStream} + RT_CLASS!{class InputStreamOverStream: IInputStream} + RT_CLASS!{class OutputStreamOverStream: IOutputStream} + RT_CLASS!{class InMemoryRandomAccessStream: IRandomAccessStream} + DEFINE_IID!(IID_IInputStream, 2421821410, 48211, 4575, 140, 73, 0, 30, 79, 198, 134, 218); + RT_INTERFACE!{interface IInputStream(IInputStreamVtbl): IInspectable(IInspectableVtbl) [IID_IInputStream] { + fn ReadAsync(&mut self, buffer: *mut IBuffer, count: u32, options: InputStreamOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + }} + impl IInputStream { + #[inline] pub unsafe fn read_async(&mut self, buffer: &IBuffer, count: u32, options: InputStreamOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadAsync)(self, buffer as *const _ as *mut _, count, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IOutputStream, 2421821414, 48211, 4575, 140, 73, 0, 30, 79, 198, 134, 218); + RT_INTERFACE!{interface IOutputStream(IOutputStreamVtbl): IInspectable(IInspectableVtbl) [IID_IOutputStream] { + fn WriteAsync(&mut self, buffer: *mut IBuffer, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn FlushAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IOutputStream { + #[inline] pub unsafe fn write_async(&mut self, buffer: &IBuffer) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).WriteAsync)(self, buffer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn flush_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FlushAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRandomAccessStream, 2421821409, 48211, 4575, 140, 73, 0, 30, 79, 198, 134, 218); + RT_INTERFACE!{interface IRandomAccessStream(IRandomAccessStreamVtbl): IInspectable(IInspectableVtbl) [IID_IRandomAccessStream] { + fn get_Size(&mut self, out: *mut u64) -> HRESULT, + fn put_Size(&mut self, value: u64) -> HRESULT, + fn GetInputStreamAt(&mut self, position: u64, out: *mut *mut IInputStream) -> HRESULT, + fn GetOutputStreamAt(&mut self, position: u64, out: *mut *mut IOutputStream) -> HRESULT, + fn get_Position(&mut self, out: *mut u64) -> HRESULT, + fn Seek(&mut self, position: u64) -> HRESULT, + fn CloneStream(&mut self, out: *mut *mut IRandomAccessStream) -> HRESULT, + fn get_CanRead(&mut self, out: *mut bool) -> HRESULT, + fn get_CanWrite(&mut self, out: *mut bool) -> HRESULT + }} + impl IRandomAccessStream { + #[inline] pub unsafe fn get_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_size(&mut self, value: u64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Size)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_stream_at(&mut self, position: u64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetInputStreamAt)(self, position, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_output_stream_at(&mut self, position: u64) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetOutputStreamAt)(self, position, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn seek(&mut self, position: u64) -> Result<()> { + let hr = ((*self.lpVtbl).Seek)(self, position); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clone_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CloneStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_read(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanRead)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_write(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanWrite)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRandomAccessStreamWithContentType, 3424995367, 19261, 17295, 146, 50, 16, 199, 107, 199, 224, 56); + RT_INTERFACE!{interface IRandomAccessStreamWithContentType(IRandomAccessStreamWithContentTypeVtbl): IInspectable(IInspectableVtbl) [IID_IRandomAccessStreamWithContentType] { + + }} +} // Windows.Storage.Streams +pub mod search { // Windows.Storage.Search +use ::prelude::*; + DEFINE_IID!(IID_IContentIndexerStatics, 2353562485, 45950, 19552, 155, 168, 183, 96, 253, 163, 229, 157); + RT_INTERFACE!{static interface IContentIndexerStatics(IContentIndexerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IContentIndexerStatics] { + fn GetIndexerWithName(&mut self, indexName: HSTRING, out: *mut *mut ContentIndexer) -> HRESULT, + fn GetIndexer(&mut self, out: *mut *mut ContentIndexer) -> HRESULT + }} + impl IContentIndexerStatics { + #[inline] pub unsafe fn get_indexer_with_name(&mut self, indexName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIndexerWithName)(self, indexName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_indexer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIndexer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ContentIndexer: IContentIndexer} + RT_ACTIVATABLE!{IContentIndexerStatics [CLSID_ContentIndexer]} + DEFINE_CLSID!(CLSID_ContentIndexer = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,101,97,114,99,104,46,67,111,110,116,101,110,116,73,110,100,101,120,101,114,0]); + DEFINE_IID!(IID_IIndexableContent, 3438387295, 54453, 18490, 176, 110, 224, 219, 30, 196, 32, 228); + RT_INTERFACE!{interface IIndexableContent(IIndexableContentVtbl): IInspectable(IInspectableVtbl) [IID_IIndexableContent] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Id(&mut self, value: HSTRING) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_Stream(&mut self, out: *mut *mut super::streams::IRandomAccessStream) -> HRESULT, + fn put_Stream(&mut self, value: *mut super::streams::IRandomAccessStream) -> HRESULT, + fn get_StreamContentType(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_StreamContentType(&mut self, value: HSTRING) -> HRESULT + }} + impl IIndexableContent { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Id)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Stream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_stream(&mut self, value: &super::streams::IRandomAccessStream) -> Result<()> { + let hr = ((*self.lpVtbl).put_Stream)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stream_content_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StreamContentType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_stream_content_type(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_StreamContentType)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentIndexer, 2977333133, 63128, 18818, 176, 95, 58, 110, 140, 171, 1, 162); + RT_INTERFACE!{interface IContentIndexer(IContentIndexerVtbl): IInspectable(IInspectableVtbl) [IID_IContentIndexer] { + fn AddAsync(&mut self, indexableContent: *mut IIndexableContent, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn UpdateAsync(&mut self, indexableContent: *mut IIndexableContent, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteAsync(&mut self, contentId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteMultipleAsync(&mut self, contentIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteAllAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RetrievePropertiesAsync(&mut self, contentId: HSTRING, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn get_Revision(&mut self, out: *mut u64) -> HRESULT + }} + impl IContentIndexer { + #[inline] pub unsafe fn add_async(&mut self, indexableContent: &IIndexableContent) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddAsync)(self, indexableContent as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_async(&mut self, indexableContent: &IIndexableContent) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateAsync)(self, indexableContent as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_async(&mut self, contentId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAsync)(self, contentId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_multiple_async(&mut self, contentIds: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteMultipleAsync)(self, contentIds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn delete_all_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DeleteAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn retrieve_properties_async(&mut self, contentId: &HStringArg, propertiesToRetrieve: &super::super::foundation::collections::IIterable) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RetrievePropertiesAsync)(self, contentId.get(), propertiesToRetrieve as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_revision(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Revision)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IValueAndLanguage, 3113306241, 41454, 19396, 146, 165, 70, 105, 104, 227, 4, 54); + RT_INTERFACE!{interface IValueAndLanguage(IValueAndLanguageVtbl): IInspectable(IInspectableVtbl) [IID_IValueAndLanguage] { + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Language(&mut self, value: HSTRING) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Value(&mut self, value: *mut IInspectable) -> HRESULT + }} + impl IValueAndLanguage { + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_language(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Language)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ValueAndLanguage: IValueAndLanguage} + DEFINE_IID!(IID_IContentIndexerQueryOperations, 679624208, 18310, 17137, 151, 48, 121, 43, 53, 102, 177, 80); + RT_INTERFACE!{interface IContentIndexerQueryOperations(IContentIndexerQueryOperationsVtbl): IInspectable(IInspectableVtbl) [IID_IContentIndexerQueryOperations] { + fn CreateQueryWithSortOrderAndLanguage(&mut self, searchFilter: HSTRING, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable, sortOrder: *mut super::super::foundation::collections::IIterable, searchFilterLanguage: HSTRING, out: *mut *mut ContentIndexerQuery) -> HRESULT, + fn CreateQueryWithSortOrder(&mut self, searchFilter: HSTRING, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable, sortOrder: *mut super::super::foundation::collections::IIterable, out: *mut *mut ContentIndexerQuery) -> HRESULT, + fn CreateQuery(&mut self, searchFilter: HSTRING, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable, out: *mut *mut ContentIndexerQuery) -> HRESULT + }} + impl IContentIndexerQueryOperations { + #[inline] pub unsafe fn create_query_with_sort_order_and_language(&mut self, searchFilter: &HStringArg, propertiesToRetrieve: &super::super::foundation::collections::IIterable, sortOrder: &super::super::foundation::collections::IIterable, searchFilterLanguage: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateQueryWithSortOrderAndLanguage)(self, searchFilter.get(), propertiesToRetrieve as *const _ as *mut _, sortOrder as *const _ as *mut _, searchFilterLanguage.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_query_with_sort_order(&mut self, searchFilter: &HStringArg, propertiesToRetrieve: &super::super::foundation::collections::IIterable, sortOrder: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateQueryWithSortOrder)(self, searchFilter.get(), propertiesToRetrieve as *const _ as *mut _, sortOrder as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_query(&mut self, searchFilter: &HStringArg, propertiesToRetrieve: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateQuery)(self, searchFilter.get(), propertiesToRetrieve as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ContentIndexerQuery: IContentIndexerQuery} + DEFINE_IID!(IID_IContentIndexerQuery, 1893970168, 19452, 17034, 136, 137, 204, 81, 218, 154, 123, 157); + RT_INTERFACE!{interface IContentIndexerQuery(IContentIndexerQueryVtbl): IInspectable(IInspectableVtbl) [IID_IContentIndexerQuery] { + fn GetCountAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetPropertiesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>>) -> HRESULT, + fn GetPropertiesRangeAsync(&mut self, startIndex: u32, maxItems: u32, out: *mut *mut super::super::foundation::IAsyncOperation>>) -> HRESULT, + fn GetAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetRangeAsync(&mut self, startIndex: u32, maxItems: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn get_QueryFolder(&mut self, out: *mut *mut super::StorageFolder) -> HRESULT + }} + impl IContentIndexerQuery { + #[inline] pub unsafe fn get_count_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCountAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties_async(&mut self) -> Result>>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPropertiesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties_range_async(&mut self, startIndex: u32, maxItems: u32) -> Result>>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPropertiesRangeAsync)(self, startIndex, maxItems, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_range_async(&mut self, startIndex: u32, maxItems: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRangeAsync)(self, startIndex, maxItems, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_query_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_QueryFolder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class IndexableContent: IIndexableContent} + RT_STRUCT! { struct SortEntry { + PropertyName: HSTRING, AscendingOrder: bool, + }} + RT_ENUM! { enum DateStackOption: i32 { + None (DateStackOption_None) = 0, Year (DateStackOption_Year) = 1, Month (DateStackOption_Month) = 2, + }} + RT_ENUM! { enum IndexerOption: i32 { + UseIndexerWhenAvailable (IndexerOption_UseIndexerWhenAvailable) = 0, OnlyUseIndexer (IndexerOption_OnlyUseIndexer) = 1, DoNotUseIndexer (IndexerOption_DoNotUseIndexer) = 2, + }} + RT_ENUM! { enum FolderDepth: i32 { + Shallow (FolderDepth_Shallow) = 0, Deep (FolderDepth_Deep) = 1, + }} + RT_ENUM! { enum CommonFileQuery: i32 { + DefaultQuery (CommonFileQuery_DefaultQuery) = 0, OrderByName (CommonFileQuery_OrderByName) = 1, OrderByTitle (CommonFileQuery_OrderByTitle) = 2, OrderByMusicProperties (CommonFileQuery_OrderByMusicProperties) = 3, OrderBySearchRank (CommonFileQuery_OrderBySearchRank) = 4, OrderByDate (CommonFileQuery_OrderByDate) = 5, + }} + RT_ENUM! { enum CommonFolderQuery: i32 { + DefaultQuery (CommonFolderQuery_DefaultQuery) = 0, GroupByYear (CommonFolderQuery_GroupByYear) = 100, GroupByMonth (CommonFolderQuery_GroupByMonth) = 101, GroupByArtist (CommonFolderQuery_GroupByArtist) = 102, GroupByAlbum (CommonFolderQuery_GroupByAlbum) = 103, GroupByAlbumArtist (CommonFolderQuery_GroupByAlbumArtist) = 104, GroupByComposer (CommonFolderQuery_GroupByComposer) = 105, GroupByGenre (CommonFolderQuery_GroupByGenre) = 106, GroupByPublishedYear (CommonFolderQuery_GroupByPublishedYear) = 107, GroupByRating (CommonFolderQuery_GroupByRating) = 108, GroupByTag (CommonFolderQuery_GroupByTag) = 109, GroupByAuthor (CommonFolderQuery_GroupByAuthor) = 110, GroupByType (CommonFolderQuery_GroupByType) = 111, + }} + RT_ENUM! { enum IndexedState: i32 { + Unknown (IndexedState_Unknown) = 0, NotIndexed (IndexedState_NotIndexed) = 1, PartiallyIndexed (IndexedState_PartiallyIndexed) = 2, FullyIndexed (IndexedState_FullyIndexed) = 3, + }} + DEFINE_IID!(IID_IQueryOptions, 509495022, 3909, 18488, 168, 233, 208, 71, 157, 68, 108, 48); + RT_INTERFACE!{interface IQueryOptions(IQueryOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IQueryOptions] { + fn get_FileTypeFilter(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_FolderDepth(&mut self, out: *mut FolderDepth) -> HRESULT, + fn put_FolderDepth(&mut self, value: FolderDepth) -> HRESULT, + fn get_ApplicationSearchFilter(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ApplicationSearchFilter(&mut self, value: HSTRING) -> HRESULT, + fn get_UserSearchFilter(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_UserSearchFilter(&mut self, value: HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Language(&mut self, value: HSTRING) -> HRESULT, + fn get_IndexerOption(&mut self, out: *mut IndexerOption) -> HRESULT, + fn put_IndexerOption(&mut self, value: IndexerOption) -> HRESULT, + fn get_SortOrder(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_GroupPropertyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DateStackOption(&mut self, out: *mut DateStackOption) -> HRESULT, + fn SaveToString(&mut self, out: *mut HSTRING) -> HRESULT, + fn LoadFromString(&mut self, value: HSTRING) -> HRESULT, + fn SetThumbnailPrefetch(&mut self, mode: super::fileproperties::ThumbnailMode, requestedSize: u32, options: super::fileproperties::ThumbnailOptions) -> HRESULT, + fn SetPropertyPrefetch(&mut self, options: super::fileproperties::PropertyPrefetchOptions, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable) -> HRESULT + }} + impl IQueryOptions { + #[inline] pub unsafe fn get_file_type_filter(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FileTypeFilter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folder_depth(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FolderDepth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_folder_depth(&mut self, value: FolderDepth) -> Result<()> { + let hr = ((*self.lpVtbl).put_FolderDepth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_application_search_filter(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ApplicationSearchFilter)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_application_search_filter(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ApplicationSearchFilter)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_search_filter(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserSearchFilter)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_user_search_filter(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_UserSearchFilter)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_language(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Language)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_indexer_option(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IndexerOption)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_indexer_option(&mut self, value: IndexerOption) -> Result<()> { + let hr = ((*self.lpVtbl).put_IndexerOption)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_sort_order(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SortOrder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_group_property_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GroupPropertyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_date_stack_option(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DateStackOption)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn save_to_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveToString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn load_from_string(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).LoadFromString)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_thumbnail_prefetch(&mut self, mode: super::fileproperties::ThumbnailMode, requestedSize: u32, options: super::fileproperties::ThumbnailOptions) -> Result<()> { + let hr = ((*self.lpVtbl).SetThumbnailPrefetch)(self, mode, requestedSize, options); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_property_prefetch(&mut self, options: super::fileproperties::PropertyPrefetchOptions, propertiesToRetrieve: &super::super::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).SetPropertyPrefetch)(self, options, propertiesToRetrieve as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IQueryOptionsWithProviderFilter, 1537019942, 5572, 17629, 184, 154, 71, 165, 155, 125, 124, 79); + RT_INTERFACE!{interface IQueryOptionsWithProviderFilter(IQueryOptionsWithProviderFilterVtbl): IInspectable(IInspectableVtbl) [IID_IQueryOptionsWithProviderFilter] { + fn get_StorageProviderIdFilter(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IQueryOptionsWithProviderFilter { + #[inline] pub unsafe fn get_storage_provider_id_filter(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StorageProviderIdFilter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IQueryOptionsFactory, 53354380, 43457, 20081, 128, 17, 13, 238, 157, 72, 17, 163); + RT_INTERFACE!{static interface IQueryOptionsFactory(IQueryOptionsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IQueryOptionsFactory] { + fn CreateCommonFileQuery(&mut self, query: CommonFileQuery, fileTypeFilter: *mut super::super::foundation::collections::IIterable, out: *mut *mut QueryOptions) -> HRESULT, + fn CreateCommonFolderQuery(&mut self, query: CommonFolderQuery, out: *mut *mut QueryOptions) -> HRESULT + }} + impl IQueryOptionsFactory { + #[inline] pub unsafe fn create_common_file_query(&mut self, query: CommonFileQuery, fileTypeFilter: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCommonFileQuery)(self, query, fileTypeFilter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_common_folder_query(&mut self, query: CommonFolderQuery) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCommonFolderQuery)(self, query, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class QueryOptions: IQueryOptions [IQueryOptionsFactory] [CLSID_QueryOptions]} + DEFINE_CLSID!(CLSID_QueryOptions = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,101,97,114,99,104,46,81,117,101,114,121,79,112,116,105,111,110,115,0]); + DEFINE_IID!(IID_IStorageQueryResultBase, 3264730893, 29523, 18347, 186, 88, 140, 97, 66, 93, 197, 75); + RT_INTERFACE!{interface IStorageQueryResultBase(IStorageQueryResultBaseVtbl): IInspectable(IInspectableVtbl) [IID_IStorageQueryResultBase] { + fn GetItemCountAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_Folder(&mut self, out: *mut *mut super::StorageFolder) -> HRESULT, + fn add_ContentsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContentsChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_OptionsChanged(&mut self, changedHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_OptionsChanged(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn FindStartIndexAsync(&mut self, value: *mut IInspectable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetCurrentQueryOptions(&mut self, out: *mut *mut QueryOptions) -> HRESULT, + fn ApplyNewQueryOptions(&mut self, newQueryOptions: *mut QueryOptions) -> HRESULT + }} + impl IStorageQueryResultBase { + #[inline] pub unsafe fn get_item_count_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemCountAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Folder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_contents_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ContentsChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_contents_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContentsChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_options_changed(&mut self, changedHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_OptionsChanged)(self, changedHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_options_changed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_OptionsChanged)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn find_start_index_async(&mut self, value: &IInspectable) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindStartIndexAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_query_options(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentQueryOptions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn apply_new_query_options(&mut self, newQueryOptions: &QueryOptions) -> Result<()> { + let hr = ((*self.lpVtbl).ApplyNewQueryOptions)(self, newQueryOptions as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageFileQueryResult, 1392354375, 11178, 16684, 178, 159, 212, 177, 119, 142, 250, 30); + RT_INTERFACE!{interface IStorageFileQueryResult(IStorageFileQueryResultVtbl): IInspectable(IInspectableVtbl) [IID_IStorageFileQueryResult] { + fn GetFilesAsync(&mut self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFilesAsyncDefaultStartAndCount(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IStorageFileQueryResult { + #[inline] pub unsafe fn get_files_async(&mut self, startIndex: u32, maxNumberOfItems: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFilesAsync)(self, startIndex, maxNumberOfItems, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_files_async_default_start_and_count(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFilesAsyncDefaultStartAndCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageFileQueryResult2, 1314765277, 28993, 18116, 139, 227, 233, 220, 158, 39, 39, 92); + RT_INTERFACE!{interface IStorageFileQueryResult2(IStorageFileQueryResult2Vtbl): IInspectable(IInspectableVtbl) [IID_IStorageFileQueryResult2] { + #[cfg(feature="windows.data")] fn GetMatchingPropertiesWithRanges(&mut self, file: *mut super::StorageFile, out: *mut *mut super::super::foundation::collections::IMap>) -> HRESULT + }} + impl IStorageFileQueryResult2 { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_matching_properties_with_ranges(&mut self, file: &super::StorageFile) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMatchingPropertiesWithRanges)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageFolderQueryResult, 1716832529, 32102, 18170, 174, 207, 228, 164, 186, 169, 58, 184); + RT_INTERFACE!{interface IStorageFolderQueryResult(IStorageFolderQueryResultVtbl): IInspectable(IInspectableVtbl) [IID_IStorageFolderQueryResult] { + fn GetFoldersAsync(&mut self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsyncDefaultStartAndCount(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IStorageFolderQueryResult { + #[inline] pub unsafe fn get_folders_async(&mut self, startIndex: u32, maxNumberOfItems: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFoldersAsync)(self, startIndex, maxNumberOfItems, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folders_async_default_start_and_count(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFoldersAsyncDefaultStartAndCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageItemQueryResult, 3902046329, 40280, 18360, 178, 178, 65, 176, 127, 71, 149, 249); + RT_INTERFACE!{interface IStorageItemQueryResult(IStorageItemQueryResultVtbl): IInspectable(IInspectableVtbl) [IID_IStorageItemQueryResult] { + fn GetItemsAsync(&mut self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetItemsAsyncDefaultStartAndCount(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IStorageItemQueryResult { + #[inline] pub unsafe fn get_items_async(&mut self, startIndex: u32, maxNumberOfItems: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemsAsync)(self, startIndex, maxNumberOfItems, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_items_async_default_start_and_count(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemsAsyncDefaultStartAndCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageFolderQueryOperations, 3410218185, 17515, 19023, 190, 151, 117, 119, 113, 190, 82, 3); + RT_INTERFACE!{interface IStorageFolderQueryOperations(IStorageFolderQueryOperationsVtbl): IInspectable(IInspectableVtbl) [IID_IStorageFolderQueryOperations] { + fn GetIndexedStateAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFileQueryOverloadDefault(&mut self, out: *mut *mut StorageFileQueryResult) -> HRESULT, + fn CreateFileQuery(&mut self, query: CommonFileQuery, out: *mut *mut StorageFileQueryResult) -> HRESULT, + fn CreateFileQueryWithOptions(&mut self, queryOptions: *mut QueryOptions, out: *mut *mut StorageFileQueryResult) -> HRESULT, + fn CreateFolderQueryOverloadDefault(&mut self, out: *mut *mut StorageFolderQueryResult) -> HRESULT, + fn CreateFolderQuery(&mut self, query: CommonFolderQuery, out: *mut *mut StorageFolderQueryResult) -> HRESULT, + fn CreateFolderQueryWithOptions(&mut self, queryOptions: *mut QueryOptions, out: *mut *mut StorageFolderQueryResult) -> HRESULT, + fn CreateItemQuery(&mut self, out: *mut *mut StorageItemQueryResult) -> HRESULT, + fn CreateItemQueryWithOptions(&mut self, queryOptions: *mut QueryOptions, out: *mut *mut StorageItemQueryResult) -> HRESULT, + fn GetFilesAsync(&mut self, query: CommonFileQuery, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFilesAsyncOverloadDefaultStartAndCount(&mut self, query: CommonFileQuery, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsync(&mut self, query: CommonFolderQuery, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsyncOverloadDefaultStartAndCount(&mut self, query: CommonFolderQuery, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetItemsAsync(&mut self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn AreQueryOptionsSupported(&mut self, queryOptions: *mut QueryOptions, out: *mut bool) -> HRESULT, + fn IsCommonFolderQuerySupported(&mut self, query: CommonFolderQuery, out: *mut bool) -> HRESULT, + fn IsCommonFileQuerySupported(&mut self, query: CommonFileQuery, out: *mut bool) -> HRESULT + }} + impl IStorageFolderQueryOperations { + #[inline] pub unsafe fn get_indexed_state_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIndexedStateAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_file_query_overload_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileQueryOverloadDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_file_query(&mut self, query: CommonFileQuery) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileQuery)(self, query, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_file_query_with_options(&mut self, queryOptions: &QueryOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFileQueryWithOptions)(self, queryOptions as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_folder_query_overload_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFolderQueryOverloadDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_folder_query(&mut self, query: CommonFolderQuery) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFolderQuery)(self, query, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_folder_query_with_options(&mut self, queryOptions: &QueryOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFolderQueryWithOptions)(self, queryOptions as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_item_query(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateItemQuery)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_item_query_with_options(&mut self, queryOptions: &QueryOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateItemQueryWithOptions)(self, queryOptions as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_files_async(&mut self, query: CommonFileQuery, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFilesAsync)(self, query, startIndex, maxItemsToRetrieve, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_files_async_overload_default_start_and_count(&mut self, query: CommonFileQuery) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFilesAsyncOverloadDefaultStartAndCount)(self, query, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folders_async(&mut self, query: CommonFolderQuery, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFoldersAsync)(self, query, startIndex, maxItemsToRetrieve, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folders_async_overload_default_start_and_count(&mut self, query: CommonFolderQuery) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFoldersAsyncOverloadDefaultStartAndCount)(self, query, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_items_async(&mut self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemsAsync)(self, startIndex, maxItemsToRetrieve, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn are_query_options_supported(&mut self, queryOptions: &QueryOptions) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).AreQueryOptionsSupported)(self, queryOptions as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_common_folder_query_supported(&mut self, query: CommonFolderQuery) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsCommonFolderQuerySupported)(self, query, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_common_file_query_supported(&mut self, query: CommonFileQuery) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsCommonFileQuerySupported)(self, query, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class StorageFileQueryResult: IStorageFileQueryResult} + RT_CLASS!{class StorageFolderQueryResult: IStorageFolderQueryResult} + RT_CLASS!{class StorageItemQueryResult: IStorageItemQueryResult} + RT_CLASS!{class SortEntryVector: super::super::foundation::collections::IVector} + DEFINE_IID!(IID_IStorageLibraryContentChangedTriggerDetails, 708254071, 43967, 19997, 138, 165, 99, 133, 216, 136, 71, 153); + RT_INTERFACE!{interface IStorageLibraryContentChangedTriggerDetails(IStorageLibraryContentChangedTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibraryContentChangedTriggerDetails] { + fn get_Folder(&mut self, out: *mut *mut super::StorageFolder) -> HRESULT, + fn CreateModifiedSinceQuery(&mut self, lastQueryTime: super::super::foundation::DateTime, out: *mut *mut StorageItemQueryResult) -> HRESULT + }} + impl IStorageLibraryContentChangedTriggerDetails { + #[inline] pub unsafe fn get_folder(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Folder)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_modified_since_query(&mut self, lastQueryTime: super::super::foundation::DateTime) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateModifiedSinceQuery)(self, lastQueryTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StorageLibraryContentChangedTriggerDetails: IStorageLibraryContentChangedTriggerDetails} +} // Windows.Storage.Search +pub mod pickers { // Windows.Storage.Pickers +use ::prelude::*; + RT_ENUM! { enum PickerViewMode: i32 { + List (PickerViewMode_List) = 0, Thumbnail (PickerViewMode_Thumbnail) = 1, + }} + RT_ENUM! { enum PickerLocationId: i32 { + DocumentsLibrary (PickerLocationId_DocumentsLibrary) = 0, ComputerFolder (PickerLocationId_ComputerFolder) = 1, Desktop (PickerLocationId_Desktop) = 2, Downloads (PickerLocationId_Downloads) = 3, HomeGroup (PickerLocationId_HomeGroup) = 4, MusicLibrary (PickerLocationId_MusicLibrary) = 5, PicturesLibrary (PickerLocationId_PicturesLibrary) = 6, VideosLibrary (PickerLocationId_VideosLibrary) = 7, Objects3D (PickerLocationId_Objects3D) = 8, Unspecified (PickerLocationId_Unspecified) = 9, + }} + RT_CLASS!{class FilePickerSelectedFilesArray: super::super::foundation::collections::IVectorView} + RT_CLASS!{class FilePickerFileTypesOrderedMap: super::super::foundation::collections::IMap>} + RT_CLASS!{class FileExtensionVector: super::super::foundation::collections::IVector} + DEFINE_IID!(IID_IFileOpenPicker, 749217674, 4805, 19551, 137, 119, 148, 84, 119, 147, 194, 65); + RT_INTERFACE!{interface IFileOpenPicker(IFileOpenPickerVtbl): IInspectable(IInspectableVtbl) [IID_IFileOpenPicker] { + fn get_ViewMode(&mut self, out: *mut PickerViewMode) -> HRESULT, + fn put_ViewMode(&mut self, value: PickerViewMode) -> HRESULT, + fn get_SettingsIdentifier(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SettingsIdentifier(&mut self, value: HSTRING) -> HRESULT, + fn get_SuggestedStartLocation(&mut self, out: *mut PickerLocationId) -> HRESULT, + fn put_SuggestedStartLocation(&mut self, value: PickerLocationId) -> HRESULT, + fn get_CommitButtonText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CommitButtonText(&mut self, value: HSTRING) -> HRESULT, + fn get_FileTypeFilter(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn PickSingleFileAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PickMultipleFilesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl IFileOpenPicker { + #[inline] pub unsafe fn get_view_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ViewMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_view_mode(&mut self, value: PickerViewMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ViewMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_settings_identifier(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SettingsIdentifier)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_settings_identifier(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SettingsIdentifier)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_suggested_start_location(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SuggestedStartLocation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_suggested_start_location(&mut self, value: PickerLocationId) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuggestedStartLocation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_commit_button_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CommitButtonText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_commit_button_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CommitButtonText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_type_filter(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FileTypeFilter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pick_single_file_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickSingleFileAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pick_multiple_files_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickMultipleFilesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileOpenPicker2, 2364239058, 46150, 18167, 178, 101, 144, 248, 229, 90, 214, 80); + RT_INTERFACE!{interface IFileOpenPicker2(IFileOpenPicker2Vtbl): IInspectable(IInspectableVtbl) [IID_IFileOpenPicker2] { + fn get_ContinuationData(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn PickSingleFileAndContinue(&mut self) -> HRESULT, + fn PickMultipleFilesAndContinue(&mut self) -> HRESULT + }} + impl IFileOpenPicker2 { + #[inline] pub unsafe fn get_continuation_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContinuationData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pick_single_file_and_continue(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).PickSingleFileAndContinue)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn pick_multiple_files_and_continue(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).PickMultipleFilesAndContinue)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileOpenPickerWithOperationId, 1062712681, 9506, 19621, 170, 115, 161, 85, 9, 241, 252, 191); + RT_INTERFACE!{interface IFileOpenPickerWithOperationId(IFileOpenPickerWithOperationIdVtbl): IInspectable(IInspectableVtbl) [IID_IFileOpenPickerWithOperationId] { + fn PickSingleFileAsync(&mut self, pickerOperationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IFileOpenPickerWithOperationId { + #[inline] pub unsafe fn pick_single_file_async(&mut self, pickerOperationId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickSingleFileAsync)(self, pickerOperationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileOpenPickerStatics, 1747015483, 12034, 18483, 150, 212, 171, 191, 173, 114, 182, 123); + RT_INTERFACE!{static interface IFileOpenPickerStatics(IFileOpenPickerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFileOpenPickerStatics] { + fn ResumePickSingleFileAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IFileOpenPickerStatics { + #[inline] pub unsafe fn resume_pick_single_file_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ResumePickSingleFileAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileSavePicker, 847708107, 24959, 19653, 175, 106, 179, 253, 242, 154, 209, 69); + RT_INTERFACE!{interface IFileSavePicker(IFileSavePickerVtbl): IInspectable(IInspectableVtbl) [IID_IFileSavePicker] { + fn get_SettingsIdentifier(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SettingsIdentifier(&mut self, value: HSTRING) -> HRESULT, + fn get_SuggestedStartLocation(&mut self, out: *mut PickerLocationId) -> HRESULT, + fn put_SuggestedStartLocation(&mut self, value: PickerLocationId) -> HRESULT, + fn get_CommitButtonText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CommitButtonText(&mut self, value: HSTRING) -> HRESULT, + fn get_FileTypeChoices(&mut self, out: *mut *mut super::super::foundation::collections::IMap>) -> HRESULT, + fn get_DefaultFileExtension(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DefaultFileExtension(&mut self, value: HSTRING) -> HRESULT, + fn get_SuggestedSaveFile(&mut self, out: *mut *mut super::StorageFile) -> HRESULT, + fn put_SuggestedSaveFile(&mut self, value: *mut super::StorageFile) -> HRESULT, + fn get_SuggestedFileName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SuggestedFileName(&mut self, value: HSTRING) -> HRESULT, + fn PickSaveFileAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IFileSavePicker { + #[inline] pub unsafe fn get_settings_identifier(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SettingsIdentifier)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_settings_identifier(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SettingsIdentifier)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_suggested_start_location(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SuggestedStartLocation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_suggested_start_location(&mut self, value: PickerLocationId) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuggestedStartLocation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_commit_button_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CommitButtonText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_commit_button_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CommitButtonText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_type_choices(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FileTypeChoices)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_file_extension(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DefaultFileExtension)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_file_extension(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultFileExtension)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_suggested_save_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SuggestedSaveFile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_suggested_save_file(&mut self, value: &super::StorageFile) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuggestedSaveFile)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_suggested_file_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SuggestedFileName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_suggested_file_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuggestedFileName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn pick_save_file_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickSaveFileAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileSavePicker2, 247665570, 53835, 17562, 129, 151, 232, 145, 4, 253, 66, 204); + RT_INTERFACE!{interface IFileSavePicker2(IFileSavePicker2Vtbl): IInspectable(IInspectableVtbl) [IID_IFileSavePicker2] { + fn get_ContinuationData(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn PickSaveFileAndContinue(&mut self) -> HRESULT + }} + impl IFileSavePicker2 { + #[inline] pub unsafe fn get_continuation_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContinuationData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pick_save_file_and_continue(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).PickSaveFileAndContinue)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileSavePicker3, 1770712169, 47676, 20049, 189, 144, 74, 188, 187, 244, 207, 175); + RT_INTERFACE!{interface IFileSavePicker3(IFileSavePicker3Vtbl): IInspectable(IInspectableVtbl) [IID_IFileSavePicker3] { + fn get_EnterpriseId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_EnterpriseId(&mut self, value: HSTRING) -> HRESULT + }} + impl IFileSavePicker3 { + #[inline] pub unsafe fn get_enterprise_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EnterpriseId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_enterprise_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_EnterpriseId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFolderPicker, 139425689, 62459, 16394, 153, 177, 123, 74, 119, 47, 214, 13); + RT_INTERFACE!{interface IFolderPicker(IFolderPickerVtbl): IInspectable(IInspectableVtbl) [IID_IFolderPicker] { + fn get_ViewMode(&mut self, out: *mut PickerViewMode) -> HRESULT, + fn put_ViewMode(&mut self, value: PickerViewMode) -> HRESULT, + fn get_SettingsIdentifier(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SettingsIdentifier(&mut self, value: HSTRING) -> HRESULT, + fn get_SuggestedStartLocation(&mut self, out: *mut PickerLocationId) -> HRESULT, + fn put_SuggestedStartLocation(&mut self, value: PickerLocationId) -> HRESULT, + fn get_CommitButtonText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CommitButtonText(&mut self, value: HSTRING) -> HRESULT, + fn get_FileTypeFilter(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn PickSingleFolderAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IFolderPicker { + #[inline] pub unsafe fn get_view_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ViewMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_view_mode(&mut self, value: PickerViewMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ViewMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_settings_identifier(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SettingsIdentifier)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_settings_identifier(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SettingsIdentifier)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_suggested_start_location(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SuggestedStartLocation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_suggested_start_location(&mut self, value: PickerLocationId) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuggestedStartLocation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_commit_button_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CommitButtonText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_commit_button_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CommitButtonText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_type_filter(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FileTypeFilter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pick_single_folder_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickSingleFolderAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFolderPicker2, 2394143383, 56453, 17942, 190, 148, 150, 96, 136, 31, 47, 93); + RT_INTERFACE!{interface IFolderPicker2(IFolderPicker2Vtbl): IInspectable(IInspectableVtbl) [IID_IFolderPicker2] { + fn get_ContinuationData(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn PickFolderAndContinue(&mut self) -> HRESULT + }} + impl IFolderPicker2 { + #[inline] pub unsafe fn get_continuation_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContinuationData)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn pick_folder_and_continue(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).PickFolderAndContinue)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FileOpenPicker: IFileOpenPicker} + RT_ACTIVATABLE!{IFileOpenPickerStatics [CLSID_FileOpenPicker]} + DEFINE_CLSID!(CLSID_FileOpenPicker = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,80,105,99,107,101,114,115,46,70,105,108,101,79,112,101,110,80,105,99,107,101,114,0]); + RT_CLASS!{class FileSavePicker: IFileSavePicker} + RT_CLASS!{class FolderPicker: IFolderPicker} +pub mod provider { // Windows.Storage.Pickers.Provider +use ::prelude::*; + DEFINE_IID!(IID_IFileRemovedEventArgs, 319045031, 32714, 19499, 158, 202, 104, 144, 249, 240, 1, 133); + RT_INTERFACE!{interface IFileRemovedEventArgs(IFileRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IFileRemovedEventArgs] { + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IFileRemovedEventArgs { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FileRemovedEventArgs: IFileRemovedEventArgs} + RT_ENUM! { enum AddFileResult: i32 { + Added (AddFileResult_Added) = 0, AlreadyAdded (AddFileResult_AlreadyAdded) = 1, NotAllowed (AddFileResult_NotAllowed) = 2, Unavailable (AddFileResult_Unavailable) = 3, + }} + RT_ENUM! { enum FileSelectionMode: i32 { + Single (FileSelectionMode_Single) = 0, Multiple (FileSelectionMode_Multiple) = 1, + }} + DEFINE_IID!(IID_IFileOpenPickerUI, 3718535696, 63956, 16580, 138, 245, 197, 182, 181, 166, 29, 29); + RT_INTERFACE!{interface IFileOpenPickerUI(IFileOpenPickerUIVtbl): IInspectable(IInspectableVtbl) [IID_IFileOpenPickerUI] { + fn AddFile(&mut self, id: HSTRING, file: *mut super::super::IStorageFile, out: *mut AddFileResult) -> HRESULT, + fn RemoveFile(&mut self, id: HSTRING) -> HRESULT, + fn ContainsFile(&mut self, id: HSTRING, out: *mut bool) -> HRESULT, + fn CanAddFile(&mut self, file: *mut super::super::IStorageFile, out: *mut bool) -> HRESULT, + fn get_AllowedFileTypes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_SelectionMode(&mut self, out: *mut FileSelectionMode) -> HRESULT, + fn get_SettingsIdentifier(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn add_FileRemoved(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FileRemoved(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Closing(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closing(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IFileOpenPickerUI { + #[inline] pub unsafe fn add_file(&mut self, id: &HStringArg, file: &super::super::IStorageFile) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).AddFile)(self, id.get(), file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_file(&mut self, id: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveFile)(self, id.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn contains_file(&mut self, id: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ContainsFile)(self, id.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn can_add_file(&mut self, file: &super::super::IStorageFile) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanAddFile)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_allowed_file_types(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AllowedFileTypes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectionMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_settings_identifier(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SettingsIdentifier)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_file_removed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FileRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_file_removed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FileRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_closing(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Closing)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closing(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Closing)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FileOpenPickerUI: IFileOpenPickerUI} + RT_CLASS!{class PickerClosingEventArgs: IPickerClosingEventArgs} + DEFINE_IID!(IID_IPickerClosingEventArgs, 2119823908, 45874, 20242, 139, 159, 168, 194, 240, 107, 50, 205); + RT_INTERFACE!{interface IPickerClosingEventArgs(IPickerClosingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPickerClosingEventArgs] { + fn get_ClosingOperation(&mut self, out: *mut *mut PickerClosingOperation) -> HRESULT, + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT + }} + impl IPickerClosingEventArgs { + #[inline] pub unsafe fn get_closing_operation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ClosingOperation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PickerClosingOperation: IPickerClosingOperation} + DEFINE_IID!(IID_IPickerClosingOperation, 1290402692, 48878, 20025, 167, 115, 252, 95, 14, 174, 50, 141); + RT_INTERFACE!{interface IPickerClosingOperation(IPickerClosingOperationVtbl): IInspectable(IInspectableVtbl) [IID_IPickerClosingOperation] { + fn GetDeferral(&mut self, out: *mut *mut PickerClosingDeferral) -> HRESULT, + fn get_Deadline(&mut self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + }} + impl IPickerClosingOperation { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deadline(&mut self) -> Result<::rt::gen::windows::foundation::DateTime> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PickerClosingDeferral: IPickerClosingDeferral} + DEFINE_IID!(IID_IPickerClosingDeferral, 2063071006, 6759, 18993, 174, 128, 233, 7, 112, 138, 97, 155); + RT_INTERFACE!{interface IPickerClosingDeferral(IPickerClosingDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IPickerClosingDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IPickerClosingDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum SetFileNameResult: i32 { + Succeeded (SetFileNameResult_Succeeded) = 0, NotAllowed (SetFileNameResult_NotAllowed) = 1, Unavailable (SetFileNameResult_Unavailable) = 2, + }} + DEFINE_IID!(IID_IFileSavePickerUI, 2522268135, 15958, 17356, 138, 57, 51, 199, 61, 157, 84, 43); + RT_INTERFACE!{interface IFileSavePickerUI(IFileSavePickerUIVtbl): IInspectable(IInspectableVtbl) [IID_IFileSavePickerUI] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_AllowedFileTypes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_SettingsIdentifier(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FileName(&mut self, out: *mut HSTRING) -> HRESULT, + fn TrySetFileName(&mut self, value: HSTRING, out: *mut SetFileNameResult) -> HRESULT, + fn add_FileNameChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FileNameChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_TargetFileRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TargetFileRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IFileSavePickerUI { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_allowed_file_types(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AllowedFileTypes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_settings_identifier(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SettingsIdentifier)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FileName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_file_name(&mut self, value: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySetFileName)(self, value.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_file_name_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FileNameChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_file_name_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FileNameChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_target_file_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TargetFileRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_target_file_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TargetFileRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FileSavePickerUI: IFileSavePickerUI} + RT_CLASS!{class TargetFileRequestedEventArgs: ITargetFileRequestedEventArgs} + DEFINE_IID!(IID_ITargetFileRequestedEventArgs, 2976111553, 6993, 19593, 165, 145, 15, 212, 11, 60, 87, 201); + RT_INTERFACE!{interface ITargetFileRequestedEventArgs(ITargetFileRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITargetFileRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut TargetFileRequest) -> HRESULT + }} + impl ITargetFileRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TargetFileRequest: ITargetFileRequest} + DEFINE_IID!(IID_ITargetFileRequest, 1119695701, 32648, 18315, 142, 129, 105, 11, 32, 52, 6, 120); + RT_INTERFACE!{interface ITargetFileRequest(ITargetFileRequestVtbl): IInspectable(IInspectableVtbl) [IID_ITargetFileRequest] { + fn get_TargetFile(&mut self, out: *mut *mut super::super::IStorageFile) -> HRESULT, + fn put_TargetFile(&mut self, value: *mut super::super::IStorageFile) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut TargetFileRequestDeferral) -> HRESULT + }} + impl ITargetFileRequest { + #[inline] pub unsafe fn get_target_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TargetFile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_target_file(&mut self, value: &super::super::IStorageFile) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetFile)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TargetFileRequestDeferral: ITargetFileRequestDeferral} + DEFINE_IID!(IID_ITargetFileRequestDeferral, 1257151889, 48917, 19881, 149, 246, 246, 183, 213, 88, 34, 91); + RT_INTERFACE!{interface ITargetFileRequestDeferral(ITargetFileRequestDeferralVtbl): IInspectable(IInspectableVtbl) [IID_ITargetFileRequestDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl ITargetFileRequestDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.Storage.Pickers.Provider +} // Windows.Storage.Pickers +pub mod provider { // Windows.Storage.Provider +use ::prelude::*; + RT_ENUM! { enum CachedFileTarget: i32 { + Local (CachedFileTarget_Local) = 0, Remote (CachedFileTarget_Remote) = 1, + }} + RT_ENUM! { enum UIStatus: i32 { + Unavailable (UIStatus_Unavailable) = 0, Hidden (UIStatus_Hidden) = 1, Visible (UIStatus_Visible) = 2, Complete (UIStatus_Complete) = 3, + }} + DEFINE_IID!(IID_ICachedFileUpdaterUI, 2658091494, 47858, 19095, 182, 0, 147, 51, 245, 223, 128, 253); + RT_INTERFACE!{interface ICachedFileUpdaterUI(ICachedFileUpdaterUIVtbl): IInspectable(IInspectableVtbl) [IID_ICachedFileUpdaterUI] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_UpdateTarget(&mut self, out: *mut CachedFileTarget) -> HRESULT, + fn add_FileUpdateRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FileUpdateRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_UIRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UIRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_UIStatus(&mut self, out: *mut UIStatus) -> HRESULT + }} + impl ICachedFileUpdaterUI { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_update_target(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UpdateTarget)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_file_update_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FileUpdateRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_file_update_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FileUpdateRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_uirequested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UIRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_uirequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UIRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_uistatus(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UIStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CachedFileUpdaterUI: ICachedFileUpdaterUI} + RT_CLASS!{class FileUpdateRequestedEventArgs: IFileUpdateRequestedEventArgs} + DEFINE_IID!(IID_IFileUpdateRequestedEventArgs, 2064290626, 14597, 17293, 170, 239, 120, 174, 38, 95, 141, 210); + RT_INTERFACE!{interface IFileUpdateRequestedEventArgs(IFileUpdateRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IFileUpdateRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut FileUpdateRequest) -> HRESULT + }} + impl IFileUpdateRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FileUpdateRequest: IFileUpdateRequest} + DEFINE_IID!(IID_IFileUpdateRequest, 1086858550, 49662, 19859, 167, 146, 30, 115, 107, 199, 8, 55); + RT_INTERFACE!{interface IFileUpdateRequest(IFileUpdateRequestVtbl): IInspectable(IInspectableVtbl) [IID_IFileUpdateRequest] { + fn get_ContentId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_File(&mut self, out: *mut *mut super::StorageFile) -> HRESULT, + fn get_Status(&mut self, out: *mut FileUpdateStatus) -> HRESULT, + fn put_Status(&mut self, value: FileUpdateStatus) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut FileUpdateRequestDeferral) -> HRESULT, + fn UpdateLocalFile(&mut self, value: *mut super::IStorageFile) -> HRESULT + }} + impl IFileUpdateRequest { + #[inline] pub unsafe fn get_content_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_File)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_status(&mut self, value: FileUpdateStatus) -> Result<()> { + let hr = ((*self.lpVtbl).put_Status)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_local_file(&mut self, value: &super::IStorageFile) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateLocalFile)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FileUpdateRequestDeferral: IFileUpdateRequestDeferral} + DEFINE_IID!(IID_IFileUpdateRequestDeferral, 4291746603, 35550, 17573, 187, 0, 22, 76, 78, 114, 241, 58); + RT_INTERFACE!{interface IFileUpdateRequestDeferral(IFileUpdateRequestDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IFileUpdateRequestDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IFileUpdateRequestDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICachedFileUpdaterUI2, 2287378972, 34457, 17216, 159, 73, 247, 202, 215, 254, 137, 145); + RT_INTERFACE!{interface ICachedFileUpdaterUI2(ICachedFileUpdaterUI2Vtbl): IInspectable(IInspectableVtbl) [IID_ICachedFileUpdaterUI2] { + fn get_UpdateRequest(&mut self, out: *mut *mut FileUpdateRequest) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut FileUpdateRequestDeferral) -> HRESULT + }} + impl ICachedFileUpdaterUI2 { + #[inline] pub unsafe fn get_update_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UpdateRequest)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileUpdateRequest2, 2185774664, 48574, 17531, 162, 238, 122, 254, 106, 3, 42, 148); + RT_INTERFACE!{interface IFileUpdateRequest2(IFileUpdateRequest2Vtbl): IInspectable(IInspectableVtbl) [IID_IFileUpdateRequest2] { + fn get_UserInputNeededMessage(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_UserInputNeededMessage(&mut self, value: HSTRING) -> HRESULT + }} + impl IFileUpdateRequest2 { + #[inline] pub unsafe fn get_user_input_needed_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserInputNeededMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_user_input_needed_message(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_UserInputNeededMessage)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum FileUpdateStatus: i32 { + Incomplete (FileUpdateStatus_Incomplete) = 0, Complete (FileUpdateStatus_Complete) = 1, UserInputNeeded (FileUpdateStatus_UserInputNeeded) = 2, CurrentlyUnavailable (FileUpdateStatus_CurrentlyUnavailable) = 3, Failed (FileUpdateStatus_Failed) = 4, CompleteAndRenamed (FileUpdateStatus_CompleteAndRenamed) = 5, + }} + RT_ENUM! { enum CachedFileOptions: u32 { + None (CachedFileOptions_None) = 0, RequireUpdateOnAccess (CachedFileOptions_RequireUpdateOnAccess) = 1, UseCachedFileWhenOffline (CachedFileOptions_UseCachedFileWhenOffline) = 2, DenyAccessWhenOffline (CachedFileOptions_DenyAccessWhenOffline) = 4, + }} + RT_ENUM! { enum ReadActivationMode: i32 { + NotNeeded (ReadActivationMode_NotNeeded) = 0, BeforeAccess (ReadActivationMode_BeforeAccess) = 1, + }} + RT_ENUM! { enum WriteActivationMode: i32 { + ReadOnly (WriteActivationMode_ReadOnly) = 0, NotNeeded (WriteActivationMode_NotNeeded) = 1, AfterWrite (WriteActivationMode_AfterWrite) = 2, + }} + DEFINE_IID!(IID_ICachedFileUpdaterStatics, 2680752416, 31695, 18568, 168, 30, 16, 45, 112, 52, 215, 206); + RT_INTERFACE!{static interface ICachedFileUpdaterStatics(ICachedFileUpdaterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICachedFileUpdaterStatics] { + fn SetUpdateInformation(&mut self, file: *mut super::IStorageFile, contentId: HSTRING, readMode: ReadActivationMode, writeMode: WriteActivationMode, options: CachedFileOptions) -> HRESULT + }} + impl ICachedFileUpdaterStatics { + #[inline] pub unsafe fn set_update_information(&mut self, file: &super::IStorageFile, contentId: &HStringArg, readMode: ReadActivationMode, writeMode: WriteActivationMode, options: CachedFileOptions) -> Result<()> { + let hr = ((*self.lpVtbl).SetUpdateInformation)(self, file as *const _ as *mut _, contentId.get(), readMode, writeMode, options); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ICachedFileUpdaterStatics [CLSID_CachedFileUpdater]} + DEFINE_CLSID!(CLSID_CachedFileUpdater = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,80,114,111,118,105,100,101,114,46,67,97,99,104,101,100,70,105,108,101,85,112,100,97,116,101,114,0]); +} // Windows.Storage.Provider +pub mod fileproperties { // Windows.Storage.FileProperties +use ::prelude::*; + DEFINE_IID!(IID_IGeotagHelperStatics, 1095316036, 9508, 18005, 134, 166, 237, 22, 245, 252, 113, 107); + RT_INTERFACE!{static interface IGeotagHelperStatics(IGeotagHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGeotagHelperStatics] { + #[cfg(feature="windows.devices")] fn GetGeotagAsync(&mut self, file: *mut super::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.devices")] fn SetGeotagFromGeolocatorAsync(&mut self, file: *mut super::IStorageFile, geolocator: *mut super::super::devices::geolocation::Geolocator, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows.devices")] fn SetGeotagAsync(&mut self, file: *mut super::IStorageFile, geopoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IGeotagHelperStatics { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_geotag_async(&mut self, file: &super::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetGeotagAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn set_geotag_from_geolocator_async(&mut self, file: &super::IStorageFile, geolocator: &super::super::devices::geolocation::Geolocator) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetGeotagFromGeolocatorAsync)(self, file as *const _ as *mut _, geolocator as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn set_geotag_async(&mut self, file: &super::IStorageFile, geopoint: &super::super::devices::geolocation::Geopoint) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetGeotagAsync)(self, file as *const _ as *mut _, geopoint as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IGeotagHelperStatics [CLSID_GeotagHelper]} + DEFINE_CLSID!(CLSID_GeotagHelper = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,70,105,108,101,80,114,111,112,101,114,116,105,101,115,46,71,101,111,116,97,103,72,101,108,112,101,114,0]); + RT_ENUM! { enum PropertyPrefetchOptions: u32 { + None (PropertyPrefetchOptions_None) = 0, MusicProperties (PropertyPrefetchOptions_MusicProperties) = 1, VideoProperties (PropertyPrefetchOptions_VideoProperties) = 2, ImageProperties (PropertyPrefetchOptions_ImageProperties) = 4, DocumentProperties (PropertyPrefetchOptions_DocumentProperties) = 8, BasicProperties (PropertyPrefetchOptions_BasicProperties) = 16, + }} + RT_ENUM! { enum ThumbnailType: i32 { + Image (ThumbnailType_Image) = 0, Icon (ThumbnailType_Icon) = 1, + }} + DEFINE_IID!(IID_IThumbnailProperties, 1765659695, 56295, 18869, 179, 179, 40, 147, 172, 93, 52, 35); + RT_INTERFACE!{interface IThumbnailProperties(IThumbnailPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IThumbnailProperties] { + fn get_OriginalWidth(&mut self, out: *mut u32) -> HRESULT, + fn get_OriginalHeight(&mut self, out: *mut u32) -> HRESULT, + fn get_ReturnedSmallerCachedSize(&mut self, out: *mut bool) -> HRESULT, + fn get_Type(&mut self, out: *mut ThumbnailType) -> HRESULT + }} + impl IThumbnailProperties { + #[inline] pub unsafe fn get_original_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OriginalWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_original_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OriginalHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_returned_smaller_cached_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReturnedSmallerCachedSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class StorageItemThumbnail: super::streams::IRandomAccessStreamWithContentType} + RT_ENUM! { enum ThumbnailMode: i32 { + PicturesView (ThumbnailMode_PicturesView) = 0, VideosView (ThumbnailMode_VideosView) = 1, MusicView (ThumbnailMode_MusicView) = 2, DocumentsView (ThumbnailMode_DocumentsView) = 3, ListView (ThumbnailMode_ListView) = 4, SingleItem (ThumbnailMode_SingleItem) = 5, + }} + RT_ENUM! { enum ThumbnailOptions: u32 { + None (ThumbnailOptions_None) = 0, ReturnOnlyIfCached (ThumbnailOptions_ReturnOnlyIfCached) = 1, ResizeThumbnail (ThumbnailOptions_ResizeThumbnail) = 2, UseCurrentScale (ThumbnailOptions_UseCurrentScale) = 4, + }} + RT_ENUM! { enum PhotoOrientation: i32 { + Unspecified (PhotoOrientation_Unspecified) = 0, Normal (PhotoOrientation_Normal) = 1, FlipHorizontal (PhotoOrientation_FlipHorizontal) = 2, Rotate180 (PhotoOrientation_Rotate180) = 3, FlipVertical (PhotoOrientation_FlipVertical) = 4, Transpose (PhotoOrientation_Transpose) = 5, Rotate270 (PhotoOrientation_Rotate270) = 6, Transverse (PhotoOrientation_Transverse) = 7, Rotate90 (PhotoOrientation_Rotate90) = 8, + }} + RT_ENUM! { enum VideoOrientation: i32 { + Normal (VideoOrientation_Normal) = 0, Rotate90 (VideoOrientation_Rotate90) = 90, Rotate180 (VideoOrientation_Rotate180) = 180, Rotate270 (VideoOrientation_Rotate270) = 270, + }} + DEFINE_IID!(IID_IStorageItemExtraProperties, 3309527474, 21709, 17195, 189, 188, 75, 25, 196, 180, 112, 215); + RT_INTERFACE!{interface IStorageItemExtraProperties(IStorageItemExtraPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IStorageItemExtraProperties] { + fn RetrievePropertiesAsync(&mut self, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn SavePropertiesAsync(&mut self, propertiesToSave: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SavePropertiesAsyncOverloadDefault(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IStorageItemExtraProperties { + #[inline] pub unsafe fn retrieve_properties_async(&mut self, propertiesToRetrieve: &super::super::foundation::collections::IIterable) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RetrievePropertiesAsync)(self, propertiesToRetrieve as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn save_properties_async(&mut self, propertiesToSave: &super::super::foundation::collections::IIterable>) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SavePropertiesAsync)(self, propertiesToSave as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn save_properties_async_overload_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SavePropertiesAsyncOverloadDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageItemContentProperties, 86592429, 48184, 18623, 133, 215, 119, 14, 14, 42, 224, 186); + RT_INTERFACE!{interface IStorageItemContentProperties(IStorageItemContentPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IStorageItemContentProperties] { + fn GetMusicPropertiesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetVideoPropertiesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetImagePropertiesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDocumentPropertiesAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IStorageItemContentProperties { + #[inline] pub unsafe fn get_music_properties_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMusicPropertiesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_properties_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVideoPropertiesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_image_properties_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetImagePropertiesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_document_properties_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDocumentPropertiesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MusicProperties: IMusicProperties} + RT_CLASS!{class VideoProperties: IVideoProperties} + RT_CLASS!{class ImageProperties: IImageProperties} + RT_CLASS!{class DocumentProperties: IDocumentProperties} + DEFINE_IID!(IID_IMusicProperties, 3163204450, 26348, 16794, 188, 93, 202, 101, 164, 203, 70, 218); + RT_INTERFACE!{interface IMusicProperties(IMusicPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IMusicProperties] { + fn get_Album(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Album(&mut self, value: HSTRING) -> HRESULT, + fn get_Artist(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Artist(&mut self, value: HSTRING) -> HRESULT, + fn get_Genre(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_TrackNumber(&mut self, out: *mut u32) -> HRESULT, + fn put_TrackNumber(&mut self, value: u32) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_Rating(&mut self, out: *mut u32) -> HRESULT, + fn put_Rating(&mut self, value: u32) -> HRESULT, + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Bitrate(&mut self, out: *mut u32) -> HRESULT, + fn get_AlbumArtist(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AlbumArtist(&mut self, value: HSTRING) -> HRESULT, + fn get_Composers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Conductors(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Subtitle(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Subtitle(&mut self, value: HSTRING) -> HRESULT, + fn get_Producers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Publisher(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Publisher(&mut self, value: HSTRING) -> HRESULT, + fn get_Writers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Year(&mut self, out: *mut u32) -> HRESULT, + fn put_Year(&mut self, value: u32) -> HRESULT + }} + impl IMusicProperties { + #[inline] pub unsafe fn get_album(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Album)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_album(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Album)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_artist(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Artist)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_artist(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Artist)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_genre(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Genre)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_track_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TrackNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_track_number(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TrackNumber)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rating(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Rating)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rating(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Rating)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitrate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bitrate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_album_artist(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlbumArtist)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_album_artist(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AlbumArtist)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_composers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Composers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_conductors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Conductors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subtitle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subtitle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_subtitle(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Subtitle)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_producers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Producers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_publisher(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Publisher)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_publisher(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Publisher)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_writers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Writers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_year(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Year)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_year(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Year)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IImageProperties, 1379701796, 64767, 17013, 175, 238, 236, 219, 154, 180, 121, 115); + RT_INTERFACE!{interface IImageProperties(IImagePropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IImageProperties] { + fn get_Rating(&mut self, out: *mut u32) -> HRESULT, + fn put_Rating(&mut self, value: u32) -> HRESULT, + fn get_Keywords(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_DateTaken(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_DateTaken(&mut self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_Width(&mut self, out: *mut u32) -> HRESULT, + fn get_Height(&mut self, out: *mut u32) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_Latitude(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Longitude(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_CameraManufacturer(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CameraManufacturer(&mut self, value: HSTRING) -> HRESULT, + fn get_CameraModel(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_CameraModel(&mut self, value: HSTRING) -> HRESULT, + fn get_Orientation(&mut self, out: *mut PhotoOrientation) -> HRESULT, + fn get_PeopleNames(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IImageProperties { + #[inline] pub unsafe fn get_rating(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Rating)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rating(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Rating)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_keywords(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Keywords)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_date_taken(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DateTaken)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_date_taken(&mut self, value: super::super::foundation::DateTime) -> Result<()> { + let hr = ((*self.lpVtbl).put_DateTaken)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_latitude(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Latitude)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_longitude(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Longitude)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_camera_manufacturer(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CameraManufacturer)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_camera_manufacturer(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CameraManufacturer)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_camera_model(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CameraModel)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_camera_model(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_CameraModel)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_people_names(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PeopleNames)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVideoProperties, 1905976583, 26846, 19896, 151, 222, 73, 153, 140, 5, 159, 47); + RT_INTERFACE!{interface IVideoProperties(IVideoPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IVideoProperties] { + fn get_Rating(&mut self, out: *mut u32) -> HRESULT, + fn put_Rating(&mut self, value: u32) -> HRESULT, + fn get_Keywords(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Width(&mut self, out: *mut u32) -> HRESULT, + fn get_Height(&mut self, out: *mut u32) -> HRESULT, + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Latitude(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Longitude(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_Subtitle(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Subtitle(&mut self, value: HSTRING) -> HRESULT, + fn get_Producers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Publisher(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Publisher(&mut self, value: HSTRING) -> HRESULT, + fn get_Writers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Year(&mut self, out: *mut u32) -> HRESULT, + fn put_Year(&mut self, value: u32) -> HRESULT, + fn get_Bitrate(&mut self, out: *mut u32) -> HRESULT, + fn get_Directors(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Orientation(&mut self, out: *mut VideoOrientation) -> HRESULT + }} + impl IVideoProperties { + #[inline] pub unsafe fn get_rating(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Rating)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rating(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Rating)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_keywords(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Keywords)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_latitude(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Latitude)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_longitude(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Longitude)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_subtitle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subtitle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_subtitle(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Subtitle)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_producers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Producers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_publisher(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Publisher)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_publisher(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Publisher)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_writers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Writers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_year(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Year)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_year(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Year)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bitrate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bitrate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_directors(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Directors)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDocumentProperties, 2125142460, 6177, 18723, 180, 169, 10, 234, 64, 77, 0, 112); + RT_INTERFACE!{interface IDocumentProperties(IDocumentPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IDocumentProperties] { + fn get_Author(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_Keywords(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Comment(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Comment(&mut self, value: HSTRING) -> HRESULT + }} + impl IDocumentProperties { + #[inline] pub unsafe fn get_author(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Author)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_keywords(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Keywords)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_comment(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Comment)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_comment(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Comment)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBasicProperties, 3495777755, 30814, 19046, 190, 2, 155, 238, 197, 138, 234, 129); + RT_INTERFACE!{interface IBasicProperties(IBasicPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IBasicProperties] { + fn get_Size(&mut self, out: *mut u64) -> HRESULT, + fn get_DateModified(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_ItemDate(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT + }} + impl IBasicProperties { + #[inline] pub unsafe fn get_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_date_modified(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DateModified)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_date(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ItemDate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class StorageItemContentProperties: IStorageItemContentProperties} + RT_CLASS!{class BasicProperties: IBasicProperties} +} // Windows.Storage.FileProperties +pub mod accesscache { // Windows.Storage.AccessCache +use ::prelude::*; + RT_STRUCT! { struct AccessListEntry { + Token: HSTRING, Metadata: HSTRING, + }} + DEFINE_IID!(IID_IItemRemovedEventArgs, 1499954780, 21950, 19558, 186, 102, 94, 174, 167, 157, 38, 49); + RT_INTERFACE!{interface IItemRemovedEventArgs(IItemRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IItemRemovedEventArgs] { + fn get_RemovedEntry(&mut self, out: *mut AccessListEntry) -> HRESULT + }} + impl IItemRemovedEventArgs { + #[inline] pub unsafe fn get_removed_entry(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RemovedEntry)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class AccessListEntryView: super::super::foundation::collections::IVectorView} + RT_ENUM! { enum AccessCacheOptions: u32 { + None (AccessCacheOptions_None) = 0, DisallowUserInput (AccessCacheOptions_DisallowUserInput) = 1, FastLocationsOnly (AccessCacheOptions_FastLocationsOnly) = 2, UseReadOnlyCachedCopy (AccessCacheOptions_UseReadOnlyCachedCopy) = 4, SuppressAccessTimeUpdate (AccessCacheOptions_SuppressAccessTimeUpdate) = 8, + }} + DEFINE_IID!(IID_IStorageItemAccessList, 749729453, 56976, 18421, 178, 195, 221, 54, 201, 253, 212, 83); + RT_INTERFACE!{interface IStorageItemAccessList(IStorageItemAccessListVtbl): IInspectable(IInspectableVtbl) [IID_IStorageItemAccessList] { + fn AddOverloadDefaultMetadata(&mut self, file: *mut super::IStorageItem, out: *mut HSTRING) -> HRESULT, + fn Add(&mut self, file: *mut super::IStorageItem, metadata: HSTRING, out: *mut HSTRING) -> HRESULT, + fn AddOrReplaceOverloadDefaultMetadata(&mut self, token: HSTRING, file: *mut super::IStorageItem) -> HRESULT, + fn AddOrReplace(&mut self, token: HSTRING, file: *mut super::IStorageItem, metadata: HSTRING) -> HRESULT, + fn GetItemAsync(&mut self, token: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetFileAsync(&mut self, token: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetFolderAsync(&mut self, token: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetItemWithOptionsAsync(&mut self, token: HSTRING, options: AccessCacheOptions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetFileWithOptionsAsync(&mut self, token: HSTRING, options: AccessCacheOptions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetFolderWithOptionsAsync(&mut self, token: HSTRING, options: AccessCacheOptions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn Remove(&mut self, token: HSTRING) -> HRESULT, + fn ContainsItem(&mut self, token: HSTRING, out: *mut bool) -> HRESULT, + fn Clear(&mut self) -> HRESULT, + fn CheckAccess(&mut self, file: *mut super::IStorageItem, out: *mut bool) -> HRESULT, + fn get_Entries(&mut self, out: *mut *mut AccessListEntryView) -> HRESULT, + fn get_MaximumItemsAllowed(&mut self, out: *mut u32) -> HRESULT + }} + impl IStorageItemAccessList { + #[inline] pub unsafe fn add_overload_default_metadata(&mut self, file: &super::IStorageItem) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddOverloadDefaultMetadata)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add(&mut self, file: &super::IStorageItem, metadata: &HStringArg) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Add)(self, file as *const _ as *mut _, metadata.get(), &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_or_replace_overload_default_metadata(&mut self, token: &HStringArg, file: &super::IStorageItem) -> Result<()> { + let hr = ((*self.lpVtbl).AddOrReplaceOverloadDefaultMetadata)(self, token.get(), file as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_or_replace(&mut self, token: &HStringArg, file: &super::IStorageItem, metadata: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).AddOrReplace)(self, token.get(), file as *const _ as *mut _, metadata.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_async(&mut self, token: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemAsync)(self, token.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_async(&mut self, token: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFileAsync)(self, token.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folder_async(&mut self, token: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFolderAsync)(self, token.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_with_options_async(&mut self, token: &HStringArg, options: AccessCacheOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemWithOptionsAsync)(self, token.get(), options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_file_with_options_async(&mut self, token: &HStringArg, options: AccessCacheOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFileWithOptionsAsync)(self, token.get(), options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folder_with_options_async(&mut self, token: &HStringArg, options: AccessCacheOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFolderWithOptionsAsync)(self, token.get(), options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn remove(&mut self, token: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).Remove)(self, token.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn contains_item(&mut self, token: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ContainsItem)(self, token.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn check_access(&mut self, file: &super::IStorageItem) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CheckAccess)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_entries(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Entries)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_maximum_items_allowed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaximumItemsAllowed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageItemMostRecentlyUsedList, 23214549, 20749, 16670, 140, 241, 195, 209, 239, 250, 76, 51); + RT_INTERFACE!{interface IStorageItemMostRecentlyUsedList(IStorageItemMostRecentlyUsedListVtbl): IInspectable(IInspectableVtbl) [IID_IStorageItemMostRecentlyUsedList] { + fn add_ItemRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemRemoved(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IStorageItemMostRecentlyUsedList { + #[inline] pub unsafe fn add_item_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ItemRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_item_removed(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ItemRemoved)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class StorageItemMostRecentlyUsedList: IStorageItemMostRecentlyUsedList} + RT_CLASS!{class ItemRemovedEventArgs: IItemRemovedEventArgs} + RT_ENUM! { enum RecentStorageItemVisibility: i32 { + AppOnly (RecentStorageItemVisibility_AppOnly) = 0, AppAndSystem (RecentStorageItemVisibility_AppAndSystem) = 1, + }} + DEFINE_IID!(IID_IStorageItemMostRecentlyUsedList2, 3662159520, 60813, 18225, 161, 219, 228, 78, 226, 32, 64, 147); + RT_INTERFACE!{interface IStorageItemMostRecentlyUsedList2(IStorageItemMostRecentlyUsedList2Vtbl): IInspectable(IInspectableVtbl) [IID_IStorageItemMostRecentlyUsedList2] { + fn AddWithMetadataAndVisibility(&mut self, file: *mut super::IStorageItem, metadata: HSTRING, visibility: RecentStorageItemVisibility, out: *mut HSTRING) -> HRESULT, + fn AddOrReplaceWithMetadataAndVisibility(&mut self, token: HSTRING, file: *mut super::IStorageItem, metadata: HSTRING, visibility: RecentStorageItemVisibility) -> HRESULT + }} + impl IStorageItemMostRecentlyUsedList2 { + #[inline] pub unsafe fn add_with_metadata_and_visibility(&mut self, file: &super::IStorageItem, metadata: &HStringArg, visibility: RecentStorageItemVisibility) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AddWithMetadataAndVisibility)(self, file as *const _ as *mut _, metadata.get(), visibility, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_or_replace_with_metadata_and_visibility(&mut self, token: &HStringArg, file: &super::IStorageItem, metadata: &HStringArg, visibility: RecentStorageItemVisibility) -> Result<()> { + let hr = ((*self.lpVtbl).AddOrReplaceWithMetadataAndVisibility)(self, token.get(), file as *const _ as *mut _, metadata.get(), visibility); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStorageApplicationPermissionsStatics, 1133633450, 53299, 18681, 128, 96, 62, 200, 71, 210, 227, 241); + RT_INTERFACE!{static interface IStorageApplicationPermissionsStatics(IStorageApplicationPermissionsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStorageApplicationPermissionsStatics] { + fn get_FutureAccessList(&mut self, out: *mut *mut StorageItemAccessList) -> HRESULT, + fn get_MostRecentlyUsedList(&mut self, out: *mut *mut StorageItemMostRecentlyUsedList) -> HRESULT + }} + impl IStorageApplicationPermissionsStatics { + #[inline] pub unsafe fn get_future_access_list(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FutureAccessList)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_most_recently_used_list(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MostRecentlyUsedList)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StorageItemAccessList: IStorageItemAccessList} + RT_ACTIVATABLE!{IStorageApplicationPermissionsStatics [CLSID_StorageApplicationPermissions]} + DEFINE_CLSID!(CLSID_StorageApplicationPermissions = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,65,99,99,101,115,115,67,97,99,104,101,46,83,116,111,114,97,103,101,65,112,112,108,105,99,97,116,105,111,110,80,101,114,109,105,115,115,105,111,110,115,0]); +} // Windows.Storage.AccessCache +pub mod bulkaccess { // Windows.Storage.BulkAccess +use ::prelude::*; + DEFINE_IID!(IID_IStorageItemInformation, 2275789707, 35186, 20288, 141, 224, 216, 111, 177, 121, 216, 250); + RT_INTERFACE!{interface IStorageItemInformation(IStorageItemInformationVtbl): IInspectable(IInspectableVtbl) [IID_IStorageItemInformation] { + fn get_MusicProperties(&mut self, out: *mut *mut super::fileproperties::MusicProperties) -> HRESULT, + fn get_VideoProperties(&mut self, out: *mut *mut super::fileproperties::VideoProperties) -> HRESULT, + fn get_ImageProperties(&mut self, out: *mut *mut super::fileproperties::ImageProperties) -> HRESULT, + fn get_DocumentProperties(&mut self, out: *mut *mut super::fileproperties::DocumentProperties) -> HRESULT, + fn get_BasicProperties(&mut self, out: *mut *mut super::fileproperties::BasicProperties) -> HRESULT, + fn get_Thumbnail(&mut self, out: *mut *mut super::fileproperties::StorageItemThumbnail) -> HRESULT, + fn add_ThumbnailUpdated(&mut self, changedHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ThumbnailUpdated(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PropertiesUpdated(&mut self, changedHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PropertiesUpdated(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IStorageItemInformation { + #[inline] pub unsafe fn get_music_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MusicProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_video_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VideoProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_image_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ImageProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_document_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DocumentProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_basic_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BasicProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumbnail(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Thumbnail)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_thumbnail_updated(&mut self, changedHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ThumbnailUpdated)(self, changedHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_thumbnail_updated(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ThumbnailUpdated)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_properties_updated(&mut self, changedHandler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PropertiesUpdated)(self, changedHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_properties_updated(&mut self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PropertiesUpdated)(self, eventCookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFileInformationFactoryFactory, 2229931645, 58530, 20224, 138, 250, 175, 94, 15, 130, 107, 213); + RT_INTERFACE!{static interface IFileInformationFactoryFactory(IFileInformationFactoryFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IFileInformationFactoryFactory] { + fn CreateWithMode(&mut self, queryResult: *mut super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, out: *mut *mut FileInformationFactory) -> HRESULT, + fn CreateWithModeAndSize(&mut self, queryResult: *mut super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, out: *mut *mut FileInformationFactory) -> HRESULT, + fn CreateWithModeAndSizeAndOptions(&mut self, queryResult: *mut super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions, out: *mut *mut FileInformationFactory) -> HRESULT, + fn CreateWithModeAndSizeAndOptionsAndFlags(&mut self, queryResult: *mut super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions, delayLoad: bool, out: *mut *mut FileInformationFactory) -> HRESULT + }} + impl IFileInformationFactoryFactory { + #[inline] pub unsafe fn create_with_mode(&mut self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithMode)(self, queryResult as *const _ as *mut _, mode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_mode_and_size(&mut self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithModeAndSize)(self, queryResult as *const _ as *mut _, mode, requestedThumbnailSize, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_mode_and_size_and_options(&mut self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithModeAndSizeAndOptions)(self, queryResult as *const _ as *mut _, mode, requestedThumbnailSize, thumbnailOptions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_mode_and_size_and_options_and_flags(&mut self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions, delayLoad: bool) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithModeAndSizeAndOptionsAndFlags)(self, queryResult as *const _ as *mut _, mode, requestedThumbnailSize, thumbnailOptions, delayLoad, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FileInformationFactory: IFileInformationFactory [IFileInformationFactoryFactory] [CLSID_FileInformationFactory]} + DEFINE_CLSID!(CLSID_FileInformationFactory = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,66,117,108,107,65,99,99,101,115,115,46,70,105,108,101,73,110,102,111,114,109,97,116,105,111,110,70,97,99,116,111,114,121,0]); + DEFINE_IID!(IID_IFileInformationFactory, 1075677374, 38415, 19821, 167, 208, 26, 56, 97, 231, 108, 131); + RT_INTERFACE!{interface IFileInformationFactory(IFileInformationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IFileInformationFactory] { + fn GetItemsAsync(&mut self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetItemsAsyncDefaultStartAndCount(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFilesAsync(&mut self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFilesAsyncDefaultStartAndCount(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsync(&mut self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsyncDefaultStartAndCount(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetVirtualizedItemsVector(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn GetVirtualizedFilesVector(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn GetVirtualizedFoldersVector(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IFileInformationFactory { + #[inline] pub unsafe fn get_items_async(&mut self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemsAsync)(self, startIndex, maxItemsToRetrieve, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_items_async_default_start_and_count(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemsAsyncDefaultStartAndCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_files_async(&mut self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFilesAsync)(self, startIndex, maxItemsToRetrieve, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_files_async_default_start_and_count(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFilesAsyncDefaultStartAndCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folders_async(&mut self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFoldersAsync)(self, startIndex, maxItemsToRetrieve, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_folders_async_default_start_and_count(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFoldersAsyncDefaultStartAndCount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_virtualized_items_vector(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVirtualizedItemsVector)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_virtualized_files_vector(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVirtualizedFilesVector)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_virtualized_folders_vector(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVirtualizedFoldersVector)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FileInformation: IStorageItemInformation} + RT_CLASS!{class FolderInformation: IStorageItemInformation} +} // Windows.Storage.BulkAccess +pub mod compression { // Windows.Storage.Compression +use ::prelude::*; + RT_ENUM! { enum CompressAlgorithm: i32 { + InvalidAlgorithm (CompressAlgorithm_InvalidAlgorithm) = 0, NullAlgorithm (CompressAlgorithm_NullAlgorithm) = 1, Mszip (CompressAlgorithm_Mszip) = 2, Xpress (CompressAlgorithm_Xpress) = 3, XpressHuff (CompressAlgorithm_XpressHuff) = 4, Lzms (CompressAlgorithm_Lzms) = 5, + }} + DEFINE_IID!(IID_ICompressor, 180577370, 22444, 20193, 183, 2, 132, 211, 157, 84, 36, 224); + RT_INTERFACE!{interface ICompressor(ICompressorVtbl): IInspectable(IInspectableVtbl) [IID_ICompressor] { + fn FinishAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DetachStream(&mut self, out: *mut *mut super::streams::IOutputStream) -> HRESULT + }} + impl ICompressor { + #[inline] pub unsafe fn finish_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FinishAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn detach_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DetachStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Compressor: ICompressor [ICompressorFactory] [CLSID_Compressor]} + DEFINE_CLSID!(CLSID_Compressor = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,67,111,109,112,114,101,115,115,105,111,110,46,67,111,109,112,114,101,115,115,111,114,0]); + DEFINE_IID!(IID_IDecompressor, 3095658054, 54922, 19595, 173, 160, 78, 232, 19, 252, 82, 131); + RT_INTERFACE!{interface IDecompressor(IDecompressorVtbl): IInspectable(IInspectableVtbl) [IID_IDecompressor] { + fn DetachStream(&mut self, out: *mut *mut super::streams::IInputStream) -> HRESULT + }} + impl IDecompressor { + #[inline] pub unsafe fn detach_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).DetachStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Decompressor: IDecompressor [IDecompressorFactory] [CLSID_Decompressor]} + DEFINE_CLSID!(CLSID_Decompressor = &[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,67,111,109,112,114,101,115,115,105,111,110,46,68,101,99,111,109,112,114,101,115,115,111,114,0]); + DEFINE_IID!(IID_ICompressorFactory, 1597871780, 11515, 17452, 168, 186, 215, 209, 27, 3, 157, 160); + RT_INTERFACE!{static interface ICompressorFactory(ICompressorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompressorFactory] { + fn CreateCompressor(&mut self, underlyingStream: *mut super::streams::IOutputStream, out: *mut *mut Compressor) -> HRESULT, + fn CreateCompressorEx(&mut self, underlyingStream: *mut super::streams::IOutputStream, algorithm: CompressAlgorithm, blockSize: u32, out: *mut *mut Compressor) -> HRESULT + }} + impl ICompressorFactory { + #[inline] pub unsafe fn create_compressor(&mut self, underlyingStream: &super::streams::IOutputStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCompressor)(self, underlyingStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_compressor_ex(&mut self, underlyingStream: &super::streams::IOutputStream, algorithm: CompressAlgorithm, blockSize: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCompressorEx)(self, underlyingStream as *const _ as *mut _, algorithm, blockSize, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDecompressorFactory, 1396171346, 7586, 17121, 136, 52, 3, 121, 210, 141, 116, 47); + RT_INTERFACE!{static interface IDecompressorFactory(IDecompressorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDecompressorFactory] { + fn CreateDecompressor(&mut self, underlyingStream: *mut super::streams::IInputStream, out: *mut *mut Decompressor) -> HRESULT + }} + impl IDecompressorFactory { + #[inline] pub unsafe fn create_decompressor(&mut self, underlyingStream: &super::streams::IInputStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDecompressor)(self, underlyingStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.Storage.Compression +} // Windows.Storage +#[cfg(feature="windows.system")] +pub mod system { // Windows.System +use ::prelude::*; + DEFINE_IID!(IID_IProcessLauncherOptions, 813742543, 62532, 19075, 190, 175, 165, 73, 160, 243, 34, 156); + RT_INTERFACE!{interface IProcessLauncherOptions(IProcessLauncherOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IProcessLauncherOptions] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_StandardInput(&mut self, out: *mut *mut super::storage::streams::IInputStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_StandardInput(&mut self, value: *mut super::storage::streams::IInputStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_StandardOutput(&mut self, out: *mut *mut super::storage::streams::IOutputStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_StandardOutput(&mut self, value: *mut super::storage::streams::IOutputStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_StandardError(&mut self, out: *mut *mut super::storage::streams::IOutputStream) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn put_StandardError(&mut self, value: *mut super::storage::streams::IOutputStream) -> HRESULT, + fn get_WorkingDirectory(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_WorkingDirectory(&mut self, value: HSTRING) -> HRESULT + }} + impl IProcessLauncherOptions { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_standard_input(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StandardInput)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_standard_input(&mut self, value: &super::storage::streams::IInputStream) -> Result<()> { + let hr = ((*self.lpVtbl).put_StandardInput)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_standard_output(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StandardOutput)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_standard_output(&mut self, value: &super::storage::streams::IOutputStream) -> Result<()> { + let hr = ((*self.lpVtbl).put_StandardOutput)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_standard_error(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StandardError)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_standard_error(&mut self, value: &super::storage::streams::IOutputStream) -> Result<()> { + let hr = ((*self.lpVtbl).put_StandardError)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_working_directory(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WorkingDirectory)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_working_directory(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_WorkingDirectory)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ProcessLauncherOptions: IProcessLauncherOptions} + DEFINE_IID!(IID_IProcessLauncherStatics, 866871015, 11534, 17547, 166, 160, 193, 60, 56, 54, 208, 156); + RT_INTERFACE!{static interface IProcessLauncherStatics(IProcessLauncherStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IProcessLauncherStatics] { + fn RunToCompletionAsync(&mut self, fileName: HSTRING, args: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn RunToCompletionAsyncWithOptions(&mut self, fileName: HSTRING, args: HSTRING, options: *mut ProcessLauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IProcessLauncherStatics { + #[inline] pub unsafe fn run_to_completion_async(&mut self, fileName: &HStringArg, args: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RunToCompletionAsync)(self, fileName.get(), args.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn run_to_completion_async_with_options(&mut self, fileName: &HStringArg, args: &HStringArg, options: &ProcessLauncherOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RunToCompletionAsyncWithOptions)(self, fileName.get(), args.get(), options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProcessLauncherResult: IProcessLauncherResult} + RT_ACTIVATABLE!{IProcessLauncherStatics [CLSID_ProcessLauncher]} + DEFINE_CLSID!(CLSID_ProcessLauncher = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,114,111,99,101,115,115,76,97,117,110,99,104,101,114,0]); + DEFINE_IID!(IID_IProcessLauncherResult, 1414302004, 34520, 18833, 142, 117, 236, 232, 164, 59, 107, 109); + RT_INTERFACE!{interface IProcessLauncherResult(IProcessLauncherResultVtbl): IInspectable(IInspectableVtbl) [IID_IProcessLauncherResult] { + fn get_ExitCode(&mut self, out: *mut u32) -> HRESULT + }} + impl IProcessLauncherResult { + #[inline] pub unsafe fn get_exit_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExitCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum ShutdownKind: i32 { + Shutdown (ShutdownKind_Shutdown) = 0, Restart (ShutdownKind_Restart) = 1, + }} + DEFINE_IID!(IID_IShutdownManagerStatics, 1927432173, 56667, 19820, 177, 208, 197, 122, 123, 187, 95, 148); + RT_INTERFACE!{static interface IShutdownManagerStatics(IShutdownManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IShutdownManagerStatics] { + fn BeginShutdown(&mut self, shutdownKind: ShutdownKind, timeout: super::foundation::TimeSpan) -> HRESULT, + fn CancelShutdown(&mut self) -> HRESULT + }} + impl IShutdownManagerStatics { + #[inline] pub unsafe fn begin_shutdown(&mut self, shutdownKind: ShutdownKind, timeout: super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).BeginShutdown)(self, shutdownKind, timeout); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn cancel_shutdown(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).CancelShutdown)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IShutdownManagerStatics [CLSID_ShutdownManager]} + DEFINE_CLSID!(CLSID_ShutdownManager = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,83,104,117,116,100,111,119,110,77,97,110,97,103,101,114,0]); + RT_STRUCT! { struct SystemManagementContract { + + }} + DEFINE_IID!(IID_ITimeZoneSettingsStatics, 2604346346, 41217, 16814, 159, 189, 2, 135, 40, 186, 183, 61); + RT_INTERFACE!{static interface ITimeZoneSettingsStatics(ITimeZoneSettingsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ITimeZoneSettingsStatics] { + fn get_CurrentTimeZoneDisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SupportedTimeZoneDisplayNames(&mut self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, + fn get_CanChangeTimeZone(&mut self, out: *mut bool) -> HRESULT, + fn ChangeTimeZoneByDisplayName(&mut self, timeZoneDisplayName: HSTRING) -> HRESULT + }} + impl ITimeZoneSettingsStatics { + #[inline] pub unsafe fn get_current_time_zone_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentTimeZoneDisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_supported_time_zone_display_names(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SupportedTimeZoneDisplayNames)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_change_time_zone(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanChangeTimeZone)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn change_time_zone_by_display_name(&mut self, timeZoneDisplayName: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ChangeTimeZoneByDisplayName)(self, timeZoneDisplayName.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ITimeZoneSettingsStatics [CLSID_TimeZoneSettings]} + DEFINE_CLSID!(CLSID_TimeZoneSettings = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,84,105,109,101,90,111,110,101,83,101,116,116,105,110,103,115,0]); + DEFINE_IID!(IID_IAppMemoryReport, 1835348891, 19823, 17852, 156, 94, 228, 155, 63, 242, 117, 141); + RT_INTERFACE!{interface IAppMemoryReport(IAppMemoryReportVtbl): IInspectable(IInspectableVtbl) [IID_IAppMemoryReport] { + fn get_PrivateCommitUsage(&mut self, out: *mut u64) -> HRESULT, + fn get_PeakPrivateCommitUsage(&mut self, out: *mut u64) -> HRESULT, + fn get_TotalCommitUsage(&mut self, out: *mut u64) -> HRESULT, + fn get_TotalCommitLimit(&mut self, out: *mut u64) -> HRESULT + }} + impl IAppMemoryReport { + #[inline] pub unsafe fn get_private_commit_usage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrivateCommitUsage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_peak_private_commit_usage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PeakPrivateCommitUsage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_total_commit_usage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TotalCommitUsage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_total_commit_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TotalCommitLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProcessMemoryReport, 141755816, 39792, 18306, 135, 65, 58, 152, 43, 108, 229, 228); + RT_INTERFACE!{interface IProcessMemoryReport(IProcessMemoryReportVtbl): IInspectable(IInspectableVtbl) [IID_IProcessMemoryReport] { + fn get_PrivateWorkingSetUsage(&mut self, out: *mut u64) -> HRESULT, + fn get_TotalWorkingSetUsage(&mut self, out: *mut u64) -> HRESULT + }} + impl IProcessMemoryReport { + #[inline] pub unsafe fn get_private_working_set_usage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrivateWorkingSetUsage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_total_working_set_usage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TotalWorkingSetUsage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum AppMemoryUsageLevel: i32 { + Low (AppMemoryUsageLevel_Low) = 0, Medium (AppMemoryUsageLevel_Medium) = 1, High (AppMemoryUsageLevel_High) = 2, OverLimit (AppMemoryUsageLevel_OverLimit) = 3, + }} + DEFINE_IID!(IID_IAppMemoryUsageLimitChangingEventArgs, 2046322276, 65226, 19877, 158, 64, 43, 198, 62, 253, 201, 121); + RT_INTERFACE!{interface IAppMemoryUsageLimitChangingEventArgs(IAppMemoryUsageLimitChangingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppMemoryUsageLimitChangingEventArgs] { + fn get_OldLimit(&mut self, out: *mut u64) -> HRESULT, + fn get_NewLimit(&mut self, out: *mut u64) -> HRESULT + }} + impl IAppMemoryUsageLimitChangingEventArgs { + #[inline] pub unsafe fn get_old_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OldLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class AppMemoryUsageLimitChangingEventArgs: IAppMemoryUsageLimitChangingEventArgs} + DEFINE_IID!(IID_IMemoryManagerStatics, 1550591900, 55242, 18297, 145, 136, 64, 87, 33, 156, 230, 76); + RT_INTERFACE!{static interface IMemoryManagerStatics(IMemoryManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMemoryManagerStatics] { + fn get_AppMemoryUsage(&mut self, out: *mut u64) -> HRESULT, + fn get_AppMemoryUsageLimit(&mut self, out: *mut u64) -> HRESULT, + fn get_AppMemoryUsageLevel(&mut self, out: *mut AppMemoryUsageLevel) -> HRESULT, + fn add_AppMemoryUsageIncreased(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AppMemoryUsageIncreased(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AppMemoryUsageDecreased(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AppMemoryUsageDecreased(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AppMemoryUsageLimitChanging(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AppMemoryUsageLimitChanging(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMemoryManagerStatics { + #[inline] pub unsafe fn get_app_memory_usage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AppMemoryUsage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_memory_usage_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AppMemoryUsageLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_app_memory_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AppMemoryUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_app_memory_usage_increased(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AppMemoryUsageIncreased)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_app_memory_usage_increased(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AppMemoryUsageIncreased)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_app_memory_usage_decreased(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AppMemoryUsageDecreased)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_app_memory_usage_decreased(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AppMemoryUsageDecreased)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_app_memory_usage_limit_changing(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AppMemoryUsageLimitChanging)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_app_memory_usage_limit_changing(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AppMemoryUsageLimitChanging)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMemoryManagerStatics2, 1861104927, 28002, 16959, 148, 121, 176, 31, 156, 159, 118, 105); + RT_INTERFACE!{static interface IMemoryManagerStatics2(IMemoryManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMemoryManagerStatics2] { + fn GetAppMemoryReport(&mut self, out: *mut *mut AppMemoryReport) -> HRESULT, + fn GetProcessMemoryReport(&mut self, out: *mut *mut ProcessMemoryReport) -> HRESULT + }} + impl IMemoryManagerStatics2 { + #[inline] pub unsafe fn get_app_memory_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAppMemoryReport)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_process_memory_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetProcessMemoryReport)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AppMemoryReport: IAppMemoryReport} + RT_CLASS!{class ProcessMemoryReport: IProcessMemoryReport} + DEFINE_IID!(IID_IMemoryManagerStatics3, 345725390, 37549, 20021, 137, 235, 80, 223, 180, 192, 217, 28); + RT_INTERFACE!{static interface IMemoryManagerStatics3(IMemoryManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IMemoryManagerStatics3] { + fn TrySetAppMemoryUsageLimit(&mut self, value: u64, out: *mut bool) -> HRESULT + }} + impl IMemoryManagerStatics3 { + #[inline] pub unsafe fn try_set_app_memory_usage_limit(&mut self, value: u64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySetAppMemoryUsageLimit)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IMemoryManagerStatics3 [CLSID_MemoryManager]} + RT_ACTIVATABLE!{IMemoryManagerStatics [CLSID_MemoryManager]} + RT_ACTIVATABLE!{IMemoryManagerStatics2 [CLSID_MemoryManager]} + DEFINE_CLSID!(CLSID_MemoryManager = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,77,101,109,111,114,121,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IProtocolForResultsOperation, 3582011706, 28137, 19752, 147, 120, 248, 103, 130, 225, 130, 187); + RT_INTERFACE!{interface IProtocolForResultsOperation(IProtocolForResultsOperationVtbl): IInspectable(IInspectableVtbl) [IID_IProtocolForResultsOperation] { + fn ReportCompleted(&mut self, data: *mut super::foundation::collections::ValueSet) -> HRESULT + }} + impl IProtocolForResultsOperation { + #[inline] pub unsafe fn report_completed(&mut self, data: &super::foundation::collections::ValueSet) -> Result<()> { + let hr = ((*self.lpVtbl).ReportCompleted)(self, data as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ProtocolForResultsOperation: IProtocolForResultsOperation} + RT_ENUM! { enum ProcessorArchitecture: i32 { + X86 (ProcessorArchitecture_X86) = 0, Arm (ProcessorArchitecture_Arm) = 5, X64 (ProcessorArchitecture_X64) = 9, Neutral (ProcessorArchitecture_Neutral) = 11, Unknown (ProcessorArchitecture_Unknown) = 65535, + }} + RT_ENUM! { enum VirtualKeyModifiers: u32 { + None (VirtualKeyModifiers_None) = 0, Control (VirtualKeyModifiers_Control) = 1, Menu (VirtualKeyModifiers_Menu) = 2, Shift (VirtualKeyModifiers_Shift) = 4, Windows (VirtualKeyModifiers_Windows) = 8, + }} + RT_ENUM! { enum VirtualKey: i32 { + None (VirtualKey_None) = 0, LeftButton (VirtualKey_LeftButton) = 1, RightButton (VirtualKey_RightButton) = 2, Cancel (VirtualKey_Cancel) = 3, MiddleButton (VirtualKey_MiddleButton) = 4, XButton1 (VirtualKey_XButton1) = 5, XButton2 (VirtualKey_XButton2) = 6, Back (VirtualKey_Back) = 8, Tab (VirtualKey_Tab) = 9, Clear (VirtualKey_Clear) = 12, Enter (VirtualKey_Enter) = 13, Shift (VirtualKey_Shift) = 16, Control (VirtualKey_Control) = 17, Menu (VirtualKey_Menu) = 18, Pause (VirtualKey_Pause) = 19, CapitalLock (VirtualKey_CapitalLock) = 20, Kana (VirtualKey_Kana) = 21, Hangul (VirtualKey_Hangul) = 21, Junja (VirtualKey_Junja) = 23, Final (VirtualKey_Final) = 24, Hanja (VirtualKey_Hanja) = 25, Kanji (VirtualKey_Kanji) = 25, Escape (VirtualKey_Escape) = 27, Convert (VirtualKey_Convert) = 28, NonConvert (VirtualKey_NonConvert) = 29, Accept (VirtualKey_Accept) = 30, ModeChange (VirtualKey_ModeChange) = 31, Space (VirtualKey_Space) = 32, PageUp (VirtualKey_PageUp) = 33, PageDown (VirtualKey_PageDown) = 34, End (VirtualKey_End) = 35, Home (VirtualKey_Home) = 36, Left (VirtualKey_Left) = 37, Up (VirtualKey_Up) = 38, Right (VirtualKey_Right) = 39, Down (VirtualKey_Down) = 40, Select (VirtualKey_Select) = 41, Print (VirtualKey_Print) = 42, Execute (VirtualKey_Execute) = 43, Snapshot (VirtualKey_Snapshot) = 44, Insert (VirtualKey_Insert) = 45, Delete (VirtualKey_Delete) = 46, Help (VirtualKey_Help) = 47, Number0 (VirtualKey_Number0) = 48, Number1 (VirtualKey_Number1) = 49, Number2 (VirtualKey_Number2) = 50, Number3 (VirtualKey_Number3) = 51, Number4 (VirtualKey_Number4) = 52, Number5 (VirtualKey_Number5) = 53, Number6 (VirtualKey_Number6) = 54, Number7 (VirtualKey_Number7) = 55, Number8 (VirtualKey_Number8) = 56, Number9 (VirtualKey_Number9) = 57, A (VirtualKey_A) = 65, B (VirtualKey_B) = 66, C (VirtualKey_C) = 67, D (VirtualKey_D) = 68, E (VirtualKey_E) = 69, F (VirtualKey_F) = 70, G (VirtualKey_G) = 71, H (VirtualKey_H) = 72, I (VirtualKey_I) = 73, J (VirtualKey_J) = 74, K (VirtualKey_K) = 75, L (VirtualKey_L) = 76, M (VirtualKey_M) = 77, N (VirtualKey_N) = 78, O (VirtualKey_O) = 79, P (VirtualKey_P) = 80, Q (VirtualKey_Q) = 81, R (VirtualKey_R) = 82, S (VirtualKey_S) = 83, T (VirtualKey_T) = 84, U (VirtualKey_U) = 85, V (VirtualKey_V) = 86, W (VirtualKey_W) = 87, X (VirtualKey_X) = 88, Y (VirtualKey_Y) = 89, Z (VirtualKey_Z) = 90, LeftWindows (VirtualKey_LeftWindows) = 91, RightWindows (VirtualKey_RightWindows) = 92, Application (VirtualKey_Application) = 93, Sleep (VirtualKey_Sleep) = 95, NumberPad0 (VirtualKey_NumberPad0) = 96, NumberPad1 (VirtualKey_NumberPad1) = 97, NumberPad2 (VirtualKey_NumberPad2) = 98, NumberPad3 (VirtualKey_NumberPad3) = 99, NumberPad4 (VirtualKey_NumberPad4) = 100, NumberPad5 (VirtualKey_NumberPad5) = 101, NumberPad6 (VirtualKey_NumberPad6) = 102, NumberPad7 (VirtualKey_NumberPad7) = 103, NumberPad8 (VirtualKey_NumberPad8) = 104, NumberPad9 (VirtualKey_NumberPad9) = 105, Multiply (VirtualKey_Multiply) = 106, Add (VirtualKey_Add) = 107, Separator (VirtualKey_Separator) = 108, Subtract (VirtualKey_Subtract) = 109, Decimal (VirtualKey_Decimal) = 110, Divide (VirtualKey_Divide) = 111, F1 (VirtualKey_F1) = 112, F2 (VirtualKey_F2) = 113, F3 (VirtualKey_F3) = 114, F4 (VirtualKey_F4) = 115, F5 (VirtualKey_F5) = 116, F6 (VirtualKey_F6) = 117, F7 (VirtualKey_F7) = 118, F8 (VirtualKey_F8) = 119, F9 (VirtualKey_F9) = 120, F10 (VirtualKey_F10) = 121, F11 (VirtualKey_F11) = 122, F12 (VirtualKey_F12) = 123, F13 (VirtualKey_F13) = 124, F14 (VirtualKey_F14) = 125, F15 (VirtualKey_F15) = 126, F16 (VirtualKey_F16) = 127, F17 (VirtualKey_F17) = 128, F18 (VirtualKey_F18) = 129, F19 (VirtualKey_F19) = 130, F20 (VirtualKey_F20) = 131, F21 (VirtualKey_F21) = 132, F22 (VirtualKey_F22) = 133, F23 (VirtualKey_F23) = 134, F24 (VirtualKey_F24) = 135, NavigationView (VirtualKey_NavigationView) = 136, NavigationMenu (VirtualKey_NavigationMenu) = 137, NavigationUp (VirtualKey_NavigationUp) = 138, NavigationDown (VirtualKey_NavigationDown) = 139, NavigationLeft (VirtualKey_NavigationLeft) = 140, NavigationRight (VirtualKey_NavigationRight) = 141, NavigationAccept (VirtualKey_NavigationAccept) = 142, NavigationCancel (VirtualKey_NavigationCancel) = 143, NumberKeyLock (VirtualKey_NumberKeyLock) = 144, Scroll (VirtualKey_Scroll) = 145, LeftShift (VirtualKey_LeftShift) = 160, RightShift (VirtualKey_RightShift) = 161, LeftControl (VirtualKey_LeftControl) = 162, RightControl (VirtualKey_RightControl) = 163, LeftMenu (VirtualKey_LeftMenu) = 164, RightMenu (VirtualKey_RightMenu) = 165, GoBack (VirtualKey_GoBack) = 166, GoForward (VirtualKey_GoForward) = 167, Refresh (VirtualKey_Refresh) = 168, Stop (VirtualKey_Stop) = 169, Search (VirtualKey_Search) = 170, Favorites (VirtualKey_Favorites) = 171, GoHome (VirtualKey_GoHome) = 172, GamepadA (VirtualKey_GamepadA) = 195, GamepadB (VirtualKey_GamepadB) = 196, GamepadX (VirtualKey_GamepadX) = 197, GamepadY (VirtualKey_GamepadY) = 198, GamepadRightShoulder (VirtualKey_GamepadRightShoulder) = 199, GamepadLeftShoulder (VirtualKey_GamepadLeftShoulder) = 200, GamepadLeftTrigger (VirtualKey_GamepadLeftTrigger) = 201, GamepadRightTrigger (VirtualKey_GamepadRightTrigger) = 202, GamepadDPadUp (VirtualKey_GamepadDPadUp) = 203, GamepadDPadDown (VirtualKey_GamepadDPadDown) = 204, GamepadDPadLeft (VirtualKey_GamepadDPadLeft) = 205, GamepadDPadRight (VirtualKey_GamepadDPadRight) = 206, GamepadMenu (VirtualKey_GamepadMenu) = 207, GamepadView (VirtualKey_GamepadView) = 208, GamepadLeftThumbstickButton (VirtualKey_GamepadLeftThumbstickButton) = 209, GamepadRightThumbstickButton (VirtualKey_GamepadRightThumbstickButton) = 210, GamepadLeftThumbstickUp (VirtualKey_GamepadLeftThumbstickUp) = 211, GamepadLeftThumbstickDown (VirtualKey_GamepadLeftThumbstickDown) = 212, GamepadLeftThumbstickRight (VirtualKey_GamepadLeftThumbstickRight) = 213, GamepadLeftThumbstickLeft (VirtualKey_GamepadLeftThumbstickLeft) = 214, GamepadRightThumbstickUp (VirtualKey_GamepadRightThumbstickUp) = 215, GamepadRightThumbstickDown (VirtualKey_GamepadRightThumbstickDown) = 216, GamepadRightThumbstickRight (VirtualKey_GamepadRightThumbstickRight) = 217, GamepadRightThumbstickLeft (VirtualKey_GamepadRightThumbstickLeft) = 218, + }} + RT_ENUM! { enum UserAuthenticationStatus: i32 { + Unauthenticated (UserAuthenticationStatus_Unauthenticated) = 0, LocallyAuthenticated (UserAuthenticationStatus_LocallyAuthenticated) = 1, RemotelyAuthenticated (UserAuthenticationStatus_RemotelyAuthenticated) = 2, + }} + RT_ENUM! { enum UserType: i32 { + LocalUser (UserType_LocalUser) = 0, RemoteUser (UserType_RemoteUser) = 1, LocalGuest (UserType_LocalGuest) = 2, RemoteGuest (UserType_RemoteGuest) = 3, + }} + RT_ENUM! { enum UserPictureSize: i32 { + Size64x64 (UserPictureSize_Size64x64) = 0, Size208x208 (UserPictureSize_Size208x208) = 1, Size424x424 (UserPictureSize_Size424x424) = 2, Size1080x1080 (UserPictureSize_Size1080x1080) = 3, + }} + DEFINE_IID!(IID_IUser, 3751421638, 59206, 19405, 181, 212, 18, 1, 3, 196, 32, 155); + RT_INTERFACE!{interface IUser(IUserVtbl): IInspectable(IInspectableVtbl) [IID_IUser] { + fn get_NonRoamableId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AuthenticationStatus(&mut self, out: *mut UserAuthenticationStatus) -> HRESULT, + fn get_Type(&mut self, out: *mut UserType) -> HRESULT, + fn GetPropertyAsync(&mut self, value: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetPropertiesAsync(&mut self, values: *mut super::foundation::collections::IVectorView, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetPictureAsync(&mut self, desiredSize: UserPictureSize, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IUser { + #[inline] pub unsafe fn get_non_roamable_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NonRoamableId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_authentication_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AuthenticationStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_property_async(&mut self, value: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPropertyAsync)(self, value.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties_async(&mut self, values: &super::foundation::collections::IVectorView) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPropertiesAsync)(self, values as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_picture_async(&mut self, desiredSize: UserPictureSize) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPictureAsync)(self, desiredSize, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserStatics, 358527547, 9258, 17888, 162, 233, 49, 113, 252, 106, 127, 221); + RT_INTERFACE!{static interface IUserStatics(IUserStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUserStatics] { + fn CreateWatcher(&mut self, out: *mut *mut UserWatcher) -> HRESULT, + fn FindAllAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAllAsyncByType(&mut self, type_: UserType, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAllAsyncByTypeAndStatus(&mut self, type_: UserType, status: UserAuthenticationStatus, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFromId(&mut self, nonRoamableId: HSTRING, out: *mut *mut User) -> HRESULT + }} + impl IUserStatics { + #[inline] pub unsafe fn create_watcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async_by_type(&mut self, type_: UserType) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsyncByType)(self, type_, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async_by_type_and_status(&mut self, type_: UserType, status: UserAuthenticationStatus) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsyncByTypeAndStatus)(self, type_, status, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_from_id(&mut self, nonRoamableId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFromId)(self, nonRoamableId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UserWatcher: IUserWatcher} + RT_CLASS!{class User: IUser} + RT_ACTIVATABLE!{IUserStatics [CLSID_User]} + DEFINE_CLSID!(CLSID_User = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,85,115,101,114,0]); + RT_ENUM! { enum UserWatcherStatus: i32 { + Created (UserWatcherStatus_Created) = 0, Started (UserWatcherStatus_Started) = 1, EnumerationCompleted (UserWatcherStatus_EnumerationCompleted) = 2, Stopping (UserWatcherStatus_Stopping) = 3, Stopped (UserWatcherStatus_Stopped) = 4, Aborted (UserWatcherStatus_Aborted) = 5, + }} + DEFINE_IID!(IID_IUserWatcher, 358527547, 9258, 17888, 162, 233, 49, 113, 252, 106, 127, 187); + RT_INTERFACE!{interface IUserWatcher(IUserWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IUserWatcher] { + fn get_Status(&mut self, out: *mut UserWatcherStatus) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn add_Added(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AuthenticationStatusChanged(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AuthenticationStatusChanged(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AuthenticationStatusChanging(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AuthenticationStatusChanging(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&mut self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IUserWatcher { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_added(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Added)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_added(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Added)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_removed(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Removed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_removed(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Removed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_updated(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Updated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_updated(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Updated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_authentication_status_changed(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AuthenticationStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_authentication_status_changed(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AuthenticationStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_authentication_status_changing(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AuthenticationStatusChanging)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_authentication_status_changing(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AuthenticationStatusChanging)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_enumeration_completed(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_enumeration_completed(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stopped(&mut self, handler: &super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Stopped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stopped(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Stopped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class UserChangedEventArgs: IUserChangedEventArgs} + RT_CLASS!{class UserAuthenticationStatusChangingEventArgs: IUserAuthenticationStatusChangingEventArgs} + DEFINE_IID!(IID_IUserChangedEventArgs, 140794332, 6342, 18651, 188, 153, 114, 79, 185, 32, 60, 204); + RT_INTERFACE!{interface IUserChangedEventArgs(IUserChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUserChangedEventArgs] { + fn get_User(&mut self, out: *mut *mut User) -> HRESULT + }} + impl IUserChangedEventArgs { + #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserAuthenticationStatusChangeDeferral, 2293601640, 47920, 17147, 162, 112, 233, 144, 46, 64, 239, 167); + RT_INTERFACE!{interface IUserAuthenticationStatusChangeDeferral(IUserAuthenticationStatusChangeDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IUserAuthenticationStatusChangeDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IUserAuthenticationStatusChangeDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class UserAuthenticationStatusChangeDeferral: IUserAuthenticationStatusChangeDeferral} + DEFINE_IID!(IID_IUserAuthenticationStatusChangingEventArgs, 2349010728, 42769, 19486, 171, 72, 4, 23, 156, 21, 147, 143); + RT_INTERFACE!{interface IUserAuthenticationStatusChangingEventArgs(IUserAuthenticationStatusChangingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUserAuthenticationStatusChangingEventArgs] { + fn GetDeferral(&mut self, out: *mut *mut UserAuthenticationStatusChangeDeferral) -> HRESULT, + fn get_User(&mut self, out: *mut *mut User) -> HRESULT, + fn get_NewStatus(&mut self, out: *mut UserAuthenticationStatus) -> HRESULT, + fn get_CurrentStatus(&mut self, out: *mut UserAuthenticationStatus) -> HRESULT + }} + impl IUserAuthenticationStatusChangingEventArgs { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownUserPropertiesStatics, 2002096410, 28869, 18661, 182, 55, 91, 163, 68, 30, 78, 228); + RT_INTERFACE!{static interface IKnownUserPropertiesStatics(IKnownUserPropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownUserPropertiesStatics] { + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FirstName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_LastName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ProviderName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_AccountName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_GuestHost(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_PrincipalName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DomainName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SessionInitiationProtocolUri(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownUserPropertiesStatics { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FirstName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LastName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_provider_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProviderName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_account_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccountName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_guest_host(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GuestHost)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_principal_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PrincipalName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DomainName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_session_initiation_protocol_uri(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SessionInitiationProtocolUri)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IKnownUserPropertiesStatics [CLSID_KnownUserProperties]} + DEFINE_CLSID!(CLSID_KnownUserProperties = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,75,110,111,119,110,85,115,101,114,80,114,111,112,101,114,116,105,101,115,0]); + DEFINE_IID!(IID_IUserPickerStatics, 3727855836, 32371, 19958, 161, 174, 77, 126, 202, 130, 180, 13); + RT_INTERFACE!{static interface IUserPickerStatics(IUserPickerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUserPickerStatics] { + fn IsSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IUserPickerStatics { + #[inline] pub unsafe fn is_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserPicker, 2102689800, 61923, 19052, 141, 220, 169, 187, 15, 72, 138, 237); + RT_INTERFACE!{interface IUserPicker(IUserPickerVtbl): IInspectable(IInspectableVtbl) [IID_IUserPicker] { + fn get_AllowGuestAccounts(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowGuestAccounts(&mut self, value: bool) -> HRESULT, + fn get_SuggestedSelectedUser(&mut self, out: *mut *mut User) -> HRESULT, + fn put_SuggestedSelectedUser(&mut self, value: *mut User) -> HRESULT, + fn PickSingleUserAsync(&mut self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IUserPicker { + #[inline] pub unsafe fn get_allow_guest_accounts(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowGuestAccounts)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_guest_accounts(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowGuestAccounts)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_suggested_selected_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SuggestedSelectedUser)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_suggested_selected_user(&mut self, value: &User) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuggestedSelectedUser)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn pick_single_user_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PickSingleUserAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UserPicker: IUserPicker} + RT_ACTIVATABLE!{IUserPickerStatics [CLSID_UserPicker]} + DEFINE_CLSID!(CLSID_UserPicker = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,85,115,101,114,80,105,99,107,101,114,0]); + DEFINE_IID!(IID_IUserDeviceAssociationChangedEventArgs, 3172953964, 47965, 19835, 165, 240, 200, 205, 17, 163, 141, 66); + RT_INTERFACE!{interface IUserDeviceAssociationChangedEventArgs(IUserDeviceAssociationChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDeviceAssociationChangedEventArgs] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NewUser(&mut self, out: *mut *mut User) -> HRESULT, + fn get_OldUser(&mut self, out: *mut *mut User) -> HRESULT + }} + impl IUserDeviceAssociationChangedEventArgs { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NewUser)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_old_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OldUser)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserDeviceAssociationStatics, 2118721044, 63578, 19463, 141, 169, 127, 227, 208, 84, 35, 67); + RT_INTERFACE!{static interface IUserDeviceAssociationStatics(IUserDeviceAssociationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDeviceAssociationStatics] { + fn FindUserFromDeviceId(&mut self, deviceId: HSTRING, out: *mut *mut User) -> HRESULT, + fn add_UserDeviceAssociationChanged(&mut self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UserDeviceAssociationChanged(&mut self, token: super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IUserDeviceAssociationStatics { + #[inline] pub unsafe fn find_user_from_device_id(&mut self, deviceId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindUserFromDeviceId)(self, deviceId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_user_device_association_changed(&mut self, handler: &super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UserDeviceAssociationChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_user_device_association_changed(&mut self, token: super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UserDeviceAssociationChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class UserDeviceAssociationChangedEventArgs: IUserDeviceAssociationChangedEventArgs} + RT_ACTIVATABLE!{IUserDeviceAssociationStatics [CLSID_UserDeviceAssociation]} + DEFINE_CLSID!(CLSID_UserDeviceAssociation = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,85,115,101,114,68,101,118,105,99,101,65,115,115,111,99,105,97,116,105,111,110,0]); + RT_ENUM! { enum LaunchQuerySupportType: i32 { + Uri (LaunchQuerySupportType_Uri) = 0, UriForResults (LaunchQuerySupportType_UriForResults) = 1, + }} + RT_ENUM! { enum LaunchQuerySupportStatus: i32 { + Available (LaunchQuerySupportStatus_Available) = 0, AppNotInstalled (LaunchQuerySupportStatus_AppNotInstalled) = 1, AppUnavailable (LaunchQuerySupportStatus_AppUnavailable) = 2, NotSupported (LaunchQuerySupportStatus_NotSupported) = 3, Unknown (LaunchQuerySupportStatus_Unknown) = 4, + }} + RT_ENUM! { enum LaunchUriStatus: i32 { + Success (LaunchUriStatus_Success) = 0, AppUnavailable (LaunchUriStatus_AppUnavailable) = 1, ProtocolUnavailable (LaunchUriStatus_ProtocolUnavailable) = 2, Unknown (LaunchUriStatus_Unknown) = 3, + }} + RT_ENUM! { enum LaunchFileStatus: i32 { + Success (LaunchFileStatus_Success) = 0, AppUnavailable (LaunchFileStatus_AppUnavailable) = 1, DeniedByPolicy (LaunchFileStatus_DeniedByPolicy) = 2, FileTypeNotSupported (LaunchFileStatus_FileTypeNotSupported) = 3, Unknown (LaunchFileStatus_Unknown) = 4, + }} + RT_ENUM! { enum RemoteLaunchUriStatus: i32 { + Unknown (RemoteLaunchUriStatus_Unknown) = 0, Success (RemoteLaunchUriStatus_Success) = 1, AppUnavailable (RemoteLaunchUriStatus_AppUnavailable) = 2, ProtocolUnavailable (RemoteLaunchUriStatus_ProtocolUnavailable) = 3, RemoteSystemUnavailable (RemoteLaunchUriStatus_RemoteSystemUnavailable) = 4, ValueSetTooLarge (RemoteLaunchUriStatus_ValueSetTooLarge) = 5, DeniedByLocalSystem (RemoteLaunchUriStatus_DeniedByLocalSystem) = 6, DeniedByRemoteSystem (RemoteLaunchUriStatus_DeniedByRemoteSystem) = 7, + }} + DEFINE_IID!(IID_ILaunchUriResult, 3962022111, 63189, 17866, 145, 58, 112, 164, 12, 92, 130, 33); + RT_INTERFACE!{interface ILaunchUriResult(ILaunchUriResultVtbl): IInspectable(IInspectableVtbl) [IID_ILaunchUriResult] { + fn get_Status(&mut self, out: *mut LaunchUriStatus) -> HRESULT, + fn get_Result(&mut self, out: *mut *mut super::foundation::collections::ValueSet) -> HRESULT + }} + impl ILaunchUriResult { + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_result(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Result)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class LaunchUriResult: ILaunchUriResult} + DEFINE_IID!(IID_ILauncherUIOptions, 455465582, 35494, 16873, 130, 81, 65, 101, 245, 152, 95, 73); + RT_INTERFACE!{interface ILauncherUIOptions(ILauncherUIOptionsVtbl): IInspectable(IInspectableVtbl) [IID_ILauncherUIOptions] { + fn get_InvocationPoint(&mut self, out: *mut *mut super::foundation::IReference) -> HRESULT, + fn put_InvocationPoint(&mut self, value: *mut super::foundation::IReference) -> HRESULT, + fn get_SelectionRect(&mut self, out: *mut *mut super::foundation::IReference) -> HRESULT, + fn put_SelectionRect(&mut self, value: *mut super::foundation::IReference) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_PreferredPlacement(&mut self, out: *mut super::ui::popups::Placement) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_PreferredPlacement(&mut self, value: super::ui::popups::Placement) -> HRESULT + }} + impl ILauncherUIOptions { + #[inline] pub unsafe fn get_invocation_point(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InvocationPoint)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_invocation_point(&mut self, value: &super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_InvocationPoint)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_rect(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionRect)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_selection_rect(&mut self, value: &super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectionRect)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_preferred_placement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreferredPlacement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_preferred_placement(&mut self, value: super::ui::popups::Placement) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreferredPlacement)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class LauncherUIOptions: ILauncherUIOptions} + DEFINE_IID!(IID_ILauncherOptions, 3136954840, 45169, 19672, 133, 62, 52, 18, 3, 229, 87, 211); + RT_INTERFACE!{interface ILauncherOptions(ILauncherOptionsVtbl): IInspectable(IInspectableVtbl) [IID_ILauncherOptions] { + fn get_TreatAsUntrusted(&mut self, out: *mut bool) -> HRESULT, + fn put_TreatAsUntrusted(&mut self, value: bool) -> HRESULT, + fn get_DisplayApplicationPicker(&mut self, out: *mut bool) -> HRESULT, + fn put_DisplayApplicationPicker(&mut self, value: bool) -> HRESULT, + fn get_UI(&mut self, out: *mut *mut LauncherUIOptions) -> HRESULT, + fn get_PreferredApplicationPackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PreferredApplicationPackageFamilyName(&mut self, value: HSTRING) -> HRESULT, + fn get_PreferredApplicationDisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PreferredApplicationDisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_FallbackUri(&mut self, out: *mut *mut super::foundation::Uri) -> HRESULT, + fn put_FallbackUri(&mut self, value: *mut super::foundation::Uri) -> HRESULT, + fn get_ContentType(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ContentType(&mut self, value: HSTRING) -> HRESULT + }} + impl ILauncherOptions { + #[inline] pub unsafe fn get_treat_as_untrusted(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TreatAsUntrusted)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_treat_as_untrusted(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_TreatAsUntrusted)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_application_picker(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DisplayApplicationPicker)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_application_picker(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayApplicationPicker)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ui(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UI)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_preferred_application_package_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreferredApplicationPackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_preferred_application_package_family_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreferredApplicationPackageFamilyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_preferred_application_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreferredApplicationDisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_preferred_application_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreferredApplicationDisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_fallback_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FallbackUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_fallback_uri(&mut self, value: &super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_FallbackUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_type(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentType)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_type(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentType)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILauncherOptions2, 1000378036, 28224, 19918, 161, 163, 47, 83, 149, 10, 251, 73); + RT_INTERFACE!{interface ILauncherOptions2(ILauncherOptions2Vtbl): IInspectable(IInspectableVtbl) [IID_ILauncherOptions2] { + fn get_TargetApplicationPackageFamilyName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_TargetApplicationPackageFamilyName(&mut self, value: HSTRING) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_NeighboringFilesQuery(&mut self, out: *mut *mut super::storage::search::StorageFileQueryResult) -> HRESULT, + #[cfg(feature="windows.storage")] fn put_NeighboringFilesQuery(&mut self, value: *mut super::storage::search::StorageFileQueryResult) -> HRESULT + }} + impl ILauncherOptions2 { + #[inline] pub unsafe fn get_target_application_package_family_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TargetApplicationPackageFamilyName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_target_application_package_family_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetApplicationPackageFamilyName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_neighboring_files_query(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NeighboringFilesQuery)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_neighboring_files_query(&mut self, value: &super::storage::search::StorageFileQueryResult) -> Result<()> { + let hr = ((*self.lpVtbl).put_NeighboringFilesQuery)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILauncherOptions3, 4034332245, 19299, 20026, 145, 7, 78, 104, 120, 65, 146, 58); + RT_INTERFACE!{interface ILauncherOptions3(ILauncherOptions3Vtbl): IInspectable(IInspectableVtbl) [IID_ILauncherOptions3] { + fn get_IgnoreAppUriHandlers(&mut self, out: *mut bool) -> HRESULT, + fn put_IgnoreAppUriHandlers(&mut self, value: bool) -> HRESULT + }} + impl ILauncherOptions3 { + #[inline] pub unsafe fn get_ignore_app_uri_handlers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IgnoreAppUriHandlers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_ignore_app_uri_handlers(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IgnoreAppUriHandlers)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILauncherViewOptions, 2325424625, 31911, 18910, 155, 211, 60, 91, 113, 132, 246, 22); + RT_INTERFACE!{interface ILauncherViewOptions(ILauncherViewOptionsVtbl): IInspectable(IInspectableVtbl) [IID_ILauncherViewOptions] { + #[cfg(feature="windows.ui")] fn get_DesiredRemainingView(&mut self, out: *mut super::ui::viewmanagement::ViewSizePreference) -> HRESULT, + #[cfg(feature="windows.ui")] fn put_DesiredRemainingView(&mut self, value: super::ui::viewmanagement::ViewSizePreference) -> HRESULT + }} + impl ILauncherViewOptions { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_desired_remaining_view(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredRemainingView)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_desired_remaining_view(&mut self, value: super::ui::viewmanagement::ViewSizePreference) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredRemainingView)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class LauncherOptions: ILauncherOptions} + DEFINE_IID!(IID_IRemoteLauncherOptions, 2654611336, 10385, 19679, 162, 214, 157, 255, 125, 2, 230, 147); + RT_INTERFACE!{interface IRemoteLauncherOptions(IRemoteLauncherOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteLauncherOptions] { + fn get_FallbackUri(&mut self, out: *mut *mut super::foundation::Uri) -> HRESULT, + fn put_FallbackUri(&mut self, value: *mut super::foundation::Uri) -> HRESULT, + fn get_PreferredAppIds(&mut self, out: *mut *mut super::foundation::collections::IVector) -> HRESULT + }} + impl IRemoteLauncherOptions { + #[inline] pub unsafe fn get_fallback_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FallbackUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_fallback_uri(&mut self, value: &super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_FallbackUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_preferred_app_ids(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreferredAppIds)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RemoteLauncherOptions: IRemoteLauncherOptions} + DEFINE_IID!(IID_IFolderLauncherOptions, 3146891901, 27527, 17194, 189, 4, 119, 108, 111, 95, 178, 171); + RT_INTERFACE!{interface IFolderLauncherOptions(IFolderLauncherOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IFolderLauncherOptions] { + #[cfg(feature="windows.storage")] fn get_ItemsToSelect(&mut self, out: *mut *mut super::foundation::collections::IVector) -> HRESULT + }} + impl IFolderLauncherOptions { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_items_to_select(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemsToSelect)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FolderLauncherOptions: IFolderLauncherOptions} + DEFINE_IID!(IID_ILauncherStatics, 661737923, 40510, 17142, 145, 164, 93, 253, 235, 35, 36, 81); + RT_INTERFACE!{static interface ILauncherStatics(ILauncherStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILauncherStatics] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn LaunchFileAsync(&mut self, file: *mut super::storage::IStorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.storage")] fn LaunchFileWithOptionsAsync(&mut self, file: *mut super::storage::IStorageFile, options: *mut LauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriAsync(&mut self, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithOptionsAsync(&mut self, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl ILauncherStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn launch_file_async(&mut self, file: &super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchFileAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn launch_file_with_options_async(&mut self, file: &super::storage::IStorageFile, options: &LauncherOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchFileWithOptionsAsync)(self, file as *const _ as *mut _, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_uri_async(&mut self, uri: &super::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriAsync)(self, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_uri_with_options_async(&mut self, uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriWithOptionsAsync)(self, uri as *const _ as *mut _, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILauncherStatics2, 1505374139, 9419, 19458, 164, 196, 130, 148, 86, 157, 84, 241); + RT_INTERFACE!{static interface ILauncherStatics2(ILauncherStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ILauncherStatics2] { + fn LaunchUriForResultsAsync(&mut self, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriForResultsWithDataAsync(&mut self, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, inputData: *mut super::foundation::collections::ValueSet, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithDataAsync(&mut self, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, inputData: *mut super::foundation::collections::ValueSet, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn QueryUriSupportAsync(&mut self, uri: *mut super::foundation::Uri, launchQuerySupportType: LaunchQuerySupportType, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn QueryUriSupportWithPackageFamilyNameAsync(&mut self, uri: *mut super::foundation::Uri, launchQuerySupportType: LaunchQuerySupportType, packageFamilyName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn QueryFileSupportAsync(&mut self, file: *mut super::storage::StorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.storage")] fn QueryFileSupportWithPackageFamilyNameAsync(&mut self, file: *mut super::storage::StorageFile, packageFamilyName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindUriSchemeHandlersAsync(&mut self, scheme: HSTRING, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindUriSchemeHandlersWithLaunchUriTypeAsync(&mut self, scheme: HSTRING, launchQuerySupportType: LaunchQuerySupportType, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn FindFileHandlersAsync(&mut self, extension: HSTRING, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT + }} + impl ILauncherStatics2 { + #[inline] pub unsafe fn launch_uri_for_results_async(&mut self, uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriForResultsAsync)(self, uri as *const _ as *mut _, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_uri_for_results_with_data_async(&mut self, uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriForResultsWithDataAsync)(self, uri as *const _ as *mut _, options as *const _ as *mut _, inputData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_uri_with_data_async(&mut self, uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriWithDataAsync)(self, uri as *const _ as *mut _, options as *const _ as *mut _, inputData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn query_uri_support_async(&mut self, uri: &super::foundation::Uri, launchQuerySupportType: LaunchQuerySupportType) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).QueryUriSupportAsync)(self, uri as *const _ as *mut _, launchQuerySupportType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn query_uri_support_with_package_family_name_async(&mut self, uri: &super::foundation::Uri, launchQuerySupportType: LaunchQuerySupportType, packageFamilyName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).QueryUriSupportWithPackageFamilyNameAsync)(self, uri as *const _ as *mut _, launchQuerySupportType, packageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn query_file_support_async(&mut self, file: &super::storage::StorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).QueryFileSupportAsync)(self, file as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn query_file_support_with_package_family_name_async(&mut self, file: &super::storage::StorageFile, packageFamilyName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).QueryFileSupportWithPackageFamilyNameAsync)(self, file as *const _ as *mut _, packageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_uri_scheme_handlers_async(&mut self, scheme: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindUriSchemeHandlersAsync)(self, scheme.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_uri_scheme_handlers_with_launch_uri_type_async(&mut self, scheme: &HStringArg, launchQuerySupportType: LaunchQuerySupportType) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindUriSchemeHandlersWithLaunchUriTypeAsync)(self, scheme.get(), launchQuerySupportType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_file_handlers_async(&mut self, extension: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindFileHandlersAsync)(self, extension.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILauncherStatics3, 591552936, 40371, 18051, 170, 66, 220, 111, 81, 211, 56, 71); + RT_INTERFACE!{static interface ILauncherStatics3(ILauncherStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_ILauncherStatics3] { + #[cfg(feature="windows.storage")] fn LaunchFolderAsync(&mut self, folder: *mut super::storage::IStorageFolder, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn LaunchFolderWithOptionsAsync(&mut self, folder: *mut super::storage::IStorageFolder, options: *mut FolderLauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl ILauncherStatics3 { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn launch_folder_async(&mut self, folder: &super::storage::IStorageFolder) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchFolderAsync)(self, folder as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn launch_folder_with_options_async(&mut self, folder: &super::storage::IStorageFolder, options: &FolderLauncherOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchFolderWithOptionsAsync)(self, folder as *const _ as *mut _, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILauncherStatics4, 3119284639, 46501, 16838, 179, 179, 221, 27, 49, 120, 188, 242); + RT_INTERFACE!{static interface ILauncherStatics4(ILauncherStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_ILauncherStatics4] { + fn QueryAppUriSupportAsync(&mut self, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn QueryAppUriSupportWithPackageFamilyNameAsync(&mut self, uri: *mut super::foundation::Uri, packageFamilyName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn FindAppUriHandlersAsync(&mut self, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn LaunchUriForUserAsync(&mut self, user: *mut User, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithOptionsForUserAsync(&mut self, user: *mut User, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithDataForUserAsync(&mut self, user: *mut User, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, inputData: *mut super::foundation::collections::ValueSet, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriForResultsForUserAsync(&mut self, user: *mut User, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriForResultsWithDataForUserAsync(&mut self, user: *mut User, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, inputData: *mut super::foundation::collections::ValueSet, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl ILauncherStatics4 { + #[inline] pub unsafe fn query_app_uri_support_async(&mut self, uri: &super::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).QueryAppUriSupportAsync)(self, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn query_app_uri_support_with_package_family_name_async(&mut self, uri: &super::foundation::Uri, packageFamilyName: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).QueryAppUriSupportWithPackageFamilyNameAsync)(self, uri as *const _ as *mut _, packageFamilyName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn find_app_uri_handlers_async(&mut self, uri: &super::foundation::Uri) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAppUriHandlersAsync)(self, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_uri_for_user_async(&mut self, user: &User, uri: &super::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriForUserAsync)(self, user as *const _ as *mut _, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_uri_with_options_for_user_async(&mut self, user: &User, uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriWithOptionsForUserAsync)(self, user as *const _ as *mut _, uri as *const _ as *mut _, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_uri_with_data_for_user_async(&mut self, user: &User, uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriWithDataForUserAsync)(self, user as *const _ as *mut _, uri as *const _ as *mut _, options as *const _ as *mut _, inputData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_uri_for_results_for_user_async(&mut self, user: &User, uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriForResultsForUserAsync)(self, user as *const _ as *mut _, uri as *const _ as *mut _, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_uri_for_results_with_data_for_user_async(&mut self, user: &User, uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriForResultsWithDataForUserAsync)(self, user as *const _ as *mut _, uri as *const _ as *mut _, options as *const _ as *mut _, inputData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ILauncherStatics4 [CLSID_Launcher]} + RT_ACTIVATABLE!{ILauncherStatics [CLSID_Launcher]} + RT_ACTIVATABLE!{ILauncherStatics3 [CLSID_Launcher]} + RT_ACTIVATABLE!{ILauncherStatics2 [CLSID_Launcher]} + DEFINE_CLSID!(CLSID_Launcher = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,76,97,117,110,99,104,101,114,0]); + DEFINE_IID!(IID_IRemoteLauncherStatics, 3621485203, 41740, 18615, 159, 33, 5, 16, 38, 164, 229, 23); + RT_INTERFACE!{static interface IRemoteLauncherStatics(IRemoteLauncherStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteLauncherStatics] { + fn LaunchUriAsync(&mut self, remoteSystemConnectionRequest: *mut remotesystems::RemoteSystemConnectionRequest, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithOptionsAsync(&mut self, remoteSystemConnectionRequest: *mut remotesystems::RemoteSystemConnectionRequest, uri: *mut super::foundation::Uri, options: *mut RemoteLauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithDataAsync(&mut self, remoteSystemConnectionRequest: *mut remotesystems::RemoteSystemConnectionRequest, uri: *mut super::foundation::Uri, options: *mut RemoteLauncherOptions, inputData: *mut super::foundation::collections::ValueSet, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + }} + impl IRemoteLauncherStatics { + #[inline] pub unsafe fn launch_uri_async(&mut self, remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &super::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriAsync)(self, remoteSystemConnectionRequest as *const _ as *mut _, uri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_uri_with_options_async(&mut self, remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &super::foundation::Uri, options: &RemoteLauncherOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriWithOptionsAsync)(self, remoteSystemConnectionRequest as *const _ as *mut _, uri as *const _ as *mut _, options as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn launch_uri_with_data_async(&mut self, remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &super::foundation::Uri, options: &RemoteLauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LaunchUriWithDataAsync)(self, remoteSystemConnectionRequest as *const _ as *mut _, uri as *const _ as *mut _, options as *const _ as *mut _, inputData as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IRemoteLauncherStatics [CLSID_RemoteLauncher]} + DEFINE_CLSID!(CLSID_RemoteLauncher = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,82,101,109,111,116,101,76,97,117,110,99,104,101,114,0]); +pub mod userprofile { // Windows.System.UserProfile +use ::prelude::*; + DEFINE_IID!(IID_IAdvertisingManagerStatics, 2916304524, 41587, 18635, 179, 70, 53, 68, 82, 45, 85, 129); + RT_INTERFACE!{static interface IAdvertisingManagerStatics(IAdvertisingManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAdvertisingManagerStatics] { + fn get_AdvertisingId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAdvertisingManagerStatics { + #[inline] pub unsafe fn get_advertising_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AdvertisingId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdvertisingManagerForUser, 2458645456, 53116, 19120, 167, 220, 109, 197, 188, 212, 66, 82); + RT_INTERFACE!{interface IAdvertisingManagerForUser(IAdvertisingManagerForUserVtbl): IInspectable(IInspectableVtbl) [IID_IAdvertisingManagerForUser] { + fn get_AdvertisingId(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_User(&mut self, out: *mut *mut super::User) -> HRESULT + }} + impl IAdvertisingManagerForUser { + #[inline] pub unsafe fn get_advertising_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AdvertisingId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdvertisingManagerStatics2, 3708372911, 6765, 18096, 149, 188, 243, 249, 214, 190, 185, 251); + RT_INTERFACE!{static interface IAdvertisingManagerStatics2(IAdvertisingManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdvertisingManagerStatics2] { + fn GetForUser(&mut self, user: *mut super::User, out: *mut *mut AdvertisingManagerForUser) -> HRESULT + }} + impl IAdvertisingManagerStatics2 { + #[inline] pub unsafe fn get_for_user(&mut self, user: &super::User) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForUser)(self, user as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AdvertisingManagerForUser: IAdvertisingManagerForUser} + RT_ACTIVATABLE!{IAdvertisingManagerStatics2 [CLSID_AdvertisingManager]} + RT_ACTIVATABLE!{IAdvertisingManagerStatics [CLSID_AdvertisingManager]} + DEFINE_CLSID!(CLSID_AdvertisingManager = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,85,115,101,114,80,114,111,102,105,108,101,46,65,100,118,101,114,116,105,115,105,110,103,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IUserProfilePersonalizationSettings, 2364398260, 31128, 18133, 141, 211, 24, 79, 28, 95, 154, 185); + RT_INTERFACE!{interface IUserProfilePersonalizationSettings(IUserProfilePersonalizationSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IUserProfilePersonalizationSettings] { + #[cfg(feature="windows.storage")] fn TrySetLockScreenImageAsync(&mut self, imageFile: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows.storage")] fn TrySetWallpaperImageAsync(&mut self, imageFile: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IUserProfilePersonalizationSettings { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn try_set_lock_screen_image_async(&mut self, imageFile: &super::super::storage::StorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TrySetLockScreenImageAsync)(self, imageFile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn try_set_wallpaper_image_async(&mut self, imageFile: &super::super::storage::StorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TrySetWallpaperImageAsync)(self, imageFile as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserProfilePersonalizationSettingsStatics, 2444015681, 20535, 17739, 152, 131, 187, 119, 45, 8, 221, 22); + RT_INTERFACE!{static interface IUserProfilePersonalizationSettingsStatics(IUserProfilePersonalizationSettingsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUserProfilePersonalizationSettingsStatics] { + fn get_Current(&mut self, out: *mut *mut UserProfilePersonalizationSettings) -> HRESULT, + fn IsSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IUserProfilePersonalizationSettingsStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class UserProfilePersonalizationSettings: IUserProfilePersonalizationSettings} + RT_ACTIVATABLE!{IUserProfilePersonalizationSettingsStatics [CLSID_UserProfilePersonalizationSettings]} + DEFINE_CLSID!(CLSID_UserProfilePersonalizationSettings = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,85,115,101,114,80,114,111,102,105,108,101,46,85,115,101,114,80,114,111,102,105,108,101,80,101,114,115,111,110,97,108,105,122,97,116,105,111,110,83,101,116,116,105,110,103,115,0]); + DEFINE_IID!(IID_IGlobalizationPreferencesStatics, 29311782, 60727, 20118, 176, 233, 193, 52, 13, 30, 161, 88); + RT_INTERFACE!{static interface IGlobalizationPreferencesStatics(IGlobalizationPreferencesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGlobalizationPreferencesStatics] { + fn get_Calendars(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Clocks(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Currencies(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Languages(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_HomeGeographicRegion(&mut self, out: *mut HSTRING) -> HRESULT, + #[cfg(feature="windows.globalization")] fn get_WeekStartsOn(&mut self, out: *mut super::super::globalization::DayOfWeek) -> HRESULT + }} + impl IGlobalizationPreferencesStatics { + #[inline] pub unsafe fn get_calendars(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Calendars)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_clocks(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Clocks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_currencies(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Currencies)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_languages(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Languages)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_home_geographic_region(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HomeGeographicRegion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_week_starts_on(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WeekStartsOn)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IGlobalizationPreferencesStatics [CLSID_GlobalizationPreferences]} + DEFINE_CLSID!(CLSID_GlobalizationPreferences = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,85,115,101,114,80,114,111,102,105,108,101,46,71,108,111,98,97,108,105,122,97,116,105,111,110,80,114,101,102,101,114,101,110,99,101,115,0]); + DEFINE_IID!(IID_IFirstSignInSettings, 1049907539, 14942, 17710, 166, 1, 245, 186, 173, 42, 72, 112); + RT_INTERFACE!{interface IFirstSignInSettings(IFirstSignInSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IFirstSignInSettings] { + + }} + DEFINE_IID!(IID_IFirstSignInSettingsStatics, 484544271, 7233, 20128, 183, 162, 111, 12, 28, 126, 132, 56); + RT_INTERFACE!{static interface IFirstSignInSettingsStatics(IFirstSignInSettingsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFirstSignInSettingsStatics] { + fn GetDefault(&mut self, out: *mut *mut FirstSignInSettings) -> HRESULT + }} + impl IFirstSignInSettingsStatics { + #[inline] pub unsafe fn get_default(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefault)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class FirstSignInSettings: IFirstSignInSettings} + RT_ACTIVATABLE!{IFirstSignInSettingsStatics [CLSID_FirstSignInSettings]} + DEFINE_CLSID!(CLSID_FirstSignInSettings = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,85,115,101,114,80,114,111,102,105,108,101,46,70,105,114,115,116,83,105,103,110,73,110,83,101,116,116,105,110,103,115,0]); + RT_STRUCT! { struct UserProfileContract { + + }} + RT_ENUM! { enum AccountPictureKind: i32 { + SmallImage (AccountPictureKind_SmallImage) = 0, LargeImage (AccountPictureKind_LargeImage) = 1, Video (AccountPictureKind_Video) = 2, + }} + RT_ENUM! { enum SetAccountPictureResult: i32 { + Success (SetAccountPictureResult_Success) = 0, ChangeDisabled (SetAccountPictureResult_ChangeDisabled) = 1, LargeOrDynamicError (SetAccountPictureResult_LargeOrDynamicError) = 2, VideoFrameSizeError (SetAccountPictureResult_VideoFrameSizeError) = 3, FileSizeError (SetAccountPictureResult_FileSizeError) = 4, Failure (SetAccountPictureResult_Failure) = 5, + }} + RT_ENUM! { enum SetImageFeedResult: i32 { + Success (SetImageFeedResult_Success) = 0, ChangeDisabled (SetImageFeedResult_ChangeDisabled) = 1, UserCanceled (SetImageFeedResult_UserCanceled) = 2, + }} + DEFINE_IID!(IID_IUserInformationStatics, 2012457232, 18682, 18588, 147, 78, 42, 232, 91, 168, 247, 114); + RT_INTERFACE!{static interface IUserInformationStatics(IUserInformationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUserInformationStatics] { + fn get_AccountPictureChangeEnabled(&mut self, out: *mut bool) -> HRESULT, + fn get_NameAccessAllowed(&mut self, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetAccountPicture(&mut self, kind: AccountPictureKind, out: *mut *mut super::super::storage::IStorageFile) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SetAccountPictureAsync(&mut self, image: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SetAccountPicturesAsync(&mut self, smallImage: *mut super::super::storage::IStorageFile, largeImage: *mut super::super::storage::IStorageFile, video: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SetAccountPictureFromStreamAsync(&mut self, image: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SetAccountPicturesFromStreamsAsync(&mut self, smallImage: *mut super::super::storage::streams::IRandomAccessStream, largeImage: *mut super::super::storage::streams::IRandomAccessStream, video: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_AccountPictureChanged(&mut self, changeHandler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccountPictureChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetDisplayNameAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetFirstNameAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetLastNameAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetPrincipalNameAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetSessionInitiationProtocolUriAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDomainNameAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IUserInformationStatics { + #[inline] pub unsafe fn get_account_picture_change_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AccountPictureChangeEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_name_access_allowed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NameAccessAllowed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_account_picture(&mut self, kind: AccountPictureKind) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAccountPicture)(self, kind, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_account_picture_async(&mut self, image: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetAccountPictureAsync)(self, image as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_account_pictures_async(&mut self, smallImage: &super::super::storage::IStorageFile, largeImage: &super::super::storage::IStorageFile, video: &super::super::storage::IStorageFile) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetAccountPicturesAsync)(self, smallImage as *const _ as *mut _, largeImage as *const _ as *mut _, video as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_account_picture_from_stream_async(&mut self, image: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetAccountPictureFromStreamAsync)(self, image as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_account_pictures_from_streams_async(&mut self, smallImage: &super::super::storage::streams::IRandomAccessStream, largeImage: &super::super::storage::streams::IRandomAccessStream, video: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetAccountPicturesFromStreamsAsync)(self, smallImage as *const _ as *mut _, largeImage as *const _ as *mut _, video as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_account_picture_changed(&mut self, changeHandler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AccountPictureChanged)(self, changeHandler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_account_picture_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AccountPictureChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDisplayNameAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_name_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetFirstNameAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_last_name_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetLastNameAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_principal_name_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPrincipalNameAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_session_initiation_protocol_uri_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSessionInitiationProtocolUriAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_domain_name_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDomainNameAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IUserInformationStatics [CLSID_UserInformation]} + DEFINE_CLSID!(CLSID_UserInformation = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,85,115,101,114,80,114,111,102,105,108,101,46,85,115,101,114,73,110,102,111,114,109,97,116,105,111,110,0]); + RT_STRUCT! { struct UserProfileLockScreenContract { + + }} + DEFINE_IID!(IID_ILockScreenStatics, 1055511469, 46599, 16558, 180, 38, 118, 49, 217, 130, 18, 105); + RT_INTERFACE!{static interface ILockScreenStatics(ILockScreenStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenStatics] { + fn get_OriginalImageFile(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + #[cfg(feature="windows.storage")] fn GetImageStream(&mut self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + #[cfg(feature="windows.storage")] fn SetImageFileAsync(&mut self, value: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows.storage")] fn SetImageStreamAsync(&mut self, value: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl ILockScreenStatics { + #[inline] pub unsafe fn get_original_image_file(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OriginalImageFile)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_image_stream(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetImageStream)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_image_file_async(&mut self, value: &super::super::storage::IStorageFile) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetImageFileAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_image_stream_async(&mut self, value: &super::super::storage::streams::IRandomAccessStream) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SetImageStreamAsync)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILockScreenImageFeedStatics, 739079158, 937, 16806, 155, 1, 73, 82, 81, 255, 81, 213); + RT_INTERFACE!{static interface ILockScreenImageFeedStatics(ILockScreenImageFeedStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenImageFeedStatics] { + fn RequestSetImageFeedAsync(&mut self, syndicationFeedUri: *mut super::super::foundation::Uri, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryRemoveImageFeed(&mut self, out: *mut bool) -> HRESULT + }} + impl ILockScreenImageFeedStatics { + #[inline] pub unsafe fn request_set_image_feed_async(&mut self, syndicationFeedUri: &super::super::foundation::Uri) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestSetImageFeedAsync)(self, syndicationFeedUri as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_remove_image_feed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryRemoveImageFeed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ILockScreenStatics [CLSID_LockScreen]} + RT_ACTIVATABLE!{ILockScreenImageFeedStatics [CLSID_LockScreen]} + DEFINE_CLSID!(CLSID_LockScreen = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,85,115,101,114,80,114,111,102,105,108,101,46,76,111,99,107,83,99,114,101,101,110,0]); +} // Windows.System.UserProfile +pub mod profile { // Windows.System.Profile +use ::prelude::*; + DEFINE_IID!(IID_IAnalyticsInfoStatics, 492757094, 6285, 23465, 67, 135, 172, 174, 176, 231, 227, 5); + RT_INTERFACE!{static interface IAnalyticsInfoStatics(IAnalyticsInfoStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAnalyticsInfoStatics] { + fn get_VersionInfo(&mut self, out: *mut *mut AnalyticsVersionInfo) -> HRESULT, + fn get_DeviceForm(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAnalyticsInfoStatics { + #[inline] pub unsafe fn get_version_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VersionInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_form(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceForm)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AnalyticsVersionInfo: IAnalyticsVersionInfo} + DEFINE_IID!(IID_IAnalyticsVersionInfo, 2455843000, 39253, 19572, 189, 193, 124, 208, 222, 207, 155, 3); + RT_INTERFACE!{interface IAnalyticsVersionInfo(IAnalyticsVersionInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAnalyticsVersionInfo] { + fn get_DeviceFamily(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DeviceFamilyVersion(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAnalyticsVersionInfo { + #[inline] pub unsafe fn get_device_family(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceFamily)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_family_version(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceFamilyVersion)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IAnalyticsInfoStatics [CLSID_AnalyticsInfo]} + DEFINE_CLSID!(CLSID_AnalyticsInfo = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,114,111,102,105,108,101,46,65,110,97,108,121,116,105,99,115,73,110,102,111,0]); + RT_ENUM! { enum SystemIdentificationSource: i32 { + None (SystemIdentificationSource_None) = 0, Tpm (SystemIdentificationSource_Tpm) = 1, Uefi (SystemIdentificationSource_Uefi) = 2, + }} + DEFINE_IID!(IID_ISystemIdentificationInfo, 207986301, 50114, 19763, 162, 223, 33, 188, 65, 145, 110, 179); + RT_INTERFACE!{interface ISystemIdentificationInfo(ISystemIdentificationInfoVtbl): IInspectable(IInspectableVtbl) [IID_ISystemIdentificationInfo] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn get_Id(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + fn get_Source(&mut self, out: *mut SystemIdentificationSource) -> HRESULT + }} + impl ISystemIdentificationInfo { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_source(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SystemIdentificationInfo: ISystemIdentificationInfo} + DEFINE_IID!(IID_ISystemIdentificationStatics, 1434580010, 54239, 19859, 163, 125, 196, 26, 97, 108, 109, 1); + RT_INTERFACE!{static interface ISystemIdentificationStatics(ISystemIdentificationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISystemIdentificationStatics] { + fn GetSystemIdForPublisher(&mut self, out: *mut *mut SystemIdentificationInfo) -> HRESULT, + fn GetSystemIdForUser(&mut self, user: *mut super::User, out: *mut *mut SystemIdentificationInfo) -> HRESULT + }} + impl ISystemIdentificationStatics { + #[inline] pub unsafe fn get_system_id_for_publisher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSystemIdForPublisher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_id_for_user(&mut self, user: &super::User) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSystemIdForUser)(self, user as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ISystemIdentificationStatics [CLSID_SystemIdentification]} + DEFINE_CLSID!(CLSID_SystemIdentification = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,114,111,102,105,108,101,46,83,121,115,116,101,109,73,100,101,110,116,105,102,105,99,97,116,105,111,110,0]); + RT_ENUM! { enum PlatformDataCollectionLevel: i32 { + Security (PlatformDataCollectionLevel_Security) = 0, Basic (PlatformDataCollectionLevel_Basic) = 1, Enhanced (PlatformDataCollectionLevel_Enhanced) = 2, Full (PlatformDataCollectionLevel_Full) = 3, + }} + DEFINE_IID!(IID_IPlatformDiagnosticsAndUsageDataSettingsStatics, 3068283931, 31516, 19250, 140, 98, 166, 101, 151, 206, 114, 58); + RT_INTERFACE!{static interface IPlatformDiagnosticsAndUsageDataSettingsStatics(IPlatformDiagnosticsAndUsageDataSettingsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPlatformDiagnosticsAndUsageDataSettingsStatics] { + fn get_CollectionLevel(&mut self, out: *mut PlatformDataCollectionLevel) -> HRESULT, + fn add_CollectionLevelChanged(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CollectionLevelChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn CanCollectDiagnostics(&mut self, level: PlatformDataCollectionLevel, out: *mut bool) -> HRESULT + }} + impl IPlatformDiagnosticsAndUsageDataSettingsStatics { + #[inline] pub unsafe fn get_collection_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CollectionLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_collection_level_changed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CollectionLevelChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_collection_level_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CollectionLevelChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn can_collect_diagnostics(&mut self, level: PlatformDataCollectionLevel) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanCollectDiagnostics)(self, level, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPlatformDiagnosticsAndUsageDataSettingsStatics [CLSID_PlatformDiagnosticsAndUsageDataSettings]} + DEFINE_CLSID!(CLSID_PlatformDiagnosticsAndUsageDataSettings = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,114,111,102,105,108,101,46,80,108,97,116,102,111,114,109,68,105,97,103,110,111,115,116,105,99,115,65,110,100,85,115,97,103,101,68,97,116,97,83,101,116,116,105,110,103,115,0]); + RT_STRUCT! { struct ProfileHardwareTokenContract { + + }} + DEFINE_IID!(IID_IHardwareToken, 687264960, 64274, 16548, 129, 103, 127, 78, 3, 210, 114, 76); + RT_INTERFACE!{interface IHardwareToken(IHardwareTokenVtbl): IInspectable(IInspectableVtbl) [IID_IHardwareToken] { + #[cfg(feature="windows.storage")] fn get_Id(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Signature(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, + #[cfg(feature="windows.storage")] fn get_Certificate(&mut self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT + }} + impl IHardwareToken { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_signature(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Signature)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_certificate(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Certificate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class HardwareToken: IHardwareToken} + DEFINE_IID!(IID_IHardwareIdentificationStatics, 2534564064, 61808, 19010, 189, 85, 169, 0, 178, 18, 218, 226); + RT_INTERFACE!{static interface IHardwareIdentificationStatics(IHardwareIdentificationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IHardwareIdentificationStatics] { + #[cfg(feature="windows.storage")] fn GetPackageSpecificToken(&mut self, nonce: *mut super::super::storage::streams::IBuffer, out: *mut *mut HardwareToken) -> HRESULT + }} + impl IHardwareIdentificationStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_package_specific_token(&mut self, nonce: &super::super::storage::streams::IBuffer) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPackageSpecificToken)(self, nonce as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IHardwareIdentificationStatics [CLSID_HardwareIdentification]} + DEFINE_CLSID!(CLSID_HardwareIdentification = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,114,111,102,105,108,101,46,72,97,114,100,119,97,114,101,73,100,101,110,116,105,102,105,99,97,116,105,111,110,0]); + RT_STRUCT! { struct ProfileSharedModeContract { + + }} + DEFINE_IID!(IID_ISharedModeSettingsStatics, 2302538766, 51926, 19792, 140, 73, 111, 207, 192, 62, 219, 41); + RT_INTERFACE!{static interface ISharedModeSettingsStatics(ISharedModeSettingsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISharedModeSettingsStatics] { + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT + }} + impl ISharedModeSettingsStatics { + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ISharedModeSettingsStatics [CLSID_SharedModeSettings]} + DEFINE_CLSID!(CLSID_SharedModeSettings = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,114,111,102,105,108,101,46,83,104,97,114,101,100,77,111,100,101,83,101,116,116,105,110,103,115,0]); + RT_STRUCT! { struct ProfileRetailInfoContract { + + }} + DEFINE_IID!(IID_IRetailInfoStatics, 118671032, 35730, 20266, 132, 153, 3, 31, 23, 152, 214, 239); + RT_INTERFACE!{static interface IRetailInfoStatics(IRetailInfoStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRetailInfoStatics] { + fn get_IsDemoModeEnabled(&mut self, out: *mut bool) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + }} + impl IRetailInfoStatics { + #[inline] pub unsafe fn get_is_demo_mode_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDemoModeEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownRetailInfoPropertiesStatics, 2572620152, 20495, 18558, 142, 117, 41, 229, 81, 114, 135, 18); + RT_INTERFACE!{static interface IKnownRetailInfoPropertiesStatics(IKnownRetailInfoPropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownRetailInfoPropertiesStatics] { + fn get_RetailAccessCode(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ManufacturerName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ModelName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayModelName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Price(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsFeatured(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FormFactor(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ScreenSize(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Weight(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_DisplayDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BatteryLifeDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ProcessorDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Memory(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_StorageDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_GraphicsDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FrontCameraDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RearCameraDescription(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HasNfc(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HasSdSlot(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HasOpticalDrive(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_IsOfficeInstalled(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_WindowsEdition(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownRetailInfoPropertiesStatics { + #[inline] pub unsafe fn get_retail_access_code(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RetailAccessCode)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manufacturer_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ManufacturerName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_model_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ModelName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_model_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayModelName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_price(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Price)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_featured(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsFeatured)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_form_factor(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FormFactor)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_screen_size(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ScreenSize)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_weight(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Weight)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_battery_life_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BatteryLifeDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_processor_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProcessorDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_memory(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Memory)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_storage_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StorageDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_graphics_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GraphicsDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_front_camera_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FrontCameraDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rear_camera_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RearCameraDescription)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_nfc(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HasNfc)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_sd_slot(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HasSdSlot)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_optical_drive(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HasOpticalDrive)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_office_installed(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsOfficeInstalled)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_windows_edition(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WindowsEdition)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IRetailInfoStatics [CLSID_RetailInfo]} + DEFINE_CLSID!(CLSID_RetailInfo = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,114,111,102,105,108,101,46,82,101,116,97,105,108,73,110,102,111,0]); + RT_ACTIVATABLE!{IKnownRetailInfoPropertiesStatics [CLSID_KnownRetailInfoProperties]} + DEFINE_CLSID!(CLSID_KnownRetailInfoProperties = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,114,111,102,105,108,101,46,75,110,111,119,110,82,101,116,97,105,108,73,110,102,111,80,114,111,112,101,114,116,105,101,115,0]); +pub mod systemmanufacturers { // Windows.System.Profile.SystemManufacturers +use ::prelude::*; + RT_STRUCT! { struct SystemManufacturersContract { + + }} + DEFINE_IID!(IID_ISmbiosInformationStatics, 135055996, 25468, 18628, 183, 40, 249, 39, 56, 18, 219, 142); + RT_INTERFACE!{static interface ISmbiosInformationStatics(ISmbiosInformationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmbiosInformationStatics] { + fn get_SerialNumber(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ISmbiosInformationStatics { + #[inline] pub unsafe fn get_serial_number(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SerialNumber)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ISmbiosInformationStatics [CLSID_SmbiosInformation]} + DEFINE_CLSID!(CLSID_SmbiosInformation = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,114,111,102,105,108,101,46,83,121,115,116,101,109,77,97,110,117,102,97,99,116,117,114,101,114,115,46,83,109,98,105,111,115,73,110,102,111,114,109,97,116,105,111,110,0]); +} // Windows.System.Profile.SystemManufacturers +} // Windows.System.Profile +pub mod power { // Windows.System.Power +use ::prelude::*; + RT_ENUM! { enum BatteryStatus: i32 { + NotPresent (BatteryStatus_NotPresent) = 0, Discharging (BatteryStatus_Discharging) = 1, Idle (BatteryStatus_Idle) = 2, Charging (BatteryStatus_Charging) = 3, + }} + RT_ENUM! { enum EnergySaverStatus: i32 { + Disabled (EnergySaverStatus_Disabled) = 0, Off (EnergySaverStatus_Off) = 1, On (EnergySaverStatus_On) = 2, + }} + RT_ENUM! { enum PowerSupplyStatus: i32 { + NotPresent (PowerSupplyStatus_NotPresent) = 0, Inadequate (PowerSupplyStatus_Inadequate) = 1, Adequate (PowerSupplyStatus_Adequate) = 2, + }} + DEFINE_IID!(IID_IPowerManagerStatics, 328499805, 25294, 17252, 152, 213, 170, 40, 199, 251, 209, 91); + RT_INTERFACE!{static interface IPowerManagerStatics(IPowerManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPowerManagerStatics] { + fn get_EnergySaverStatus(&mut self, out: *mut EnergySaverStatus) -> HRESULT, + fn add_EnergySaverStatusChanged(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnergySaverStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_BatteryStatus(&mut self, out: *mut BatteryStatus) -> HRESULT, + fn add_BatteryStatusChanged(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BatteryStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_PowerSupplyStatus(&mut self, out: *mut PowerSupplyStatus) -> HRESULT, + fn add_PowerSupplyStatusChanged(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PowerSupplyStatusChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_RemainingChargePercent(&mut self, out: *mut i32) -> HRESULT, + fn add_RemainingChargePercentChanged(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemainingChargePercentChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_RemainingDischargeTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn add_RemainingDischargeTimeChanged(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemainingDischargeTimeChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPowerManagerStatics { + #[inline] pub unsafe fn get_energy_saver_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EnergySaverStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_energy_saver_status_changed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnergySaverStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_energy_saver_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnergySaverStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_battery_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BatteryStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_battery_status_changed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BatteryStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_battery_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BatteryStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_power_supply_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowerSupplyStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_power_supply_status_changed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PowerSupplyStatusChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_power_supply_status_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PowerSupplyStatusChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_remaining_charge_percent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RemainingChargePercent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_remaining_charge_percent_changed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RemainingChargePercentChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_remaining_charge_percent_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RemainingChargePercentChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_remaining_discharge_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RemainingDischargeTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_remaining_discharge_time_changed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RemainingDischargeTimeChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_remaining_discharge_time_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RemainingDischargeTimeChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IPowerManagerStatics [CLSID_PowerManager]} + DEFINE_CLSID!(CLSID_PowerManager = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,111,119,101,114,46,80,111,119,101,114,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IBackgroundEnergyManagerStatics, 3004571029, 4480, 17270, 150, 225, 64, 149, 86, 129, 71, 206); + RT_INTERFACE!{static interface IBackgroundEnergyManagerStatics(IBackgroundEnergyManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundEnergyManagerStatics] { + fn get_LowUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn get_NearMaxAcceptableUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn get_MaxAcceptableUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn get_ExcessiveUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn get_NearTerminationUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn get_TerminationUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn get_RecentEnergyUsage(&mut self, out: *mut u32) -> HRESULT, + fn get_RecentEnergyUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn add_RecentEnergyUsageIncreased(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecentEnergyUsageIncreased(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RecentEnergyUsageReturnedToLow(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecentEnergyUsageReturnedToLow(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IBackgroundEnergyManagerStatics { + #[inline] pub unsafe fn get_low_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LowUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_near_max_acceptable_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NearMaxAcceptableUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_acceptable_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxAcceptableUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_excessive_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExcessiveUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_near_termination_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NearTerminationUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_termination_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TerminationUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_recent_energy_usage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RecentEnergyUsage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_recent_energy_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RecentEnergyUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_recent_energy_usage_increased(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RecentEnergyUsageIncreased)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_recent_energy_usage_increased(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RecentEnergyUsageIncreased)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_recent_energy_usage_returned_to_low(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RecentEnergyUsageReturnedToLow)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_recent_energy_usage_returned_to_low(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RecentEnergyUsageReturnedToLow)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IForegroundEnergyManagerStatics, 2683857010, 58999, 18452, 154, 32, 83, 55, 202, 115, 43, 152); + RT_INTERFACE!{static interface IForegroundEnergyManagerStatics(IForegroundEnergyManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IForegroundEnergyManagerStatics] { + fn get_LowUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn get_NearMaxAcceptableUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn get_MaxAcceptableUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn get_ExcessiveUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn get_RecentEnergyUsage(&mut self, out: *mut u32) -> HRESULT, + fn get_RecentEnergyUsageLevel(&mut self, out: *mut u32) -> HRESULT, + fn add_RecentEnergyUsageIncreased(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecentEnergyUsageIncreased(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RecentEnergyUsageReturnedToLow(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecentEnergyUsageReturnedToLow(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IForegroundEnergyManagerStatics { + #[inline] pub unsafe fn get_low_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LowUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_near_max_acceptable_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NearMaxAcceptableUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_acceptable_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxAcceptableUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_excessive_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExcessiveUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_recent_energy_usage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RecentEnergyUsage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_recent_energy_usage_level(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RecentEnergyUsageLevel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_recent_energy_usage_increased(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RecentEnergyUsageIncreased)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_recent_energy_usage_increased(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RecentEnergyUsageIncreased)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_recent_energy_usage_returned_to_low(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RecentEnergyUsageReturnedToLow)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_recent_energy_usage_returned_to_low(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RecentEnergyUsageReturnedToLow)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IBackgroundEnergyManagerStatics [CLSID_BackgroundEnergyManager]} + DEFINE_CLSID!(CLSID_BackgroundEnergyManager = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,111,119,101,114,46,66,97,99,107,103,114,111,117,110,100,69,110,101,114,103,121,77,97,110,97,103,101,114,0]); + RT_ACTIVATABLE!{IForegroundEnergyManagerStatics [CLSID_ForegroundEnergyManager]} + DEFINE_CLSID!(CLSID_ForegroundEnergyManager = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,111,119,101,114,46,70,111,114,101,103,114,111,117,110,100,69,110,101,114,103,121,77,97,110,97,103,101,114,0]); +pub mod diagnostics { // Windows.System.Power.Diagnostics +use ::prelude::*; + DEFINE_IID!(IID_IBackgroundEnergyDiagnosticsStatics, 3613800194, 54182, 18144, 143, 155, 80, 185, 91, 180, 249, 197); + RT_INTERFACE!{static interface IBackgroundEnergyDiagnosticsStatics(IBackgroundEnergyDiagnosticsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundEnergyDiagnosticsStatics] { + fn get_DeviceSpecificConversionFactor(&mut self, out: *mut f64) -> HRESULT, + fn ComputeTotalEnergyUsage(&mut self, out: *mut u64) -> HRESULT, + fn ResetTotalEnergyUsage(&mut self) -> HRESULT + }} + impl IBackgroundEnergyDiagnosticsStatics { + #[inline] pub unsafe fn get_device_specific_conversion_factor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeviceSpecificConversionFactor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn compute_total_energy_usage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ComputeTotalEnergyUsage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn reset_total_energy_usage(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ResetTotalEnergyUsage)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IForegroundEnergyDiagnosticsStatics, 600443159, 52487, 17929, 190, 21, 143, 232, 148, 197, 228, 30); + RT_INTERFACE!{static interface IForegroundEnergyDiagnosticsStatics(IForegroundEnergyDiagnosticsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IForegroundEnergyDiagnosticsStatics] { + fn get_DeviceSpecificConversionFactor(&mut self, out: *mut f64) -> HRESULT, + fn ComputeTotalEnergyUsage(&mut self, out: *mut u64) -> HRESULT, + fn ResetTotalEnergyUsage(&mut self) -> HRESULT + }} + impl IForegroundEnergyDiagnosticsStatics { + #[inline] pub unsafe fn get_device_specific_conversion_factor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeviceSpecificConversionFactor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn compute_total_energy_usage(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ComputeTotalEnergyUsage)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn reset_total_energy_usage(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ResetTotalEnergyUsage)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IBackgroundEnergyDiagnosticsStatics [CLSID_BackgroundEnergyDiagnostics]} + DEFINE_CLSID!(CLSID_BackgroundEnergyDiagnostics = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,111,119,101,114,46,68,105,97,103,110,111,115,116,105,99,115,46,66,97,99,107,103,114,111,117,110,100,69,110,101,114,103,121,68,105,97,103,110,111,115,116,105,99,115,0]); + RT_ACTIVATABLE!{IForegroundEnergyDiagnosticsStatics [CLSID_ForegroundEnergyDiagnostics]} + DEFINE_CLSID!(CLSID_ForegroundEnergyDiagnostics = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,111,119,101,114,46,68,105,97,103,110,111,115,116,105,99,115,46,70,111,114,101,103,114,111,117,110,100,69,110,101,114,103,121,68,105,97,103,110,111,115,116,105,99,115,0]); +} // Windows.System.Power.Diagnostics +} // Windows.System.Power +pub mod remotesystems { // Windows.System.RemoteSystems +use ::prelude::*; + RT_ENUM! { enum RemoteSystemStatus: i32 { + Unavailable (RemoteSystemStatus_Unavailable) = 0, DiscoveringAvailability (RemoteSystemStatus_DiscoveringAvailability) = 1, Available (RemoteSystemStatus_Available) = 2, Unknown (RemoteSystemStatus_Unknown) = 3, + }} + RT_ENUM! { enum RemoteSystemDiscoveryType: i32 { + Any (RemoteSystemDiscoveryType_Any) = 0, Proximal (RemoteSystemDiscoveryType_Proximal) = 1, Cloud (RemoteSystemDiscoveryType_Cloud) = 2, + }} + RT_ENUM! { enum RemoteSystemStatusType: i32 { + Any (RemoteSystemStatusType_Any) = 0, Available (RemoteSystemStatusType_Available) = 1, + }} + RT_ENUM! { enum RemoteSystemAccessStatus: i32 { + Unspecified (RemoteSystemAccessStatus_Unspecified) = 0, Allowed (RemoteSystemAccessStatus_Allowed) = 1, DeniedByUser (RemoteSystemAccessStatus_DeniedByUser) = 2, DeniedBySystem (RemoteSystemAccessStatus_DeniedBySystem) = 3, + }} + DEFINE_IID!(IID_IRemoteSystemFilter, 1245424100, 39403, 17899, 186, 22, 3, 103, 114, 143, 243, 116); + RT_INTERFACE!{interface IRemoteSystemFilter(IRemoteSystemFilterVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemFilter] { + + }} + DEFINE_IID!(IID_IRemoteSystemStatics, 2760225682, 65323, 19271, 190, 98, 116, 63, 47, 20, 15, 48); + RT_INTERFACE!{static interface IRemoteSystemStatics(IRemoteSystemStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemStatics] { + #[cfg(not(feature="windows.networking"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.networking")] fn FindByHostNameAsync(&mut self, hostName: *mut super::super::networking::HostName, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateWatcher(&mut self, out: *mut *mut RemoteSystemWatcher) -> HRESULT, + fn CreateWatcherWithFilters(&mut self, filters: *mut super::super::foundation::collections::IIterable, out: *mut *mut RemoteSystemWatcher) -> HRESULT, + fn RequestAccessAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IRemoteSystemStatics { + #[cfg(feature="windows.networking")] #[inline] pub unsafe fn find_by_host_name_async(&mut self, hostName: &super::super::networking::HostName) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindByHostNameAsync)(self, hostName as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_watcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_watcher_with_filters(&mut self, filters: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWatcherWithFilters)(self, filters as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RemoteSystem: IRemoteSystem} + RT_ACTIVATABLE!{IRemoteSystemStatics [CLSID_RemoteSystem]} + DEFINE_CLSID!(CLSID_RemoteSystem = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,82,101,109,111,116,101,83,121,115,116,101,109,115,46,82,101,109,111,116,101,83,121,115,116,101,109,0]); + RT_CLASS!{class RemoteSystemWatcher: IRemoteSystemWatcher} + DEFINE_IID!(IID_IRemoteSystem, 3981981901, 7696, 19084, 180, 166, 78, 95, 214, 249, 119, 33); + RT_INTERFACE!{interface IRemoteSystem(IRemoteSystemVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystem] { + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Kind(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Status(&mut self, out: *mut RemoteSystemStatus) -> HRESULT, + fn get_IsAvailableByProximity(&mut self, out: *mut bool) -> HRESULT + }} + impl IRemoteSystem { + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Status)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_available_by_proximity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsAvailableByProximity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRemoteSystemWatcher, 1566575742, 11271, 18629, 136, 156, 69, 93, 43, 9, 151, 113); + RT_INTERFACE!{interface IRemoteSystemWatcher(IRemoteSystemWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemWatcher] { + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn add_RemoteSystemAdded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemoteSystemAdded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RemoteSystemUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemoteSystemUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RemoteSystemRemoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemoteSystemRemoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IRemoteSystemWatcher { + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_remote_system_added(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RemoteSystemAdded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_remote_system_added(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RemoteSystemAdded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_remote_system_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RemoteSystemUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_remote_system_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RemoteSystemUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_remote_system_removed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RemoteSystemRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_remote_system_removed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RemoteSystemRemoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class RemoteSystemAddedEventArgs: IRemoteSystemAddedEventArgs} + RT_CLASS!{class RemoteSystemUpdatedEventArgs: IRemoteSystemUpdatedEventArgs} + RT_CLASS!{class RemoteSystemRemovedEventArgs: IRemoteSystemRemovedEventArgs} + DEFINE_IID!(IID_IRemoteSystemAddedEventArgs, 2402899471, 58676, 18071, 136, 54, 122, 190, 161, 81, 81, 110); + RT_INTERFACE!{interface IRemoteSystemAddedEventArgs(IRemoteSystemAddedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemAddedEventArgs] { + fn get_RemoteSystem(&mut self, out: *mut *mut RemoteSystem) -> HRESULT + }} + impl IRemoteSystemAddedEventArgs { + #[inline] pub unsafe fn get_remote_system(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteSystem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRemoteSystemUpdatedEventArgs, 1963130638, 56267, 16725, 180, 202, 179, 10, 4, 242, 118, 39); + RT_INTERFACE!{interface IRemoteSystemUpdatedEventArgs(IRemoteSystemUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemUpdatedEventArgs] { + fn get_RemoteSystem(&mut self, out: *mut *mut RemoteSystem) -> HRESULT + }} + impl IRemoteSystemUpdatedEventArgs { + #[inline] pub unsafe fn get_remote_system(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteSystem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRemoteSystemRemovedEventArgs, 2336036539, 29446, 18922, 183, 223, 103, 213, 113, 76, 176, 19); + RT_INTERFACE!{interface IRemoteSystemRemovedEventArgs(IRemoteSystemRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemRemovedEventArgs] { + fn get_RemoteSystemId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IRemoteSystemRemovedEventArgs { + #[inline] pub unsafe fn get_remote_system_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteSystemId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRemoteSystemConnectionRequestFactory, 2852784672, 47851, 17781, 181, 48, 129, 11, 185, 120, 99, 52); + RT_INTERFACE!{static interface IRemoteSystemConnectionRequestFactory(IRemoteSystemConnectionRequestFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemConnectionRequestFactory] { + fn Create(&mut self, remoteSystem: *mut RemoteSystem, out: *mut *mut RemoteSystemConnectionRequest) -> HRESULT + }} + impl IRemoteSystemConnectionRequestFactory { + #[inline] pub unsafe fn create(&mut self, remoteSystem: &RemoteSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, remoteSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RemoteSystemConnectionRequest: IRemoteSystemConnectionRequest [IRemoteSystemConnectionRequestFactory] [CLSID_RemoteSystemConnectionRequest]} + DEFINE_CLSID!(CLSID_RemoteSystemConnectionRequest = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,82,101,109,111,116,101,83,121,115,116,101,109,115,46,82,101,109,111,116,101,83,121,115,116,101,109,67,111,110,110,101,99,116,105,111,110,82,101,113,117,101,115,116,0]); + DEFINE_IID!(IID_IRemoteSystemConnectionRequest, 2230141188, 36190, 19826, 130, 56, 118, 33, 87, 108, 122, 103); + RT_INTERFACE!{interface IRemoteSystemConnectionRequest(IRemoteSystemConnectionRequestVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemConnectionRequest] { + fn get_RemoteSystem(&mut self, out: *mut *mut RemoteSystem) -> HRESULT + }} + impl IRemoteSystemConnectionRequest { + #[inline] pub unsafe fn get_remote_system(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteSystem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRemoteSystemKindStatics, 4130436659, 43796, 16848, 149, 83, 121, 106, 173, 184, 130, 219); + RT_INTERFACE!{static interface IRemoteSystemKindStatics(IRemoteSystemKindStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemKindStatics] { + fn get_Phone(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Hub(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Holographic(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Desktop(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Xbox(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IRemoteSystemKindStatics { + #[inline] pub unsafe fn get_phone(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Phone)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_hub(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Hub)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_holographic(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Holographic)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_desktop(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Desktop)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_xbox(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Xbox)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IRemoteSystemKindStatics [CLSID_RemoteSystemKinds]} + DEFINE_CLSID!(CLSID_RemoteSystemKinds = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,82,101,109,111,116,101,83,121,115,116,101,109,115,46,82,101,109,111,116,101,83,121,115,116,101,109,75,105,110,100,115,0]); + DEFINE_IID!(IID_IRemoteSystemKindFilterFactory, 2717587694, 39402, 16572, 154, 57, 198, 112, 170, 128, 74, 40); + RT_INTERFACE!{static interface IRemoteSystemKindFilterFactory(IRemoteSystemKindFilterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemKindFilterFactory] { + fn Create(&mut self, remoteSystemKinds: *mut super::super::foundation::collections::IIterable, out: *mut *mut RemoteSystemKindFilter) -> HRESULT + }} + impl IRemoteSystemKindFilterFactory { + #[inline] pub unsafe fn create(&mut self, remoteSystemKinds: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, remoteSystemKinds as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RemoteSystemKindFilter: IRemoteSystemKindFilter [IRemoteSystemKindFilterFactory] [CLSID_RemoteSystemKindFilter]} + DEFINE_CLSID!(CLSID_RemoteSystemKindFilter = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,82,101,109,111,116,101,83,121,115,116,101,109,115,46,82,101,109,111,116,101,83,121,115,116,101,109,75,105,110,100,70,105,108,116,101,114,0]); + DEFINE_IID!(IID_IRemoteSystemKindFilter, 954321388, 8899, 20214, 144, 26, 187, 177, 199, 170, 212, 237); + RT_INTERFACE!{interface IRemoteSystemKindFilter(IRemoteSystemKindFilterVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemKindFilter] { + fn get_RemoteSystemKinds(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IRemoteSystemKindFilter { + #[inline] pub unsafe fn get_remote_system_kinds(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteSystemKinds)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRemoteSystemDiscoveryTypeFilterFactory, 2677979539, 49760, 16737, 146, 242, 156, 2, 31, 35, 254, 93); + RT_INTERFACE!{static interface IRemoteSystemDiscoveryTypeFilterFactory(IRemoteSystemDiscoveryTypeFilterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemDiscoveryTypeFilterFactory] { + fn Create(&mut self, discoveryType: RemoteSystemDiscoveryType, out: *mut *mut RemoteSystemDiscoveryTypeFilter) -> HRESULT + }} + impl IRemoteSystemDiscoveryTypeFilterFactory { + #[inline] pub unsafe fn create(&mut self, discoveryType: RemoteSystemDiscoveryType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, discoveryType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RemoteSystemDiscoveryTypeFilter: IRemoteSystemDiscoveryTypeFilter [IRemoteSystemDiscoveryTypeFilterFactory] [CLSID_RemoteSystemDiscoveryTypeFilter]} + DEFINE_CLSID!(CLSID_RemoteSystemDiscoveryTypeFilter = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,82,101,109,111,116,101,83,121,115,116,101,109,115,46,82,101,109,111,116,101,83,121,115,116,101,109,68,105,115,99,111,118,101,114,121,84,121,112,101,70,105,108,116,101,114,0]); + DEFINE_IID!(IID_IRemoteSystemDiscoveryTypeFilter, 1121518623, 61018, 17370, 172, 106, 111, 238, 37, 70, 7, 65); + RT_INTERFACE!{interface IRemoteSystemDiscoveryTypeFilter(IRemoteSystemDiscoveryTypeFilterVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemDiscoveryTypeFilter] { + fn get_RemoteSystemDiscoveryType(&mut self, out: *mut RemoteSystemDiscoveryType) -> HRESULT + }} + impl IRemoteSystemDiscoveryTypeFilter { + #[inline] pub unsafe fn get_remote_system_discovery_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RemoteSystemDiscoveryType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRemoteSystemStatusTypeFilterFactory, 869234938, 55076, 16677, 172, 122, 141, 40, 30, 68, 201, 73); + RT_INTERFACE!{static interface IRemoteSystemStatusTypeFilterFactory(IRemoteSystemStatusTypeFilterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemStatusTypeFilterFactory] { + fn Create(&mut self, remoteSystemStatusType: RemoteSystemStatusType, out: *mut *mut RemoteSystemStatusTypeFilter) -> HRESULT + }} + impl IRemoteSystemStatusTypeFilterFactory { + #[inline] pub unsafe fn create(&mut self, remoteSystemStatusType: RemoteSystemStatusType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, remoteSystemStatusType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RemoteSystemStatusTypeFilter: IRemoteSystemStatusTypeFilter [IRemoteSystemStatusTypeFilterFactory] [CLSID_RemoteSystemStatusTypeFilter]} + DEFINE_CLSID!(CLSID_RemoteSystemStatusTypeFilter = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,82,101,109,111,116,101,83,121,115,116,101,109,115,46,82,101,109,111,116,101,83,121,115,116,101,109,83,116,97,116,117,115,84,121,112,101,70,105,108,116,101,114,0]); + DEFINE_IID!(IID_IRemoteSystemStatusTypeFilter, 205082958, 52150, 18295, 133, 52, 46, 12, 82, 26, 255, 162); + RT_INTERFACE!{interface IRemoteSystemStatusTypeFilter(IRemoteSystemStatusTypeFilterVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemStatusTypeFilter] { + fn get_RemoteSystemStatusType(&mut self, out: *mut RemoteSystemStatusType) -> HRESULT + }} + impl IRemoteSystemStatusTypeFilter { + #[inline] pub unsafe fn get_remote_system_status_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RemoteSystemStatusType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.System.RemoteSystems +pub mod threading { // Windows.System.Threading +use ::prelude::*; + RT_ENUM! { enum WorkItemPriority: i32 { + Low (WorkItemPriority_Low) = -1, Normal (WorkItemPriority_Normal) = 0, High (WorkItemPriority_High) = 1, + }} + RT_ENUM! { enum WorkItemOptions: u32 { + None (WorkItemOptions_None) = 0, TimeSliced (WorkItemOptions_TimeSliced) = 1, + }} + DEFINE_IID!(IID_TimerElapsedHandler, 4205749863, 64491, 18891, 173, 178, 113, 24, 76, 85, 110, 67); + RT_DELEGATE!{delegate TimerElapsedHandler(TimerElapsedHandlerVtbl, TimerElapsedHandlerImpl) [IID_TimerElapsedHandler] { + fn Invoke(&mut self, timer: *mut ThreadPoolTimer) -> HRESULT + }} + impl TimerElapsedHandler { + #[inline] pub unsafe fn invoke(&mut self, timer: &ThreadPoolTimer) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, timer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ThreadPoolTimer: IThreadPoolTimer} + RT_ACTIVATABLE!{IThreadPoolTimerStatics [CLSID_ThreadPoolTimer]} + DEFINE_CLSID!(CLSID_ThreadPoolTimer = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,84,104,114,101,97,100,105,110,103,46,84,104,114,101,97,100,80,111,111,108,84,105,109,101,114,0]); + DEFINE_IID!(IID_TimerDestroyedHandler, 887953914, 33668, 20153, 130, 9, 251, 80, 148, 238, 236, 53); + RT_DELEGATE!{delegate TimerDestroyedHandler(TimerDestroyedHandlerVtbl, TimerDestroyedHandlerImpl) [IID_TimerDestroyedHandler] { + fn Invoke(&mut self, timer: *mut ThreadPoolTimer) -> HRESULT + }} + impl TimerDestroyedHandler { + #[inline] pub unsafe fn invoke(&mut self, timer: &ThreadPoolTimer) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, timer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_WorkItemHandler, 488278923, 64102, 16719, 156, 189, 182, 95, 201, 157, 23, 250); + RT_DELEGATE!{delegate WorkItemHandler(WorkItemHandlerVtbl, WorkItemHandlerImpl) [IID_WorkItemHandler] { + fn Invoke(&mut self, operation: *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl WorkItemHandler { + #[inline] pub unsafe fn invoke(&mut self, operation: &super::super::foundation::IAsyncAction) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, operation as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IThreadPoolStatics, 3065997277, 33981, 17656, 172, 28, 147, 235, 203, 157, 186, 145); + RT_INTERFACE!{static interface IThreadPoolStatics(IThreadPoolStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IThreadPoolStatics] { + fn RunAsync(&mut self, handler: *mut WorkItemHandler, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RunWithPriorityAsync(&mut self, handler: *mut WorkItemHandler, priority: WorkItemPriority, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RunWithPriorityAndOptionsAsync(&mut self, handler: *mut WorkItemHandler, priority: WorkItemPriority, options: WorkItemOptions, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IThreadPoolStatics { + #[inline] pub unsafe fn run_async(&mut self, handler: &WorkItemHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RunAsync)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn run_with_priority_async(&mut self, handler: &WorkItemHandler, priority: WorkItemPriority) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RunWithPriorityAsync)(self, handler as *const _ as *mut _, priority, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn run_with_priority_and_options_async(&mut self, handler: &WorkItemHandler, priority: WorkItemPriority, options: WorkItemOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RunWithPriorityAndOptionsAsync)(self, handler as *const _ as *mut _, priority, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IThreadPoolTimer, 1498332792, 21994, 19080, 165, 13, 52, 2, 174, 31, 156, 242); + RT_INTERFACE!{interface IThreadPoolTimer(IThreadPoolTimerVtbl): IInspectable(IInspectableVtbl) [IID_IThreadPoolTimer] { + fn get_Period(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Delay(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn Cancel(&mut self) -> HRESULT + }} + impl IThreadPoolTimer { + #[inline] pub unsafe fn get_period(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Period)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_delay(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Delay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn cancel(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Cancel)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IThreadPoolTimerStatics, 445291778, 58498, 17947, 184, 199, 142, 250, 209, 204, 229, 144); + RT_INTERFACE!{static interface IThreadPoolTimerStatics(IThreadPoolTimerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IThreadPoolTimerStatics] { + fn CreatePeriodicTimer(&mut self, handler: *mut TimerElapsedHandler, period: super::super::foundation::TimeSpan, out: *mut *mut ThreadPoolTimer) -> HRESULT, + fn CreateTimer(&mut self, handler: *mut TimerElapsedHandler, delay: super::super::foundation::TimeSpan, out: *mut *mut ThreadPoolTimer) -> HRESULT, + fn CreatePeriodicTimerWithCompletion(&mut self, handler: *mut TimerElapsedHandler, period: super::super::foundation::TimeSpan, destroyed: *mut TimerDestroyedHandler, out: *mut *mut ThreadPoolTimer) -> HRESULT, + fn CreateTimerWithCompletion(&mut self, handler: *mut TimerElapsedHandler, delay: super::super::foundation::TimeSpan, destroyed: *mut TimerDestroyedHandler, out: *mut *mut ThreadPoolTimer) -> HRESULT + }} + impl IThreadPoolTimerStatics { + #[inline] pub unsafe fn create_periodic_timer(&mut self, handler: &TimerElapsedHandler, period: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePeriodicTimer)(self, handler as *const _ as *mut _, period, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_timer(&mut self, handler: &TimerElapsedHandler, delay: super::super::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTimer)(self, handler as *const _ as *mut _, delay, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_periodic_timer_with_completion(&mut self, handler: &TimerElapsedHandler, period: super::super::foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePeriodicTimerWithCompletion)(self, handler as *const _ as *mut _, period, destroyed as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_timer_with_completion(&mut self, handler: &TimerElapsedHandler, delay: super::super::foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTimerWithCompletion)(self, handler as *const _ as *mut _, delay, destroyed as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IThreadPoolStatics [CLSID_ThreadPool]} + DEFINE_CLSID!(CLSID_ThreadPool = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,84,104,114,101,97,100,105,110,103,46,84,104,114,101,97,100,80,111,111,108,0]); +pub mod core { // Windows.System.Threading.Core +use ::prelude::*; + DEFINE_IID!(IID_SignalHandler, 2453422126, 18209, 17422, 157, 218, 85, 182, 242, 224, 119, 16); + RT_DELEGATE!{delegate SignalHandler(SignalHandlerVtbl, SignalHandlerImpl) [IID_SignalHandler] { + fn Invoke(&mut self, signalNotifier: *mut SignalNotifier, timedOut: bool) -> HRESULT + }} + impl SignalHandler { + #[inline] pub unsafe fn invoke(&mut self, signalNotifier: &SignalNotifier, timedOut: bool) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, signalNotifier as *const _ as *mut _, timedOut); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SignalNotifier: ISignalNotifier} + RT_ACTIVATABLE!{ISignalNotifierStatics [CLSID_SignalNotifier]} + DEFINE_CLSID!(CLSID_SignalNotifier = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,84,104,114,101,97,100,105,110,103,46,67,111,114,101,46,83,105,103,110,97,108,78,111,116,105,102,105,101,114,0]); + DEFINE_IID!(IID_ISignalNotifierStatics, 474891622, 33792, 18131, 161, 21, 125, 12, 13, 252, 159, 98); + RT_INTERFACE!{static interface ISignalNotifierStatics(ISignalNotifierStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISignalNotifierStatics] { + fn AttachToEvent(&mut self, name: HSTRING, handler: *mut SignalHandler, out: *mut *mut SignalNotifier) -> HRESULT, + fn AttachToEventWithTimeout(&mut self, name: HSTRING, handler: *mut SignalHandler, timeout: ::rt::gen::windows::foundation::TimeSpan, out: *mut *mut SignalNotifier) -> HRESULT, + fn AttachToSemaphore(&mut self, name: HSTRING, handler: *mut SignalHandler, out: *mut *mut SignalNotifier) -> HRESULT, + fn AttachToSemaphoreWithTimeout(&mut self, name: HSTRING, handler: *mut SignalHandler, timeout: ::rt::gen::windows::foundation::TimeSpan, out: *mut *mut SignalNotifier) -> HRESULT + }} + impl ISignalNotifierStatics { + #[inline] pub unsafe fn attach_to_event(&mut self, name: &HStringArg, handler: &SignalHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AttachToEvent)(self, name.get(), handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn attach_to_event_with_timeout(&mut self, name: &HStringArg, handler: &SignalHandler, timeout: ::rt::gen::windows::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AttachToEventWithTimeout)(self, name.get(), handler as *const _ as *mut _, timeout, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn attach_to_semaphore(&mut self, name: &HStringArg, handler: &SignalHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AttachToSemaphore)(self, name.get(), handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn attach_to_semaphore_with_timeout(&mut self, name: &HStringArg, handler: &SignalHandler, timeout: ::rt::gen::windows::foundation::TimeSpan) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AttachToSemaphoreWithTimeout)(self, name.get(), handler as *const _ as *mut _, timeout, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPreallocatedWorkItemFactory, 3822267205, 57322, 18075, 130, 197, 246, 227, 206, 253, 234, 251); + RT_INTERFACE!{static interface IPreallocatedWorkItemFactory(IPreallocatedWorkItemFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPreallocatedWorkItemFactory] { + fn CreateWorkItem(&mut self, handler: *mut super::WorkItemHandler, out: *mut *mut PreallocatedWorkItem) -> HRESULT, + fn CreateWorkItemWithPriority(&mut self, handler: *mut super::WorkItemHandler, priority: super::WorkItemPriority, out: *mut *mut PreallocatedWorkItem) -> HRESULT, + fn CreateWorkItemWithPriorityAndOptions(&mut self, handler: *mut super::WorkItemHandler, priority: super::WorkItemPriority, options: super::WorkItemOptions, out: *mut *mut PreallocatedWorkItem) -> HRESULT + }} + impl IPreallocatedWorkItemFactory { + #[inline] pub unsafe fn create_work_item(&mut self, handler: &super::WorkItemHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWorkItem)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_work_item_with_priority(&mut self, handler: &super::WorkItemHandler, priority: super::WorkItemPriority) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWorkItemWithPriority)(self, handler as *const _ as *mut _, priority, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_work_item_with_priority_and_options(&mut self, handler: &super::WorkItemHandler, priority: super::WorkItemPriority, options: super::WorkItemOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWorkItemWithPriorityAndOptions)(self, handler as *const _ as *mut _, priority, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PreallocatedWorkItem: IPreallocatedWorkItem [IPreallocatedWorkItemFactory] [CLSID_PreallocatedWorkItem]} + DEFINE_CLSID!(CLSID_PreallocatedWorkItem = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,84,104,114,101,97,100,105,110,103,46,67,111,114,101,46,80,114,101,97,108,108,111,99,97,116,101,100,87,111,114,107,73,116,101,109,0]); + DEFINE_IID!(IID_IPreallocatedWorkItem, 3067783676, 48219, 16410, 168, 178, 110, 117, 77, 20, 218, 166); + RT_INTERFACE!{interface IPreallocatedWorkItem(IPreallocatedWorkItemVtbl): IInspectable(IInspectableVtbl) [IID_IPreallocatedWorkItem] { + fn RunAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + }} + impl IPreallocatedWorkItem { + #[inline] pub unsafe fn run_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RunAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISignalNotifier, 338189830, 25511, 18195, 182, 217, 98, 246, 75, 86, 251, 139); + RT_INTERFACE!{interface ISignalNotifier(ISignalNotifierVtbl): IInspectable(IInspectableVtbl) [IID_ISignalNotifier] { + fn Enable(&mut self) -> HRESULT, + fn Terminate(&mut self) -> HRESULT + }} + impl ISignalNotifier { + #[inline] pub unsafe fn enable(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Enable)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn terminate(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Terminate)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.System.Threading.Core +} // Windows.System.Threading +pub mod diagnostics { // Windows.System.Diagnostics +use ::prelude::*; + DEFINE_IID!(IID_IProcessDiagnosticInfo, 3895504971, 12302, 20198, 160, 171, 91, 95, 82, 49, 180, 52); + RT_INTERFACE!{interface IProcessDiagnosticInfo(IProcessDiagnosticInfoVtbl): IInspectable(IInspectableVtbl) [IID_IProcessDiagnosticInfo] { + fn get_ProcessId(&mut self, out: *mut u32) -> HRESULT, + fn get_ExecutableFileName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Parent(&mut self, out: *mut *mut ProcessDiagnosticInfo) -> HRESULT, + fn get_ProcessStartTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_DiskUsage(&mut self, out: *mut *mut ProcessDiskUsage) -> HRESULT, + fn get_MemoryUsage(&mut self, out: *mut *mut ProcessMemoryUsage) -> HRESULT, + fn get_CpuUsage(&mut self, out: *mut *mut ProcessCpuUsage) -> HRESULT + }} + impl IProcessDiagnosticInfo { + #[inline] pub unsafe fn get_process_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProcessId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_executable_file_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExecutableFileName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_parent(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Parent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_process_start_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProcessStartTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_disk_usage(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DiskUsage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_memory_usage(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MemoryUsage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cpu_usage(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CpuUsage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProcessDiagnosticInfo: IProcessDiagnosticInfo} + RT_ACTIVATABLE!{IProcessDiagnosticInfoStatics [CLSID_ProcessDiagnosticInfo]} + DEFINE_CLSID!(CLSID_ProcessDiagnosticInfo = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,68,105,97,103,110,111,115,116,105,99,115,46,80,114,111,99,101,115,115,68,105,97,103,110,111,115,116,105,99,73,110,102,111,0]); + RT_CLASS!{class ProcessDiskUsage: IProcessDiskUsage} + RT_CLASS!{class ProcessMemoryUsage: IProcessMemoryUsage} + RT_CLASS!{class ProcessCpuUsage: IProcessCpuUsage} + DEFINE_IID!(IID_IProcessDiagnosticInfoStatics, 792834656, 46239, 17036, 170, 14, 132, 116, 79, 73, 202, 149); + RT_INTERFACE!{static interface IProcessDiagnosticInfoStatics(IProcessDiagnosticInfoStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IProcessDiagnosticInfoStatics] { + fn GetForProcesses(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetForCurrentProcess(&mut self, out: *mut *mut ProcessDiagnosticInfo) -> HRESULT + }} + impl IProcessDiagnosticInfoStatics { + #[inline] pub unsafe fn get_for_processes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForProcesses)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_for_current_process(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentProcess)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProcessMemoryUsage, 4111147675, 33404, 17079, 176, 124, 14, 50, 98, 126, 107, 62); + RT_INTERFACE!{interface IProcessMemoryUsage(IProcessMemoryUsageVtbl): IInspectable(IInspectableVtbl) [IID_IProcessMemoryUsage] { + fn GetReport(&mut self, out: *mut *mut ProcessMemoryUsageReport) -> HRESULT + }} + impl IProcessMemoryUsage { + #[inline] pub unsafe fn get_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetReport)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProcessMemoryUsageReport: IProcessMemoryUsageReport} + DEFINE_IID!(IID_IProcessMemoryUsageReport, 3267853498, 6481, 18053, 133, 50, 126, 116, 158, 207, 142, 235); + RT_INTERFACE!{interface IProcessMemoryUsageReport(IProcessMemoryUsageReportVtbl): IInspectable(IInspectableVtbl) [IID_IProcessMemoryUsageReport] { + fn get_NonPagedPoolSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_PageFaultCount(&mut self, out: *mut u32) -> HRESULT, + fn get_PageFileSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_PagedPoolSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_PeakNonPagedPoolSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_PeakPageFileSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_PeakPagedPoolSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_PeakVirtualMemorySizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_PeakWorkingSetSizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_PrivatePageCount(&mut self, out: *mut u64) -> HRESULT, + fn get_VirtualMemorySizeInBytes(&mut self, out: *mut u64) -> HRESULT, + fn get_WorkingSetSizeInBytes(&mut self, out: *mut u64) -> HRESULT + }} + impl IProcessMemoryUsageReport { + #[inline] pub unsafe fn get_non_paged_pool_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NonPagedPoolSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_page_fault_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PageFaultCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_page_file_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PageFileSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_paged_pool_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PagedPoolSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_peak_non_paged_pool_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PeakNonPagedPoolSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_peak_page_file_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PeakPageFileSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_peak_paged_pool_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PeakPagedPoolSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_peak_virtual_memory_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PeakVirtualMemorySizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_peak_working_set_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PeakWorkingSetSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_private_page_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PrivatePageCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_virtual_memory_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VirtualMemorySizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_working_set_size_in_bytes(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WorkingSetSizeInBytes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProcessDiskUsage, 1524075517, 32337, 20051, 191, 170, 90, 110, 225, 170, 187, 248); + RT_INTERFACE!{interface IProcessDiskUsage(IProcessDiskUsageVtbl): IInspectable(IInspectableVtbl) [IID_IProcessDiskUsage] { + fn GetReport(&mut self, out: *mut *mut ProcessDiskUsageReport) -> HRESULT + }} + impl IProcessDiskUsage { + #[inline] pub unsafe fn get_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetReport)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProcessDiskUsageReport: IProcessDiskUsageReport} + DEFINE_IID!(IID_IProcessDiskUsageReport, 1075193853, 21341, 19487, 129, 184, 218, 84, 225, 190, 99, 94); + RT_INTERFACE!{interface IProcessDiskUsageReport(IProcessDiskUsageReportVtbl): IInspectable(IInspectableVtbl) [IID_IProcessDiskUsageReport] { + fn get_ReadOperationCount(&mut self, out: *mut i64) -> HRESULT, + fn get_WriteOperationCount(&mut self, out: *mut i64) -> HRESULT, + fn get_OtherOperationCount(&mut self, out: *mut i64) -> HRESULT, + fn get_BytesReadCount(&mut self, out: *mut i64) -> HRESULT, + fn get_BytesWrittenCount(&mut self, out: *mut i64) -> HRESULT, + fn get_OtherBytesCount(&mut self, out: *mut i64) -> HRESULT + }} + impl IProcessDiskUsageReport { + #[inline] pub unsafe fn get_read_operation_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ReadOperationCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_write_operation_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WriteOperationCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_other_operation_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OtherOperationCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bytes_read_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BytesReadCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bytes_written_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BytesWrittenCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_other_bytes_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OtherBytesCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProcessCpuUsage, 196813938, 51391, 16954, 168, 16, 181, 89, 174, 67, 84, 226); + RT_INTERFACE!{interface IProcessCpuUsage(IProcessCpuUsageVtbl): IInspectable(IInspectableVtbl) [IID_IProcessCpuUsage] { + fn GetReport(&mut self, out: *mut *mut ProcessCpuUsageReport) -> HRESULT + }} + impl IProcessCpuUsage { + #[inline] pub unsafe fn get_report(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetReport)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ProcessCpuUsageReport: IProcessCpuUsageReport} + DEFINE_IID!(IID_IProcessCpuUsageReport, 2322439340, 14727, 20015, 161, 25, 107, 95, 162, 20, 241, 180); + RT_INTERFACE!{interface IProcessCpuUsageReport(IProcessCpuUsageReportVtbl): IInspectable(IInspectableVtbl) [IID_IProcessCpuUsageReport] { + fn get_KernelTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_UserTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + }} + impl IProcessCpuUsageReport { + #[inline] pub unsafe fn get_kernel_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KernelTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UserTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.System.Diagnostics +pub mod display { // Windows.System.Display +use ::prelude::*; + DEFINE_IID!(IID_IDisplayRequest, 3849527364, 62623, 19296, 141, 212, 94, 126, 58, 99, 42, 192); + RT_INTERFACE!{interface IDisplayRequest(IDisplayRequestVtbl): IInspectable(IInspectableVtbl) [IID_IDisplayRequest] { + fn RequestActive(&mut self) -> HRESULT, + fn RequestRelease(&mut self) -> HRESULT + }} + impl IDisplayRequest { + #[inline] pub unsafe fn request_active(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RequestActive)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn request_release(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RequestRelease)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DisplayRequest: IDisplayRequest} +} // Windows.System.Display +pub mod remotedesktop { // Windows.System.RemoteDesktop +use ::prelude::*; + DEFINE_IID!(IID_IInteractiveSessionStatics, 1619543601, 56634, 17782, 156, 141, 232, 2, 118, 24, 189, 206); + RT_INTERFACE!{static interface IInteractiveSessionStatics(IInteractiveSessionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IInteractiveSessionStatics] { + fn get_IsRemote(&mut self, out: *mut bool) -> HRESULT + }} + impl IInteractiveSessionStatics { + #[inline] pub unsafe fn get_is_remote(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsRemote)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IInteractiveSessionStatics [CLSID_InteractiveSession]} + DEFINE_CLSID!(CLSID_InteractiveSession = &[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,82,101,109,111,116,101,68,101,115,107,116,111,112,46,73,110,116,101,114,97,99,116,105,118,101,83,101,115,115,105,111,110,0]); +} // Windows.System.RemoteDesktop +} // Windows.System +#[cfg(feature="windows.ui")] +pub mod ui { // Windows.UI +use ::prelude::*; + RT_STRUCT! { struct Color { + A: u8, R: u8, G: u8, B: u8, + }} + DEFINE_IID!(IID_IColorHelper, 423427047, 26055, 17728, 173, 8, 98, 131, 186, 118, 135, 154); + RT_INTERFACE!{interface IColorHelper(IColorHelperVtbl): IInspectable(IInspectableVtbl) [IID_IColorHelper] { + + }} + DEFINE_IID!(IID_IColorHelperStatics, 2231688170, 64362, 16708, 166, 194, 51, 73, 156, 146, 132, 245); + RT_INTERFACE!{static interface IColorHelperStatics(IColorHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IColorHelperStatics] { + fn FromArgb(&mut self, a: u8, r: u8, g: u8, b: u8, out: *mut Color) -> HRESULT + }} + impl IColorHelperStatics { + #[inline] pub unsafe fn from_argb(&mut self, a: u8, r: u8, g: u8, b: u8) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromArgb)(self, a, r, g, b, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class ColorHelper: IColorHelper} + RT_ACTIVATABLE!{IColorHelperStatics [CLSID_ColorHelper]} + DEFINE_CLSID!(CLSID_ColorHelper = &[87,105,110,100,111,119,115,46,85,73,46,67,111,108,111,114,72,101,108,112,101,114,0]); + DEFINE_IID!(IID_IColors, 2609681190, 19622, 19685, 137, 148, 158, 255, 101, 202, 189, 204); + RT_INTERFACE!{interface IColors(IColorsVtbl): IInspectable(IInspectableVtbl) [IID_IColors] { + + }} + DEFINE_IID!(IID_IColorsStatics, 3488951812, 52390, 17940, 161, 126, 117, 73, 16, 200, 74, 153); + RT_INTERFACE!{static interface IColorsStatics(IColorsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IColorsStatics] { + fn get_AliceBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_AntiqueWhite(&mut self, out: *mut Color) -> HRESULT, + fn get_Aqua(&mut self, out: *mut Color) -> HRESULT, + fn get_Aquamarine(&mut self, out: *mut Color) -> HRESULT, + fn get_Azure(&mut self, out: *mut Color) -> HRESULT, + fn get_Beige(&mut self, out: *mut Color) -> HRESULT, + fn get_Bisque(&mut self, out: *mut Color) -> HRESULT, + fn get_Black(&mut self, out: *mut Color) -> HRESULT, + fn get_BlanchedAlmond(&mut self, out: *mut Color) -> HRESULT, + fn get_Blue(&mut self, out: *mut Color) -> HRESULT, + fn get_BlueViolet(&mut self, out: *mut Color) -> HRESULT, + fn get_Brown(&mut self, out: *mut Color) -> HRESULT, + fn get_BurlyWood(&mut self, out: *mut Color) -> HRESULT, + fn get_CadetBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_Chartreuse(&mut self, out: *mut Color) -> HRESULT, + fn get_Chocolate(&mut self, out: *mut Color) -> HRESULT, + fn get_Coral(&mut self, out: *mut Color) -> HRESULT, + fn get_CornflowerBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_Cornsilk(&mut self, out: *mut Color) -> HRESULT, + fn get_Crimson(&mut self, out: *mut Color) -> HRESULT, + fn get_Cyan(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkCyan(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkGoldenrod(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkGray(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkKhaki(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkMagenta(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkOliveGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkOrange(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkOrchid(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkRed(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkSalmon(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkSeaGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkSlateBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkSlateGray(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkTurquoise(&mut self, out: *mut Color) -> HRESULT, + fn get_DarkViolet(&mut self, out: *mut Color) -> HRESULT, + fn get_DeepPink(&mut self, out: *mut Color) -> HRESULT, + fn get_DeepSkyBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_DimGray(&mut self, out: *mut Color) -> HRESULT, + fn get_DodgerBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_Firebrick(&mut self, out: *mut Color) -> HRESULT, + fn get_FloralWhite(&mut self, out: *mut Color) -> HRESULT, + fn get_ForestGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_Fuchsia(&mut self, out: *mut Color) -> HRESULT, + fn get_Gainsboro(&mut self, out: *mut Color) -> HRESULT, + fn get_GhostWhite(&mut self, out: *mut Color) -> HRESULT, + fn get_Gold(&mut self, out: *mut Color) -> HRESULT, + fn get_Goldenrod(&mut self, out: *mut Color) -> HRESULT, + fn get_Gray(&mut self, out: *mut Color) -> HRESULT, + fn get_Green(&mut self, out: *mut Color) -> HRESULT, + fn get_GreenYellow(&mut self, out: *mut Color) -> HRESULT, + fn get_Honeydew(&mut self, out: *mut Color) -> HRESULT, + fn get_HotPink(&mut self, out: *mut Color) -> HRESULT, + fn get_IndianRed(&mut self, out: *mut Color) -> HRESULT, + fn get_Indigo(&mut self, out: *mut Color) -> HRESULT, + fn get_Ivory(&mut self, out: *mut Color) -> HRESULT, + fn get_Khaki(&mut self, out: *mut Color) -> HRESULT, + fn get_Lavender(&mut self, out: *mut Color) -> HRESULT, + fn get_LavenderBlush(&mut self, out: *mut Color) -> HRESULT, + fn get_LawnGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_LemonChiffon(&mut self, out: *mut Color) -> HRESULT, + fn get_LightBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_LightCoral(&mut self, out: *mut Color) -> HRESULT, + fn get_LightCyan(&mut self, out: *mut Color) -> HRESULT, + fn get_LightGoldenrodYellow(&mut self, out: *mut Color) -> HRESULT, + fn get_LightGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_LightGray(&mut self, out: *mut Color) -> HRESULT, + fn get_LightPink(&mut self, out: *mut Color) -> HRESULT, + fn get_LightSalmon(&mut self, out: *mut Color) -> HRESULT, + fn get_LightSeaGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_LightSkyBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_LightSlateGray(&mut self, out: *mut Color) -> HRESULT, + fn get_LightSteelBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_LightYellow(&mut self, out: *mut Color) -> HRESULT, + fn get_Lime(&mut self, out: *mut Color) -> HRESULT, + fn get_LimeGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_Linen(&mut self, out: *mut Color) -> HRESULT, + fn get_Magenta(&mut self, out: *mut Color) -> HRESULT, + fn get_Maroon(&mut self, out: *mut Color) -> HRESULT, + fn get_MediumAquamarine(&mut self, out: *mut Color) -> HRESULT, + fn get_MediumBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_MediumOrchid(&mut self, out: *mut Color) -> HRESULT, + fn get_MediumPurple(&mut self, out: *mut Color) -> HRESULT, + fn get_MediumSeaGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_MediumSlateBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_MediumSpringGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_MediumTurquoise(&mut self, out: *mut Color) -> HRESULT, + fn get_MediumVioletRed(&mut self, out: *mut Color) -> HRESULT, + fn get_MidnightBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_MintCream(&mut self, out: *mut Color) -> HRESULT, + fn get_MistyRose(&mut self, out: *mut Color) -> HRESULT, + fn get_Moccasin(&mut self, out: *mut Color) -> HRESULT, + fn get_NavajoWhite(&mut self, out: *mut Color) -> HRESULT, + fn get_Navy(&mut self, out: *mut Color) -> HRESULT, + fn get_OldLace(&mut self, out: *mut Color) -> HRESULT, + fn get_Olive(&mut self, out: *mut Color) -> HRESULT, + fn get_OliveDrab(&mut self, out: *mut Color) -> HRESULT, + fn get_Orange(&mut self, out: *mut Color) -> HRESULT, + fn get_OrangeRed(&mut self, out: *mut Color) -> HRESULT, + fn get_Orchid(&mut self, out: *mut Color) -> HRESULT, + fn get_PaleGoldenrod(&mut self, out: *mut Color) -> HRESULT, + fn get_PaleGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_PaleTurquoise(&mut self, out: *mut Color) -> HRESULT, + fn get_PaleVioletRed(&mut self, out: *mut Color) -> HRESULT, + fn get_PapayaWhip(&mut self, out: *mut Color) -> HRESULT, + fn get_PeachPuff(&mut self, out: *mut Color) -> HRESULT, + fn get_Peru(&mut self, out: *mut Color) -> HRESULT, + fn get_Pink(&mut self, out: *mut Color) -> HRESULT, + fn get_Plum(&mut self, out: *mut Color) -> HRESULT, + fn get_PowderBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_Purple(&mut self, out: *mut Color) -> HRESULT, + fn get_Red(&mut self, out: *mut Color) -> HRESULT, + fn get_RosyBrown(&mut self, out: *mut Color) -> HRESULT, + fn get_RoyalBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_SaddleBrown(&mut self, out: *mut Color) -> HRESULT, + fn get_Salmon(&mut self, out: *mut Color) -> HRESULT, + fn get_SandyBrown(&mut self, out: *mut Color) -> HRESULT, + fn get_SeaGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_SeaShell(&mut self, out: *mut Color) -> HRESULT, + fn get_Sienna(&mut self, out: *mut Color) -> HRESULT, + fn get_Silver(&mut self, out: *mut Color) -> HRESULT, + fn get_SkyBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_SlateBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_SlateGray(&mut self, out: *mut Color) -> HRESULT, + fn get_Snow(&mut self, out: *mut Color) -> HRESULT, + fn get_SpringGreen(&mut self, out: *mut Color) -> HRESULT, + fn get_SteelBlue(&mut self, out: *mut Color) -> HRESULT, + fn get_Tan(&mut self, out: *mut Color) -> HRESULT, + fn get_Teal(&mut self, out: *mut Color) -> HRESULT, + fn get_Thistle(&mut self, out: *mut Color) -> HRESULT, + fn get_Tomato(&mut self, out: *mut Color) -> HRESULT, + fn get_Transparent(&mut self, out: *mut Color) -> HRESULT, + fn get_Turquoise(&mut self, out: *mut Color) -> HRESULT, + fn get_Violet(&mut self, out: *mut Color) -> HRESULT, + fn get_Wheat(&mut self, out: *mut Color) -> HRESULT, + fn get_White(&mut self, out: *mut Color) -> HRESULT, + fn get_WhiteSmoke(&mut self, out: *mut Color) -> HRESULT, + fn get_Yellow(&mut self, out: *mut Color) -> HRESULT, + fn get_YellowGreen(&mut self, out: *mut Color) -> HRESULT + }} + impl IColorsStatics { + #[inline] pub unsafe fn get_alice_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AliceBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_antique_white(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AntiqueWhite)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_aqua(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Aqua)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_aquamarine(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Aquamarine)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_azure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Azure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_beige(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Beige)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bisque(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bisque)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_black(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Black)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_blanched_almond(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BlanchedAlmond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Blue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_blue_violet(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BlueViolet)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_brown(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Brown)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_burly_wood(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BurlyWood)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cadet_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CadetBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_chartreuse(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Chartreuse)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_chocolate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Chocolate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_coral(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Coral)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cornflower_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CornflowerBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cornsilk(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Cornsilk)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_crimson(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Crimson)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cyan(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Cyan)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_cyan(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkCyan)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_goldenrod(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkGoldenrod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_gray(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkGray)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_khaki(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkKhaki)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_magenta(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkMagenta)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_olive_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkOliveGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_orange(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkOrange)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_orchid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkOrchid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_red(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkRed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_salmon(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkSalmon)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_sea_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkSeaGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_slate_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkSlateBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_slate_gray(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkSlateGray)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_turquoise(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkTurquoise)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dark_violet(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DarkViolet)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deep_pink(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeepPink)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deep_sky_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeepSkyBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dim_gray(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DimGray)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dodger_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DodgerBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_firebrick(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Firebrick)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_floral_white(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FloralWhite)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_forest_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ForestGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_fuchsia(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Fuchsia)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gainsboro(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gainsboro)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ghost_white(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GhostWhite)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gold(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gold)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_goldenrod(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Goldenrod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gray(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gray)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Green)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_green_yellow(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GreenYellow)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_honeydew(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Honeydew)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_hot_pink(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HotPink)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_indian_red(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IndianRed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_indigo(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Indigo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ivory(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Ivory)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_khaki(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Khaki)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_lavender(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Lavender)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_lavender_blush(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LavenderBlush)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_lawn_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LawnGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_lemon_chiffon(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LemonChiffon)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_coral(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightCoral)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_cyan(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightCyan)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_goldenrod_yellow(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightGoldenrodYellow)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_gray(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightGray)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_pink(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightPink)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_salmon(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightSalmon)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_sea_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightSeaGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_sky_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightSkyBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_slate_gray(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightSlateGray)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_steel_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightSteelBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light_yellow(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LightYellow)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_lime(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Lime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_lime_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LimeGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_linen(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Linen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_magenta(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Magenta)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_maroon(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Maroon)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_medium_aquamarine(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediumAquamarine)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_medium_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediumBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_medium_orchid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediumOrchid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_medium_purple(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediumPurple)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_medium_sea_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediumSeaGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_medium_slate_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediumSlateBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_medium_spring_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediumSpringGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_medium_turquoise(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediumTurquoise)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_medium_violet_red(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MediumVioletRed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_midnight_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MidnightBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_mint_cream(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MintCream)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_misty_rose(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MistyRose)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_moccasin(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Moccasin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_navajo_white(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NavajoWhite)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_navy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Navy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_old_lace(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OldLace)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_olive(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Olive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_olive_drab(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OliveDrab)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_orange(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orange)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_orange_red(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OrangeRed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_orchid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orchid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pale_goldenrod(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PaleGoldenrod)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pale_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PaleGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pale_turquoise(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PaleTurquoise)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pale_violet_red(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PaleVioletRed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_papaya_whip(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PapayaWhip)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_peach_puff(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PeachPuff)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_peru(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Peru)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pink(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Pink)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_plum(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Plum)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_powder_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PowderBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_purple(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Purple)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_red(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Red)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_rosy_brown(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RosyBrown)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_royal_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoyalBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_saddle_brown(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SaddleBrown)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_salmon(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Salmon)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sandy_brown(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SandyBrown)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sea_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SeaGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sea_shell(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SeaShell)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sienna(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Sienna)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_silver(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Silver)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_sky_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SkyBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_slate_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SlateBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_slate_gray(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SlateGray)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_snow(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Snow)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_spring_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpringGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_steel_blue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SteelBlue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tan(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Tan)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_teal(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Teal)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_thistle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Thistle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tomato(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Tomato)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_transparent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Transparent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_turquoise(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Turquoise)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_violet(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Violet)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_wheat(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Wheat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_white(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_White)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_white_smoke(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WhiteSmoke)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_yellow(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Yellow)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_yellow_green(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_YellowGreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class Colors: IColors} + RT_ACTIVATABLE!{IColorsStatics [CLSID_Colors]} + DEFINE_CLSID!(CLSID_Colors = &[87,105,110,100,111,119,115,46,85,73,46,67,111,108,111,114,115,0]); +pub mod core { // Windows.UI.Core +use ::prelude::*; + RT_STRUCT! { struct CoreWindowDialogsContract { + + }} + DEFINE_IID!(IID_ICoreWindowPopupShowingEventArgs, 638934946, 23461, 20132, 163, 180, 45, 199, 214, 60, 142, 38); + RT_INTERFACE!{interface ICoreWindowPopupShowingEventArgs(ICoreWindowPopupShowingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindowPopupShowingEventArgs] { + fn SetDesiredSize(&mut self, value: super::super::foundation::Size) -> HRESULT + }} + impl ICoreWindowPopupShowingEventArgs { + #[inline] pub unsafe fn set_desired_size(&mut self, value: super::super::foundation::Size) -> Result<()> { + let hr = ((*self.lpVtbl).SetDesiredSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CoreWindowPopupShowingEventArgs: ICoreWindowPopupShowingEventArgs} + DEFINE_IID!(IID_ICoreWindowDialog, 3879283936, 51085, 17022, 139, 44, 1, 255, 66, 12, 105, 213); + RT_INTERFACE!{interface ICoreWindowDialog(ICoreWindowDialogVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindowDialog] { + fn add_Showing(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Showing(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_MaxSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_MinSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_IsInteractionDelayed(&mut self, out: *mut i32) -> HRESULT, + fn put_IsInteractionDelayed(&mut self, value: i32) -> HRESULT, + fn get_Commands(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_DefaultCommandIndex(&mut self, out: *mut u32) -> HRESULT, + fn put_DefaultCommandIndex(&mut self, value: u32) -> HRESULT, + fn get_CancelCommandIndex(&mut self, out: *mut u32) -> HRESULT, + fn put_CancelCommandIndex(&mut self, value: u32) -> HRESULT, + fn get_BackButtonCommand(&mut self, out: *mut *mut super::popups::UICommandInvokedHandler) -> HRESULT, + fn put_BackButtonCommand(&mut self, value: *mut super::popups::UICommandInvokedHandler) -> HRESULT, + fn ShowAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICoreWindowDialog { + #[inline] pub unsafe fn add_showing(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Showing)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_showing(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Showing)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_interaction_delayed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInteractionDelayed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_interaction_delayed(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsInteractionDelayed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_commands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Commands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_command_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DefaultCommandIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_command_index(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultCommandIndex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cancel_command_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CancelCommandIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cancel_command_index(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CancelCommandIndex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_back_button_command(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BackButtonCommand)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_back_button_command(&mut self, value: &super::popups::UICommandInvokedHandler) -> Result<()> { + let hr = ((*self.lpVtbl).put_BackButtonCommand)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreWindowDialogFactory, 3484592213, 7257, 19219, 177, 229, 22, 226, 152, 5, 247, 196); + RT_INTERFACE!{static interface ICoreWindowDialogFactory(ICoreWindowDialogFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindowDialogFactory] { + fn CreateWithTitle(&mut self, title: HSTRING, out: *mut *mut CoreWindowDialog) -> HRESULT + }} + impl ICoreWindowDialogFactory { + #[inline] pub unsafe fn create_with_title(&mut self, title: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithTitle)(self, title.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CoreWindowDialog: ICoreWindowDialog [ICoreWindowDialogFactory] [CLSID_CoreWindowDialog]} + DEFINE_CLSID!(CLSID_CoreWindowDialog = &[87,105,110,100,111,119,115,46,85,73,46,67,111,114,101,46,67,111,114,101,87,105,110,100,111,119,68,105,97,108,111,103,0]); + DEFINE_IID!(IID_ICoreWindowFlyout, 3902637389, 8272, 16571, 179, 68, 246, 243, 85, 238, 179, 20); + RT_INTERFACE!{interface ICoreWindowFlyout(ICoreWindowFlyoutVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindowFlyout] { + fn add_Showing(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Showing(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_MaxSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_MinSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_IsInteractionDelayed(&mut self, out: *mut i32) -> HRESULT, + fn put_IsInteractionDelayed(&mut self, value: i32) -> HRESULT, + fn get_Commands(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_DefaultCommandIndex(&mut self, out: *mut u32) -> HRESULT, + fn put_DefaultCommandIndex(&mut self, value: u32) -> HRESULT, + fn get_BackButtonCommand(&mut self, out: *mut *mut super::popups::UICommandInvokedHandler) -> HRESULT, + fn put_BackButtonCommand(&mut self, value: *mut super::popups::UICommandInvokedHandler) -> HRESULT, + fn ShowAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICoreWindowFlyout { + #[inline] pub unsafe fn add_showing(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Showing)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_showing(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Showing)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_interaction_delayed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInteractionDelayed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_interaction_delayed(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsInteractionDelayed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_commands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Commands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_command_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DefaultCommandIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_command_index(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultCommandIndex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_back_button_command(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BackButtonCommand)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_back_button_command(&mut self, value: &super::popups::UICommandInvokedHandler) -> Result<()> { + let hr = ((*self.lpVtbl).put_BackButtonCommand)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreWindowFlyoutFactory, 3737437892, 37864, 20348, 190, 39, 206, 250, 161, 175, 104, 167); + RT_INTERFACE!{static interface ICoreWindowFlyoutFactory(ICoreWindowFlyoutFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindowFlyoutFactory] { + fn Create(&mut self, position: super::super::foundation::Point, out: *mut *mut CoreWindowFlyout) -> HRESULT, + fn CreateWithTitle(&mut self, position: super::super::foundation::Point, title: HSTRING, out: *mut *mut CoreWindowFlyout) -> HRESULT + }} + impl ICoreWindowFlyoutFactory { + #[inline] pub unsafe fn create(&mut self, position: super::super::foundation::Point) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, position, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_title(&mut self, position: super::super::foundation::Point, title: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithTitle)(self, position, title.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CoreWindowFlyout: ICoreWindowFlyout [ICoreWindowFlyoutFactory] [CLSID_CoreWindowFlyout]} + DEFINE_CLSID!(CLSID_CoreWindowFlyout = &[87,105,110,100,111,119,115,46,85,73,46,67,111,114,101,46,67,111,114,101,87,105,110,100,111,119,70,108,121,111,117,116,0]); + RT_ENUM! { enum CoreWindowActivationState: i32 { + CodeActivated (CoreWindowActivationState_CodeActivated) = 0, Deactivated (CoreWindowActivationState_Deactivated) = 1, PointerActivated (CoreWindowActivationState_PointerActivated) = 2, + }} + RT_ENUM! { enum CoreCursorType: i32 { + Arrow (CoreCursorType_Arrow) = 0, Cross (CoreCursorType_Cross) = 1, Custom (CoreCursorType_Custom) = 2, Hand (CoreCursorType_Hand) = 3, Help (CoreCursorType_Help) = 4, IBeam (CoreCursorType_IBeam) = 5, SizeAll (CoreCursorType_SizeAll) = 6, SizeNortheastSouthwest (CoreCursorType_SizeNortheastSouthwest) = 7, SizeNorthSouth (CoreCursorType_SizeNorthSouth) = 8, SizeNorthwestSoutheast (CoreCursorType_SizeNorthwestSoutheast) = 9, SizeWestEast (CoreCursorType_SizeWestEast) = 10, UniversalNo (CoreCursorType_UniversalNo) = 11, UpArrow (CoreCursorType_UpArrow) = 12, Wait (CoreCursorType_Wait) = 13, + }} + RT_ENUM! { enum CoreDispatcherPriority: i32 { + Idle (CoreDispatcherPriority_Idle) = -2, Low (CoreDispatcherPriority_Low) = -1, Normal (CoreDispatcherPriority_Normal) = 0, High (CoreDispatcherPriority_High) = 1, + }} + RT_ENUM! { enum CoreProcessEventsOption: i32 { + ProcessOneAndAllPending (CoreProcessEventsOption_ProcessOneAndAllPending) = 0, ProcessOneIfPresent (CoreProcessEventsOption_ProcessOneIfPresent) = 1, ProcessUntilQuit (CoreProcessEventsOption_ProcessUntilQuit) = 2, ProcessAllIfPresent (CoreProcessEventsOption_ProcessAllIfPresent) = 3, + }} + RT_ENUM! { enum CoreWindowFlowDirection: i32 { + LeftToRight (CoreWindowFlowDirection_LeftToRight) = 0, RightToLeft (CoreWindowFlowDirection_RightToLeft) = 1, + }} + RT_ENUM! { enum CoreVirtualKeyStates: u32 { + None (CoreVirtualKeyStates_None) = 0, Down (CoreVirtualKeyStates_Down) = 1, Locked (CoreVirtualKeyStates_Locked) = 2, + }} + RT_ENUM! { enum CoreAcceleratorKeyEventType: i32 { + Character (CoreAcceleratorKeyEventType_Character) = 2, DeadCharacter (CoreAcceleratorKeyEventType_DeadCharacter) = 3, KeyDown (CoreAcceleratorKeyEventType_KeyDown) = 0, KeyUp (CoreAcceleratorKeyEventType_KeyUp) = 1, SystemCharacter (CoreAcceleratorKeyEventType_SystemCharacter) = 6, SystemDeadCharacter (CoreAcceleratorKeyEventType_SystemDeadCharacter) = 7, SystemKeyDown (CoreAcceleratorKeyEventType_SystemKeyDown) = 4, SystemKeyUp (CoreAcceleratorKeyEventType_SystemKeyUp) = 5, UnicodeCharacter (CoreAcceleratorKeyEventType_UnicodeCharacter) = 8, + }} + RT_ENUM! { enum CoreProximityEvaluationScore: i32 { + Closest (CoreProximityEvaluationScore_Closest) = 0, Farthest (CoreProximityEvaluationScore_Farthest) = 2147483647, + }} + RT_ENUM! { enum CoreInputDeviceTypes: u32 { + None (CoreInputDeviceTypes_None) = 0, Touch (CoreInputDeviceTypes_Touch) = 1, Pen (CoreInputDeviceTypes_Pen) = 2, Mouse (CoreInputDeviceTypes_Mouse) = 4, + }} + RT_STRUCT! { struct CorePhysicalKeyStatus { + RepeatCount: u32, ScanCode: u32, IsExtendedKey: bool, IsMenuKeyDown: bool, WasKeyDown: bool, IsKeyReleased: bool, + }} + RT_STRUCT! { struct CoreProximityEvaluation { + Score: i32, AdjustedPoint: super::super::foundation::Point, + }} + DEFINE_IID!(IID_ICoreWindowEventArgs, 657137395, 50739, 19877, 162, 108, 198, 208, 245, 107, 41, 218); + RT_INTERFACE!{interface ICoreWindowEventArgs(ICoreWindowEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindowEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT + }} + impl ICoreWindowEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAutomationProviderRequestedEventArgs, 2518676056, 8639, 19266, 162, 152, 250, 71, 157, 76, 82, 226); + RT_INTERFACE!{interface IAutomationProviderRequestedEventArgs(IAutomationProviderRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAutomationProviderRequestedEventArgs] { + fn get_AutomationProvider(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_AutomationProvider(&mut self, value: *mut IInspectable) -> HRESULT + }} + impl IAutomationProviderRequestedEventArgs { + #[inline] pub unsafe fn get_automation_provider(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AutomationProvider)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_automation_provider(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutomationProvider)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICharacterReceivedEventArgs, 3313788319, 39346, 19404, 189, 51, 4, 230, 63, 66, 144, 46); + RT_INTERFACE!{interface ICharacterReceivedEventArgs(ICharacterReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICharacterReceivedEventArgs] { + fn get_KeyCode(&mut self, out: *mut u32) -> HRESULT, + fn get_KeyStatus(&mut self, out: *mut CorePhysicalKeyStatus) -> HRESULT + }} + impl ICharacterReceivedEventArgs { + #[inline] pub unsafe fn get_key_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInputEnabledEventArgs, 2151095631, 12248, 19492, 170, 134, 49, 99, 168, 123, 78, 90); + RT_INTERFACE!{interface IInputEnabledEventArgs(IInputEnabledEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInputEnabledEventArgs] { + fn get_InputEnabled(&mut self, out: *mut bool) -> HRESULT + }} + impl IInputEnabledEventArgs { + #[inline] pub unsafe fn get_input_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InputEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyEventArgs, 1609951536, 9540, 18967, 189, 120, 31, 47, 222, 187, 16, 107); + RT_INTERFACE!{interface IKeyEventArgs(IKeyEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IKeyEventArgs] { + #[cfg(not(feature="windows.system"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.system")] fn get_VirtualKey(&mut self, out: *mut super::super::system::VirtualKey) -> HRESULT, + fn get_KeyStatus(&mut self, out: *mut CorePhysicalKeyStatus) -> HRESULT + }} + impl IKeyEventArgs { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_virtual_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VirtualKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyEventArgs2, 1480252824, 1936, 17777, 155, 18, 100, 94, 249, 215, 158, 66); + RT_INTERFACE!{interface IKeyEventArgs2(IKeyEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IKeyEventArgs2] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKeyEventArgs2 { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPointerEventArgs, 2450365617, 42492, 18977, 140, 9, 73, 223, 230, 255, 226, 95); + RT_INTERFACE!{interface IPointerEventArgs(IPointerEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPointerEventArgs] { + fn get_CurrentPoint(&mut self, out: *mut *mut super::input::PointerPoint) -> HRESULT, + #[cfg(not(feature="windows.system"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.system")] fn get_KeyModifiers(&mut self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT, + fn GetIntermediatePoints(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IPointerEventArgs { + #[inline] pub unsafe fn get_current_point(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentPoint)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_key_modifiers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyModifiers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_intermediate_points(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIntermediatePoints)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITouchHitTestingEventArgs, 586397731, 2940, 16974, 157, 247, 51, 212, 249, 98, 147, 27); + RT_INTERFACE!{interface ITouchHitTestingEventArgs(ITouchHitTestingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITouchHitTestingEventArgs] { + fn get_ProximityEvaluation(&mut self, out: *mut CoreProximityEvaluation) -> HRESULT, + fn put_ProximityEvaluation(&mut self, value: CoreProximityEvaluation) -> HRESULT, + fn get_Point(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_BoundingBox(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn EvaluateProximityToRect(&mut self, controlBoundingBox: super::super::foundation::Rect, out: *mut CoreProximityEvaluation) -> HRESULT, + fn EvaluateProximityToPolygon(&mut self, controlVerticesSize: u32, controlVertices: *mut super::super::foundation::Point, out: *mut CoreProximityEvaluation) -> HRESULT + }} + impl ITouchHitTestingEventArgs { + #[inline] pub unsafe fn get_proximity_evaluation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProximityEvaluation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_proximity_evaluation(&mut self, value: CoreProximityEvaluation) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProximityEvaluation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Point)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bounding_box(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BoundingBox)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn evaluate_proximity_to_rect(&mut self, controlBoundingBox: super::super::foundation::Rect) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).EvaluateProximityToRect)(self, controlBoundingBox, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn evaluate_proximity_to_polygon(&mut self, controlVertices: &[super::super::foundation::Point]) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).EvaluateProximityToPolygon)(self, controlVertices.len() as u32, controlVertices.as_ptr() as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IClosestInteractiveBoundsRequestedEventArgs, 880546263, 63224, 16611, 178, 159, 174, 80, 211, 232, 100, 134); + RT_INTERFACE!{interface IClosestInteractiveBoundsRequestedEventArgs(IClosestInteractiveBoundsRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IClosestInteractiveBoundsRequestedEventArgs] { + fn get_PointerPosition(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_SearchBounds(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_ClosestInteractiveBounds(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn put_ClosestInteractiveBounds(&mut self, value: super::super::foundation::Rect) -> HRESULT + }} + impl IClosestInteractiveBoundsRequestedEventArgs { + #[inline] pub unsafe fn get_pointer_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_search_bounds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SearchBounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_closest_interactive_bounds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ClosestInteractiveBounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_closest_interactive_bounds(&mut self, value: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).put_ClosestInteractiveBounds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWindowActivatedEventArgs, 396191207, 18008, 19638, 170, 19, 65, 208, 148, 234, 37, 94); + RT_INTERFACE!{interface IWindowActivatedEventArgs(IWindowActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWindowActivatedEventArgs] { + fn get_WindowActivationState(&mut self, out: *mut CoreWindowActivationState) -> HRESULT + }} + impl IWindowActivatedEventArgs { + #[inline] pub unsafe fn get_window_activation_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WindowActivationState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWindowSizeChangedEventArgs, 1512050375, 1062, 18396, 184, 108, 111, 71, 89, 21, 228, 81); + RT_INTERFACE!{interface IWindowSizeChangedEventArgs(IWindowSizeChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWindowSizeChangedEventArgs] { + fn get_Size(&mut self, out: *mut super::super::foundation::Size) -> HRESULT + }} + impl IWindowSizeChangedEventArgs { + #[inline] pub unsafe fn get_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVisibilityChangedEventArgs, 3214481642, 55297, 17764, 164, 149, 177, 232, 79, 138, 208, 133); + RT_INTERFACE!{interface IVisibilityChangedEventArgs(IVisibilityChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVisibilityChangedEventArgs] { + fn get_Visible(&mut self, out: *mut bool) -> HRESULT + }} + impl IVisibilityChangedEventArgs { + #[inline] pub unsafe fn get_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Visible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreWindow, 2042222066, 34718, 19337, 183, 152, 121, 228, 117, 152, 3, 12); + RT_INTERFACE!{interface ICoreWindow(ICoreWindowVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindow] { + fn get_AutomationHostProvider(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_Bounds(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_CustomProperties(&mut self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn get_Dispatcher(&mut self, out: *mut *mut CoreDispatcher) -> HRESULT, + fn get_FlowDirection(&mut self, out: *mut CoreWindowFlowDirection) -> HRESULT, + fn put_FlowDirection(&mut self, value: CoreWindowFlowDirection) -> HRESULT, + fn get_IsInputEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsInputEnabled(&mut self, value: bool) -> HRESULT, + fn get_PointerCursor(&mut self, out: *mut *mut CoreCursor) -> HRESULT, + fn put_PointerCursor(&mut self, value: *mut CoreCursor) -> HRESULT, + fn get_PointerPosition(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Visible(&mut self, out: *mut bool) -> HRESULT, + fn Activate(&mut self) -> HRESULT, + fn Close(&mut self) -> HRESULT, + #[cfg(not(feature="windows.system"))] fn __Dummy14(&mut self) -> (), + #[cfg(feature="windows.system")] fn GetAsyncKeyState(&mut self, virtualKey: super::super::system::VirtualKey, out: *mut CoreVirtualKeyStates) -> HRESULT, + #[cfg(not(feature="windows.system"))] fn __Dummy15(&mut self) -> (), + #[cfg(feature="windows.system")] fn GetKeyState(&mut self, virtualKey: super::super::system::VirtualKey, out: *mut CoreVirtualKeyStates) -> HRESULT, + fn ReleasePointerCapture(&mut self) -> HRESULT, + fn SetPointerCapture(&mut self) -> HRESULT, + fn add_Activated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Activated(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AutomationProviderRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AutomationProviderRequested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CharacterReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CharacterReceived(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Closed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_InputEnabled(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_InputEnabled(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyDown(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyDown(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyUp(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyUp(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerCaptureLost(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerCaptureLost(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerEntered(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerEntered(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerExited(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerExited(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerMoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerMoved(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerPressed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerPressed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerReleased(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerReleased(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_TouchHitTesting(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TouchHitTesting(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerWheelChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerWheelChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SizeChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SizeChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VisibilityChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisibilityChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICoreWindow { + #[inline] pub unsafe fn get_automation_host_provider(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AutomationHostProvider)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_bounds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_dispatcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Dispatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_flow_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FlowDirection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_flow_direction(&mut self, value: CoreWindowFlowDirection) -> Result<()> { + let hr = ((*self.lpVtbl).put_FlowDirection)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_input_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInputEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_input_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsInputEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_cursor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerCursor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_pointer_cursor(&mut self, value: &CoreCursor) -> Result<()> { + let hr = ((*self.lpVtbl).put_PointerCursor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Visible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn activate(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Activate)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn close(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Close)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_async_key_state(&mut self, virtualKey: super::super::system::VirtualKey) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetAsyncKeyState)(self, virtualKey, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_key_state(&mut self, virtualKey: super::super::system::VirtualKey) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetKeyState)(self, virtualKey, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn release_pointer_capture(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReleasePointerCapture)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_pointer_capture(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SetPointerCapture)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_activated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Activated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_activated(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Activated)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_automation_provider_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AutomationProviderRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_automation_provider_requested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AutomationProviderRequested)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_character_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CharacterReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_character_received(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CharacterReceived)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_closed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Closed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Closed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_input_enabled(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_InputEnabled)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_input_enabled(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_InputEnabled)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_key_down(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_KeyDown)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_key_down(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_KeyDown)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_key_up(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_KeyUp)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_key_up(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_KeyUp)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_capture_lost(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerCaptureLost)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_capture_lost(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerCaptureLost)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_entered(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerEntered)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_entered(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerEntered)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_exited(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerExited)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_exited(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerExited)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_moved(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerMoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_moved(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerMoved)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_pressed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_pressed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_released(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerReleased)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_released(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerReleased)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_touch_hit_testing(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TouchHitTesting)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_touch_hit_testing(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TouchHitTesting)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_wheel_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerWheelChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_wheel_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerWheelChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_size_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SizeChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_size_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SizeChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_visibility_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VisibilityChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_visibility_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VisibilityChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CoreDispatcher: ICoreDispatcher} + RT_CLASS!{class CoreCursor: ICoreCursor [ICoreCursorFactory] [CLSID_CoreCursor]} + DEFINE_CLSID!(CLSID_CoreCursor = &[87,105,110,100,111,119,115,46,85,73,46,67,111,114,101,46,67,111,114,101,67,117,114,115,111,114,0]); + RT_CLASS!{class CoreWindow: ICoreWindow} + RT_ACTIVATABLE!{ICoreWindowStatic [CLSID_CoreWindow]} + DEFINE_CLSID!(CLSID_CoreWindow = &[87,105,110,100,111,119,115,46,85,73,46,67,111,114,101,46,67,111,114,101,87,105,110,100,111,119,0]); + RT_CLASS!{class WindowActivatedEventArgs: IWindowActivatedEventArgs} + RT_CLASS!{class AutomationProviderRequestedEventArgs: IAutomationProviderRequestedEventArgs} + RT_CLASS!{class CharacterReceivedEventArgs: ICharacterReceivedEventArgs} + RT_CLASS!{class CoreWindowEventArgs: ICoreWindowEventArgs} + RT_CLASS!{class InputEnabledEventArgs: IInputEnabledEventArgs} + RT_CLASS!{class KeyEventArgs: IKeyEventArgs} + RT_CLASS!{class PointerEventArgs: IPointerEventArgs} + RT_CLASS!{class TouchHitTestingEventArgs: ITouchHitTestingEventArgs} + RT_CLASS!{class WindowSizeChangedEventArgs: IWindowSizeChangedEventArgs} + RT_CLASS!{class VisibilityChangedEventArgs: IVisibilityChangedEventArgs} + DEFINE_IID!(IID_ICoreWindow2, 2083199877, 26903, 17249, 156, 2, 13, 158, 58, 66, 11, 149); + RT_INTERFACE!{interface ICoreWindow2(ICoreWindow2Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindow2] { + fn put_PointerPosition(&mut self, value: super::super::foundation::Point) -> HRESULT + }} + impl ICoreWindow2 { + #[inline] pub unsafe fn set_pointer_position(&mut self, value: super::super::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).put_PointerPosition)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreWindow3, 851578328, 64239, 17269, 162, 171, 50, 100, 14, 72, 21, 199); + RT_INTERFACE!{interface ICoreWindow3(ICoreWindow3Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindow3] { + fn add_ClosestInteractiveBoundsRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ClosestInteractiveBoundsRequested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetCurrentKeyEventDeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICoreWindow3 { + #[inline] pub unsafe fn add_closest_interactive_bounds_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ClosestInteractiveBoundsRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closest_interactive_bounds_requested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ClosestInteractiveBoundsRequested)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_key_event_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentKeyEventDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ClosestInteractiveBoundsRequestedEventArgs: IClosestInteractiveBoundsRequestedEventArgs} + DEFINE_IID!(IID_ICoreWindowStatic, 1294176261, 15402, 16817, 144, 34, 83, 107, 185, 207, 147, 177); + RT_INTERFACE!{static interface ICoreWindowStatic(ICoreWindowStaticVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindowStatic] { + fn GetForCurrentThread(&mut self, out: *mut *mut CoreWindow) -> HRESULT + }} + impl ICoreWindowStatic { + #[inline] pub unsafe fn get_for_current_thread(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentThread)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_DispatchedHandler, 3522328260, 39128, 17974, 191, 73, 235, 121, 80, 117, 72, 233); + RT_DELEGATE!{delegate DispatchedHandler(DispatchedHandlerVtbl, DispatchedHandlerImpl) [IID_DispatchedHandler] { + fn Invoke(&mut self) -> HRESULT + }} + impl DispatchedHandler { + #[inline] pub unsafe fn invoke(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IdleDispatchedHandler, 2754284580, 32545, 19132, 153, 193, 143, 1, 0, 127, 8, 128); + RT_DELEGATE!{delegate IdleDispatchedHandler(IdleDispatchedHandlerVtbl, IdleDispatchedHandlerImpl) [IID_IdleDispatchedHandler] { + fn Invoke(&mut self, e: *mut IdleDispatchedHandlerArgs) -> HRESULT + }} + impl IdleDispatchedHandler { + #[inline] pub unsafe fn invoke(&mut self, e: &IdleDispatchedHandlerArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class IdleDispatchedHandlerArgs: IIdleDispatchedHandlerArgs} + DEFINE_IID!(IID_IAcceleratorKeyEventArgs, 4280044618, 37511, 18187, 131, 110, 144, 134, 227, 18, 106, 222); + RT_INTERFACE!{interface IAcceleratorKeyEventArgs(IAcceleratorKeyEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAcceleratorKeyEventArgs] { + fn get_EventType(&mut self, out: *mut CoreAcceleratorKeyEventType) -> HRESULT, + #[cfg(not(feature="windows.system"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.system")] fn get_VirtualKey(&mut self, out: *mut super::super::system::VirtualKey) -> HRESULT, + fn get_KeyStatus(&mut self, out: *mut CorePhysicalKeyStatus) -> HRESULT + }} + impl IAcceleratorKeyEventArgs { + #[inline] pub unsafe fn get_event_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EventType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_virtual_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VirtualKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAcceleratorKeyEventArgs2, 3540036086, 12158, 18547, 165, 85, 22, 110, 89, 110, 225, 197); + RT_INTERFACE!{interface IAcceleratorKeyEventArgs2(IAcceleratorKeyEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IAcceleratorKeyEventArgs2] { + fn get_DeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IAcceleratorKeyEventArgs2 { + #[inline] pub unsafe fn get_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreAcceleratorKeys, 2684221429, 47305, 20208, 183, 210, 29, 230, 38, 86, 31, 200); + RT_INTERFACE!{interface ICoreAcceleratorKeys(ICoreAcceleratorKeysVtbl): IInspectable(IInspectableVtbl) [IID_ICoreAcceleratorKeys] { + fn add_AcceleratorKeyActivated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AcceleratorKeyActivated(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICoreAcceleratorKeys { + #[inline] pub unsafe fn add_accelerator_key_activated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AcceleratorKeyActivated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_accelerator_key_activated(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AcceleratorKeyActivated)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AcceleratorKeyEventArgs: IAcceleratorKeyEventArgs} + DEFINE_IID!(IID_ICoreDispatcher, 1624977320, 46853, 20446, 167, 214, 235, 187, 24, 145, 211, 158); + RT_INTERFACE!{interface ICoreDispatcher(ICoreDispatcherVtbl): IInspectable(IInspectableVtbl) [IID_ICoreDispatcher] { + fn get_HasThreadAccess(&mut self, out: *mut bool) -> HRESULT, + fn ProcessEvents(&mut self, options: CoreProcessEventsOption) -> HRESULT, + fn RunAsync(&mut self, priority: CoreDispatcherPriority, agileCallback: *mut DispatchedHandler, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RunIdleAsync(&mut self, agileCallback: *mut IdleDispatchedHandler, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl ICoreDispatcher { + #[inline] pub unsafe fn get_has_thread_access(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasThreadAccess)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn process_events(&mut self, options: CoreProcessEventsOption) -> Result<()> { + let hr = ((*self.lpVtbl).ProcessEvents)(self, options); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn run_async(&mut self, priority: CoreDispatcherPriority, agileCallback: &DispatchedHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RunAsync)(self, priority, agileCallback as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn run_idle_async(&mut self, agileCallback: &IdleDispatchedHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RunIdleAsync)(self, agileCallback as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreDispatcher2, 1868456903, 58282, 20142, 176, 224, 220, 243, 33, 202, 75, 47); + RT_INTERFACE!{interface ICoreDispatcher2(ICoreDispatcher2Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreDispatcher2] { + fn TryRunAsync(&mut self, priority: CoreDispatcherPriority, agileCallback: *mut DispatchedHandler, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryRunIdleAsync(&mut self, agileCallback: *mut IdleDispatchedHandler, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ICoreDispatcher2 { + #[inline] pub unsafe fn try_run_async(&mut self, priority: CoreDispatcherPriority, agileCallback: &DispatchedHandler) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryRunAsync)(self, priority, agileCallback as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_run_idle_async(&mut self, agileCallback: &IdleDispatchedHandler) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryRunIdleAsync)(self, agileCallback as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreDispatcherWithTaskPriority, 3137006765, 18509, 16830, 186, 128, 29, 88, 198, 82, 99, 234); + RT_INTERFACE!{interface ICoreDispatcherWithTaskPriority(ICoreDispatcherWithTaskPriorityVtbl): IInspectable(IInspectableVtbl) [IID_ICoreDispatcherWithTaskPriority] { + fn get_CurrentPriority(&mut self, out: *mut CoreDispatcherPriority) -> HRESULT, + fn put_CurrentPriority(&mut self, value: CoreDispatcherPriority) -> HRESULT, + fn ShouldYield(&mut self, out: *mut bool) -> HRESULT, + fn ShouldYieldToPriority(&mut self, priority: CoreDispatcherPriority, out: *mut bool) -> HRESULT, + fn StopProcessEvents(&mut self) -> HRESULT + }} + impl ICoreDispatcherWithTaskPriority { + #[inline] pub unsafe fn get_current_priority(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CurrentPriority)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_current_priority(&mut self, value: CoreDispatcherPriority) -> Result<()> { + let hr = ((*self.lpVtbl).put_CurrentPriority)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn should_yield(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ShouldYield)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn should_yield_to_priority(&mut self, priority: CoreDispatcherPriority) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ShouldYieldToPriority)(self, priority, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn stop_process_events(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).StopProcessEvents)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IIdleDispatchedHandlerArgs, 2562419236, 56348, 17355, 180, 237, 209, 192, 235, 35, 145, 243); + RT_INTERFACE!{interface IIdleDispatchedHandlerArgs(IIdleDispatchedHandlerArgsVtbl): IInspectable(IInspectableVtbl) [IID_IIdleDispatchedHandlerArgs] { + fn get_IsDispatcherIdle(&mut self, out: *mut bool) -> HRESULT + }} + impl IIdleDispatchedHandlerArgs { + #[inline] pub unsafe fn get_is_dispatcher_idle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDispatcherIdle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CoreAcceleratorKeys: ICoreAcceleratorKeys} + DEFINE_IID!(IID_ICoreCursor, 2525575887, 4381, 17452, 138, 119, 184, 121, 146, 248, 226, 214); + RT_INTERFACE!{interface ICoreCursor(ICoreCursorVtbl): IInspectable(IInspectableVtbl) [IID_ICoreCursor] { + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_Type(&mut self, out: *mut CoreCursorType) -> HRESULT + }} + impl ICoreCursor { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreCursorFactory, 4130706977, 42909, 20179, 140, 50, 169, 239, 157, 107, 118, 164); + RT_INTERFACE!{static interface ICoreCursorFactory(ICoreCursorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICoreCursorFactory] { + fn CreateCursor(&mut self, type_: CoreCursorType, id: u32, out: *mut *mut CoreCursor) -> HRESULT + }} + impl ICoreCursorFactory { + #[inline] pub unsafe fn create_cursor(&mut self, type_: CoreCursorType, id: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCursor)(self, type_, id, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInitializeWithCoreWindow, 412033238, 39027, 17994, 172, 229, 87, 224, 16, 244, 101, 230); + RT_INTERFACE!{interface IInitializeWithCoreWindow(IInitializeWithCoreWindowVtbl): IInspectable(IInspectableVtbl) [IID_IInitializeWithCoreWindow] { + fn Initialize(&mut self, window: *mut CoreWindow) -> HRESULT + }} + impl IInitializeWithCoreWindow { + #[inline] pub unsafe fn initialize(&mut self, window: &CoreWindow) -> Result<()> { + let hr = ((*self.lpVtbl).Initialize)(self, window as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreWindowResizeManager, 3102783781, 45904, 18611, 161, 152, 92, 26, 132, 112, 2, 67); + RT_INTERFACE!{interface ICoreWindowResizeManager(ICoreWindowResizeManagerVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindowResizeManager] { + fn NotifyLayoutCompleted(&mut self) -> HRESULT + }} + impl ICoreWindowResizeManager { + #[inline] pub unsafe fn notify_layout_completed(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyLayoutCompleted)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreWindowResizeManagerLayoutCapability, 3145003643, 42308, 17153, 128, 230, 10, 224, 51, 239, 69, 54); + RT_INTERFACE!{interface ICoreWindowResizeManagerLayoutCapability(ICoreWindowResizeManagerLayoutCapabilityVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindowResizeManagerLayoutCapability] { + fn put_ShouldWaitForLayoutCompletion(&mut self, value: bool) -> HRESULT, + fn get_ShouldWaitForLayoutCompletion(&mut self, out: *mut bool) -> HRESULT + }} + impl ICoreWindowResizeManagerLayoutCapability { + #[inline] pub unsafe fn set_should_wait_for_layout_completion(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShouldWaitForLayoutCompletion)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_should_wait_for_layout_completion(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShouldWaitForLayoutCompletion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreWindowResizeManagerStatics, 2924122181, 28016, 18907, 142, 104, 70, 255, 189, 23, 211, 141); + RT_INTERFACE!{static interface ICoreWindowResizeManagerStatics(ICoreWindowResizeManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindowResizeManagerStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut CoreWindowResizeManager) -> HRESULT + }} + impl ICoreWindowResizeManagerStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CoreWindowResizeManager: ICoreWindowResizeManager} + RT_ACTIVATABLE!{ICoreWindowResizeManagerStatics [CLSID_CoreWindowResizeManager]} + DEFINE_CLSID!(CLSID_CoreWindowResizeManager = &[87,105,110,100,111,119,115,46,85,73,46,67,111,114,101,46,67,111,114,101,87,105,110,100,111,119,82,101,115,105,122,101,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_ICoreInputSourceBase, 2672330759, 17792, 19432, 190, 104, 146, 169, 49, 23, 19, 187); + RT_INTERFACE!{interface ICoreInputSourceBase(ICoreInputSourceBaseVtbl): IInspectable(IInspectableVtbl) [IID_ICoreInputSourceBase] { + fn get_Dispatcher(&mut self, out: *mut *mut CoreDispatcher) -> HRESULT, + fn get_IsInputEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsInputEnabled(&mut self, value: bool) -> HRESULT, + fn add_InputEnabled(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_InputEnabled(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICoreInputSourceBase { + #[inline] pub unsafe fn get_dispatcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Dispatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_input_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInputEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_input_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsInputEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_input_enabled(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_InputEnabled)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_input_enabled(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_InputEnabled)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICorePointerInputSource, 3153181464, 58490, 18667, 136, 7, 248, 248, 211, 234, 69, 81); + RT_INTERFACE!{interface ICorePointerInputSource(ICorePointerInputSourceVtbl): IInspectable(IInspectableVtbl) [IID_ICorePointerInputSource] { + fn ReleasePointerCapture(&mut self) -> HRESULT, + fn SetPointerCapture(&mut self) -> HRESULT, + fn get_HasCapture(&mut self, out: *mut bool) -> HRESULT, + fn get_PointerPosition(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_PointerCursor(&mut self, out: *mut *mut CoreCursor) -> HRESULT, + fn put_PointerCursor(&mut self, value: *mut CoreCursor) -> HRESULT, + fn add_PointerCaptureLost(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerCaptureLost(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerEntered(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerEntered(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerExited(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerExited(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerMoved(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerMoved(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerPressed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerPressed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerReleased(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerReleased(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerWheelChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerWheelChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICorePointerInputSource { + #[inline] pub unsafe fn release_pointer_capture(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReleasePointerCapture)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_pointer_capture(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SetPointerCapture)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_capture(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasCapture)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_cursor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerCursor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_pointer_cursor(&mut self, value: &CoreCursor) -> Result<()> { + let hr = ((*self.lpVtbl).put_PointerCursor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_capture_lost(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerCaptureLost)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_capture_lost(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerCaptureLost)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_entered(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerEntered)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_entered(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerEntered)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_exited(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerExited)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_exited(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerExited)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_moved(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerMoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_moved(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerMoved)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_pressed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_pressed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_released(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerReleased)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_released(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerReleased)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_wheel_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerWheelChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_wheel_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerWheelChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreKeyboardInputSource, 589074568, 58473, 19953, 178, 8, 110, 73, 13, 113, 203, 144); + RT_INTERFACE!{interface ICoreKeyboardInputSource(ICoreKeyboardInputSourceVtbl): IInspectable(IInspectableVtbl) [IID_ICoreKeyboardInputSource] { + #[cfg(not(feature="windows.system"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.system")] fn GetCurrentKeyState(&mut self, virtualKey: super::super::system::VirtualKey, out: *mut CoreVirtualKeyStates) -> HRESULT, + fn add_CharacterReceived(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CharacterReceived(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyDown(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyDown(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyUp(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyUp(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICoreKeyboardInputSource { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_current_key_state(&mut self, virtualKey: super::super::system::VirtualKey) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCurrentKeyState)(self, virtualKey, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_character_received(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CharacterReceived)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_character_received(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CharacterReceived)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_key_down(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_KeyDown)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_key_down(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_KeyDown)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_key_up(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_KeyUp)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_key_up(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_KeyUp)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreKeyboardInputSource2, 4196715412, 63843, 18341, 135, 120, 32, 124, 72, 43, 10, 253); + RT_INTERFACE!{interface ICoreKeyboardInputSource2(ICoreKeyboardInputSource2Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreKeyboardInputSource2] { + fn GetCurrentKeyEventDeviceId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICoreKeyboardInputSource2 { + #[inline] pub unsafe fn get_current_key_event_device_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentKeyEventDeviceId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreComponentFocusable, 1392078755, 34626, 17425, 174, 105, 121, 168, 95, 41, 172, 139); + RT_INTERFACE!{interface ICoreComponentFocusable(ICoreComponentFocusableVtbl): IInspectable(IInspectableVtbl) [IID_ICoreComponentFocusable] { + fn get_HasFocus(&mut self, out: *mut bool) -> HRESULT, + fn add_GotFocus(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_GotFocus(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_LostFocus(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LostFocus(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICoreComponentFocusable { + #[inline] pub unsafe fn get_has_focus(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasFocus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_got_focus(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_GotFocus)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_got_focus(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_GotFocus)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_lost_focus(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LostFocus)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_lost_focus(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LostFocus)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreTouchHitTesting, 2983764617, 15055, 16676, 159, 163, 234, 138, 186, 53, 60, 33); + RT_INTERFACE!{interface ICoreTouchHitTesting(ICoreTouchHitTestingVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTouchHitTesting] { + fn add_TouchHitTesting(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TouchHitTesting(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICoreTouchHitTesting { + #[inline] pub unsafe fn add_touch_hit_testing(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TouchHitTesting)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_touch_hit_testing(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TouchHitTesting)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreClosestInteractiveBoundsRequested, 4077061178, 59583, 20110, 174, 105, 201, 218, 221, 87, 161, 20); + RT_INTERFACE!{interface ICoreClosestInteractiveBoundsRequested(ICoreClosestInteractiveBoundsRequestedVtbl): IInspectable(IInspectableVtbl) [IID_ICoreClosestInteractiveBoundsRequested] { + fn add_ClosestInteractiveBoundsRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ClosestInteractiveBoundsRequested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICoreClosestInteractiveBoundsRequested { + #[inline] pub unsafe fn add_closest_interactive_bounds_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ClosestInteractiveBoundsRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closest_interactive_bounds_requested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ClosestInteractiveBoundsRequested)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CoreComponentInputSource: ICoreInputSourceBase} + RT_CLASS!{class CoreIndependentInputSource: ICoreInputSourceBase} + DEFINE_IID!(IID_ICorePointerRedirector, 2409434260, 22152, 19212, 169, 241, 249, 49, 247, 250, 61, 195); + RT_INTERFACE!{interface ICorePointerRedirector(ICorePointerRedirectorVtbl): IInspectable(IInspectableVtbl) [IID_ICorePointerRedirector] { + fn add_PointerRoutedAway(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerRoutedAway(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerRoutedTo(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerRoutedTo(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerRoutedReleased(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerRoutedReleased(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICorePointerRedirector { + #[inline] pub unsafe fn add_pointer_routed_away(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerRoutedAway)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_routed_away(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerRoutedAway)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_routed_to(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerRoutedTo)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_routed_to(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerRoutedTo)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_routed_released(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerRoutedReleased)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_routed_released(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerRoutedReleased)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISystemNavigationManager, 2466394392, 53072, 17062, 151, 6, 105, 16, 127, 161, 34, 225); + RT_INTERFACE!{interface ISystemNavigationManager(ISystemNavigationManagerVtbl): IInspectable(IInspectableVtbl) [IID_ISystemNavigationManager] { + fn add_BackRequested(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BackRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISystemNavigationManager { + #[inline] pub unsafe fn add_back_requested(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BackRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_back_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BackRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class BackRequestedEventArgs: IBackRequestedEventArgs} + RT_ENUM! { enum AppViewBackButtonVisibility: i32 { + Visible (AppViewBackButtonVisibility_Visible) = 0, Collapsed (AppViewBackButtonVisibility_Collapsed) = 1, + }} + DEFINE_IID!(IID_ISystemNavigationManager2, 2354119681, 26558, 18862, 149, 9, 103, 28, 30, 84, 163, 137); + RT_INTERFACE!{interface ISystemNavigationManager2(ISystemNavigationManager2Vtbl): IInspectable(IInspectableVtbl) [IID_ISystemNavigationManager2] { + fn get_AppViewBackButtonVisibility(&mut self, out: *mut AppViewBackButtonVisibility) -> HRESULT, + fn put_AppViewBackButtonVisibility(&mut self, value: AppViewBackButtonVisibility) -> HRESULT + }} + impl ISystemNavigationManager2 { + #[inline] pub unsafe fn get_app_view_back_button_visibility(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AppViewBackButtonVisibility)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_app_view_back_button_visibility(&mut self, value: AppViewBackButtonVisibility) -> Result<()> { + let hr = ((*self.lpVtbl).put_AppViewBackButtonVisibility)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISystemNavigationManagerStatics, 3696408014, 48864, 17157, 140, 84, 104, 34, 142, 214, 131, 181); + RT_INTERFACE!{static interface ISystemNavigationManagerStatics(ISystemNavigationManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISystemNavigationManagerStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut SystemNavigationManager) -> HRESULT + }} + impl ISystemNavigationManagerStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SystemNavigationManager: ISystemNavigationManager} + RT_ACTIVATABLE!{ISystemNavigationManagerStatics [CLSID_SystemNavigationManager]} + DEFINE_CLSID!(CLSID_SystemNavigationManager = &[87,105,110,100,111,119,115,46,85,73,46,67,111,114,101,46,83,121,115,116,101,109,78,97,118,105,103,97,116,105,111,110,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IBackRequestedEventArgs, 3590574730, 58385, 19022, 186, 65, 106, 50, 122, 134, 117, 188); + RT_INTERFACE!{interface IBackRequestedEventArgs(IBackRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBackRequestedEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT + }} + impl IBackRequestedEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +pub mod animationmetrics { // Windows.UI.Core.AnimationMetrics +use ::prelude::*; + RT_STRUCT! { struct AnimationMetricsContract { + + }} + RT_ENUM! { enum PropertyAnimationType: i32 { + Scale (PropertyAnimationType_Scale) = 0, Translation (PropertyAnimationType_Translation) = 1, Opacity (PropertyAnimationType_Opacity) = 2, + }} + DEFINE_IID!(IID_IPropertyAnimation, 973190362, 19852, 16670, 182, 21, 26, 222, 104, 58, 153, 3); + RT_INTERFACE!{interface IPropertyAnimation(IPropertyAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IPropertyAnimation] { + fn get_Type(&mut self, out: *mut PropertyAnimationType) -> HRESULT, + fn get_Delay(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Duration(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Control1(&mut self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn get_Control2(&mut self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT + }} + impl IPropertyAnimation { + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_delay(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Delay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_control1(&mut self) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Control1)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_control2(&mut self) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Control2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IScaleAnimation, 37049031, 29099, 17036, 156, 159, 211, 23, 128, 150, 73, 149); + RT_INTERFACE!{interface IScaleAnimation(IScaleAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IScaleAnimation] { + fn get_InitialScaleX(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_InitialScaleY(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_FinalScaleX(&mut self, out: *mut f32) -> HRESULT, + fn get_FinalScaleY(&mut self, out: *mut f32) -> HRESULT, + fn get_NormalizedOrigin(&mut self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT + }} + impl IScaleAnimation { + #[inline] pub unsafe fn get_initial_scale_x(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InitialScaleX)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_initial_scale_y(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InitialScaleY)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_final_scale_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FinalScaleX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_final_scale_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FinalScaleY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_normalized_origin(&mut self) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NormalizedOrigin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IOpacityAnimation, 2151328741, 61054, 17759, 132, 233, 37, 6, 175, 184, 210, 180); + RT_INTERFACE!{interface IOpacityAnimation(IOpacityAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IOpacityAnimation] { + fn get_InitialOpacity(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_FinalOpacity(&mut self, out: *mut f32) -> HRESULT + }} + impl IOpacityAnimation { + #[inline] pub unsafe fn get_initial_opacity(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InitialOpacity)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_final_opacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FinalOpacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum AnimationEffect: i32 { + Expand (AnimationEffect_Expand) = 0, Collapse (AnimationEffect_Collapse) = 1, Reposition (AnimationEffect_Reposition) = 2, FadeIn (AnimationEffect_FadeIn) = 3, FadeOut (AnimationEffect_FadeOut) = 4, AddToList (AnimationEffect_AddToList) = 5, DeleteFromList (AnimationEffect_DeleteFromList) = 6, AddToGrid (AnimationEffect_AddToGrid) = 7, DeleteFromGrid (AnimationEffect_DeleteFromGrid) = 8, AddToSearchGrid (AnimationEffect_AddToSearchGrid) = 9, DeleteFromSearchGrid (AnimationEffect_DeleteFromSearchGrid) = 10, AddToSearchList (AnimationEffect_AddToSearchList) = 11, DeleteFromSearchList (AnimationEffect_DeleteFromSearchList) = 12, ShowEdgeUI (AnimationEffect_ShowEdgeUI) = 13, ShowPanel (AnimationEffect_ShowPanel) = 14, HideEdgeUI (AnimationEffect_HideEdgeUI) = 15, HidePanel (AnimationEffect_HidePanel) = 16, ShowPopup (AnimationEffect_ShowPopup) = 17, HidePopup (AnimationEffect_HidePopup) = 18, PointerDown (AnimationEffect_PointerDown) = 19, PointerUp (AnimationEffect_PointerUp) = 20, DragSourceStart (AnimationEffect_DragSourceStart) = 21, DragSourceEnd (AnimationEffect_DragSourceEnd) = 22, TransitionContent (AnimationEffect_TransitionContent) = 23, Reveal (AnimationEffect_Reveal) = 24, Hide (AnimationEffect_Hide) = 25, DragBetweenEnter (AnimationEffect_DragBetweenEnter) = 26, DragBetweenLeave (AnimationEffect_DragBetweenLeave) = 27, SwipeSelect (AnimationEffect_SwipeSelect) = 28, SwipeDeselect (AnimationEffect_SwipeDeselect) = 29, SwipeReveal (AnimationEffect_SwipeReveal) = 30, EnterPage (AnimationEffect_EnterPage) = 31, TransitionPage (AnimationEffect_TransitionPage) = 32, CrossFade (AnimationEffect_CrossFade) = 33, Peek (AnimationEffect_Peek) = 34, UpdateBadge (AnimationEffect_UpdateBadge) = 35, + }} + RT_ENUM! { enum AnimationEffectTarget: i32 { + Primary (AnimationEffectTarget_Primary) = 0, Added (AnimationEffectTarget_Added) = 1, Affected (AnimationEffectTarget_Affected) = 2, Background (AnimationEffectTarget_Background) = 3, Content (AnimationEffectTarget_Content) = 4, Deleted (AnimationEffectTarget_Deleted) = 5, Deselected (AnimationEffectTarget_Deselected) = 6, DragSource (AnimationEffectTarget_DragSource) = 7, Hidden (AnimationEffectTarget_Hidden) = 8, Incoming (AnimationEffectTarget_Incoming) = 9, Outgoing (AnimationEffectTarget_Outgoing) = 10, Outline (AnimationEffectTarget_Outline) = 11, Remaining (AnimationEffectTarget_Remaining) = 12, Revealed (AnimationEffectTarget_Revealed) = 13, RowIn (AnimationEffectTarget_RowIn) = 14, RowOut (AnimationEffectTarget_RowOut) = 15, Selected (AnimationEffectTarget_Selected) = 16, Selection (AnimationEffectTarget_Selection) = 17, Shown (AnimationEffectTarget_Shown) = 18, Tapped (AnimationEffectTarget_Tapped) = 19, + }} + DEFINE_IID!(IID_IAnimationDescription, 2098308425, 48701, 16862, 176, 129, 5, 193, 73, 150, 47, 155); + RT_INTERFACE!{interface IAnimationDescription(IAnimationDescriptionVtbl): IInspectable(IInspectableVtbl) [IID_IAnimationDescription] { + fn get_Animations(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_StaggerDelay(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_StaggerDelayFactor(&mut self, out: *mut f32) -> HRESULT, + fn get_DelayLimit(&mut self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_ZOrder(&mut self, out: *mut i32) -> HRESULT + }} + impl IAnimationDescription { + #[inline] pub unsafe fn get_animations(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Animations)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stagger_delay(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StaggerDelay)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_stagger_delay_factor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StaggerDelayFactor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_delay_limit(&mut self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DelayLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_zorder(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ZOrder)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAnimationDescriptionFactory, 3336731326, 49659, 18613, 146, 113, 236, 199, 10, 200, 110, 240); + RT_INTERFACE!{static interface IAnimationDescriptionFactory(IAnimationDescriptionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAnimationDescriptionFactory] { + fn CreateInstance(&mut self, effect: AnimationEffect, target: AnimationEffectTarget, out: *mut *mut AnimationDescription) -> HRESULT + }} + impl IAnimationDescriptionFactory { + #[inline] pub unsafe fn create_instance(&mut self, effect: AnimationEffect, target: AnimationEffectTarget) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, effect, target, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AnimationDescription: IAnimationDescription [IAnimationDescriptionFactory] [CLSID_AnimationDescription]} + DEFINE_CLSID!(CLSID_AnimationDescription = &[87,105,110,100,111,119,115,46,85,73,46,67,111,114,101,46,65,110,105,109,97,116,105,111,110,77,101,116,114,105,99,115,46,65,110,105,109,97,116,105,111,110,68,101,115,99,114,105,112,116,105,111,110,0]); + RT_CLASS!{class PropertyAnimation: IPropertyAnimation} + RT_CLASS!{class ScaleAnimation: IScaleAnimation} + RT_CLASS!{class TranslationAnimation: IPropertyAnimation} + RT_CLASS!{class OpacityAnimation: IOpacityAnimation} +} // Windows.UI.Core.AnimationMetrics +} // Windows.UI.Core +pub mod applicationsettings { // Windows.UI.ApplicationSettings +use ::prelude::*; + DEFINE_IID!(IID_ISettingsCommandFactory, 1759599411, 7299, 17210, 170, 90, 206, 238, 165, 189, 71, 100); + RT_INTERFACE!{static interface ISettingsCommandFactory(ISettingsCommandFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISettingsCommandFactory] { + fn CreateSettingsCommand(&mut self, settingsCommandId: *mut IInspectable, label: HSTRING, handler: *mut super::popups::UICommandInvokedHandler, out: *mut *mut SettingsCommand) -> HRESULT + }} + impl ISettingsCommandFactory { + #[inline] pub unsafe fn create_settings_command(&mut self, settingsCommandId: &IInspectable, label: &HStringArg, handler: &super::popups::UICommandInvokedHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSettingsCommand)(self, settingsCommandId as *const _ as *mut _, label.get(), handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SettingsCommand: super::popups::IUICommand [ISettingsCommandFactory] [CLSID_SettingsCommand]} + RT_ACTIVATABLE!{ISettingsCommandStatics [CLSID_SettingsCommand]} + DEFINE_CLSID!(CLSID_SettingsCommand = &[87,105,110,100,111,119,115,46,85,73,46,65,112,112,108,105,99,97,116,105,111,110,83,101,116,116,105,110,103,115,46,83,101,116,116,105,110,103,115,67,111,109,109,97,110,100,0]); + DEFINE_IID!(IID_ISettingsCommandStatics, 1956309332, 12137, 19223, 138, 186, 208, 92, 229, 119, 142, 70); + RT_INTERFACE!{static interface ISettingsCommandStatics(ISettingsCommandStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISettingsCommandStatics] { + fn get_AccountsCommand(&mut self, out: *mut *mut SettingsCommand) -> HRESULT + }} + impl ISettingsCommandStatics { + #[inline] pub unsafe fn get_accounts_command(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccountsCommand)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_WebAccountProviderCommandInvokedHandler, 3084801319, 19599, 17117, 132, 218, 94, 196, 147, 171, 219, 154); + RT_DELEGATE!{delegate WebAccountProviderCommandInvokedHandler(WebAccountProviderCommandInvokedHandlerVtbl, WebAccountProviderCommandInvokedHandlerImpl) [IID_WebAccountProviderCommandInvokedHandler] { + fn Invoke(&mut self, command: *mut WebAccountProviderCommand) -> HRESULT + }} + impl WebAccountProviderCommandInvokedHandler { + #[inline] pub unsafe fn invoke(&mut self, command: &WebAccountProviderCommand) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, command as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class WebAccountProviderCommand: IWebAccountProviderCommand [IWebAccountProviderCommandFactory] [CLSID_WebAccountProviderCommand]} + DEFINE_CLSID!(CLSID_WebAccountProviderCommand = &[87,105,110,100,111,119,115,46,85,73,46,65,112,112,108,105,99,97,116,105,111,110,83,101,116,116,105,110,103,115,46,87,101,98,65,99,99,111,117,110,116,80,114,111,118,105,100,101,114,67,111,109,109,97,110,100,0]); + DEFINE_IID!(IID_IWebAccountProviderCommandFactory, 3580201499, 45430, 18294, 132, 105, 169, 211, 255, 11, 63, 89); + RT_INTERFACE!{static interface IWebAccountProviderCommandFactory(IWebAccountProviderCommandFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderCommandFactory] { + #[cfg(feature="windows.security")] fn CreateWebAccountProviderCommand(&mut self, webAccountProvider: *mut super::super::security::credentials::WebAccountProvider, invoked: *mut WebAccountProviderCommandInvokedHandler, out: *mut *mut WebAccountProviderCommand) -> HRESULT + }} + impl IWebAccountProviderCommandFactory { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn create_web_account_provider_command(&mut self, webAccountProvider: &super::super::security::credentials::WebAccountProvider, invoked: &WebAccountProviderCommandInvokedHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWebAccountProviderCommand)(self, webAccountProvider as *const _ as *mut _, invoked as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountProviderCommand, 3600539034, 41126, 20123, 136, 220, 199, 30, 117, 122, 53, 1); + RT_INTERFACE!{interface IWebAccountProviderCommand(IWebAccountProviderCommandVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderCommand] { + #[cfg(not(feature="windows.security"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_WebAccountProvider(&mut self, out: *mut *mut super::super::security::credentials::WebAccountProvider) -> HRESULT, + fn get_Invoked(&mut self, out: *mut *mut WebAccountProviderCommandInvokedHandler) -> HRESULT + }} + impl IWebAccountProviderCommand { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_web_account_provider(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebAccountProvider)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_invoked(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Invoked)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_WebAccountCommandInvokedHandler, 518448217, 5893, 19098, 181, 153, 160, 195, 214, 146, 25, 115); + RT_DELEGATE!{delegate WebAccountCommandInvokedHandler(WebAccountCommandInvokedHandlerVtbl, WebAccountCommandInvokedHandlerImpl) [IID_WebAccountCommandInvokedHandler] { + fn Invoke(&mut self, command: *mut WebAccountCommand, args: *mut WebAccountInvokedArgs) -> HRESULT + }} + impl WebAccountCommandInvokedHandler { + #[inline] pub unsafe fn invoke(&mut self, command: &WebAccountCommand, args: &WebAccountInvokedArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, command as *const _ as *mut _, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class WebAccountCommand: IWebAccountCommand [IWebAccountCommandFactory] [CLSID_WebAccountCommand]} + DEFINE_CLSID!(CLSID_WebAccountCommand = &[87,105,110,100,111,119,115,46,85,73,46,65,112,112,108,105,99,97,116,105,111,110,83,101,116,116,105,110,103,115,46,87,101,98,65,99,99,111,117,110,116,67,111,109,109,97,110,100,0]); + RT_CLASS!{class WebAccountInvokedArgs: IWebAccountInvokedArgs} + RT_ENUM! { enum WebAccountAction: i32 { + Reconnect (WebAccountAction_Reconnect) = 0, Remove (WebAccountAction_Remove) = 1, ViewDetails (WebAccountAction_ViewDetails) = 2, Manage (WebAccountAction_Manage) = 3, More (WebAccountAction_More) = 4, + }} + DEFINE_IID!(IID_IWebAccountInvokedArgs, 3886795840, 41432, 19549, 154, 127, 29, 52, 178, 249, 10, 210); + RT_INTERFACE!{interface IWebAccountInvokedArgs(IWebAccountInvokedArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountInvokedArgs] { + fn get_Action(&mut self, out: *mut WebAccountAction) -> HRESULT + }} + impl IWebAccountInvokedArgs { + #[inline] pub unsafe fn get_action(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Action)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ENUM! { enum SupportedWebAccountActions: u32 { + None (SupportedWebAccountActions_None) = 0, Reconnect (SupportedWebAccountActions_Reconnect) = 1, Remove (SupportedWebAccountActions_Remove) = 2, ViewDetails (SupportedWebAccountActions_ViewDetails) = 4, Manage (SupportedWebAccountActions_Manage) = 8, More (SupportedWebAccountActions_More) = 16, + }} + DEFINE_IID!(IID_IWebAccountCommandFactory, 3215379967, 12077, 17141, 129, 222, 29, 86, 186, 252, 73, 109); + RT_INTERFACE!{static interface IWebAccountCommandFactory(IWebAccountCommandFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountCommandFactory] { + #[cfg(feature="windows.security")] fn CreateWebAccountCommand(&mut self, webAccount: *mut super::super::security::credentials::WebAccount, invoked: *mut WebAccountCommandInvokedHandler, actions: SupportedWebAccountActions, out: *mut *mut WebAccountCommand) -> HRESULT + }} + impl IWebAccountCommandFactory { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn create_web_account_command(&mut self, webAccount: &super::super::security::credentials::WebAccount, invoked: &WebAccountCommandInvokedHandler, actions: SupportedWebAccountActions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWebAccountCommand)(self, webAccount as *const _ as *mut _, invoked as *const _ as *mut _, actions, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebAccountCommand, 3399717784, 40186, 16966, 176, 196, 169, 19, 163, 137, 101, 65); + RT_INTERFACE!{interface IWebAccountCommand(IWebAccountCommandVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountCommand] { + #[cfg(not(feature="windows.security"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_WebAccount(&mut self, out: *mut *mut super::super::security::credentials::WebAccount) -> HRESULT, + fn get_Invoked(&mut self, out: *mut *mut WebAccountCommandInvokedHandler) -> HRESULT, + fn get_Actions(&mut self, out: *mut SupportedWebAccountActions) -> HRESULT + }} + impl IWebAccountCommand { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_web_account(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebAccount)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_invoked(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Invoked)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_actions(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Actions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_CredentialCommandCredentialDeletedHandler, 1640030597, 2423, 18040, 180, 226, 152, 114, 122, 251, 238, 217); + RT_DELEGATE!{delegate CredentialCommandCredentialDeletedHandler(CredentialCommandCredentialDeletedHandlerVtbl, CredentialCommandCredentialDeletedHandlerImpl) [IID_CredentialCommandCredentialDeletedHandler] { + fn Invoke(&mut self, command: *mut CredentialCommand) -> HRESULT + }} + impl CredentialCommandCredentialDeletedHandler { + #[inline] pub unsafe fn invoke(&mut self, command: &CredentialCommand) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, command as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CredentialCommand: ICredentialCommand [ICredentialCommandFactory] [CLSID_CredentialCommand]} + DEFINE_CLSID!(CLSID_CredentialCommand = &[87,105,110,100,111,119,115,46,85,73,46,65,112,112,108,105,99,97,116,105,111,110,83,101,116,116,105,110,103,115,46,67,114,101,100,101,110,116,105,97,108,67,111,109,109,97,110,100,0]); + DEFINE_IID!(IID_ICredentialCommandFactory, 669551639, 48190, 19328, 148, 149, 78, 215, 32, 228, 138, 145); + RT_INTERFACE!{static interface ICredentialCommandFactory(ICredentialCommandFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICredentialCommandFactory] { + #[cfg(feature="windows.security")] fn CreateCredentialCommand(&mut self, passwordCredential: *mut super::super::security::credentials::PasswordCredential, out: *mut *mut CredentialCommand) -> HRESULT, + #[cfg(feature="windows.security")] fn CreateCredentialCommandWithHandler(&mut self, passwordCredential: *mut super::super::security::credentials::PasswordCredential, deleted: *mut CredentialCommandCredentialDeletedHandler, out: *mut *mut CredentialCommand) -> HRESULT + }} + impl ICredentialCommandFactory { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn create_credential_command(&mut self, passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCredentialCommand)(self, passwordCredential as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.security")] #[inline] pub unsafe fn create_credential_command_with_handler(&mut self, passwordCredential: &super::super::security::credentials::PasswordCredential, deleted: &CredentialCommandCredentialDeletedHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCredentialCommandWithHandler)(self, passwordCredential as *const _ as *mut _, deleted as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICredentialCommand, 2784388582, 24899, 19066, 169, 113, 176, 23, 186, 151, 140, 226); + RT_INTERFACE!{interface ICredentialCommand(ICredentialCommandVtbl): IInspectable(IInspectableVtbl) [IID_ICredentialCommand] { + #[cfg(not(feature="windows.security"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.security")] fn get_PasswordCredential(&mut self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, + fn get_CredentialDeleted(&mut self, out: *mut *mut CredentialCommandCredentialDeletedHandler) -> HRESULT + }} + impl ICredentialCommand { + #[cfg(feature="windows.security")] #[inline] pub unsafe fn get_password_credential(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PasswordCredential)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_credential_deleted(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CredentialDeleted)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAccountsSettingsPaneEventDeferral, 3421658431, 58810, 16623, 147, 218, 101, 224, 150, 229, 251, 4); + RT_INTERFACE!{interface IAccountsSettingsPaneEventDeferral(IAccountsSettingsPaneEventDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IAccountsSettingsPaneEventDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IAccountsSettingsPaneEventDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AccountsSettingsPaneEventDeferral: IAccountsSettingsPaneEventDeferral} + DEFINE_IID!(IID_IAccountsSettingsPaneCommandsRequestedEventArgs, 996720793, 56089, 17872, 154, 191, 149, 211, 119, 60, 147, 48); + RT_INTERFACE!{interface IAccountsSettingsPaneCommandsRequestedEventArgs(IAccountsSettingsPaneCommandsRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAccountsSettingsPaneCommandsRequestedEventArgs] { + fn get_WebAccountProviderCommands(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_WebAccountCommands(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_CredentialCommands(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Commands(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_HeaderText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_HeaderText(&mut self, value: HSTRING) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut AccountsSettingsPaneEventDeferral) -> HRESULT + }} + impl IAccountsSettingsPaneCommandsRequestedEventArgs { + #[inline] pub unsafe fn get_web_account_provider_commands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebAccountProviderCommands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_web_account_commands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WebAccountCommands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_credential_commands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CredentialCommands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_commands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Commands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AccountsSettingsPaneCommandsRequestedEventArgs: IAccountsSettingsPaneCommandsRequestedEventArgs} + DEFINE_IID!(IID_IAccountsSettingsPaneStatics, 1444907872, 45292, 16720, 168, 220, 32, 142, 228, 75, 6, 138); + RT_INTERFACE!{static interface IAccountsSettingsPaneStatics(IAccountsSettingsPaneStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAccountsSettingsPaneStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut AccountsSettingsPane) -> HRESULT, + fn Show(&mut self) -> HRESULT + }} + impl IAccountsSettingsPaneStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Show)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AccountsSettingsPane: IAccountsSettingsPane} + RT_ACTIVATABLE!{IAccountsSettingsPaneStatics [CLSID_AccountsSettingsPane]} + RT_ACTIVATABLE!{IAccountsSettingsPaneStatics2 [CLSID_AccountsSettingsPane]} + DEFINE_CLSID!(CLSID_AccountsSettingsPane = &[87,105,110,100,111,119,115,46,85,73,46,65,112,112,108,105,99,97,116,105,111,110,83,101,116,116,105,110,103,115,46,65,99,99,111,117,110,116,115,83,101,116,116,105,110,103,115,80,97,110,101,0]); + DEFINE_IID!(IID_IAccountsSettingsPaneStatics2, 3525179330, 52749, 18511, 184, 232, 232, 35, 194, 21, 118, 94); + RT_INTERFACE!{static interface IAccountsSettingsPaneStatics2(IAccountsSettingsPaneStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAccountsSettingsPaneStatics2] { + fn ShowManageAccountsAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowAddAccountAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IAccountsSettingsPaneStatics2 { + #[inline] pub unsafe fn show_manage_accounts_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowManageAccountsAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_add_account_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAddAccountAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAccountsSettingsPane, 2179634220, 20233, 17414, 165, 56, 131, 141, 155, 20, 183, 230); + RT_INTERFACE!{interface IAccountsSettingsPane(IAccountsSettingsPaneVtbl): IInspectable(IInspectableVtbl) [IID_IAccountsSettingsPane] { + fn add_AccountCommandsRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccountCommandsRequested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAccountsSettingsPane { + #[inline] pub unsafe fn add_account_commands_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AccountCommandsRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_account_commands_requested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AccountCommandsRequested)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_STRUCT! { struct ApplicationsSettingsContract { + + }} + DEFINE_IID!(IID_ISettingsPaneCommandsRequest, 1155474350, 23918, 16488, 161, 104, 244, 118, 67, 24, 33, 20); + RT_INTERFACE!{interface ISettingsPaneCommandsRequest(ISettingsPaneCommandsRequestVtbl): IInspectable(IInspectableVtbl) [IID_ISettingsPaneCommandsRequest] { + fn get_ApplicationCommands(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl ISettingsPaneCommandsRequest { + #[inline] pub unsafe fn get_application_commands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ApplicationCommands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SettingsPaneCommandsRequest: ISettingsPaneCommandsRequest} + DEFINE_IID!(IID_ISettingsPaneCommandsRequestedEventArgs, 543120676, 6984, 17961, 166, 202, 47, 223, 237, 175, 183, 93); + RT_INTERFACE!{interface ISettingsPaneCommandsRequestedEventArgs(ISettingsPaneCommandsRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISettingsPaneCommandsRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut SettingsPaneCommandsRequest) -> HRESULT + }} + impl ISettingsPaneCommandsRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SettingsPaneCommandsRequestedEventArgs: ISettingsPaneCommandsRequestedEventArgs} + RT_ENUM! { enum SettingsEdgeLocation: i32 { + Right (SettingsEdgeLocation_Right) = 0, Left (SettingsEdgeLocation_Left) = 1, + }} + DEFINE_IID!(IID_ISettingsPaneStatics, 476730053, 65305, 18203, 186, 107, 248, 243, 86, 148, 173, 154); + RT_INTERFACE!{static interface ISettingsPaneStatics(ISettingsPaneStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISettingsPaneStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut SettingsPane) -> HRESULT, + fn Show(&mut self) -> HRESULT, + fn get_Edge(&mut self, out: *mut SettingsEdgeLocation) -> HRESULT + }} + impl ISettingsPaneStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Show)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_edge(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Edge)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SettingsPane: ISettingsPane} + RT_ACTIVATABLE!{ISettingsPaneStatics [CLSID_SettingsPane]} + DEFINE_CLSID!(CLSID_SettingsPane = &[87,105,110,100,111,119,115,46,85,73,46,65,112,112,108,105,99,97,116,105,111,110,83,101,116,116,105,110,103,115,46,83,101,116,116,105,110,103,115,80,97,110,101,0]); + DEFINE_IID!(IID_ISettingsPane, 2983004466, 17776, 19561, 141, 56, 137, 68, 101, 97, 172, 224); + RT_INTERFACE!{interface ISettingsPane(ISettingsPaneVtbl): IInspectable(IInspectableVtbl) [IID_ISettingsPane] { + fn add_CommandsRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CommandsRequested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISettingsPane { + #[inline] pub unsafe fn add_commands_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CommandsRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_commands_requested(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CommandsRequested)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.UI.ApplicationSettings +pub mod viewmanagement { // Windows.UI.ViewManagement +use ::prelude::*; + RT_ENUM! { enum ApplicationViewState: i32 { + FullScreenLandscape (ApplicationViewState_FullScreenLandscape) = 0, Filled (ApplicationViewState_Filled) = 1, Snapped (ApplicationViewState_Snapped) = 2, FullScreenPortrait (ApplicationViewState_FullScreenPortrait) = 3, + }} + RT_ENUM! { enum ApplicationViewOrientation: i32 { + Landscape (ApplicationViewOrientation_Landscape) = 0, Portrait (ApplicationViewOrientation_Portrait) = 1, + }} + RT_ENUM! { enum ApplicationViewSwitchingOptions: u32 { + Default (ApplicationViewSwitchingOptions_Default) = 0, SkipAnimation (ApplicationViewSwitchingOptions_SkipAnimation) = 1, ConsolidateViews (ApplicationViewSwitchingOptions_ConsolidateViews) = 2, + }} + RT_ENUM! { enum ViewSizePreference: i32 { + Default (ViewSizePreference_Default) = 0, UseLess (ViewSizePreference_UseLess) = 1, UseHalf (ViewSizePreference_UseHalf) = 2, UseMore (ViewSizePreference_UseMore) = 3, UseMinimum (ViewSizePreference_UseMinimum) = 4, UseNone (ViewSizePreference_UseNone) = 5, + }} + RT_ENUM! { enum ApplicationViewBoundsMode: i32 { + UseVisible (ApplicationViewBoundsMode_UseVisible) = 0, UseCoreWindow (ApplicationViewBoundsMode_UseCoreWindow) = 1, + }} + RT_ENUM! { enum FullScreenSystemOverlayMode: i32 { + Standard (FullScreenSystemOverlayMode_Standard) = 0, Minimal (FullScreenSystemOverlayMode_Minimal) = 1, + }} + RT_ENUM! { enum ApplicationViewWindowingMode: i32 { + Auto (ApplicationViewWindowingMode_Auto) = 0, PreferredLaunchViewSize (ApplicationViewWindowingMode_PreferredLaunchViewSize) = 1, FullScreen (ApplicationViewWindowingMode_FullScreen) = 2, + }} + DEFINE_IID!(IID_IApplicationViewSwitcherStatics, 2539597598, 58966, 19550, 160, 161, 113, 124, 111, 250, 125, 100); + RT_INTERFACE!{static interface IApplicationViewSwitcherStatics(IApplicationViewSwitcherStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewSwitcherStatics] { + fn DisableShowingMainViewOnActivation(&mut self) -> HRESULT, + fn TryShowAsStandaloneAsync(&mut self, viewId: i32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryShowAsStandaloneWithSizePreferenceAsync(&mut self, viewId: i32, sizePreference: ViewSizePreference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryShowAsStandaloneWithAnchorViewAndSizePreferenceAsync(&mut self, viewId: i32, sizePreference: ViewSizePreference, anchorViewId: i32, anchorSizePreference: ViewSizePreference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SwitchAsync(&mut self, viewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SwitchFromViewAsync(&mut self, toViewId: i32, fromViewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SwitchFromViewWithOptionsAsync(&mut self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn PrepareForCustomAnimatedSwitchAsync(&mut self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IApplicationViewSwitcherStatics { + #[inline] pub unsafe fn disable_showing_main_view_on_activation(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DisableShowingMainViewOnActivation)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_show_as_standalone_async(&mut self, viewId: i32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryShowAsStandaloneAsync)(self, viewId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_show_as_standalone_with_size_preference_async(&mut self, viewId: i32, sizePreference: ViewSizePreference) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryShowAsStandaloneWithSizePreferenceAsync)(self, viewId, sizePreference, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_show_as_standalone_with_anchor_view_and_size_preference_async(&mut self, viewId: i32, sizePreference: ViewSizePreference, anchorViewId: i32, anchorSizePreference: ViewSizePreference) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryShowAsStandaloneWithAnchorViewAndSizePreferenceAsync)(self, viewId, sizePreference, anchorViewId, anchorSizePreference, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn switch_async(&mut self, viewId: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SwitchAsync)(self, viewId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn switch_from_view_async(&mut self, toViewId: i32, fromViewId: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SwitchFromViewAsync)(self, toViewId, fromViewId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn switch_from_view_with_options_async(&mut self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SwitchFromViewWithOptionsAsync)(self, toViewId, fromViewId, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn prepare_for_custom_animated_switch_async(&mut self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).PrepareForCustomAnimatedSwitchAsync)(self, toViewId, fromViewId, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationViewSwitcherStatics2, 1625920973, 20418, 18628, 184, 227, 57, 95, 43, 159, 15, 193); + RT_INTERFACE!{static interface IApplicationViewSwitcherStatics2(IApplicationViewSwitcherStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewSwitcherStatics2] { + fn DisableSystemViewActivationPolicy(&mut self) -> HRESULT + }} + impl IApplicationViewSwitcherStatics2 { + #[inline] pub unsafe fn disable_system_view_activation_policy(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).DisableSystemViewActivationPolicy)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationViewInteropStatics, 3292986205, 18323, 18582, 168, 226, 190, 87, 168, 187, 15, 80); + RT_INTERFACE!{static interface IApplicationViewInteropStatics(IApplicationViewInteropStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewInteropStatics] { + fn GetApplicationViewIdForWindow(&mut self, window: *mut super::core::ICoreWindow, out: *mut i32) -> HRESULT + }} + impl IApplicationViewInteropStatics { + #[inline] pub unsafe fn get_application_view_id_for_window(&mut self, window: &super::core::ICoreWindow) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetApplicationViewIdForWindow)(self, window as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationViewStatics, 17457926, 50227, 17637, 169, 242, 189, 132, 212, 3, 10, 149); + RT_INTERFACE!{static interface IApplicationViewStatics(IApplicationViewStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewStatics] { + fn get_Value(&mut self, out: *mut ApplicationViewState) -> HRESULT, + fn TryUnsnap(&mut self, out: *mut bool) -> HRESULT + }} + impl IApplicationViewStatics { + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_unsnap(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryUnsnap)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationViewStatics2, 2939390693, 53092, 16956, 133, 229, 243, 231, 36, 72, 251, 35); + RT_INTERFACE!{static interface IApplicationViewStatics2(IApplicationViewStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewStatics2] { + fn GetForCurrentView(&mut self, out: *mut *mut ApplicationView) -> HRESULT, + fn get_TerminateAppOnFinalViewClose(&mut self, out: *mut bool) -> HRESULT, + fn put_TerminateAppOnFinalViewClose(&mut self, value: bool) -> HRESULT + }} + impl IApplicationViewStatics2 { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_terminate_app_on_final_view_close(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TerminateAppOnFinalViewClose)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_terminate_app_on_final_view_close(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_TerminateAppOnFinalViewClose)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ApplicationView: IApplicationView} + RT_ACTIVATABLE!{IApplicationViewInteropStatics [CLSID_ApplicationView]} + RT_ACTIVATABLE!{IApplicationViewStatics3 [CLSID_ApplicationView]} + RT_ACTIVATABLE!{IApplicationViewStatics [CLSID_ApplicationView]} + RT_ACTIVATABLE!{IApplicationViewStatics2 [CLSID_ApplicationView]} + RT_ACTIVATABLE!{IApplicationViewFullscreenStatics [CLSID_ApplicationView]} + DEFINE_CLSID!(CLSID_ApplicationView = &[87,105,110,100,111,119,115,46,85,73,46,86,105,101,119,77,97,110,97,103,101,109,101,110,116,46,65,112,112,108,105,99,97,116,105,111,110,86,105,101,119,0]); + DEFINE_IID!(IID_IApplicationViewStatics3, 2727179668, 35905, 19987, 151, 25, 81, 100, 121, 111, 228, 199); + RT_INTERFACE!{static interface IApplicationViewStatics3(IApplicationViewStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewStatics3] { + fn get_PreferredLaunchWindowingMode(&mut self, out: *mut ApplicationViewWindowingMode) -> HRESULT, + fn put_PreferredLaunchWindowingMode(&mut self, value: ApplicationViewWindowingMode) -> HRESULT, + fn get_PreferredLaunchViewSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn put_PreferredLaunchViewSize(&mut self, value: super::super::foundation::Size) -> HRESULT + }} + impl IApplicationViewStatics3 { + #[inline] pub unsafe fn get_preferred_launch_windowing_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreferredLaunchWindowingMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_preferred_launch_windowing_mode(&mut self, value: ApplicationViewWindowingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreferredLaunchWindowingMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_preferred_launch_view_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreferredLaunchViewSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_preferred_launch_view_size(&mut self, value: super::super::foundation::Size) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreferredLaunchViewSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationView, 3525498137, 17249, 17694, 150, 196, 96, 244, 249, 116, 45, 176); + RT_INTERFACE!{interface IApplicationView(IApplicationViewVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationView] { + fn get_Orientation(&mut self, out: *mut ApplicationViewOrientation) -> HRESULT, + fn get_AdjacentToLeftDisplayEdge(&mut self, out: *mut bool) -> HRESULT, + fn get_AdjacentToRightDisplayEdge(&mut self, out: *mut bool) -> HRESULT, + fn get_IsFullScreen(&mut self, out: *mut bool) -> HRESULT, + fn get_IsOnLockScreen(&mut self, out: *mut bool) -> HRESULT, + fn get_IsScreenCaptureEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsScreenCaptureEnabled(&mut self, value: bool) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Id(&mut self, out: *mut i32) -> HRESULT, + fn add_Consolidated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Consolidated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IApplicationView { + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_adjacent_to_left_display_edge(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AdjacentToLeftDisplayEdge)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_adjacent_to_right_display_edge(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AdjacentToRightDisplayEdge)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_full_screen(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFullScreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_on_lock_screen(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsOnLockScreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_screen_capture_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsScreenCaptureEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_screen_capture_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsScreenCaptureEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_consolidated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Consolidated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_consolidated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Consolidated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ApplicationViewConsolidatedEventArgs: IApplicationViewConsolidatedEventArgs} + DEFINE_IID!(IID_IApplicationView2, 3900092822, 42309, 16604, 181, 148, 69, 12, 186, 104, 204, 0); + RT_INTERFACE!{interface IApplicationView2(IApplicationView2Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationView2] { + fn get_SuppressSystemOverlays(&mut self, out: *mut bool) -> HRESULT, + fn put_SuppressSystemOverlays(&mut self, value: bool) -> HRESULT, + fn get_VisibleBounds(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn add_VisibleBoundsChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisibleBoundsChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn SetDesiredBoundsMode(&mut self, boundsMode: ApplicationViewBoundsMode, out: *mut bool) -> HRESULT, + fn get_DesiredBoundsMode(&mut self, out: *mut ApplicationViewBoundsMode) -> HRESULT + }} + impl IApplicationView2 { + #[inline] pub unsafe fn get_suppress_system_overlays(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SuppressSystemOverlays)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_suppress_system_overlays(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuppressSystemOverlays)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_visible_bounds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VisibleBounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_visible_bounds_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VisibleBoundsChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_visible_bounds_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VisibleBoundsChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_bounds_mode(&mut self, boundsMode: ApplicationViewBoundsMode) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).SetDesiredBoundsMode)(self, boundsMode, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_bounds_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredBoundsMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationViewTitleBar, 9587392, 37675, 19051, 156, 75, 220, 56, 200, 36, 120, 206); + RT_INTERFACE!{interface IApplicationViewTitleBar(IApplicationViewTitleBarVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewTitleBar] { + fn put_ForegroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ForegroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_BackgroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_BackgroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ButtonForegroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ButtonForegroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ButtonBackgroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ButtonBackgroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ButtonHoverForegroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ButtonHoverForegroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ButtonHoverBackgroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ButtonHoverBackgroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ButtonPressedForegroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ButtonPressedForegroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ButtonPressedBackgroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ButtonPressedBackgroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_InactiveForegroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_InactiveForegroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_InactiveBackgroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_InactiveBackgroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ButtonInactiveForegroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ButtonInactiveForegroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ButtonInactiveBackgroundColor(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ButtonInactiveBackgroundColor(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IApplicationViewTitleBar { + #[inline] pub unsafe fn set_foreground_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ForegroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ForegroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_background_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_BackgroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BackgroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_button_foreground_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ButtonForegroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_button_foreground_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ButtonForegroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_button_background_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ButtonBackgroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_button_background_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ButtonBackgroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_button_hover_foreground_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ButtonHoverForegroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_button_hover_foreground_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ButtonHoverForegroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_button_hover_background_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ButtonHoverBackgroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_button_hover_background_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ButtonHoverBackgroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_button_pressed_foreground_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ButtonPressedForegroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_button_pressed_foreground_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ButtonPressedForegroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_button_pressed_background_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ButtonPressedBackgroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_button_pressed_background_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ButtonPressedBackgroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_inactive_foreground_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_InactiveForegroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inactive_foreground_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InactiveForegroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_inactive_background_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_InactiveBackgroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inactive_background_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InactiveBackgroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_button_inactive_foreground_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ButtonInactiveForegroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_button_inactive_foreground_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ButtonInactiveForegroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_button_inactive_background_color(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ButtonInactiveBackgroundColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_button_inactive_background_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ButtonInactiveBackgroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ApplicationViewTitleBar: IApplicationViewTitleBar} + DEFINE_IID!(IID_IApplicationView3, 2419891429, 31034, 20447, 162, 178, 175, 26, 194, 30, 49, 8); + RT_INTERFACE!{interface IApplicationView3(IApplicationView3Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationView3] { + fn get_TitleBar(&mut self, out: *mut *mut ApplicationViewTitleBar) -> HRESULT, + fn get_FullScreenSystemOverlayMode(&mut self, out: *mut FullScreenSystemOverlayMode) -> HRESULT, + fn put_FullScreenSystemOverlayMode(&mut self, value: FullScreenSystemOverlayMode) -> HRESULT, + fn get_IsFullScreenMode(&mut self, out: *mut bool) -> HRESULT, + fn TryEnterFullScreenMode(&mut self, out: *mut bool) -> HRESULT, + fn ExitFullScreenMode(&mut self) -> HRESULT, + fn ShowStandardSystemOverlays(&mut self) -> HRESULT, + fn TryResizeView(&mut self, value: super::super::foundation::Size, out: *mut bool) -> HRESULT, + fn SetPreferredMinSize(&mut self, minSize: super::super::foundation::Size) -> HRESULT + }} + impl IApplicationView3 { + #[inline] pub unsafe fn get_title_bar(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TitleBar)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_full_screen_system_overlay_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FullScreenSystemOverlayMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_full_screen_system_overlay_mode(&mut self, value: FullScreenSystemOverlayMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_FullScreenSystemOverlayMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_full_screen_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFullScreenMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_enter_full_screen_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryEnterFullScreenMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn exit_full_screen_mode(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ExitFullScreenMode)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show_standard_system_overlays(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ShowStandardSystemOverlays)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_resize_view(&mut self, value: super::super::foundation::Size) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryResizeView)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_preferred_min_size(&mut self, minSize: super::super::foundation::Size) -> Result<()> { + let hr = ((*self.lpVtbl).SetPreferredMinSize)(self, minSize); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationViewFullscreenStatics, 3162058429, 25854, 19301, 160, 192, 144, 28, 226, 182, 134, 54); + RT_INTERFACE!{static interface IApplicationViewFullscreenStatics(IApplicationViewFullscreenStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewFullscreenStatics] { + fn TryUnsnapToFullscreen(&mut self, out: *mut bool) -> HRESULT + }} + impl IApplicationViewFullscreenStatics { + #[inline] pub unsafe fn try_unsnap_to_fullscreen(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryUnsnapToFullscreen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IApplicationViewSwitcherStatics [CLSID_ApplicationViewSwitcher]} + RT_ACTIVATABLE!{IApplicationViewSwitcherStatics2 [CLSID_ApplicationViewSwitcher]} + DEFINE_CLSID!(CLSID_ApplicationViewSwitcher = &[87,105,110,100,111,119,115,46,85,73,46,86,105,101,119,77,97,110,97,103,101,109,101,110,116,46,65,112,112,108,105,99,97,116,105,111,110,86,105,101,119,83,119,105,116,99,104,101,114,0]); + DEFINE_IID!(IID_IApplicationViewConsolidatedEventArgs, 1363429868, 32418, 19943, 166, 166, 125, 251, 170, 235, 182, 251); + RT_INTERFACE!{interface IApplicationViewConsolidatedEventArgs(IApplicationViewConsolidatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewConsolidatedEventArgs] { + fn get_IsUserInitiated(&mut self, out: *mut bool) -> HRESULT + }} + impl IApplicationViewConsolidatedEventArgs { + #[inline] pub unsafe fn get_is_user_initiated(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsUserInitiated)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IActivationViewSwitcher, 3701939126, 29520, 18731, 170, 199, 200, 161, 61, 114, 36, 173); + RT_INTERFACE!{interface IActivationViewSwitcher(IActivationViewSwitcherVtbl): IInspectable(IInspectableVtbl) [IID_IActivationViewSwitcher] { + fn ShowAsStandaloneAsync(&mut self, viewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowAsStandaloneWithSizePreferenceAsync(&mut self, viewId: i32, sizePreference: ViewSizePreference, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn IsViewPresentedOnActivationVirtualDesktop(&mut self, viewId: i32, out: *mut bool) -> HRESULT + }} + impl IActivationViewSwitcher { + #[inline] pub unsafe fn show_as_standalone_async(&mut self, viewId: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAsStandaloneAsync)(self, viewId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_as_standalone_with_size_preference_async(&mut self, viewId: i32, sizePreference: ViewSizePreference) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAsStandaloneWithSizePreferenceAsync)(self, viewId, sizePreference, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_view_presented_on_activation_virtual_desktop(&mut self, viewId: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsViewPresentedOnActivationVirtualDesktop)(self, viewId, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class ActivationViewSwitcher: IActivationViewSwitcher} + DEFINE_IID!(IID_IApplicationViewTransferContext, 2239020131, 15383, 16526, 148, 8, 138, 26, 158, 168, 27, 250); + RT_INTERFACE!{interface IApplicationViewTransferContext(IApplicationViewTransferContextVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewTransferContext] { + fn get_ViewId(&mut self, out: *mut i32) -> HRESULT, + fn put_ViewId(&mut self, value: i32) -> HRESULT + }} + impl IApplicationViewTransferContext { + #[inline] pub unsafe fn get_view_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ViewId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_view_id(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ViewId)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationViewTransferContextStatics, 363371922, 56697, 19211, 188, 71, 213, 241, 149, 241, 70, 97); + RT_INTERFACE!{static interface IApplicationViewTransferContextStatics(IApplicationViewTransferContextStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewTransferContextStatics] { + fn get_DataPackageFormatId(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IApplicationViewTransferContextStatics { + #[inline] pub unsafe fn get_data_package_format_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataPackageFormatId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ApplicationViewTransferContext: IApplicationViewTransferContext} + RT_ACTIVATABLE!{IApplicationViewTransferContextStatics [CLSID_ApplicationViewTransferContext]} + DEFINE_CLSID!(CLSID_ApplicationViewTransferContext = &[87,105,110,100,111,119,115,46,85,73,46,86,105,101,119,77,97,110,97,103,101,109,101,110,116,46,65,112,112,108,105,99,97,116,105,111,110,86,105,101,119,84,114,97,110,115,102,101,114,67,111,110,116,101,120,116,0]); + DEFINE_IID!(IID_IInputPaneVisibilityEventArgs, 3527663638, 55559, 20428, 187, 141, 247, 123, 170, 80, 40, 241); + RT_INTERFACE!{interface IInputPaneVisibilityEventArgs(IInputPaneVisibilityEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInputPaneVisibilityEventArgs] { + fn get_OccludedRect(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn put_EnsuredFocusedElementInView(&mut self, value: bool) -> HRESULT, + fn get_EnsuredFocusedElementInView(&mut self, out: *mut bool) -> HRESULT + }} + impl IInputPaneVisibilityEventArgs { + #[inline] pub unsafe fn get_occluded_rect(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OccludedRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_ensured_focused_element_in_view(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_EnsuredFocusedElementInView)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ensured_focused_element_in_view(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EnsuredFocusedElementInView)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class InputPaneVisibilityEventArgs: IInputPaneVisibilityEventArgs} + DEFINE_IID!(IID_IInputPane, 1678432880, 1779, 19591, 166, 120, 152, 41, 201, 18, 124, 40); + RT_INTERFACE!{interface IInputPane(IInputPaneVtbl): IInspectable(IInspectableVtbl) [IID_IInputPane] { + fn add_Showing(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Showing(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Hiding(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Hiding(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_OccludedRect(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT + }} + impl IInputPane { + #[inline] pub unsafe fn add_showing(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Showing)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_showing(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Showing)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_hiding(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Hiding)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_hiding(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Hiding)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_occluded_rect(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OccludedRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class InputPane: IInputPane} + RT_ACTIVATABLE!{IInputPaneStatics [CLSID_InputPane]} + DEFINE_CLSID!(CLSID_InputPane = &[87,105,110,100,111,119,115,46,85,73,46,86,105,101,119,77,97,110,97,103,101,109,101,110,116,46,73,110,112,117,116,80,97,110,101,0]); + DEFINE_IID!(IID_IInputPane2, 2322284326, 28816, 18323, 148, 76, 195, 242, 205, 226, 98, 118); + RT_INTERFACE!{interface IInputPane2(IInputPane2Vtbl): IInspectable(IInspectableVtbl) [IID_IInputPane2] { + fn TryShow(&mut self, out: *mut bool) -> HRESULT, + fn TryHide(&mut self, out: *mut bool) -> HRESULT + }} + impl IInputPane2 { + #[inline] pub unsafe fn try_show(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryShow)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_hide(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryHide)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInputPaneControl, 143372879, 38447, 18589, 170, 110, 198, 190, 26, 10, 110, 82); + RT_INTERFACE!{interface IInputPaneControl(IInputPaneControlVtbl): IInspectable(IInspectableVtbl) [IID_IInputPaneControl] { + fn get_Visible(&mut self, out: *mut bool) -> HRESULT, + fn put_Visible(&mut self, value: bool) -> HRESULT + }} + impl IInputPaneControl { + #[inline] pub unsafe fn get_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Visible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Visible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInputPaneStatics, 2515840826, 61255, 16970, 151, 65, 253, 40, 21, 235, 162, 189); + RT_INTERFACE!{static interface IInputPaneStatics(IInputPaneStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IInputPaneStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut InputPane) -> HRESULT + }} + impl IInputPaneStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProjectionManagerStatics, 3059716413, 58096, 20477, 186, 149, 52, 36, 22, 71, 228, 92); + RT_INTERFACE!{static interface IProjectionManagerStatics(IProjectionManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IProjectionManagerStatics] { + fn StartProjectingAsync(&mut self, projectionViewId: i32, anchorViewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SwapDisplaysForViewsAsync(&mut self, projectionViewId: i32, anchorViewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StopProjectingAsync(&mut self, projectionViewId: i32, anchorViewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_ProjectionDisplayAvailable(&mut self, out: *mut bool) -> HRESULT, + fn add_ProjectionDisplayAvailableChanged(&mut self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProjectionDisplayAvailableChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IProjectionManagerStatics { + #[inline] pub unsafe fn start_projecting_async(&mut self, projectionViewId: i32, anchorViewId: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartProjectingAsync)(self, projectionViewId, anchorViewId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn swap_displays_for_views_async(&mut self, projectionViewId: i32, anchorViewId: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SwapDisplaysForViewsAsync)(self, projectionViewId, anchorViewId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn stop_projecting_async(&mut self, projectionViewId: i32, anchorViewId: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StopProjectingAsync)(self, projectionViewId, anchorViewId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_projection_display_available(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProjectionDisplayAvailable)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_projection_display_available_changed(&mut self, handler: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ProjectionDisplayAvailableChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_projection_display_available_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ProjectionDisplayAvailableChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProjectionManagerStatics2, 4080873283, 10057, 19678, 185, 119, 192, 196, 30, 116, 21, 209); + RT_INTERFACE!{static interface IProjectionManagerStatics2(IProjectionManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IProjectionManagerStatics2] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn StartProjectingWithDeviceInfoAsync(&mut self, projectionViewId: i32, anchorViewId: i32, displayDeviceInfo: *mut super::super::devices::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RequestStartProjectingAsync(&mut self, projectionViewId: i32, anchorViewId: i32, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestStartProjectingWithPlacementAsync(&mut self, projectionViewId: i32, anchorViewId: i32, selection: super::super::foundation::Rect, prefferedPlacement: super::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDeviceSelector(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IProjectionManagerStatics2 { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn start_projecting_with_device_info_async(&mut self, projectionViewId: i32, anchorViewId: i32, displayDeviceInfo: &super::super::devices::enumeration::DeviceInformation) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartProjectingWithDeviceInfoAsync)(self, projectionViewId, anchorViewId, displayDeviceInfo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_start_projecting_async(&mut self, projectionViewId: i32, anchorViewId: i32, selection: super::super::foundation::Rect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStartProjectingAsync)(self, projectionViewId, anchorViewId, selection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_start_projecting_with_placement_async(&mut self, projectionViewId: i32, anchorViewId: i32, selection: super::super::foundation::Rect, prefferedPlacement: super::popups::Placement) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestStartProjectingWithPlacementAsync)(self, projectionViewId, anchorViewId, selection, prefferedPlacement, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_device_selector(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeviceSelector)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IProjectionManagerStatics [CLSID_ProjectionManager]} + RT_ACTIVATABLE!{IProjectionManagerStatics2 [CLSID_ProjectionManager]} + DEFINE_CLSID!(CLSID_ProjectionManager = &[87,105,110,100,111,119,115,46,85,73,46,86,105,101,119,77,97,110,97,103,101,109,101,110,116,46,80,114,111,106,101,99,116,105,111,110,77,97,110,97,103,101,114,0]); + RT_ENUM! { enum UserInteractionMode: i32 { + Mouse (UserInteractionMode_Mouse) = 0, Touch (UserInteractionMode_Touch) = 1, + }} + DEFINE_IID!(IID_IUIViewSettings, 3325450230, 34896, 18189, 136, 248, 69, 94, 22, 234, 44, 38); + RT_INTERFACE!{interface IUIViewSettings(IUIViewSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IUIViewSettings] { + fn get_UserInteractionMode(&mut self, out: *mut UserInteractionMode) -> HRESULT + }} + impl IUIViewSettings { + #[inline] pub unsafe fn get_user_interaction_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UserInteractionMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUIViewSettingsStatics, 1499240357, 63734, 16847, 176, 251, 170, 205, 184, 31, 213, 246); + RT_INTERFACE!{static interface IUIViewSettingsStatics(IUIViewSettingsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUIViewSettingsStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut UIViewSettings) -> HRESULT + }} + impl IUIViewSettingsStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UIViewSettings: IUIViewSettings} + RT_ACTIVATABLE!{IUIViewSettingsStatics [CLSID_UIViewSettings]} + DEFINE_CLSID!(CLSID_UIViewSettings = &[87,105,110,100,111,119,115,46,85,73,46,86,105,101,119,77,97,110,97,103,101,109,101,110,116,46,85,73,86,105,101,119,83,101,116,116,105,110,103,115,0]); + RT_ENUM! { enum HandPreference: i32 { + LeftHanded (HandPreference_LeftHanded) = 0, RightHanded (HandPreference_RightHanded) = 1, + }} + RT_ENUM! { enum UIColorType: i32 { + Background (UIColorType_Background) = 0, Foreground (UIColorType_Foreground) = 1, AccentDark3 (UIColorType_AccentDark3) = 2, AccentDark2 (UIColorType_AccentDark2) = 3, AccentDark1 (UIColorType_AccentDark1) = 4, Accent (UIColorType_Accent) = 5, AccentLight1 (UIColorType_AccentLight1) = 6, AccentLight2 (UIColorType_AccentLight2) = 7, AccentLight3 (UIColorType_AccentLight3) = 8, Complement (UIColorType_Complement) = 9, + }} + RT_ENUM! { enum UIElementType: i32 { + ActiveCaption (UIElementType_ActiveCaption) = 0, Background (UIElementType_Background) = 1, ButtonFace (UIElementType_ButtonFace) = 2, ButtonText (UIElementType_ButtonText) = 3, CaptionText (UIElementType_CaptionText) = 4, GrayText (UIElementType_GrayText) = 5, Highlight (UIElementType_Highlight) = 6, HighlightText (UIElementType_HighlightText) = 7, Hotlight (UIElementType_Hotlight) = 8, InactiveCaption (UIElementType_InactiveCaption) = 9, InactiveCaptionText (UIElementType_InactiveCaptionText) = 10, Window (UIElementType_Window) = 11, WindowText (UIElementType_WindowText) = 12, + }} + DEFINE_IID!(IID_IAccessibilitySettings, 4262363463, 50368, 17762, 185, 98, 19, 39, 181, 42, 213, 185); + RT_INTERFACE!{interface IAccessibilitySettings(IAccessibilitySettingsVtbl): IInspectable(IInspectableVtbl) [IID_IAccessibilitySettings] { + fn get_HighContrast(&mut self, out: *mut bool) -> HRESULT, + fn get_HighContrastScheme(&mut self, out: *mut HSTRING) -> HRESULT, + fn add_HighContrastChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_HighContrastChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IAccessibilitySettings { + #[inline] pub unsafe fn get_high_contrast(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HighContrast)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_high_contrast_scheme(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HighContrastScheme)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_high_contrast_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_HighContrastChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_high_contrast_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_HighContrastChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class AccessibilitySettings: IAccessibilitySettings} + DEFINE_IID!(IID_IUISettings, 2234914304, 7267, 17959, 188, 177, 58, 137, 224, 188, 156, 85); + RT_INTERFACE!{interface IUISettings(IUISettingsVtbl): IInspectable(IInspectableVtbl) [IID_IUISettings] { + fn get_HandPreference(&mut self, out: *mut HandPreference) -> HRESULT, + fn get_CursorSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_ScrollBarSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_ScrollBarArrowSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_ScrollBarThumbBoxSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_MessageDuration(&mut self, out: *mut u32) -> HRESULT, + fn get_AnimationsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn get_CaretBrowsingEnabled(&mut self, out: *mut bool) -> HRESULT, + fn get_CaretBlinkRate(&mut self, out: *mut u32) -> HRESULT, + fn get_CaretWidth(&mut self, out: *mut u32) -> HRESULT, + fn get_DoubleClickTime(&mut self, out: *mut u32) -> HRESULT, + fn get_MouseHoverTime(&mut self, out: *mut u32) -> HRESULT, + fn UIElementColor(&mut self, desiredElement: UIElementType, out: *mut super::Color) -> HRESULT + }} + impl IUISettings { + #[inline] pub unsafe fn get_hand_preference(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HandPreference)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cursor_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CursorSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scroll_bar_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScrollBarSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scroll_bar_arrow_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScrollBarArrowSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scroll_bar_thumb_box_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScrollBarThumbBoxSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_message_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MessageDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_animations_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AnimationsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_caret_browsing_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CaretBrowsingEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_caret_blink_rate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CaretBlinkRate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_caret_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CaretWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_double_click_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DoubleClickTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_mouse_hover_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MouseHoverTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn uielement_color(&mut self, desiredElement: UIElementType) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).UIElementColor)(self, desiredElement, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUISettings2, 3134727169, 10017, 17657, 187, 145, 43, 178, 40, 190, 68, 47); + RT_INTERFACE!{interface IUISettings2(IUISettings2Vtbl): IInspectable(IInspectableVtbl) [IID_IUISettings2] { + fn get_TextScaleFactor(&mut self, out: *mut f64) -> HRESULT, + fn add_TextScaleFactorChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextScaleFactorChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IUISettings2 { + #[inline] pub unsafe fn get_text_scale_factor(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextScaleFactor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_text_scale_factor_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextScaleFactorChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_scale_factor_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextScaleFactorChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class UISettings: IUISettings} + DEFINE_IID!(IID_IUISettings3, 50469860, 21076, 18305, 129, 148, 81, 104, 247, 208, 109, 123); + RT_INTERFACE!{interface IUISettings3(IUISettings3Vtbl): IInspectable(IInspectableVtbl) [IID_IUISettings3] { + fn GetColorValue(&mut self, desiredColor: UIColorType, out: *mut super::Color) -> HRESULT, + fn add_ColorValuesChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ColorValuesChanged(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IUISettings3 { + #[inline] pub unsafe fn get_color_value(&mut self, desiredColor: UIColorType) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetColorValue)(self, desiredColor, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_color_values_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ColorValuesChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_color_values_changed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ColorValuesChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_STRUCT! { struct ViewManagementViewScalingContract { + + }} + RT_CLASS!{class ApplicationViewScaling: IApplicationViewScaling} + RT_ACTIVATABLE!{IApplicationViewScalingStatics [CLSID_ApplicationViewScaling]} + DEFINE_CLSID!(CLSID_ApplicationViewScaling = &[87,105,110,100,111,119,115,46,85,73,46,86,105,101,119,77,97,110,97,103,101,109,101,110,116,46,65,112,112,108,105,99,97,116,105,111,110,86,105,101,119,83,99,97,108,105,110,103,0]); + DEFINE_IID!(IID_IApplicationViewScaling, 487447587, 9203, 19245, 132, 254, 116, 191, 55, 180, 139, 102); + RT_INTERFACE!{interface IApplicationViewScaling(IApplicationViewScalingVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewScaling] { + + }} + DEFINE_IID!(IID_IApplicationViewScalingStatics, 2962222320, 47430, 17864, 165, 227, 113, 245, 170, 120, 248, 97); + RT_INTERFACE!{static interface IApplicationViewScalingStatics(IApplicationViewScalingStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewScalingStatics] { + fn get_DisableLayoutScaling(&mut self, out: *mut bool) -> HRESULT, + fn TrySetDisableLayoutScaling(&mut self, disableLayoutScaling: bool, out: *mut bool) -> HRESULT + }} + impl IApplicationViewScalingStatics { + #[inline] pub unsafe fn get_disable_layout_scaling(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DisableLayoutScaling)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_disable_layout_scaling(&mut self, disableLayoutScaling: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySetDisableLayoutScaling)(self, disableLayoutScaling, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } +} // Windows.UI.ViewManagement +pub mod webui { // Windows.UI.WebUI +use ::prelude::*; + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIAppointmentsProviderAddAppointmentActivatedEventArgs: super::super::applicationmodel::activation::IAppointmentsProviderAddAppointmentActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIAppointmentsProviderAddAppointmentActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs: super::super::applicationmodel::activation::IAppointmentsProviderReplaceAppointmentActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIAppointmentsProviderReplaceAppointmentActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs: super::super::applicationmodel::activation::IAppointmentsProviderRemoveAppointmentActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIAppointmentsProviderRemoveAppointmentActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs: super::super::applicationmodel::activation::IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIAppointmentsProviderShowAppointmentDetailsActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs: super::super::applicationmodel::activation::IAppointmentsProviderShowTimeFrameActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIAppointmentsProviderShowTimeFrameActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIUserDataAccountProviderActivatedEventArgs: super::super::applicationmodel::activation::IUserDataAccountProviderActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIUserDataAccountProviderActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIDevicePairingActivatedEventArgs: super::super::applicationmodel::activation::IDevicePairingActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIDevicePairingActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIVoiceCommandActivatedEventArgs: super::super::applicationmodel::activation::IVoiceCommandActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIVoiceCommandActivatedEventArgs: IInspectable} + DEFINE_IID!(IID_IActivatedDeferral, 3283949944, 42033, 18904, 167, 106, 57, 90, 78, 3, 220, 243); + RT_INTERFACE!{interface IActivatedDeferral(IActivatedDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IActivatedDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IActivatedDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ActivatedDeferral: IActivatedDeferral} + DEFINE_IID!(IID_IActivatedOperation, 3063985340, 50890, 17149, 152, 24, 113, 144, 78, 69, 254, 215); + RT_INTERFACE!{interface IActivatedOperation(IActivatedOperationVtbl): IInspectable(IInspectableVtbl) [IID_IActivatedOperation] { + fn GetDeferral(&mut self, out: *mut *mut ActivatedDeferral) -> HRESULT + }} + impl IActivatedOperation { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ActivatedOperation: IActivatedOperation} + DEFINE_IID!(IID_IActivatedEventArgsDeferral, 3396165492, 25538, 17574, 185, 123, 217, 160, 60, 32, 188, 155); + RT_INTERFACE!{interface IActivatedEventArgsDeferral(IActivatedEventArgsDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IActivatedEventArgsDeferral] { + fn get_ActivatedOperation(&mut self, out: *mut *mut ActivatedOperation) -> HRESULT + }} + impl IActivatedEventArgsDeferral { + #[inline] pub unsafe fn get_activated_operation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActivatedOperation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUILaunchActivatedEventArgs: super::super::applicationmodel::activation::ILaunchActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUILaunchActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIShareTargetActivatedEventArgs: super::super::applicationmodel::activation::IShareTargetActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIShareTargetActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIFileActivatedEventArgs: super::super::applicationmodel::activation::IFileActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIFileActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIProtocolActivatedEventArgs: super::super::applicationmodel::activation::IProtocolActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIProtocolActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIProtocolForResultsActivatedEventArgs: super::super::applicationmodel::activation::IProtocolForResultsActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIProtocolForResultsActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIFileOpenPickerActivatedEventArgs: super::super::applicationmodel::activation::IFileOpenPickerActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIFileOpenPickerActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIFileSavePickerActivatedEventArgs: super::super::applicationmodel::activation::IFileSavePickerActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIFileSavePickerActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUICachedFileUpdaterActivatedEventArgs: super::super::applicationmodel::activation::ICachedFileUpdaterActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUICachedFileUpdaterActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIDeviceActivatedEventArgs: super::super::applicationmodel::activation::IDeviceActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIDeviceActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUILockScreenActivatedEventArgs: super::super::applicationmodel::activation::ILockScreenActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUILockScreenActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIRestrictedLaunchActivatedEventArgs: super::super::applicationmodel::activation::IRestrictedLaunchActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIRestrictedLaunchActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIFileOpenPickerContinuationEventArgs: super::super::applicationmodel::activation::IFileOpenPickerContinuationEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIFileOpenPickerContinuationEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIFileSavePickerContinuationEventArgs: super::super::applicationmodel::activation::IFileSavePickerContinuationEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIFileSavePickerContinuationEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIFolderPickerContinuationEventArgs: super::super::applicationmodel::activation::IFolderPickerContinuationEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIFolderPickerContinuationEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIWebAuthenticationBrokerContinuationEventArgs: super::super::applicationmodel::activation::IWebAuthenticationBrokerContinuationEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIWebAuthenticationBrokerContinuationEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIWebAccountProviderActivatedEventArgs: super::super::applicationmodel::activation::IWebAccountProviderActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIWebAccountProviderActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIDialReceiverActivatedEventArgs: super::super::applicationmodel::activation::IDialReceiverActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIDialReceiverActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIToastNotificationActivatedEventArgs: super::super::applicationmodel::activation::IToastNotificationActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIToastNotificationActivatedEventArgs: IInspectable} + DEFINE_IID!(IID_ActivatedEventHandler, 1358030640, 50641, 19307, 154, 219, 138, 17, 117, 107, 226, 156); + RT_DELEGATE!{delegate ActivatedEventHandler(ActivatedEventHandlerVtbl, ActivatedEventHandlerImpl) [IID_ActivatedEventHandler] { + #[cfg(feature="windows.applicationmodel")] fn Invoke(&mut self, sender: *mut IInspectable, eventArgs: *mut super::super::applicationmodel::activation::IActivatedEventArgs) -> HRESULT + }} + impl ActivatedEventHandler { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, eventArgs: &super::super::applicationmodel::activation::IActivatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, eventArgs as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ResumingEventHandler, 643406761, 41517, 18438, 167, 40, 172, 173, 193, 208, 117, 250); + RT_DELEGATE!{delegate ResumingEventHandler(ResumingEventHandlerVtbl, ResumingEventHandlerImpl) [IID_ResumingEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable) -> HRESULT + }} + impl ResumingEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_SuspendingEventHandler, 1352417948, 30946, 18563, 171, 200, 137, 96, 220, 222, 27, 92); + RT_DELEGATE!{delegate SuspendingEventHandler(SuspendingEventHandlerVtbl, SuspendingEventHandlerImpl) [IID_SuspendingEventHandler] { + #[cfg(feature="windows.applicationmodel")] fn Invoke(&mut self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::ISuspendingEventArgs) -> HRESULT + }} + impl SuspendingEventHandler { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &super::super::applicationmodel::ISuspendingEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_LeavingBackgroundEventHandler, 11848921, 31388, 19307, 154, 196, 19, 71, 79, 38, 139, 196); + RT_DELEGATE!{delegate LeavingBackgroundEventHandler(LeavingBackgroundEventHandlerVtbl, LeavingBackgroundEventHandlerImpl) [IID_LeavingBackgroundEventHandler] { + #[cfg(feature="windows.applicationmodel")] fn Invoke(&mut self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::ILeavingBackgroundEventArgs) -> HRESULT + }} + impl LeavingBackgroundEventHandler { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &super::super::applicationmodel::ILeavingBackgroundEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_EnteredBackgroundEventHandler, 722051443, 46734, 19951, 136, 193, 141, 232, 78, 90, 171, 47); + RT_DELEGATE!{delegate EnteredBackgroundEventHandler(EnteredBackgroundEventHandlerVtbl, EnteredBackgroundEventHandlerImpl) [IID_EnteredBackgroundEventHandler] { + #[cfg(feature="windows.applicationmodel")] fn Invoke(&mut self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::IEnteredBackgroundEventArgs) -> HRESULT + }} + impl EnteredBackgroundEventHandler { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &super::super::applicationmodel::IEnteredBackgroundEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_NavigatedEventHandler, 2062839782, 16586, 20041, 167, 214, 219, 219, 51, 12, 209, 163); + RT_DELEGATE!{delegate NavigatedEventHandler(NavigatedEventHandlerVtbl, NavigatedEventHandlerImpl) [IID_NavigatedEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut IWebUINavigatedEventArgs) -> HRESULT + }} + impl NavigatedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &IWebUINavigatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebUINavigatedEventArgs, 2807579064, 9369, 16432, 166, 157, 21, 210, 217, 207, 229, 36); + RT_INTERFACE!{interface IWebUINavigatedEventArgs(IWebUINavigatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWebUINavigatedEventArgs] { + fn get_NavigatedOperation(&mut self, out: *mut *mut WebUINavigatedOperation) -> HRESULT + }} + impl IWebUINavigatedEventArgs { + #[inline] pub unsafe fn get_navigated_operation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NavigatedOperation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebUINavigatedOperation: IWebUINavigatedOperation} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class SuspendingDeferral: super::super::applicationmodel::ISuspendingDeferral} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class SuspendingDeferral: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class SuspendingOperation: super::super::applicationmodel::ISuspendingOperation} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class SuspendingOperation: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class SuspendingEventArgs: super::super::applicationmodel::ISuspendingEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class SuspendingEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class LeavingBackgroundEventArgs: super::super::applicationmodel::ILeavingBackgroundEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class LeavingBackgroundEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class EnteredBackgroundEventArgs: super::super::applicationmodel::IEnteredBackgroundEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class EnteredBackgroundEventArgs: IInspectable} + DEFINE_IID!(IID_IWebUIBackgroundTaskInstance, 603008037, 58103, 18241, 188, 156, 57, 69, 149, 222, 36, 220); + RT_INTERFACE!{interface IWebUIBackgroundTaskInstance(IWebUIBackgroundTaskInstanceVtbl): IInspectable(IInspectableVtbl) [IID_IWebUIBackgroundTaskInstance] { + fn get_Succeeded(&mut self, out: *mut bool) -> HRESULT, + fn put_Succeeded(&mut self, succeeded: bool) -> HRESULT + }} + impl IWebUIBackgroundTaskInstance { + #[inline] pub unsafe fn get_succeeded(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Succeeded)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_succeeded(&mut self, succeeded: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Succeeded)(self, succeeded); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebUIBackgroundTaskInstanceStatics, 2625262225, 6574, 19619, 185, 75, 254, 78, 199, 68, 167, 64); + RT_INTERFACE!{static interface IWebUIBackgroundTaskInstanceStatics(IWebUIBackgroundTaskInstanceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWebUIBackgroundTaskInstanceStatics] { + fn get_Current(&mut self, out: *mut *mut IWebUIBackgroundTaskInstance) -> HRESULT + }} + impl IWebUIBackgroundTaskInstanceStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebUIBackgroundTaskInstanceRuntimeClass: IWebUIBackgroundTaskInstance} + RT_ACTIVATABLE!{IWebUIBackgroundTaskInstanceStatics [CLSID_WebUIBackgroundTaskInstance]} + DEFINE_CLSID!(CLSID_WebUIBackgroundTaskInstance = &[87,105,110,100,111,119,115,46,85,73,46,87,101,98,85,73,46,87,101,98,85,73,66,97,99,107,103,114,111,117,110,100,84,97,115,107,73,110,115,116,97,110,99,101,0]); + DEFINE_IID!(IID_IWebUINavigatedDeferral, 3624149069, 33567, 18146, 180, 50, 58, 252, 226, 17, 249, 98); + RT_INTERFACE!{interface IWebUINavigatedDeferral(IWebUINavigatedDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IWebUINavigatedDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IWebUINavigatedDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class WebUINavigatedDeferral: IWebUINavigatedDeferral} + DEFINE_IID!(IID_IWebUINavigatedOperation, 2056675080, 33154, 19081, 171, 103, 132, 146, 232, 117, 13, 75); + RT_INTERFACE!{interface IWebUINavigatedOperation(IWebUINavigatedOperationVtbl): IInspectable(IInspectableVtbl) [IID_IWebUINavigatedOperation] { + fn GetDeferral(&mut self, out: *mut *mut WebUINavigatedDeferral) -> HRESULT + }} + impl IWebUINavigatedOperation { + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WebUINavigatedEventArgs: IWebUINavigatedEventArgs} + DEFINE_IID!(IID_IWebUIActivationStatics, 890996413, 17331, 18475, 133, 219, 53, 216, 123, 81, 122, 217); + RT_INTERFACE!{static interface IWebUIActivationStatics(IWebUIActivationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWebUIActivationStatics] { + fn add_Activated(&mut self, handler: *mut ActivatedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Activated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Suspending(&mut self, handler: *mut SuspendingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Suspending(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Resuming(&mut self, handler: *mut ResumingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Resuming(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Navigated(&mut self, handler: *mut NavigatedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Navigated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IWebUIActivationStatics { + #[inline] pub unsafe fn add_activated(&mut self, handler: &ActivatedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Activated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_activated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Activated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_suspending(&mut self, handler: &SuspendingEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Suspending)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_suspending(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Suspending)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_resuming(&mut self, handler: &ResumingEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Resuming)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_resuming(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Resuming)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_navigated(&mut self, handler: &NavigatedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Navigated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_navigated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Navigated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWebUIActivationStatics2, 3370682006, 19832, 19108, 143, 6, 42, 158, 173, 198, 196, 10); + RT_INTERFACE!{static interface IWebUIActivationStatics2(IWebUIActivationStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IWebUIActivationStatics2] { + fn add_LeavingBackground(&mut self, handler: *mut LeavingBackgroundEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LeavingBackground(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnteredBackground(&mut self, handler: *mut EnteredBackgroundEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnteredBackground(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn EnablePrelaunch(&mut self, value: bool) -> HRESULT + }} + impl IWebUIActivationStatics2 { + #[inline] pub unsafe fn add_leaving_background(&mut self, handler: &LeavingBackgroundEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LeavingBackground)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_leaving_background(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LeavingBackground)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_entered_background(&mut self, handler: &EnteredBackgroundEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnteredBackground)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_entered_background(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnteredBackground)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn enable_prelaunch(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).EnablePrelaunch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ACTIVATABLE!{IWebUIActivationStatics2 [CLSID_WebUIApplication]} + RT_ACTIVATABLE!{IWebUIActivationStatics [CLSID_WebUIApplication]} + DEFINE_CLSID!(CLSID_WebUIApplication = &[87,105,110,100,111,119,115,46,85,73,46,87,101,98,85,73,46,87,101,98,85,73,65,112,112,108,105,99,97,116,105,111,110,0]); + RT_ENUM! { enum PrintContent: i32 { + AllPages (PrintContent_AllPages) = 0, CurrentPage (PrintContent_CurrentPage) = 1, CustomPageRange (PrintContent_CustomPageRange) = 2, CurrentSelection (PrintContent_CurrentSelection) = 3, + }} + DEFINE_IID!(IID_IHtmlPrintDocumentSource, 3467003546, 3589, 18042, 171, 201, 54, 236, 29, 76, 220, 182); + RT_INTERFACE!{interface IHtmlPrintDocumentSource(IHtmlPrintDocumentSourceVtbl): IInspectable(IInspectableVtbl) [IID_IHtmlPrintDocumentSource] { + fn get_Content(&mut self, out: *mut PrintContent) -> HRESULT, + fn put_Content(&mut self, value: PrintContent) -> HRESULT, + fn get_LeftMargin(&mut self, out: *mut f32) -> HRESULT, + fn put_LeftMargin(&mut self, value: f32) -> HRESULT, + fn get_TopMargin(&mut self, out: *mut f32) -> HRESULT, + fn put_TopMargin(&mut self, value: f32) -> HRESULT, + fn get_RightMargin(&mut self, out: *mut f32) -> HRESULT, + fn put_RightMargin(&mut self, value: f32) -> HRESULT, + fn get_BottomMargin(&mut self, out: *mut f32) -> HRESULT, + fn put_BottomMargin(&mut self, value: f32) -> HRESULT, + fn get_EnableHeaderFooter(&mut self, out: *mut bool) -> HRESULT, + fn put_EnableHeaderFooter(&mut self, value: bool) -> HRESULT, + fn get_ShrinkToFit(&mut self, out: *mut bool) -> HRESULT, + fn put_ShrinkToFit(&mut self, value: bool) -> HRESULT, + fn get_PercentScale(&mut self, out: *mut f32) -> HRESULT, + fn put_PercentScale(&mut self, scalePercent: f32) -> HRESULT, + fn get_PageRange(&mut self, out: *mut HSTRING) -> HRESULT, + fn TrySetPageRange(&mut self, strPageRange: HSTRING, out: *mut bool) -> HRESULT + }} + impl IHtmlPrintDocumentSource { + #[inline] pub unsafe fn get_content(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_content(&mut self, value: PrintContent) -> Result<()> { + let hr = ((*self.lpVtbl).put_Content)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_left_margin(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LeftMargin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_left_margin(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_LeftMargin)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_top_margin(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TopMargin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_top_margin(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TopMargin)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_right_margin(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RightMargin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_right_margin(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RightMargin)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bottom_margin(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BottomMargin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bottom_margin(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_BottomMargin)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_enable_header_footer(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EnableHeaderFooter)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_enable_header_footer(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_EnableHeaderFooter)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_shrink_to_fit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShrinkToFit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_shrink_to_fit(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShrinkToFit)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_percent_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PercentScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_percent_scale(&mut self, scalePercent: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_PercentScale)(self, scalePercent); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_page_range(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PageRange)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_page_range(&mut self, strPageRange: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySetPageRange)(self, strPageRange.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class HtmlPrintDocumentSource: IHtmlPrintDocumentSource} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIPrintTaskSettingsActivatedEventArgs: super::super::applicationmodel::activation::IPrintTaskSettingsActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIPrintTaskSettingsActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIPrint3DWorkflowActivatedEventArgs: super::super::applicationmodel::activation::IPrint3DWorkflowActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIPrint3DWorkflowActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUILockScreenCallActivatedEventArgs: super::super::applicationmodel::activation::ILockScreenCallActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUILockScreenCallActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUICameraSettingsActivatedEventArgs: super::super::applicationmodel::activation::ICameraSettingsActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUICameraSettingsActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIContactPickerActivatedEventArgs: super::super::applicationmodel::activation::IContactPickerActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIContactPickerActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIContactCallActivatedEventArgs: super::super::applicationmodel::activation::IContactCallActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIContactCallActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIContactMessageActivatedEventArgs: super::super::applicationmodel::activation::IContactMessageActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIContactMessageActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIContactMapActivatedEventArgs: super::super::applicationmodel::activation::IContactMapActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIContactMapActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIContactPostActivatedEventArgs: super::super::applicationmodel::activation::IContactPostActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIContactPostActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIContactVideoCallActivatedEventArgs: super::super::applicationmodel::activation::IContactVideoCallActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIContactVideoCallActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUISearchActivatedEventArgs: super::super::applicationmodel::activation::ISearchActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUISearchActivatedEventArgs: IInspectable} + #[cfg(feature="windows.applicationmodel")] RT_CLASS!{class WebUIWalletActionActivatedEventArgs: super::super::applicationmodel::activation::IWalletActionActivatedEventArgs} + #[cfg(not(feature="windows.applicationmodel"))] RT_CLASS!{class WebUIWalletActionActivatedEventArgs: IInspectable} +} // Windows.UI.WebUI +pub mod input { // Windows.UI.Input +use ::prelude::*; + RT_ENUM! { enum EdgeGestureKind: i32 { + Touch (EdgeGestureKind_Touch) = 0, Keyboard (EdgeGestureKind_Keyboard) = 1, Mouse (EdgeGestureKind_Mouse) = 2, + }} + DEFINE_IID!(IID_IEdgeGestureEventArgs, 1157253668, 11529, 17121, 139, 94, 54, 130, 8, 121, 106, 76); + RT_INTERFACE!{interface IEdgeGestureEventArgs(IEdgeGestureEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IEdgeGestureEventArgs] { + fn get_Kind(&mut self, out: *mut EdgeGestureKind) -> HRESULT + }} + impl IEdgeGestureEventArgs { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class EdgeGestureEventArgs: IEdgeGestureEventArgs} + DEFINE_IID!(IID_IEdgeGestureStatics, 3161097497, 6382, 16451, 152, 57, 79, 197, 132, 214, 10, 20); + RT_INTERFACE!{static interface IEdgeGestureStatics(IEdgeGestureStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IEdgeGestureStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut EdgeGesture) -> HRESULT + }} + impl IEdgeGestureStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EdgeGesture: IEdgeGesture} + RT_ACTIVATABLE!{IEdgeGestureStatics [CLSID_EdgeGesture]} + DEFINE_CLSID!(CLSID_EdgeGesture = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,69,100,103,101,71,101,115,116,117,114,101,0]); + DEFINE_IID!(IID_IEdgeGesture, 1477268114, 10929, 18858, 167, 240, 51, 189, 63, 141, 249, 241); + RT_INTERFACE!{interface IEdgeGesture(IEdgeGestureVtbl): IInspectable(IInspectableVtbl) [IID_IEdgeGesture] { + fn add_Starting(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Starting(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Completed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Canceled(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Canceled(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IEdgeGesture { + #[inline] pub unsafe fn add_starting(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Starting)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_starting(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Starting)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Completed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Completed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_canceled(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Canceled)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_canceled(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Canceled)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyboardDeliveryInterceptor, 3032150120, 36681, 17516, 141, 181, 140, 15, 254, 133, 204, 158); + RT_INTERFACE!{interface IKeyboardDeliveryInterceptor(IKeyboardDeliveryInterceptorVtbl): IInspectable(IInspectableVtbl) [IID_IKeyboardDeliveryInterceptor] { + fn get_IsInterceptionEnabledWhenInForeground(&mut self, out: *mut bool) -> HRESULT, + fn put_IsInterceptionEnabledWhenInForeground(&mut self, value: bool) -> HRESULT, + fn add_KeyDown(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyDown(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyUp(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyUp(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IKeyboardDeliveryInterceptor { + #[inline] pub unsafe fn get_is_interception_enabled_when_in_foreground(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInterceptionEnabledWhenInForeground)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_interception_enabled_when_in_foreground(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsInterceptionEnabledWhenInForeground)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_key_down(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_KeyDown)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_key_down(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_KeyDown)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_key_up(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_KeyUp)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_key_up(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_KeyUp)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class KeyboardDeliveryInterceptor: IKeyboardDeliveryInterceptor} + RT_ACTIVATABLE!{IKeyboardDeliveryInterceptorStatics [CLSID_KeyboardDeliveryInterceptor]} + DEFINE_CLSID!(CLSID_KeyboardDeliveryInterceptor = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,75,101,121,98,111,97,114,100,68,101,108,105,118,101,114,121,73,110,116,101,114,99,101,112,116,111,114,0]); + DEFINE_IID!(IID_IKeyboardDeliveryInterceptorStatics, 4193663906, 52922, 18261, 138, 126, 20, 192, 255, 236, 210, 57); + RT_INTERFACE!{static interface IKeyboardDeliveryInterceptorStatics(IKeyboardDeliveryInterceptorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKeyboardDeliveryInterceptorStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut KeyboardDeliveryInterceptor) -> HRESULT + }} + impl IKeyboardDeliveryInterceptorStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum HoldingState: i32 { + Started (HoldingState_Started) = 0, Completed (HoldingState_Completed) = 1, Canceled (HoldingState_Canceled) = 2, + }} + RT_ENUM! { enum DraggingState: i32 { + Started (DraggingState_Started) = 0, Continuing (DraggingState_Continuing) = 1, Completed (DraggingState_Completed) = 2, + }} + RT_ENUM! { enum CrossSlidingState: i32 { + Started (CrossSlidingState_Started) = 0, Dragging (CrossSlidingState_Dragging) = 1, Selecting (CrossSlidingState_Selecting) = 2, SelectSpeedBumping (CrossSlidingState_SelectSpeedBumping) = 3, SpeedBumping (CrossSlidingState_SpeedBumping) = 4, Rearranging (CrossSlidingState_Rearranging) = 5, Completed (CrossSlidingState_Completed) = 6, + }} + RT_ENUM! { enum GestureSettings: u32 { + None (GestureSettings_None) = 0, Tap (GestureSettings_Tap) = 1, DoubleTap (GestureSettings_DoubleTap) = 2, Hold (GestureSettings_Hold) = 4, HoldWithMouse (GestureSettings_HoldWithMouse) = 8, RightTap (GestureSettings_RightTap) = 16, Drag (GestureSettings_Drag) = 32, ManipulationTranslateX (GestureSettings_ManipulationTranslateX) = 64, ManipulationTranslateY (GestureSettings_ManipulationTranslateY) = 128, ManipulationTranslateRailsX (GestureSettings_ManipulationTranslateRailsX) = 256, ManipulationTranslateRailsY (GestureSettings_ManipulationTranslateRailsY) = 512, ManipulationRotate (GestureSettings_ManipulationRotate) = 1024, ManipulationScale (GestureSettings_ManipulationScale) = 2048, ManipulationTranslateInertia (GestureSettings_ManipulationTranslateInertia) = 4096, ManipulationRotateInertia (GestureSettings_ManipulationRotateInertia) = 8192, ManipulationScaleInertia (GestureSettings_ManipulationScaleInertia) = 16384, CrossSlide (GestureSettings_CrossSlide) = 32768, ManipulationMultipleFingerPanning (GestureSettings_ManipulationMultipleFingerPanning) = 65536, + }} + RT_STRUCT! { struct ManipulationDelta { + Translation: super::super::foundation::Point, Scale: f32, Rotation: f32, Expansion: f32, + }} + RT_STRUCT! { struct ManipulationVelocities { + Linear: super::super::foundation::Point, Angular: f32, Expansion: f32, + }} + RT_STRUCT! { struct CrossSlideThresholds { + SelectionStart: f32, SpeedBumpStart: f32, SpeedBumpEnd: f32, RearrangeStart: f32, + }} + DEFINE_IID!(IID_ITappedEventArgs, 3483444964, 9530, 19516, 149, 59, 57, 92, 55, 174, 211, 9); + RT_INTERFACE!{interface ITappedEventArgs(ITappedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITappedEventArgs] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PointerDeviceType(&mut self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_TapCount(&mut self, out: *mut u32) -> HRESULT + }} + impl ITappedEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_pointer_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerDeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tap_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TapCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRightTappedEventArgs, 1287602365, 44922, 18998, 148, 118, 177, 220, 225, 65, 112, 154); + RT_INTERFACE!{interface IRightTappedEventArgs(IRightTappedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRightTappedEventArgs] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PointerDeviceType(&mut self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::Point) -> HRESULT + }} + impl IRightTappedEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_pointer_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerDeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHoldingEventArgs, 737629637, 59289, 16820, 187, 64, 36, 47, 64, 149, 155, 113); + RT_INTERFACE!{interface IHoldingEventArgs(IHoldingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IHoldingEventArgs] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PointerDeviceType(&mut self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_HoldingState(&mut self, out: *mut HoldingState) -> HRESULT + }} + impl IHoldingEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_pointer_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerDeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_holding_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HoldingState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDraggingEventArgs, 479220612, 2108, 19411, 181, 89, 23, 156, 221, 235, 51, 236); + RT_INTERFACE!{interface IDraggingEventArgs(IDraggingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDraggingEventArgs] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PointerDeviceType(&mut self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_DraggingState(&mut self, out: *mut DraggingState) -> HRESULT + }} + impl IDraggingEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_pointer_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerDeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_dragging_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DraggingState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IManipulationStartedEventArgs, 3723265854, 53198, 18738, 140, 29, 60, 61, 1, 26, 52, 192); + RT_INTERFACE!{interface IManipulationStartedEventArgs(IManipulationStartedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IManipulationStartedEventArgs] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PointerDeviceType(&mut self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Cumulative(&mut self, out: *mut ManipulationDelta) -> HRESULT + }} + impl IManipulationStartedEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_pointer_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerDeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cumulative(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Cumulative)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IManipulationUpdatedEventArgs, 3409267941, 43960, 20383, 179, 206, 129, 129, 170, 97, 173, 130); + RT_INTERFACE!{interface IManipulationUpdatedEventArgs(IManipulationUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IManipulationUpdatedEventArgs] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PointerDeviceType(&mut self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Delta(&mut self, out: *mut ManipulationDelta) -> HRESULT, + fn get_Cumulative(&mut self, out: *mut ManipulationDelta) -> HRESULT, + fn get_Velocities(&mut self, out: *mut ManipulationVelocities) -> HRESULT + }} + impl IManipulationUpdatedEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_pointer_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerDeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_delta(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Delta)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cumulative(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Cumulative)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_velocities(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Velocities)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IManipulationInertiaStartingEventArgs, 3711412376, 9919, 18042, 156, 229, 204, 243, 251, 17, 55, 30); + RT_INTERFACE!{interface IManipulationInertiaStartingEventArgs(IManipulationInertiaStartingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IManipulationInertiaStartingEventArgs] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PointerDeviceType(&mut self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Delta(&mut self, out: *mut ManipulationDelta) -> HRESULT, + fn get_Cumulative(&mut self, out: *mut ManipulationDelta) -> HRESULT, + fn get_Velocities(&mut self, out: *mut ManipulationVelocities) -> HRESULT + }} + impl IManipulationInertiaStartingEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_pointer_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerDeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_delta(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Delta)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cumulative(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Cumulative)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_velocities(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Velocities)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IManipulationCompletedEventArgs, 3008016939, 53659, 18175, 159, 56, 222, 199, 117, 75, 185, 231); + RT_INTERFACE!{interface IManipulationCompletedEventArgs(IManipulationCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IManipulationCompletedEventArgs] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PointerDeviceType(&mut self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Cumulative(&mut self, out: *mut ManipulationDelta) -> HRESULT, + fn get_Velocities(&mut self, out: *mut ManipulationVelocities) -> HRESULT + }} + impl IManipulationCompletedEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_pointer_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerDeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cumulative(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Cumulative)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_velocities(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Velocities)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICrossSlidingEventArgs, 3912714040, 28552, 16857, 135, 32, 120, 224, 142, 57, 131, 73); + RT_INTERFACE!{interface ICrossSlidingEventArgs(ICrossSlidingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICrossSlidingEventArgs] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PointerDeviceType(&mut self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_CrossSlidingState(&mut self, out: *mut CrossSlidingState) -> HRESULT + }} + impl ICrossSlidingEventArgs { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_pointer_device_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerDeviceType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cross_sliding_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CrossSlidingState)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMouseWheelParameters, 3939551812, 40429, 16439, 129, 73, 94, 76, 194, 86, 68, 104); + RT_INTERFACE!{interface IMouseWheelParameters(IMouseWheelParametersVtbl): IInspectable(IInspectableVtbl) [IID_IMouseWheelParameters] { + fn get_CharTranslation(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn put_CharTranslation(&mut self, value: super::super::foundation::Point) -> HRESULT, + fn get_DeltaScale(&mut self, out: *mut f32) -> HRESULT, + fn put_DeltaScale(&mut self, value: f32) -> HRESULT, + fn get_DeltaRotationAngle(&mut self, out: *mut f32) -> HRESULT, + fn put_DeltaRotationAngle(&mut self, value: f32) -> HRESULT, + fn get_PageTranslation(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn put_PageTranslation(&mut self, value: super::super::foundation::Point) -> HRESULT + }} + impl IMouseWheelParameters { + #[inline] pub unsafe fn get_char_translation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharTranslation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_char_translation(&mut self, value: super::super::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).put_CharTranslation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_delta_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeltaScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_delta_scale(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DeltaScale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_delta_rotation_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeltaRotationAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_delta_rotation_angle(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DeltaRotationAngle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_page_translation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PageTranslation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_page_translation(&mut self, value: super::super::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).put_PageTranslation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGestureRecognizer, 3027908543, 15723, 20360, 131, 232, 109, 203, 64, 18, 255, 176); + RT_INTERFACE!{interface IGestureRecognizer(IGestureRecognizerVtbl): IInspectable(IInspectableVtbl) [IID_IGestureRecognizer] { + fn get_GestureSettings(&mut self, out: *mut GestureSettings) -> HRESULT, + fn put_GestureSettings(&mut self, value: GestureSettings) -> HRESULT, + fn get_IsInertial(&mut self, out: *mut bool) -> HRESULT, + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn get_ShowGestureFeedback(&mut self, out: *mut bool) -> HRESULT, + fn put_ShowGestureFeedback(&mut self, value: bool) -> HRESULT, + fn get_PivotCenter(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn put_PivotCenter(&mut self, value: super::super::foundation::Point) -> HRESULT, + fn get_PivotRadius(&mut self, out: *mut f32) -> HRESULT, + fn put_PivotRadius(&mut self, value: f32) -> HRESULT, + fn get_InertiaTranslationDeceleration(&mut self, out: *mut f32) -> HRESULT, + fn put_InertiaTranslationDeceleration(&mut self, value: f32) -> HRESULT, + fn get_InertiaRotationDeceleration(&mut self, out: *mut f32) -> HRESULT, + fn put_InertiaRotationDeceleration(&mut self, value: f32) -> HRESULT, + fn get_InertiaExpansionDeceleration(&mut self, out: *mut f32) -> HRESULT, + fn put_InertiaExpansionDeceleration(&mut self, value: f32) -> HRESULT, + fn get_InertiaTranslationDisplacement(&mut self, out: *mut f32) -> HRESULT, + fn put_InertiaTranslationDisplacement(&mut self, value: f32) -> HRESULT, + fn get_InertiaRotationAngle(&mut self, out: *mut f32) -> HRESULT, + fn put_InertiaRotationAngle(&mut self, value: f32) -> HRESULT, + fn get_InertiaExpansion(&mut self, out: *mut f32) -> HRESULT, + fn put_InertiaExpansion(&mut self, value: f32) -> HRESULT, + fn get_ManipulationExact(&mut self, out: *mut bool) -> HRESULT, + fn put_ManipulationExact(&mut self, value: bool) -> HRESULT, + fn get_CrossSlideThresholds(&mut self, out: *mut CrossSlideThresholds) -> HRESULT, + fn put_CrossSlideThresholds(&mut self, value: CrossSlideThresholds) -> HRESULT, + fn get_CrossSlideHorizontally(&mut self, out: *mut bool) -> HRESULT, + fn put_CrossSlideHorizontally(&mut self, value: bool) -> HRESULT, + fn get_CrossSlideExact(&mut self, out: *mut bool) -> HRESULT, + fn put_CrossSlideExact(&mut self, value: bool) -> HRESULT, + fn get_AutoProcessInertia(&mut self, out: *mut bool) -> HRESULT, + fn put_AutoProcessInertia(&mut self, value: bool) -> HRESULT, + fn get_MouseWheelParameters(&mut self, out: *mut *mut MouseWheelParameters) -> HRESULT, + fn CanBeDoubleTap(&mut self, value: *mut PointerPoint, out: *mut bool) -> HRESULT, + fn ProcessDownEvent(&mut self, value: *mut PointerPoint) -> HRESULT, + fn ProcessMoveEvents(&mut self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, + fn ProcessUpEvent(&mut self, value: *mut PointerPoint) -> HRESULT, + fn ProcessMouseWheelEvent(&mut self, value: *mut PointerPoint, isShiftKeyDown: bool, isControlKeyDown: bool) -> HRESULT, + fn ProcessInertia(&mut self) -> HRESULT, + fn CompleteGesture(&mut self) -> HRESULT, + fn add_Tapped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Tapped(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RightTapped(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RightTapped(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Holding(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Holding(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Dragging(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Dragging(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationStarted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationStarted(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationUpdated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationUpdated(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationInertiaStarting(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationInertiaStarting(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationCompleted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationCompleted(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CrossSliding(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CrossSliding(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IGestureRecognizer { + #[inline] pub unsafe fn get_gesture_settings(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GestureSettings)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_gesture_settings(&mut self, value: GestureSettings) -> Result<()> { + let hr = ((*self.lpVtbl).put_GestureSettings)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_inertial(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInertial)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_show_gesture_feedback(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShowGestureFeedback)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_show_gesture_feedback(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShowGestureFeedback)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pivot_center(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PivotCenter)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_pivot_center(&mut self, value: super::super::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).put_PivotCenter)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pivot_radius(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PivotRadius)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_pivot_radius(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_PivotRadius)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inertia_translation_deceleration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InertiaTranslationDeceleration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_inertia_translation_deceleration(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_InertiaTranslationDeceleration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inertia_rotation_deceleration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InertiaRotationDeceleration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_inertia_rotation_deceleration(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_InertiaRotationDeceleration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inertia_expansion_deceleration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InertiaExpansionDeceleration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_inertia_expansion_deceleration(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_InertiaExpansionDeceleration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inertia_translation_displacement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InertiaTranslationDisplacement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_inertia_translation_displacement(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_InertiaTranslationDisplacement)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inertia_rotation_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InertiaRotationAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_inertia_rotation_angle(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_InertiaRotationAngle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inertia_expansion(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InertiaExpansion)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_inertia_expansion(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_InertiaExpansion)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_manipulation_exact(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ManipulationExact)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_manipulation_exact(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ManipulationExact)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cross_slide_thresholds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CrossSlideThresholds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cross_slide_thresholds(&mut self, value: CrossSlideThresholds) -> Result<()> { + let hr = ((*self.lpVtbl).put_CrossSlideThresholds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cross_slide_horizontally(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CrossSlideHorizontally)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cross_slide_horizontally(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CrossSlideHorizontally)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cross_slide_exact(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CrossSlideExact)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cross_slide_exact(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CrossSlideExact)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_auto_process_inertia(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoProcessInertia)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_auto_process_inertia(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AutoProcessInertia)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_mouse_wheel_parameters(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MouseWheelParameters)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn can_be_double_tap(&mut self, value: &PointerPoint) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanBeDoubleTap)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn process_down_event(&mut self, value: &PointerPoint) -> Result<()> { + let hr = ((*self.lpVtbl).ProcessDownEvent)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn process_move_events(&mut self, value: &super::super::foundation::collections::IVector) -> Result<()> { + let hr = ((*self.lpVtbl).ProcessMoveEvents)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn process_up_event(&mut self, value: &PointerPoint) -> Result<()> { + let hr = ((*self.lpVtbl).ProcessUpEvent)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn process_mouse_wheel_event(&mut self, value: &PointerPoint, isShiftKeyDown: bool, isControlKeyDown: bool) -> Result<()> { + let hr = ((*self.lpVtbl).ProcessMouseWheelEvent)(self, value as *const _ as *mut _, isShiftKeyDown, isControlKeyDown); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn process_inertia(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ProcessInertia)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn complete_gesture(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).CompleteGesture)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_tapped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Tapped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_tapped(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Tapped)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_right_tapped(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RightTapped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_right_tapped(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RightTapped)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_holding(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Holding)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_holding(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Holding)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_dragging(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Dragging)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_dragging(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Dragging)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_started(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationStarted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_started(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationStarted)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_updated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_updated(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationUpdated)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_inertia_starting(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationInertiaStarting)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_inertia_starting(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationInertiaStarting)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_completed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationCompleted)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_cross_sliding(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CrossSliding)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_cross_sliding(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CrossSliding)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MouseWheelParameters: IMouseWheelParameters} + RT_CLASS!{class GestureRecognizer: IGestureRecognizer} + RT_CLASS!{class TappedEventArgs: ITappedEventArgs} + RT_CLASS!{class RightTappedEventArgs: IRightTappedEventArgs} + RT_CLASS!{class HoldingEventArgs: IHoldingEventArgs} + RT_CLASS!{class DraggingEventArgs: IDraggingEventArgs} + RT_CLASS!{class ManipulationStartedEventArgs: IManipulationStartedEventArgs} + RT_CLASS!{class ManipulationUpdatedEventArgs: IManipulationUpdatedEventArgs} + RT_CLASS!{class ManipulationInertiaStartingEventArgs: IManipulationInertiaStartingEventArgs} + RT_CLASS!{class ManipulationCompletedEventArgs: IManipulationCompletedEventArgs} + RT_CLASS!{class CrossSlidingEventArgs: ICrossSlidingEventArgs} + DEFINE_IID!(IID_IPointerPointStatics, 2768659341, 10778, 16702, 188, 117, 159, 56, 56, 28, 192, 105); + RT_INTERFACE!{static interface IPointerPointStatics(IPointerPointStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPointerPointStatics] { + fn GetCurrentPoint(&mut self, pointerId: u32, out: *mut *mut PointerPoint) -> HRESULT, + fn GetIntermediatePoints(&mut self, pointerId: u32, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn GetCurrentPointTransformed(&mut self, pointerId: u32, transform: *mut IPointerPointTransform, out: *mut *mut PointerPoint) -> HRESULT, + fn GetIntermediatePointsTransformed(&mut self, pointerId: u32, transform: *mut IPointerPointTransform, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IPointerPointStatics { + #[inline] pub unsafe fn get_current_point(&mut self, pointerId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentPoint)(self, pointerId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_intermediate_points(&mut self, pointerId: u32) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIntermediatePoints)(self, pointerId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_point_transformed(&mut self, pointerId: u32, transform: &IPointerPointTransform) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCurrentPointTransformed)(self, pointerId, transform as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_intermediate_points_transformed(&mut self, pointerId: u32, transform: &IPointerPointTransform) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetIntermediatePointsTransformed)(self, pointerId, transform as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PointerPoint: IPointerPoint} + RT_ACTIVATABLE!{IPointerPointStatics [CLSID_PointerPoint]} + DEFINE_CLSID!(CLSID_PointerPoint = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,80,111,105,110,116,101,114,80,111,105,110,116,0]); + DEFINE_IID!(IID_IPointerPointTransform, 1298129231, 47228, 16424, 188, 156, 89, 233, 148, 127, 176, 86); + RT_INTERFACE!{interface IPointerPointTransform(IPointerPointTransformVtbl): IInspectable(IInspectableVtbl) [IID_IPointerPointTransform] { + fn get_Inverse(&mut self, out: *mut *mut IPointerPointTransform) -> HRESULT, + fn TryTransform(&mut self, inPoint: super::super::foundation::Point, outPoint: *mut super::super::foundation::Point, out: *mut bool) -> HRESULT, + fn TransformBounds(&mut self, rect: super::super::foundation::Rect, out: *mut super::super::foundation::Rect) -> HRESULT + }} + impl IPointerPointTransform { + #[inline] pub unsafe fn get_inverse(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Inverse)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_transform(&mut self, inPoint: super::super::foundation::Point) -> Result<(super::super::foundation::Point, bool)> { + let mut outPoint = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryTransform)(self, inPoint, &mut outPoint, &mut out); + if hr == S_OK { Ok((outPoint, out)) } else { err(hr) } + } + #[inline] pub unsafe fn transform_bounds(&mut self, rect: super::super::foundation::Rect) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TransformBounds)(self, rect, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPointerPoint, 3918868861, 29334, 17113, 130, 51, 197, 190, 115, 183, 74, 74); + RT_INTERFACE!{interface IPointerPoint(IPointerPointVtbl): IInspectable(IInspectableVtbl) [IID_IPointerPoint] { + #[cfg(not(feature="windows.devices"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.devices")] fn get_PointerDevice(&mut self, out: *mut *mut super::super::devices::input::PointerDevice) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_RawPosition(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_PointerId(&mut self, out: *mut u32) -> HRESULT, + fn get_FrameId(&mut self, out: *mut u32) -> HRESULT, + fn get_Timestamp(&mut self, out: *mut u64) -> HRESULT, + fn get_IsInContact(&mut self, out: *mut bool) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut PointerPointProperties) -> HRESULT + }} + impl IPointerPoint { + #[cfg(feature="windows.devices")] #[inline] pub unsafe fn get_pointer_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerDevice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_raw_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RawPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_frame_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FrameId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_timestamp(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_in_contact(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInContact)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PointerPointProperties: IPointerPointProperties} + RT_ENUM! { enum PointerUpdateKind: i32 { + Other (PointerUpdateKind_Other) = 0, LeftButtonPressed (PointerUpdateKind_LeftButtonPressed) = 1, LeftButtonReleased (PointerUpdateKind_LeftButtonReleased) = 2, RightButtonPressed (PointerUpdateKind_RightButtonPressed) = 3, RightButtonReleased (PointerUpdateKind_RightButtonReleased) = 4, MiddleButtonPressed (PointerUpdateKind_MiddleButtonPressed) = 5, MiddleButtonReleased (PointerUpdateKind_MiddleButtonReleased) = 6, XButton1Pressed (PointerUpdateKind_XButton1Pressed) = 7, XButton1Released (PointerUpdateKind_XButton1Released) = 8, XButton2Pressed (PointerUpdateKind_XButton2Pressed) = 9, XButton2Released (PointerUpdateKind_XButton2Released) = 10, + }} + DEFINE_IID!(IID_IPointerPointProperties, 3348990539, 49507, 20199, 128, 63, 103, 206, 121, 249, 151, 45); + RT_INTERFACE!{interface IPointerPointProperties(IPointerPointPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IPointerPointProperties] { + fn get_Pressure(&mut self, out: *mut f32) -> HRESULT, + fn get_IsInverted(&mut self, out: *mut bool) -> HRESULT, + fn get_IsEraser(&mut self, out: *mut bool) -> HRESULT, + fn get_Orientation(&mut self, out: *mut f32) -> HRESULT, + fn get_XTilt(&mut self, out: *mut f32) -> HRESULT, + fn get_YTilt(&mut self, out: *mut f32) -> HRESULT, + fn get_Twist(&mut self, out: *mut f32) -> HRESULT, + fn get_ContactRect(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_ContactRectRaw(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_TouchConfidence(&mut self, out: *mut bool) -> HRESULT, + fn get_IsLeftButtonPressed(&mut self, out: *mut bool) -> HRESULT, + fn get_IsRightButtonPressed(&mut self, out: *mut bool) -> HRESULT, + fn get_IsMiddleButtonPressed(&mut self, out: *mut bool) -> HRESULT, + fn get_MouseWheelDelta(&mut self, out: *mut i32) -> HRESULT, + fn get_IsHorizontalMouseWheel(&mut self, out: *mut bool) -> HRESULT, + fn get_IsPrimary(&mut self, out: *mut bool) -> HRESULT, + fn get_IsInRange(&mut self, out: *mut bool) -> HRESULT, + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT, + fn get_IsBarrelButtonPressed(&mut self, out: *mut bool) -> HRESULT, + fn get_IsXButton1Pressed(&mut self, out: *mut bool) -> HRESULT, + fn get_IsXButton2Pressed(&mut self, out: *mut bool) -> HRESULT, + fn get_PointerUpdateKind(&mut self, out: *mut PointerUpdateKind) -> HRESULT, + fn HasUsage(&mut self, usagePage: u32, usageId: u32, out: *mut bool) -> HRESULT, + fn GetUsageValue(&mut self, usagePage: u32, usageId: u32, out: *mut i32) -> HRESULT + }} + impl IPointerPointProperties { + #[inline] pub unsafe fn get_pressure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Pressure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_inverted(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInverted)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_eraser(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEraser)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_xtilt(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_XTilt)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_ytilt(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_YTilt)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_twist(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Twist)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_contact_rect(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ContactRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_contact_rect_raw(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ContactRectRaw)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_touch_confidence(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TouchConfidence)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_left_button_pressed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsLeftButtonPressed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_right_button_pressed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsRightButtonPressed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_middle_button_pressed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsMiddleButtonPressed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_mouse_wheel_delta(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MouseWheelDelta)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_horizontal_mouse_wheel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsHorizontalMouseWheel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_primary(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPrimary)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_in_range(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInRange)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_barrel_button_pressed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsBarrelButtonPressed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_xbutton1_pressed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsXButton1Pressed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_xbutton2_pressed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsXButton2Pressed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_update_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerUpdateKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn has_usage(&mut self, usagePage: u32, usageId: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).HasUsage)(self, usagePage, usageId, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_usage_value(&mut self, usagePage: u32, usageId: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetUsageValue)(self, usagePage, usageId, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPointerPointProperties2, 583222074, 51259, 16832, 162, 150, 94, 35, 45, 100, 214, 175); + RT_INTERFACE!{interface IPointerPointProperties2(IPointerPointProperties2Vtbl): IInspectable(IInspectableVtbl) [IID_IPointerPointProperties2] { + fn get_ZDistance(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IPointerPointProperties2 { + #[inline] pub unsafe fn get_zdistance(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZDistance)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPointerVisualizationSettings, 1293837409, 34039, 18845, 189, 145, 42, 54, 226, 183, 170, 162); + RT_INTERFACE!{interface IPointerVisualizationSettings(IPointerVisualizationSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IPointerVisualizationSettings] { + fn put_IsContactFeedbackEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsContactFeedbackEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsBarrelButtonFeedbackEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsBarrelButtonFeedbackEnabled(&mut self, out: *mut bool) -> HRESULT + }} + impl IPointerVisualizationSettings { + #[inline] pub unsafe fn set_is_contact_feedback_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsContactFeedbackEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_contact_feedback_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsContactFeedbackEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_barrel_button_feedback_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsBarrelButtonFeedbackEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_barrel_button_feedback_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsBarrelButtonFeedbackEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPointerVisualizationSettingsStatics, 1753681627, 5723, 16916, 180, 243, 88, 78, 202, 140, 138, 105); + RT_INTERFACE!{static interface IPointerVisualizationSettingsStatics(IPointerVisualizationSettingsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPointerVisualizationSettingsStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut PointerVisualizationSettings) -> HRESULT + }} + impl IPointerVisualizationSettingsStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PointerVisualizationSettings: IPointerVisualizationSettings} + RT_ACTIVATABLE!{IPointerVisualizationSettingsStatics [CLSID_PointerVisualizationSettings]} + DEFINE_CLSID!(CLSID_PointerVisualizationSettings = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,80,111,105,110,116,101,114,86,105,115,117,97,108,105,122,97,116,105,111,110,83,101,116,116,105,110,103,115,0]); + RT_ENUM! { enum RadialControllerSystemMenuItemKind: i32 { + Scroll (RadialControllerSystemMenuItemKind_Scroll) = 0, Zoom (RadialControllerSystemMenuItemKind_Zoom) = 1, UndoRedo (RadialControllerSystemMenuItemKind_UndoRedo) = 2, Volume (RadialControllerSystemMenuItemKind_Volume) = 3, NextPreviousTrack (RadialControllerSystemMenuItemKind_NextPreviousTrack) = 4, + }} + RT_ENUM! { enum RadialControllerMenuKnownIcon: i32 { + Scroll (RadialControllerMenuKnownIcon_Scroll) = 0, Zoom (RadialControllerMenuKnownIcon_Zoom) = 1, UndoRedo (RadialControllerMenuKnownIcon_UndoRedo) = 2, Volume (RadialControllerMenuKnownIcon_Volume) = 3, NextPreviousTrack (RadialControllerMenuKnownIcon_NextPreviousTrack) = 4, Ruler (RadialControllerMenuKnownIcon_Ruler) = 5, InkColor (RadialControllerMenuKnownIcon_InkColor) = 6, InkThickness (RadialControllerMenuKnownIcon_InkThickness) = 7, PenType (RadialControllerMenuKnownIcon_PenType) = 8, + }} + DEFINE_IID!(IID_IRadialControllerScreenContact, 543859764, 58961, 4581, 191, 98, 44, 39, 215, 64, 78, 133); + RT_INTERFACE!{interface IRadialControllerScreenContact(IRadialControllerScreenContactVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerScreenContact] { + fn get_Bounds(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_Position(&mut self, out: *mut super::super::foundation::Point) -> HRESULT + }} + impl IRadialControllerScreenContact { + #[inline] pub unsafe fn get_bounds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRadialControllerRotationChangedEventArgs, 543859765, 58961, 4581, 191, 98, 44, 39, 215, 64, 78, 133); + RT_INTERFACE!{interface IRadialControllerRotationChangedEventArgs(IRadialControllerRotationChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerRotationChangedEventArgs] { + fn get_RotationDeltaInDegrees(&mut self, out: *mut f64) -> HRESULT, + fn get_Contact(&mut self, out: *mut *mut RadialControllerScreenContact) -> HRESULT + }} + impl IRadialControllerRotationChangedEventArgs { + #[inline] pub unsafe fn get_rotation_delta_in_degrees(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RotationDeltaInDegrees)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RadialControllerScreenContact: IRadialControllerScreenContact} + DEFINE_IID!(IID_IRadialControllerScreenContactStartedEventArgs, 543859766, 58961, 4581, 191, 98, 44, 39, 215, 64, 78, 133); + RT_INTERFACE!{interface IRadialControllerScreenContactStartedEventArgs(IRadialControllerScreenContactStartedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerScreenContactStartedEventArgs] { + fn get_Contact(&mut self, out: *mut *mut RadialControllerScreenContact) -> HRESULT + }} + impl IRadialControllerScreenContactStartedEventArgs { + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRadialControllerScreenContactContinuedEventArgs, 543859767, 58961, 4581, 191, 98, 44, 39, 215, 64, 78, 133); + RT_INTERFACE!{interface IRadialControllerScreenContactContinuedEventArgs(IRadialControllerScreenContactContinuedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerScreenContactContinuedEventArgs] { + fn get_Contact(&mut self, out: *mut *mut RadialControllerScreenContact) -> HRESULT + }} + impl IRadialControllerScreenContactContinuedEventArgs { + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRadialControllerButtonClickedEventArgs, 543859768, 58961, 4581, 191, 98, 44, 39, 215, 64, 78, 133); + RT_INTERFACE!{interface IRadialControllerButtonClickedEventArgs(IRadialControllerButtonClickedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerButtonClickedEventArgs] { + fn get_Contact(&mut self, out: *mut *mut RadialControllerScreenContact) -> HRESULT + }} + impl IRadialControllerButtonClickedEventArgs { + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRadialControllerControlAcquiredEventArgs, 543859769, 58961, 4581, 191, 98, 44, 39, 215, 64, 78, 133); + RT_INTERFACE!{interface IRadialControllerControlAcquiredEventArgs(IRadialControllerControlAcquiredEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerControlAcquiredEventArgs] { + fn get_Contact(&mut self, out: *mut *mut RadialControllerScreenContact) -> HRESULT + }} + impl IRadialControllerControlAcquiredEventArgs { + #[inline] pub unsafe fn get_contact(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRadialController, 810930632, 57169, 17364, 178, 59, 14, 16, 55, 70, 122, 9); + RT_INTERFACE!{interface IRadialController(IRadialControllerVtbl): IInspectable(IInspectableVtbl) [IID_IRadialController] { + fn get_Menu(&mut self, out: *mut *mut RadialControllerMenu) -> HRESULT, + fn get_RotationResolutionInDegrees(&mut self, out: *mut f64) -> HRESULT, + fn put_RotationResolutionInDegrees(&mut self, value: f64) -> HRESULT, + fn get_UseAutomaticHapticFeedback(&mut self, out: *mut bool) -> HRESULT, + fn put_UseAutomaticHapticFeedback(&mut self, value: bool) -> HRESULT, + fn add_ScreenContactStarted(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ScreenContactStarted(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ScreenContactEnded(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ScreenContactEnded(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ScreenContactContinued(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ScreenContactContinued(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ControlLost(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ControlLost(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RotationChanged(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RotationChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ButtonClicked(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ButtonClicked(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ControlAcquired(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ControlAcquired(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IRadialController { + #[inline] pub unsafe fn get_menu(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Menu)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation_resolution_in_degrees(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RotationResolutionInDegrees)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rotation_resolution_in_degrees(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_RotationResolutionInDegrees)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_use_automatic_haptic_feedback(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UseAutomaticHapticFeedback)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_use_automatic_haptic_feedback(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_UseAutomaticHapticFeedback)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_screen_contact_started(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ScreenContactStarted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_screen_contact_started(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ScreenContactStarted)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_screen_contact_ended(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ScreenContactEnded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_screen_contact_ended(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ScreenContactEnded)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_screen_contact_continued(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ScreenContactContinued)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_screen_contact_continued(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ScreenContactContinued)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_control_lost(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ControlLost)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_control_lost(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ControlLost)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_rotation_changed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RotationChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_rotation_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RotationChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_button_clicked(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ButtonClicked)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_button_clicked(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ButtonClicked)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_control_acquired(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ControlAcquired)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_control_acquired(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ControlAcquired)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class RadialControllerMenu: IRadialControllerMenu} + RT_CLASS!{class RadialController: IRadialController} + RT_ACTIVATABLE!{IRadialControllerStatics [CLSID_RadialController]} + DEFINE_CLSID!(CLSID_RadialController = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,82,97,100,105,97,108,67,111,110,116,114,111,108,108,101,114,0]); + RT_CLASS!{class RadialControllerScreenContactStartedEventArgs: IRadialControllerScreenContactStartedEventArgs} + RT_CLASS!{class RadialControllerScreenContactContinuedEventArgs: IRadialControllerScreenContactContinuedEventArgs} + RT_CLASS!{class RadialControllerRotationChangedEventArgs: IRadialControllerRotationChangedEventArgs} + RT_CLASS!{class RadialControllerButtonClickedEventArgs: IRadialControllerButtonClickedEventArgs} + RT_CLASS!{class RadialControllerControlAcquiredEventArgs: IRadialControllerControlAcquiredEventArgs} + DEFINE_IID!(IID_IRadialControllerStatics, 4208906423, 47180, 18580, 135, 170, 143, 37, 170, 95, 40, 139); + RT_INTERFACE!{static interface IRadialControllerStatics(IRadialControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerStatics] { + fn IsSupported(&mut self, out: *mut bool) -> HRESULT, + fn CreateForCurrentView(&mut self, out: *mut *mut RadialController) -> HRESULT + }} + impl IRadialControllerStatics { + #[inline] pub unsafe fn is_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn create_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRadialControllerMenu, 2231808861, 63040, 17426, 171, 160, 186, 208, 119, 229, 234, 138); + RT_INTERFACE!{interface IRadialControllerMenu(IRadialControllerMenuVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerMenu] { + fn get_Items(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsEnabled(&mut self, value: bool) -> HRESULT, + fn GetSelectedMenuItem(&mut self, out: *mut *mut RadialControllerMenuItem) -> HRESULT, + fn SelectMenuItem(&mut self, menuItem: *mut RadialControllerMenuItem) -> HRESULT, + fn TrySelectPreviouslySelectedMenuItem(&mut self, out: *mut bool) -> HRESULT + }} + impl IRadialControllerMenu { + #[inline] pub unsafe fn get_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Items)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_menu_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSelectedMenuItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn select_menu_item(&mut self, menuItem: &RadialControllerMenuItem) -> Result<()> { + let hr = ((*self.lpVtbl).SelectMenuItem)(self, menuItem as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_select_previously_selected_menu_item(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySelectPreviouslySelectedMenuItem)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class RadialControllerMenuItem: IRadialControllerMenuItem} + RT_ACTIVATABLE!{IRadialControllerMenuItemStatics [CLSID_RadialControllerMenuItem]} + DEFINE_CLSID!(CLSID_RadialControllerMenuItem = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,82,97,100,105,97,108,67,111,110,116,114,111,108,108,101,114,77,101,110,117,73,116,101,109,0]); + DEFINE_IID!(IID_IRadialControllerMenuItemStatics, 614336647, 55362, 17700, 157, 248, 224, 214, 71, 237, 200, 135); + RT_INTERFACE!{static interface IRadialControllerMenuItemStatics(IRadialControllerMenuItemStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerMenuItemStatics] { + #[cfg(not(feature="windows.storage"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.storage")] fn CreateFromIcon(&mut self, displayText: HSTRING, icon: *mut super::super::storage::streams::RandomAccessStreamReference, out: *mut *mut RadialControllerMenuItem) -> HRESULT, + fn CreateFromKnownIcon(&mut self, displayText: HSTRING, value: RadialControllerMenuKnownIcon, out: *mut *mut RadialControllerMenuItem) -> HRESULT + }} + impl IRadialControllerMenuItemStatics { + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn create_from_icon(&mut self, displayText: &HStringArg, icon: &super::super::storage::streams::RandomAccessStreamReference) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromIcon)(self, displayText.get(), icon as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_from_known_icon(&mut self, displayText: &HStringArg, value: RadialControllerMenuKnownIcon) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateFromKnownIcon)(self, displayText.get(), value, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRadialControllerMenuItem, 3356477837, 44299, 19612, 143, 47, 19, 106, 35, 115, 166, 186); + RT_INTERFACE!{interface IRadialControllerMenuItem(IRadialControllerMenuItemVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerMenuItem] { + fn get_DisplayText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Tag(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Tag(&mut self, value: *mut IInspectable) -> HRESULT, + fn add_Invoked(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Invoked(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IRadialControllerMenuItem { + #[inline] pub unsafe fn get_display_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tag(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_tag(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Tag)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_invoked(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Invoked)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_invoked(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Invoked)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRadialControllerConfiguration, 2797051595, 27218, 17456, 145, 12, 86, 55, 10, 157, 107, 66); + RT_INTERFACE!{interface IRadialControllerConfiguration(IRadialControllerConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerConfiguration] { + fn SetDefaultMenuItems(&mut self, buttons: *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn ResetToDefaultMenuItems(&mut self) -> HRESULT, + fn TrySelectDefaultMenuItem(&mut self, type_: RadialControllerSystemMenuItemKind, out: *mut bool) -> HRESULT + }} + impl IRadialControllerConfiguration { + #[inline] pub unsafe fn set_default_menu_items(&mut self, buttons: &super::super::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).SetDefaultMenuItems)(self, buttons as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn reset_to_default_menu_items(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ResetToDefaultMenuItems)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_select_default_menu_item(&mut self, type_: RadialControllerSystemMenuItemKind) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySelectDefaultMenuItem)(self, type_, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRadialControllerConfigurationStatics, 2042015973, 1690, 17542, 169, 157, 141, 183, 114, 185, 100, 47); + RT_INTERFACE!{static interface IRadialControllerConfigurationStatics(IRadialControllerConfigurationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerConfigurationStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut RadialControllerConfiguration) -> HRESULT + }} + impl IRadialControllerConfigurationStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RadialControllerConfiguration: IRadialControllerConfiguration} + RT_ACTIVATABLE!{IRadialControllerConfigurationStatics [CLSID_RadialControllerConfiguration]} + DEFINE_CLSID!(CLSID_RadialControllerConfiguration = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,82,97,100,105,97,108,67,111,110,116,114,111,108,108,101,114,67,111,110,102,105,103,117,114,97,116,105,111,110,0]); +pub mod spatial { // Windows.UI.Input.Spatial +use ::prelude::*; + RT_ENUM! { enum SpatialInteractionSourceKind: i32 { + Other (SpatialInteractionSourceKind_Other) = 0, Hand (SpatialInteractionSourceKind_Hand) = 1, Voice (SpatialInteractionSourceKind_Voice) = 2, Controller (SpatialInteractionSourceKind_Controller) = 3, + }} + RT_ENUM! { enum SpatialGestureSettings: u32 { + None (SpatialGestureSettings_None) = 0, Tap (SpatialGestureSettings_Tap) = 1, DoubleTap (SpatialGestureSettings_DoubleTap) = 2, Hold (SpatialGestureSettings_Hold) = 4, ManipulationTranslate (SpatialGestureSettings_ManipulationTranslate) = 8, NavigationX (SpatialGestureSettings_NavigationX) = 16, NavigationY (SpatialGestureSettings_NavigationY) = 32, NavigationZ (SpatialGestureSettings_NavigationZ) = 64, NavigationRailsX (SpatialGestureSettings_NavigationRailsX) = 128, NavigationRailsY (SpatialGestureSettings_NavigationRailsY) = 256, NavigationRailsZ (SpatialGestureSettings_NavigationRailsZ) = 512, + }} + DEFINE_IID!(IID_ISpatialInteractionSourceLocation, 3930494660, 32395, 12490, 188, 197, 199, 113, 137, 206, 163, 10); + RT_INTERFACE!{interface ISpatialInteractionSourceLocation(ISpatialInteractionSourceLocationVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionSourceLocation] { + fn get_Position(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT, + fn get_Velocity(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT + }} + impl ISpatialInteractionSourceLocation { + #[inline] pub unsafe fn get_position(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_velocity(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Velocity)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialInteractionSourceLocation2, 1281822789, 14615, 16636, 169, 172, 49, 201, 207, 95, 249, 27); + RT_INTERFACE!{interface ISpatialInteractionSourceLocation2(ISpatialInteractionSourceLocation2Vtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionSourceLocation2] { + fn get_Orientation(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Quaternion>) -> HRESULT + }} + impl ISpatialInteractionSourceLocation2 { + #[inline] pub unsafe fn get_orientation(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialInteractionSource, 4216599482, 45235, 12616, 159, 59, 233, 245, 222, 86, 143, 93); + RT_INTERFACE!{interface ISpatialInteractionSource(ISpatialInteractionSourceVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionSource] { + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_Kind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT + }} + impl ISpatialInteractionSource { + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialInteractionSourceProperties, 90195266, 16119, 12834, 159, 83, 99, 201, 203, 126, 59, 199); + RT_INTERFACE!{interface ISpatialInteractionSourceProperties(ISpatialInteractionSourcePropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionSourceProperties] { + #[cfg(feature="windows.perception")] fn TryGetSourceLossMitigationDirection(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT, + fn get_SourceLossRisk(&mut self, out: *mut f64) -> HRESULT, + #[cfg(feature="windows.perception")] fn TryGetLocation(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialInteractionSourceLocation) -> HRESULT + }} + impl ISpatialInteractionSourceProperties { + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_source_loss_mitigation_direction(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetSourceLossMitigationDirection)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_source_loss_risk(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SourceLossRisk)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_location(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetLocation)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialInteractionSourceLocation: ISpatialInteractionSourceLocation} + DEFINE_IID!(IID_ISpatialPointerPose, 1767089198, 49534, 13693, 151, 161, 114, 105, 208, 237, 45, 16); + RT_INTERFACE!{interface ISpatialPointerPose(ISpatialPointerPoseVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialPointerPose] { + #[cfg(feature="windows.perception")] fn get_Timestamp(&mut self, out: *mut *mut ::rt::gen::windows::perception::PerceptionTimestamp) -> HRESULT, + #[cfg(feature="windows.perception")] fn get_Head(&mut self, out: *mut *mut ::rt::gen::windows::perception::people::HeadPose) -> HRESULT + }} + impl ISpatialPointerPose { + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn get_timestamp(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn get_head(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Head)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialPointerPoseStatics, 2723516841, 44193, 16096, 152, 22, 120, 92, 251, 46, 63, 184); + RT_INTERFACE!{static interface ISpatialPointerPoseStatics(ISpatialPointerPoseStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialPointerPoseStatics] { + #[cfg(feature="windows.perception")] fn TryGetAtTimestamp(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, timestamp: *mut ::rt::gen::windows::perception::PerceptionTimestamp, out: *mut *mut SpatialPointerPose) -> HRESULT + }} + impl ISpatialPointerPoseStatics { + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_at_timestamp(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, timestamp: &::rt::gen::windows::perception::PerceptionTimestamp) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetAtTimestamp)(self, coordinateSystem as *const _ as *mut _, timestamp as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialPointerPose: ISpatialPointerPose} + RT_ACTIVATABLE!{ISpatialPointerPoseStatics [CLSID_SpatialPointerPose]} + DEFINE_CLSID!(CLSID_SpatialPointerPose = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,83,112,97,116,105,97,108,46,83,112,97,116,105,97,108,80,111,105,110,116,101,114,80,111,115,101,0]); + DEFINE_IID!(IID_ISpatialInteractionSourceState, 3586422255, 19299, 14316, 152, 185, 159, 198, 82, 185, 210, 242); + RT_INTERFACE!{interface ISpatialInteractionSourceState(ISpatialInteractionSourceStateVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionSourceState] { + fn get_Source(&mut self, out: *mut *mut SpatialInteractionSource) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut SpatialInteractionSourceProperties) -> HRESULT, + fn get_IsPressed(&mut self, out: *mut bool) -> HRESULT, + #[cfg(feature="windows.perception")] fn get_Timestamp(&mut self, out: *mut *mut ::rt::gen::windows::perception::PerceptionTimestamp) -> HRESULT, + #[cfg(feature="windows.perception")] fn TryGetPointerPose(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialPointerPose) -> HRESULT + }} + impl ISpatialInteractionSourceState { + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_pressed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPressed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn get_timestamp(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Timestamp)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_pointer_pose(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetPointerPose)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialInteractionSource: ISpatialInteractionSource} + RT_CLASS!{class SpatialInteractionSourceProperties: ISpatialInteractionSourceProperties} + DEFINE_IID!(IID_ISpatialRecognitionStartedEventArgs, 618271375, 8, 19053, 170, 80, 42, 118, 249, 207, 178, 100); + RT_INTERFACE!{interface ISpatialRecognitionStartedEventArgs(ISpatialRecognitionStartedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialRecognitionStartedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT, + #[cfg(not(feature="windows.perception"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.perception")] fn TryGetPointerPose(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialPointerPose) -> HRESULT, + fn IsGesturePossible(&mut self, gesture: SpatialGestureSettings, out: *mut bool) -> HRESULT + }} + impl ISpatialRecognitionStartedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_pointer_pose(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetPointerPose)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_gesture_possible(&mut self, gesture: SpatialGestureSettings) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsGesturePossible)(self, gesture, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialRecognitionEndedEventArgs, 238417355, 16245, 17395, 172, 129, 209, 220, 45, 249, 177, 251); + RT_INTERFACE!{interface ISpatialRecognitionEndedEventArgs(ISpatialRecognitionEndedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialRecognitionEndedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT + }} + impl ISpatialRecognitionEndedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialTappedEventArgs, 695043038, 62532, 19105, 178, 191, 157, 200, 141, 86, 125, 166); + RT_INTERFACE!{interface ISpatialTappedEventArgs(ISpatialTappedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialTappedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT, + #[cfg(not(feature="windows.perception"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.perception")] fn TryGetPointerPose(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialPointerPose) -> HRESULT, + fn get_TapCount(&mut self, out: *mut u32) -> HRESULT + }} + impl ISpatialTappedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_pointer_pose(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetPointerPose)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tap_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TapCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialHoldStartedEventArgs, 2385788281, 44214, 16708, 134, 21, 44, 251, 168, 163, 203, 63); + RT_INTERFACE!{interface ISpatialHoldStartedEventArgs(ISpatialHoldStartedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialHoldStartedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT, + #[cfg(feature="windows.perception")] fn TryGetPointerPose(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialPointerPose) -> HRESULT + }} + impl ISpatialHoldStartedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_pointer_pose(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetPointerPose)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialHoldCompletedEventArgs, 1063536395, 19709, 17370, 141, 196, 230, 69, 82, 23, 57, 113); + RT_INTERFACE!{interface ISpatialHoldCompletedEventArgs(ISpatialHoldCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialHoldCompletedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT + }} + impl ISpatialHoldCompletedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialHoldCanceledEventArgs, 1576842855, 19626, 16531, 140, 53, 182, 1, 168, 57, 243, 27); + RT_INTERFACE!{interface ISpatialHoldCanceledEventArgs(ISpatialHoldCanceledEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialHoldCanceledEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT + }} + impl ISpatialHoldCanceledEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialManipulationDelta, 2817300090, 53539, 14977, 161, 91, 153, 41, 35, 220, 190, 145); + RT_INTERFACE!{interface ISpatialManipulationDelta(ISpatialManipulationDeltaVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialManipulationDelta] { + fn get_Translation(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT + }} + impl ISpatialManipulationDelta { + #[inline] pub unsafe fn get_translation(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Translation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialManipulationStartedEventArgs, 2715204558, 17061, 14203, 173, 166, 210, 142, 61, 56, 71, 55); + RT_INTERFACE!{interface ISpatialManipulationStartedEventArgs(ISpatialManipulationStartedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialManipulationStartedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT, + #[cfg(feature="windows.perception")] fn TryGetPointerPose(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialPointerPose) -> HRESULT + }} + impl ISpatialManipulationStartedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_pointer_pose(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetPointerPose)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialManipulationUpdatedEventArgs, 1596132251, 24774, 19910, 189, 201, 159, 74, 111, 21, 254, 73); + RT_INTERFACE!{interface ISpatialManipulationUpdatedEventArgs(ISpatialManipulationUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialManipulationUpdatedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT, + #[cfg(feature="windows.perception")] fn TryGetCumulativeDelta(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialManipulationDelta) -> HRESULT + }} + impl ISpatialManipulationUpdatedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_cumulative_delta(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetCumulativeDelta)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialManipulationDelta: ISpatialManipulationDelta} + DEFINE_IID!(IID_ISpatialManipulationCompletedEventArgs, 84436994, 62209, 17219, 146, 80, 47, 186, 165, 248, 122, 55); + RT_INTERFACE!{interface ISpatialManipulationCompletedEventArgs(ISpatialManipulationCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialManipulationCompletedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT, + #[cfg(feature="windows.perception")] fn TryGetCumulativeDelta(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialManipulationDelta) -> HRESULT + }} + impl ISpatialManipulationCompletedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_cumulative_delta(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetCumulativeDelta)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialManipulationCanceledEventArgs, 759222731, 59354, 16928, 176, 191, 129, 147, 1, 103, 71, 128); + RT_INTERFACE!{interface ISpatialManipulationCanceledEventArgs(ISpatialManipulationCanceledEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialManipulationCanceledEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT + }} + impl ISpatialManipulationCanceledEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialNavigationStartedEventArgs, 1967797386, 64356, 18006, 142, 189, 157, 238, 202, 175, 228, 117); + RT_INTERFACE!{interface ISpatialNavigationStartedEventArgs(ISpatialNavigationStartedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialNavigationStartedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT, + #[cfg(not(feature="windows.perception"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.perception")] fn TryGetPointerPose(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialPointerPose) -> HRESULT, + fn get_IsNavigatingX(&mut self, out: *mut bool) -> HRESULT, + fn get_IsNavigatingY(&mut self, out: *mut bool) -> HRESULT, + fn get_IsNavigatingZ(&mut self, out: *mut bool) -> HRESULT + }} + impl ISpatialNavigationStartedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_pointer_pose(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetPointerPose)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_navigating_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsNavigatingX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_navigating_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsNavigatingY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_navigating_z(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsNavigatingZ)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialNavigationUpdatedEventArgs, 2607890391, 33693, 19060, 135, 50, 69, 70, 111, 192, 68, 181); + RT_INTERFACE!{interface ISpatialNavigationUpdatedEventArgs(ISpatialNavigationUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialNavigationUpdatedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT, + fn get_NormalizedOffset(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT + }} + impl ISpatialNavigationUpdatedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_normalized_offset(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NormalizedOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialNavigationCompletedEventArgs, 19824823, 44859, 17090, 158, 65, 186, 170, 14, 114, 31, 58); + RT_INTERFACE!{interface ISpatialNavigationCompletedEventArgs(ISpatialNavigationCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialNavigationCompletedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT, + fn get_NormalizedOffset(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT + }} + impl ISpatialNavigationCompletedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_normalized_offset(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NormalizedOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialNavigationCanceledEventArgs, 3461365468, 59557, 18160, 146, 212, 60, 18, 43, 53, 17, 42); + RT_INTERFACE!{interface ISpatialNavigationCanceledEventArgs(ISpatialNavigationCanceledEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialNavigationCanceledEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT + }} + impl ISpatialNavigationCanceledEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialInteraction, 4237719097, 35046, 17990, 145, 18, 67, 68, 170, 236, 157, 250); + RT_INTERFACE!{interface ISpatialInteraction(ISpatialInteractionVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteraction] { + fn get_SourceState(&mut self, out: *mut *mut SpatialInteractionSourceState) -> HRESULT + }} + impl ISpatialInteraction { + #[inline] pub unsafe fn get_source_state(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceState)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialInteractionSourceState: ISpatialInteractionSourceState} + DEFINE_IID!(IID_ISpatialGestureRecognizer, 1902140364, 3125, 18035, 173, 189, 204, 4, 202, 166, 239, 69); + RT_INTERFACE!{interface ISpatialGestureRecognizer(ISpatialGestureRecognizerVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialGestureRecognizer] { + fn add_RecognitionStarted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecognitionStarted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_RecognitionEnded(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecognitionEnded(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Tapped(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Tapped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_HoldStarted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_HoldStarted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_HoldCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_HoldCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_HoldCanceled(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_HoldCanceled(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationStarted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationStarted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationUpdated(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationUpdated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationCanceled(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationCanceled(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_NavigationStarted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NavigationStarted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_NavigationUpdated(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NavigationUpdated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_NavigationCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NavigationCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_NavigationCanceled(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NavigationCanceled(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn CaptureInteraction(&mut self, interaction: *mut SpatialInteraction) -> HRESULT, + fn CancelPendingGestures(&mut self) -> HRESULT, + fn TrySetGestureSettings(&mut self, settings: SpatialGestureSettings, out: *mut bool) -> HRESULT, + fn get_GestureSettings(&mut self, out: *mut SpatialGestureSettings) -> HRESULT + }} + impl ISpatialGestureRecognizer { + #[inline] pub unsafe fn add_recognition_started(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RecognitionStarted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_recognition_started(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RecognitionStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_recognition_ended(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RecognitionEnded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_recognition_ended(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RecognitionEnded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_tapped(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Tapped)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_tapped(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Tapped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_hold_started(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_HoldStarted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_hold_started(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_HoldStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_hold_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_HoldCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_hold_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_HoldCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_hold_canceled(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_HoldCanceled)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_hold_canceled(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_HoldCanceled)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_started(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationStarted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_started(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_updated(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_updated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_canceled(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationCanceled)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_canceled(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationCanceled)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_navigation_started(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NavigationStarted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_navigation_started(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NavigationStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_navigation_updated(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NavigationUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_navigation_updated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NavigationUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_navigation_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NavigationCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_navigation_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NavigationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_navigation_canceled(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NavigationCanceled)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_navigation_canceled(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NavigationCanceled)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn capture_interaction(&mut self, interaction: &SpatialInteraction) -> Result<()> { + let hr = ((*self.lpVtbl).CaptureInteraction)(self, interaction as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn cancel_pending_gestures(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).CancelPendingGestures)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_set_gesture_settings(&mut self, settings: SpatialGestureSettings) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TrySetGestureSettings)(self, settings, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_gesture_settings(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GestureSettings)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SpatialGestureRecognizer: ISpatialGestureRecognizer [ISpatialGestureRecognizerFactory] [CLSID_SpatialGestureRecognizer]} + DEFINE_CLSID!(CLSID_SpatialGestureRecognizer = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,83,112,97,116,105,97,108,46,83,112,97,116,105,97,108,71,101,115,116,117,114,101,82,101,99,111,103,110,105,122,101,114,0]); + RT_CLASS!{class SpatialRecognitionStartedEventArgs: ISpatialRecognitionStartedEventArgs} + RT_CLASS!{class SpatialRecognitionEndedEventArgs: ISpatialRecognitionEndedEventArgs} + RT_CLASS!{class SpatialTappedEventArgs: ISpatialTappedEventArgs} + RT_CLASS!{class SpatialHoldStartedEventArgs: ISpatialHoldStartedEventArgs} + RT_CLASS!{class SpatialHoldCompletedEventArgs: ISpatialHoldCompletedEventArgs} + RT_CLASS!{class SpatialHoldCanceledEventArgs: ISpatialHoldCanceledEventArgs} + RT_CLASS!{class SpatialManipulationStartedEventArgs: ISpatialManipulationStartedEventArgs} + RT_CLASS!{class SpatialManipulationUpdatedEventArgs: ISpatialManipulationUpdatedEventArgs} + RT_CLASS!{class SpatialManipulationCompletedEventArgs: ISpatialManipulationCompletedEventArgs} + RT_CLASS!{class SpatialManipulationCanceledEventArgs: ISpatialManipulationCanceledEventArgs} + RT_CLASS!{class SpatialNavigationStartedEventArgs: ISpatialNavigationStartedEventArgs} + RT_CLASS!{class SpatialNavigationUpdatedEventArgs: ISpatialNavigationUpdatedEventArgs} + RT_CLASS!{class SpatialNavigationCompletedEventArgs: ISpatialNavigationCompletedEventArgs} + RT_CLASS!{class SpatialNavigationCanceledEventArgs: ISpatialNavigationCanceledEventArgs} + RT_CLASS!{class SpatialInteraction: ISpatialInteraction} + DEFINE_IID!(IID_ISpatialGestureRecognizerFactory, 1998668166, 22457, 12624, 131, 130, 105, 139, 36, 226, 100, 208); + RT_INTERFACE!{static interface ISpatialGestureRecognizerFactory(ISpatialGestureRecognizerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialGestureRecognizerFactory] { + fn Create(&mut self, settings: SpatialGestureSettings, out: *mut *mut SpatialGestureRecognizer) -> HRESULT + }} + impl ISpatialGestureRecognizerFactory { + #[inline] pub unsafe fn create(&mut self, settings: SpatialGestureSettings) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, settings, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialInteractionDetectedEventArgs, 123238628, 22881, 15169, 157, 251, 206, 165, 216, 156, 195, 138); + RT_INTERFACE!{interface ISpatialInteractionDetectedEventArgs(ISpatialInteractionDetectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionDetectedEventArgs] { + fn get_InteractionSourceKind(&mut self, out: *mut SpatialInteractionSourceKind) -> HRESULT, + #[cfg(not(feature="windows.perception"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.perception")] fn TryGetPointerPose(&mut self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialPointerPose) -> HRESULT, + fn get_Interaction(&mut self, out: *mut *mut SpatialInteraction) -> HRESULT + }} + impl ISpatialInteractionDetectedEventArgs { + #[inline] pub unsafe fn get_interaction_source_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn try_get_pointer_pose(&mut self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryGetPointerPose)(self, coordinateSystem as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_interaction(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Interaction)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialInteractionSourceEventArgs, 599230159, 60451, 14713, 178, 124, 235, 14, 18, 254, 183, 199); + RT_INTERFACE!{interface ISpatialInteractionSourceEventArgs(ISpatialInteractionSourceEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionSourceEventArgs] { + fn get_State(&mut self, out: *mut *mut SpatialInteractionSourceState) -> HRESULT + }} + impl ISpatialInteractionSourceEventArgs { + #[inline] pub unsafe fn get_state(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpatialInteractionManager, 849759912, 41306, 14741, 184, 189, 128, 81, 60, 181, 173, 239); + RT_INTERFACE!{interface ISpatialInteractionManager(ISpatialInteractionManagerVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionManager] { + fn add_SourceDetected(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceDetected(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceLost(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceLost(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceUpdated(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceUpdated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourcePressed(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourcePressed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceReleased(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceReleased(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_InteractionDetected(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_InteractionDetected(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(feature="windows.perception")] fn GetDetectedSourcesAtTimestamp(&mut self, timeStamp: *mut ::rt::gen::windows::perception::PerceptionTimestamp, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl ISpatialInteractionManager { + #[inline] pub unsafe fn add_source_detected(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceDetected)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_detected(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceDetected)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_lost(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceLost)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_lost(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceLost)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_updated(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceUpdated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_updated(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_pressed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourcePressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_pressed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourcePressed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_source_released(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SourceReleased)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_source_released(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SourceReleased)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_interaction_detected(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_InteractionDetected)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_interaction_detected(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_InteractionDetected)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.perception")] #[inline] pub unsafe fn get_detected_sources_at_timestamp(&mut self, timeStamp: &::rt::gen::windows::perception::PerceptionTimestamp) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDetectedSourcesAtTimestamp)(self, timeStamp as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class SpatialInteractionManager: ISpatialInteractionManager} + RT_ACTIVATABLE!{ISpatialInteractionManagerStatics [CLSID_SpatialInteractionManager]} + DEFINE_CLSID!(CLSID_SpatialInteractionManager = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,83,112,97,116,105,97,108,46,83,112,97,116,105,97,108,73,110,116,101,114,97,99,116,105,111,110,77,97,110,97,103,101,114,0]); + RT_CLASS!{class SpatialInteractionSourceEventArgs: ISpatialInteractionSourceEventArgs} + RT_CLASS!{class SpatialInteractionDetectedEventArgs: ISpatialInteractionDetectedEventArgs} + DEFINE_IID!(IID_ISpatialInteractionManagerStatics, 14884774, 36002, 12479, 145, 254, 217, 203, 74, 0, 137, 144); + RT_INTERFACE!{static interface ISpatialInteractionManagerStatics(ISpatialInteractionManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionManagerStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut SpatialInteractionManager) -> HRESULT + }} + impl ISpatialInteractionManagerStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.UI.Input.Spatial +pub mod inking { // Windows.UI.Input.Inking +use ::prelude::*; + RT_ENUM! { enum InkPresenterPredefinedConfiguration: i32 { + SimpleSinglePointer (InkPresenterPredefinedConfiguration_SimpleSinglePointer) = 0, SimpleMultiplePointer (InkPresenterPredefinedConfiguration_SimpleMultiplePointer) = 1, + }} + RT_ENUM! { enum InkInputRightDragAction: i32 { + LeaveUnprocessed (InkInputRightDragAction_LeaveUnprocessed) = 0, AllowProcessing (InkInputRightDragAction_AllowProcessing) = 1, + }} + RT_ENUM! { enum InkInputProcessingMode: i32 { + None (InkInputProcessingMode_None) = 0, Inking (InkInputProcessingMode_Inking) = 1, Erasing (InkInputProcessingMode_Erasing) = 2, + }} + RT_ENUM! { enum InkPresenterStencilKind: i32 { + Other (InkPresenterStencilKind_Other) = 0, Ruler (InkPresenterStencilKind_Ruler) = 1, + }} + DEFINE_IID!(IID_IInkStrokesCollectedEventArgs, 3304321577, 6456, 18780, 180, 217, 109, 228, 176, 141, 72, 17); + RT_INTERFACE!{interface IInkStrokesCollectedEventArgs(IInkStrokesCollectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInkStrokesCollectedEventArgs] { + fn get_Strokes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IInkStrokesCollectedEventArgs { + #[inline] pub unsafe fn get_strokes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Strokes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkStrokesErasedEventArgs, 2753653282, 5379, 20159, 143, 245, 45, 232, 69, 132, 168, 170); + RT_INTERFACE!{interface IInkStrokesErasedEventArgs(IInkStrokesErasedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInkStrokesErasedEventArgs] { + fn get_Strokes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IInkStrokesErasedEventArgs { + #[inline] pub unsafe fn get_strokes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Strokes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkPresenter, 2795204834, 34939, 17807, 177, 115, 79, 228, 67, 137, 48, 163); + RT_INTERFACE!{interface IInkPresenter(IInkPresenterVtbl): IInspectable(IInspectableVtbl) [IID_IInkPresenter] { + fn get_IsInputEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsInputEnabled(&mut self, value: bool) -> HRESULT, + fn get_InputDeviceTypes(&mut self, out: *mut super::super::core::CoreInputDeviceTypes) -> HRESULT, + fn put_InputDeviceTypes(&mut self, value: super::super::core::CoreInputDeviceTypes) -> HRESULT, + fn get_UnprocessedInput(&mut self, out: *mut *mut InkUnprocessedInput) -> HRESULT, + fn get_StrokeInput(&mut self, out: *mut *mut InkStrokeInput) -> HRESULT, + fn get_InputProcessingConfiguration(&mut self, out: *mut *mut InkInputProcessingConfiguration) -> HRESULT, + fn get_StrokeContainer(&mut self, out: *mut *mut InkStrokeContainer) -> HRESULT, + fn put_StrokeContainer(&mut self, value: *mut InkStrokeContainer) -> HRESULT, + fn CopyDefaultDrawingAttributes(&mut self, out: *mut *mut InkDrawingAttributes) -> HRESULT, + fn UpdateDefaultDrawingAttributes(&mut self, value: *mut InkDrawingAttributes) -> HRESULT, + fn ActivateCustomDrying(&mut self, out: *mut *mut InkSynchronizer) -> HRESULT, + fn SetPredefinedConfiguration(&mut self, value: InkPresenterPredefinedConfiguration) -> HRESULT, + fn add_StrokesCollected(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokesCollected(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_StrokesErased(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokesErased(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IInkPresenter { + #[inline] pub unsafe fn get_is_input_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInputEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_input_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsInputEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_device_types(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InputDeviceTypes)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_input_device_types(&mut self, value: super::super::core::CoreInputDeviceTypes) -> Result<()> { + let hr = ((*self.lpVtbl).put_InputDeviceTypes)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_unprocessed_input(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UnprocessedInput)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stroke_input(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StrokeInput)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_processing_configuration(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputProcessingConfiguration)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stroke_container(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StrokeContainer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_stroke_container(&mut self, value: &InkStrokeContainer) -> Result<()> { + let hr = ((*self.lpVtbl).put_StrokeContainer)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn copy_default_drawing_attributes(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CopyDefaultDrawingAttributes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_default_drawing_attributes(&mut self, value: &InkDrawingAttributes) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateDefaultDrawingAttributes)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn activate_custom_drying(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ActivateCustomDrying)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_predefined_configuration(&mut self, value: InkPresenterPredefinedConfiguration) -> Result<()> { + let hr = ((*self.lpVtbl).SetPredefinedConfiguration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_strokes_collected(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StrokesCollected)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_strokes_collected(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StrokesCollected)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_strokes_erased(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StrokesErased)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_strokes_erased(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StrokesErased)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class InkUnprocessedInput: IInkUnprocessedInput} + RT_CLASS!{class InkStrokeInput: IInkStrokeInput} + RT_CLASS!{class InkInputProcessingConfiguration: IInkInputProcessingConfiguration} + RT_CLASS!{class InkSynchronizer: IInkSynchronizer} + RT_CLASS!{class InkPresenter: IInkPresenter} + RT_CLASS!{class InkStrokesCollectedEventArgs: IInkStrokesCollectedEventArgs} + RT_CLASS!{class InkStrokesErasedEventArgs: IInkStrokesErasedEventArgs} + DEFINE_IID!(IID_IInkInputProcessingConfiguration, 662231134, 13258, 19206, 166, 211, 172, 57, 69, 17, 109, 55); + RT_INTERFACE!{interface IInkInputProcessingConfiguration(IInkInputProcessingConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IInkInputProcessingConfiguration] { + fn get_Mode(&mut self, out: *mut InkInputProcessingMode) -> HRESULT, + fn put_Mode(&mut self, value: InkInputProcessingMode) -> HRESULT, + fn get_RightDragAction(&mut self, out: *mut InkInputRightDragAction) -> HRESULT, + fn put_RightDragAction(&mut self, value: InkInputRightDragAction) -> HRESULT + }} + impl IInkInputProcessingConfiguration { + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mode(&mut self, value: InkInputProcessingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_right_drag_action(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RightDragAction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_right_drag_action(&mut self, value: InkInputRightDragAction) -> Result<()> { + let hr = ((*self.lpVtbl).put_RightDragAction)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkSynchronizer, 2610864480, 44699, 17913, 132, 7, 75, 73, 59, 22, 54, 97); + RT_INTERFACE!{interface IInkSynchronizer(IInkSynchronizerVtbl): IInspectable(IInspectableVtbl) [IID_IInkSynchronizer] { + fn BeginDry(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn EndDry(&mut self) -> HRESULT + }} + impl IInkSynchronizer { + #[inline] pub unsafe fn begin_dry(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).BeginDry)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn end_dry(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).EndDry)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkUnprocessedInput, 3678684640, 33688, 18721, 172, 59, 171, 151, 140, 91, 162, 86); + RT_INTERFACE!{interface IInkUnprocessedInput(IInkUnprocessedInputVtbl): IInspectable(IInspectableVtbl) [IID_IInkUnprocessedInput] { + fn add_PointerEntered(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerEntered(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerHovered(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerHovered(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerExited(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerExited(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerPressed(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerPressed(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerMoved(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerMoved(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerReleased(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerReleased(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerLost(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerLost(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_InkPresenter(&mut self, out: *mut *mut InkPresenter) -> HRESULT + }} + impl IInkUnprocessedInput { + #[inline] pub unsafe fn add_pointer_entered(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerEntered)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_entered(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerEntered)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_hovered(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerHovered)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_hovered(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerHovered)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_exited(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerExited)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_exited(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerExited)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_pressed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerPressed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_pressed(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerPressed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_moved(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerMoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_moved(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerMoved)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_released(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerReleased)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_released(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerReleased)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_lost(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerLost)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_lost(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerLost)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ink_presenter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InkPresenter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkStrokeInput, 3476029051, 24080, 17350, 160, 128, 136, 242, 110, 29, 198, 125); + RT_INTERFACE!{interface IInkStrokeInput(IInkStrokeInputVtbl): IInspectable(IInspectableVtbl) [IID_IInkStrokeInput] { + fn add_StrokeStarted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokeStarted(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_StrokeContinued(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokeContinued(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_StrokeEnded(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokeEnded(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_StrokeCanceled(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokeCanceled(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_InkPresenter(&mut self, out: *mut *mut InkPresenter) -> HRESULT + }} + impl IInkStrokeInput { + #[inline] pub unsafe fn add_stroke_started(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StrokeStarted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stroke_started(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StrokeStarted)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stroke_continued(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StrokeContinued)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stroke_continued(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StrokeContinued)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stroke_ended(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StrokeEnded)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stroke_ended(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StrokeEnded)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_stroke_canceled(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_StrokeCanceled)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_stroke_canceled(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_StrokeCanceled)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ink_presenter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InkPresenter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkPresenterStencil, 819015021, 15878, 19714, 177, 22, 39, 127, 181, 216, 173, 220); + RT_INTERFACE!{interface IInkPresenterStencil(IInkPresenterStencilVtbl): IInspectable(IInspectableVtbl) [IID_IInkPresenterStencil] { + fn get_Kind(&mut self, out: *mut InkPresenterStencilKind) -> HRESULT, + fn get_IsVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsVisible(&mut self, value: bool) -> HRESULT, + fn get_BackgroundColor(&mut self, out: *mut super::super::Color) -> HRESULT, + fn put_BackgroundColor(&mut self, value: super::super::Color) -> HRESULT, + fn get_ForegroundColor(&mut self, out: *mut super::super::Color) -> HRESULT, + fn put_ForegroundColor(&mut self, value: super::super::Color) -> HRESULT, + fn get_Transform(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT, + fn put_Transform(&mut self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT + }} + impl IInkPresenterStencil { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BackgroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_background_color(&mut self, value: super::super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_BackgroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ForegroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_foreground_color(&mut self, value: super::super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_ForegroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_transform(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Matrix3x2> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Transform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_transform(&mut self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> Result<()> { + let hr = ((*self.lpVtbl).put_Transform)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkPresenterRuler, 1826258266, 57031, 19927, 135, 122, 33, 51, 241, 131, 212, 138); + RT_INTERFACE!{interface IInkPresenterRuler(IInkPresenterRulerVtbl): IInspectable(IInspectableVtbl) [IID_IInkPresenterRuler] { + fn get_Length(&mut self, out: *mut f64) -> HRESULT, + fn put_Length(&mut self, value: f64) -> HRESULT, + fn get_Width(&mut self, out: *mut f64) -> HRESULT, + fn put_Width(&mut self, value: f64) -> HRESULT + }} + impl IInkPresenterRuler { + #[inline] pub unsafe fn get_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_length(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Length)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_width(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Width)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkPresenterRulerFactory, 875961323, 36865, 19019, 166, 144, 105, 219, 175, 99, 229, 1); + RT_INTERFACE!{static interface IInkPresenterRulerFactory(IInkPresenterRulerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IInkPresenterRulerFactory] { + fn Create(&mut self, inkPresenter: *mut InkPresenter, out: *mut *mut InkPresenterRuler) -> HRESULT + }} + impl IInkPresenterRulerFactory { + #[inline] pub unsafe fn create(&mut self, inkPresenter: &InkPresenter) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, inkPresenter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InkPresenterRuler: IInkPresenterRuler [IInkPresenterRulerFactory] [CLSID_InkPresenterRuler]} + DEFINE_CLSID!(CLSID_InkPresenterRuler = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,73,110,107,105,110,103,46,73,110,107,80,114,101,115,101,110,116,101,114,82,117,108,101,114,0]); + RT_ENUM! { enum InkManipulationMode: i32 { + Inking (InkManipulationMode_Inking) = 0, Erasing (InkManipulationMode_Erasing) = 1, Selecting (InkManipulationMode_Selecting) = 2, + }} + RT_ENUM! { enum InkRecognitionTarget: i32 { + All (InkRecognitionTarget_All) = 0, Selected (InkRecognitionTarget_Selected) = 1, Recent (InkRecognitionTarget_Recent) = 2, + }} + RT_ENUM! { enum PenTipShape: i32 { + Circle (PenTipShape_Circle) = 0, Rectangle (PenTipShape_Rectangle) = 1, + }} + DEFINE_IID!(IID_IInkPoint, 2676434731, 34188, 18085, 155, 65, 209, 149, 151, 4, 89, 253); + RT_INTERFACE!{interface IInkPoint(IInkPointVtbl): IInspectable(IInspectableVtbl) [IID_IInkPoint] { + fn get_Position(&mut self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn get_Pressure(&mut self, out: *mut f32) -> HRESULT + }} + impl IInkPoint { + #[inline] pub unsafe fn get_position(&mut self) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pressure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Pressure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkPointFactory, 702928156, 51599, 16477, 159, 59, 229, 62, 49, 6, 141, 77); + RT_INTERFACE!{static interface IInkPointFactory(IInkPointFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IInkPointFactory] { + fn CreateInkPoint(&mut self, position: ::rt::gen::windows::foundation::Point, pressure: f32, out: *mut *mut InkPoint) -> HRESULT + }} + impl IInkPointFactory { + #[inline] pub unsafe fn create_ink_point(&mut self, position: ::rt::gen::windows::foundation::Point, pressure: f32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInkPoint)(self, position, pressure, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InkPoint: IInkPoint [IInkPointFactory] [CLSID_InkPoint]} + DEFINE_CLSID!(CLSID_InkPoint = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,73,110,107,105,110,103,46,73,110,107,80,111,105,110,116,0]); + DEFINE_IID!(IID_IInkDrawingAttributes, 2543982444, 26484, 18605, 132, 240, 72, 245, 169, 190, 116, 249); + RT_INTERFACE!{interface IInkDrawingAttributes(IInkDrawingAttributesVtbl): IInspectable(IInspectableVtbl) [IID_IInkDrawingAttributes] { + fn get_Color(&mut self, out: *mut super::super::Color) -> HRESULT, + fn put_Color(&mut self, value: super::super::Color) -> HRESULT, + fn get_PenTip(&mut self, out: *mut PenTipShape) -> HRESULT, + fn put_PenTip(&mut self, value: PenTipShape) -> HRESULT, + fn get_Size(&mut self, out: *mut ::rt::gen::windows::foundation::Size) -> HRESULT, + fn put_Size(&mut self, value: ::rt::gen::windows::foundation::Size) -> HRESULT, + fn get_IgnorePressure(&mut self, out: *mut bool) -> HRESULT, + fn put_IgnorePressure(&mut self, value: bool) -> HRESULT, + fn get_FitToCurve(&mut self, out: *mut bool) -> HRESULT, + fn put_FitToCurve(&mut self, value: bool) -> HRESULT + }} + impl IInkDrawingAttributes { + #[inline] pub unsafe fn get_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_color(&mut self, value: super::super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_Color)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pen_tip(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PenTip)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_pen_tip(&mut self, value: PenTipShape) -> Result<()> { + let hr = ((*self.lpVtbl).put_PenTip)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_size(&mut self) -> Result<::rt::gen::windows::foundation::Size> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_size(&mut self, value: ::rt::gen::windows::foundation::Size) -> Result<()> { + let hr = ((*self.lpVtbl).put_Size)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ignore_pressure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IgnorePressure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_ignore_pressure(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IgnorePressure)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_fit_to_curve(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FitToCurve)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_fit_to_curve(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_FitToCurve)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkDrawingAttributes2, 2091607304, 36548, 17149, 165, 165, 228, 183, 209, 213, 49, 109); + RT_INTERFACE!{interface IInkDrawingAttributes2(IInkDrawingAttributes2Vtbl): IInspectable(IInspectableVtbl) [IID_IInkDrawingAttributes2] { + fn get_PenTipTransform(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT, + fn put_PenTipTransform(&mut self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT, + fn get_DrawAsHighlighter(&mut self, out: *mut bool) -> HRESULT, + fn put_DrawAsHighlighter(&mut self, value: bool) -> HRESULT + }} + impl IInkDrawingAttributes2 { + #[inline] pub unsafe fn get_pen_tip_transform(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Matrix3x2> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PenTipTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_pen_tip_transform(&mut self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> Result<()> { + let hr = ((*self.lpVtbl).put_PenTipTransform)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_draw_as_highlighter(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DrawAsHighlighter)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_draw_as_highlighter(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_DrawAsHighlighter)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum InkDrawingAttributesKind: i32 { + Default (InkDrawingAttributesKind_Default) = 0, Pencil (InkDrawingAttributesKind_Pencil) = 1, + }} + DEFINE_IID!(IID_IInkDrawingAttributesPencilProperties, 1327838411, 11654, 16827, 176, 232, 228, 194, 160, 37, 60, 82); + RT_INTERFACE!{interface IInkDrawingAttributesPencilProperties(IInkDrawingAttributesPencilPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IInkDrawingAttributesPencilProperties] { + fn get_Opacity(&mut self, out: *mut f64) -> HRESULT, + fn put_Opacity(&mut self, value: f64) -> HRESULT + }} + impl IInkDrawingAttributesPencilProperties { + #[inline] pub unsafe fn get_opacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Opacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_opacity(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Opacity)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class InkDrawingAttributesPencilProperties: IInkDrawingAttributesPencilProperties} + DEFINE_IID!(IID_IInkDrawingAttributes3, 1912733698, 32091, 18064, 138, 244, 230, 100, 203, 226, 183, 79); + RT_INTERFACE!{interface IInkDrawingAttributes3(IInkDrawingAttributes3Vtbl): IInspectable(IInspectableVtbl) [IID_IInkDrawingAttributes3] { + fn get_Kind(&mut self, out: *mut InkDrawingAttributesKind) -> HRESULT, + fn get_PencilProperties(&mut self, out: *mut *mut InkDrawingAttributesPencilProperties) -> HRESULT + }} + impl IInkDrawingAttributes3 { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pencil_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PencilProperties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkDrawingAttributesStatics, 4147241023, 6757, 18530, 150, 203, 110, 22, 101, 225, 127, 109); + RT_INTERFACE!{static interface IInkDrawingAttributesStatics(IInkDrawingAttributesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IInkDrawingAttributesStatics] { + fn CreateForPencil(&mut self, out: *mut *mut InkDrawingAttributes) -> HRESULT + }} + impl IInkDrawingAttributesStatics { + #[inline] pub unsafe fn create_for_pencil(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateForPencil)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InkDrawingAttributes: IInkDrawingAttributes} + RT_ACTIVATABLE!{IInkDrawingAttributesStatics [CLSID_InkDrawingAttributes]} + DEFINE_CLSID!(CLSID_InkDrawingAttributes = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,73,110,107,105,110,103,46,73,110,107,68,114,97,119,105,110,103,65,116,116,114,105,98,117,116,101,115,0]); + DEFINE_IID!(IID_IInkStrokeRenderingSegment, 1750142751, 35043, 18298, 162, 250, 86, 159, 95, 31, 155, 213); + RT_INTERFACE!{interface IInkStrokeRenderingSegment(IInkStrokeRenderingSegmentVtbl): IInspectable(IInspectableVtbl) [IID_IInkStrokeRenderingSegment] { + fn get_Position(&mut self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn get_BezierControlPoint1(&mut self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn get_BezierControlPoint2(&mut self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn get_Pressure(&mut self, out: *mut f32) -> HRESULT, + fn get_TiltX(&mut self, out: *mut f32) -> HRESULT, + fn get_TiltY(&mut self, out: *mut f32) -> HRESULT, + fn get_Twist(&mut self, out: *mut f32) -> HRESULT + }} + impl IInkStrokeRenderingSegment { + #[inline] pub unsafe fn get_position(&mut self) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bezier_control_point1(&mut self) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BezierControlPoint1)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bezier_control_point2(&mut self) -> Result<::rt::gen::windows::foundation::Point> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BezierControlPoint2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_pressure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Pressure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tilt_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TiltX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_tilt_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TiltY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_twist(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Twist)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class InkStrokeRenderingSegment: IInkStrokeRenderingSegment} + DEFINE_IID!(IID_IInkStroke, 353652064, 52451, 20431, 157, 82, 17, 81, 138, 182, 175, 212); + RT_INTERFACE!{interface IInkStroke(IInkStrokeVtbl): IInspectable(IInspectableVtbl) [IID_IInkStroke] { + fn get_DrawingAttributes(&mut self, out: *mut *mut InkDrawingAttributes) -> HRESULT, + fn put_DrawingAttributes(&mut self, value: *mut InkDrawingAttributes) -> HRESULT, + fn get_BoundingRect(&mut self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn get_Selected(&mut self, out: *mut bool) -> HRESULT, + fn put_Selected(&mut self, value: bool) -> HRESULT, + fn get_Recognized(&mut self, out: *mut bool) -> HRESULT, + fn GetRenderingSegments(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn Clone(&mut self, out: *mut *mut InkStroke) -> HRESULT + }} + impl IInkStroke { + #[inline] pub unsafe fn get_drawing_attributes(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DrawingAttributes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_drawing_attributes(&mut self, value: &InkDrawingAttributes) -> Result<()> { + let hr = ((*self.lpVtbl).put_DrawingAttributes)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bounding_rect(&mut self) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BoundingRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Selected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_selected(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Selected)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_recognized(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Recognized)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_rendering_segments(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRenderingSegments)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clone(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Clone)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InkStroke: IInkStroke} + DEFINE_IID!(IID_IInkStroke2, 1572463860, 47866, 19937, 137, 211, 32, 27, 30, 215, 216, 155); + RT_INTERFACE!{interface IInkStroke2(IInkStroke2Vtbl): IInspectable(IInspectableVtbl) [IID_IInkStroke2] { + fn get_PointTransform(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT, + fn put_PointTransform(&mut self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT, + fn GetInkPoints(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IInkStroke2 { + #[inline] pub unsafe fn get_point_transform(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Matrix3x2> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointTransform)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_point_transform(&mut self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> Result<()> { + let hr = ((*self.lpVtbl).put_PointTransform)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ink_points(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetInkPoints)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkStrokeBuilder, 2193347036, 7267, 16860, 158, 7, 75, 74, 112, 206, 216, 1); + RT_INTERFACE!{interface IInkStrokeBuilder(IInkStrokeBuilderVtbl): IInspectable(IInspectableVtbl) [IID_IInkStrokeBuilder] { + fn BeginStroke(&mut self, pointerPoint: *mut super::PointerPoint) -> HRESULT, + fn AppendToStroke(&mut self, pointerPoint: *mut super::PointerPoint, out: *mut *mut super::PointerPoint) -> HRESULT, + fn EndStroke(&mut self, pointerPoint: *mut super::PointerPoint, out: *mut *mut InkStroke) -> HRESULT, + fn CreateStroke(&mut self, points: *mut ::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::foundation::Point>, out: *mut *mut InkStroke) -> HRESULT, + fn SetDefaultDrawingAttributes(&mut self, drawingAttributes: *mut InkDrawingAttributes) -> HRESULT + }} + impl IInkStrokeBuilder { + #[inline] pub unsafe fn begin_stroke(&mut self, pointerPoint: &super::PointerPoint) -> Result<()> { + let hr = ((*self.lpVtbl).BeginStroke)(self, pointerPoint as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn append_to_stroke(&mut self, pointerPoint: &super::PointerPoint) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).AppendToStroke)(self, pointerPoint as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn end_stroke(&mut self, pointerPoint: &super::PointerPoint) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).EndStroke)(self, pointerPoint as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_stroke(&mut self, points: &::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::foundation::Point>) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStroke)(self, points as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_drawing_attributes(&mut self, drawingAttributes: &InkDrawingAttributes) -> Result<()> { + let hr = ((*self.lpVtbl).SetDefaultDrawingAttributes)(self, drawingAttributes as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkStrokeBuilder2, 3179461671, 29471, 19644, 187, 191, 109, 70, 128, 68, 241, 229); + RT_INTERFACE!{interface IInkStrokeBuilder2(IInkStrokeBuilder2Vtbl): IInspectable(IInspectableVtbl) [IID_IInkStrokeBuilder2] { + fn CreateStrokeFromInkPoints(&mut self, inkPoints: *mut ::rt::gen::windows::foundation::collections::IIterable, transform: ::rt::gen::windows::foundation::numerics::Matrix3x2, out: *mut *mut InkStroke) -> HRESULT + }} + impl IInkStrokeBuilder2 { + #[inline] pub unsafe fn create_stroke_from_ink_points(&mut self, inkPoints: &::rt::gen::windows::foundation::collections::IIterable, transform: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStrokeFromInkPoints)(self, inkPoints as *const _ as *mut _, transform, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InkStrokeBuilder: IInkStrokeBuilder} + DEFINE_IID!(IID_IInkRecognitionResult, 910563988, 20584, 16623, 138, 5, 44, 47, 182, 9, 8, 162); + RT_INTERFACE!{interface IInkRecognitionResult(IInkRecognitionResultVtbl): IInspectable(IInspectableVtbl) [IID_IInkRecognitionResult] { + fn get_BoundingRect(&mut self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn GetTextCandidates(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetStrokes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IInkRecognitionResult { + #[inline] pub unsafe fn get_bounding_rect(&mut self) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BoundingRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_candidates(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTextCandidates)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_strokes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStrokes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InkRecognitionResult: IInkRecognitionResult} + DEFINE_IID!(IID_IInkStrokeContainer, 581749702, 64169, 20244, 182, 140, 246, 206, 230, 112, 174, 22); + RT_INTERFACE!{interface IInkStrokeContainer(IInkStrokeContainerVtbl): IInspectable(IInspectableVtbl) [IID_IInkStrokeContainer] { + fn get_BoundingRect(&mut self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn AddStroke(&mut self, stroke: *mut InkStroke) -> HRESULT, + fn DeleteSelected(&mut self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn MoveSelected(&mut self, translation: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn SelectWithPolyLine(&mut self, polyline: *mut ::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::foundation::Point>, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn SelectWithLine(&mut self, from: ::rt::gen::windows::foundation::Point, to: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn CopySelectedToClipboard(&mut self) -> HRESULT, + fn PasteFromClipboard(&mut self, position: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn CanPasteFromClipboard(&mut self, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.storage")] fn LoadAsync(&mut self, inputStream: *mut ::rt::gen::windows::storage::streams::IInputStream, out: *mut *mut ::rt::gen::windows::foundation::IAsyncActionWithProgress) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SaveAsync(&mut self, outputStream: *mut ::rt::gen::windows::storage::streams::IOutputStream, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn UpdateRecognitionResults(&mut self, recognitionResults: *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetStrokes(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetRecognitionResults(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IInkStrokeContainer { + #[inline] pub unsafe fn get_bounding_rect(&mut self) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BoundingRect)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_stroke(&mut self, stroke: &InkStroke) -> Result<()> { + let hr = ((*self.lpVtbl).AddStroke)(self, stroke as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn delete_selected(&mut self) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).DeleteSelected)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn move_selected(&mut self, translation: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).MoveSelected)(self, translation, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn select_with_poly_line(&mut self, polyline: &::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::foundation::Point>) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).SelectWithPolyLine)(self, polyline as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn select_with_line(&mut self, from: ::rt::gen::windows::foundation::Point, to: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).SelectWithLine)(self, from, to, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn copy_selected_to_clipboard(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).CopySelectedToClipboard)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn paste_from_clipboard(&mut self, position: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).PasteFromClipboard)(self, position, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn can_paste_from_clipboard(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanPasteFromClipboard)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_async(&mut self, inputStream: &::rt::gen::windows::storage::streams::IInputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadAsync)(self, inputStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn save_async(&mut self, outputStream: &::rt::gen::windows::storage::streams::IOutputStream) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAsync)(self, outputStream as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_recognition_results(&mut self, recognitionResults: &::rt::gen::windows::foundation::collections::IVectorView) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateRecognitionResults)(self, recognitionResults as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_strokes(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetStrokes)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_recognition_results(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRecognitionResults)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInkStrokeContainer2, 2298598244, 55862, 19407, 158, 92, 209, 149, 130, 89, 149, 180); + RT_INTERFACE!{interface IInkStrokeContainer2(IInkStrokeContainer2Vtbl): IInspectable(IInspectableVtbl) [IID_IInkStrokeContainer2] { + fn AddStrokes(&mut self, strokes: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn Clear(&mut self) -> HRESULT + }} + impl IInkStrokeContainer2 { + #[inline] pub unsafe fn add_strokes(&mut self, strokes: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).AddStrokes)(self, strokes as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class InkStrokeContainer: IInkStrokeContainer} + DEFINE_IID!(IID_IInkRecognizer, 125619875, 36941, 17450, 177, 81, 170, 202, 54, 49, 196, 59); + RT_INTERFACE!{interface IInkRecognizer(IInkRecognizerVtbl): IInspectable(IInspectableVtbl) [IID_IInkRecognizer] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IInkRecognizer { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InkRecognizer: IInkRecognizer} + DEFINE_IID!(IID_IInkRecognizerContainer, 2806880817, 32839, 18072, 169, 18, 248, 42, 80, 133, 1, 47); + RT_INTERFACE!{interface IInkRecognizerContainer(IInkRecognizerContainerVtbl): IInspectable(IInspectableVtbl) [IID_IInkRecognizerContainer] { + fn SetDefaultRecognizer(&mut self, recognizer: *mut InkRecognizer) -> HRESULT, + fn RecognizeAsync(&mut self, strokeCollection: *mut InkStrokeContainer, recognitionTarget: InkRecognitionTarget, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn GetRecognizers(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + }} + impl IInkRecognizerContainer { + #[inline] pub unsafe fn set_default_recognizer(&mut self, recognizer: &InkRecognizer) -> Result<()> { + let hr = ((*self.lpVtbl).SetDefaultRecognizer)(self, recognizer as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn recognize_async(&mut self, strokeCollection: &InkStrokeContainer, recognitionTarget: InkRecognitionTarget) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RecognizeAsync)(self, strokeCollection as *const _ as *mut _, recognitionTarget, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_recognizers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRecognizers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InkRecognizerContainer: IInkRecognizerContainer} + DEFINE_IID!(IID_IInkManager, 1195668349, 26395, 16739, 156, 149, 78, 141, 122, 3, 95, 225); + RT_INTERFACE!{interface IInkManager(IInkManagerVtbl): IInspectable(IInspectableVtbl) [IID_IInkManager] { + fn get_Mode(&mut self, out: *mut InkManipulationMode) -> HRESULT, + fn put_Mode(&mut self, value: InkManipulationMode) -> HRESULT, + fn ProcessPointerDown(&mut self, pointerPoint: *mut super::PointerPoint) -> HRESULT, + fn ProcessPointerUpdate(&mut self, pointerPoint: *mut super::PointerPoint, out: *mut *mut IInspectable) -> HRESULT, + fn ProcessPointerUp(&mut self, pointerPoint: *mut super::PointerPoint, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn SetDefaultDrawingAttributes(&mut self, drawingAttributes: *mut InkDrawingAttributes) -> HRESULT, + fn RecognizeAsync2(&mut self, recognitionTarget: InkRecognitionTarget, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + }} + impl IInkManager { + #[inline] pub unsafe fn get_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Mode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mode(&mut self, value: InkManipulationMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn process_pointer_down(&mut self, pointerPoint: &super::PointerPoint) -> Result<()> { + let hr = ((*self.lpVtbl).ProcessPointerDown)(self, pointerPoint as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn process_pointer_update(&mut self, pointerPoint: &super::PointerPoint) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ProcessPointerUpdate)(self, pointerPoint as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn process_pointer_up(&mut self, pointerPoint: &super::PointerPoint) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ProcessPointerUp)(self, pointerPoint as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_drawing_attributes(&mut self, drawingAttributes: &InkDrawingAttributes) -> Result<()> { + let hr = ((*self.lpVtbl).SetDefaultDrawingAttributes)(self, drawingAttributes as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn recognize_async2(&mut self, recognitionTarget: InkRecognitionTarget) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RecognizeAsync2)(self, recognitionTarget, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InkManager: IInkManager} +pub mod core { // Windows.UI.Input.Inking.Core +use ::prelude::*; + DEFINE_IID!(IID_ICoreInkIndependentInputSource, 968068521, 30265, 17561, 165, 181, 25, 29, 0, 227, 91, 22); + RT_INTERFACE!{interface ICoreInkIndependentInputSource(ICoreInkIndependentInputSourceVtbl): IInspectable(IInspectableVtbl) [IID_ICoreInkIndependentInputSource] { + fn add_PointerEntering(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerEntering(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerHovering(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerHovering(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerExiting(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerExiting(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerPressing(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerPressing(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerMoving(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerMoving(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerReleasing(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerReleasing(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerLost(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerLost(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_InkPresenter(&mut self, out: *mut *mut super::InkPresenter) -> HRESULT + }} + impl ICoreInkIndependentInputSource { + #[inline] pub unsafe fn add_pointer_entering(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerEntering)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_entering(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerEntering)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_hovering(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerHovering)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_hovering(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerHovering)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_exiting(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerExiting)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_exiting(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerExiting)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_pressing(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerPressing)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_pressing(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerPressing)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_moving(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerMoving)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_moving(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerMoving)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_releasing(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerReleasing)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_releasing(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerReleasing)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_lost(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerLost)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_lost(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerLost)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ink_presenter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InkPresenter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CoreInkIndependentInputSource: ICoreInkIndependentInputSource} + RT_ACTIVATABLE!{ICoreInkIndependentInputSourceStatics [CLSID_CoreInkIndependentInputSource]} + DEFINE_CLSID!(CLSID_CoreInkIndependentInputSource = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,73,110,107,105,110,103,46,67,111,114,101,46,67,111,114,101,73,110,107,73,110,100,101,112,101,110,100,101,110,116,73,110,112,117,116,83,111,117,114,99,101,0]); + DEFINE_IID!(IID_ICoreInkIndependentInputSourceStatics, 1944453403, 32960, 19963, 155, 102, 16, 186, 127, 63, 156, 132); + RT_INTERFACE!{static interface ICoreInkIndependentInputSourceStatics(ICoreInkIndependentInputSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreInkIndependentInputSourceStatics] { + fn Create(&mut self, inkPresenter: *mut super::InkPresenter, out: *mut *mut CoreInkIndependentInputSource) -> HRESULT + }} + impl ICoreInkIndependentInputSourceStatics { + #[inline] pub unsafe fn create(&mut self, inkPresenter: &super::InkPresenter) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, inkPresenter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_ENUM! { enum CoreWetStrokeDisposition: i32 { + Inking (CoreWetStrokeDisposition_Inking) = 0, Completed (CoreWetStrokeDisposition_Completed) = 1, Canceled (CoreWetStrokeDisposition_Canceled) = 2, + }} + DEFINE_IID!(IID_ICoreWetStrokeUpdateEventArgs, 4211593548, 13184, 17786, 169, 135, 153, 19, 87, 137, 108, 27); + RT_INTERFACE!{interface ICoreWetStrokeUpdateEventArgs(ICoreWetStrokeUpdateEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWetStrokeUpdateEventArgs] { + fn get_NewInkPoints(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_PointerId(&mut self, out: *mut u32) -> HRESULT, + fn get_Disposition(&mut self, out: *mut CoreWetStrokeDisposition) -> HRESULT, + fn put_Disposition(&mut self, value: CoreWetStrokeDisposition) -> HRESULT + }} + impl ICoreWetStrokeUpdateEventArgs { + #[inline] pub unsafe fn get_new_ink_points(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NewInkPoints)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_disposition(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Disposition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_disposition(&mut self, value: CoreWetStrokeDisposition) -> Result<()> { + let hr = ((*self.lpVtbl).put_Disposition)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CoreWetStrokeUpdateEventArgs: ICoreWetStrokeUpdateEventArgs} + DEFINE_IID!(IID_ICoreWetStrokeUpdateSource, 527535650, 61010, 19968, 130, 9, 76, 62, 91, 33, 163, 204); + RT_INTERFACE!{interface ICoreWetStrokeUpdateSource(ICoreWetStrokeUpdateSourceVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWetStrokeUpdateSource] { + fn add_WetStrokeStarting(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_WetStrokeStarting(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_WetStrokeContinuing(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_WetStrokeContinuing(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_WetStrokeStopping(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_WetStrokeStopping(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_WetStrokeCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_WetStrokeCompleted(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_WetStrokeCanceled(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_WetStrokeCanceled(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_InkPresenter(&mut self, out: *mut *mut super::InkPresenter) -> HRESULT + }} + impl ICoreWetStrokeUpdateSource { + #[inline] pub unsafe fn add_wet_stroke_starting(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_WetStrokeStarting)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_wet_stroke_starting(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_WetStrokeStarting)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_wet_stroke_continuing(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_WetStrokeContinuing)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_wet_stroke_continuing(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_WetStrokeContinuing)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_wet_stroke_stopping(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_WetStrokeStopping)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_wet_stroke_stopping(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_WetStrokeStopping)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_wet_stroke_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_WetStrokeCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_wet_stroke_completed(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_WetStrokeCompleted)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_wet_stroke_canceled(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_WetStrokeCanceled)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_wet_stroke_canceled(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_WetStrokeCanceled)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_ink_presenter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InkPresenter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CoreWetStrokeUpdateSource: ICoreWetStrokeUpdateSource} + RT_ACTIVATABLE!{ICoreWetStrokeUpdateSourceStatics [CLSID_CoreWetStrokeUpdateSource]} + DEFINE_CLSID!(CLSID_CoreWetStrokeUpdateSource = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,73,110,107,105,110,103,46,67,111,114,101,46,67,111,114,101,87,101,116,83,116,114,111,107,101,85,112,100,97,116,101,83,111,117,114,99,101,0]); + DEFINE_IID!(IID_ICoreWetStrokeUpdateSourceStatics, 1034788026, 7485, 18094, 171, 157, 134, 71, 72, 108, 111, 144); + RT_INTERFACE!{static interface ICoreWetStrokeUpdateSourceStatics(ICoreWetStrokeUpdateSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWetStrokeUpdateSourceStatics] { + fn Create(&mut self, inkPresenter: *mut super::InkPresenter, out: *mut *mut CoreWetStrokeUpdateSource) -> HRESULT + }} + impl ICoreWetStrokeUpdateSourceStatics { + #[inline] pub unsafe fn create(&mut self, inkPresenter: &super::InkPresenter) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, inkPresenter as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } +} // Windows.UI.Input.Inking.Core +} // Windows.UI.Input.Inking +pub mod preview { // Windows.UI.Input.Preview +pub mod injection { // Windows.UI.Input.Preview.Injection +use ::prelude::*; + RT_ENUM! { enum InjectedInputTouchParameters: u32 { + None (InjectedInputTouchParameters_None) = 0, Contact (InjectedInputTouchParameters_Contact) = 1, Orientation (InjectedInputTouchParameters_Orientation) = 2, Pressure (InjectedInputTouchParameters_Pressure) = 4, + }} + RT_ENUM! { enum InjectedInputPointerOptions: u32 { + None (InjectedInputPointerOptions_None) = 0, New (InjectedInputPointerOptions_New) = 1, InRange (InjectedInputPointerOptions_InRange) = 2, InContact (InjectedInputPointerOptions_InContact) = 4, FirstButton (InjectedInputPointerOptions_FirstButton) = 16, SecondButton (InjectedInputPointerOptions_SecondButton) = 32, Primary (InjectedInputPointerOptions_Primary) = 8192, Confidence (InjectedInputPointerOptions_Confidence) = 16384, Canceled (InjectedInputPointerOptions_Canceled) = 32768, PointerDown (InjectedInputPointerOptions_PointerDown) = 65536, Update (InjectedInputPointerOptions_Update) = 131072, PointerUp (InjectedInputPointerOptions_PointerUp) = 262144, CaptureChanged (InjectedInputPointerOptions_CaptureChanged) = 2097152, + }} + RT_ENUM! { enum InjectedInputButtonChangeKind: i32 { + None (InjectedInputButtonChangeKind_None) = 0, FirstButtonDown (InjectedInputButtonChangeKind_FirstButtonDown) = 1, FirstButtonUp (InjectedInputButtonChangeKind_FirstButtonUp) = 2, SecondButtonDown (InjectedInputButtonChangeKind_SecondButtonDown) = 3, SecondButtonUp (InjectedInputButtonChangeKind_SecondButtonUp) = 4, ThirdButtonDown (InjectedInputButtonChangeKind_ThirdButtonDown) = 5, ThirdButtonUp (InjectedInputButtonChangeKind_ThirdButtonUp) = 6, FourthButtonDown (InjectedInputButtonChangeKind_FourthButtonDown) = 7, FourthButtonUp (InjectedInputButtonChangeKind_FourthButtonUp) = 8, FifthButtonDown (InjectedInputButtonChangeKind_FifthButtonDown) = 9, FifthButtonUp (InjectedInputButtonChangeKind_FifthButtonUp) = 10, + }} + RT_ENUM! { enum InjectedInputPenButtons: u32 { + None (InjectedInputPenButtons_None) = 0, Barrel (InjectedInputPenButtons_Barrel) = 1, Inverted (InjectedInputPenButtons_Inverted) = 2, Eraser (InjectedInputPenButtons_Eraser) = 4, + }} + RT_ENUM! { enum InjectedInputPenParameters: u32 { + None (InjectedInputPenParameters_None) = 0, Pressure (InjectedInputPenParameters_Pressure) = 1, Rotation (InjectedInputPenParameters_Rotation) = 2, TiltX (InjectedInputPenParameters_TiltX) = 4, TiltY (InjectedInputPenParameters_TiltY) = 8, + }} + RT_ENUM! { enum InjectedInputMouseOptions: u32 { + None (InjectedInputMouseOptions_None) = 0, Move (InjectedInputMouseOptions_Move) = 1, LeftDown (InjectedInputMouseOptions_LeftDown) = 2, LeftUp (InjectedInputMouseOptions_LeftUp) = 4, RightDown (InjectedInputMouseOptions_RightDown) = 8, RightUp (InjectedInputMouseOptions_RightUp) = 16, MiddleDown (InjectedInputMouseOptions_MiddleDown) = 32, MiddleUp (InjectedInputMouseOptions_MiddleUp) = 64, XDown (InjectedInputMouseOptions_XDown) = 128, XUp (InjectedInputMouseOptions_XUp) = 256, Wheel (InjectedInputMouseOptions_Wheel) = 2048, HWheel (InjectedInputMouseOptions_HWheel) = 4096, MoveNoCoalesce (InjectedInputMouseOptions_MoveNoCoalesce) = 8192, VirtualDesk (InjectedInputMouseOptions_VirtualDesk) = 16384, Absolute (InjectedInputMouseOptions_Absolute) = 32768, + }} + RT_ENUM! { enum InjectedInputKeyOptions: u32 { + None (InjectedInputKeyOptions_None) = 0, ExtendedKey (InjectedInputKeyOptions_ExtendedKey) = 1, KeyUp (InjectedInputKeyOptions_KeyUp) = 2, ScanCode (InjectedInputKeyOptions_ScanCode) = 8, Unicode (InjectedInputKeyOptions_Unicode) = 4, + }} + RT_ENUM! { enum InjectedInputShortcut: i32 { + Back (InjectedInputShortcut_Back) = 0, Start (InjectedInputShortcut_Start) = 1, Search (InjectedInputShortcut_Search) = 2, + }} + RT_ENUM! { enum InjectedInputVisualizationMode: i32 { + None (InjectedInputVisualizationMode_None) = 0, Default (InjectedInputVisualizationMode_Default) = 1, Indirect (InjectedInputVisualizationMode_Indirect) = 2, + }} + RT_STRUCT! { struct InjectedInputRectangle { + Left: i32, Top: i32, Bottom: i32, Right: i32, + }} + RT_STRUCT! { struct InjectedInputPoint { + PositionX: i32, PositionY: i32, + }} + RT_STRUCT! { struct InjectedInputPointerInfo { + PointerId: u32, PointerOptions: InjectedInputPointerOptions, PixelLocation: InjectedInputPoint, TimeOffsetInMilliseconds: u32, PerformanceCount: u64, + }} + DEFINE_IID!(IID_IInjectedInputTouchInfo, 575656415, 17384, 24309, 81, 10, 105, 202, 140, 155, 76, 40); + RT_INTERFACE!{interface IInjectedInputTouchInfo(IInjectedInputTouchInfoVtbl): IInspectable(IInspectableVtbl) [IID_IInjectedInputTouchInfo] { + fn get_Contact(&mut self, out: *mut InjectedInputRectangle) -> HRESULT, + fn put_Contact(&mut self, value: InjectedInputRectangle) -> HRESULT, + fn get_Orientation(&mut self, out: *mut i32) -> HRESULT, + fn put_Orientation(&mut self, value: i32) -> HRESULT, + fn get_PointerInfo(&mut self, out: *mut InjectedInputPointerInfo) -> HRESULT, + fn put_PointerInfo(&mut self, value: InjectedInputPointerInfo) -> HRESULT, + fn get_Pressure(&mut self, out: *mut f64) -> HRESULT, + fn put_Pressure(&mut self, value: f64) -> HRESULT, + fn get_TouchParameters(&mut self, out: *mut InjectedInputTouchParameters) -> HRESULT, + fn put_TouchParameters(&mut self, value: InjectedInputTouchParameters) -> HRESULT + }} + impl IInjectedInputTouchInfo { + #[inline] pub unsafe fn get_contact(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Contact)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_contact(&mut self, value: InjectedInputRectangle) -> Result<()> { + let hr = ((*self.lpVtbl).put_Contact)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_orientation(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Orientation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_info(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerInfo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_pointer_info(&mut self, value: InjectedInputPointerInfo) -> Result<()> { + let hr = ((*self.lpVtbl).put_PointerInfo)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pressure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Pressure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_pressure(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Pressure)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_touch_parameters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TouchParameters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_touch_parameters(&mut self, value: InjectedInputTouchParameters) -> Result<()> { + let hr = ((*self.lpVtbl).put_TouchParameters)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInjectedInputPenInfo, 1799400707, 51742, 21799, 126, 2, 40, 40, 84, 11, 177, 212); + RT_INTERFACE!{interface IInjectedInputPenInfo(IInjectedInputPenInfoVtbl): IInspectable(IInspectableVtbl) [IID_IInjectedInputPenInfo] { + fn get_PointerInfo(&mut self, out: *mut InjectedInputPointerInfo) -> HRESULT, + fn put_PointerInfo(&mut self, value: InjectedInputPointerInfo) -> HRESULT, + fn get_PenButtons(&mut self, out: *mut InjectedInputPenButtons) -> HRESULT, + fn put_PenButtons(&mut self, value: InjectedInputPenButtons) -> HRESULT, + fn get_PenParameters(&mut self, out: *mut InjectedInputPenParameters) -> HRESULT, + fn put_PenParameters(&mut self, value: InjectedInputPenParameters) -> HRESULT, + fn get_Pressure(&mut self, out: *mut f64) -> HRESULT, + fn put_Pressure(&mut self, value: f64) -> HRESULT, + fn get_Rotation(&mut self, out: *mut f64) -> HRESULT, + fn put_Rotation(&mut self, value: f64) -> HRESULT, + fn get_TiltX(&mut self, out: *mut i32) -> HRESULT, + fn put_TiltX(&mut self, value: i32) -> HRESULT, + fn get_TiltY(&mut self, out: *mut i32) -> HRESULT, + fn put_TiltY(&mut self, value: i32) -> HRESULT + }} + impl IInjectedInputPenInfo { + #[inline] pub unsafe fn get_pointer_info(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PointerInfo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_pointer_info(&mut self, value: InjectedInputPointerInfo) -> Result<()> { + let hr = ((*self.lpVtbl).put_PointerInfo)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pen_buttons(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PenButtons)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_pen_buttons(&mut self, value: InjectedInputPenButtons) -> Result<()> { + let hr = ((*self.lpVtbl).put_PenButtons)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pen_parameters(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PenParameters)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_pen_parameters(&mut self, value: InjectedInputPenParameters) -> Result<()> { + let hr = ((*self.lpVtbl).put_PenParameters)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pressure(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Pressure)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_pressure(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Pressure)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Rotation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rotation(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Rotation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tilt_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TiltX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_tilt_x(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TiltX)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tilt_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TiltY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_tilt_y(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TiltY)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInjectedInputMouseInfo, 2532666987, 58490, 23796, 65, 141, 138, 95, 185, 103, 12, 125); + RT_INTERFACE!{interface IInjectedInputMouseInfo(IInjectedInputMouseInfoVtbl): IInspectable(IInspectableVtbl) [IID_IInjectedInputMouseInfo] { + fn get_MouseOptions(&mut self, out: *mut InjectedInputMouseOptions) -> HRESULT, + fn put_MouseOptions(&mut self, value: InjectedInputMouseOptions) -> HRESULT, + fn get_MouseData(&mut self, out: *mut u32) -> HRESULT, + fn put_MouseData(&mut self, value: u32) -> HRESULT, + fn get_DeltaY(&mut self, out: *mut i32) -> HRESULT, + fn put_DeltaY(&mut self, value: i32) -> HRESULT, + fn get_DeltaX(&mut self, out: *mut i32) -> HRESULT, + fn put_DeltaX(&mut self, value: i32) -> HRESULT, + fn get_TimeOffsetInMilliseconds(&mut self, out: *mut u32) -> HRESULT, + fn put_TimeOffsetInMilliseconds(&mut self, value: u32) -> HRESULT + }} + impl IInjectedInputMouseInfo { + #[inline] pub unsafe fn get_mouse_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MouseOptions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mouse_options(&mut self, value: InjectedInputMouseOptions) -> Result<()> { + let hr = ((*self.lpVtbl).put_MouseOptions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_mouse_data(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MouseData)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mouse_data(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MouseData)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_delta_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeltaY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_delta_y(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DeltaY)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_delta_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeltaX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_delta_x(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DeltaX)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_time_offset_in_milliseconds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TimeOffsetInMilliseconds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_time_offset_in_milliseconds(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TimeOffsetInMilliseconds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInjectedInputKeyboardInfo, 1262932288, 11114, 24570, 126, 174, 189, 7, 123, 5, 42, 205); + RT_INTERFACE!{interface IInjectedInputKeyboardInfo(IInjectedInputKeyboardInfoVtbl): IInspectable(IInspectableVtbl) [IID_IInjectedInputKeyboardInfo] { + fn get_KeyOptions(&mut self, out: *mut InjectedInputKeyOptions) -> HRESULT, + fn put_KeyOptions(&mut self, value: InjectedInputKeyOptions) -> HRESULT, + fn get_ScanCode(&mut self, out: *mut u16) -> HRESULT, + fn put_ScanCode(&mut self, value: u16) -> HRESULT, + fn get_VirtualKey(&mut self, out: *mut u16) -> HRESULT, + fn put_VirtualKey(&mut self, value: u16) -> HRESULT + }} + impl IInjectedInputKeyboardInfo { + #[inline] pub unsafe fn get_key_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyOptions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_key_options(&mut self, value: InjectedInputKeyOptions) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeyOptions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scan_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScanCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scan_code(&mut self, value: u16) -> Result<()> { + let hr = ((*self.lpVtbl).put_ScanCode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_virtual_key(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VirtualKey)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_virtual_key(&mut self, value: u16) -> Result<()> { + let hr = ((*self.lpVtbl).put_VirtualKey)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInputInjector, 2395107204, 2818, 19410, 173, 122, 61, 70, 88, 190, 62, 24); + RT_INTERFACE!{interface IInputInjector(IInputInjectorVtbl): IInspectable(IInspectableVtbl) [IID_IInputInjector] { + fn InjectKeyboardInput(&mut self, input: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn InjectMouseInput(&mut self, input: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn InitializeTouchInjection(&mut self, visualMode: InjectedInputVisualizationMode) -> HRESULT, + fn InjectTouchInput(&mut self, input: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn UninitializeTouchInjection(&mut self) -> HRESULT, + fn InitializePenInjection(&mut self, visualMode: InjectedInputVisualizationMode) -> HRESULT, + fn InjectPenInput(&mut self, input: *mut InjectedInputPenInfo) -> HRESULT, + fn UninitializePenInjection(&mut self) -> HRESULT, + fn InjectShortcut(&mut self, shortcut: InjectedInputShortcut) -> HRESULT + }} + impl IInputInjector { + #[inline] pub unsafe fn inject_keyboard_input(&mut self, input: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).InjectKeyboardInput)(self, input as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn inject_mouse_input(&mut self, input: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).InjectMouseInput)(self, input as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn initialize_touch_injection(&mut self, visualMode: InjectedInputVisualizationMode) -> Result<()> { + let hr = ((*self.lpVtbl).InitializeTouchInjection)(self, visualMode); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn inject_touch_input(&mut self, input: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).InjectTouchInput)(self, input as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn uninitialize_touch_injection(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).UninitializeTouchInjection)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn initialize_pen_injection(&mut self, visualMode: InjectedInputVisualizationMode) -> Result<()> { + let hr = ((*self.lpVtbl).InitializePenInjection)(self, visualMode); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn inject_pen_input(&mut self, input: &InjectedInputPenInfo) -> Result<()> { + let hr = ((*self.lpVtbl).InjectPenInput)(self, input as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn uninitialize_pen_injection(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).UninitializePenInjection)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn inject_shortcut(&mut self, shortcut: InjectedInputShortcut) -> Result<()> { + let hr = ((*self.lpVtbl).InjectShortcut)(self, shortcut); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class InjectedInputKeyboardInfo: IInjectedInputKeyboardInfo} + RT_CLASS!{class InjectedInputMouseInfo: IInjectedInputMouseInfo} + RT_CLASS!{class InjectedInputTouchInfo: IInjectedInputTouchInfo} + RT_CLASS!{class InjectedInputPenInfo: IInjectedInputPenInfo} + DEFINE_IID!(IID_IInputInjectorStatics, 3735972163, 29698, 16705, 165, 198, 12, 1, 170, 87, 177, 106); + RT_INTERFACE!{static interface IInputInjectorStatics(IInputInjectorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IInputInjectorStatics] { + fn TryCreate(&mut self, out: *mut *mut InputInjector) -> HRESULT + }} + impl IInputInjectorStatics { + #[inline] pub unsafe fn try_create(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TryCreate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class InputInjector: IInputInjector} + RT_ACTIVATABLE!{IInputInjectorStatics [CLSID_InputInjector]} + DEFINE_CLSID!(CLSID_InputInjector = &[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,80,114,101,118,105,101,119,46,73,110,106,101,99,116,105,111,110,46,73,110,112,117,116,73,110,106,101,99,116,111,114,0]); +} // Windows.UI.Input.Preview.Injection +} // Windows.UI.Input.Preview +} // Windows.UI.Input +pub mod startscreen { // Windows.UI.StartScreen +use ::prelude::*; + RT_ENUM! { enum JumpListSystemGroupKind: i32 { + None (JumpListSystemGroupKind_None) = 0, Frequent (JumpListSystemGroupKind_Frequent) = 1, Recent (JumpListSystemGroupKind_Recent) = 2, + }} + RT_ENUM! { enum JumpListItemKind: i32 { + Arguments (JumpListItemKind_Arguments) = 0, Separator (JumpListItemKind_Separator) = 1, + }} + DEFINE_IID!(IID_IJumpListItem, 2061199127, 35677, 18464, 153, 91, 155, 65, 141, 190, 72, 176); + RT_INTERFACE!{interface IJumpListItem(IJumpListItemVtbl): IInspectable(IInspectableVtbl) [IID_IJumpListItem] { + fn get_Kind(&mut self, out: *mut JumpListItemKind) -> HRESULT, + fn get_Arguments(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_RemovedByUser(&mut self, out: *mut bool) -> HRESULT, + fn get_Description(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Description(&mut self, value: HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_GroupName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_GroupName(&mut self, value: HSTRING) -> HRESULT, + fn get_Logo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_Logo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT + }} + impl IJumpListItem { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_arguments(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Arguments)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_removed_by_user(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RemovedByUser)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_description(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Description)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_description(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Description)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_group_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GroupName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_group_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_GroupName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Logo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IJumpListItemStatics, 4055876840, 51114, 18891, 141, 222, 236, 252, 205, 122, 215, 228); + RT_INTERFACE!{static interface IJumpListItemStatics(IJumpListItemStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IJumpListItemStatics] { + fn CreateWithArguments(&mut self, arguments: HSTRING, displayName: HSTRING, out: *mut *mut JumpListItem) -> HRESULT, + fn CreateSeparator(&mut self, out: *mut *mut JumpListItem) -> HRESULT + }} + impl IJumpListItemStatics { + #[inline] pub unsafe fn create_with_arguments(&mut self, arguments: &HStringArg, displayName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithArguments)(self, arguments.get(), displayName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_separator(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSeparator)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class JumpListItem: IJumpListItem} + RT_ACTIVATABLE!{IJumpListItemStatics [CLSID_JumpListItem]} + DEFINE_CLSID!(CLSID_JumpListItem = &[87,105,110,100,111,119,115,46,85,73,46,83,116,97,114,116,83,99,114,101,101,110,46,74,117,109,112,76,105,115,116,73,116,101,109,0]); + DEFINE_IID!(IID_IJumpList, 2955103294, 52591, 19638, 166, 17, 97, 253, 80, 95, 62, 209); + RT_INTERFACE!{interface IJumpList(IJumpListVtbl): IInspectable(IInspectableVtbl) [IID_IJumpList] { + fn get_Items(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_SystemGroupKind(&mut self, out: *mut JumpListSystemGroupKind) -> HRESULT, + fn put_SystemGroupKind(&mut self, value: JumpListSystemGroupKind) -> HRESULT, + fn SaveAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + }} + impl IJumpList { + #[inline] pub unsafe fn get_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Items)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_system_group_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SystemGroupKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_system_group_kind(&mut self, value: JumpListSystemGroupKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_SystemGroupKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn save_async(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SaveAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IJumpListStatics, 2816525953, 59006, 19316, 130, 80, 63, 50, 44, 77, 146, 195); + RT_INTERFACE!{static interface IJumpListStatics(IJumpListStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IJumpListStatics] { + fn LoadCurrentAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn IsSupported(&mut self, out: *mut bool) -> HRESULT + }} + impl IJumpListStatics { + #[inline] pub unsafe fn load_current_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadCurrentAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_supported(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsSupported)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class JumpList: IJumpList} + RT_ACTIVATABLE!{IJumpListStatics [CLSID_JumpList]} + DEFINE_CLSID!(CLSID_JumpList = &[87,105,110,100,111,119,115,46,85,73,46,83,116,97,114,116,83,99,114,101,101,110,46,74,117,109,112,76,105,115,116,0]); + RT_ENUM! { enum TileOptions: u32 { + None (TileOptions_None) = 0, ShowNameOnLogo (TileOptions_ShowNameOnLogo) = 1, ShowNameOnWideLogo (TileOptions_ShowNameOnWideLogo) = 2, CopyOnDeployment (TileOptions_CopyOnDeployment) = 4, + }} + RT_ENUM! { enum TileSize: i32 { + Default (TileSize_Default) = 0, Square30x30 (TileSize_Square30x30) = 1, Square70x70 (TileSize_Square70x70) = 2, Square150x150 (TileSize_Square150x150) = 3, Wide310x150 (TileSize_Wide310x150) = 4, Square310x310 (TileSize_Square310x310) = 5, Square71x71 (TileSize_Square71x71) = 6, Square44x44 (TileSize_Square44x44) = 7, + }} + RT_ENUM! { enum ForegroundText: i32 { + Dark (ForegroundText_Dark) = 0, Light (ForegroundText_Light) = 1, + }} + DEFINE_IID!(IID_ISecondaryTile, 2661175776, 11189, 19392, 187, 141, 66, 178, 58, 188, 200, 141); + RT_INTERFACE!{interface ISecondaryTile(ISecondaryTileVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryTile] { + fn put_TileId(&mut self, value: HSTRING) -> HRESULT, + fn get_TileId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Arguments(&mut self, value: HSTRING) -> HRESULT, + fn get_Arguments(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_ShortName(&mut self, value: HSTRING) -> HRESULT, + fn get_ShortName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayName(&mut self, value: HSTRING) -> HRESULT, + fn get_DisplayName(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Logo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Logo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_SmallLogo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_SmallLogo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_WideLogo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_WideLogo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_LockScreenBadgeLogo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_LockScreenBadgeLogo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_LockScreenDisplayBadgeAndTileText(&mut self, value: bool) -> HRESULT, + fn get_LockScreenDisplayBadgeAndTileText(&mut self, out: *mut bool) -> HRESULT, + fn put_TileOptions(&mut self, value: TileOptions) -> HRESULT, + fn get_TileOptions(&mut self, out: *mut TileOptions) -> HRESULT, + fn put_ForegroundText(&mut self, value: ForegroundText) -> HRESULT, + fn get_ForegroundText(&mut self, out: *mut ForegroundText) -> HRESULT, + fn put_BackgroundColor(&mut self, value: super::Color) -> HRESULT, + fn get_BackgroundColor(&mut self, out: *mut super::Color) -> HRESULT, + fn RequestCreateAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestCreateAsyncWithPoint(&mut self, invocationPoint: super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestCreateAsyncWithRect(&mut self, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestCreateAsyncWithRectAndPlacement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: super::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestDeleteAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestDeleteAsyncWithPoint(&mut self, invocationPoint: super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestDeleteAsyncWithRect(&mut self, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestDeleteAsyncWithRectAndPlacement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: super::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn UpdateAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl ISecondaryTile { + #[inline] pub unsafe fn set_tile_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_TileId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tile_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TileId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_arguments(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Arguments)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_arguments(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Arguments)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_short_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShortName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_short_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ShortName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Logo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_small_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_SmallLogo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_small_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SmallLogo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_wide_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_WideLogo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_wide_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WideLogo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_lock_screen_badge_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_LockScreenBadgeLogo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_lock_screen_badge_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LockScreenBadgeLogo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_lock_screen_display_badge_and_tile_text(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_LockScreenDisplayBadgeAndTileText)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_lock_screen_display_badge_and_tile_text(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LockScreenDisplayBadgeAndTileText)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_tile_options(&mut self, value: TileOptions) -> Result<()> { + let hr = ((*self.lpVtbl).put_TileOptions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tile_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TileOptions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_foreground_text(&mut self, value: ForegroundText) -> Result<()> { + let hr = ((*self.lpVtbl).put_ForegroundText)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground_text(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ForegroundText)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_background_color(&mut self, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_BackgroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BackgroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn request_create_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestCreateAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_create_async_with_point(&mut self, invocationPoint: super::super::foundation::Point) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestCreateAsyncWithPoint)(self, invocationPoint, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_create_async_with_rect(&mut self, selection: super::super::foundation::Rect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestCreateAsyncWithRect)(self, selection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_create_async_with_rect_and_placement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: super::popups::Placement) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestCreateAsyncWithRectAndPlacement)(self, selection, preferredPlacement, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_delete_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestDeleteAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_delete_async_with_point(&mut self, invocationPoint: super::super::foundation::Point) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestDeleteAsyncWithPoint)(self, invocationPoint, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_delete_async_with_rect(&mut self, selection: super::super::foundation::Rect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestDeleteAsyncWithRect)(self, selection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn request_delete_async_with_rect_and_placement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: super::popups::Placement) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestDeleteAsyncWithRectAndPlacement)(self, selection, preferredPlacement, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn update_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).UpdateAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISecondaryTile2, 3002518581, 12880, 18832, 146, 60, 41, 74, 180, 182, 148, 221); + RT_INTERFACE!{interface ISecondaryTile2(ISecondaryTile2Vtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryTile2] { + fn put_PhoneticName(&mut self, value: HSTRING) -> HRESULT, + fn get_PhoneticName(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_VisualElements(&mut self, out: *mut *mut SecondaryTileVisualElements) -> HRESULT, + fn put_RoamingEnabled(&mut self, value: bool) -> HRESULT, + fn get_RoamingEnabled(&mut self, out: *mut bool) -> HRESULT, + fn add_VisualElementsRequested(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisualElementsRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ISecondaryTile2 { + #[inline] pub unsafe fn set_phonetic_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PhoneticName)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_phonetic_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PhoneticName)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_visual_elements(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VisualElements)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_roaming_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_RoamingEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_roaming_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RoamingEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_visual_elements_requested(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VisualElementsRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_visual_elements_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VisualElementsRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SecondaryTileVisualElements: ISecondaryTileVisualElements} + RT_CLASS!{class SecondaryTile: ISecondaryTile [ISecondaryTileFactory] [CLSID_SecondaryTile]} + RT_ACTIVATABLE!{ISecondaryTileStatics [CLSID_SecondaryTile]} + DEFINE_CLSID!(CLSID_SecondaryTile = &[87,105,110,100,111,119,115,46,85,73,46,83,116,97,114,116,83,99,114,101,101,110,46,83,101,99,111,110,100,97,114,121,84,105,108,101,0]); + RT_CLASS!{class VisualElementsRequestedEventArgs: IVisualElementsRequestedEventArgs} + DEFINE_IID!(IID_ISecondaryTileVisualElements, 495842099, 33118, 16703, 159, 80, 168, 29, 167, 10, 150, 178); + RT_INTERFACE!{interface ISecondaryTileVisualElements(ISecondaryTileVisualElementsVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryTileVisualElements] { + fn put_Square30x30Logo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Square30x30Logo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_Square70x70Logo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Square70x70Logo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_Square150x150Logo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Square150x150Logo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_Wide310x150Logo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Wide310x150Logo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_Square310x310Logo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Square310x310Logo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_ForegroundText(&mut self, value: ForegroundText) -> HRESULT, + fn get_ForegroundText(&mut self, out: *mut ForegroundText) -> HRESULT, + fn put_BackgroundColor(&mut self, value: super::Color) -> HRESULT, + fn get_BackgroundColor(&mut self, out: *mut super::Color) -> HRESULT, + fn put_ShowNameOnSquare150x150Logo(&mut self, value: bool) -> HRESULT, + fn get_ShowNameOnSquare150x150Logo(&mut self, out: *mut bool) -> HRESULT, + fn put_ShowNameOnWide310x150Logo(&mut self, value: bool) -> HRESULT, + fn get_ShowNameOnWide310x150Logo(&mut self, out: *mut bool) -> HRESULT, + fn put_ShowNameOnSquare310x310Logo(&mut self, value: bool) -> HRESULT, + fn get_ShowNameOnSquare310x310Logo(&mut self, out: *mut bool) -> HRESULT + }} + impl ISecondaryTileVisualElements { + #[inline] pub unsafe fn set_square30x30_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Square30x30Logo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_square30x30_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Square30x30Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_square70x70_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Square70x70Logo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_square70x70_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Square70x70Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_square150x150_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Square150x150Logo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_square150x150_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Square150x150Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_wide310x150_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Wide310x150Logo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_wide310x150_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Wide310x150Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_square310x310_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Square310x310Logo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_square310x310_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Square310x310Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_foreground_text(&mut self, value: ForegroundText) -> Result<()> { + let hr = ((*self.lpVtbl).put_ForegroundText)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground_text(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ForegroundText)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_background_color(&mut self, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_BackgroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BackgroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_show_name_on_square150x150_logo(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShowNameOnSquare150x150Logo)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_show_name_on_square150x150_logo(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShowNameOnSquare150x150Logo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_show_name_on_wide310x150_logo(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShowNameOnWide310x150Logo)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_show_name_on_wide310x150_logo(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShowNameOnWide310x150Logo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_show_name_on_square310x310_logo(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShowNameOnSquare310x310Logo)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_show_name_on_square310x310_logo(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShowNameOnSquare310x310Logo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISecondaryTileVisualElements2, 4247663056, 22492, 18324, 142, 207, 86, 130, 245, 243, 230, 239); + RT_INTERFACE!{interface ISecondaryTileVisualElements2(ISecondaryTileVisualElements2Vtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryTileVisualElements2] { + fn put_Square71x71Logo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Square71x71Logo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + }} + impl ISecondaryTileVisualElements2 { + #[inline] pub unsafe fn set_square71x71_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Square71x71Logo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_square71x71_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Square71x71Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISecondaryTileVisualElements3, 1454725846, 53596, 16628, 129, 231, 87, 255, 216, 248, 164, 233); + RT_INTERFACE!{interface ISecondaryTileVisualElements3(ISecondaryTileVisualElements3Vtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryTileVisualElements3] { + fn put_Square44x44Logo(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Square44x44Logo(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + }} + impl ISecondaryTileVisualElements3 { + #[inline] pub unsafe fn set_square44x44_logo(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Square44x44Logo)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_square44x44_logo(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Square44x44Logo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISecondaryTileFactory, 1475685536, 20924, 19135, 142, 191, 98, 122, 3, 152, 176, 90); + RT_INTERFACE!{static interface ISecondaryTileFactory(ISecondaryTileFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryTileFactory] { + fn CreateTile(&mut self, tileId: HSTRING, shortName: HSTRING, displayName: HSTRING, arguments: HSTRING, tileOptions: TileOptions, logoReference: *mut super::super::foundation::Uri, out: *mut *mut SecondaryTile) -> HRESULT, + fn CreateWideTile(&mut self, tileId: HSTRING, shortName: HSTRING, displayName: HSTRING, arguments: HSTRING, tileOptions: TileOptions, logoReference: *mut super::super::foundation::Uri, wideLogoReference: *mut super::super::foundation::Uri, out: *mut *mut SecondaryTile) -> HRESULT, + fn CreateWithId(&mut self, tileId: HSTRING, out: *mut *mut SecondaryTile) -> HRESULT + }} + impl ISecondaryTileFactory { + #[inline] pub unsafe fn create_tile(&mut self, tileId: &HStringArg, shortName: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, tileOptions: TileOptions, logoReference: &super::super::foundation::Uri) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTile)(self, tileId.get(), shortName.get(), displayName.get(), arguments.get(), tileOptions, logoReference as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_wide_tile(&mut self, tileId: &HStringArg, shortName: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, tileOptions: TileOptions, logoReference: &super::super::foundation::Uri, wideLogoReference: &super::super::foundation::Uri) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWideTile)(self, tileId.get(), shortName.get(), displayName.get(), arguments.get(), tileOptions, logoReference as *const _ as *mut _, wideLogoReference as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_id(&mut self, tileId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithId)(self, tileId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISecondaryTileFactory2, 659262011, 21037, 17550, 158, 178, 208, 103, 42, 179, 69, 200); + RT_INTERFACE!{interface ISecondaryTileFactory2(ISecondaryTileFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryTileFactory2] { + fn CreateMinimalTile(&mut self, tileId: HSTRING, displayName: HSTRING, arguments: HSTRING, square150x150Logo: *mut super::super::foundation::Uri, desiredSize: TileSize, out: *mut *mut SecondaryTile) -> HRESULT + }} + impl ISecondaryTileFactory2 { + #[inline] pub unsafe fn create_minimal_tile(&mut self, tileId: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, square150x150Logo: &super::super::foundation::Uri, desiredSize: TileSize) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMinimalTile)(self, tileId.get(), displayName.get(), arguments.get(), square150x150Logo as *const _ as *mut _, desiredSize, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISecondaryTileStatics, 2576387502, 53329, 18038, 135, 254, 158, 194, 66, 216, 60, 116); + RT_INTERFACE!{static interface ISecondaryTileStatics(ISecondaryTileStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryTileStatics] { + fn Exists(&mut self, tileId: HSTRING, out: *mut bool) -> HRESULT, + fn FindAllAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAllForApplicationAsync(&mut self, applicationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAllForPackageAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + }} + impl ISecondaryTileStatics { + #[inline] pub unsafe fn exists(&mut self, tileId: &HStringArg) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Exists)(self, tileId.get(), &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_for_application_async(&mut self, applicationId: &HStringArg) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllForApplicationAsync)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_all_for_package_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindAllForPackageAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVisualElementsRequestedEventArgs, 2070923650, 14861, 20174, 175, 150, 205, 23, 225, 176, 11, 45); + RT_INTERFACE!{interface IVisualElementsRequestedEventArgs(IVisualElementsRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVisualElementsRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut VisualElementsRequest) -> HRESULT + }} + impl IVisualElementsRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VisualElementsRequest: IVisualElementsRequest} + DEFINE_IID!(IID_IVisualElementsRequest, 3241685818, 37640, 16498, 136, 204, 208, 104, 219, 52, 124, 104); + RT_INTERFACE!{interface IVisualElementsRequest(IVisualElementsRequestVtbl): IInspectable(IInspectableVtbl) [IID_IVisualElementsRequest] { + fn get_VisualElements(&mut self, out: *mut *mut SecondaryTileVisualElements) -> HRESULT, + fn get_AlternateVisualElements(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Deadline(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut VisualElementsRequestDeferral) -> HRESULT + }} + impl IVisualElementsRequest { + #[inline] pub unsafe fn get_visual_elements(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VisualElements)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_alternate_visual_elements(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlternateVisualElements)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deadline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Deadline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VisualElementsRequestDeferral: IVisualElementsRequestDeferral} + DEFINE_IID!(IID_IVisualElementsRequestDeferral, 2707779248, 294, 17239, 130, 4, 189, 130, 187, 42, 4, 109); + RT_INTERFACE!{interface IVisualElementsRequestDeferral(IVisualElementsRequestDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IVisualElementsRequestDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IVisualElementsRequestDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.UI.StartScreen +pub mod popups { // Windows.UI.Popups +use ::prelude::*; + RT_ENUM! { enum MessageDialogOptions: u32 { + None (MessageDialogOptions_None) = 0, AcceptUserInputAfterDelay (MessageDialogOptions_AcceptUserInputAfterDelay) = 1, + }} + DEFINE_IID!(IID_IMessageDialog, 871734017, 21285, 17323, 154, 179, 189, 174, 68, 14, 65, 33); + RT_INTERFACE!{interface IMessageDialog(IMessageDialogVtbl): IInspectable(IInspectableVtbl) [IID_IMessageDialog] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_Commands(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_DefaultCommandIndex(&mut self, out: *mut u32) -> HRESULT, + fn put_DefaultCommandIndex(&mut self, value: u32) -> HRESULT, + fn get_CancelCommandIndex(&mut self, out: *mut u32) -> HRESULT, + fn put_CancelCommandIndex(&mut self, value: u32) -> HRESULT, + fn get_Content(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Content(&mut self, value: HSTRING) -> HRESULT, + fn ShowAsync(&mut self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_Options(&mut self, out: *mut MessageDialogOptions) -> HRESULT, + fn put_Options(&mut self, value: MessageDialogOptions) -> HRESULT + }} + impl IMessageDialog { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_commands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Commands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_command_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DefaultCommandIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_command_index(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultCommandIndex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cancel_command_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CancelCommandIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cancel_command_index(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CancelCommandIndex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Content)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Options)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_options(&mut self, value: MessageDialogOptions) -> Result<()> { + let hr = ((*self.lpVtbl).put_Options)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMessageDialogFactory, 756422519, 42607, 20133, 187, 135, 121, 63, 250, 73, 65, 242); + RT_INTERFACE!{static interface IMessageDialogFactory(IMessageDialogFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMessageDialogFactory] { + fn Create(&mut self, content: HSTRING, out: *mut *mut MessageDialog) -> HRESULT, + fn CreateWithTitle(&mut self, content: HSTRING, title: HSTRING, out: *mut *mut MessageDialog) -> HRESULT + }} + impl IMessageDialogFactory { + #[inline] pub unsafe fn create(&mut self, content: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, content.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_title(&mut self, content: &HStringArg, title: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithTitle)(self, content.get(), title.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MessageDialog: IMessageDialog [IMessageDialogFactory] [CLSID_MessageDialog]} + DEFINE_CLSID!(CLSID_MessageDialog = &[87,105,110,100,111,119,115,46,85,73,46,80,111,112,117,112,115,46,77,101,115,115,97,103,101,68,105,97,108,111,103,0]); + RT_ENUM! { enum Placement: i32 { + Default (Placement_Default) = 0, Above (Placement_Above) = 1, Below (Placement_Below) = 2, Left (Placement_Left) = 3, Right (Placement_Right) = 4, + }} + DEFINE_IID!(IID_UICommandInvokedHandler, 3673651791, 49786, 17048, 154, 198, 41, 34, 196, 94, 125, 166); + RT_DELEGATE!{delegate UICommandInvokedHandler(UICommandInvokedHandlerVtbl, UICommandInvokedHandlerImpl) [IID_UICommandInvokedHandler] { + fn Invoke(&mut self, command: *mut IUICommand) -> HRESULT + }} + impl UICommandInvokedHandler { + #[inline] pub unsafe fn invoke(&mut self, command: &IUICommand) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, command as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUICommand, 1341733493, 16709, 18431, 172, 127, 223, 241, 193, 250, 91, 15); + RT_INTERFACE!{interface IUICommand(IUICommandVtbl): IInspectable(IInspectableVtbl) [IID_IUICommand] { + fn get_Label(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Label(&mut self, value: HSTRING) -> HRESULT, + fn get_Invoked(&mut self, out: *mut *mut UICommandInvokedHandler) -> HRESULT, + fn put_Invoked(&mut self, value: *mut UICommandInvokedHandler) -> HRESULT, + fn get_Id(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Id(&mut self, value: *mut IInspectable) -> HRESULT + }} + impl IUICommand { + #[inline] pub unsafe fn get_label(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Label)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_label(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Label)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_invoked(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Invoked)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_invoked(&mut self, value: &UICommandInvokedHandler) -> Result<()> { + let hr = ((*self.lpVtbl).put_Invoked)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_id(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Id)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUICommandFactory, 2719646089, 9904, 18038, 174, 148, 84, 4, 27, 193, 37, 232); + RT_INTERFACE!{static interface IUICommandFactory(IUICommandFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IUICommandFactory] { + fn Create(&mut self, label: HSTRING, out: *mut *mut UICommand) -> HRESULT, + fn CreateWithHandler(&mut self, label: HSTRING, action: *mut UICommandInvokedHandler, out: *mut *mut UICommand) -> HRESULT, + fn CreateWithHandlerAndId(&mut self, label: HSTRING, action: *mut UICommandInvokedHandler, commandId: *mut IInspectable, out: *mut *mut UICommand) -> HRESULT + }} + impl IUICommandFactory { + #[inline] pub unsafe fn create(&mut self, label: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, label.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_handler(&mut self, label: &HStringArg, action: &UICommandInvokedHandler) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithHandler)(self, label.get(), action as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_handler_and_id(&mut self, label: &HStringArg, action: &UICommandInvokedHandler, commandId: &IInspectable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithHandlerAndId)(self, label.get(), action as *const _ as *mut _, commandId as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UICommand: IUICommand [IUICommandFactory] [CLSID_UICommand]} + DEFINE_CLSID!(CLSID_UICommand = &[87,105,110,100,111,119,115,46,85,73,46,80,111,112,117,112,115,46,85,73,67,111,109,109,97,110,100,0]); + RT_CLASS!{class UICommandSeparator: IUICommand} + DEFINE_IID!(IID_IPopupMenu, 1318831836, 34829, 18428, 160, 161, 114, 182, 57, 230, 37, 89); + RT_INTERFACE!{interface IPopupMenu(IPopupMenuVtbl): IInspectable(IInspectableVtbl) [IID_IPopupMenu] { + fn get_Commands(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn ShowAsync(&mut self, invocationPoint: super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowAsyncWithRect(&mut self, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowAsyncWithRectAndPlacement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IPopupMenu { + #[inline] pub unsafe fn get_commands(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Commands)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_async(&mut self, invocationPoint: super::super::foundation::Point) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAsync)(self, invocationPoint, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_async_with_rect(&mut self, selection: super::super::foundation::Rect) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAsyncWithRect)(self, selection, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn show_async_with_rect_and_placement(&mut self, selection: super::super::foundation::Rect, preferredPlacement: Placement) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ShowAsyncWithRectAndPlacement)(self, selection, preferredPlacement, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PopupMenu: IPopupMenu} +} // Windows.UI.Popups +pub mod notifications { // Windows.UI.Notifications +use ::prelude::*; + DEFINE_IID!(IID_IShownTileNotification, 875399560, 23282, 18458, 166, 163, 242, 253, 199, 141, 232, 142); + RT_INTERFACE!{interface IShownTileNotification(IShownTileNotificationVtbl): IInspectable(IInspectableVtbl) [IID_IShownTileNotification] { + fn get_Arguments(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IShownTileNotification { + #[inline] pub unsafe fn get_arguments(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Arguments)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ShownTileNotification: IShownTileNotification} + RT_ENUM! { enum NotificationSetting: i32 { + Enabled (NotificationSetting_Enabled) = 0, DisabledForApplication (NotificationSetting_DisabledForApplication) = 1, DisabledForUser (NotificationSetting_DisabledForUser) = 2, DisabledByGroupPolicy (NotificationSetting_DisabledByGroupPolicy) = 3, DisabledByManifest (NotificationSetting_DisabledByManifest) = 4, + }} + RT_ENUM! { enum ToastDismissalReason: i32 { + UserCanceled (ToastDismissalReason_UserCanceled) = 0, ApplicationHidden (ToastDismissalReason_ApplicationHidden) = 1, TimedOut (ToastDismissalReason_TimedOut) = 2, + }} + RT_ENUM! { enum BadgeTemplateType: i32 { + BadgeGlyph (BadgeTemplateType_BadgeGlyph) = 0, BadgeNumber (BadgeTemplateType_BadgeNumber) = 1, + }} + RT_ENUM! { enum TileFlyoutTemplateType: i32 { + TileFlyoutTemplate01 (TileFlyoutTemplateType_TileFlyoutTemplate01) = 0, + }} + RT_ENUM! { enum TileTemplateType: i32 { + TileSquareImage (TileTemplateType_TileSquareImage) = 0, TileSquareBlock (TileTemplateType_TileSquareBlock) = 1, TileSquareText01 (TileTemplateType_TileSquareText01) = 2, TileSquareText02 (TileTemplateType_TileSquareText02) = 3, TileSquareText03 (TileTemplateType_TileSquareText03) = 4, TileSquareText04 (TileTemplateType_TileSquareText04) = 5, TileSquarePeekImageAndText01 (TileTemplateType_TileSquarePeekImageAndText01) = 6, TileSquarePeekImageAndText02 (TileTemplateType_TileSquarePeekImageAndText02) = 7, TileSquarePeekImageAndText03 (TileTemplateType_TileSquarePeekImageAndText03) = 8, TileSquarePeekImageAndText04 (TileTemplateType_TileSquarePeekImageAndText04) = 9, TileWideImage (TileTemplateType_TileWideImage) = 10, TileWideImageCollection (TileTemplateType_TileWideImageCollection) = 11, TileWideImageAndText01 (TileTemplateType_TileWideImageAndText01) = 12, TileWideImageAndText02 (TileTemplateType_TileWideImageAndText02) = 13, TileWideBlockAndText01 (TileTemplateType_TileWideBlockAndText01) = 14, TileWideBlockAndText02 (TileTemplateType_TileWideBlockAndText02) = 15, TileWidePeekImageCollection01 (TileTemplateType_TileWidePeekImageCollection01) = 16, TileWidePeekImageCollection02 (TileTemplateType_TileWidePeekImageCollection02) = 17, TileWidePeekImageCollection03 (TileTemplateType_TileWidePeekImageCollection03) = 18, TileWidePeekImageCollection04 (TileTemplateType_TileWidePeekImageCollection04) = 19, TileWidePeekImageCollection05 (TileTemplateType_TileWidePeekImageCollection05) = 20, TileWidePeekImageCollection06 (TileTemplateType_TileWidePeekImageCollection06) = 21, TileWidePeekImageAndText01 (TileTemplateType_TileWidePeekImageAndText01) = 22, TileWidePeekImageAndText02 (TileTemplateType_TileWidePeekImageAndText02) = 23, TileWidePeekImage01 (TileTemplateType_TileWidePeekImage01) = 24, TileWidePeekImage02 (TileTemplateType_TileWidePeekImage02) = 25, TileWidePeekImage03 (TileTemplateType_TileWidePeekImage03) = 26, TileWidePeekImage04 (TileTemplateType_TileWidePeekImage04) = 27, TileWidePeekImage05 (TileTemplateType_TileWidePeekImage05) = 28, TileWidePeekImage06 (TileTemplateType_TileWidePeekImage06) = 29, TileWideSmallImageAndText01 (TileTemplateType_TileWideSmallImageAndText01) = 30, TileWideSmallImageAndText02 (TileTemplateType_TileWideSmallImageAndText02) = 31, TileWideSmallImageAndText03 (TileTemplateType_TileWideSmallImageAndText03) = 32, TileWideSmallImageAndText04 (TileTemplateType_TileWideSmallImageAndText04) = 33, TileWideSmallImageAndText05 (TileTemplateType_TileWideSmallImageAndText05) = 34, TileWideText01 (TileTemplateType_TileWideText01) = 35, TileWideText02 (TileTemplateType_TileWideText02) = 36, TileWideText03 (TileTemplateType_TileWideText03) = 37, TileWideText04 (TileTemplateType_TileWideText04) = 38, TileWideText05 (TileTemplateType_TileWideText05) = 39, TileWideText06 (TileTemplateType_TileWideText06) = 40, TileWideText07 (TileTemplateType_TileWideText07) = 41, TileWideText08 (TileTemplateType_TileWideText08) = 42, TileWideText09 (TileTemplateType_TileWideText09) = 43, TileWideText10 (TileTemplateType_TileWideText10) = 44, TileWideText11 (TileTemplateType_TileWideText11) = 45, TileSquare150x150Image (TileTemplateType_TileSquare150x150Image) = 0, TileSquare150x150Block (TileTemplateType_TileSquare150x150Block) = 1, TileSquare150x150Text01 (TileTemplateType_TileSquare150x150Text01) = 2, TileSquare150x150Text02 (TileTemplateType_TileSquare150x150Text02) = 3, TileSquare150x150Text03 (TileTemplateType_TileSquare150x150Text03) = 4, TileSquare150x150Text04 (TileTemplateType_TileSquare150x150Text04) = 5, TileSquare150x150PeekImageAndText01 (TileTemplateType_TileSquare150x150PeekImageAndText01) = 6, TileSquare150x150PeekImageAndText02 (TileTemplateType_TileSquare150x150PeekImageAndText02) = 7, TileSquare150x150PeekImageAndText03 (TileTemplateType_TileSquare150x150PeekImageAndText03) = 8, TileSquare150x150PeekImageAndText04 (TileTemplateType_TileSquare150x150PeekImageAndText04) = 9, TileWide310x150Image (TileTemplateType_TileWide310x150Image) = 10, TileWide310x150ImageCollection (TileTemplateType_TileWide310x150ImageCollection) = 11, TileWide310x150ImageAndText01 (TileTemplateType_TileWide310x150ImageAndText01) = 12, TileWide310x150ImageAndText02 (TileTemplateType_TileWide310x150ImageAndText02) = 13, TileWide310x150BlockAndText01 (TileTemplateType_TileWide310x150BlockAndText01) = 14, TileWide310x150BlockAndText02 (TileTemplateType_TileWide310x150BlockAndText02) = 15, TileWide310x150PeekImageCollection01 (TileTemplateType_TileWide310x150PeekImageCollection01) = 16, TileWide310x150PeekImageCollection02 (TileTemplateType_TileWide310x150PeekImageCollection02) = 17, TileWide310x150PeekImageCollection03 (TileTemplateType_TileWide310x150PeekImageCollection03) = 18, TileWide310x150PeekImageCollection04 (TileTemplateType_TileWide310x150PeekImageCollection04) = 19, TileWide310x150PeekImageCollection05 (TileTemplateType_TileWide310x150PeekImageCollection05) = 20, TileWide310x150PeekImageCollection06 (TileTemplateType_TileWide310x150PeekImageCollection06) = 21, TileWide310x150PeekImageAndText01 (TileTemplateType_TileWide310x150PeekImageAndText01) = 22, TileWide310x150PeekImageAndText02 (TileTemplateType_TileWide310x150PeekImageAndText02) = 23, TileWide310x150PeekImage01 (TileTemplateType_TileWide310x150PeekImage01) = 24, TileWide310x150PeekImage02 (TileTemplateType_TileWide310x150PeekImage02) = 25, TileWide310x150PeekImage03 (TileTemplateType_TileWide310x150PeekImage03) = 26, TileWide310x150PeekImage04 (TileTemplateType_TileWide310x150PeekImage04) = 27, TileWide310x150PeekImage05 (TileTemplateType_TileWide310x150PeekImage05) = 28, TileWide310x150PeekImage06 (TileTemplateType_TileWide310x150PeekImage06) = 29, TileWide310x150SmallImageAndText01 (TileTemplateType_TileWide310x150SmallImageAndText01) = 30, TileWide310x150SmallImageAndText02 (TileTemplateType_TileWide310x150SmallImageAndText02) = 31, TileWide310x150SmallImageAndText03 (TileTemplateType_TileWide310x150SmallImageAndText03) = 32, TileWide310x150SmallImageAndText04 (TileTemplateType_TileWide310x150SmallImageAndText04) = 33, TileWide310x150SmallImageAndText05 (TileTemplateType_TileWide310x150SmallImageAndText05) = 34, TileWide310x150Text01 (TileTemplateType_TileWide310x150Text01) = 35, TileWide310x150Text02 (TileTemplateType_TileWide310x150Text02) = 36, TileWide310x150Text03 (TileTemplateType_TileWide310x150Text03) = 37, TileWide310x150Text04 (TileTemplateType_TileWide310x150Text04) = 38, TileWide310x150Text05 (TileTemplateType_TileWide310x150Text05) = 39, TileWide310x150Text06 (TileTemplateType_TileWide310x150Text06) = 40, TileWide310x150Text07 (TileTemplateType_TileWide310x150Text07) = 41, TileWide310x150Text08 (TileTemplateType_TileWide310x150Text08) = 42, TileWide310x150Text09 (TileTemplateType_TileWide310x150Text09) = 43, TileWide310x150Text10 (TileTemplateType_TileWide310x150Text10) = 44, TileWide310x150Text11 (TileTemplateType_TileWide310x150Text11) = 45, TileSquare310x310BlockAndText01 (TileTemplateType_TileSquare310x310BlockAndText01) = 46, TileSquare310x310BlockAndText02 (TileTemplateType_TileSquare310x310BlockAndText02) = 47, TileSquare310x310Image (TileTemplateType_TileSquare310x310Image) = 48, TileSquare310x310ImageAndText01 (TileTemplateType_TileSquare310x310ImageAndText01) = 49, TileSquare310x310ImageAndText02 (TileTemplateType_TileSquare310x310ImageAndText02) = 50, TileSquare310x310ImageAndTextOverlay01 (TileTemplateType_TileSquare310x310ImageAndTextOverlay01) = 51, TileSquare310x310ImageAndTextOverlay02 (TileTemplateType_TileSquare310x310ImageAndTextOverlay02) = 52, TileSquare310x310ImageAndTextOverlay03 (TileTemplateType_TileSquare310x310ImageAndTextOverlay03) = 53, TileSquare310x310ImageCollectionAndText01 (TileTemplateType_TileSquare310x310ImageCollectionAndText01) = 54, TileSquare310x310ImageCollectionAndText02 (TileTemplateType_TileSquare310x310ImageCollectionAndText02) = 55, TileSquare310x310ImageCollection (TileTemplateType_TileSquare310x310ImageCollection) = 56, TileSquare310x310SmallImagesAndTextList01 (TileTemplateType_TileSquare310x310SmallImagesAndTextList01) = 57, TileSquare310x310SmallImagesAndTextList02 (TileTemplateType_TileSquare310x310SmallImagesAndTextList02) = 58, TileSquare310x310SmallImagesAndTextList03 (TileTemplateType_TileSquare310x310SmallImagesAndTextList03) = 59, TileSquare310x310SmallImagesAndTextList04 (TileTemplateType_TileSquare310x310SmallImagesAndTextList04) = 60, TileSquare310x310Text01 (TileTemplateType_TileSquare310x310Text01) = 61, TileSquare310x310Text02 (TileTemplateType_TileSquare310x310Text02) = 62, TileSquare310x310Text03 (TileTemplateType_TileSquare310x310Text03) = 63, TileSquare310x310Text04 (TileTemplateType_TileSquare310x310Text04) = 64, TileSquare310x310Text05 (TileTemplateType_TileSquare310x310Text05) = 65, TileSquare310x310Text06 (TileTemplateType_TileSquare310x310Text06) = 66, TileSquare310x310Text07 (TileTemplateType_TileSquare310x310Text07) = 67, TileSquare310x310Text08 (TileTemplateType_TileSquare310x310Text08) = 68, TileSquare310x310TextList01 (TileTemplateType_TileSquare310x310TextList01) = 69, TileSquare310x310TextList02 (TileTemplateType_TileSquare310x310TextList02) = 70, TileSquare310x310TextList03 (TileTemplateType_TileSquare310x310TextList03) = 71, TileSquare310x310SmallImageAndText01 (TileTemplateType_TileSquare310x310SmallImageAndText01) = 72, TileSquare310x310SmallImagesAndTextList05 (TileTemplateType_TileSquare310x310SmallImagesAndTextList05) = 73, TileSquare310x310Text09 (TileTemplateType_TileSquare310x310Text09) = 74, TileSquare71x71IconWithBadge (TileTemplateType_TileSquare71x71IconWithBadge) = 75, TileSquare150x150IconWithBadge (TileTemplateType_TileSquare150x150IconWithBadge) = 76, TileWide310x150IconWithBadgeAndText (TileTemplateType_TileWide310x150IconWithBadgeAndText) = 77, TileSquare71x71Image (TileTemplateType_TileSquare71x71Image) = 78, TileTall150x310Image (TileTemplateType_TileTall150x310Image) = 79, + }} + RT_ENUM! { enum ToastTemplateType: i32 { + ToastImageAndText01 (ToastTemplateType_ToastImageAndText01) = 0, ToastImageAndText02 (ToastTemplateType_ToastImageAndText02) = 1, ToastImageAndText03 (ToastTemplateType_ToastImageAndText03) = 2, ToastImageAndText04 (ToastTemplateType_ToastImageAndText04) = 3, ToastText01 (ToastTemplateType_ToastText01) = 4, ToastText02 (ToastTemplateType_ToastText02) = 5, ToastText03 (ToastTemplateType_ToastText03) = 6, ToastText04 (ToastTemplateType_ToastText04) = 7, + }} + RT_ENUM! { enum PeriodicUpdateRecurrence: i32 { + HalfHour (PeriodicUpdateRecurrence_HalfHour) = 0, Hour (PeriodicUpdateRecurrence_Hour) = 1, SixHours (PeriodicUpdateRecurrence_SixHours) = 2, TwelveHours (PeriodicUpdateRecurrence_TwelveHours) = 3, Daily (PeriodicUpdateRecurrence_Daily) = 4, + }} + RT_ENUM! { enum ToastHistoryChangedType: i32 { + Cleared (ToastHistoryChangedType_Cleared) = 0, Removed (ToastHistoryChangedType_Removed) = 1, Expired (ToastHistoryChangedType_Expired) = 2, Added (ToastHistoryChangedType_Added) = 3, + }} + RT_ENUM! { enum AdaptiveNotificationContentKind: i32 { + Text (AdaptiveNotificationContentKind_Text) = 0, + }} + RT_ENUM! { enum NotificationMirroring: i32 { + Allowed (NotificationMirroring_Allowed) = 0, Disabled (NotificationMirroring_Disabled) = 1, + }} + RT_ENUM! { enum NotificationKinds: u32 { + Unknown (NotificationKinds_Unknown) = 0, Toast (NotificationKinds_Toast) = 1, + }} + RT_ENUM! { enum UserNotificationChangedKind: i32 { + Added (UserNotificationChangedKind_Added) = 0, Removed (UserNotificationChangedKind_Removed) = 1, + }} + DEFINE_IID!(IID_IUserNotificationChangedEventArgs, 3065866297, 31183, 19237, 130, 192, 12, 225, 238, 248, 31, 140); + RT_INTERFACE!{interface IUserNotificationChangedEventArgs(IUserNotificationChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUserNotificationChangedEventArgs] { + fn get_ChangeKind(&mut self, out: *mut UserNotificationChangedKind) -> HRESULT, + fn get_UserNotificationId(&mut self, out: *mut u32) -> HRESULT + }} + impl IUserNotificationChangedEventArgs { + #[inline] pub unsafe fn get_change_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ChangeKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_notification_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UserNotificationId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserNotification, 2918704431, 20051, 17109, 156, 51, 235, 94, 165, 21, 178, 62); + RT_INTERFACE!{interface IUserNotification(IUserNotificationVtbl): IInspectable(IInspectableVtbl) [IID_IUserNotification] { + fn get_Notification(&mut self, out: *mut *mut Notification) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_AppInfo(&mut self, out: *mut *mut super::super::applicationmodel::AppInfo) -> HRESULT, + fn get_Id(&mut self, out: *mut u32) -> HRESULT, + fn get_CreationTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT + }} + impl IUserNotification { + #[inline] pub unsafe fn get_notification(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Notification)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_app_info(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AppInfo)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_creation_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CreationTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class Notification: INotification} + DEFINE_IID!(IID_INotificationVisual, 1753439118, 43606, 19985, 134, 211, 95, 154, 105, 87, 188, 91); + RT_INTERFACE!{interface INotificationVisual(INotificationVisualVtbl): IInspectable(IInspectableVtbl) [IID_INotificationVisual] { + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Language(&mut self, value: HSTRING) -> HRESULT, + fn get_Bindings(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn GetBinding(&mut self, templateName: HSTRING, out: *mut *mut NotificationBinding) -> HRESULT + }} + impl INotificationVisual { + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_language(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Language)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bindings(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Bindings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_binding(&mut self, templateName: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBinding)(self, templateName.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class NotificationBinding: INotificationBinding} + DEFINE_IID!(IID_IAdaptiveNotificationContent, 3943546470, 29768, 17549, 157, 184, 215, 138, 205, 42, 187, 169); + RT_INTERFACE!{interface IAdaptiveNotificationContent(IAdaptiveNotificationContentVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveNotificationContent] { + fn get_Kind(&mut self, out: *mut AdaptiveNotificationContentKind) -> HRESULT, + fn get_Hints(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT + }} + impl IAdaptiveNotificationContent { + #[inline] pub unsafe fn get_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_hints(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Hints)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INotificationBinding, 4070460293, 880, 19155, 180, 234, 218, 158, 53, 231, 234, 191); + RT_INTERFACE!{interface INotificationBinding(INotificationBindingVtbl): IInspectable(IInspectableVtbl) [IID_INotificationBinding] { + fn get_Template(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Template(&mut self, value: HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Language(&mut self, value: HSTRING) -> HRESULT, + fn get_Hints(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn GetTextElements(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl INotificationBinding { + #[inline] pub unsafe fn get_template(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Template)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_template(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Template)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_language(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Language)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hints(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Hints)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_elements(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTextElements)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class AdaptiveNotificationText: IAdaptiveNotificationText} + DEFINE_IID!(IID_IKnownNotificationBindingsStatics, 2034400174, 43191, 19800, 137, 234, 118, 167, 183, 188, 205, 237); + RT_INTERFACE!{static interface IKnownNotificationBindingsStatics(IKnownNotificationBindingsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownNotificationBindingsStatics] { + fn get_ToastGeneric(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownNotificationBindingsStatics { + #[inline] pub unsafe fn get_toast_generic(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ToastGeneric)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownAdaptiveNotificationHintsStatics, 102786456, 54422, 18813, 134, 146, 79, 125, 124, 39, 112, 223); + RT_INTERFACE!{static interface IKnownAdaptiveNotificationHintsStatics(IKnownAdaptiveNotificationHintsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownAdaptiveNotificationHintsStatics] { + fn get_Style(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Wrap(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MaxLines(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_MinLines(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TextStacking(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Align(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownAdaptiveNotificationHintsStatics { + #[inline] pub unsafe fn get_style(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Style)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_wrap(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Wrap)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_lines(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxLines)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_lines(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MinLines)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_stacking(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextStacking)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Align)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKnownAdaptiveNotificationTextStylesStatics, 539071191, 35222, 17834, 139, 161, 212, 97, 215, 44, 42, 27); + RT_INTERFACE!{static interface IKnownAdaptiveNotificationTextStylesStatics(IKnownAdaptiveNotificationTextStylesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IKnownAdaptiveNotificationTextStylesStatics] { + fn get_Caption(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Body(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Base(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Subtitle(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Subheader(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Header(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TitleNumeral(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SubheaderNumeral(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HeaderNumeral(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_CaptionSubtle(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BodySubtle(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_BaseSubtle(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SubtitleSubtle(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_TitleSubtle(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SubheaderSubtle(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_SubheaderNumeralSubtle(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HeaderSubtle(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_HeaderNumeralSubtle(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IKnownAdaptiveNotificationTextStylesStatics { + #[inline] pub unsafe fn get_caption(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Caption)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_body(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Body)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_base(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Base)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subtitle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subtitle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subheader(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Subheader)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Header)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title_numeral(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TitleNumeral)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subheader_numeral(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SubheaderNumeral)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_numeral(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderNumeral)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_caption_subtle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CaptionSubtle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_body_subtle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BodySubtle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_base_subtle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BaseSubtle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subtitle_subtle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SubtitleSubtle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_title_subtle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TitleSubtle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subheader_subtle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SubheaderSubtle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_subheader_numeral_subtle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SubheaderNumeralSubtle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_subtle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderSubtle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_numeral_subtle(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderNumeralSubtle)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdaptiveNotificationText, 1188340670, 24730, 17190, 164, 11, 191, 222, 135, 32, 52, 163); + RT_INTERFACE!{interface IAdaptiveNotificationText(IAdaptiveNotificationTextVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveNotificationText] { + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Text(&mut self, value: HSTRING) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Language(&mut self, value: HSTRING) -> HRESULT + }} + impl IAdaptiveNotificationText { + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Text)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_language(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Language)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToastDismissedEventArgs, 1065998645, 55755, 17720, 160, 240, 255, 231, 101, 153, 56, 248); + RT_INTERFACE!{interface IToastDismissedEventArgs(IToastDismissedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IToastDismissedEventArgs] { + fn get_Reason(&mut self, out: *mut ToastDismissalReason) -> HRESULT + }} + impl IToastDismissedEventArgs { + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToastFailedEventArgs, 890726498, 53204, 17656, 173, 100, 245, 0, 253, 137, 108, 59); + RT_INTERFACE!{interface IToastFailedEventArgs(IToastFailedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IToastFailedEventArgs] { + fn get_ErrorCode(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT + }} + impl IToastFailedEventArgs { + #[inline] pub unsafe fn get_error_code(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ErrorCode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToastActivatedEventArgs, 3820983027, 49559, 17263, 130, 101, 6, 37, 130, 79, 141, 172); + RT_INTERFACE!{interface IToastActivatedEventArgs(IToastActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IToastActivatedEventArgs] { + fn get_Arguments(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IToastActivatedEventArgs { + #[inline] pub unsafe fn get_arguments(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Arguments)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITileUpdateManagerStatics, 3658849885, 16041, 18822, 141, 132, 176, 157, 94, 18, 39, 109); + RT_INTERFACE!{static interface ITileUpdateManagerStatics(ITileUpdateManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ITileUpdateManagerStatics] { + fn CreateTileUpdaterForApplication(&mut self, out: *mut *mut TileUpdater) -> HRESULT, + fn CreateTileUpdaterForApplicationWithId(&mut self, applicationId: HSTRING, out: *mut *mut TileUpdater) -> HRESULT, + fn CreateTileUpdaterForSecondaryTile(&mut self, tileId: HSTRING, out: *mut *mut TileUpdater) -> HRESULT, + #[cfg(feature="windows.data")] fn GetTemplateContent(&mut self, type_: TileTemplateType, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT + }} + impl ITileUpdateManagerStatics { + #[inline] pub unsafe fn create_tile_updater_for_application(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTileUpdaterForApplication)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_tile_updater_for_application_with_id(&mut self, applicationId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTileUpdaterForApplicationWithId)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_tile_updater_for_secondary_tile(&mut self, tileId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTileUpdaterForSecondaryTile)(self, tileId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_template_content(&mut self, type_: TileTemplateType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTemplateContent)(self, type_, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TileUpdater: ITileUpdater} + DEFINE_IID!(IID_ITileUpdateManagerStatics2, 1931222492, 36372, 19324, 163, 75, 157, 34, 222, 118, 200, 77); + RT_INTERFACE!{static interface ITileUpdateManagerStatics2(ITileUpdateManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ITileUpdateManagerStatics2] { + #[cfg(feature="windows.system")] fn GetForUser(&mut self, user: *mut super::super::system::User, out: *mut *mut TileUpdateManagerForUser) -> HRESULT + }} + impl ITileUpdateManagerStatics2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user(&mut self, user: &super::super::system::User) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForUser)(self, user as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TileUpdateManagerForUser: ITileUpdateManagerForUser} + DEFINE_IID!(IID_ITileUpdateManagerForUser, 1427379016, 12002, 20013, 156, 193, 33, 106, 32, 222, 204, 159); + RT_INTERFACE!{interface ITileUpdateManagerForUser(ITileUpdateManagerForUserVtbl): IInspectable(IInspectableVtbl) [IID_ITileUpdateManagerForUser] { + fn CreateTileUpdaterForApplication(&mut self, out: *mut *mut TileUpdater) -> HRESULT, + fn CreateTileUpdaterForApplicationWithId(&mut self, applicationId: HSTRING, out: *mut *mut TileUpdater) -> HRESULT, + fn CreateTileUpdaterForSecondaryTile(&mut self, tileId: HSTRING, out: *mut *mut TileUpdater) -> HRESULT, + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT + }} + impl ITileUpdateManagerForUser { + #[inline] pub unsafe fn create_tile_updater_for_application(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTileUpdaterForApplication)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_tile_updater_for_application_with_id(&mut self, applicationId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTileUpdaterForApplicationWithId)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_tile_updater_for_secondary_tile(&mut self, tileId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTileUpdaterForSecondaryTile)(self, tileId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITileUpdater, 155362443, 7569, 17644, 146, 67, 193, 232, 33, 194, 154, 32); + RT_INTERFACE!{interface ITileUpdater(ITileUpdaterVtbl): IInspectable(IInspectableVtbl) [IID_ITileUpdater] { + fn Update(&mut self, notification: *mut TileNotification) -> HRESULT, + fn Clear(&mut self) -> HRESULT, + fn EnableNotificationQueue(&mut self, enable: bool) -> HRESULT, + fn get_Setting(&mut self, out: *mut NotificationSetting) -> HRESULT, + fn AddToSchedule(&mut self, scheduledTile: *mut ScheduledTileNotification) -> HRESULT, + fn RemoveFromSchedule(&mut self, scheduledTile: *mut ScheduledTileNotification) -> HRESULT, + fn GetScheduledTileNotifications(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn StartPeriodicUpdate(&mut self, tileContent: *mut super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StartPeriodicUpdateAtTime(&mut self, tileContent: *mut super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StopPeriodicUpdate(&mut self) -> HRESULT, + fn StartPeriodicUpdateBatch(&mut self, tileContents: *mut super::super::foundation::collections::IIterable, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StartPeriodicUpdateBatchAtTime(&mut self, tileContents: *mut super::super::foundation::collections::IIterable, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT + }} + impl ITileUpdater { + #[inline] pub unsafe fn update(&mut self, notification: &TileNotification) -> Result<()> { + let hr = ((*self.lpVtbl).Update)(self, notification as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn enable_notification_queue(&mut self, enable: bool) -> Result<()> { + let hr = ((*self.lpVtbl).EnableNotificationQueue)(self, enable); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_setting(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Setting)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_to_schedule(&mut self, scheduledTile: &ScheduledTileNotification) -> Result<()> { + let hr = ((*self.lpVtbl).AddToSchedule)(self, scheduledTile as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_from_schedule(&mut self, scheduledTile: &ScheduledTileNotification) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveFromSchedule)(self, scheduledTile as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scheduled_tile_notifications(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetScheduledTileNotifications)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_periodic_update(&mut self, tileContent: &super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + let hr = ((*self.lpVtbl).StartPeriodicUpdate)(self, tileContent as *const _ as *mut _, requestedInterval); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_periodic_update_at_time(&mut self, tileContent: &super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + let hr = ((*self.lpVtbl).StartPeriodicUpdateAtTime)(self, tileContent as *const _ as *mut _, startTime, requestedInterval); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop_periodic_update(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).StopPeriodicUpdate)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_periodic_update_batch(&mut self, tileContents: &super::super::foundation::collections::IIterable, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + let hr = ((*self.lpVtbl).StartPeriodicUpdateBatch)(self, tileContents as *const _ as *mut _, requestedInterval); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_periodic_update_batch_at_time(&mut self, tileContents: &super::super::foundation::collections::IIterable, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + let hr = ((*self.lpVtbl).StartPeriodicUpdateBatchAtTime)(self, tileContents as *const _ as *mut _, startTime, requestedInterval); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class TileNotification: ITileNotification [ITileNotificationFactory] [CLSID_TileNotification]} + DEFINE_CLSID!(CLSID_TileNotification = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,84,105,108,101,78,111,116,105,102,105,99,97,116,105,111,110,0]); + RT_CLASS!{class ScheduledTileNotification: IScheduledTileNotification [IScheduledTileNotificationFactory] [CLSID_ScheduledTileNotification]} + DEFINE_CLSID!(CLSID_ScheduledTileNotification = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,83,99,104,101,100,117,108,101,100,84,105,108,101,78,111,116,105,102,105,99,97,116,105,111,110,0]); + DEFINE_IID!(IID_ITileUpdater2, 2720427538, 5614, 17389, 131, 245, 101, 179, 82, 187, 26, 132); + RT_INTERFACE!{interface ITileUpdater2(ITileUpdater2Vtbl): IInspectable(IInspectableVtbl) [IID_ITileUpdater2] { + fn EnableNotificationQueueForSquare150x150(&mut self, enable: bool) -> HRESULT, + fn EnableNotificationQueueForWide310x150(&mut self, enable: bool) -> HRESULT, + fn EnableNotificationQueueForSquare310x310(&mut self, enable: bool) -> HRESULT + }} + impl ITileUpdater2 { + #[inline] pub unsafe fn enable_notification_queue_for_square150x150(&mut self, enable: bool) -> Result<()> { + let hr = ((*self.lpVtbl).EnableNotificationQueueForSquare150x150)(self, enable); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn enable_notification_queue_for_wide310x150(&mut self, enable: bool) -> Result<()> { + let hr = ((*self.lpVtbl).EnableNotificationQueueForWide310x150)(self, enable); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn enable_notification_queue_for_square310x310(&mut self, enable: bool) -> Result<()> { + let hr = ((*self.lpVtbl).EnableNotificationQueueForSquare310x310)(self, enable); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITileFlyoutUpdateManagerStatics, 70662923, 6848, 19353, 136, 231, 173, 168, 62, 149, 61, 72); + RT_INTERFACE!{static interface ITileFlyoutUpdateManagerStatics(ITileFlyoutUpdateManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ITileFlyoutUpdateManagerStatics] { + fn CreateTileFlyoutUpdaterForApplication(&mut self, out: *mut *mut TileFlyoutUpdater) -> HRESULT, + fn CreateTileFlyoutUpdaterForApplicationWithId(&mut self, applicationId: HSTRING, out: *mut *mut TileFlyoutUpdater) -> HRESULT, + fn CreateTileFlyoutUpdaterForSecondaryTile(&mut self, tileId: HSTRING, out: *mut *mut TileFlyoutUpdater) -> HRESULT, + #[cfg(feature="windows.data")] fn GetTemplateContent(&mut self, type_: TileFlyoutTemplateType, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT + }} + impl ITileFlyoutUpdateManagerStatics { + #[inline] pub unsafe fn create_tile_flyout_updater_for_application(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTileFlyoutUpdaterForApplication)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_tile_flyout_updater_for_application_with_id(&mut self, applicationId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTileFlyoutUpdaterForApplicationWithId)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_tile_flyout_updater_for_secondary_tile(&mut self, tileId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTileFlyoutUpdaterForSecondaryTile)(self, tileId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_template_content(&mut self, type_: TileFlyoutTemplateType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTemplateContent)(self, type_, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TileFlyoutUpdater: ITileFlyoutUpdater} + DEFINE_IID!(IID_ITileFlyoutUpdater, 2369832810, 50277, 16466, 167, 64, 92, 38, 84, 193, 160, 137); + RT_INTERFACE!{interface ITileFlyoutUpdater(ITileFlyoutUpdaterVtbl): IInspectable(IInspectableVtbl) [IID_ITileFlyoutUpdater] { + fn Update(&mut self, notification: *mut TileFlyoutNotification) -> HRESULT, + fn Clear(&mut self) -> HRESULT, + fn StartPeriodicUpdate(&mut self, tileFlyoutContent: *mut super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StartPeriodicUpdateAtTime(&mut self, tileFlyoutContent: *mut super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StopPeriodicUpdate(&mut self) -> HRESULT, + fn get_Setting(&mut self, out: *mut NotificationSetting) -> HRESULT + }} + impl ITileFlyoutUpdater { + #[inline] pub unsafe fn update(&mut self, notification: &TileFlyoutNotification) -> Result<()> { + let hr = ((*self.lpVtbl).Update)(self, notification as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_periodic_update(&mut self, tileFlyoutContent: &super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + let hr = ((*self.lpVtbl).StartPeriodicUpdate)(self, tileFlyoutContent as *const _ as *mut _, requestedInterval); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_periodic_update_at_time(&mut self, tileFlyoutContent: &super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + let hr = ((*self.lpVtbl).StartPeriodicUpdateAtTime)(self, tileFlyoutContent as *const _ as *mut _, startTime, requestedInterval); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop_periodic_update(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).StopPeriodicUpdate)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_setting(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Setting)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class TileFlyoutNotification: ITileFlyoutNotification [ITileFlyoutNotificationFactory] [CLSID_TileFlyoutNotification]} + DEFINE_CLSID!(CLSID_TileFlyoutNotification = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,84,105,108,101,70,108,121,111,117,116,78,111,116,105,102,105,99,97,116,105,111,110,0]); + DEFINE_IID!(IID_IBadgeUpdateManagerStatics, 859836330, 28117, 16645, 174, 188, 155, 80, 252, 164, 146, 218); + RT_INTERFACE!{static interface IBadgeUpdateManagerStatics(IBadgeUpdateManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBadgeUpdateManagerStatics] { + fn CreateBadgeUpdaterForApplication(&mut self, out: *mut *mut BadgeUpdater) -> HRESULT, + fn CreateBadgeUpdaterForApplicationWithId(&mut self, applicationId: HSTRING, out: *mut *mut BadgeUpdater) -> HRESULT, + fn CreateBadgeUpdaterForSecondaryTile(&mut self, tileId: HSTRING, out: *mut *mut BadgeUpdater) -> HRESULT, + #[cfg(feature="windows.data")] fn GetTemplateContent(&mut self, type_: BadgeTemplateType, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT + }} + impl IBadgeUpdateManagerStatics { + #[inline] pub unsafe fn create_badge_updater_for_application(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBadgeUpdaterForApplication)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_badge_updater_for_application_with_id(&mut self, applicationId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBadgeUpdaterForApplicationWithId)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_badge_updater_for_secondary_tile(&mut self, tileId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBadgeUpdaterForSecondaryTile)(self, tileId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_template_content(&mut self, type_: BadgeTemplateType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTemplateContent)(self, type_, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BadgeUpdater: IBadgeUpdater} + DEFINE_IID!(IID_IBadgeUpdateManagerStatics2, 2543465934, 63808, 18623, 148, 232, 202, 36, 77, 64, 11, 65); + RT_INTERFACE!{static interface IBadgeUpdateManagerStatics2(IBadgeUpdateManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IBadgeUpdateManagerStatics2] { + #[cfg(feature="windows.system")] fn GetForUser(&mut self, user: *mut super::super::system::User, out: *mut *mut BadgeUpdateManagerForUser) -> HRESULT + }} + impl IBadgeUpdateManagerStatics2 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user(&mut self, user: &super::super::system::User) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForUser)(self, user as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class BadgeUpdateManagerForUser: IBadgeUpdateManagerForUser} + DEFINE_IID!(IID_IBadgeUpdateManagerForUser, 2573935036, 902, 17637, 186, 141, 12, 16, 119, 166, 46, 146); + RT_INTERFACE!{interface IBadgeUpdateManagerForUser(IBadgeUpdateManagerForUserVtbl): IInspectable(IInspectableVtbl) [IID_IBadgeUpdateManagerForUser] { + fn CreateBadgeUpdaterForApplication(&mut self, out: *mut *mut BadgeUpdater) -> HRESULT, + fn CreateBadgeUpdaterForApplicationWithId(&mut self, applicationId: HSTRING, out: *mut *mut BadgeUpdater) -> HRESULT, + fn CreateBadgeUpdaterForSecondaryTile(&mut self, tileId: HSTRING, out: *mut *mut BadgeUpdater) -> HRESULT, + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT + }} + impl IBadgeUpdateManagerForUser { + #[inline] pub unsafe fn create_badge_updater_for_application(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBadgeUpdaterForApplication)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_badge_updater_for_application_with_id(&mut self, applicationId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBadgeUpdaterForApplicationWithId)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_badge_updater_for_secondary_tile(&mut self, tileId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBadgeUpdaterForSecondaryTile)(self, tileId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBadgeUpdater, 3053068244, 30050, 20332, 191, 163, 27, 110, 210, 229, 127, 47); + RT_INTERFACE!{interface IBadgeUpdater(IBadgeUpdaterVtbl): IInspectable(IInspectableVtbl) [IID_IBadgeUpdater] { + fn Update(&mut self, notification: *mut BadgeNotification) -> HRESULT, + fn Clear(&mut self) -> HRESULT, + fn StartPeriodicUpdate(&mut self, badgeContent: *mut super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StartPeriodicUpdateAtTime(&mut self, badgeContent: *mut super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StopPeriodicUpdate(&mut self) -> HRESULT + }} + impl IBadgeUpdater { + #[inline] pub unsafe fn update(&mut self, notification: &BadgeNotification) -> Result<()> { + let hr = ((*self.lpVtbl).Update)(self, notification as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_periodic_update(&mut self, badgeContent: &super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + let hr = ((*self.lpVtbl).StartPeriodicUpdate)(self, badgeContent as *const _ as *mut _, requestedInterval); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_periodic_update_at_time(&mut self, badgeContent: &super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + let hr = ((*self.lpVtbl).StartPeriodicUpdateAtTime)(self, badgeContent as *const _ as *mut _, startTime, requestedInterval); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop_periodic_update(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).StopPeriodicUpdate)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class BadgeNotification: IBadgeNotification [IBadgeNotificationFactory] [CLSID_BadgeNotification]} + DEFINE_CLSID!(CLSID_BadgeNotification = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,66,97,100,103,101,78,111,116,105,102,105,99,97,116,105,111,110,0]); + DEFINE_IID!(IID_IToastNotificationManagerStatics, 1353453631, 53813, 17816, 187, 239, 152, 254, 77, 26, 58, 212); + RT_INTERFACE!{static interface IToastNotificationManagerStatics(IToastNotificationManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationManagerStatics] { + fn CreateToastNotifier(&mut self, out: *mut *mut ToastNotifier) -> HRESULT, + fn CreateToastNotifierWithId(&mut self, applicationId: HSTRING, out: *mut *mut ToastNotifier) -> HRESULT, + #[cfg(feature="windows.data")] fn GetTemplateContent(&mut self, type_: ToastTemplateType, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT + }} + impl IToastNotificationManagerStatics { + #[inline] pub unsafe fn create_toast_notifier(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateToastNotifier)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_toast_notifier_with_id(&mut self, applicationId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateToastNotifierWithId)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_template_content(&mut self, type_: ToastTemplateType) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetTemplateContent)(self, type_, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ToastNotifier: IToastNotifier} + DEFINE_IID!(IID_IToastNotifier, 1972534163, 1011, 16876, 145, 211, 110, 91, 172, 27, 56, 231); + RT_INTERFACE!{interface IToastNotifier(IToastNotifierVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotifier] { + fn Show(&mut self, notification: *mut ToastNotification) -> HRESULT, + fn Hide(&mut self, notification: *mut ToastNotification) -> HRESULT, + fn get_Setting(&mut self, out: *mut NotificationSetting) -> HRESULT, + fn AddToSchedule(&mut self, scheduledToast: *mut ScheduledToastNotification) -> HRESULT, + fn RemoveFromSchedule(&mut self, scheduledToast: *mut ScheduledToastNotification) -> HRESULT, + fn GetScheduledToastNotifications(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IToastNotifier { + #[inline] pub unsafe fn show(&mut self, notification: &ToastNotification) -> Result<()> { + let hr = ((*self.lpVtbl).Show)(self, notification as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn hide(&mut self, notification: &ToastNotification) -> Result<()> { + let hr = ((*self.lpVtbl).Hide)(self, notification as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_setting(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Setting)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_to_schedule(&mut self, scheduledToast: &ScheduledToastNotification) -> Result<()> { + let hr = ((*self.lpVtbl).AddToSchedule)(self, scheduledToast as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_from_schedule(&mut self, scheduledToast: &ScheduledToastNotification) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveFromSchedule)(self, scheduledToast as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scheduled_toast_notifications(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetScheduledToastNotifications)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ToastNotification: IToastNotification [IToastNotificationFactory] [CLSID_ToastNotification]} + DEFINE_CLSID!(CLSID_ToastNotification = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,84,111,97,115,116,78,111,116,105,102,105,99,97,116,105,111,110,0]); + RT_CLASS!{class ScheduledToastNotification: IScheduledToastNotification [IScheduledToastNotificationFactory] [CLSID_ScheduledToastNotification]} + DEFINE_CLSID!(CLSID_ScheduledToastNotification = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,83,99,104,101,100,117,108,101,100,84,111,97,115,116,78,111,116,105,102,105,99,97,116,105,111,110,0]); + DEFINE_IID!(IID_ITileNotificationFactory, 3333152110, 18728, 18120, 189, 191, 129, 160, 71, 222, 160, 212); + RT_INTERFACE!{static interface ITileNotificationFactory(ITileNotificationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITileNotificationFactory] { + #[cfg(feature="windows.data")] fn CreateTileNotification(&mut self, content: *mut super::super::data::xml::dom::XmlDocument, out: *mut *mut TileNotification) -> HRESULT + }} + impl ITileNotificationFactory { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn create_tile_notification(&mut self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTileNotification)(self, content as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITileNotification, 3954100474, 20716, 19480, 180, 208, 58, 240, 46, 85, 64, 171); + RT_INTERFACE!{interface ITileNotification(ITileNotificationVtbl): IInspectable(IInspectableVtbl) [IID_ITileNotification] { + #[cfg(not(feature="windows.data"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.data")] fn get_Content(&mut self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, + fn put_ExpirationTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ExpirationTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Tag(&mut self, value: HSTRING) -> HRESULT, + fn get_Tag(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ITileNotification { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_expiration_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExpirationTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExpirationTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_tag(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Tag)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITileFlyoutNotificationFactory, 4015353845, 21030, 20267, 178, 120, 136, 163, 93, 254, 86, 159); + RT_INTERFACE!{static interface ITileFlyoutNotificationFactory(ITileFlyoutNotificationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITileFlyoutNotificationFactory] { + #[cfg(feature="windows.data")] fn CreateTileFlyoutNotification(&mut self, content: *mut super::super::data::xml::dom::XmlDocument, out: *mut *mut TileFlyoutNotification) -> HRESULT + }} + impl ITileFlyoutNotificationFactory { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn create_tile_flyout_notification(&mut self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTileFlyoutNotification)(self, content as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITileFlyoutNotification, 2589176417, 50956, 17086, 178, 243, 244, 42, 169, 125, 52, 229); + RT_INTERFACE!{interface ITileFlyoutNotification(ITileFlyoutNotificationVtbl): IInspectable(IInspectableVtbl) [IID_ITileFlyoutNotification] { + #[cfg(not(feature="windows.data"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.data")] fn get_Content(&mut self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, + fn put_ExpirationTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ExpirationTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl ITileFlyoutNotification { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_expiration_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExpirationTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExpirationTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBadgeNotificationFactory, 3992081870, 1560, 19801, 148, 138, 90, 97, 4, 12, 82, 249); + RT_INTERFACE!{static interface IBadgeNotificationFactory(IBadgeNotificationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBadgeNotificationFactory] { + #[cfg(feature="windows.data")] fn CreateBadgeNotification(&mut self, content: *mut super::super::data::xml::dom::XmlDocument, out: *mut *mut BadgeNotification) -> HRESULT + }} + impl IBadgeNotificationFactory { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn create_badge_notification(&mut self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBadgeNotification)(self, content as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBadgeNotification, 123516106, 53386, 20015, 146, 51, 126, 40, 156, 31, 119, 34); + RT_INTERFACE!{interface IBadgeNotification(IBadgeNotificationVtbl): IInspectable(IInspectableVtbl) [IID_IBadgeNotification] { + #[cfg(not(feature="windows.data"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.data")] fn get_Content(&mut self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, + fn put_ExpirationTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ExpirationTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + }} + impl IBadgeNotification { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_expiration_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExpirationTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExpirationTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToastNotificationFactory, 68307744, 33478, 16937, 177, 9, 253, 158, 212, 102, 43, 83); + RT_INTERFACE!{static interface IToastNotificationFactory(IToastNotificationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationFactory] { + #[cfg(feature="windows.data")] fn CreateToastNotification(&mut self, content: *mut super::super::data::xml::dom::XmlDocument, out: *mut *mut ToastNotification) -> HRESULT + }} + impl IToastNotificationFactory { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn create_toast_notification(&mut self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateToastNotification)(self, content as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToastNotification, 2575181429, 1438, 20064, 139, 6, 23, 96, 145, 124, 139, 128); + RT_INTERFACE!{interface IToastNotification(IToastNotificationVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotification] { + #[cfg(not(feature="windows.data"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.data")] fn get_Content(&mut self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, + fn put_ExpirationTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ExpirationTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn add_Dismissed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Dismissed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Activated(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Activated(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Failed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Failed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IToastNotification { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_expiration_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExpirationTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExpirationTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_dismissed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Dismissed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_dismissed(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Dismissed)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_activated(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Activated)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_activated(&mut self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Activated)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_failed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Failed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_failed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Failed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ToastDismissedEventArgs: IToastDismissedEventArgs} + RT_CLASS!{class ToastFailedEventArgs: IToastFailedEventArgs} + DEFINE_IID!(IID_IToastNotification2, 2650513361, 5178, 18702, 144, 191, 185, 251, 167, 19, 45, 231); + RT_INTERFACE!{interface IToastNotification2(IToastNotification2Vtbl): IInspectable(IInspectableVtbl) [IID_IToastNotification2] { + fn put_Tag(&mut self, value: HSTRING) -> HRESULT, + fn get_Tag(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Group(&mut self, value: HSTRING) -> HRESULT, + fn get_Group(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SuppressPopup(&mut self, value: bool) -> HRESULT, + fn get_SuppressPopup(&mut self, out: *mut bool) -> HRESULT + }} + impl IToastNotification2 { + #[inline] pub unsafe fn set_tag(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Tag)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_group(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Group)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_group(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Group)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_suppress_popup(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuppressPopup)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_suppress_popup(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SuppressPopup)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_INotification, 276838398, 60278, 20354, 151, 188, 218, 7, 83, 10, 46, 32); + RT_INTERFACE!{interface INotification(INotificationVtbl): IInspectable(IInspectableVtbl) [IID_INotification] { + fn get_ExpirationTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ExpirationTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Visual(&mut self, out: *mut *mut NotificationVisual) -> HRESULT, + fn put_Visual(&mut self, value: *mut NotificationVisual) -> HRESULT + }} + impl INotification { + #[inline] pub unsafe fn get_expiration_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExpirationTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_expiration_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExpirationTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_visual(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Visual)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_visual(&mut self, value: &NotificationVisual) -> Result<()> { + let hr = ((*self.lpVtbl).put_Visual)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class NotificationVisual: INotificationVisual} + DEFINE_IID!(IID_IToastNotification3, 837332696, 33089, 20377, 188, 10, 196, 237, 33, 41, 125, 119); + RT_INTERFACE!{interface IToastNotification3(IToastNotification3Vtbl): IInspectable(IInspectableVtbl) [IID_IToastNotification3] { + fn get_NotificationMirroring(&mut self, out: *mut NotificationMirroring) -> HRESULT, + fn put_NotificationMirroring(&mut self, value: NotificationMirroring) -> HRESULT, + fn get_RemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RemoteId(&mut self, value: HSTRING) -> HRESULT + }} + impl IToastNotification3 { + #[inline] pub unsafe fn get_notification_mirroring(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NotificationMirroring)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_notification_mirroring(&mut self, value: NotificationMirroring) -> Result<()> { + let hr = ((*self.lpVtbl).put_NotificationMirroring)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_remote_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IScheduledToastNotificationFactory, 3888042385, 3001, 16777, 131, 148, 49, 118, 27, 71, 111, 215); + RT_INTERFACE!{static interface IScheduledToastNotificationFactory(IScheduledToastNotificationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IScheduledToastNotificationFactory] { + #[cfg(feature="windows.data")] fn CreateScheduledToastNotification(&mut self, content: *mut super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime, out: *mut *mut ScheduledToastNotification) -> HRESULT, + #[cfg(feature="windows.data")] fn CreateScheduledToastNotificationRecurring(&mut self, content: *mut super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime, snoozeInterval: super::super::foundation::TimeSpan, maximumSnoozeCount: u32, out: *mut *mut ScheduledToastNotification) -> HRESULT + }} + impl IScheduledToastNotificationFactory { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn create_scheduled_toast_notification(&mut self, content: &super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateScheduledToastNotification)(self, content as *const _ as *mut _, deliveryTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.data")] #[inline] pub unsafe fn create_scheduled_toast_notification_recurring(&mut self, content: &super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime, snoozeInterval: super::super::foundation::TimeSpan, maximumSnoozeCount: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateScheduledToastNotificationRecurring)(self, content as *const _ as *mut _, deliveryTime, snoozeInterval, maximumSnoozeCount, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IScheduledToastNotification, 2046130168, 3559, 18637, 151, 64, 155, 55, 4, 144, 200, 56); + RT_INTERFACE!{interface IScheduledToastNotification(IScheduledToastNotificationVtbl): IInspectable(IInspectableVtbl) [IID_IScheduledToastNotification] { + #[cfg(not(feature="windows.data"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.data")] fn get_Content(&mut self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, + fn get_DeliveryTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_SnoozeInterval(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaximumSnoozeCount(&mut self, out: *mut u32) -> HRESULT, + fn put_Id(&mut self, value: HSTRING) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IScheduledToastNotification { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_delivery_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeliveryTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_snooze_interval(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SnoozeInterval)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_maximum_snooze_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaximumSnoozeCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Id)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IScheduledToastNotification2, 2792267932, 12724, 17328, 181, 221, 122, 64, 232, 83, 99, 177); + RT_INTERFACE!{interface IScheduledToastNotification2(IScheduledToastNotification2Vtbl): IInspectable(IInspectableVtbl) [IID_IScheduledToastNotification2] { + fn put_Tag(&mut self, value: HSTRING) -> HRESULT, + fn get_Tag(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Group(&mut self, value: HSTRING) -> HRESULT, + fn get_Group(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SuppressPopup(&mut self, value: bool) -> HRESULT, + fn get_SuppressPopup(&mut self, out: *mut bool) -> HRESULT + }} + impl IScheduledToastNotification2 { + #[inline] pub unsafe fn set_tag(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Tag)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_group(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Group)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_group(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Group)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_suppress_popup(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_SuppressPopup)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_suppress_popup(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SuppressPopup)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IScheduledToastNotification3, 2554502795, 48434, 19003, 157, 21, 34, 174, 164, 148, 98, 161); + RT_INTERFACE!{interface IScheduledToastNotification3(IScheduledToastNotification3Vtbl): IInspectable(IInspectableVtbl) [IID_IScheduledToastNotification3] { + fn get_NotificationMirroring(&mut self, out: *mut NotificationMirroring) -> HRESULT, + fn put_NotificationMirroring(&mut self, value: NotificationMirroring) -> HRESULT, + fn get_RemoteId(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_RemoteId(&mut self, value: HSTRING) -> HRESULT + }} + impl IScheduledToastNotification3 { + #[inline] pub unsafe fn get_notification_mirroring(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NotificationMirroring)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_notification_mirroring(&mut self, value: NotificationMirroring) -> Result<()> { + let hr = ((*self.lpVtbl).put_NotificationMirroring)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_remote_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemoteId)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_remote_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_RemoteId)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IScheduledTileNotificationFactory, 864228234, 39104, 19515, 187, 214, 74, 99, 60, 124, 252, 41); + RT_INTERFACE!{static interface IScheduledTileNotificationFactory(IScheduledTileNotificationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IScheduledTileNotificationFactory] { + #[cfg(feature="windows.data")] fn CreateScheduledTileNotification(&mut self, content: *mut super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime, out: *mut *mut ScheduledTileNotification) -> HRESULT + }} + impl IScheduledTileNotificationFactory { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn create_scheduled_tile_notification(&mut self, content: &super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateScheduledTileNotification)(self, content as *const _ as *mut _, deliveryTime, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IScheduledTileNotification, 180135637, 39388, 19576, 161, 28, 201, 231, 248, 109, 126, 247); + RT_INTERFACE!{interface IScheduledTileNotification(IScheduledTileNotificationVtbl): IInspectable(IInspectableVtbl) [IID_IScheduledTileNotification] { + #[cfg(not(feature="windows.data"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.data")] fn get_Content(&mut self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, + fn get_DeliveryTime(&mut self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn put_ExpirationTime(&mut self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ExpirationTime(&mut self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_Tag(&mut self, value: HSTRING) -> HRESULT, + fn get_Tag(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Id(&mut self, value: HSTRING) -> HRESULT, + fn get_Id(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IScheduledTileNotification { + #[cfg(feature="windows.data")] #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_delivery_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DeliveryTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_expiration_time(&mut self, value: &super::super::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExpirationTime)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_expiration_time(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExpirationTime)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_tag(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Tag)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_id(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Id)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_id(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Id)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToastNotificationManagerStatics2, 2058959954, 3656, 18256, 186, 157, 26, 65, 19, 152, 24, 71); + RT_INTERFACE!{static interface IToastNotificationManagerStatics2(IToastNotificationManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationManagerStatics2] { + fn get_History(&mut self, out: *mut *mut ToastNotificationHistory) -> HRESULT + }} + impl IToastNotificationManagerStatics2 { + #[inline] pub unsafe fn get_history(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_History)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ToastNotificationHistory: IToastNotificationHistory} + DEFINE_IID!(IID_IToastNotificationManagerStatics4, 2409185235, 58646, 17915, 129, 48, 57, 142, 147, 250, 82, 195); + RT_INTERFACE!{static interface IToastNotificationManagerStatics4(IToastNotificationManagerStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationManagerStatics4] { + #[cfg(not(feature="windows.system"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.system")] fn GetForUser(&mut self, user: *mut super::super::system::User, out: *mut *mut ToastNotificationManagerForUser) -> HRESULT, + fn ConfigureNotificationMirroring(&mut self, value: NotificationMirroring) -> HRESULT + }} + impl IToastNotificationManagerStatics4 { + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_for_user(&mut self, user: &super::super::system::User) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForUser)(self, user as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn configure_notification_mirroring(&mut self, value: NotificationMirroring) -> Result<()> { + let hr = ((*self.lpVtbl).ConfigureNotificationMirroring)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ToastNotificationManagerForUser: IToastNotificationManagerForUser} + DEFINE_IID!(IID_IToastNotificationManagerForUser, 2041272310, 17406, 18555, 138, 127, 153, 86, 114, 0, 174, 148); + RT_INTERFACE!{interface IToastNotificationManagerForUser(IToastNotificationManagerForUserVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationManagerForUser] { + fn CreateToastNotifier(&mut self, out: *mut *mut ToastNotifier) -> HRESULT, + fn CreateToastNotifierWithId(&mut self, applicationId: HSTRING, out: *mut *mut ToastNotifier) -> HRESULT, + fn get_History(&mut self, out: *mut *mut ToastNotificationHistory) -> HRESULT, + #[cfg(feature="windows.system")] fn get_User(&mut self, out: *mut *mut super::super::system::User) -> HRESULT + }} + impl IToastNotificationManagerForUser { + #[inline] pub unsafe fn create_toast_notifier(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateToastNotifier)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_toast_notifier_with_id(&mut self, applicationId: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateToastNotifierWithId)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_history(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_History)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.system")] #[inline] pub unsafe fn get_user(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_User)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToastNotificationHistory, 1554898019, 467, 19607, 152, 111, 5, 51, 72, 63, 238, 20); + RT_INTERFACE!{interface IToastNotificationHistory(IToastNotificationHistoryVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationHistory] { + fn RemoveGroup(&mut self, group: HSTRING) -> HRESULT, + fn RemoveGroupWithId(&mut self, group: HSTRING, applicationId: HSTRING) -> HRESULT, + fn RemoveGroupedTagWithId(&mut self, tag: HSTRING, group: HSTRING, applicationId: HSTRING) -> HRESULT, + fn RemoveGroupedTag(&mut self, tag: HSTRING, group: HSTRING) -> HRESULT, + fn Remove(&mut self, tag: HSTRING) -> HRESULT, + fn Clear(&mut self) -> HRESULT, + fn ClearWithId(&mut self, applicationId: HSTRING) -> HRESULT + }} + impl IToastNotificationHistory { + #[inline] pub unsafe fn remove_group(&mut self, group: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveGroup)(self, group.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_group_with_id(&mut self, group: &HStringArg, applicationId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveGroupWithId)(self, group.get(), applicationId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_grouped_tag_with_id(&mut self, tag: &HStringArg, group: &HStringArg, applicationId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveGroupedTagWithId)(self, tag.get(), group.get(), applicationId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_grouped_tag(&mut self, tag: &HStringArg, group: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveGroupedTag)(self, tag.get(), group.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove(&mut self, tag: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).Remove)(self, tag.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear_with_id(&mut self, applicationId: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ClearWithId)(self, applicationId.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToastNotificationHistory2, 1002689107, 12081, 16530, 145, 41, 138, 213, 171, 240, 103, 218); + RT_INTERFACE!{interface IToastNotificationHistory2(IToastNotificationHistory2Vtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationHistory2] { + fn GetHistory(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetHistoryWithId(&mut self, applicationId: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + }} + impl IToastNotificationHistory2 { + #[inline] pub unsafe fn get_history(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetHistory)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_history_with_id(&mut self, applicationId: &HStringArg) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetHistoryWithId)(self, applicationId.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToastNotificationHistoryChangedTriggerDetail, 3674439674, 104, 16684, 156, 131, 38, 124, 55, 246, 86, 112); + RT_INTERFACE!{interface IToastNotificationHistoryChangedTriggerDetail(IToastNotificationHistoryChangedTriggerDetailVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationHistoryChangedTriggerDetail] { + fn get_ChangeType(&mut self, out: *mut ToastHistoryChangedType) -> HRESULT + }} + impl IToastNotificationHistoryChangedTriggerDetail { + #[inline] pub unsafe fn get_change_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ChangeType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToastNotificationActionTriggerDetail, 2487554906, 14579, 17142, 150, 170, 121, 85, 176, 240, 61, 162); + RT_INTERFACE!{interface IToastNotificationActionTriggerDetail(IToastNotificationActionTriggerDetailVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationActionTriggerDetail] { + fn get_Argument(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_UserInput(&mut self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + }} + impl IToastNotificationActionTriggerDetail { + #[inline] pub unsafe fn get_argument(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Argument)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_user_input(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UserInput)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UserNotificationChangedEventArgs: IUserNotificationChangedEventArgs} + RT_CLASS!{class UserNotification: IUserNotification} + RT_ACTIVATABLE!{IKnownAdaptiveNotificationHintsStatics [CLSID_KnownAdaptiveNotificationHints]} + DEFINE_CLSID!(CLSID_KnownAdaptiveNotificationHints = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,75,110,111,119,110,65,100,97,112,116,105,118,101,78,111,116,105,102,105,99,97,116,105,111,110,72,105,110,116,115,0]); + RT_ACTIVATABLE!{IKnownNotificationBindingsStatics [CLSID_KnownNotificationBindings]} + DEFINE_CLSID!(CLSID_KnownNotificationBindings = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,75,110,111,119,110,78,111,116,105,102,105,99,97,116,105,111,110,66,105,110,100,105,110,103,115,0]); + RT_ACTIVATABLE!{IKnownAdaptiveNotificationTextStylesStatics [CLSID_KnownAdaptiveNotificationTextStyles]} + DEFINE_CLSID!(CLSID_KnownAdaptiveNotificationTextStyles = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,75,110,111,119,110,65,100,97,112,116,105,118,101,78,111,116,105,102,105,99,97,116,105,111,110,84,101,120,116,83,116,121,108,101,115,0]); + RT_ACTIVATABLE!{ITileUpdateManagerStatics2 [CLSID_TileUpdateManager]} + RT_ACTIVATABLE!{ITileUpdateManagerStatics [CLSID_TileUpdateManager]} + DEFINE_CLSID!(CLSID_TileUpdateManager = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,84,105,108,101,85,112,100,97,116,101,77,97,110,97,103,101,114,0]); + RT_ACTIVATABLE!{IBadgeUpdateManagerStatics [CLSID_BadgeUpdateManager]} + RT_ACTIVATABLE!{IBadgeUpdateManagerStatics2 [CLSID_BadgeUpdateManager]} + DEFINE_CLSID!(CLSID_BadgeUpdateManager = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,66,97,100,103,101,85,112,100,97,116,101,77,97,110,97,103,101,114,0]); + RT_ACTIVATABLE!{ITileFlyoutUpdateManagerStatics [CLSID_TileFlyoutUpdateManager]} + DEFINE_CLSID!(CLSID_TileFlyoutUpdateManager = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,84,105,108,101,70,108,121,111,117,116,85,112,100,97,116,101,77,97,110,97,103,101,114,0]); + RT_ACTIVATABLE!{IToastNotificationManagerStatics [CLSID_ToastNotificationManager]} + RT_ACTIVATABLE!{IToastNotificationManagerStatics4 [CLSID_ToastNotificationManager]} + RT_ACTIVATABLE!{IToastNotificationManagerStatics2 [CLSID_ToastNotificationManager]} + DEFINE_CLSID!(CLSID_ToastNotificationManager = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,84,111,97,115,116,78,111,116,105,102,105,99,97,116,105,111,110,77,97,110,97,103,101,114,0]); + RT_CLASS!{class ToastActivatedEventArgs: IToastActivatedEventArgs} + RT_CLASS!{class ToastNotificationHistoryChangedTriggerDetail: IToastNotificationHistoryChangedTriggerDetail} + RT_CLASS!{class ToastNotificationActionTriggerDetail: IToastNotificationActionTriggerDetail} +pub mod management { // Windows.UI.Notifications.Management +use ::prelude::*; + RT_ENUM! { enum UserNotificationListenerAccessStatus: i32 { + Unspecified (UserNotificationListenerAccessStatus_Unspecified) = 0, Allowed (UserNotificationListenerAccessStatus_Allowed) = 1, Denied (UserNotificationListenerAccessStatus_Denied) = 2, + }} + DEFINE_IID!(IID_IUserNotificationListenerStatics, 4284556239, 17286, 19107, 183, 61, 184, 4, 229, 182, 59, 35); + RT_INTERFACE!{static interface IUserNotificationListenerStatics(IUserNotificationListenerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUserNotificationListenerStatics] { + fn get_Current(&mut self, out: *mut *mut UserNotificationListener) -> HRESULT + }} + impl IUserNotificationListenerStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class UserNotificationListener: IUserNotificationListener} + RT_ACTIVATABLE!{IUserNotificationListenerStatics [CLSID_UserNotificationListener]} + DEFINE_CLSID!(CLSID_UserNotificationListener = &[87,105,110,100,111,119,115,46,85,73,46,78,111,116,105,102,105,99,97,116,105,111,110,115,46,77,97,110,97,103,101,109,101,110,116,46,85,115,101,114,78,111,116,105,102,105,99,97,116,105,111,110,76,105,115,116,101,110,101,114,0]); + DEFINE_IID!(IID_IUserNotificationListener, 1649753665, 35334, 19695, 130, 21, 96, 51, 165, 190, 75, 3); + RT_INTERFACE!{interface IUserNotificationListener(IUserNotificationListenerVtbl): IInspectable(IInspectableVtbl) [IID_IUserNotificationListener] { + fn RequestAccessAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetAccessStatus(&mut self, out: *mut UserNotificationListenerAccessStatus) -> HRESULT, + fn add_NotificationChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NotificationChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn GetNotificationsAsync(&mut self, kinds: super::NotificationKinds, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn GetNotification(&mut self, notificationId: u32, out: *mut *mut super::UserNotification) -> HRESULT, + fn ClearNotifications(&mut self) -> HRESULT, + fn RemoveNotification(&mut self, notificationId: u32) -> HRESULT + }} + impl IUserNotificationListener { + #[inline] pub unsafe fn request_access_async(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RequestAccessAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_access_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetAccessStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_notification_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NotificationChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_notification_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NotificationChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_notifications_async(&mut self, kinds: super::NotificationKinds) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNotificationsAsync)(self, kinds, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_notification(&mut self, notificationId: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetNotification)(self, notificationId, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_notifications(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ClearNotifications)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_notification(&mut self, notificationId: u32) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveNotification)(self, notificationId); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } +} // Windows.UI.Notifications.Management +} // Windows.UI.Notifications +pub mod text { // Windows.UI.Text +use ::prelude::*; + RT_ENUM! { enum CaretType: i32 { + Normal (CaretType_Normal) = 0, Null (CaretType_Null) = 1, + }} + RT_ENUM! { enum FindOptions: u32 { + None (FindOptions_None) = 0, Word (FindOptions_Word) = 2, Case (FindOptions_Case) = 4, + }} + RT_ENUM! { enum FormatEffect: i32 { + Off (FormatEffect_Off) = 0, On (FormatEffect_On) = 1, Toggle (FormatEffect_Toggle) = 2, Undefined (FormatEffect_Undefined) = 3, + }} + RT_ENUM! { enum HorizontalCharacterAlignment: i32 { + Left (HorizontalCharacterAlignment_Left) = 0, Right (HorizontalCharacterAlignment_Right) = 1, Center (HorizontalCharacterAlignment_Center) = 2, + }} + RT_ENUM! { enum LetterCase: i32 { + Lower (LetterCase_Lower) = 0, Upper (LetterCase_Upper) = 1, + }} + RT_ENUM! { enum LineSpacingRule: i32 { + Undefined (LineSpacingRule_Undefined) = 0, Single (LineSpacingRule_Single) = 1, OneAndHalf (LineSpacingRule_OneAndHalf) = 2, Double (LineSpacingRule_Double) = 3, AtLeast (LineSpacingRule_AtLeast) = 4, Exactly (LineSpacingRule_Exactly) = 5, Multiple (LineSpacingRule_Multiple) = 6, Percent (LineSpacingRule_Percent) = 7, + }} + RT_ENUM! { enum LinkType: i32 { + Undefined (LinkType_Undefined) = 0, NotALink (LinkType_NotALink) = 1, ClientLink (LinkType_ClientLink) = 2, FriendlyLinkName (LinkType_FriendlyLinkName) = 3, FriendlyLinkAddress (LinkType_FriendlyLinkAddress) = 4, AutoLink (LinkType_AutoLink) = 5, AutoLinkEmail (LinkType_AutoLinkEmail) = 6, AutoLinkPhone (LinkType_AutoLinkPhone) = 7, AutoLinkPath (LinkType_AutoLinkPath) = 8, + }} + RT_ENUM! { enum MarkerAlignment: i32 { + Undefined (MarkerAlignment_Undefined) = 0, Left (MarkerAlignment_Left) = 1, Center (MarkerAlignment_Center) = 2, Right (MarkerAlignment_Right) = 3, + }} + RT_ENUM! { enum MarkerStyle: i32 { + Undefined (MarkerStyle_Undefined) = 0, Parenthesis (MarkerStyle_Parenthesis) = 1, Parentheses (MarkerStyle_Parentheses) = 2, Period (MarkerStyle_Period) = 3, Plain (MarkerStyle_Plain) = 4, Minus (MarkerStyle_Minus) = 5, NoNumber (MarkerStyle_NoNumber) = 6, + }} + RT_ENUM! { enum MarkerType: i32 { + Undefined (MarkerType_Undefined) = 0, None (MarkerType_None) = 1, Bullet (MarkerType_Bullet) = 2, Arabic (MarkerType_Arabic) = 3, LowercaseEnglishLetter (MarkerType_LowercaseEnglishLetter) = 4, UppercaseEnglishLetter (MarkerType_UppercaseEnglishLetter) = 5, LowercaseRoman (MarkerType_LowercaseRoman) = 6, UppercaseRoman (MarkerType_UppercaseRoman) = 7, UnicodeSequence (MarkerType_UnicodeSequence) = 8, CircledNumber (MarkerType_CircledNumber) = 9, BlackCircleWingding (MarkerType_BlackCircleWingding) = 10, WhiteCircleWingding (MarkerType_WhiteCircleWingding) = 11, ArabicWide (MarkerType_ArabicWide) = 12, SimplifiedChinese (MarkerType_SimplifiedChinese) = 13, TraditionalChinese (MarkerType_TraditionalChinese) = 14, JapanSimplifiedChinese (MarkerType_JapanSimplifiedChinese) = 15, JapanKorea (MarkerType_JapanKorea) = 16, ArabicDictionary (MarkerType_ArabicDictionary) = 17, ArabicAbjad (MarkerType_ArabicAbjad) = 18, Hebrew (MarkerType_Hebrew) = 19, ThaiAlphabetic (MarkerType_ThaiAlphabetic) = 20, ThaiNumeric (MarkerType_ThaiNumeric) = 21, DevanagariVowel (MarkerType_DevanagariVowel) = 22, DevanagariConsonant (MarkerType_DevanagariConsonant) = 23, DevanagariNumeric (MarkerType_DevanagariNumeric) = 24, + }} + RT_ENUM! { enum ParagraphAlignment: i32 { + Undefined (ParagraphAlignment_Undefined) = 0, Left (ParagraphAlignment_Left) = 1, Center (ParagraphAlignment_Center) = 2, Right (ParagraphAlignment_Right) = 3, Justify (ParagraphAlignment_Justify) = 4, + }} + RT_ENUM! { enum ParagraphStyle: i32 { + Undefined (ParagraphStyle_Undefined) = 0, None (ParagraphStyle_None) = 1, Normal (ParagraphStyle_Normal) = 2, Heading1 (ParagraphStyle_Heading1) = 3, Heading2 (ParagraphStyle_Heading2) = 4, Heading3 (ParagraphStyle_Heading3) = 5, Heading4 (ParagraphStyle_Heading4) = 6, Heading5 (ParagraphStyle_Heading5) = 7, Heading6 (ParagraphStyle_Heading6) = 8, Heading7 (ParagraphStyle_Heading7) = 9, Heading8 (ParagraphStyle_Heading8) = 10, Heading9 (ParagraphStyle_Heading9) = 11, + }} + RT_ENUM! { enum PointOptions: u32 { + None (PointOptions_None) = 0, IncludeInset (PointOptions_IncludeInset) = 1, Start (PointOptions_Start) = 32, ClientCoordinates (PointOptions_ClientCoordinates) = 256, AllowOffClient (PointOptions_AllowOffClient) = 512, Transform (PointOptions_Transform) = 1024, NoHorizontalScroll (PointOptions_NoHorizontalScroll) = 65536, NoVerticalScroll (PointOptions_NoVerticalScroll) = 262144, + }} + RT_ENUM! { enum RangeGravity: i32 { + UIBehavior (RangeGravity_UIBehavior) = 0, Backward (RangeGravity_Backward) = 1, Forward (RangeGravity_Forward) = 2, Inward (RangeGravity_Inward) = 3, Outward (RangeGravity_Outward) = 4, + }} + RT_ENUM! { enum SelectionOptions: u32 { + StartActive (SelectionOptions_StartActive) = 1, AtEndOfLine (SelectionOptions_AtEndOfLine) = 2, Overtype (SelectionOptions_Overtype) = 4, Active (SelectionOptions_Active) = 8, Replace (SelectionOptions_Replace) = 16, + }} + RT_ENUM! { enum SelectionType: i32 { + None (SelectionType_None) = 0, InsertionPoint (SelectionType_InsertionPoint) = 1, Normal (SelectionType_Normal) = 2, InlineShape (SelectionType_InlineShape) = 7, Shape (SelectionType_Shape) = 8, + }} + RT_ENUM! { enum TabAlignment: i32 { + Left (TabAlignment_Left) = 0, Center (TabAlignment_Center) = 1, Right (TabAlignment_Right) = 2, Decimal (TabAlignment_Decimal) = 3, Bar (TabAlignment_Bar) = 4, + }} + RT_ENUM! { enum TabLeader: i32 { + Spaces (TabLeader_Spaces) = 0, Dots (TabLeader_Dots) = 1, Dashes (TabLeader_Dashes) = 2, Lines (TabLeader_Lines) = 3, ThickLines (TabLeader_ThickLines) = 4, Equals (TabLeader_Equals) = 5, + }} + RT_ENUM! { enum TextGetOptions: u32 { + None (TextGetOptions_None) = 0, AdjustCrlf (TextGetOptions_AdjustCrlf) = 1, UseCrlf (TextGetOptions_UseCrlf) = 2, UseObjectText (TextGetOptions_UseObjectText) = 4, AllowFinalEop (TextGetOptions_AllowFinalEop) = 8, NoHidden (TextGetOptions_NoHidden) = 32, IncludeNumbering (TextGetOptions_IncludeNumbering) = 64, FormatRtf (TextGetOptions_FormatRtf) = 8192, + }} + RT_ENUM! { enum TextSetOptions: u32 { + None (TextSetOptions_None) = 0, UnicodeBidi (TextSetOptions_UnicodeBidi) = 1, Unlink (TextSetOptions_Unlink) = 8, Unhide (TextSetOptions_Unhide) = 16, CheckTextLimit (TextSetOptions_CheckTextLimit) = 32, FormatRtf (TextSetOptions_FormatRtf) = 8192, ApplyRtfDocumentDefaults (TextSetOptions_ApplyRtfDocumentDefaults) = 16384, + }} + RT_ENUM! { enum TextRangeUnit: i32 { + Character (TextRangeUnit_Character) = 0, Word (TextRangeUnit_Word) = 1, Sentence (TextRangeUnit_Sentence) = 2, Paragraph (TextRangeUnit_Paragraph) = 3, Line (TextRangeUnit_Line) = 4, Story (TextRangeUnit_Story) = 5, Screen (TextRangeUnit_Screen) = 6, Section (TextRangeUnit_Section) = 7, Window (TextRangeUnit_Window) = 8, CharacterFormat (TextRangeUnit_CharacterFormat) = 9, ParagraphFormat (TextRangeUnit_ParagraphFormat) = 10, Object (TextRangeUnit_Object) = 11, HardParagraph (TextRangeUnit_HardParagraph) = 12, Cluster (TextRangeUnit_Cluster) = 13, Bold (TextRangeUnit_Bold) = 14, Italic (TextRangeUnit_Italic) = 15, Underline (TextRangeUnit_Underline) = 16, Strikethrough (TextRangeUnit_Strikethrough) = 17, ProtectedText (TextRangeUnit_ProtectedText) = 18, Link (TextRangeUnit_Link) = 19, SmallCaps (TextRangeUnit_SmallCaps) = 20, AllCaps (TextRangeUnit_AllCaps) = 21, Hidden (TextRangeUnit_Hidden) = 22, Outline (TextRangeUnit_Outline) = 23, Shadow (TextRangeUnit_Shadow) = 24, Imprint (TextRangeUnit_Imprint) = 25, Disabled (TextRangeUnit_Disabled) = 26, Revised (TextRangeUnit_Revised) = 27, Subscript (TextRangeUnit_Subscript) = 28, Superscript (TextRangeUnit_Superscript) = 29, FontBound (TextRangeUnit_FontBound) = 30, LinkProtected (TextRangeUnit_LinkProtected) = 31, + }} + RT_ENUM! { enum TextScript: i32 { + Undefined (TextScript_Undefined) = 0, Ansi (TextScript_Ansi) = 1, EastEurope (TextScript_EastEurope) = 2, Cyrillic (TextScript_Cyrillic) = 3, Greek (TextScript_Greek) = 4, Turkish (TextScript_Turkish) = 5, Hebrew (TextScript_Hebrew) = 6, Arabic (TextScript_Arabic) = 7, Baltic (TextScript_Baltic) = 8, Vietnamese (TextScript_Vietnamese) = 9, Default (TextScript_Default) = 10, Symbol (TextScript_Symbol) = 11, Thai (TextScript_Thai) = 12, ShiftJis (TextScript_ShiftJis) = 13, GB2312 (TextScript_GB2312) = 14, Hangul (TextScript_Hangul) = 15, Big5 (TextScript_Big5) = 16, PC437 (TextScript_PC437) = 17, Oem (TextScript_Oem) = 18, Mac (TextScript_Mac) = 19, Armenian (TextScript_Armenian) = 20, Syriac (TextScript_Syriac) = 21, Thaana (TextScript_Thaana) = 22, Devanagari (TextScript_Devanagari) = 23, Bengali (TextScript_Bengali) = 24, Gurmukhi (TextScript_Gurmukhi) = 25, Gujarati (TextScript_Gujarati) = 26, Oriya (TextScript_Oriya) = 27, Tamil (TextScript_Tamil) = 28, Telugu (TextScript_Telugu) = 29, Kannada (TextScript_Kannada) = 30, Malayalam (TextScript_Malayalam) = 31, Sinhala (TextScript_Sinhala) = 32, Lao (TextScript_Lao) = 33, Tibetan (TextScript_Tibetan) = 34, Myanmar (TextScript_Myanmar) = 35, Georgian (TextScript_Georgian) = 36, Jamo (TextScript_Jamo) = 37, Ethiopic (TextScript_Ethiopic) = 38, Cherokee (TextScript_Cherokee) = 39, Aboriginal (TextScript_Aboriginal) = 40, Ogham (TextScript_Ogham) = 41, Runic (TextScript_Runic) = 42, Khmer (TextScript_Khmer) = 43, Mongolian (TextScript_Mongolian) = 44, Braille (TextScript_Braille) = 45, Yi (TextScript_Yi) = 46, Limbu (TextScript_Limbu) = 47, TaiLe (TextScript_TaiLe) = 48, NewTaiLue (TextScript_NewTaiLue) = 49, SylotiNagri (TextScript_SylotiNagri) = 50, Kharoshthi (TextScript_Kharoshthi) = 51, Kayahli (TextScript_Kayahli) = 52, UnicodeSymbol (TextScript_UnicodeSymbol) = 53, Emoji (TextScript_Emoji) = 54, Glagolitic (TextScript_Glagolitic) = 55, Lisu (TextScript_Lisu) = 56, Vai (TextScript_Vai) = 57, NKo (TextScript_NKo) = 58, Osmanya (TextScript_Osmanya) = 59, PhagsPa (TextScript_PhagsPa) = 60, Gothic (TextScript_Gothic) = 61, Deseret (TextScript_Deseret) = 62, Tifinagh (TextScript_Tifinagh) = 63, + }} + RT_ENUM! { enum UnderlineType: i32 { + Undefined (UnderlineType_Undefined) = 0, None (UnderlineType_None) = 1, Single (UnderlineType_Single) = 2, Words (UnderlineType_Words) = 3, Double (UnderlineType_Double) = 4, Dotted (UnderlineType_Dotted) = 5, Dash (UnderlineType_Dash) = 6, DashDot (UnderlineType_DashDot) = 7, DashDotDot (UnderlineType_DashDotDot) = 8, Wave (UnderlineType_Wave) = 9, Thick (UnderlineType_Thick) = 10, Thin (UnderlineType_Thin) = 11, DoubleWave (UnderlineType_DoubleWave) = 12, HeavyWave (UnderlineType_HeavyWave) = 13, LongDash (UnderlineType_LongDash) = 14, ThickDash (UnderlineType_ThickDash) = 15, ThickDashDot (UnderlineType_ThickDashDot) = 16, ThickDashDotDot (UnderlineType_ThickDashDotDot) = 17, ThickDotted (UnderlineType_ThickDotted) = 18, ThickLongDash (UnderlineType_ThickLongDash) = 19, + }} + RT_ENUM! { enum VerticalCharacterAlignment: i32 { + Top (VerticalCharacterAlignment_Top) = 0, Baseline (VerticalCharacterAlignment_Baseline) = 1, Bottom (VerticalCharacterAlignment_Bottom) = 2, + }} + RT_ACTIVATABLE!{ITextConstantsStatics [CLSID_TextConstants]} + DEFINE_CLSID!(CLSID_TextConstants = &[87,105,110,100,111,119,115,46,85,73,46,84,101,120,116,46,84,101,120,116,67,111,110,115,116,97,110,116,115,0]); + DEFINE_IID!(IID_ITextConstantsStatics, 2006875187, 6301, 19450, 151, 200, 16, 219, 19, 93, 151, 110); + RT_INTERFACE!{static interface ITextConstantsStatics(ITextConstantsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ITextConstantsStatics] { + fn get_AutoColor(&mut self, out: *mut super::Color) -> HRESULT, + fn get_MinUnitCount(&mut self, out: *mut i32) -> HRESULT, + fn get_MaxUnitCount(&mut self, out: *mut i32) -> HRESULT, + fn get_UndefinedColor(&mut self, out: *mut super::Color) -> HRESULT, + fn get_UndefinedFloatValue(&mut self, out: *mut f32) -> HRESULT, + fn get_UndefinedInt32Value(&mut self, out: *mut i32) -> HRESULT, + fn get_UndefinedFontStretch(&mut self, out: *mut FontStretch) -> HRESULT, + fn get_UndefinedFontStyle(&mut self, out: *mut FontStyle) -> HRESULT + }} + impl ITextConstantsStatics { + #[inline] pub unsafe fn get_auto_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AutoColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_unit_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinUnitCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_unit_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxUnitCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_undefined_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UndefinedColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_undefined_float_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UndefinedFloatValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_undefined_int32_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UndefinedInt32Value)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_undefined_font_stretch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UndefinedFontStretch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_undefined_font_style(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UndefinedFontStyle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextDocument, 3203288539, 37042, 16524, 162, 246, 10, 10, 195, 30, 51, 228); + RT_INTERFACE!{interface ITextDocument(ITextDocumentVtbl): IInspectable(IInspectableVtbl) [IID_ITextDocument] { + fn get_CaretType(&mut self, out: *mut CaretType) -> HRESULT, + fn put_CaretType(&mut self, value: CaretType) -> HRESULT, + fn get_DefaultTabStop(&mut self, out: *mut f32) -> HRESULT, + fn put_DefaultTabStop(&mut self, value: f32) -> HRESULT, + fn get_Selection(&mut self, out: *mut *mut ITextSelection) -> HRESULT, + fn get_UndoLimit(&mut self, out: *mut u32) -> HRESULT, + fn put_UndoLimit(&mut self, value: u32) -> HRESULT, + fn CanCopy(&mut self, out: *mut bool) -> HRESULT, + fn CanPaste(&mut self, out: *mut bool) -> HRESULT, + fn CanRedo(&mut self, out: *mut bool) -> HRESULT, + fn CanUndo(&mut self, out: *mut bool) -> HRESULT, + fn ApplyDisplayUpdates(&mut self, out: *mut i32) -> HRESULT, + fn BatchDisplayUpdates(&mut self, out: *mut i32) -> HRESULT, + fn BeginUndoGroup(&mut self) -> HRESULT, + fn EndUndoGroup(&mut self) -> HRESULT, + fn GetDefaultCharacterFormat(&mut self, out: *mut *mut ITextCharacterFormat) -> HRESULT, + fn GetDefaultParagraphFormat(&mut self, out: *mut *mut ITextParagraphFormat) -> HRESULT, + fn GetRange(&mut self, startPosition: i32, endPosition: i32, out: *mut *mut ITextRange) -> HRESULT, + fn GetRangeFromPoint(&mut self, point: super::super::foundation::Point, options: PointOptions, out: *mut *mut ITextRange) -> HRESULT, + fn GetText(&mut self, options: TextGetOptions, value: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy20(&mut self) -> (), + #[cfg(feature="windows.storage")] fn LoadFromStream(&mut self, options: TextSetOptions, value: *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + fn Redo(&mut self) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy22(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SaveToStream(&mut self, options: TextGetOptions, value: *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + fn SetDefaultCharacterFormat(&mut self, value: *mut ITextCharacterFormat) -> HRESULT, + fn SetDefaultParagraphFormat(&mut self, value: *mut ITextParagraphFormat) -> HRESULT, + fn SetText(&mut self, options: TextSetOptions, value: HSTRING) -> HRESULT, + fn Undo(&mut self) -> HRESULT + }} + impl ITextDocument { + #[inline] pub unsafe fn get_caret_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CaretType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_caret_type(&mut self, value: CaretType) -> Result<()> { + let hr = ((*self.lpVtbl).put_CaretType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_tab_stop(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DefaultTabStop)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_tab_stop(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DefaultTabStop)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Selection)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_undo_limit(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UndoLimit)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_undo_limit(&mut self, value: u32) -> Result<()> { + let hr = ((*self.lpVtbl).put_UndoLimit)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn can_copy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanCopy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn can_paste(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanPaste)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn can_redo(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanRedo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn can_undo(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanUndo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn apply_display_updates(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ApplyDisplayUpdates)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn batch_display_updates(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).BatchDisplayUpdates)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn begin_undo_group(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).BeginUndoGroup)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn end_undo_group(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).EndUndoGroup)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_character_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultCharacterFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_default_paragraph_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDefaultParagraphFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_range(&mut self, startPosition: i32, endPosition: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRange)(self, startPosition, endPosition, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_range_from_point(&mut self, point: super::super::foundation::Point, options: PointOptions) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRangeFromPoint)(self, point, options, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self, options: TextGetOptions) -> Result { + let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetText)(self, options, &mut value); + if hr == S_OK { Ok(HString::wrap(value)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn load_from_stream(&mut self, options: TextSetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + let hr = ((*self.lpVtbl).LoadFromStream)(self, options, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn redo(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Redo)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn save_to_stream(&mut self, options: TextGetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + let hr = ((*self.lpVtbl).SaveToStream)(self, options, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_character_format(&mut self, value: &ITextCharacterFormat) -> Result<()> { + let hr = ((*self.lpVtbl).SetDefaultCharacterFormat)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_default_paragraph_format(&mut self, value: &ITextParagraphFormat) -> Result<()> { + let hr = ((*self.lpVtbl).SetDefaultParagraphFormat)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_text(&mut self, options: TextSetOptions, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetText)(self, options, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn undo(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Undo)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextRange, 1537101399, 49266, 17056, 137, 69, 175, 80, 62, 229, 71, 104); + RT_INTERFACE!{interface ITextRange(ITextRangeVtbl): IInspectable(IInspectableVtbl) [IID_ITextRange] { + fn get_Character(&mut self, out: *mut Char) -> HRESULT, + fn put_Character(&mut self, value: Char) -> HRESULT, + fn get_CharacterFormat(&mut self, out: *mut *mut ITextCharacterFormat) -> HRESULT, + fn put_CharacterFormat(&mut self, value: *mut ITextCharacterFormat) -> HRESULT, + fn get_FormattedText(&mut self, out: *mut *mut ITextRange) -> HRESULT, + fn put_FormattedText(&mut self, value: *mut ITextRange) -> HRESULT, + fn get_EndPosition(&mut self, out: *mut i32) -> HRESULT, + fn put_EndPosition(&mut self, value: i32) -> HRESULT, + fn get_Gravity(&mut self, out: *mut RangeGravity) -> HRESULT, + fn put_Gravity(&mut self, value: RangeGravity) -> HRESULT, + fn get_Length(&mut self, out: *mut i32) -> HRESULT, + fn get_Link(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Link(&mut self, value: HSTRING) -> HRESULT, + fn get_ParagraphFormat(&mut self, out: *mut *mut ITextParagraphFormat) -> HRESULT, + fn put_ParagraphFormat(&mut self, value: *mut ITextParagraphFormat) -> HRESULT, + fn get_StartPosition(&mut self, out: *mut i32) -> HRESULT, + fn put_StartPosition(&mut self, value: i32) -> HRESULT, + fn get_StoryLength(&mut self, out: *mut i32) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Text(&mut self, value: HSTRING) -> HRESULT, + fn CanPaste(&mut self, format: i32, out: *mut bool) -> HRESULT, + fn ChangeCase(&mut self, value: LetterCase) -> HRESULT, + fn Collapse(&mut self, value: bool) -> HRESULT, + fn Copy(&mut self) -> HRESULT, + fn Cut(&mut self) -> HRESULT, + fn Delete(&mut self, unit: TextRangeUnit, count: i32, out: *mut i32) -> HRESULT, + fn EndOf(&mut self, unit: TextRangeUnit, extend: bool, out: *mut i32) -> HRESULT, + fn Expand(&mut self, unit: TextRangeUnit, out: *mut i32) -> HRESULT, + fn FindText(&mut self, value: HSTRING, scanLength: i32, options: FindOptions, out: *mut i32) -> HRESULT, + fn GetCharacterUtf32(&mut self, value: *mut u32, offset: i32) -> HRESULT, + fn GetClone(&mut self, out: *mut *mut ITextRange) -> HRESULT, + fn GetIndex(&mut self, unit: TextRangeUnit, out: *mut i32) -> HRESULT, + fn GetPoint(&mut self, horizontalAlign: HorizontalCharacterAlignment, verticalAlign: VerticalCharacterAlignment, options: PointOptions, point: *mut super::super::foundation::Point) -> HRESULT, + fn GetRect(&mut self, options: PointOptions, rect: *mut super::super::foundation::Rect, hit: *mut i32) -> HRESULT, + fn GetText(&mut self, options: TextGetOptions, value: *mut HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy35(&mut self) -> (), + #[cfg(feature="windows.storage")] fn GetTextViaStream(&mut self, options: TextGetOptions, value: *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + fn InRange(&mut self, range: *mut ITextRange, out: *mut bool) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy37(&mut self) -> (), + #[cfg(feature="windows.storage")] fn InsertImage(&mut self, width: i32, height: i32, ascent: i32, verticalAlign: VerticalCharacterAlignment, alternateText: HSTRING, value: *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + fn InStory(&mut self, range: *mut ITextRange, out: *mut bool) -> HRESULT, + fn IsEqual(&mut self, range: *mut ITextRange, out: *mut bool) -> HRESULT, + fn Move(&mut self, unit: TextRangeUnit, count: i32, out: *mut i32) -> HRESULT, + fn MoveEnd(&mut self, unit: TextRangeUnit, count: i32, out: *mut i32) -> HRESULT, + fn MoveStart(&mut self, unit: TextRangeUnit, count: i32, out: *mut i32) -> HRESULT, + fn Paste(&mut self, format: i32) -> HRESULT, + fn ScrollIntoView(&mut self, value: PointOptions) -> HRESULT, + fn MatchSelection(&mut self) -> HRESULT, + fn SetIndex(&mut self, unit: TextRangeUnit, index: i32, extend: bool) -> HRESULT, + fn SetPoint(&mut self, point: super::super::foundation::Point, options: PointOptions, extend: bool) -> HRESULT, + fn SetRange(&mut self, startPosition: i32, endPosition: i32) -> HRESULT, + fn SetText(&mut self, options: TextSetOptions, value: HSTRING) -> HRESULT, + #[cfg(not(feature="windows.storage"))] fn __Dummy50(&mut self) -> (), + #[cfg(feature="windows.storage")] fn SetTextViaStream(&mut self, options: TextSetOptions, value: *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, + fn StartOf(&mut self, unit: TextRangeUnit, extend: bool, out: *mut i32) -> HRESULT + }} + impl ITextRange { + #[inline] pub unsafe fn get_character(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Character)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_character(&mut self, value: Char) -> Result<()> { + let hr = ((*self.lpVtbl).put_Character)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CharacterFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_character_format(&mut self, value: &ITextCharacterFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_CharacterFormat)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_formatted_text(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FormattedText)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_formatted_text(&mut self, value: &ITextRange) -> Result<()> { + let hr = ((*self.lpVtbl).put_FormattedText)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_end_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EndPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_end_position(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_EndPosition)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_gravity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Gravity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_gravity(&mut self, value: RangeGravity) -> Result<()> { + let hr = ((*self.lpVtbl).put_Gravity)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_link(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Link)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_link(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Link)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_paragraph_format(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ParagraphFormat)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_paragraph_format(&mut self, value: &ITextParagraphFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_ParagraphFormat)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_start_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_start_position(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_StartPosition)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_story_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StoryLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Text)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn can_paste(&mut self, format: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CanPaste)(self, format, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn change_case(&mut self, value: LetterCase) -> Result<()> { + let hr = ((*self.lpVtbl).ChangeCase)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn collapse(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).Collapse)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn copy(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Copy)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn cut(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Cut)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn delete(&mut self, unit: TextRangeUnit, count: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Delete)(self, unit, count, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn end_of(&mut self, unit: TextRangeUnit, extend: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).EndOf)(self, unit, extend, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn expand(&mut self, unit: TextRangeUnit) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Expand)(self, unit, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn find_text(&mut self, value: &HStringArg, scanLength: i32, options: FindOptions) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FindText)(self, value.get(), scanLength, options, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_utf32(&mut self, offset: i32) -> Result { + let mut value = zeroed(); + let hr = ((*self.lpVtbl).GetCharacterUtf32)(self, &mut value, offset); + if hr == S_OK { Ok(value) } else { err(hr) } + } + #[inline] pub unsafe fn get_clone(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetClone)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_index(&mut self, unit: TextRangeUnit) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetIndex)(self, unit, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_point(&mut self, horizontalAlign: HorizontalCharacterAlignment, verticalAlign: VerticalCharacterAlignment, options: PointOptions) -> Result { + let mut point = zeroed(); + let hr = ((*self.lpVtbl).GetPoint)(self, horizontalAlign, verticalAlign, options, &mut point); + if hr == S_OK { Ok(point) } else { err(hr) } + } + #[inline] pub unsafe fn get_rect(&mut self, options: PointOptions) -> Result<(super::super::foundation::Rect, i32)> { + let mut rect = zeroed(); let mut hit = zeroed(); + let hr = ((*self.lpVtbl).GetRect)(self, options, &mut rect, &mut hit); + if hr == S_OK { Ok((rect, hit)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self, options: TextGetOptions) -> Result { + let mut value = null_mut(); + let hr = ((*self.lpVtbl).GetText)(self, options, &mut value); + if hr == S_OK { Ok(HString::wrap(value)) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn get_text_via_stream(&mut self, options: TextGetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + let hr = ((*self.lpVtbl).GetTextViaStream)(self, options, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn in_range(&mut self, range: &ITextRange) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).InRange)(self, range as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn insert_image(&mut self, width: i32, height: i32, ascent: i32, verticalAlign: VerticalCharacterAlignment, alternateText: &HStringArg, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + let hr = ((*self.lpVtbl).InsertImage)(self, width, height, ascent, verticalAlign, alternateText.get(), value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn in_story(&mut self, range: &ITextRange) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).InStory)(self, range as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn is_equal(&mut self, range: &ITextRange) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEqual)(self, range as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn move_(&mut self, unit: TextRangeUnit, count: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Move)(self, unit, count, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn move_end(&mut self, unit: TextRangeUnit, count: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).MoveEnd)(self, unit, count, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn move_start(&mut self, unit: TextRangeUnit, count: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).MoveStart)(self, unit, count, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn paste(&mut self, format: i32) -> Result<()> { + let hr = ((*self.lpVtbl).Paste)(self, format); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn scroll_into_view(&mut self, value: PointOptions) -> Result<()> { + let hr = ((*self.lpVtbl).ScrollIntoView)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn match_selection(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).MatchSelection)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_index(&mut self, unit: TextRangeUnit, index: i32, extend: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetIndex)(self, unit, index, extend); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_point(&mut self, point: super::super::foundation::Point, options: PointOptions, extend: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetPoint)(self, point, options, extend); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_range(&mut self, startPosition: i32, endPosition: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetRange)(self, startPosition, endPosition); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_text(&mut self, options: TextSetOptions, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).SetText)(self, options, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.storage")] #[inline] pub unsafe fn set_text_via_stream(&mut self, options: TextSetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + let hr = ((*self.lpVtbl).SetTextViaStream)(self, options, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_of(&mut self, unit: TextRangeUnit, extend: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).StartOf)(self, unit, extend, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextSelection, 2798872356, 62095, 17162, 178, 207, 195, 67, 103, 30, 192, 233); + RT_INTERFACE!{interface ITextSelection(ITextSelectionVtbl): IInspectable(IInspectableVtbl) [IID_ITextSelection] { + fn get_Options(&mut self, out: *mut SelectionOptions) -> HRESULT, + fn put_Options(&mut self, value: SelectionOptions) -> HRESULT, + fn get_Type(&mut self, out: *mut SelectionType) -> HRESULT, + fn EndKey(&mut self, unit: TextRangeUnit, extend: bool, out: *mut i32) -> HRESULT, + fn HomeKey(&mut self, unit: TextRangeUnit, extend: bool, out: *mut i32) -> HRESULT, + fn MoveDown(&mut self, unit: TextRangeUnit, count: i32, extend: bool, out: *mut i32) -> HRESULT, + fn MoveLeft(&mut self, unit: TextRangeUnit, count: i32, extend: bool, out: *mut i32) -> HRESULT, + fn MoveRight(&mut self, unit: TextRangeUnit, count: i32, extend: bool, out: *mut i32) -> HRESULT, + fn MoveUp(&mut self, unit: TextRangeUnit, count: i32, extend: bool, out: *mut i32) -> HRESULT, + fn TypeText(&mut self, value: HSTRING) -> HRESULT + }} + impl ITextSelection { + #[inline] pub unsafe fn get_options(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Options)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_options(&mut self, value: SelectionOptions) -> Result<()> { + let hr = ((*self.lpVtbl).put_Options)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Type)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn end_key(&mut self, unit: TextRangeUnit, extend: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).EndKey)(self, unit, extend, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn home_key(&mut self, unit: TextRangeUnit, extend: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).HomeKey)(self, unit, extend, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn move_down(&mut self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).MoveDown)(self, unit, count, extend, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn move_left(&mut self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).MoveLeft)(self, unit, count, extend, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn move_right(&mut self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).MoveRight)(self, unit, count, extend, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn move_up(&mut self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).MoveUp)(self, unit, count, extend, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn type_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).TypeText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextCharacterFormat, 1524560859, 1531, 17453, 128, 101, 100, 42, 254, 160, 44, 237); + RT_INTERFACE!{interface ITextCharacterFormat(ITextCharacterFormatVtbl): IInspectable(IInspectableVtbl) [IID_ITextCharacterFormat] { + fn get_AllCaps(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_AllCaps(&mut self, value: FormatEffect) -> HRESULT, + fn get_BackgroundColor(&mut self, out: *mut super::Color) -> HRESULT, + fn put_BackgroundColor(&mut self, value: super::Color) -> HRESULT, + fn get_Bold(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_Bold(&mut self, value: FormatEffect) -> HRESULT, + fn get_FontStretch(&mut self, out: *mut FontStretch) -> HRESULT, + fn put_FontStretch(&mut self, value: FontStretch) -> HRESULT, + fn get_FontStyle(&mut self, out: *mut FontStyle) -> HRESULT, + fn put_FontStyle(&mut self, value: FontStyle) -> HRESULT, + fn get_ForegroundColor(&mut self, out: *mut super::Color) -> HRESULT, + fn put_ForegroundColor(&mut self, value: super::Color) -> HRESULT, + fn get_Hidden(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_Hidden(&mut self, value: FormatEffect) -> HRESULT, + fn get_Italic(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_Italic(&mut self, value: FormatEffect) -> HRESULT, + fn get_Kerning(&mut self, out: *mut f32) -> HRESULT, + fn put_Kerning(&mut self, value: f32) -> HRESULT, + fn get_LanguageTag(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_LanguageTag(&mut self, value: HSTRING) -> HRESULT, + fn get_LinkType(&mut self, out: *mut LinkType) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_Outline(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_Outline(&mut self, value: FormatEffect) -> HRESULT, + fn get_Position(&mut self, out: *mut f32) -> HRESULT, + fn put_Position(&mut self, value: f32) -> HRESULT, + fn get_ProtectedText(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_ProtectedText(&mut self, value: FormatEffect) -> HRESULT, + fn get_Size(&mut self, out: *mut f32) -> HRESULT, + fn put_Size(&mut self, value: f32) -> HRESULT, + fn get_SmallCaps(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_SmallCaps(&mut self, value: FormatEffect) -> HRESULT, + fn get_Spacing(&mut self, out: *mut f32) -> HRESULT, + fn put_Spacing(&mut self, value: f32) -> HRESULT, + fn get_Strikethrough(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_Strikethrough(&mut self, value: FormatEffect) -> HRESULT, + fn get_Subscript(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_Subscript(&mut self, value: FormatEffect) -> HRESULT, + fn get_Superscript(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_Superscript(&mut self, value: FormatEffect) -> HRESULT, + fn get_TextScript(&mut self, out: *mut TextScript) -> HRESULT, + fn put_TextScript(&mut self, value: TextScript) -> HRESULT, + fn get_Underline(&mut self, out: *mut UnderlineType) -> HRESULT, + fn put_Underline(&mut self, value: UnderlineType) -> HRESULT, + fn get_Weight(&mut self, out: *mut i32) -> HRESULT, + fn put_Weight(&mut self, value: i32) -> HRESULT, + fn SetClone(&mut self, value: *mut ITextCharacterFormat) -> HRESULT, + fn GetClone(&mut self, out: *mut *mut ITextCharacterFormat) -> HRESULT, + fn IsEqual(&mut self, format: *mut ITextCharacterFormat, out: *mut bool) -> HRESULT + }} + impl ITextCharacterFormat { + #[inline] pub unsafe fn get_all_caps(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllCaps)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_all_caps(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllCaps)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BackgroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_background_color(&mut self, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_BackgroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bold(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bold)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bold(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_Bold)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_stretch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStretch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_stretch(&mut self, value: FontStretch) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontStretch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_style(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStyle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_style(&mut self, value: FontStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontStyle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ForegroundColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_foreground_color(&mut self, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_ForegroundColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hidden(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Hidden)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_hidden(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_Hidden)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_italic(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Italic)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_italic(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_Italic)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_kerning(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Kerning)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_kerning(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Kerning)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_language_tag(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LanguageTag)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_language_tag(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_LanguageTag)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_link_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LinkType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Outline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outline(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_Outline)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Position)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_protected_text(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ProtectedText)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_protected_text(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_ProtectedText)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_size(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Size)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_small_caps(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SmallCaps)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_small_caps(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_SmallCaps)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_spacing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Spacing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_spacing(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Spacing)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_strikethrough(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Strikethrough)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_strikethrough(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_Strikethrough)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_subscript(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Subscript)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_subscript(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_Subscript)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_superscript(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Superscript)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_superscript(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_Superscript)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_script(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextScript)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_script(&mut self, value: TextScript) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextScript)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_underline(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Underline)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_underline(&mut self, value: UnderlineType) -> Result<()> { + let hr = ((*self.lpVtbl).put_Underline)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_weight(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Weight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_weight(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Weight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_clone(&mut self, value: &ITextCharacterFormat) -> Result<()> { + let hr = ((*self.lpVtbl).SetClone)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_clone(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetClone)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn is_equal(&mut self, format: &ITextCharacterFormat) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEqual)(self, format as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextParagraphFormat, 754503590, 18038, 18826, 147, 245, 187, 219, 252, 11, 216, 131); + RT_INTERFACE!{interface ITextParagraphFormat(ITextParagraphFormatVtbl): IInspectable(IInspectableVtbl) [IID_ITextParagraphFormat] { + fn get_Alignment(&mut self, out: *mut ParagraphAlignment) -> HRESULT, + fn put_Alignment(&mut self, value: ParagraphAlignment) -> HRESULT, + fn get_FirstLineIndent(&mut self, out: *mut f32) -> HRESULT, + fn get_KeepTogether(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_KeepTogether(&mut self, value: FormatEffect) -> HRESULT, + fn get_KeepWithNext(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_KeepWithNext(&mut self, value: FormatEffect) -> HRESULT, + fn get_LeftIndent(&mut self, out: *mut f32) -> HRESULT, + fn get_LineSpacing(&mut self, out: *mut f32) -> HRESULT, + fn get_LineSpacingRule(&mut self, out: *mut LineSpacingRule) -> HRESULT, + fn get_ListAlignment(&mut self, out: *mut MarkerAlignment) -> HRESULT, + fn put_ListAlignment(&mut self, value: MarkerAlignment) -> HRESULT, + fn get_ListLevelIndex(&mut self, out: *mut i32) -> HRESULT, + fn put_ListLevelIndex(&mut self, value: i32) -> HRESULT, + fn get_ListStart(&mut self, out: *mut i32) -> HRESULT, + fn put_ListStart(&mut self, value: i32) -> HRESULT, + fn get_ListStyle(&mut self, out: *mut MarkerStyle) -> HRESULT, + fn put_ListStyle(&mut self, value: MarkerStyle) -> HRESULT, + fn get_ListTab(&mut self, out: *mut f32) -> HRESULT, + fn put_ListTab(&mut self, value: f32) -> HRESULT, + fn get_ListType(&mut self, out: *mut MarkerType) -> HRESULT, + fn put_ListType(&mut self, value: MarkerType) -> HRESULT, + fn get_NoLineNumber(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_NoLineNumber(&mut self, value: FormatEffect) -> HRESULT, + fn get_PageBreakBefore(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_PageBreakBefore(&mut self, value: FormatEffect) -> HRESULT, + fn get_RightIndent(&mut self, out: *mut f32) -> HRESULT, + fn put_RightIndent(&mut self, value: f32) -> HRESULT, + fn get_RightToLeft(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_RightToLeft(&mut self, value: FormatEffect) -> HRESULT, + fn get_Style(&mut self, out: *mut ParagraphStyle) -> HRESULT, + fn put_Style(&mut self, value: ParagraphStyle) -> HRESULT, + fn get_SpaceAfter(&mut self, out: *mut f32) -> HRESULT, + fn put_SpaceAfter(&mut self, value: f32) -> HRESULT, + fn get_SpaceBefore(&mut self, out: *mut f32) -> HRESULT, + fn put_SpaceBefore(&mut self, value: f32) -> HRESULT, + fn get_WidowControl(&mut self, out: *mut FormatEffect) -> HRESULT, + fn put_WidowControl(&mut self, value: FormatEffect) -> HRESULT, + fn get_TabCount(&mut self, out: *mut i32) -> HRESULT, + fn AddTab(&mut self, position: f32, align: TabAlignment, leader: TabLeader) -> HRESULT, + fn ClearAllTabs(&mut self) -> HRESULT, + fn DeleteTab(&mut self, position: f32) -> HRESULT, + fn GetClone(&mut self, out: *mut *mut ITextParagraphFormat) -> HRESULT, + fn GetTab(&mut self, index: i32, position: *mut f32, align: *mut TabAlignment, leader: *mut TabLeader) -> HRESULT, + fn IsEqual(&mut self, format: *mut ITextParagraphFormat, out: *mut bool) -> HRESULT, + fn SetClone(&mut self, format: *mut ITextParagraphFormat) -> HRESULT, + fn SetIndents(&mut self, start: f32, left: f32, right: f32) -> HRESULT, + fn SetLineSpacing(&mut self, rule: LineSpacingRule, spacing: f32) -> HRESULT + }} + impl ITextParagraphFormat { + #[inline] pub unsafe fn get_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Alignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_alignment(&mut self, value: ParagraphAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_Alignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_first_line_indent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FirstLineIndent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_keep_together(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeepTogether)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_keep_together(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeepTogether)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_keep_with_next(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeepWithNext)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_keep_with_next(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_KeepWithNext)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_left_indent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LeftIndent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_spacing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineSpacing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_spacing_rule(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineSpacingRule)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_list_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ListAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_list_alignment(&mut self, value: MarkerAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_ListAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_list_level_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ListLevelIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_list_level_index(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ListLevelIndex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_list_start(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ListStart)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_list_start(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ListStart)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_list_style(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ListStyle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_list_style(&mut self, value: MarkerStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_ListStyle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_list_tab(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ListTab)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_list_tab(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ListTab)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_list_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ListType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_list_type(&mut self, value: MarkerType) -> Result<()> { + let hr = ((*self.lpVtbl).put_ListType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_no_line_number(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NoLineNumber)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_no_line_number(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_NoLineNumber)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_page_break_before(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PageBreakBefore)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_page_break_before(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_PageBreakBefore)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_right_indent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RightIndent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_right_indent(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RightIndent)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_right_to_left(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RightToLeft)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_right_to_left(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_RightToLeft)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_style(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Style)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_style(&mut self, value: ParagraphStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_Style)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_space_after(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpaceAfter)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_space_after(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SpaceAfter)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_space_before(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpaceBefore)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_space_before(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SpaceBefore)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_widow_control(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_WidowControl)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_widow_control(&mut self, value: FormatEffect) -> Result<()> { + let hr = ((*self.lpVtbl).put_WidowControl)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tab_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TabCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_tab(&mut self, position: f32, align: TabAlignment, leader: TabLeader) -> Result<()> { + let hr = ((*self.lpVtbl).AddTab)(self, position, align, leader); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear_all_tabs(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ClearAllTabs)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn delete_tab(&mut self, position: f32) -> Result<()> { + let hr = ((*self.lpVtbl).DeleteTab)(self, position); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_clone(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetClone)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tab(&mut self, index: i32) -> Result<(f32, TabAlignment, TabLeader)> { + let mut position = zeroed(); let mut align = zeroed(); let mut leader = zeroed(); + let hr = ((*self.lpVtbl).GetTab)(self, index, &mut position, &mut align, &mut leader); + if hr == S_OK { Ok((position, align, leader)) } else { err(hr) } + } + #[inline] pub unsafe fn is_equal(&mut self, format: &ITextParagraphFormat) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsEqual)(self, format as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_clone(&mut self, format: &ITextParagraphFormat) -> Result<()> { + let hr = ((*self.lpVtbl).SetClone)(self, format as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_indents(&mut self, start: f32, left: f32, right: f32) -> Result<()> { + let hr = ((*self.lpVtbl).SetIndents)(self, start, left, right); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_spacing(&mut self, rule: LineSpacingRule, spacing: f32) -> Result<()> { + let hr = ((*self.lpVtbl).SetLineSpacing)(self, rule, spacing); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_ENUM! { enum FontStretch: i32 { + Undefined (FontStretch_Undefined) = 0, UltraCondensed (FontStretch_UltraCondensed) = 1, ExtraCondensed (FontStretch_ExtraCondensed) = 2, Condensed (FontStretch_Condensed) = 3, SemiCondensed (FontStretch_SemiCondensed) = 4, Normal (FontStretch_Normal) = 5, SemiExpanded (FontStretch_SemiExpanded) = 6, Expanded (FontStretch_Expanded) = 7, ExtraExpanded (FontStretch_ExtraExpanded) = 8, UltraExpanded (FontStretch_UltraExpanded) = 9, + }} + RT_ENUM! { enum FontStyle: i32 { + Normal (FontStyle_Normal) = 0, Oblique (FontStyle_Oblique) = 1, Italic (FontStyle_Italic) = 2, + }} + RT_STRUCT! { struct FontWeight { + Weight: u16, + }} + DEFINE_IID!(IID_IFontWeights, 2021696580, 427, 18839, 133, 23, 223, 130, 42, 12, 69, 241); + RT_INTERFACE!{interface IFontWeights(IFontWeightsVtbl): IInspectable(IInspectableVtbl) [IID_IFontWeights] { + + }} + DEFINE_IID!(IID_IFontWeightsStatics, 3015014869, 7081, 18667, 157, 173, 192, 149, 232, 194, 59, 163); + RT_INTERFACE!{static interface IFontWeightsStatics(IFontWeightsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFontWeightsStatics] { + fn get_Black(&mut self, out: *mut FontWeight) -> HRESULT, + fn get_Bold(&mut self, out: *mut FontWeight) -> HRESULT, + fn get_ExtraBlack(&mut self, out: *mut FontWeight) -> HRESULT, + fn get_ExtraBold(&mut self, out: *mut FontWeight) -> HRESULT, + fn get_ExtraLight(&mut self, out: *mut FontWeight) -> HRESULT, + fn get_Light(&mut self, out: *mut FontWeight) -> HRESULT, + fn get_Medium(&mut self, out: *mut FontWeight) -> HRESULT, + fn get_Normal(&mut self, out: *mut FontWeight) -> HRESULT, + fn get_SemiBold(&mut self, out: *mut FontWeight) -> HRESULT, + fn get_SemiLight(&mut self, out: *mut FontWeight) -> HRESULT, + fn get_Thin(&mut self, out: *mut FontWeight) -> HRESULT + }} + impl IFontWeightsStatics { + #[inline] pub unsafe fn get_black(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Black)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bold(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bold)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extra_black(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtraBlack)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extra_bold(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtraBold)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_extra_light(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtraLight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_light(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Light)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_medium(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Medium)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_normal(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Normal)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_semi_bold(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SemiBold)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_semi_light(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SemiLight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_thin(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Thin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class FontWeights: IFontWeights} + RT_ACTIVATABLE!{IFontWeightsStatics [CLSID_FontWeights]} + DEFINE_CLSID!(CLSID_FontWeights = &[87,105,110,100,111,119,115,46,85,73,46,84,101,120,116,46,70,111,110,116,87,101,105,103,104,116,115,0]); +pub mod core { // Windows.UI.Text.Core +use ::prelude::*; + RT_ENUM! { enum CoreTextInputScope: i32 { + Default (CoreTextInputScope_Default) = 0, Url (CoreTextInputScope_Url) = 1, FilePath (CoreTextInputScope_FilePath) = 2, FileName (CoreTextInputScope_FileName) = 3, EmailUserName (CoreTextInputScope_EmailUserName) = 4, EmailAddress (CoreTextInputScope_EmailAddress) = 5, UserName (CoreTextInputScope_UserName) = 6, PersonalFullName (CoreTextInputScope_PersonalFullName) = 7, PersonalNamePrefix (CoreTextInputScope_PersonalNamePrefix) = 8, PersonalGivenName (CoreTextInputScope_PersonalGivenName) = 9, PersonalMiddleName (CoreTextInputScope_PersonalMiddleName) = 10, PersonalSurname (CoreTextInputScope_PersonalSurname) = 11, PersonalNameSuffix (CoreTextInputScope_PersonalNameSuffix) = 12, Address (CoreTextInputScope_Address) = 13, AddressPostalCode (CoreTextInputScope_AddressPostalCode) = 14, AddressStreet (CoreTextInputScope_AddressStreet) = 15, AddressStateOrProvince (CoreTextInputScope_AddressStateOrProvince) = 16, AddressCity (CoreTextInputScope_AddressCity) = 17, AddressCountryName (CoreTextInputScope_AddressCountryName) = 18, AddressCountryShortName (CoreTextInputScope_AddressCountryShortName) = 19, CurrencyAmountAndSymbol (CoreTextInputScope_CurrencyAmountAndSymbol) = 20, CurrencyAmount (CoreTextInputScope_CurrencyAmount) = 21, Date (CoreTextInputScope_Date) = 22, DateMonth (CoreTextInputScope_DateMonth) = 23, DateDay (CoreTextInputScope_DateDay) = 24, DateYear (CoreTextInputScope_DateYear) = 25, DateMonthName (CoreTextInputScope_DateMonthName) = 26, DateDayName (CoreTextInputScope_DateDayName) = 27, Number (CoreTextInputScope_Number) = 29, SingleCharacter (CoreTextInputScope_SingleCharacter) = 30, Password (CoreTextInputScope_Password) = 31, TelephoneNumber (CoreTextInputScope_TelephoneNumber) = 32, TelephoneCountryCode (CoreTextInputScope_TelephoneCountryCode) = 33, TelephoneAreaCode (CoreTextInputScope_TelephoneAreaCode) = 34, TelephoneLocalNumber (CoreTextInputScope_TelephoneLocalNumber) = 35, Time (CoreTextInputScope_Time) = 36, TimeHour (CoreTextInputScope_TimeHour) = 37, TimeMinuteOrSecond (CoreTextInputScope_TimeMinuteOrSecond) = 38, NumberFullWidth (CoreTextInputScope_NumberFullWidth) = 39, AlphanumericHalfWidth (CoreTextInputScope_AlphanumericHalfWidth) = 40, AlphanumericFullWidth (CoreTextInputScope_AlphanumericFullWidth) = 41, CurrencyChinese (CoreTextInputScope_CurrencyChinese) = 42, Bopomofo (CoreTextInputScope_Bopomofo) = 43, Hiragana (CoreTextInputScope_Hiragana) = 44, KatakanaHalfWidth (CoreTextInputScope_KatakanaHalfWidth) = 45, KatakanaFullWidth (CoreTextInputScope_KatakanaFullWidth) = 46, Hanja (CoreTextInputScope_Hanja) = 47, HangulHalfWidth (CoreTextInputScope_HangulHalfWidth) = 48, HangulFullWidth (CoreTextInputScope_HangulFullWidth) = 49, Search (CoreTextInputScope_Search) = 50, Formula (CoreTextInputScope_Formula) = 51, SearchIncremental (CoreTextInputScope_SearchIncremental) = 52, ChineseHalfWidth (CoreTextInputScope_ChineseHalfWidth) = 53, ChineseFullWidth (CoreTextInputScope_ChineseFullWidth) = 54, NativeScript (CoreTextInputScope_NativeScript) = 55, Text (CoreTextInputScope_Text) = 57, Chat (CoreTextInputScope_Chat) = 58, NameOrPhoneNumber (CoreTextInputScope_NameOrPhoneNumber) = 59, EmailUserNameOrAddress (CoreTextInputScope_EmailUserNameOrAddress) = 60, Private (CoreTextInputScope_Private) = 61, Maps (CoreTextInputScope_Maps) = 62, PasswordNumeric (CoreTextInputScope_PasswordNumeric) = 63, FormulaNumber (CoreTextInputScope_FormulaNumber) = 67, ChatWithoutEmoji (CoreTextInputScope_ChatWithoutEmoji) = 68, + }} + RT_ENUM! { enum CoreTextInputPaneDisplayPolicy: i32 { + Automatic (CoreTextInputPaneDisplayPolicy_Automatic) = 0, Manual (CoreTextInputPaneDisplayPolicy_Manual) = 1, + }} + RT_ENUM! { enum CoreTextTextUpdatingResult: i32 { + Succeeded (CoreTextTextUpdatingResult_Succeeded) = 0, Failed (CoreTextTextUpdatingResult_Failed) = 1, + }} + RT_ENUM! { enum CoreTextSelectionUpdatingResult: i32 { + Succeeded (CoreTextSelectionUpdatingResult_Succeeded) = 0, Failed (CoreTextSelectionUpdatingResult_Failed) = 1, + }} + RT_ENUM! { enum CoreTextFormatUpdatingResult: i32 { + Succeeded (CoreTextFormatUpdatingResult_Succeeded) = 0, Failed (CoreTextFormatUpdatingResult_Failed) = 1, + }} + RT_ENUM! { enum CoreTextFormatUpdatingReason: i32 { + None (CoreTextFormatUpdatingReason_None) = 0, CompositionUnconverted (CoreTextFormatUpdatingReason_CompositionUnconverted) = 1, CompositionConverted (CoreTextFormatUpdatingReason_CompositionConverted) = 2, CompositionTargetUnconverted (CoreTextFormatUpdatingReason_CompositionTargetUnconverted) = 3, CompositionTargetConverted (CoreTextFormatUpdatingReason_CompositionTargetConverted) = 4, + }} + RT_STRUCT! { struct CoreTextRange { + StartCaretPosition: i32, EndCaretPosition: i32, + }} + DEFINE_IID!(IID_ICoreTextTextRequest, 1356419241, 62750, 19649, 140, 161, 230, 52, 109, 26, 97, 190); + RT_INTERFACE!{interface ICoreTextTextRequest(ICoreTextTextRequestVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextTextRequest] { + fn get_Range(&mut self, out: *mut CoreTextRange) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Text(&mut self, value: HSTRING) -> HRESULT, + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl ICoreTextTextRequest { + #[inline] pub unsafe fn get_range(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Range)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Text)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreTextTextRequestedEventArgs, 4036403920, 16838, 19458, 139, 26, 217, 83, 176, 12, 171, 179); + RT_INTERFACE!{interface ICoreTextTextRequestedEventArgs(ICoreTextTextRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextTextRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut CoreTextTextRequest) -> HRESULT + }} + impl ICoreTextTextRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CoreTextTextRequest: ICoreTextTextRequest} + DEFINE_IID!(IID_ICoreTextSelectionRequest, 4037477379, 8331, 17153, 136, 60, 116, 202, 116, 133, 253, 141); + RT_INTERFACE!{interface ICoreTextSelectionRequest(ICoreTextSelectionRequestVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextSelectionRequest] { + fn get_Selection(&mut self, out: *mut CoreTextRange) -> HRESULT, + fn put_Selection(&mut self, value: CoreTextRange) -> HRESULT, + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl ICoreTextSelectionRequest { + #[inline] pub unsafe fn get_selection(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Selection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_selection(&mut self, value: CoreTextRange) -> Result<()> { + let hr = ((*self.lpVtbl).put_Selection)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreTextSelectionRequestedEventArgs, 331769899, 62996, 16922, 143, 75, 158, 200, 165, 163, 127, 205); + RT_INTERFACE!{interface ICoreTextSelectionRequestedEventArgs(ICoreTextSelectionRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextSelectionRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut CoreTextSelectionRequest) -> HRESULT + }} + impl ICoreTextSelectionRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CoreTextSelectionRequest: ICoreTextSelectionRequest} + DEFINE_IID!(IID_ICoreTextLayoutBounds, 3916614004, 17462, 18711, 128, 208, 165, 37, 228, 202, 103, 128); + RT_INTERFACE!{interface ICoreTextLayoutBounds(ICoreTextLayoutBoundsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextLayoutBounds] { + fn get_TextBounds(&mut self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn put_TextBounds(&mut self, value: ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn get_ControlBounds(&mut self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn put_ControlBounds(&mut self, value: ::rt::gen::windows::foundation::Rect) -> HRESULT + }} + impl ICoreTextLayoutBounds { + #[inline] pub unsafe fn get_text_bounds(&mut self) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextBounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_bounds(&mut self, value: ::rt::gen::windows::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextBounds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_control_bounds(&mut self) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ControlBounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_control_bounds(&mut self, value: ::rt::gen::windows::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).put_ControlBounds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreTextLayoutRequest, 626370764, 20989, 20227, 152, 191, 172, 120, 23, 77, 104, 224); + RT_INTERFACE!{interface ICoreTextLayoutRequest(ICoreTextLayoutRequestVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextLayoutRequest] { + fn get_Range(&mut self, out: *mut CoreTextRange) -> HRESULT, + fn get_LayoutBounds(&mut self, out: *mut *mut CoreTextLayoutBounds) -> HRESULT, + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl ICoreTextLayoutRequest { + #[inline] pub unsafe fn get_range(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Range)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_layout_bounds(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LayoutBounds)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CoreTextLayoutBounds: ICoreTextLayoutBounds} + DEFINE_IID!(IID_ICoreTextLayoutRequestedEventArgs, 2984012512, 39547, 20126, 165, 102, 74, 107, 95, 138, 214, 118); + RT_INTERFACE!{interface ICoreTextLayoutRequestedEventArgs(ICoreTextLayoutRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextLayoutRequestedEventArgs] { + fn get_Request(&mut self, out: *mut *mut CoreTextLayoutRequest) -> HRESULT + }} + impl ICoreTextLayoutRequestedEventArgs { + #[inline] pub unsafe fn get_request(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Request)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CoreTextLayoutRequest: ICoreTextLayoutRequest} + DEFINE_IID!(IID_ICoreTextTextUpdatingEventArgs, 4003959181, 52267, 20227, 143, 246, 2, 253, 33, 125, 180, 80); + RT_INTERFACE!{interface ICoreTextTextUpdatingEventArgs(ICoreTextTextUpdatingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextTextUpdatingEventArgs] { + fn get_Range(&mut self, out: *mut CoreTextRange) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_NewSelection(&mut self, out: *mut CoreTextRange) -> HRESULT, + #[cfg(not(feature="windows.globalization"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.globalization")] fn get_InputLanguage(&mut self, out: *mut *mut ::rt::gen::windows::globalization::Language) -> HRESULT, + fn get_Result(&mut self, out: *mut CoreTextTextUpdatingResult) -> HRESULT, + fn put_Result(&mut self, value: CoreTextTextUpdatingResult) -> HRESULT, + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl ICoreTextTextUpdatingEventArgs { + #[inline] pub unsafe fn get_range(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Range)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_selection(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewSelection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_input_language(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputLanguage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Result)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_result(&mut self, value: CoreTextTextUpdatingResult) -> Result<()> { + let hr = ((*self.lpVtbl).put_Result)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreTextSelectionUpdatingEventArgs, 3561325471, 65151, 19413, 138, 38, 9, 34, 193, 179, 230, 57); + RT_INTERFACE!{interface ICoreTextSelectionUpdatingEventArgs(ICoreTextSelectionUpdatingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextSelectionUpdatingEventArgs] { + fn get_Selection(&mut self, out: *mut CoreTextRange) -> HRESULT, + fn get_Result(&mut self, out: *mut CoreTextSelectionUpdatingResult) -> HRESULT, + fn put_Result(&mut self, value: CoreTextSelectionUpdatingResult) -> HRESULT, + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl ICoreTextSelectionUpdatingEventArgs { + #[inline] pub unsafe fn get_selection(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Selection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Result)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_result(&mut self, value: CoreTextSelectionUpdatingResult) -> Result<()> { + let hr = ((*self.lpVtbl).put_Result)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreTextFormatUpdatingEventArgs, 1930476851, 46248, 17329, 179, 123, 7, 36, 212, 172, 167, 171); + RT_INTERFACE!{interface ICoreTextFormatUpdatingEventArgs(ICoreTextFormatUpdatingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextFormatUpdatingEventArgs] { + fn get_Range(&mut self, out: *mut CoreTextRange) -> HRESULT, + fn get_TextColor(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_BackgroundColor(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_UnderlineColor(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_UnderlineType(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_Reason(&mut self, out: *mut CoreTextFormatUpdatingReason) -> HRESULT, + fn get_Result(&mut self, out: *mut CoreTextFormatUpdatingResult) -> HRESULT, + fn put_Result(&mut self, value: CoreTextFormatUpdatingResult) -> HRESULT, + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl ICoreTextFormatUpdatingEventArgs { + #[inline] pub unsafe fn get_range(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Range)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BackgroundColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_underline_color(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UnderlineColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_underline_type(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UnderlineType)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_reason(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Reason)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Result)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_result(&mut self, value: CoreTextFormatUpdatingResult) -> Result<()> { + let hr = ((*self.lpVtbl).put_Result)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreTextCompositionStartedEventArgs, 661329577, 25831, 19120, 188, 75, 160, 45, 115, 131, 91, 251); + RT_INTERFACE!{interface ICoreTextCompositionStartedEventArgs(ICoreTextCompositionStartedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextCompositionStartedEventArgs] { + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl ICoreTextCompositionStartedEventArgs { + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreTextCompositionCompletedEventArgs, 523561910, 47007, 16673, 165, 231, 253, 169, 184, 97, 110, 48); + RT_INTERFACE!{interface ICoreTextCompositionCompletedEventArgs(ICoreTextCompositionCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextCompositionCompletedEventArgs] { + fn get_IsCanceled(&mut self, out: *mut bool) -> HRESULT, + fn get_CompositionSegments(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + }} + impl ICoreTextCompositionCompletedEventArgs { + #[inline] pub unsafe fn get_is_canceled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCanceled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_composition_segments(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CompositionSegments)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CoreTextCompositionSegment: ICoreTextCompositionSegment} + DEFINE_IID!(IID_ICoreTextEditContext2, 2978381243, 2107, 18913, 178, 129, 43, 53, 214, 43, 244, 102); + RT_INTERFACE!{interface ICoreTextEditContext2(ICoreTextEditContext2Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextEditContext2] { + fn add_NotifyFocusLeaveCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_NotifyFocusLeaveCompleted(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICoreTextEditContext2 { + #[inline] pub unsafe fn add_notify_focus_leave_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_NotifyFocusLeaveCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_notify_focus_leave_completed(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_NotifyFocusLeaveCompleted)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CoreTextEditContext: ICoreTextEditContext} + DEFINE_IID!(IID_ICoreTextEditContext, 3211135151, 16449, 18371, 178, 99, 169, 24, 235, 94, 174, 242); + RT_INTERFACE!{interface ICoreTextEditContext(ICoreTextEditContextVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextEditContext] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_InputScope(&mut self, out: *mut CoreTextInputScope) -> HRESULT, + fn put_InputScope(&mut self, value: CoreTextInputScope) -> HRESULT, + fn get_IsReadOnly(&mut self, out: *mut bool) -> HRESULT, + fn put_IsReadOnly(&mut self, value: bool) -> HRESULT, + fn get_InputPaneDisplayPolicy(&mut self, out: *mut CoreTextInputPaneDisplayPolicy) -> HRESULT, + fn put_InputPaneDisplayPolicy(&mut self, value: CoreTextInputPaneDisplayPolicy) -> HRESULT, + fn add_TextRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextRequested(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SelectionRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectionRequested(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_LayoutRequested(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LayoutRequested(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_TextUpdating(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextUpdating(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SelectionUpdating(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectionUpdating(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_FormatUpdating(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FormatUpdating(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_CompositionStarted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CompositionStarted(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_CompositionCompleted(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CompositionCompleted(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_FocusRemoved(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_FocusRemoved(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn NotifyFocusEnter(&mut self) -> HRESULT, + fn NotifyFocusLeave(&mut self) -> HRESULT, + fn NotifyTextChanged(&mut self, modifiedRange: CoreTextRange, newLength: i32, newSelection: CoreTextRange) -> HRESULT, + fn NotifySelectionChanged(&mut self, selection: CoreTextRange) -> HRESULT, + fn NotifyLayoutChanged(&mut self) -> HRESULT + }} + impl ICoreTextEditContext { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_scope(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InputScope)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_input_scope(&mut self, value: CoreTextInputScope) -> Result<()> { + let hr = ((*self.lpVtbl).put_InputScope)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_read_only(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsReadOnly)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_read_only(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsReadOnly)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_pane_display_policy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InputPaneDisplayPolicy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_input_pane_display_policy(&mut self, value: CoreTextInputPaneDisplayPolicy) -> Result<()> { + let hr = ((*self.lpVtbl).put_InputPaneDisplayPolicy)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_text_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_requested(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextRequested)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_selection_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SelectionRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_selection_requested(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SelectionRequested)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_layout_requested(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LayoutRequested)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_layout_requested(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LayoutRequested)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_text_updating(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextUpdating)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_updating(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextUpdating)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_selection_updating(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SelectionUpdating)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_selection_updating(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SelectionUpdating)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_format_updating(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FormatUpdating)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_format_updating(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FormatUpdating)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_composition_started(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CompositionStarted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_composition_started(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CompositionStarted)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_composition_completed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CompositionCompleted)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_composition_completed(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CompositionCompleted)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_focus_removed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_FocusRemoved)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_focus_removed(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_FocusRemoved)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_focus_enter(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyFocusEnter)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_focus_leave(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyFocusLeave)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_text_changed(&mut self, modifiedRange: CoreTextRange, newLength: i32, newSelection: CoreTextRange) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyTextChanged)(self, modifiedRange, newLength, newSelection); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_selection_changed(&mut self, selection: CoreTextRange) -> Result<()> { + let hr = ((*self.lpVtbl).NotifySelectionChanged)(self, selection); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn notify_layout_changed(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).NotifyLayoutChanged)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CoreTextTextRequestedEventArgs: ICoreTextTextRequestedEventArgs} + RT_CLASS!{class CoreTextSelectionRequestedEventArgs: ICoreTextSelectionRequestedEventArgs} + RT_CLASS!{class CoreTextLayoutRequestedEventArgs: ICoreTextLayoutRequestedEventArgs} + RT_CLASS!{class CoreTextTextUpdatingEventArgs: ICoreTextTextUpdatingEventArgs} + RT_CLASS!{class CoreTextSelectionUpdatingEventArgs: ICoreTextSelectionUpdatingEventArgs} + RT_CLASS!{class CoreTextFormatUpdatingEventArgs: ICoreTextFormatUpdatingEventArgs} + RT_CLASS!{class CoreTextCompositionStartedEventArgs: ICoreTextCompositionStartedEventArgs} + RT_CLASS!{class CoreTextCompositionCompletedEventArgs: ICoreTextCompositionCompletedEventArgs} + DEFINE_IID!(IID_ICoreTextServicesManager, 3260054915, 28170, 19082, 189, 248, 25, 72, 135, 72, 84, 186); + RT_INTERFACE!{interface ICoreTextServicesManager(ICoreTextServicesManagerVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextServicesManager] { + #[cfg(not(feature="windows.globalization"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.globalization")] fn get_InputLanguage(&mut self, out: *mut *mut ::rt::gen::windows::globalization::Language) -> HRESULT, + fn add_InputLanguageChanged(&mut self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_InputLanguageChanged(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn CreateEditContext(&mut self, out: *mut *mut CoreTextEditContext) -> HRESULT + }} + impl ICoreTextServicesManager { + #[cfg(feature="windows.globalization")] #[inline] pub unsafe fn get_input_language(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputLanguage)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_input_language_changed(&mut self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_InputLanguageChanged)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_input_language_changed(&mut self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_InputLanguageChanged)(self, cookie); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn create_edit_context(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateEditContext)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CoreTextServicesManager: ICoreTextServicesManager} + RT_ACTIVATABLE!{ICoreTextServicesManagerStatics [CLSID_CoreTextServicesManager]} + DEFINE_CLSID!(CLSID_CoreTextServicesManager = &[87,105,110,100,111,119,115,46,85,73,46,84,101,120,116,46,67,111,114,101,46,67,111,114,101,84,101,120,116,83,101,114,118,105,99,101,115,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_ICoreTextServicesManagerStatics, 354460552, 58063, 19813, 174, 185, 179, 45, 134, 254, 57, 185); + RT_INTERFACE!{static interface ICoreTextServicesManagerStatics(ICoreTextServicesManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextServicesManagerStatics] { + fn GetForCurrentView(&mut self, out: *mut *mut CoreTextServicesManager) -> HRESULT + }} + impl ICoreTextServicesManagerStatics { + #[inline] pub unsafe fn get_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreTextServicesStatics, 2441452102, 60623, 18340, 138, 231, 9, 138, 156, 111, 187, 21); + RT_INTERFACE!{static interface ICoreTextServicesStatics(ICoreTextServicesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextServicesStatics] { + fn get_HiddenCharacter(&mut self, out: *mut Char) -> HRESULT + }} + impl ICoreTextServicesStatics { + #[inline] pub unsafe fn get_hidden_character(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HiddenCharacter)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICoreTextCompositionSegment, 2003594201, 20141, 19879, 143, 71, 58, 136, 181, 35, 204, 52); + RT_INTERFACE!{interface ICoreTextCompositionSegment(ICoreTextCompositionSegmentVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextCompositionSegment] { + fn get_PreconversionString(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Range(&mut self, out: *mut CoreTextRange) -> HRESULT + }} + impl ICoreTextCompositionSegment { + #[inline] pub unsafe fn get_preconversion_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreconversionString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_range(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Range)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_ACTIVATABLE!{ICoreTextServicesStatics [CLSID_CoreTextServicesConstants]} + DEFINE_CLSID!(CLSID_CoreTextServicesConstants = &[87,105,110,100,111,119,115,46,85,73,46,84,101,120,116,46,67,111,114,101,46,67,111,114,101,84,101,120,116,83,101,114,118,105,99,101,115,67,111,110,115,116,97,110,116,115,0]); +} // Windows.UI.Text.Core +} // Windows.UI.Text +pub mod composition { // Windows.UI.Composition +use ::prelude::*; + RT_ENUM! { enum AnimationDirection: i32 { + Normal (AnimationDirection_Normal) = 0, Reverse (AnimationDirection_Reverse) = 1, Alternate (AnimationDirection_Alternate) = 2, AlternateReverse (AnimationDirection_AlternateReverse) = 3, + }} + RT_ENUM! { enum AnimationIterationBehavior: i32 { + Count (AnimationIterationBehavior_Count) = 0, Forever (AnimationIterationBehavior_Forever) = 1, + }} + RT_ENUM! { enum AnimationStopBehavior: i32 { + LeaveCurrentValue (AnimationStopBehavior_LeaveCurrentValue) = 0, SetToInitialValue (AnimationStopBehavior_SetToInitialValue) = 1, SetToFinalValue (AnimationStopBehavior_SetToFinalValue) = 2, + }} + RT_ENUM! { enum CompositionBatchTypes: u32 { + None (CompositionBatchTypes_None) = 0, Animation (CompositionBatchTypes_Animation) = 1, Effect (CompositionBatchTypes_Effect) = 2, + }} + RT_ENUM! { enum CompositionBackfaceVisibility: i32 { + Inherit (CompositionBackfaceVisibility_Inherit) = 0, Visible (CompositionBackfaceVisibility_Visible) = 1, Hidden (CompositionBackfaceVisibility_Hidden) = 2, + }} + RT_ENUM! { enum CompositionBitmapInterpolationMode: i32 { + NearestNeighbor (CompositionBitmapInterpolationMode_NearestNeighbor) = 0, Linear (CompositionBitmapInterpolationMode_Linear) = 1, + }} + RT_ENUM! { enum CompositionBorderMode: i32 { + Inherit (CompositionBorderMode_Inherit) = 0, Soft (CompositionBorderMode_Soft) = 1, Hard (CompositionBorderMode_Hard) = 2, + }} + RT_ENUM! { enum CompositionColorSpace: i32 { + Auto (CompositionColorSpace_Auto) = 0, Hsl (CompositionColorSpace_Hsl) = 1, Rgb (CompositionColorSpace_Rgb) = 2, + }} + RT_ENUM! { enum CompositionCompositeMode: i32 { + Inherit (CompositionCompositeMode_Inherit) = 0, SourceOver (CompositionCompositeMode_SourceOver) = 1, DestinationInvert (CompositionCompositeMode_DestinationInvert) = 2, MinBlend (CompositionCompositeMode_MinBlend) = 3, + }} + RT_ENUM! { enum CompositionEffectFactoryLoadStatus: i32 { + Success (CompositionEffectFactoryLoadStatus_Success) = 0, EffectTooComplex (CompositionEffectFactoryLoadStatus_EffectTooComplex) = 1, Pending (CompositionEffectFactoryLoadStatus_Pending) = 2, Other (CompositionEffectFactoryLoadStatus_Other) = -1, + }} + RT_ENUM! { enum CompositionGetValueStatus: i32 { + Succeeded (CompositionGetValueStatus_Succeeded) = 0, TypeMismatch (CompositionGetValueStatus_TypeMismatch) = 1, NotFound (CompositionGetValueStatus_NotFound) = 2, + }} + RT_ENUM! { enum CompositionStretch: i32 { + None (CompositionStretch_None) = 0, Fill (CompositionStretch_Fill) = 1, Uniform (CompositionStretch_Uniform) = 2, UniformToFill (CompositionStretch_UniformToFill) = 3, + }} + DEFINE_IID!(IID_IAmbientLight, 2759930017, 47044, 18167, 185, 191, 218, 244, 58, 68, 230, 238); + RT_INTERFACE!{interface IAmbientLight(IAmbientLightVtbl): IInspectable(IInspectableVtbl) [IID_IAmbientLight] { + fn get_Color(&mut self, out: *mut super::Color) -> HRESULT, + fn put_Color(&mut self, value: super::Color) -> HRESULT + }} + impl IAmbientLight { + #[inline] pub unsafe fn get_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_color(&mut self, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_Color)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IColorKeyFrameAnimation, 2477635049, 36357, 17811, 132, 163, 220, 161, 82, 120, 30, 86); + RT_INTERFACE!{interface IColorKeyFrameAnimation(IColorKeyFrameAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IColorKeyFrameAnimation] { + fn get_InterpolationColorSpace(&mut self, out: *mut CompositionColorSpace) -> HRESULT, + fn put_InterpolationColorSpace(&mut self, value: CompositionColorSpace) -> HRESULT, + fn InsertKeyFrame(&mut self, normalizedProgressKey: f32, value: super::Color) -> HRESULT, + fn InsertKeyFrameWithEasingFunction(&mut self, normalizedProgressKey: f32, value: super::Color, easingFunction: *mut CompositionEasingFunction) -> HRESULT + }} + impl IColorKeyFrameAnimation { + #[inline] pub unsafe fn get_interpolation_color_space(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InterpolationColorSpace)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_interpolation_color_space(&mut self, value: CompositionColorSpace) -> Result<()> { + let hr = ((*self.lpVtbl).put_InterpolationColorSpace)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_key_frame(&mut self, normalizedProgressKey: f32, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrame)(self, normalizedProgressKey, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_key_frame_with_easing_function(&mut self, normalizedProgressKey: f32, value: super::Color, easingFunction: &CompositionEasingFunction) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self, normalizedProgressKey, value, easingFunction as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionAnimation, 1179405356, 7338, 16481, 155, 64, 225, 63, 222, 21, 3, 202); + RT_INTERFACE!{interface ICompositionAnimation(ICompositionAnimationVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionAnimation] { + fn ClearAllParameters(&mut self) -> HRESULT, + fn ClearParameter(&mut self, key: HSTRING) -> HRESULT, + fn SetColorParameter(&mut self, key: HSTRING, value: super::Color) -> HRESULT, + fn SetMatrix3x2Parameter(&mut self, key: HSTRING, value: super::super::foundation::numerics::Matrix3x2) -> HRESULT, + fn SetMatrix4x4Parameter(&mut self, key: HSTRING, value: super::super::foundation::numerics::Matrix4x4) -> HRESULT, + fn SetQuaternionParameter(&mut self, key: HSTRING, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn SetReferenceParameter(&mut self, key: HSTRING, compositionObject: *mut CompositionObject) -> HRESULT, + fn SetScalarParameter(&mut self, key: HSTRING, value: f32) -> HRESULT, + fn SetVector2Parameter(&mut self, key: HSTRING, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn SetVector3Parameter(&mut self, key: HSTRING, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn SetVector4Parameter(&mut self, key: HSTRING, value: super::super::foundation::numerics::Vector4) -> HRESULT + }} + impl ICompositionAnimation { + #[inline] pub unsafe fn clear_all_parameters(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ClearAllParameters)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear_parameter(&mut self, key: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).ClearParameter)(self, key.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_color_parameter(&mut self, key: &HStringArg, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).SetColorParameter)(self, key.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_matrix3x2_parameter(&mut self, key: &HStringArg, value: super::super::foundation::numerics::Matrix3x2) -> Result<()> { + let hr = ((*self.lpVtbl).SetMatrix3x2Parameter)(self, key.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_matrix4x4_parameter(&mut self, key: &HStringArg, value: super::super::foundation::numerics::Matrix4x4) -> Result<()> { + let hr = ((*self.lpVtbl).SetMatrix4x4Parameter)(self, key.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_quaternion_parameter(&mut self, key: &HStringArg, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + let hr = ((*self.lpVtbl).SetQuaternionParameter)(self, key.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_reference_parameter(&mut self, key: &HStringArg, compositionObject: &CompositionObject) -> Result<()> { + let hr = ((*self.lpVtbl).SetReferenceParameter)(self, key.get(), compositionObject as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_scalar_parameter(&mut self, key: &HStringArg, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).SetScalarParameter)(self, key.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_vector2_parameter(&mut self, key: &HStringArg, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).SetVector2Parameter)(self, key.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_vector3_parameter(&mut self, key: &HStringArg, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).SetVector3Parameter)(self, key.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_vector4_parameter(&mut self, key: &HStringArg, value: super::super::foundation::numerics::Vector4) -> Result<()> { + let hr = ((*self.lpVtbl).SetVector4Parameter)(self, key.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CompositionObject: ICompositionObject} + DEFINE_IID!(IID_ICompositionAnimation2, 916152382, 43023, 18760, 147, 227, 237, 35, 251, 56, 198, 203); + RT_INTERFACE!{interface ICompositionAnimation2(ICompositionAnimation2Vtbl): IInspectable(IInspectableVtbl) [IID_ICompositionAnimation2] { + fn SetBooleanParameter(&mut self, key: HSTRING, value: bool) -> HRESULT, + fn get_Target(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Target(&mut self, value: HSTRING) -> HRESULT + }} + impl ICompositionAnimation2 { + #[inline] pub unsafe fn set_boolean_parameter(&mut self, key: &HStringArg, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetBooleanParameter)(self, key.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_target(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Target)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_target(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Target)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionAnimationBase, 472656281, 59416, 18643, 166, 221, 215, 140, 130, 248, 172, 233); + RT_INTERFACE!{interface ICompositionAnimationBase(ICompositionAnimationBaseVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionAnimationBase] { + + }} + DEFINE_IID!(IID_ICompositionAnimationGroup, 1585236236, 52500, 19975, 138, 85, 199, 37, 39, 170, 189, 172); + RT_INTERFACE!{interface ICompositionAnimationGroup(ICompositionAnimationGroupVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionAnimationGroup] { + fn get_Count(&mut self, out: *mut i32) -> HRESULT, + fn Add(&mut self, value: *mut CompositionAnimation) -> HRESULT, + fn Remove(&mut self, value: *mut CompositionAnimation) -> HRESULT, + fn RemoveAll(&mut self) -> HRESULT + }} + impl ICompositionAnimationGroup { + #[inline] pub unsafe fn get_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Count)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add(&mut self, value: &CompositionAnimation) -> Result<()> { + let hr = ((*self.lpVtbl).Add)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove(&mut self, value: &CompositionAnimation) -> Result<()> { + let hr = ((*self.lpVtbl).Remove)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CompositionAnimation: ICompositionAnimation} + DEFINE_IID!(IID_ICompositionBackdropBrush, 3316428376, 14488, 18846, 141, 127, 34, 78, 145, 40, 106, 93); + RT_INTERFACE!{interface ICompositionBackdropBrush(ICompositionBackdropBrushVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionBackdropBrush] { + + }} + DEFINE_IID!(IID_ICompositionBatchCompletedEventArgs, 218159824, 37988, 17674, 165, 98, 46, 38, 152, 176, 168, 18); + RT_INTERFACE!{interface ICompositionBatchCompletedEventArgs(ICompositionBatchCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionBatchCompletedEventArgs] { + + }} + DEFINE_IID!(IID_ICompositionBrush, 2869786120, 12480, 16617, 181, 104, 182, 10, 107, 209, 251, 70); + RT_INTERFACE!{interface ICompositionBrush(ICompositionBrushVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionBrush] { + + }} + DEFINE_IID!(IID_ICompositionClip, 483207762, 53191, 19150, 153, 131, 20, 107, 184, 235, 106, 60); + RT_INTERFACE!{interface ICompositionClip(ICompositionClipVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionClip] { + + }} + DEFINE_IID!(IID_ICompositionClip2, 1486086249, 13590, 16609, 137, 224, 91, 169, 36, 146, 114, 53); + RT_INTERFACE!{interface ICompositionClip2(ICompositionClip2Vtbl): IInspectable(IInspectableVtbl) [IID_ICompositionClip2] { + fn get_AnchorPoint(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, + fn put_AnchorPoint(&mut self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_CenterPoint(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, + fn put_CenterPoint(&mut self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_Offset(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, + fn put_Offset(&mut self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_RotationAngle(&mut self, out: *mut f32) -> HRESULT, + fn put_RotationAngle(&mut self, value: f32) -> HRESULT, + fn get_RotationAngleInDegrees(&mut self, out: *mut f32) -> HRESULT, + fn put_RotationAngleInDegrees(&mut self, value: f32) -> HRESULT, + fn get_Scale(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, + fn put_Scale(&mut self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_TransformMatrix(&mut self, out: *mut super::super::foundation::numerics::Matrix3x2) -> HRESULT, + fn put_TransformMatrix(&mut self, value: super::super::foundation::numerics::Matrix3x2) -> HRESULT + }} + impl ICompositionClip2 { + #[inline] pub unsafe fn get_anchor_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AnchorPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_anchor_point(&mut self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).put_AnchorPoint)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_center_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CenterPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_center_point(&mut self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).put_CenterPoint)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Offset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_offset(&mut self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).put_Offset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RotationAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rotation_angle(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RotationAngle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation_angle_in_degrees(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RotationAngleInDegrees)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rotation_angle_in_degrees(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RotationAngleInDegrees)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Scale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scale(&mut self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).put_Scale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_transform_matrix(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TransformMatrix)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_transform_matrix(&mut self, value: super::super::foundation::numerics::Matrix3x2) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransformMatrix)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionColorBrush, 723930206, 48949, 18481, 134, 66, 207, 112, 194, 15, 255, 47); + RT_INTERFACE!{interface ICompositionColorBrush(ICompositionColorBrushVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionColorBrush] { + fn get_Color(&mut self, out: *mut super::Color) -> HRESULT, + fn put_Color(&mut self, value: super::Color) -> HRESULT + }} + impl ICompositionColorBrush { + #[inline] pub unsafe fn get_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_color(&mut self, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_Color)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionCommitBatch, 218159824, 51719, 17408, 140, 142, 203, 93, 176, 133, 89, 204); + RT_INTERFACE!{interface ICompositionCommitBatch(ICompositionCommitBatchVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionCommitBatch] { + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn get_IsEnded(&mut self, out: *mut bool) -> HRESULT, + fn add_Completed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICompositionCommitBatch { + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_ended(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnded)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Completed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Completed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CompositionBatchCompletedEventArgs: ICompositionBatchCompletedEventArgs} + DEFINE_IID!(IID_ICompositionDrawingSurface, 2707866368, 64208, 19729, 158, 103, 228, 51, 22, 47, 244, 158); + RT_INTERFACE!{interface ICompositionDrawingSurface(ICompositionDrawingSurfaceVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionDrawingSurface] { + #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_AlphaMode(&mut self, out: *mut super::super::graphics::directx::DirectXAlphaMode) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_PixelFormat(&mut self, out: *mut super::super::graphics::directx::DirectXPixelFormat) -> HRESULT, + fn get_Size(&mut self, out: *mut super::super::foundation::Size) -> HRESULT + }} + impl ICompositionDrawingSurface { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_alpha_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AlphaMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_pixel_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PixelFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionEasingFunction, 1363534678, 49017, 20136, 140, 194, 107, 91, 71, 46, 108, 154); + RT_INTERFACE!{interface ICompositionEasingFunction(ICompositionEasingFunctionVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionEasingFunction] { + + }} + RT_CLASS!{class CompositionEasingFunction: ICompositionEasingFunction} + DEFINE_IID!(IID_ICompositionEffectBrush, 3212802398, 33740, 17599, 164, 71, 62, 60, 7, 23, 137, 236); + RT_INTERFACE!{interface ICompositionEffectBrush(ICompositionEffectBrushVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionEffectBrush] { + fn GetSourceParameter(&mut self, name: HSTRING, out: *mut *mut CompositionBrush) -> HRESULT, + fn SetSourceParameter(&mut self, name: HSTRING, source: *mut CompositionBrush) -> HRESULT + }} + impl ICompositionEffectBrush { + #[inline] pub unsafe fn get_source_parameter(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetSourceParameter)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_source_parameter(&mut self, name: &HStringArg, source: &CompositionBrush) -> Result<()> { + let hr = ((*self.lpVtbl).SetSourceParameter)(self, name.get(), source as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CompositionBrush: ICompositionBrush} + DEFINE_IID!(IID_ICompositionEffectFactory, 3193316527, 47742, 17680, 152, 80, 65, 192, 180, 255, 116, 223); + RT_INTERFACE!{interface ICompositionEffectFactory(ICompositionEffectFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionEffectFactory] { + fn CreateBrush(&mut self, out: *mut *mut CompositionEffectBrush) -> HRESULT, + fn get_ExtendedError(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT, + fn get_LoadStatus(&mut self, out: *mut CompositionEffectFactoryLoadStatus) -> HRESULT + }} + impl ICompositionEffectFactory { + #[inline] pub unsafe fn create_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extended_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExtendedError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_load_status(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LoadStatus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CompositionEffectBrush: ICompositionEffectBrush} + DEFINE_IID!(IID_ICompositionEffectSourceParameter, 2240459066, 12946, 20046, 179, 187, 43, 108, 101, 68, 166, 238); + RT_INTERFACE!{interface ICompositionEffectSourceParameter(ICompositionEffectSourceParameterVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionEffectSourceParameter] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl ICompositionEffectSourceParameter { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionEffectSourceParameterFactory, 3017405046, 43939, 18212, 172, 243, 208, 57, 116, 100, 219, 28); + RT_INTERFACE!{static interface ICompositionEffectSourceParameterFactory(ICompositionEffectSourceParameterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionEffectSourceParameterFactory] { + fn Create(&mut self, name: HSTRING, out: *mut *mut CompositionEffectSourceParameter) -> HRESULT + }} + impl ICompositionEffectSourceParameterFactory { + #[inline] pub unsafe fn create(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CompositionEffectSourceParameter: ICompositionEffectSourceParameter [ICompositionEffectSourceParameterFactory] [CLSID_CompositionEffectSourceParameter]} + DEFINE_CLSID!(CLSID_CompositionEffectSourceParameter = &[87,105,110,100,111,119,115,46,85,73,46,67,111,109,112,111,115,105,116,105,111,110,46,67,111,109,112,111,115,105,116,105,111,110,69,102,102,101,99,116,83,111,117,114,99,101,80,97,114,97,109,101,116,101,114,0]); + DEFINE_IID!(IID_ICompositionGraphicsDevice, 4213360353, 32930, 18023, 153, 54, 219, 234, 246, 238, 254, 149); + RT_INTERFACE!{interface ICompositionGraphicsDevice(ICompositionGraphicsDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionGraphicsDevice] { + #[cfg(not(feature="windows.graphics"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn CreateDrawingSurface(&mut self, sizePixels: super::super::foundation::Size, pixelFormat: super::super::graphics::directx::DirectXPixelFormat, alphaMode: super::super::graphics::directx::DirectXAlphaMode, out: *mut *mut CompositionDrawingSurface) -> HRESULT, + fn add_RenderingDeviceReplaced(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RenderingDeviceReplaced(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICompositionGraphicsDevice { + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn create_drawing_surface(&mut self, sizePixels: super::super::foundation::Size, pixelFormat: super::super::graphics::directx::DirectXPixelFormat, alphaMode: super::super::graphics::directx::DirectXAlphaMode) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDrawingSurface)(self, sizePixels, pixelFormat, alphaMode, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_rendering_device_replaced(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RenderingDeviceReplaced)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_rendering_device_replaced(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RenderingDeviceReplaced)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CompositionGraphicsDevice: ICompositionGraphicsDevice} + DEFINE_IID!(IID_ICompositionLight, 1101453250, 11869, 19393, 176, 158, 143, 10, 3, 227, 216, 211); + RT_INTERFACE!{interface ICompositionLight(ICompositionLightVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionLight] { + fn get_Targets(&mut self, out: *mut *mut VisualUnorderedCollection) -> HRESULT + }} + impl ICompositionLight { + #[inline] pub unsafe fn get_targets(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Targets)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionMaskBrush, 1378676894, 48747, 20289, 190, 73, 249, 34, 109, 71, 27, 74); + RT_INTERFACE!{interface ICompositionMaskBrush(ICompositionMaskBrushVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionMaskBrush] { + fn get_Mask(&mut self, out: *mut *mut CompositionBrush) -> HRESULT, + fn put_Mask(&mut self, value: *mut CompositionBrush) -> HRESULT, + fn get_Source(&mut self, out: *mut *mut CompositionBrush) -> HRESULT, + fn put_Source(&mut self, value: *mut CompositionBrush) -> HRESULT + }} + impl ICompositionMaskBrush { + #[inline] pub unsafe fn get_mask(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mask)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_mask(&mut self, value: &CompositionBrush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mask)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_source(&mut self, value: &CompositionBrush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Source)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionNineGridBrush, 4065416420, 48268, 19431, 184, 15, 134, 133, 184, 60, 1, 134); + RT_INTERFACE!{interface ICompositionNineGridBrush(ICompositionNineGridBrushVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionNineGridBrush] { + fn get_BottomInset(&mut self, out: *mut f32) -> HRESULT, + fn put_BottomInset(&mut self, value: f32) -> HRESULT, + fn get_BottomInsetScale(&mut self, out: *mut f32) -> HRESULT, + fn put_BottomInsetScale(&mut self, value: f32) -> HRESULT, + fn get_IsCenterHollow(&mut self, out: *mut bool) -> HRESULT, + fn put_IsCenterHollow(&mut self, value: bool) -> HRESULT, + fn get_LeftInset(&mut self, out: *mut f32) -> HRESULT, + fn put_LeftInset(&mut self, value: f32) -> HRESULT, + fn get_LeftInsetScale(&mut self, out: *mut f32) -> HRESULT, + fn put_LeftInsetScale(&mut self, value: f32) -> HRESULT, + fn get_RightInset(&mut self, out: *mut f32) -> HRESULT, + fn put_RightInset(&mut self, value: f32) -> HRESULT, + fn get_RightInsetScale(&mut self, out: *mut f32) -> HRESULT, + fn put_RightInsetScale(&mut self, value: f32) -> HRESULT, + fn get_Source(&mut self, out: *mut *mut CompositionBrush) -> HRESULT, + fn put_Source(&mut self, value: *mut CompositionBrush) -> HRESULT, + fn get_TopInset(&mut self, out: *mut f32) -> HRESULT, + fn put_TopInset(&mut self, value: f32) -> HRESULT, + fn get_TopInsetScale(&mut self, out: *mut f32) -> HRESULT, + fn put_TopInsetScale(&mut self, value: f32) -> HRESULT, + fn SetInsets(&mut self, inset: f32) -> HRESULT, + fn SetInsetsWithValues(&mut self, left: f32, top: f32, right: f32, bottom: f32) -> HRESULT, + fn SetInsetScales(&mut self, scale: f32) -> HRESULT, + fn SetInsetScalesWithValues(&mut self, left: f32, top: f32, right: f32, bottom: f32) -> HRESULT + }} + impl ICompositionNineGridBrush { + #[inline] pub unsafe fn get_bottom_inset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BottomInset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bottom_inset(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_BottomInset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bottom_inset_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BottomInsetScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bottom_inset_scale(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_BottomInsetScale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_center_hollow(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCenterHollow)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_center_hollow(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsCenterHollow)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_left_inset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LeftInset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_left_inset(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_LeftInset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_left_inset_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LeftInsetScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_left_inset_scale(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_LeftInsetScale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_right_inset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RightInset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_right_inset(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RightInset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_right_inset_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RightInsetScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_right_inset_scale(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RightInsetScale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_source(&mut self, value: &CompositionBrush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Source)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_top_inset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TopInset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_top_inset(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TopInset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_top_inset_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TopInsetScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_top_inset_scale(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TopInsetScale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_insets(&mut self, inset: f32) -> Result<()> { + let hr = ((*self.lpVtbl).SetInsets)(self, inset); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_insets_with_values(&mut self, left: f32, top: f32, right: f32, bottom: f32) -> Result<()> { + let hr = ((*self.lpVtbl).SetInsetsWithValues)(self, left, top, right, bottom); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_inset_scales(&mut self, scale: f32) -> Result<()> { + let hr = ((*self.lpVtbl).SetInsetScales)(self, scale); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_inset_scales_with_values(&mut self, left: f32, top: f32, right: f32, bottom: f32) -> Result<()> { + let hr = ((*self.lpVtbl).SetInsetScalesWithValues)(self, left, top, right, bottom); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionObject, 3165957445, 30217, 17744, 147, 79, 22, 0, 42, 104, 253, 237); + RT_INTERFACE!{interface ICompositionObject(ICompositionObjectVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionObject] { + fn get_Compositor(&mut self, out: *mut *mut Compositor) -> HRESULT, + fn get_Dispatcher(&mut self, out: *mut *mut super::core::CoreDispatcher) -> HRESULT, + fn get_Properties(&mut self, out: *mut *mut CompositionPropertySet) -> HRESULT, + fn StartAnimation(&mut self, propertyName: HSTRING, animation: *mut CompositionAnimation) -> HRESULT, + fn StopAnimation(&mut self, propertyName: HSTRING) -> HRESULT + }} + impl ICompositionObject { + #[inline] pub unsafe fn get_compositor(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Compositor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_dispatcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Dispatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_properties(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Properties)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_animation(&mut self, propertyName: &HStringArg, animation: &CompositionAnimation) -> Result<()> { + let hr = ((*self.lpVtbl).StartAnimation)(self, propertyName.get(), animation as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop_animation(&mut self, propertyName: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).StopAnimation)(self, propertyName.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Compositor: ICompositor} + DEFINE_IID!(IID_ICompositionObject2, 4018622113, 23807, 19304, 158, 48, 161, 81, 157, 8, 186, 3); + RT_INTERFACE!{interface ICompositionObject2(ICompositionObject2Vtbl): IInspectable(IInspectableVtbl) [IID_ICompositionObject2] { + fn get_Comment(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Comment(&mut self, value: HSTRING) -> HRESULT, + fn get_ImplicitAnimations(&mut self, out: *mut *mut ImplicitAnimationCollection) -> HRESULT, + fn put_ImplicitAnimations(&mut self, value: *mut ImplicitAnimationCollection) -> HRESULT, + fn StartAnimationGroup(&mut self, value: *mut ICompositionAnimationBase) -> HRESULT, + fn StopAnimationGroup(&mut self, value: *mut ICompositionAnimationBase) -> HRESULT + }} + impl ICompositionObject2 { + #[inline] pub unsafe fn get_comment(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Comment)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_comment(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Comment)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_implicit_animations(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ImplicitAnimations)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_implicit_animations(&mut self, value: &ImplicitAnimationCollection) -> Result<()> { + let hr = ((*self.lpVtbl).put_ImplicitAnimations)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_animation_group(&mut self, value: &ICompositionAnimationBase) -> Result<()> { + let hr = ((*self.lpVtbl).StartAnimationGroup)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop_animation_group(&mut self, value: &ICompositionAnimationBase) -> Result<()> { + let hr = ((*self.lpVtbl).StopAnimationGroup)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionPropertySet, 3386298882, 24423, 17491, 145, 23, 158, 173, 212, 48, 211, 194); + RT_INTERFACE!{interface ICompositionPropertySet(ICompositionPropertySetVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionPropertySet] { + fn InsertColor(&mut self, propertyName: HSTRING, value: super::Color) -> HRESULT, + fn InsertMatrix3x2(&mut self, propertyName: HSTRING, value: super::super::foundation::numerics::Matrix3x2) -> HRESULT, + fn InsertMatrix4x4(&mut self, propertyName: HSTRING, value: super::super::foundation::numerics::Matrix4x4) -> HRESULT, + fn InsertQuaternion(&mut self, propertyName: HSTRING, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn InsertScalar(&mut self, propertyName: HSTRING, value: f32) -> HRESULT, + fn InsertVector2(&mut self, propertyName: HSTRING, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn InsertVector3(&mut self, propertyName: HSTRING, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn InsertVector4(&mut self, propertyName: HSTRING, value: super::super::foundation::numerics::Vector4) -> HRESULT, + fn TryGetColor(&mut self, propertyName: HSTRING, value: *mut super::Color, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetMatrix3x2(&mut self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Matrix3x2, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetMatrix4x4(&mut self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Matrix4x4, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetQuaternion(&mut self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Quaternion, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetScalar(&mut self, propertyName: HSTRING, value: *mut f32, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetVector2(&mut self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Vector2, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetVector3(&mut self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Vector3, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetVector4(&mut self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Vector4, out: *mut CompositionGetValueStatus) -> HRESULT + }} + impl ICompositionPropertySet { + #[inline] pub unsafe fn insert_color(&mut self, propertyName: &HStringArg, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).InsertColor)(self, propertyName.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_matrix3x2(&mut self, propertyName: &HStringArg, value: super::super::foundation::numerics::Matrix3x2) -> Result<()> { + let hr = ((*self.lpVtbl).InsertMatrix3x2)(self, propertyName.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_matrix4x4(&mut self, propertyName: &HStringArg, value: super::super::foundation::numerics::Matrix4x4) -> Result<()> { + let hr = ((*self.lpVtbl).InsertMatrix4x4)(self, propertyName.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_quaternion(&mut self, propertyName: &HStringArg, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + let hr = ((*self.lpVtbl).InsertQuaternion)(self, propertyName.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_scalar(&mut self, propertyName: &HStringArg, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).InsertScalar)(self, propertyName.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_vector2(&mut self, propertyName: &HStringArg, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).InsertVector2)(self, propertyName.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_vector3(&mut self, propertyName: &HStringArg, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).InsertVector3)(self, propertyName.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_vector4(&mut self, propertyName: &HStringArg, value: super::super::foundation::numerics::Vector4) -> Result<()> { + let hr = ((*self.lpVtbl).InsertVector4)(self, propertyName.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_color(&mut self, propertyName: &HStringArg) -> Result<(super::Color, CompositionGetValueStatus)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetColor)(self, propertyName.get(), &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_matrix3x2(&mut self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix3x2, CompositionGetValueStatus)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetMatrix3x2)(self, propertyName.get(), &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_matrix4x4(&mut self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix4x4, CompositionGetValueStatus)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetMatrix4x4)(self, propertyName.get(), &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_quaternion(&mut self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Quaternion, CompositionGetValueStatus)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetQuaternion)(self, propertyName.get(), &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_scalar(&mut self, propertyName: &HStringArg) -> Result<(f32, CompositionGetValueStatus)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetScalar)(self, propertyName.get(), &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_vector2(&mut self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Vector2, CompositionGetValueStatus)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetVector2)(self, propertyName.get(), &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_vector3(&mut self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Vector3, CompositionGetValueStatus)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetVector3)(self, propertyName.get(), &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_vector4(&mut self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Vector4, CompositionGetValueStatus)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetVector4)(self, propertyName.get(), &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionPropertySet2, 3732960030, 41489, 17493, 136, 128, 125, 15, 63, 106, 68, 253); + RT_INTERFACE!{interface ICompositionPropertySet2(ICompositionPropertySet2Vtbl): IInspectable(IInspectableVtbl) [IID_ICompositionPropertySet2] { + fn InsertBoolean(&mut self, propertyName: HSTRING, value: bool) -> HRESULT, + fn TryGetBoolean(&mut self, propertyName: HSTRING, value: *mut bool, out: *mut CompositionGetValueStatus) -> HRESULT + }} + impl ICompositionPropertySet2 { + #[inline] pub unsafe fn insert_boolean(&mut self, propertyName: &HStringArg, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).InsertBoolean)(self, propertyName.get(), value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_get_boolean(&mut self, propertyName: &HStringArg) -> Result<(bool, CompositionGetValueStatus)> { + let mut value = zeroed(); let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryGetBoolean)(self, propertyName.get(), &mut value, &mut out); + if hr == S_OK { Ok((value, out)) } else { err(hr) } + } + } + RT_CLASS!{class CompositionPropertySet: ICompositionPropertySet} + DEFINE_IID!(IID_ICompositionScopedBatch, 218159824, 64263, 18173, 140, 114, 98, 128, 209, 163, 209, 221); + RT_INTERFACE!{interface ICompositionScopedBatch(ICompositionScopedBatchVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionScopedBatch] { + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn get_IsEnded(&mut self, out: *mut bool) -> HRESULT, + fn End(&mut self) -> HRESULT, + fn Resume(&mut self) -> HRESULT, + fn Suspend(&mut self) -> HRESULT, + fn add_Completed(&mut self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl ICompositionScopedBatch { + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_ended(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnded)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn end(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).End)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn resume(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Resume)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn suspend(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Suspend)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_completed(&mut self, handler: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Completed)(self, handler as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Completed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionShadow, 849236706, 17205, 18892, 177, 74, 55, 120, 45, 16, 240, 196); + RT_INTERFACE!{interface ICompositionShadow(ICompositionShadowVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionShadow] { + + }} + DEFINE_IID!(IID_ICompositionSurface, 354898957, 17095, 18342, 164, 8, 102, 143, 121, 169, 13, 251); + RT_INTERFACE!{interface ICompositionSurface(ICompositionSurfaceVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionSurface] { + + }} + RT_CLASS!{class CompositionDrawingSurface: ICompositionDrawingSurface} + DEFINE_IID!(IID_ICompositionSurfaceBrush, 2902551929, 7756, 19469, 156, 41, 131, 51, 140, 135, 193, 98); + RT_INTERFACE!{interface ICompositionSurfaceBrush(ICompositionSurfaceBrushVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionSurfaceBrush] { + fn get_BitmapInterpolationMode(&mut self, out: *mut CompositionBitmapInterpolationMode) -> HRESULT, + fn put_BitmapInterpolationMode(&mut self, value: CompositionBitmapInterpolationMode) -> HRESULT, + fn get_HorizontalAlignmentRatio(&mut self, out: *mut f32) -> HRESULT, + fn put_HorizontalAlignmentRatio(&mut self, value: f32) -> HRESULT, + fn get_Stretch(&mut self, out: *mut CompositionStretch) -> HRESULT, + fn put_Stretch(&mut self, value: CompositionStretch) -> HRESULT, + fn get_Surface(&mut self, out: *mut *mut ICompositionSurface) -> HRESULT, + fn put_Surface(&mut self, value: *mut ICompositionSurface) -> HRESULT, + fn get_VerticalAlignmentRatio(&mut self, out: *mut f32) -> HRESULT, + fn put_VerticalAlignmentRatio(&mut self, value: f32) -> HRESULT + }} + impl ICompositionSurfaceBrush { + #[inline] pub unsafe fn get_bitmap_interpolation_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BitmapInterpolationMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bitmap_interpolation_mode(&mut self, value: CompositionBitmapInterpolationMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_BitmapInterpolationMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_horizontal_alignment_ratio(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HorizontalAlignmentRatio)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_horizontal_alignment_ratio(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_HorizontalAlignmentRatio)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stretch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Stretch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stretch(&mut self, value: CompositionStretch) -> Result<()> { + let hr = ((*self.lpVtbl).put_Stretch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_surface(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Surface)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_surface(&mut self, value: &ICompositionSurface) -> Result<()> { + let hr = ((*self.lpVtbl).put_Surface)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_alignment_ratio(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VerticalAlignmentRatio)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_vertical_alignment_ratio(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_VerticalAlignmentRatio)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionSurfaceBrush2, 3530650837, 25845, 18066, 157, 199, 113, 182, 29, 126, 88, 128); + RT_INTERFACE!{interface ICompositionSurfaceBrush2(ICompositionSurfaceBrush2Vtbl): IInspectable(IInspectableVtbl) [IID_ICompositionSurfaceBrush2] { + fn get_AnchorPoint(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, + fn put_AnchorPoint(&mut self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_CenterPoint(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, + fn put_CenterPoint(&mut self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_Offset(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, + fn put_Offset(&mut self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_RotationAngle(&mut self, out: *mut f32) -> HRESULT, + fn put_RotationAngle(&mut self, value: f32) -> HRESULT, + fn get_RotationAngleInDegrees(&mut self, out: *mut f32) -> HRESULT, + fn put_RotationAngleInDegrees(&mut self, value: f32) -> HRESULT, + fn get_Scale(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, + fn put_Scale(&mut self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_TransformMatrix(&mut self, out: *mut super::super::foundation::numerics::Matrix3x2) -> HRESULT, + fn put_TransformMatrix(&mut self, value: super::super::foundation::numerics::Matrix3x2) -> HRESULT + }} + impl ICompositionSurfaceBrush2 { + #[inline] pub unsafe fn get_anchor_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AnchorPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_anchor_point(&mut self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).put_AnchorPoint)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_center_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CenterPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_center_point(&mut self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).put_CenterPoint)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Offset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_offset(&mut self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).put_Offset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RotationAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rotation_angle(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RotationAngle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation_angle_in_degrees(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RotationAngleInDegrees)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rotation_angle_in_degrees(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RotationAngleInDegrees)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Scale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scale(&mut self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).put_Scale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_transform_matrix(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TransformMatrix)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_transform_matrix(&mut self, value: super::super::foundation::numerics::Matrix3x2) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransformMatrix)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositionTarget, 2713626810, 55078, 18019, 129, 41, 107, 94, 121, 39, 255, 166); + RT_INTERFACE!{interface ICompositionTarget(ICompositionTargetVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionTarget] { + fn get_Root(&mut self, out: *mut *mut Visual) -> HRESULT, + fn put_Root(&mut self, value: *mut Visual) -> HRESULT + }} + impl ICompositionTarget { + #[inline] pub unsafe fn get_root(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Root)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_root(&mut self, value: &Visual) -> Result<()> { + let hr = ((*self.lpVtbl).put_Root)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICompositor, 3020147280, 32652, 20099, 152, 95, 204, 69, 6, 0, 54, 216); + RT_INTERFACE!{interface ICompositor(ICompositorVtbl): IInspectable(IInspectableVtbl) [IID_ICompositor] { + fn CreateColorKeyFrameAnimation(&mut self, out: *mut *mut ColorKeyFrameAnimation) -> HRESULT, + fn CreateColorBrush(&mut self, out: *mut *mut CompositionColorBrush) -> HRESULT, + fn CreateColorBrushWithColor(&mut self, color: super::Color, out: *mut *mut CompositionColorBrush) -> HRESULT, + fn CreateContainerVisual(&mut self, out: *mut *mut ContainerVisual) -> HRESULT, + fn CreateCubicBezierEasingFunction(&mut self, controlPoint1: super::super::foundation::numerics::Vector2, controlPoint2: super::super::foundation::numerics::Vector2, out: *mut *mut CubicBezierEasingFunction) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn CreateEffectFactory(&mut self, graphicsEffect: *mut super::super::graphics::effects::IGraphicsEffect, out: *mut *mut CompositionEffectFactory) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn CreateEffectFactoryWithProperties(&mut self, graphicsEffect: *mut super::super::graphics::effects::IGraphicsEffect, animatableProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut CompositionEffectFactory) -> HRESULT, + fn CreateExpressionAnimation(&mut self, out: *mut *mut ExpressionAnimation) -> HRESULT, + fn CreateExpressionAnimationWithExpression(&mut self, expression: HSTRING, out: *mut *mut ExpressionAnimation) -> HRESULT, + fn CreateInsetClip(&mut self, out: *mut *mut InsetClip) -> HRESULT, + fn CreateInsetClipWithInsets(&mut self, leftInset: f32, topInset: f32, rightInset: f32, bottomInset: f32, out: *mut *mut InsetClip) -> HRESULT, + fn CreateLinearEasingFunction(&mut self, out: *mut *mut LinearEasingFunction) -> HRESULT, + fn CreatePropertySet(&mut self, out: *mut *mut CompositionPropertySet) -> HRESULT, + fn CreateQuaternionKeyFrameAnimation(&mut self, out: *mut *mut QuaternionKeyFrameAnimation) -> HRESULT, + fn CreateScalarKeyFrameAnimation(&mut self, out: *mut *mut ScalarKeyFrameAnimation) -> HRESULT, + fn CreateScopedBatch(&mut self, batchType: CompositionBatchTypes, out: *mut *mut CompositionScopedBatch) -> HRESULT, + fn CreateSpriteVisual(&mut self, out: *mut *mut SpriteVisual) -> HRESULT, + fn CreateSurfaceBrush(&mut self, out: *mut *mut CompositionSurfaceBrush) -> HRESULT, + fn CreateSurfaceBrushWithSurface(&mut self, surface: *mut ICompositionSurface, out: *mut *mut CompositionSurfaceBrush) -> HRESULT, + fn CreateTargetForCurrentView(&mut self, out: *mut *mut CompositionTarget) -> HRESULT, + fn CreateVector2KeyFrameAnimation(&mut self, out: *mut *mut Vector2KeyFrameAnimation) -> HRESULT, + fn CreateVector3KeyFrameAnimation(&mut self, out: *mut *mut Vector3KeyFrameAnimation) -> HRESULT, + fn CreateVector4KeyFrameAnimation(&mut self, out: *mut *mut Vector4KeyFrameAnimation) -> HRESULT, + fn GetCommitBatch(&mut self, batchType: CompositionBatchTypes, out: *mut *mut CompositionCommitBatch) -> HRESULT + }} + impl ICompositor { + #[inline] pub unsafe fn create_color_key_frame_animation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateColorKeyFrameAnimation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_color_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateColorBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_color_brush_with_color(&mut self, color: super::Color) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateColorBrushWithColor)(self, color, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_container_visual(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateContainerVisual)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_cubic_bezier_easing_function(&mut self, controlPoint1: super::super::foundation::numerics::Vector2, controlPoint2: super::super::foundation::numerics::Vector2) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateCubicBezierEasingFunction)(self, controlPoint1, controlPoint2, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn create_effect_factory(&mut self, graphicsEffect: &super::super::graphics::effects::IGraphicsEffect) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateEffectFactory)(self, graphicsEffect as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn create_effect_factory_with_properties(&mut self, graphicsEffect: &super::super::graphics::effects::IGraphicsEffect, animatableProperties: &super::super::foundation::collections::IIterable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateEffectFactoryWithProperties)(self, graphicsEffect as *const _ as *mut _, animatableProperties as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_expression_animation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateExpressionAnimation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_expression_animation_with_expression(&mut self, expression: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateExpressionAnimationWithExpression)(self, expression.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_inset_clip(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInsetClip)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_inset_clip_with_insets(&mut self, leftInset: f32, topInset: f32, rightInset: f32, bottomInset: f32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInsetClipWithInsets)(self, leftInset, topInset, rightInset, bottomInset, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_linear_easing_function(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateLinearEasingFunction)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_property_set(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePropertySet)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_quaternion_key_frame_animation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateQuaternionKeyFrameAnimation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_scalar_key_frame_animation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateScalarKeyFrameAnimation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_scoped_batch(&mut self, batchType: CompositionBatchTypes) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateScopedBatch)(self, batchType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_sprite_visual(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSpriteVisual)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_surface_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSurfaceBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_surface_brush_with_surface(&mut self, surface: &ICompositionSurface) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSurfaceBrushWithSurface)(self, surface as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_target_for_current_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateTargetForCurrentView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_vector2_key_frame_animation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateVector2KeyFrameAnimation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_vector3_key_frame_animation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateVector3KeyFrameAnimation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_vector4_key_frame_animation(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateVector4KeyFrameAnimation)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_commit_batch(&mut self, batchType: CompositionBatchTypes) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCommitBatch)(self, batchType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CompositionColorBrush: ICompositionColorBrush} + RT_CLASS!{class CompositionEffectFactory: ICompositionEffectFactory} + RT_CLASS!{class CompositionScopedBatch: ICompositionScopedBatch} + RT_CLASS!{class CompositionSurfaceBrush: ICompositionSurfaceBrush} + RT_CLASS!{class CompositionTarget: ICompositionTarget} + RT_CLASS!{class CompositionCommitBatch: ICompositionCommitBatch} + DEFINE_IID!(IID_ICompositor2, 1934655964, 24100, 17882, 163, 143, 227, 44, 195, 73, 169, 160); + RT_INTERFACE!{interface ICompositor2(ICompositor2Vtbl): IInspectable(IInspectableVtbl) [IID_ICompositor2] { + fn CreateAmbientLight(&mut self, out: *mut *mut AmbientLight) -> HRESULT, + fn CreateAnimationGroup(&mut self, out: *mut *mut CompositionAnimationGroup) -> HRESULT, + fn CreateBackdropBrush(&mut self, out: *mut *mut CompositionBackdropBrush) -> HRESULT, + fn CreateDistantLight(&mut self, out: *mut *mut DistantLight) -> HRESULT, + fn CreateDropShadow(&mut self, out: *mut *mut DropShadow) -> HRESULT, + fn CreateImplicitAnimationCollection(&mut self, out: *mut *mut ImplicitAnimationCollection) -> HRESULT, + fn CreateLayerVisual(&mut self, out: *mut *mut LayerVisual) -> HRESULT, + fn CreateMaskBrush(&mut self, out: *mut *mut CompositionMaskBrush) -> HRESULT, + fn CreateNineGridBrush(&mut self, out: *mut *mut CompositionNineGridBrush) -> HRESULT, + fn CreatePointLight(&mut self, out: *mut *mut PointLight) -> HRESULT, + fn CreateSpotLight(&mut self, out: *mut *mut SpotLight) -> HRESULT, + fn CreateStepEasingFunction(&mut self, out: *mut *mut StepEasingFunction) -> HRESULT, + fn CreateStepEasingFunctionWithStepCount(&mut self, stepCount: i32, out: *mut *mut StepEasingFunction) -> HRESULT + }} + impl ICompositor2 { + #[inline] pub unsafe fn create_ambient_light(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAmbientLight)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_animation_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateAnimationGroup)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_backdrop_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateBackdropBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_distant_light(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDistantLight)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_drop_shadow(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateDropShadow)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_implicit_animation_collection(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateImplicitAnimationCollection)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_layer_visual(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateLayerVisual)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_mask_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateMaskBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_nine_grid_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateNineGridBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_point_light(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreatePointLight)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_spot_light(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateSpotLight)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_step_easing_function(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStepEasingFunction)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_step_easing_function_with_step_count(&mut self, stepCount: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateStepEasingFunctionWithStepCount)(self, stepCount, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class CompositionAnimationGroup: ICompositionAnimationGroup} + RT_CLASS!{class CompositionBackdropBrush: ICompositionBackdropBrush} + RT_CLASS!{class CompositionMaskBrush: ICompositionMaskBrush} + RT_CLASS!{class CompositionNineGridBrush: ICompositionNineGridBrush} + DEFINE_IID!(IID_IContainerVisual, 49724532, 60704, 18291, 175, 230, 212, 155, 74, 147, 219, 50); + RT_INTERFACE!{interface IContainerVisual(IContainerVisualVtbl): IInspectable(IInspectableVtbl) [IID_IContainerVisual] { + fn get_Children(&mut self, out: *mut *mut VisualCollection) -> HRESULT + }} + impl IContainerVisual { + #[inline] pub unsafe fn get_children(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Children)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICubicBezierEasingFunction, 842335846, 49640, 17657, 150, 184, 201, 138, 207, 10, 230, 152); + RT_INTERFACE!{interface ICubicBezierEasingFunction(ICubicBezierEasingFunctionVtbl): IInspectable(IInspectableVtbl) [IID_ICubicBezierEasingFunction] { + fn get_ControlPoint1(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_ControlPoint2(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT + }} + impl ICubicBezierEasingFunction { + #[inline] pub unsafe fn get_control_point1(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ControlPoint1)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_control_point2(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ControlPoint2)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CubicBezierEasingFunction: ICubicBezierEasingFunction} + DEFINE_IID!(IID_IDistantLight, 831322876, 23779, 19285, 171, 93, 7, 160, 3, 83, 172, 153); + RT_INTERFACE!{interface IDistantLight(IDistantLightVtbl): IInspectable(IInspectableVtbl) [IID_IDistantLight] { + fn get_Color(&mut self, out: *mut super::Color) -> HRESULT, + fn put_Color(&mut self, value: super::Color) -> HRESULT, + fn get_CoordinateSpace(&mut self, out: *mut *mut Visual) -> HRESULT, + fn put_CoordinateSpace(&mut self, value: *mut Visual) -> HRESULT, + fn get_Direction(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_Direction(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT + }} + impl IDistantLight { + #[inline] pub unsafe fn get_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_color(&mut self, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_Color)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_coordinate_space(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CoordinateSpace)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_coordinate_space(&mut self, value: &Visual) -> Result<()> { + let hr = ((*self.lpVtbl).put_CoordinateSpace)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Direction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_direction(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_Direction)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDropShadow, 3415702535, 41300, 18513, 133, 231, 168, 146, 76, 132, 250, 216); + RT_INTERFACE!{interface IDropShadow(IDropShadowVtbl): IInspectable(IInspectableVtbl) [IID_IDropShadow] { + fn get_BlurRadius(&mut self, out: *mut f32) -> HRESULT, + fn put_BlurRadius(&mut self, value: f32) -> HRESULT, + fn get_Color(&mut self, out: *mut super::Color) -> HRESULT, + fn put_Color(&mut self, value: super::Color) -> HRESULT, + fn get_Mask(&mut self, out: *mut *mut CompositionBrush) -> HRESULT, + fn put_Mask(&mut self, value: *mut CompositionBrush) -> HRESULT, + fn get_Offset(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_Offset(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Opacity(&mut self, out: *mut f32) -> HRESULT, + fn put_Opacity(&mut self, value: f32) -> HRESULT + }} + impl IDropShadow { + #[inline] pub unsafe fn get_blur_radius(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BlurRadius)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_blur_radius(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_BlurRadius)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_color(&mut self, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_Color)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_mask(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Mask)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_mask(&mut self, value: &CompositionBrush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Mask)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Offset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_offset(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_Offset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_opacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Opacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_opacity(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Opacity)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IExpressionAnimation, 1791775793, 32061, 19443, 171, 182, 244, 75, 220, 72, 136, 193); + RT_INTERFACE!{interface IExpressionAnimation(IExpressionAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IExpressionAnimation] { + fn get_Expression(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Expression(&mut self, value: HSTRING) -> HRESULT + }} + impl IExpressionAnimation { + #[inline] pub unsafe fn get_expression(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Expression)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_expression(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Expression)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ExpressionAnimation: IExpressionAnimation} + DEFINE_IID!(IID_IImplicitAnimationCollection, 93889535, 2706, 19613, 164, 39, 178, 85, 25, 37, 13, 191); + RT_INTERFACE!{interface IImplicitAnimationCollection(IImplicitAnimationCollectionVtbl): IInspectable(IInspectableVtbl) [IID_IImplicitAnimationCollection] { + + }} + RT_CLASS!{class ImplicitAnimationCollection: IImplicitAnimationCollection} + DEFINE_IID!(IID_IInsetClip, 510912071, 33991, 18298, 180, 116, 88, 128, 224, 68, 46, 21); + RT_INTERFACE!{interface IInsetClip(IInsetClipVtbl): IInspectable(IInspectableVtbl) [IID_IInsetClip] { + fn get_BottomInset(&mut self, out: *mut f32) -> HRESULT, + fn put_BottomInset(&mut self, value: f32) -> HRESULT, + fn get_LeftInset(&mut self, out: *mut f32) -> HRESULT, + fn put_LeftInset(&mut self, value: f32) -> HRESULT, + fn get_RightInset(&mut self, out: *mut f32) -> HRESULT, + fn put_RightInset(&mut self, value: f32) -> HRESULT, + fn get_TopInset(&mut self, out: *mut f32) -> HRESULT, + fn put_TopInset(&mut self, value: f32) -> HRESULT + }} + impl IInsetClip { + #[inline] pub unsafe fn get_bottom_inset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BottomInset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bottom_inset(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_BottomInset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_left_inset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LeftInset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_left_inset(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_LeftInset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_right_inset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RightInset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_right_inset(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RightInset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_top_inset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TopInset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_top_inset(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_TopInset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyFrameAnimation, 309231394, 15081, 17728, 154, 138, 222, 174, 138, 74, 74, 132); + RT_INTERFACE!{interface IKeyFrameAnimation(IKeyFrameAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IKeyFrameAnimation] { + fn get_DelayTime(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_DelayTime(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_Duration(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Duration(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_IterationBehavior(&mut self, out: *mut AnimationIterationBehavior) -> HRESULT, + fn put_IterationBehavior(&mut self, value: AnimationIterationBehavior) -> HRESULT, + fn get_IterationCount(&mut self, out: *mut i32) -> HRESULT, + fn put_IterationCount(&mut self, value: i32) -> HRESULT, + fn get_KeyFrameCount(&mut self, out: *mut i32) -> HRESULT, + fn get_StopBehavior(&mut self, out: *mut AnimationStopBehavior) -> HRESULT, + fn put_StopBehavior(&mut self, value: AnimationStopBehavior) -> HRESULT, + fn InsertExpressionKeyFrame(&mut self, normalizedProgressKey: f32, value: HSTRING) -> HRESULT, + fn InsertExpressionKeyFrameWithEasingFunction(&mut self, normalizedProgressKey: f32, value: HSTRING, easingFunction: *mut CompositionEasingFunction) -> HRESULT + }} + impl IKeyFrameAnimation { + #[inline] pub unsafe fn get_delay_time(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DelayTime)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_delay_time(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_DelayTime)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Duration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_duration(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Duration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_iteration_behavior(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IterationBehavior)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_iteration_behavior(&mut self, value: AnimationIterationBehavior) -> Result<()> { + let hr = ((*self.lpVtbl).put_IterationBehavior)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_iteration_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IterationCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_iteration_count(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_IterationCount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_frame_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_KeyFrameCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_stop_behavior(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StopBehavior)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stop_behavior(&mut self, value: AnimationStopBehavior) -> Result<()> { + let hr = ((*self.lpVtbl).put_StopBehavior)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_expression_key_frame(&mut self, normalizedProgressKey: f32, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).InsertExpressionKeyFrame)(self, normalizedProgressKey, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_expression_key_frame_with_easing_function(&mut self, normalizedProgressKey: f32, value: &HStringArg, easingFunction: &CompositionEasingFunction) -> Result<()> { + let hr = ((*self.lpVtbl).InsertExpressionKeyFrameWithEasingFunction)(self, normalizedProgressKey, value.get(), easingFunction as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IKeyFrameAnimation2, 4105472187, 10560, 20160, 164, 26, 235, 109, 128, 26, 47, 24); + RT_INTERFACE!{interface IKeyFrameAnimation2(IKeyFrameAnimation2Vtbl): IInspectable(IInspectableVtbl) [IID_IKeyFrameAnimation2] { + fn get_Direction(&mut self, out: *mut AnimationDirection) -> HRESULT, + fn put_Direction(&mut self, value: AnimationDirection) -> HRESULT + }} + impl IKeyFrameAnimation2 { + #[inline] pub unsafe fn get_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Direction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_direction(&mut self, value: AnimationDirection) -> Result<()> { + let hr = ((*self.lpVtbl).put_Direction)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILayerVisual, 2944678277, 1092, 18567, 142, 131, 180, 11, 37, 63, 130, 44); + RT_INTERFACE!{interface ILayerVisual(ILayerVisualVtbl): IInspectable(IInspectableVtbl) [IID_ILayerVisual] { + fn get_Effect(&mut self, out: *mut *mut CompositionEffectBrush) -> HRESULT, + fn put_Effect(&mut self, value: *mut CompositionEffectBrush) -> HRESULT + }} + impl ILayerVisual { + #[inline] pub unsafe fn get_effect(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Effect)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_effect(&mut self, value: &CompositionEffectBrush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Effect)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILinearEasingFunction, 2483066714, 51110, 18099, 172, 247, 26, 38, 138, 10, 17, 125); + RT_INTERFACE!{interface ILinearEasingFunction(ILinearEasingFunctionVtbl): IInspectable(IInspectableVtbl) [IID_ILinearEasingFunction] { + + }} + RT_CLASS!{class LinearEasingFunction: ILinearEasingFunction} + DEFINE_IID!(IID_IPointLight, 2978301363, 3162, 19120, 190, 220, 79, 53, 70, 148, 130, 114); + RT_INTERFACE!{interface IPointLight(IPointLightVtbl): IInspectable(IInspectableVtbl) [IID_IPointLight] { + fn get_Color(&mut self, out: *mut super::Color) -> HRESULT, + fn put_Color(&mut self, value: super::Color) -> HRESULT, + fn get_ConstantAttenuation(&mut self, out: *mut f32) -> HRESULT, + fn put_ConstantAttenuation(&mut self, value: f32) -> HRESULT, + fn get_CoordinateSpace(&mut self, out: *mut *mut Visual) -> HRESULT, + fn put_CoordinateSpace(&mut self, value: *mut Visual) -> HRESULT, + fn get_LinearAttenuation(&mut self, out: *mut f32) -> HRESULT, + fn put_LinearAttenuation(&mut self, value: f32) -> HRESULT, + fn get_Offset(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_Offset(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_QuadraticAttenuation(&mut self, out: *mut f32) -> HRESULT, + fn put_QuadraticAttenuation(&mut self, value: f32) -> HRESULT + }} + impl IPointLight { + #[inline] pub unsafe fn get_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Color)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_color(&mut self, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_Color)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_constant_attenuation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConstantAttenuation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_constant_attenuation(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ConstantAttenuation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_coordinate_space(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CoordinateSpace)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_coordinate_space(&mut self, value: &Visual) -> Result<()> { + let hr = ((*self.lpVtbl).put_CoordinateSpace)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_linear_attenuation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LinearAttenuation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_linear_attenuation(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_LinearAttenuation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Offset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_offset(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_Offset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_quadratic_attenuation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_QuadraticAttenuation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_quadratic_attenuation(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_QuadraticAttenuation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IQuaternionKeyFrameAnimation, 1078876213, 60662, 16960, 133, 32, 103, 18, 121, 207, 54, 188); + RT_INTERFACE!{interface IQuaternionKeyFrameAnimation(IQuaternionKeyFrameAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IQuaternionKeyFrameAnimation] { + fn InsertKeyFrame(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn InsertKeyFrameWithEasingFunction(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Quaternion, easingFunction: *mut CompositionEasingFunction) -> HRESULT + }} + impl IQuaternionKeyFrameAnimation { + #[inline] pub unsafe fn insert_key_frame(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrame)(self, normalizedProgressKey, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_key_frame_with_easing_function(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Quaternion, easingFunction: &CompositionEasingFunction) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self, normalizedProgressKey, value, easingFunction as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRenderingDeviceReplacedEventArgs, 976333949, 10431, 20090, 133, 36, 113, 103, 157, 72, 15, 56); + RT_INTERFACE!{interface IRenderingDeviceReplacedEventArgs(IRenderingDeviceReplacedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRenderingDeviceReplacedEventArgs] { + fn get_GraphicsDevice(&mut self, out: *mut *mut CompositionGraphicsDevice) -> HRESULT + }} + impl IRenderingDeviceReplacedEventArgs { + #[inline] pub unsafe fn get_graphics_device(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GraphicsDevice)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class RenderingDeviceReplacedEventArgs: IRenderingDeviceReplacedEventArgs} + DEFINE_IID!(IID_IScalarKeyFrameAnimation, 2921893801, 9516, 19349, 167, 37, 191, 133, 227, 128, 0, 161); + RT_INTERFACE!{interface IScalarKeyFrameAnimation(IScalarKeyFrameAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IScalarKeyFrameAnimation] { + fn InsertKeyFrame(&mut self, normalizedProgressKey: f32, value: f32) -> HRESULT, + fn InsertKeyFrameWithEasingFunction(&mut self, normalizedProgressKey: f32, value: f32, easingFunction: *mut CompositionEasingFunction) -> HRESULT + }} + impl IScalarKeyFrameAnimation { + #[inline] pub unsafe fn insert_key_frame(&mut self, normalizedProgressKey: f32, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrame)(self, normalizedProgressKey, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_key_frame_with_easing_function(&mut self, normalizedProgressKey: f32, value: f32, easingFunction: &CompositionEasingFunction) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self, normalizedProgressKey, value, easingFunction as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpotLight, 1520427635, 17569, 20373, 164, 34, 143, 165, 17, 107, 219, 68); + RT_INTERFACE!{interface ISpotLight(ISpotLightVtbl): IInspectable(IInspectableVtbl) [IID_ISpotLight] { + fn get_ConstantAttenuation(&mut self, out: *mut f32) -> HRESULT, + fn put_ConstantAttenuation(&mut self, value: f32) -> HRESULT, + fn get_CoordinateSpace(&mut self, out: *mut *mut Visual) -> HRESULT, + fn put_CoordinateSpace(&mut self, value: *mut Visual) -> HRESULT, + fn get_Direction(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_Direction(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_InnerConeAngle(&mut self, out: *mut f32) -> HRESULT, + fn put_InnerConeAngle(&mut self, value: f32) -> HRESULT, + fn get_InnerConeAngleInDegrees(&mut self, out: *mut f32) -> HRESULT, + fn put_InnerConeAngleInDegrees(&mut self, value: f32) -> HRESULT, + fn get_InnerConeColor(&mut self, out: *mut super::Color) -> HRESULT, + fn put_InnerConeColor(&mut self, value: super::Color) -> HRESULT, + fn get_LinearAttenuation(&mut self, out: *mut f32) -> HRESULT, + fn put_LinearAttenuation(&mut self, value: f32) -> HRESULT, + fn get_Offset(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_Offset(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_OuterConeAngle(&mut self, out: *mut f32) -> HRESULT, + fn put_OuterConeAngle(&mut self, value: f32) -> HRESULT, + fn get_OuterConeAngleInDegrees(&mut self, out: *mut f32) -> HRESULT, + fn put_OuterConeAngleInDegrees(&mut self, value: f32) -> HRESULT, + fn get_OuterConeColor(&mut self, out: *mut super::Color) -> HRESULT, + fn put_OuterConeColor(&mut self, value: super::Color) -> HRESULT, + fn get_QuadraticAttenuation(&mut self, out: *mut f32) -> HRESULT, + fn put_QuadraticAttenuation(&mut self, value: f32) -> HRESULT + }} + impl ISpotLight { + #[inline] pub unsafe fn get_constant_attenuation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ConstantAttenuation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_constant_attenuation(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ConstantAttenuation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_coordinate_space(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CoordinateSpace)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_coordinate_space(&mut self, value: &Visual) -> Result<()> { + let hr = ((*self.lpVtbl).put_CoordinateSpace)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Direction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_direction(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_Direction)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inner_cone_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InnerConeAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_inner_cone_angle(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_InnerConeAngle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inner_cone_angle_in_degrees(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InnerConeAngleInDegrees)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_inner_cone_angle_in_degrees(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_InnerConeAngleInDegrees)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inner_cone_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InnerConeColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_inner_cone_color(&mut self, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_InnerConeColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_linear_attenuation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LinearAttenuation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_linear_attenuation(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_LinearAttenuation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Offset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_offset(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_Offset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outer_cone_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OuterConeAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outer_cone_angle(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_OuterConeAngle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outer_cone_angle_in_degrees(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OuterConeAngleInDegrees)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outer_cone_angle_in_degrees(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_OuterConeAngleInDegrees)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_outer_cone_color(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OuterConeColor)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_outer_cone_color(&mut self, value: super::Color) -> Result<()> { + let hr = ((*self.lpVtbl).put_OuterConeColor)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_quadratic_attenuation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_QuadraticAttenuation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_quadratic_attenuation(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_QuadraticAttenuation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpriteVisual, 148919681, 6865, 20375, 151, 87, 64, 45, 118, 228, 35, 59); + RT_INTERFACE!{interface ISpriteVisual(ISpriteVisualVtbl): IInspectable(IInspectableVtbl) [IID_ISpriteVisual] { + fn get_Brush(&mut self, out: *mut *mut CompositionBrush) -> HRESULT, + fn put_Brush(&mut self, value: *mut CompositionBrush) -> HRESULT + }} + impl ISpriteVisual { + #[inline] pub unsafe fn get_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Brush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_brush(&mut self, value: &CompositionBrush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Brush)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpriteVisual2, 1485608548, 39290, 18512, 145, 254, 83, 203, 88, 248, 28, 233); + RT_INTERFACE!{interface ISpriteVisual2(ISpriteVisual2Vtbl): IInspectable(IInspectableVtbl) [IID_ISpriteVisual2] { + fn get_Shadow(&mut self, out: *mut *mut CompositionShadow) -> HRESULT, + fn put_Shadow(&mut self, value: *mut CompositionShadow) -> HRESULT + }} + impl ISpriteVisual2 { + #[inline] pub unsafe fn get_shadow(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Shadow)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_shadow(&mut self, value: &CompositionShadow) -> Result<()> { + let hr = ((*self.lpVtbl).put_Shadow)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class CompositionShadow: ICompositionShadow} + RT_CLASS!{class DropShadow: IDropShadow} + DEFINE_IID!(IID_IStepEasingFunction, 3502942027, 22028, 18955, 165, 246, 32, 108, 168, 195, 236, 214); + RT_INTERFACE!{interface IStepEasingFunction(IStepEasingFunctionVtbl): IInspectable(IInspectableVtbl) [IID_IStepEasingFunction] { + fn get_FinalStep(&mut self, out: *mut i32) -> HRESULT, + fn put_FinalStep(&mut self, value: i32) -> HRESULT, + fn get_InitialStep(&mut self, out: *mut i32) -> HRESULT, + fn put_InitialStep(&mut self, value: i32) -> HRESULT, + fn get_IsFinalStepSingleFrame(&mut self, out: *mut bool) -> HRESULT, + fn put_IsFinalStepSingleFrame(&mut self, value: bool) -> HRESULT, + fn get_IsInitialStepSingleFrame(&mut self, out: *mut bool) -> HRESULT, + fn put_IsInitialStepSingleFrame(&mut self, value: bool) -> HRESULT, + fn get_StepCount(&mut self, out: *mut i32) -> HRESULT, + fn put_StepCount(&mut self, value: i32) -> HRESULT + }} + impl IStepEasingFunction { + #[inline] pub unsafe fn get_final_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FinalStep)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_final_step(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_FinalStep)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_initial_step(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InitialStep)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_initial_step(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_InitialStep)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_final_step_single_frame(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFinalStepSingleFrame)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_final_step_single_frame(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsFinalStepSingleFrame)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_initial_step_single_frame(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsInitialStepSingleFrame)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_initial_step_single_frame(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsInitialStepSingleFrame)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_step_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StepCount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_step_count(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_StepCount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class StepEasingFunction: IStepEasingFunction} + DEFINE_IID!(IID_IVector2KeyFrameAnimation, 3745596693, 20009, 20241, 181, 94, 191, 42, 110, 179, 98, 148); + RT_INTERFACE!{interface IVector2KeyFrameAnimation(IVector2KeyFrameAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IVector2KeyFrameAnimation] { + fn InsertKeyFrame(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn InsertKeyFrameWithEasingFunction(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector2, easingFunction: *mut CompositionEasingFunction) -> HRESULT + }} + impl IVector2KeyFrameAnimation { + #[inline] pub unsafe fn insert_key_frame(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrame)(self, normalizedProgressKey, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_key_frame_with_easing_function(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector2, easingFunction: &CompositionEasingFunction) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self, normalizedProgressKey, value, easingFunction as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVector3KeyFrameAnimation, 3355680170, 41601, 17346, 167, 61, 182, 142, 60, 83, 60, 64); + RT_INTERFACE!{interface IVector3KeyFrameAnimation(IVector3KeyFrameAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IVector3KeyFrameAnimation] { + fn InsertKeyFrame(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn InsertKeyFrameWithEasingFunction(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector3, easingFunction: *mut CompositionEasingFunction) -> HRESULT + }} + impl IVector3KeyFrameAnimation { + #[inline] pub unsafe fn insert_key_frame(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrame)(self, normalizedProgressKey, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_key_frame_with_easing_function(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector3, easingFunction: &CompositionEasingFunction) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self, normalizedProgressKey, value, easingFunction as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVector4KeyFrameAnimation, 609719387, 44509, 17285, 150, 6, 182, 163, 213, 228, 225, 185); + RT_INTERFACE!{interface IVector4KeyFrameAnimation(IVector4KeyFrameAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IVector4KeyFrameAnimation] { + fn InsertKeyFrame(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector4) -> HRESULT, + fn InsertKeyFrameWithEasingFunction(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector4, easingFunction: *mut CompositionEasingFunction) -> HRESULT + }} + impl IVector4KeyFrameAnimation { + #[inline] pub unsafe fn insert_key_frame(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector4) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrame)(self, normalizedProgressKey, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_key_frame_with_easing_function(&mut self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector4, easingFunction: &CompositionEasingFunction) -> Result<()> { + let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self, normalizedProgressKey, value, easingFunction as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVisual, 293478445, 43097, 19593, 135, 59, 194, 170, 86, 103, 136, 227); + RT_INTERFACE!{interface IVisual(IVisualVtbl): IInspectable(IInspectableVtbl) [IID_IVisual] { + fn get_AnchorPoint(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, + fn put_AnchorPoint(&mut self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_BackfaceVisibility(&mut self, out: *mut CompositionBackfaceVisibility) -> HRESULT, + fn put_BackfaceVisibility(&mut self, value: CompositionBackfaceVisibility) -> HRESULT, + fn get_BorderMode(&mut self, out: *mut CompositionBorderMode) -> HRESULT, + fn put_BorderMode(&mut self, value: CompositionBorderMode) -> HRESULT, + fn get_CenterPoint(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_CenterPoint(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Clip(&mut self, out: *mut *mut CompositionClip) -> HRESULT, + fn put_Clip(&mut self, value: *mut CompositionClip) -> HRESULT, + fn get_CompositeMode(&mut self, out: *mut CompositionCompositeMode) -> HRESULT, + fn put_CompositeMode(&mut self, value: CompositionCompositeMode) -> HRESULT, + fn get_IsVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsVisible(&mut self, value: bool) -> HRESULT, + fn get_Offset(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_Offset(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Opacity(&mut self, out: *mut f32) -> HRESULT, + fn put_Opacity(&mut self, value: f32) -> HRESULT, + fn get_Orientation(&mut self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT, + fn put_Orientation(&mut self, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn get_Parent(&mut self, out: *mut *mut ContainerVisual) -> HRESULT, + fn get_RotationAngle(&mut self, out: *mut f32) -> HRESULT, + fn put_RotationAngle(&mut self, value: f32) -> HRESULT, + fn get_RotationAngleInDegrees(&mut self, out: *mut f32) -> HRESULT, + fn put_RotationAngleInDegrees(&mut self, value: f32) -> HRESULT, + fn get_RotationAxis(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_RotationAxis(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Scale(&mut self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, + fn put_Scale(&mut self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Size(&mut self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, + fn put_Size(&mut self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_TransformMatrix(&mut self, out: *mut super::super::foundation::numerics::Matrix4x4) -> HRESULT, + fn put_TransformMatrix(&mut self, value: super::super::foundation::numerics::Matrix4x4) -> HRESULT + }} + impl IVisual { + #[inline] pub unsafe fn get_anchor_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AnchorPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_anchor_point(&mut self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).put_AnchorPoint)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_backface_visibility(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BackfaceVisibility)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_backface_visibility(&mut self, value: CompositionBackfaceVisibility) -> Result<()> { + let hr = ((*self.lpVtbl).put_BackfaceVisibility)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BorderMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_border_mode(&mut self, value: CompositionBorderMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_BorderMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_center_point(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CenterPoint)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_center_point(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_CenterPoint)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_clip(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Clip)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_clip(&mut self, value: &CompositionClip) -> Result<()> { + let hr = ((*self.lpVtbl).put_Clip)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_composite_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CompositeMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_composite_mode(&mut self, value: CompositionCompositeMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_CompositeMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Offset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_offset(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_Offset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_opacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Opacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_opacity(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_Opacity)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_orientation(&mut self, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + let hr = ((*self.lpVtbl).put_Orientation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_parent(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Parent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation_angle(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RotationAngle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rotation_angle(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RotationAngle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation_angle_in_degrees(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RotationAngleInDegrees)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rotation_angle_in_degrees(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_RotationAngleInDegrees)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rotation_axis(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RotationAxis)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_rotation_axis(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_RotationAxis)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Scale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scale(&mut self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_Scale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Size)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_size(&mut self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + let hr = ((*self.lpVtbl).put_Size)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_transform_matrix(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TransformMatrix)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_transform_matrix(&mut self, value: super::super::foundation::numerics::Matrix4x4) -> Result<()> { + let hr = ((*self.lpVtbl).put_TransformMatrix)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Visual: IVisual} + RT_CLASS!{class ContainerVisual: IContainerVisual} + RT_CLASS!{class SpriteVisual: ISpriteVisual} + RT_CLASS!{class LayerVisual: ILayerVisual} + RT_CLASS!{class CompositionClip: ICompositionClip} + RT_CLASS!{class InsetClip: IInsetClip} + DEFINE_IID!(IID_IVisualCollection, 2339656965, 64830, 19096, 132, 168, 233, 73, 70, 140, 107, 203); + RT_INTERFACE!{interface IVisualCollection(IVisualCollectionVtbl): IInspectable(IInspectableVtbl) [IID_IVisualCollection] { + fn get_Count(&mut self, out: *mut i32) -> HRESULT, + fn InsertAbove(&mut self, newChild: *mut Visual, sibling: *mut Visual) -> HRESULT, + fn InsertAtBottom(&mut self, newChild: *mut Visual) -> HRESULT, + fn InsertAtTop(&mut self, newChild: *mut Visual) -> HRESULT, + fn InsertBelow(&mut self, newChild: *mut Visual, sibling: *mut Visual) -> HRESULT, + fn Remove(&mut self, child: *mut Visual) -> HRESULT, + fn RemoveAll(&mut self) -> HRESULT + }} + impl IVisualCollection { + #[inline] pub unsafe fn get_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Count)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn insert_above(&mut self, newChild: &Visual, sibling: &Visual) -> Result<()> { + let hr = ((*self.lpVtbl).InsertAbove)(self, newChild as *const _ as *mut _, sibling as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_at_bottom(&mut self, newChild: &Visual) -> Result<()> { + let hr = ((*self.lpVtbl).InsertAtBottom)(self, newChild as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_at_top(&mut self, newChild: &Visual) -> Result<()> { + let hr = ((*self.lpVtbl).InsertAtTop)(self, newChild as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_below(&mut self, newChild: &Visual, sibling: &Visual) -> Result<()> { + let hr = ((*self.lpVtbl).InsertBelow)(self, newChild as *const _ as *mut _, sibling as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove(&mut self, child: &Visual) -> Result<()> { + let hr = ((*self.lpVtbl).Remove)(self, child as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class VisualCollection: IVisualCollection} + DEFINE_IID!(IID_IVisualUnorderedCollection, 865053296, 21704, 16551, 128, 41, 201, 206, 235, 10, 162, 80); + RT_INTERFACE!{interface IVisualUnorderedCollection(IVisualUnorderedCollectionVtbl): IInspectable(IInspectableVtbl) [IID_IVisualUnorderedCollection] { + fn get_Count(&mut self, out: *mut i32) -> HRESULT, + fn Add(&mut self, newVisual: *mut Visual) -> HRESULT, + fn Remove(&mut self, visual: *mut Visual) -> HRESULT, + fn RemoveAll(&mut self) -> HRESULT + }} + impl IVisualUnorderedCollection { + #[inline] pub unsafe fn get_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Count)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add(&mut self, newVisual: &Visual) -> Result<()> { + let hr = ((*self.lpVtbl).Add)(self, newVisual as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove(&mut self, visual: &Visual) -> Result<()> { + let hr = ((*self.lpVtbl).Remove)(self, visual as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class VisualUnorderedCollection: IVisualUnorderedCollection} + DEFINE_IID!(IID_ICompositionAnimationFactory, 284607739, 28241, 19493, 187, 211, 88, 106, 155, 236, 62, 244); + RT_INTERFACE!{interface ICompositionAnimationFactory(ICompositionAnimationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionAnimationFactory] { + + }} + DEFINE_IID!(IID_ICompositionBrushFactory, 3662936908, 18000, 18372, 173, 118, 118, 83, 121, 96, 126, 214); + RT_INTERFACE!{interface ICompositionBrushFactory(ICompositionBrushFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionBrushFactory] { + + }} + DEFINE_IID!(IID_ICompositionClipFactory, 3108523183, 8391, 19181, 172, 74, 156, 120, 186, 19, 2, 207); + RT_INTERFACE!{interface ICompositionClipFactory(ICompositionClipFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionClipFactory] { + + }} + DEFINE_IID!(IID_ICompositionEasingFunctionFactory, 1619265396, 15776, 18761, 130, 0, 114, 6, 192, 1, 144, 160); + RT_INTERFACE!{interface ICompositionEasingFunctionFactory(ICompositionEasingFunctionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionEasingFunctionFactory] { + + }} + DEFINE_IID!(IID_ICompositionLightFactory, 110949126, 55868, 19268, 131, 138, 94, 3, 213, 26, 206, 85); + RT_INTERFACE!{interface ICompositionLightFactory(ICompositionLightFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionLightFactory] { + + }} + RT_CLASS!{class CompositionLight: ICompositionLight} + RT_CLASS!{class AmbientLight: IAmbientLight} + RT_CLASS!{class DistantLight: IDistantLight} + RT_CLASS!{class PointLight: IPointLight} + RT_CLASS!{class SpotLight: ISpotLight} + DEFINE_IID!(IID_ICompositionObjectFactory, 1361075294, 21898, 20266, 141, 57, 55, 191, 225, 226, 13, 221); + RT_INTERFACE!{interface ICompositionObjectFactory(ICompositionObjectFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionObjectFactory] { + + }} + DEFINE_IID!(IID_ICompositionShadowFactory, 572475695, 56506, 19345, 153, 158, 29, 194, 23, 160, 21, 48); + RT_INTERFACE!{interface ICompositionShadowFactory(ICompositionShadowFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionShadowFactory] { + + }} + DEFINE_IID!(IID_IContainerVisualFactory, 56862299, 51162, 19866, 149, 244, 105, 181, 200, 223, 103, 11); + RT_INTERFACE!{interface IContainerVisualFactory(IContainerVisualFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IContainerVisualFactory] { + + }} + DEFINE_IID!(IID_IKeyFrameAnimationFactory, 3204973560, 28970, 20417, 140, 135, 151, 8, 89, 237, 141, 46); + RT_INTERFACE!{interface IKeyFrameAnimationFactory(IKeyFrameAnimationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IKeyFrameAnimationFactory] { + + }} + RT_CLASS!{class KeyFrameAnimation: IKeyFrameAnimation} + RT_CLASS!{class ColorKeyFrameAnimation: IColorKeyFrameAnimation} + RT_CLASS!{class QuaternionKeyFrameAnimation: IQuaternionKeyFrameAnimation} + RT_CLASS!{class ScalarKeyFrameAnimation: IScalarKeyFrameAnimation} + RT_CLASS!{class Vector2KeyFrameAnimation: IVector2KeyFrameAnimation} + RT_CLASS!{class Vector3KeyFrameAnimation: IVector3KeyFrameAnimation} + RT_CLASS!{class Vector4KeyFrameAnimation: IVector4KeyFrameAnimation} + DEFINE_IID!(IID_IVisualFactory, 2903505214, 46338, 20149, 135, 180, 154, 56, 167, 29, 1, 55); + RT_INTERFACE!{interface IVisualFactory(IVisualFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVisualFactory] { + + }} +pub mod effects { // Windows.UI.Composition.Effects +use ::prelude::*; + DEFINE_IID!(IID_ISceneLightingEffect, 2444975698, 38353, 20363, 154, 90, 100, 8, 178, 75, 140, 106); + RT_INTERFACE!{interface ISceneLightingEffect(ISceneLightingEffectVtbl): IInspectable(IInspectableVtbl) [IID_ISceneLightingEffect] { + fn get_AmbientAmount(&mut self, out: *mut f32) -> HRESULT, + fn put_AmbientAmount(&mut self, value: f32) -> HRESULT, + fn get_DiffuseAmount(&mut self, out: *mut f32) -> HRESULT, + fn put_DiffuseAmount(&mut self, value: f32) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn get_NormalMapSource(&mut self, out: *mut *mut ::rt::gen::windows::graphics::effects::IGraphicsEffectSource) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn put_NormalMapSource(&mut self, value: *mut ::rt::gen::windows::graphics::effects::IGraphicsEffectSource) -> HRESULT, + fn get_SpecularAmount(&mut self, out: *mut f32) -> HRESULT, + fn put_SpecularAmount(&mut self, value: f32) -> HRESULT, + fn get_SpecularShine(&mut self, out: *mut f32) -> HRESULT, + fn put_SpecularShine(&mut self, value: f32) -> HRESULT + }} + impl ISceneLightingEffect { + #[inline] pub unsafe fn get_ambient_amount(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AmbientAmount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_ambient_amount(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_AmbientAmount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_diffuse_amount(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DiffuseAmount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_diffuse_amount(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_DiffuseAmount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn get_normal_map_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NormalMapSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_normal_map_source(&mut self, value: &::rt::gen::windows::graphics::effects::IGraphicsEffectSource) -> Result<()> { + let hr = ((*self.lpVtbl).put_NormalMapSource)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_specular_amount(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpecularAmount)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_specular_amount(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SpecularAmount)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_specular_shine(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SpecularShine)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_specular_shine(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SpecularShine)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SceneLightingEffect: ISceneLightingEffect} +} // Windows.UI.Composition.Effects +pub mod interactions { // Windows.UI.Composition.Interactions +use ::prelude::*; + RT_ENUM! { enum InteractionChainingMode: i32 { + Auto (InteractionChainingMode_Auto) = 0, Always (InteractionChainingMode_Always) = 1, Never (InteractionChainingMode_Never) = 2, + }} + RT_ENUM! { enum InteractionSourceMode: i32 { + Disabled (InteractionSourceMode_Disabled) = 0, EnabledWithInertia (InteractionSourceMode_EnabledWithInertia) = 1, EnabledWithoutInertia (InteractionSourceMode_EnabledWithoutInertia) = 2, + }} + RT_ENUM! { enum VisualInteractionSourceRedirectionMode: i32 { + Off (VisualInteractionSourceRedirectionMode_Off) = 0, CapableTouchpadOnly (VisualInteractionSourceRedirectionMode_CapableTouchpadOnly) = 1, + }} + DEFINE_IID!(IID_ICompositionInteractionSource, 70984753, 1763, 18778, 186, 84, 64, 159, 0, 23, 250, 192); + RT_INTERFACE!{interface ICompositionInteractionSource(ICompositionInteractionSourceVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionInteractionSource] { + + }} + DEFINE_IID!(IID_ICompositionInteractionSourceCollection, 457608779, 42431, 18392, 165, 71, 56, 148, 21, 90, 21, 140); + RT_INTERFACE!{interface ICompositionInteractionSourceCollection(ICompositionInteractionSourceCollectionVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionInteractionSourceCollection] { + fn get_Count(&mut self, out: *mut i32) -> HRESULT, + fn Add(&mut self, value: *mut ICompositionInteractionSource) -> HRESULT, + fn Remove(&mut self, value: *mut ICompositionInteractionSource) -> HRESULT, + fn RemoveAll(&mut self) -> HRESULT + }} + impl ICompositionInteractionSourceCollection { + #[inline] pub unsafe fn get_count(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Count)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add(&mut self, value: &ICompositionInteractionSource) -> Result<()> { + let hr = ((*self.lpVtbl).Add)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove(&mut self, value: &ICompositionInteractionSource) -> Result<()> { + let hr = ((*self.lpVtbl).Remove)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerStatics, 3148208055, 26000, 17560, 141, 108, 235, 98, 181, 20, 201, 42); + RT_INTERFACE!{static interface IInteractionTrackerStatics(IInteractionTrackerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerStatics] { + fn Create(&mut self, compositor: *mut super::Compositor, out: *mut *mut InteractionTracker) -> HRESULT, + fn CreateWithOwner(&mut self, compositor: *mut super::Compositor, owner: *mut IInteractionTrackerOwner, out: *mut *mut InteractionTracker) -> HRESULT + }} + impl IInteractionTrackerStatics { + #[inline] pub unsafe fn create(&mut self, compositor: &super::Compositor) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, compositor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_owner(&mut self, compositor: &super::Compositor, owner: &IInteractionTrackerOwner) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithOwner)(self, compositor as *const _ as *mut _, owner as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerOwner, 3677260531, 19947, 20051, 178, 156, 176, 108, 159, 150, 214, 81); + RT_INTERFACE!{interface IInteractionTrackerOwner(IInteractionTrackerOwnerVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerOwner] { + fn CustomAnimationStateEntered(&mut self, sender: *mut InteractionTracker, args: *mut InteractionTrackerCustomAnimationStateEnteredArgs) -> HRESULT, + fn IdleStateEntered(&mut self, sender: *mut InteractionTracker, args: *mut InteractionTrackerIdleStateEnteredArgs) -> HRESULT, + fn InertiaStateEntered(&mut self, sender: *mut InteractionTracker, args: *mut InteractionTrackerInertiaStateEnteredArgs) -> HRESULT, + fn InteractingStateEntered(&mut self, sender: *mut InteractionTracker, args: *mut InteractionTrackerInteractingStateEnteredArgs) -> HRESULT, + fn RequestIgnored(&mut self, sender: *mut InteractionTracker, args: *mut InteractionTrackerRequestIgnoredArgs) -> HRESULT, + fn ValuesChanged(&mut self, sender: *mut InteractionTracker, args: *mut InteractionTrackerValuesChangedArgs) -> HRESULT + }} + impl IInteractionTrackerOwner { + #[inline] pub unsafe fn custom_animation_state_entered(&mut self, sender: &InteractionTracker, args: &InteractionTrackerCustomAnimationStateEnteredArgs) -> Result<()> { + let hr = ((*self.lpVtbl).CustomAnimationStateEntered)(self, sender as *const _ as *mut _, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn idle_state_entered(&mut self, sender: &InteractionTracker, args: &InteractionTrackerIdleStateEnteredArgs) -> Result<()> { + let hr = ((*self.lpVtbl).IdleStateEntered)(self, sender as *const _ as *mut _, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn inertia_state_entered(&mut self, sender: &InteractionTracker, args: &InteractionTrackerInertiaStateEnteredArgs) -> Result<()> { + let hr = ((*self.lpVtbl).InertiaStateEntered)(self, sender as *const _ as *mut _, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn interacting_state_entered(&mut self, sender: &InteractionTracker, args: &InteractionTrackerInteractingStateEnteredArgs) -> Result<()> { + let hr = ((*self.lpVtbl).InteractingStateEntered)(self, sender as *const _ as *mut _, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn request_ignored(&mut self, sender: &InteractionTracker, args: &InteractionTrackerRequestIgnoredArgs) -> Result<()> { + let hr = ((*self.lpVtbl).RequestIgnored)(self, sender as *const _ as *mut _, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn values_changed(&mut self, sender: &InteractionTracker, args: &InteractionTrackerValuesChangedArgs) -> Result<()> { + let hr = ((*self.lpVtbl).ValuesChanged)(self, sender as *const _ as *mut _, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class InteractionTrackerCustomAnimationStateEnteredArgs: IInteractionTrackerCustomAnimationStateEnteredArgs} + RT_CLASS!{class InteractionTrackerIdleStateEnteredArgs: IInteractionTrackerIdleStateEnteredArgs} + RT_CLASS!{class InteractionTrackerInertiaStateEnteredArgs: IInteractionTrackerInertiaStateEnteredArgs} + RT_CLASS!{class InteractionTrackerInteractingStateEnteredArgs: IInteractionTrackerInteractingStateEnteredArgs} + RT_CLASS!{class InteractionTrackerRequestIgnoredArgs: IInteractionTrackerRequestIgnoredArgs} + RT_CLASS!{class InteractionTrackerValuesChangedArgs: IInteractionTrackerValuesChangedArgs} + DEFINE_IID!(IID_IInteractionTracker, 713985201, 4096, 17430, 131, 99, 204, 39, 251, 135, 115, 8); + RT_INTERFACE!{interface IInteractionTracker(IInteractionTrackerVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTracker] { + fn get_InteractionSources(&mut self, out: *mut *mut CompositionInteractionSourceCollection) -> HRESULT, + fn get_IsPositionRoundingSuggested(&mut self, out: *mut bool) -> HRESULT, + fn get_MaxPosition(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn put_MaxPosition(&mut self, value: ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_MaxScale(&mut self, out: *mut f32) -> HRESULT, + fn put_MaxScale(&mut self, value: f32) -> HRESULT, + fn get_MinPosition(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn put_MinPosition(&mut self, value: ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_MinScale(&mut self, out: *mut f32) -> HRESULT, + fn put_MinScale(&mut self, value: f32) -> HRESULT, + fn get_NaturalRestingPosition(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_NaturalRestingScale(&mut self, out: *mut f32) -> HRESULT, + fn get_Owner(&mut self, out: *mut *mut IInteractionTrackerOwner) -> HRESULT, + fn get_Position(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_PositionInertiaDecayRate(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT, + fn put_PositionInertiaDecayRate(&mut self, value: *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT, + fn get_PositionVelocityInPixelsPerSecond(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_Scale(&mut self, out: *mut f32) -> HRESULT, + fn get_ScaleInertiaDecayRate(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn put_ScaleInertiaDecayRate(&mut self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_ScaleVelocityInPercentPerSecond(&mut self, out: *mut f32) -> HRESULT, + fn AdjustPositionXIfGreaterThanThreshold(&mut self, adjustment: f32, positionThreshold: f32) -> HRESULT, + fn AdjustPositionYIfGreaterThanThreshold(&mut self, adjustment: f32, positionThreshold: f32) -> HRESULT, + fn ConfigurePositionXInertiaModifiers(&mut self, modifiers: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn ConfigurePositionYInertiaModifiers(&mut self, modifiers: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn ConfigureScaleInertiaModifiers(&mut self, modifiers: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn TryUpdatePosition(&mut self, value: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT, + fn TryUpdatePositionBy(&mut self, amount: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT, + fn TryUpdatePositionWithAnimation(&mut self, animation: *mut super::CompositionAnimation, out: *mut i32) -> HRESULT, + fn TryUpdatePositionWithAdditionalVelocity(&mut self, velocityInPixelsPerSecond: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT, + fn TryUpdateScale(&mut self, value: f32, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT, + fn TryUpdateScaleWithAnimation(&mut self, animation: *mut super::CompositionAnimation, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT, + fn TryUpdateScaleWithAdditionalVelocity(&mut self, velocityInPercentPerSecond: f32, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT + }} + impl IInteractionTracker { + #[inline] pub unsafe fn get_interaction_sources(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InteractionSources)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_position_rounding_suggested(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPositionRoundingSuggested)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_position(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_position(&mut self, value: ::rt::gen::windows::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxPosition)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_scale(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxScale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_position(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_position(&mut self, value: ::rt::gen::windows::foundation::numerics::Vector3) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinPosition)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_scale(&mut self, value: f32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinScale)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_natural_resting_position(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NaturalRestingPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_natural_resting_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NaturalRestingScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_owner(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Owner)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_inertia_decay_rate(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PositionInertiaDecayRate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_position_inertia_decay_rate(&mut self, value: &::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> Result<()> { + let hr = ((*self.lpVtbl).put_PositionInertiaDecayRate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_velocity_in_pixels_per_second(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionVelocityInPixelsPerSecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Scale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scale_inertia_decay_rate(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ScaleInertiaDecayRate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_scale_inertia_decay_rate(&mut self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).put_ScaleInertiaDecayRate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scale_velocity_in_percent_per_second(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScaleVelocityInPercentPerSecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn adjust_position_xif_greater_than_threshold(&mut self, adjustment: f32, positionThreshold: f32) -> Result<()> { + let hr = ((*self.lpVtbl).AdjustPositionXIfGreaterThanThreshold)(self, adjustment, positionThreshold); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn adjust_position_yif_greater_than_threshold(&mut self, adjustment: f32, positionThreshold: f32) -> Result<()> { + let hr = ((*self.lpVtbl).AdjustPositionYIfGreaterThanThreshold)(self, adjustment, positionThreshold); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn configure_position_xinertia_modifiers(&mut self, modifiers: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).ConfigurePositionXInertiaModifiers)(self, modifiers as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn configure_position_yinertia_modifiers(&mut self, modifiers: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).ConfigurePositionYInertiaModifiers)(self, modifiers as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn configure_scale_inertia_modifiers(&mut self, modifiers: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + let hr = ((*self.lpVtbl).ConfigureScaleInertiaModifiers)(self, modifiers as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn try_update_position(&mut self, value: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryUpdatePosition)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_update_position_by(&mut self, amount: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryUpdatePositionBy)(self, amount, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_update_position_with_animation(&mut self, animation: &super::CompositionAnimation) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryUpdatePositionWithAnimation)(self, animation as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_update_position_with_additional_velocity(&mut self, velocityInPixelsPerSecond: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryUpdatePositionWithAdditionalVelocity)(self, velocityInPixelsPerSecond, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_update_scale(&mut self, value: f32, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryUpdateScale)(self, value, centerPoint, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_update_scale_with_animation(&mut self, animation: &super::CompositionAnimation, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryUpdateScaleWithAnimation)(self, animation as *const _ as *mut _, centerPoint, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn try_update_scale_with_additional_velocity(&mut self, velocityInPercentPerSecond: f32, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryUpdateScaleWithAdditionalVelocity)(self, velocityInPercentPerSecond, centerPoint, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerCustomAnimationStateEnteredArgs, 2367458545, 55216, 17228, 165, 210, 45, 118, 17, 134, 72, 52); + RT_INTERFACE!{interface IInteractionTrackerCustomAnimationStateEnteredArgs(IInteractionTrackerCustomAnimationStateEnteredArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerCustomAnimationStateEnteredArgs] { + fn get_RequestId(&mut self, out: *mut i32) -> HRESULT + }} + impl IInteractionTrackerCustomAnimationStateEnteredArgs { + #[inline] pub unsafe fn get_request_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerIdleStateEnteredArgs, 1342255018, 5392, 16706, 161, 165, 1, 155, 9, 248, 133, 123); + RT_INTERFACE!{interface IInteractionTrackerIdleStateEnteredArgs(IInteractionTrackerIdleStateEnteredArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerIdleStateEnteredArgs] { + fn get_RequestId(&mut self, out: *mut i32) -> HRESULT + }} + impl IInteractionTrackerIdleStateEnteredArgs { + #[inline] pub unsafe fn get_request_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerInteractingStateEnteredArgs, 2804300089, 41339, 16401, 153, 253, 181, 194, 79, 20, 55, 72); + RT_INTERFACE!{interface IInteractionTrackerInteractingStateEnteredArgs(IInteractionTrackerInteractingStateEnteredArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerInteractingStateEnteredArgs] { + fn get_RequestId(&mut self, out: *mut i32) -> HRESULT + }} + impl IInteractionTrackerInteractingStateEnteredArgs { + #[inline] pub unsafe fn get_request_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerInertiaModifier, 2699217184, 9908, 19874, 139, 97, 94, 104, 57, 121, 187, 226); + RT_INTERFACE!{interface IInteractionTrackerInertiaModifier(IInteractionTrackerInertiaModifierVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerInertiaModifier] { + + }} + DEFINE_IID!(IID_IInteractionTrackerInertiaRestingValueStatics, 418203289, 1861, 16534, 188, 171, 58, 78, 153, 86, 155, 207); + RT_INTERFACE!{static interface IInteractionTrackerInertiaRestingValueStatics(IInteractionTrackerInertiaRestingValueStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerInertiaRestingValueStatics] { + fn Create(&mut self, compositor: *mut super::Compositor, out: *mut *mut InteractionTrackerInertiaRestingValue) -> HRESULT + }} + impl IInteractionTrackerInertiaRestingValueStatics { + #[inline] pub unsafe fn create(&mut self, compositor: &super::Compositor) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, compositor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerInertiaRestingValue, 2264394761, 20630, 16752, 156, 200, 223, 47, 225, 1, 187, 147); + RT_INTERFACE!{interface IInteractionTrackerInertiaRestingValue(IInteractionTrackerInertiaRestingValueVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerInertiaRestingValue] { + fn get_Condition(&mut self, out: *mut *mut super::ExpressionAnimation) -> HRESULT, + fn put_Condition(&mut self, value: *mut super::ExpressionAnimation) -> HRESULT, + fn get_RestingValue(&mut self, out: *mut *mut super::ExpressionAnimation) -> HRESULT, + fn put_RestingValue(&mut self, value: *mut super::ExpressionAnimation) -> HRESULT + }} + impl IInteractionTrackerInertiaRestingValue { + #[inline] pub unsafe fn get_condition(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Condition)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_condition(&mut self, value: &super::ExpressionAnimation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Condition)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_resting_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RestingValue)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_resting_value(&mut self, value: &super::ExpressionAnimation) -> Result<()> { + let hr = ((*self.lpVtbl).put_RestingValue)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerInertiaMotionStatics, 2361933270, 47739, 17178, 132, 75, 110, 172, 145, 48, 249, 154); + RT_INTERFACE!{static interface IInteractionTrackerInertiaMotionStatics(IInteractionTrackerInertiaMotionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerInertiaMotionStatics] { + fn Create(&mut self, compositor: *mut super::Compositor, out: *mut *mut InteractionTrackerInertiaMotion) -> HRESULT + }} + impl IInteractionTrackerInertiaMotionStatics { + #[inline] pub unsafe fn create(&mut self, compositor: &super::Compositor) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, compositor as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerInertiaMotion, 76689372, 61780, 19640, 191, 51, 204, 27, 166, 17, 230, 219); + RT_INTERFACE!{interface IInteractionTrackerInertiaMotion(IInteractionTrackerInertiaMotionVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerInertiaMotion] { + fn get_Condition(&mut self, out: *mut *mut super::ExpressionAnimation) -> HRESULT, + fn put_Condition(&mut self, value: *mut super::ExpressionAnimation) -> HRESULT, + fn get_Motion(&mut self, out: *mut *mut super::ExpressionAnimation) -> HRESULT, + fn put_Motion(&mut self, value: *mut super::ExpressionAnimation) -> HRESULT + }} + impl IInteractionTrackerInertiaMotion { + #[inline] pub unsafe fn get_condition(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Condition)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_condition(&mut self, value: &super::ExpressionAnimation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Condition)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_motion(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Motion)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_motion(&mut self, value: &super::ExpressionAnimation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Motion)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerInertiaStateEnteredArgs, 2266008818, 59391, 20349, 159, 253, 215, 47, 30, 64, 155, 99); + RT_INTERFACE!{interface IInteractionTrackerInertiaStateEnteredArgs(IInteractionTrackerInertiaStateEnteredArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerInertiaStateEnteredArgs] { + fn get_ModifiedRestingPosition(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT, + fn get_ModifiedRestingScale(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_NaturalRestingPosition(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_NaturalRestingScale(&mut self, out: *mut f32) -> HRESULT, + fn get_PositionVelocityInPixelsPerSecond(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_RequestId(&mut self, out: *mut i32) -> HRESULT, + fn get_ScaleVelocityInPercentPerSecond(&mut self, out: *mut f32) -> HRESULT + }} + impl IInteractionTrackerInertiaStateEnteredArgs { + #[inline] pub unsafe fn get_modified_resting_position(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ModifiedRestingPosition)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_modified_resting_scale(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ModifiedRestingScale)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_natural_resting_position(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NaturalRestingPosition)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_natural_resting_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NaturalRestingScale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_velocity_in_pixels_per_second(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionVelocityInPixelsPerSecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_request_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scale_velocity_in_percent_per_second(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScaleVelocityInPercentPerSecond)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerRequestIgnoredArgs, 2162000625, 52773, 18575, 145, 221, 203, 100, 85, 204, 255, 46); + RT_INTERFACE!{interface IInteractionTrackerRequestIgnoredArgs(IInteractionTrackerRequestIgnoredArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerRequestIgnoredArgs] { + fn get_RequestId(&mut self, out: *mut i32) -> HRESULT + }} + impl IInteractionTrackerRequestIgnoredArgs { + #[inline] pub unsafe fn get_request_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerValuesChangedArgs, 3474290927, 54239, 17665, 185, 230, 240, 47, 178, 47, 115, 208); + RT_INTERFACE!{interface IInteractionTrackerValuesChangedArgs(IInteractionTrackerValuesChangedArgsVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerValuesChangedArgs] { + fn get_Position(&mut self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_RequestId(&mut self, out: *mut i32) -> HRESULT, + fn get_Scale(&mut self, out: *mut f32) -> HRESULT + }} + impl IInteractionTrackerValuesChangedArgs { + #[inline] pub unsafe fn get_position(&mut self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Position)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_request_id(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestId)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_scale(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Scale)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVisualInteractionSourceStatics, 916022753, 34373, 20341, 186, 0, 100, 121, 205, 16, 200, 230); + RT_INTERFACE!{static interface IVisualInteractionSourceStatics(IVisualInteractionSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IVisualInteractionSourceStatics] { + fn Create(&mut self, source: *mut super::Visual, out: *mut *mut VisualInteractionSource) -> HRESULT + }} + impl IVisualInteractionSourceStatics { + #[inline] pub unsafe fn create(&mut self, source: &super::Visual) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Create)(self, source as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVisualInteractionSource, 3389950598, 55510, 16657, 176, 136, 112, 52, 123, 210, 176, 237); + RT_INTERFACE!{interface IVisualInteractionSource(IVisualInteractionSourceVtbl): IInspectable(IInspectableVtbl) [IID_IVisualInteractionSource] { + fn get_IsPositionXRailsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPositionXRailsEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsPositionYRailsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPositionYRailsEnabled(&mut self, value: bool) -> HRESULT, + fn get_ManipulationRedirectionMode(&mut self, out: *mut VisualInteractionSourceRedirectionMode) -> HRESULT, + fn put_ManipulationRedirectionMode(&mut self, value: VisualInteractionSourceRedirectionMode) -> HRESULT, + fn get_PositionXChainingMode(&mut self, out: *mut InteractionChainingMode) -> HRESULT, + fn put_PositionXChainingMode(&mut self, value: InteractionChainingMode) -> HRESULT, + fn get_PositionXSourceMode(&mut self, out: *mut InteractionSourceMode) -> HRESULT, + fn put_PositionXSourceMode(&mut self, value: InteractionSourceMode) -> HRESULT, + fn get_PositionYChainingMode(&mut self, out: *mut InteractionChainingMode) -> HRESULT, + fn put_PositionYChainingMode(&mut self, value: InteractionChainingMode) -> HRESULT, + fn get_PositionYSourceMode(&mut self, out: *mut InteractionSourceMode) -> HRESULT, + fn put_PositionYSourceMode(&mut self, value: InteractionSourceMode) -> HRESULT, + fn get_ScaleChainingMode(&mut self, out: *mut InteractionChainingMode) -> HRESULT, + fn put_ScaleChainingMode(&mut self, value: InteractionChainingMode) -> HRESULT, + fn get_ScaleSourceMode(&mut self, out: *mut InteractionSourceMode) -> HRESULT, + fn put_ScaleSourceMode(&mut self, value: InteractionSourceMode) -> HRESULT, + fn get_Source(&mut self, out: *mut *mut super::Visual) -> HRESULT, + fn TryRedirectForManipulation(&mut self, pointerPoint: *mut super::super::input::PointerPoint) -> HRESULT + }} + impl IVisualInteractionSource { + #[inline] pub unsafe fn get_is_position_xrails_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPositionXRailsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_position_xrails_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPositionXRailsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_position_yrails_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPositionYRailsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_position_yrails_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPositionYRailsEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_manipulation_redirection_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ManipulationRedirectionMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_manipulation_redirection_mode(&mut self, value: VisualInteractionSourceRedirectionMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ManipulationRedirectionMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_xchaining_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionXChainingMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position_xchaining_mode(&mut self, value: InteractionChainingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_PositionXChainingMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_xsource_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionXSourceMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position_xsource_mode(&mut self, value: InteractionSourceMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_PositionXSourceMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_ychaining_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionYChainingMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position_ychaining_mode(&mut self, value: InteractionChainingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_PositionYChainingMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_ysource_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PositionYSourceMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_position_ysource_mode(&mut self, value: InteractionSourceMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_PositionYSourceMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scale_chaining_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScaleChainingMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scale_chaining_mode(&mut self, value: InteractionChainingMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ScaleChainingMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_scale_source_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ScaleSourceMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_scale_source_mode(&mut self, value: InteractionSourceMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ScaleSourceMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_redirect_for_manipulation(&mut self, pointerPoint: &super::super::input::PointerPoint) -> Result<()> { + let hr = ((*self.lpVtbl).TryRedirectForManipulation)(self, pointerPoint as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInteractionTrackerInertiaModifierFactory, 2570590462, 51534, 19334, 135, 243, 146, 38, 101, 186, 70, 185); + RT_INTERFACE!{interface IInteractionTrackerInertiaModifierFactory(IInteractionTrackerInertiaModifierFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerInertiaModifierFactory] { + + }} + RT_CLASS!{class InteractionTracker: IInteractionTracker} + RT_ACTIVATABLE!{IInteractionTrackerStatics [CLSID_InteractionTracker]} + DEFINE_CLSID!(CLSID_InteractionTracker = &[87,105,110,100,111,119,115,46,85,73,46,67,111,109,112,111,115,105,116,105,111,110,46,73,110,116,101,114,97,99,116,105,111,110,115,46,73,110,116,101,114,97,99,116,105,111,110,84,114,97,99,107,101,114,0]); + RT_CLASS!{class CompositionInteractionSourceCollection: ICompositionInteractionSourceCollection} + RT_CLASS!{class InteractionTrackerInertiaModifier: IInteractionTrackerInertiaModifier} + RT_CLASS!{class InteractionTrackerInertiaRestingValue: IInteractionTrackerInertiaRestingValue} + RT_ACTIVATABLE!{IInteractionTrackerInertiaRestingValueStatics [CLSID_InteractionTrackerInertiaRestingValue]} + DEFINE_CLSID!(CLSID_InteractionTrackerInertiaRestingValue = &[87,105,110,100,111,119,115,46,85,73,46,67,111,109,112,111,115,105,116,105,111,110,46,73,110,116,101,114,97,99,116,105,111,110,115,46,73,110,116,101,114,97,99,116,105,111,110,84,114,97,99,107,101,114,73,110,101,114,116,105,97,82,101,115,116,105,110,103,86,97,108,117,101,0]); + RT_CLASS!{class InteractionTrackerInertiaMotion: IInteractionTrackerInertiaMotion} + RT_ACTIVATABLE!{IInteractionTrackerInertiaMotionStatics [CLSID_InteractionTrackerInertiaMotion]} + DEFINE_CLSID!(CLSID_InteractionTrackerInertiaMotion = &[87,105,110,100,111,119,115,46,85,73,46,67,111,109,112,111,115,105,116,105,111,110,46,73,110,116,101,114,97,99,116,105,111,110,115,46,73,110,116,101,114,97,99,116,105,111,110,84,114,97,99,107,101,114,73,110,101,114,116,105,97,77,111,116,105,111,110,0]); + RT_CLASS!{class VisualInteractionSource: IVisualInteractionSource} + RT_ACTIVATABLE!{IVisualInteractionSourceStatics [CLSID_VisualInteractionSource]} + DEFINE_CLSID!(CLSID_VisualInteractionSource = &[87,105,110,100,111,119,115,46,85,73,46,67,111,109,112,111,115,105,116,105,111,110,46,73,110,116,101,114,97,99,116,105,111,110,115,46,86,105,115,117,97,108,73,110,116,101,114,97,99,116,105,111,110,83,111,117,114,99,101,0]); +} // Windows.UI.Composition.Interactions +} // Windows.UI.Composition +#[cfg(feature="windows.ui.xaml")] +pub mod xaml { // Windows.UI.Xaml +use ::prelude::*; + DEFINE_IID!(IID_IDataTemplateExtension, 1499370823, 52735, 19346, 183, 115, 171, 57, 104, 120, 243, 83); + RT_INTERFACE!{interface IDataTemplateExtension(IDataTemplateExtensionVtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplateExtension] { + fn ResetTemplate(&mut self) -> HRESULT, + fn ProcessBinding(&mut self, phase: u32, out: *mut bool) -> HRESULT, + fn ProcessBindings(&mut self, arg: *mut controls::ContainerContentChangingEventArgs, out: *mut i32) -> HRESULT + }} + impl IDataTemplateExtension { + #[inline] pub unsafe fn reset_template(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ResetTemplate)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn process_binding(&mut self, phase: u32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ProcessBinding)(self, phase, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn process_bindings(&mut self, arg: &controls::ContainerContentChangingEventArgs) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ProcessBindings)(self, arg as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataTemplate, 2568007367, 35509, 16664, 155, 198, 9, 244, 90, 53, 7, 61); + RT_INTERFACE!{interface IDataTemplate(IDataTemplateVtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplate] { + fn LoadContent(&mut self, out: *mut *mut DependencyObject) -> HRESULT + }} + impl IDataTemplate { + #[inline] pub unsafe fn load_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).LoadContent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataTemplateFactory, 1374526846, 11091, 18267, 156, 136, 12, 24, 50, 200, 53, 26); + RT_INTERFACE!{interface IDataTemplateFactory(IDataTemplateFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplateFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DataTemplate) -> HRESULT + }} + impl IDataTemplateFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataTemplateStatics2, 2331475315, 43521, 18206, 190, 221, 139, 173, 134, 33, 155, 119); + RT_INTERFACE!{static interface IDataTemplateStatics2(IDataTemplateStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplateStatics2] { + fn get_ExtensionInstanceProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn GetExtensionInstance(&mut self, element: *mut FrameworkElement, out: *mut *mut IDataTemplateExtension) -> HRESULT, + fn SetExtensionInstance(&mut self, element: *mut FrameworkElement, value: *mut IDataTemplateExtension) -> HRESULT + }} + impl IDataTemplateStatics2 { + #[inline] pub unsafe fn get_extension_instance_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExtensionInstanceProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_extension_instance(&mut self, element: &FrameworkElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetExtensionInstance)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_extension_instance(&mut self, element: &FrameworkElement, value: &IDataTemplateExtension) -> Result<()> { + let hr = ((*self.lpVtbl).SetExtensionInstance)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDispatcherTimer, 3512782406, 52514, 20319, 140, 151, 64, 230, 29, 163, 226, 220); + RT_INTERFACE!{interface IDispatcherTimer(IDispatcherTimerVtbl): IInspectable(IInspectableVtbl) [IID_IDispatcherTimer] { + fn get_Interval(&mut self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Interval(&mut self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_IsEnabled(&mut self, out: *mut bool) -> HRESULT, + fn add_Tick(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Tick(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn Start(&mut self) -> HRESULT, + fn Stop(&mut self) -> HRESULT + }} + impl IDispatcherTimer { + #[inline] pub unsafe fn get_interval(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Interval)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_interval(&mut self, value: super::super::foundation::TimeSpan) -> Result<()> { + let hr = ((*self.lpVtbl).put_Interval)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_tick(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Tick)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_tick(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Tick)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDispatcherTimerFactory, 3918929518, 13862, 16442, 175, 224, 4, 13, 88, 22, 86, 50); + RT_INTERFACE!{interface IDispatcherTimerFactory(IDispatcherTimerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDispatcherTimerFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DispatcherTimer) -> HRESULT + }} + impl IDispatcherTimerFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + RT_CLASS!{class DispatcherTimer: IDispatcherTimer} + RT_ENUM! { enum DurationType: i32 { + Automatic (DurationType_Automatic) = 0, TimeSpan (DurationType_TimeSpan) = 1, Forever (DurationType_Forever) = 2, + }} + RT_ENUM! { enum ElementSoundKind: i32 { + Focus (ElementSoundKind_Focus) = 0, Invoke (ElementSoundKind_Invoke) = 1, Show (ElementSoundKind_Show) = 2, Hide (ElementSoundKind_Hide) = 3, MovePrevious (ElementSoundKind_MovePrevious) = 4, MoveNext (ElementSoundKind_MoveNext) = 5, GoBack (ElementSoundKind_GoBack) = 6, + }} + RT_ENUM! { enum ElementSoundMode: i32 { + Default (ElementSoundMode_Default) = 0, FocusOnly (ElementSoundMode_FocusOnly) = 1, Off (ElementSoundMode_Off) = 2, + }} + RT_ENUM! { enum ElementSoundPlayerState: i32 { + Auto (ElementSoundPlayerState_Auto) = 0, Off (ElementSoundPlayerState_Off) = 1, On (ElementSoundPlayerState_On) = 2, + }} + RT_ENUM! { enum ElementTheme: i32 { + Default (ElementTheme_Default) = 0, Light (ElementTheme_Light) = 1, Dark (ElementTheme_Dark) = 2, + }} + RT_ENUM! { enum FlowDirection: i32 { + LeftToRight (FlowDirection_LeftToRight) = 0, RightToLeft (FlowDirection_RightToLeft) = 1, + }} + RT_ENUM! { enum FocusState: i32 { + Unfocused (FocusState_Unfocused) = 0, Pointer (FocusState_Pointer) = 1, Keyboard (FocusState_Keyboard) = 2, Programmatic (FocusState_Programmatic) = 3, + }} + RT_ENUM! { enum FocusVisualKind: i32 { + DottedLine (FocusVisualKind_DottedLine) = 0, HighVisibility (FocusVisualKind_HighVisibility) = 1, + }} + RT_ENUM! { enum HorizontalAlignment: i32 { + Left (HorizontalAlignment_Left) = 0, Center (HorizontalAlignment_Center) = 1, Right (HorizontalAlignment_Right) = 2, Stretch (HorizontalAlignment_Stretch) = 3, + }} + RT_ENUM! { enum VerticalAlignment: i32 { + Top (VerticalAlignment_Top) = 0, Center (VerticalAlignment_Center) = 1, Bottom (VerticalAlignment_Bottom) = 2, Stretch (VerticalAlignment_Stretch) = 3, + }} + RT_ENUM! { enum Visibility: i32 { + Visible (Visibility_Visible) = 0, Collapsed (Visibility_Collapsed) = 1, + }} + RT_STRUCT! { struct CornerRadius { + TopLeft: f64, TopRight: f64, BottomRight: f64, BottomLeft: f64, + }} + DEFINE_IID!(IID_ICornerRadiusHelper, 4252754306, 7387, 17032, 184, 200, 133, 238, 121, 41, 123, 252); + RT_INTERFACE!{interface ICornerRadiusHelper(ICornerRadiusHelperVtbl): IInspectable(IInspectableVtbl) [IID_ICornerRadiusHelper] { + + }} + DEFINE_IID!(IID_ICornerRadiusHelperStatics, 4104255065, 54484, 17695, 163, 135, 214, 191, 75, 36, 81, 212); + RT_INTERFACE!{static interface ICornerRadiusHelperStatics(ICornerRadiusHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICornerRadiusHelperStatics] { + fn FromRadii(&mut self, topLeft: f64, topRight: f64, bottomRight: f64, bottomLeft: f64, out: *mut CornerRadius) -> HRESULT, + fn FromUniformRadius(&mut self, uniformRadius: f64, out: *mut CornerRadius) -> HRESULT + }} + impl ICornerRadiusHelperStatics { + #[inline] pub unsafe fn from_radii(&mut self, topLeft: f64, topRight: f64, bottomRight: f64, bottomLeft: f64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromRadii)(self, topLeft, topRight, bottomRight, bottomLeft, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn from_uniform_radius(&mut self, uniformRadius: f64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromUniformRadius)(self, uniformRadius, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CornerRadiusHelper: ICornerRadiusHelper} + RT_ACTIVATABLE!{ICornerRadiusHelperStatics [CLSID_CornerRadiusHelper]} + DEFINE_CLSID!(CLSID_CornerRadiusHelper = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,67,111,114,110,101,114,82,97,100,105,117,115,72,101,108,112,101,114,0]); + RT_STRUCT! { struct Duration { + TimeSpan: super::super::foundation::TimeSpan, Type: DurationType, + }} + DEFINE_IID!(IID_IDurationHelper, 633431455, 17559, 16693, 148, 15, 238, 150, 244, 214, 233, 52); + RT_INTERFACE!{interface IDurationHelper(IDurationHelperVtbl): IInspectable(IInspectableVtbl) [IID_IDurationHelper] { + + }} + DEFINE_IID!(IID_IDurationHelperStatics, 3163031870, 13639, 20160, 181, 25, 255, 168, 249, 196, 131, 140); + RT_INTERFACE!{static interface IDurationHelperStatics(IDurationHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDurationHelperStatics] { + fn get_Automatic(&mut self, out: *mut Duration) -> HRESULT, + fn get_Forever(&mut self, out: *mut Duration) -> HRESULT, + fn Compare(&mut self, duration1: Duration, duration2: Duration, out: *mut i32) -> HRESULT, + fn FromTimeSpan(&mut self, timeSpan: super::super::foundation::TimeSpan, out: *mut Duration) -> HRESULT, + fn GetHasTimeSpan(&mut self, target: Duration, out: *mut bool) -> HRESULT, + fn Add(&mut self, target: Duration, duration: Duration, out: *mut Duration) -> HRESULT, + fn Equals(&mut self, target: Duration, value: Duration, out: *mut bool) -> HRESULT, + fn Subtract(&mut self, target: Duration, duration: Duration, out: *mut Duration) -> HRESULT + }} + impl IDurationHelperStatics { + #[inline] pub unsafe fn get_automatic(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Automatic)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_forever(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Forever)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn compare(&mut self, duration1: Duration, duration2: Duration) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Compare)(self, duration1, duration2, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn from_time_span(&mut self, timeSpan: super::super::foundation::TimeSpan) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromTimeSpan)(self, timeSpan, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_time_span(&mut self, target: Duration) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetHasTimeSpan)(self, target, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add(&mut self, target: Duration, duration: Duration) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Add)(self, target, duration, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn equals(&mut self, target: Duration, value: Duration) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Equals)(self, target, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn subtract(&mut self, target: Duration, duration: Duration) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Subtract)(self, target, duration, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class DurationHelper: IDurationHelper} + RT_ACTIVATABLE!{IDurationHelperStatics [CLSID_DurationHelper]} + DEFINE_CLSID!(CLSID_DurationHelper = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,68,117,114,97,116,105,111,110,72,101,108,112,101,114,0]); + RT_STRUCT! { struct Thickness { + Left: f64, Top: f64, Right: f64, Bottom: f64, + }} + DEFINE_IID!(IID_IThicknessHelper, 2825629259, 7823, 20203, 144, 19, 11, 40, 56, 169, 123, 52); + RT_INTERFACE!{interface IThicknessHelper(IThicknessHelperVtbl): IInspectable(IInspectableVtbl) [IID_IThicknessHelper] { + + }} + DEFINE_IID!(IID_IThicknessHelperStatics, 3231259260, 1804, 19878, 135, 132, 1, 202, 128, 14, 183, 58); + RT_INTERFACE!{static interface IThicknessHelperStatics(IThicknessHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IThicknessHelperStatics] { + fn FromLengths(&mut self, left: f64, top: f64, right: f64, bottom: f64, out: *mut Thickness) -> HRESULT, + fn FromUniformLength(&mut self, uniformLength: f64, out: *mut Thickness) -> HRESULT + }} + impl IThicknessHelperStatics { + #[inline] pub unsafe fn from_lengths(&mut self, left: f64, top: f64, right: f64, bottom: f64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromLengths)(self, left, top, right, bottom, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn from_uniform_length(&mut self, uniformLength: f64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromUniformLength)(self, uniformLength, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class ThicknessHelper: IThicknessHelper} + RT_ACTIVATABLE!{IThicknessHelperStatics [CLSID_ThicknessHelper]} + DEFINE_CLSID!(CLSID_ThicknessHelper = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,84,104,105,99,107,110,101,115,115,72,101,108,112,101,114,0]); + DEFINE_IID!(IID_ApplicationInitializationCallback, 3056933973, 49796, 18148, 131, 16, 251, 9, 103, 250, 183, 111); + RT_DELEGATE!{delegate ApplicationInitializationCallback(ApplicationInitializationCallbackVtbl, ApplicationInitializationCallbackImpl) [IID_ApplicationInitializationCallback] { + fn Invoke(&mut self, p: *mut ApplicationInitializationCallbackParams) -> HRESULT + }} + impl ApplicationInitializationCallback { + #[inline] pub unsafe fn invoke(&mut self, p: &ApplicationInitializationCallbackParams) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, p as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ApplicationInitializationCallbackParams: IApplicationInitializationCallbackParams} + DEFINE_IID!(IID_CreateDefaultValueCallback, 3605836076, 5557, 20168, 185, 92, 205, 210, 8, 240, 129, 83); + RT_DELEGATE!{delegate CreateDefaultValueCallback(CreateDefaultValueCallbackVtbl, CreateDefaultValueCallbackImpl) [IID_CreateDefaultValueCallback] { + fn Invoke(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl CreateDefaultValueCallback { + #[inline] pub unsafe fn invoke(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Invoke)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_DependencyPropertyChangedCallback, 1166556438, 10175, 19393, 172, 38, 148, 193, 96, 31, 58, 73); + RT_DELEGATE!{delegate DependencyPropertyChangedCallback(DependencyPropertyChangedCallbackVtbl, DependencyPropertyChangedCallbackImpl) [IID_DependencyPropertyChangedCallback] { + fn Invoke(&mut self, sender: *mut DependencyObject, dp: *mut DependencyProperty) -> HRESULT + }} + impl DependencyPropertyChangedCallback { + #[inline] pub unsafe fn invoke(&mut self, sender: &DependencyObject, dp: &DependencyProperty) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, dp as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DependencyObject: IDependencyObject} + RT_CLASS!{class DependencyProperty: IDependencyProperty} + RT_ACTIVATABLE!{IDependencyPropertyStatics [CLSID_DependencyProperty]} + DEFINE_CLSID!(CLSID_DependencyProperty = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,68,101,112,101,110,100,101,110,99,121,80,114,111,112,101,114,116,121,0]); + DEFINE_IID!(IID_DependencyPropertyChangedEventHandler, 153239130, 30142, 17561, 129, 128, 29, 220, 0, 84, 33, 192); + RT_DELEGATE!{delegate DependencyPropertyChangedEventHandler(DependencyPropertyChangedEventHandlerVtbl, DependencyPropertyChangedEventHandlerImpl) [IID_DependencyPropertyChangedEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut DependencyPropertyChangedEventArgs) -> HRESULT + }} + impl DependencyPropertyChangedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &DependencyPropertyChangedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DependencyPropertyChangedEventArgs: IDependencyPropertyChangedEventArgs} + DEFINE_IID!(IID_DragEventHandler, 716284421, 7795, 19407, 170, 188, 87, 185, 126, 33, 150, 29); + RT_DELEGATE!{delegate DragEventHandler(DragEventHandlerVtbl, DragEventHandlerImpl) [IID_DragEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut DragEventArgs) -> HRESULT + }} + impl DragEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &DragEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_EnteredBackgroundEventHandler, 2477348526, 7551, 17291, 183, 184, 34, 125, 150, 182, 9, 192); + RT_DELEGATE!{delegate EnteredBackgroundEventHandler(EnteredBackgroundEventHandlerVtbl, EnteredBackgroundEventHandlerImpl) [IID_EnteredBackgroundEventHandler] { + #[cfg(feature="windows.applicationmodel")] fn Invoke(&mut self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::EnteredBackgroundEventArgs) -> HRESULT + }} + impl EnteredBackgroundEventHandler { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &super::super::applicationmodel::EnteredBackgroundEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ExceptionRoutedEventHandler, 1759569936, 63210, 17084, 133, 91, 93, 155, 103, 230, 162, 98); + RT_DELEGATE!{delegate ExceptionRoutedEventHandler(ExceptionRoutedEventHandlerVtbl, ExceptionRoutedEventHandlerImpl) [IID_ExceptionRoutedEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut ExceptionRoutedEventArgs) -> HRESULT + }} + impl ExceptionRoutedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &ExceptionRoutedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_LeavingBackgroundEventHandler, 2863488429, 20422, 19108, 183, 207, 135, 126, 54, 173, 164, 246); + RT_DELEGATE!{delegate LeavingBackgroundEventHandler(LeavingBackgroundEventHandlerVtbl, LeavingBackgroundEventHandlerImpl) [IID_LeavingBackgroundEventHandler] { + #[cfg(feature="windows.applicationmodel")] fn Invoke(&mut self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::LeavingBackgroundEventArgs) -> HRESULT + }} + impl LeavingBackgroundEventHandler { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &super::super::applicationmodel::LeavingBackgroundEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_PropertyChangedCallback, 1520405029, 53570, 17572, 130, 49, 253, 103, 103, 36, 242, 155); + RT_DELEGATE!{delegate PropertyChangedCallback(PropertyChangedCallbackVtbl, PropertyChangedCallbackImpl) [IID_PropertyChangedCallback] { + fn Invoke(&mut self, d: *mut DependencyObject, e: *mut DependencyPropertyChangedEventArgs) -> HRESULT + }} + impl PropertyChangedCallback { + #[inline] pub unsafe fn invoke(&mut self, d: &DependencyObject, e: &DependencyPropertyChangedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, d as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_RoutedEventHandler, 2824267380, 45238, 19395, 187, 168, 27, 160, 110, 64, 212, 181); + RT_DELEGATE!{delegate RoutedEventHandler(RoutedEventHandlerVtbl, RoutedEventHandlerImpl) [IID_RoutedEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut RoutedEventArgs) -> HRESULT + }} + impl RoutedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &RoutedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class RoutedEventArgs: IRoutedEventArgs} + DEFINE_IID!(IID_SizeChangedEventHandler, 286634300, 9682, 18443, 137, 220, 235, 61, 203, 214, 183, 250); + RT_DELEGATE!{delegate SizeChangedEventHandler(SizeChangedEventHandlerVtbl, SizeChangedEventHandlerImpl) [IID_SizeChangedEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut SizeChangedEventArgs) -> HRESULT + }} + impl SizeChangedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &SizeChangedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_SuspendingEventHandler, 591565925, 58218, 16610, 177, 57, 164, 112, 70, 2, 166, 225); + RT_DELEGATE!{delegate SuspendingEventHandler(SuspendingEventHandlerVtbl, SuspendingEventHandlerImpl) [IID_SuspendingEventHandler] { + #[cfg(feature="windows.applicationmodel")] fn Invoke(&mut self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::SuspendingEventArgs) -> HRESULT + }} + impl SuspendingEventHandler { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &super::super::applicationmodel::SuspendingEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_UnhandledExceptionEventHandler, 2457134781, 18849, 18776, 190, 238, 208, 225, 149, 135, 182, 227); + RT_DELEGATE!{delegate UnhandledExceptionEventHandler(UnhandledExceptionEventHandlerVtbl, UnhandledExceptionEventHandlerImpl) [IID_UnhandledExceptionEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut UnhandledExceptionEventArgs) -> HRESULT + }} + impl UnhandledExceptionEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &UnhandledExceptionEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class UnhandledExceptionEventArgs: IUnhandledExceptionEventArgs} + DEFINE_IID!(IID_VisualStateChangedEventHandler, 3872766933, 57385, 17318, 179, 109, 132, 168, 16, 66, 215, 116); + RT_DELEGATE!{delegate VisualStateChangedEventHandler(VisualStateChangedEventHandlerVtbl, VisualStateChangedEventHandlerImpl) [IID_VisualStateChangedEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut VisualStateChangedEventArgs) -> HRESULT + }} + impl VisualStateChangedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &VisualStateChangedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class VisualStateChangedEventArgs: IVisualStateChangedEventArgs} + DEFINE_IID!(IID_WindowActivatedEventHandler, 402809672, 34329, 19579, 181, 52, 206, 212, 93, 157, 226, 25); + RT_DELEGATE!{delegate WindowActivatedEventHandler(WindowActivatedEventHandlerVtbl, WindowActivatedEventHandlerImpl) [IID_WindowActivatedEventHandler] { + #[cfg(feature="windows.ui")] fn Invoke(&mut self, sender: *mut IInspectable, e: *mut super::core::WindowActivatedEventArgs) -> HRESULT + }} + impl WindowActivatedEventHandler { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &super::core::WindowActivatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_WindowClosedEventHandler, 230199649, 8407, 17887, 145, 34, 186, 137, 87, 103, 3, 186); + RT_DELEGATE!{delegate WindowClosedEventHandler(WindowClosedEventHandlerVtbl, WindowClosedEventHandlerImpl) [IID_WindowClosedEventHandler] { + #[cfg(feature="windows.ui")] fn Invoke(&mut self, sender: *mut IInspectable, e: *mut super::core::CoreWindowEventArgs) -> HRESULT + }} + impl WindowClosedEventHandler { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &super::core::CoreWindowEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_WindowSizeChangedEventHandler, 1545717570, 11501, 20441, 186, 56, 113, 24, 212, 14, 150, 107); + RT_DELEGATE!{delegate WindowSizeChangedEventHandler(WindowSizeChangedEventHandlerVtbl, WindowSizeChangedEventHandlerImpl) [IID_WindowSizeChangedEventHandler] { + #[cfg(feature="windows.ui")] fn Invoke(&mut self, sender: *mut IInspectable, e: *mut super::core::WindowSizeChangedEventArgs) -> HRESULT + }} + impl WindowSizeChangedEventHandler { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &super::core::WindowSizeChangedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_WindowVisibilityChangedEventHandler, 272657110, 45200, 19018, 178, 173, 214, 130, 223, 39, 19, 15); + RT_DELEGATE!{delegate WindowVisibilityChangedEventHandler(WindowVisibilityChangedEventHandlerVtbl, WindowVisibilityChangedEventHandlerImpl) [IID_WindowVisibilityChangedEventHandler] { + #[cfg(feature="windows.ui")] fn Invoke(&mut self, sender: *mut IInspectable, e: *mut super::core::VisibilityChangedEventArgs) -> HRESULT + }} + impl WindowVisibilityChangedEventHandler { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &super::core::VisibilityChangedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationInitializationCallbackParams, 1964734766, 22386, 17544, 139, 135, 245, 71, 250, 166, 68, 116); + RT_INTERFACE!{interface IApplicationInitializationCallbackParams(IApplicationInitializationCallbackParamsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationInitializationCallbackParams] { + + }} + DEFINE_IID!(IID_IDataContextChangedEventArgs, 2108067361, 2959, 20383, 161, 67, 248, 231, 120, 1, 54, 162); + RT_INTERFACE!{interface IDataContextChangedEventArgs(IDataContextChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDataContextChangedEventArgs] { + fn get_NewValue(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT + }} + impl IDataContextChangedEventArgs { + #[inline] pub unsafe fn get_new_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NewValue)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DataContextChangedEventArgs: IDataContextChangedEventArgs} + DEFINE_IID!(IID_IDataTemplateKey, 2268818472, 52459, 19297, 134, 250, 178, 206, 195, 156, 194, 250); + RT_INTERFACE!{interface IDataTemplateKey(IDataTemplateKeyVtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplateKey] { + fn get_DataType(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_DataType(&mut self, value: *mut IInspectable) -> HRESULT + }} + impl IDataTemplateKey { + #[inline] pub unsafe fn get_data_type(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataType)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_data_type(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataType)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataTemplateKeyFactory, 3916114265, 55682, 16722, 145, 203, 222, 14, 77, 253, 118, 147); + RT_INTERFACE!{interface IDataTemplateKeyFactory(IDataTemplateKeyFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplateKeyFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DataTemplateKey) -> HRESULT, + fn CreateInstanceWithType(&mut self, dataType: *mut IInspectable, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DataTemplateKey) -> HRESULT + }} + impl IDataTemplateKeyFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + #[inline] pub unsafe fn create_instance_with_type(&mut self, dataType: &IInspectable, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstanceWithType)(self, dataType as *const _ as *mut _, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + RT_CLASS!{class DataTemplateKey: IDataTemplateKey} + DEFINE_IID!(IID_IDependencyObject, 1548904037, 62990, 18706, 175, 89, 95, 224, 104, 15, 8, 157); + RT_INTERFACE!{interface IDependencyObject(IDependencyObjectVtbl): IInspectable(IInspectableVtbl) [IID_IDependencyObject] { + fn GetValue(&mut self, dp: *mut DependencyProperty, out: *mut *mut IInspectable) -> HRESULT, + fn SetValue(&mut self, dp: *mut DependencyProperty, value: *mut IInspectable) -> HRESULT, + fn ClearValue(&mut self, dp: *mut DependencyProperty) -> HRESULT, + fn ReadLocalValue(&mut self, dp: *mut DependencyProperty, out: *mut *mut IInspectable) -> HRESULT, + fn GetAnimationBaseValue(&mut self, dp: *mut DependencyProperty, out: *mut *mut IInspectable) -> HRESULT, + #[cfg(feature="windows.ui")] fn get_Dispatcher(&mut self, out: *mut *mut super::core::CoreDispatcher) -> HRESULT + }} + impl IDependencyObject { + #[inline] pub unsafe fn get_value(&mut self, dp: &DependencyProperty) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetValue)(self, dp as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, dp: &DependencyProperty, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetValue)(self, dp as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear_value(&mut self, dp: &DependencyProperty) -> Result<()> { + let hr = ((*self.lpVtbl).ClearValue)(self, dp as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn read_local_value(&mut self, dp: &DependencyProperty) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ReadLocalValue)(self, dp as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_animation_base_value(&mut self, dp: &DependencyProperty) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAnimationBaseValue)(self, dp as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_dispatcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Dispatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDependencyObjectFactory, 2583932818, 32138, 18743, 136, 79, 236, 243, 79, 224, 42, 203); + RT_INTERFACE!{interface IDependencyObjectFactory(IDependencyObjectFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDependencyObjectFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DependencyObject) -> HRESULT + }} + impl IDependencyObjectFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDependencyObject2, 704567389, 15650, 17313, 173, 208, 23, 2, 124, 8, 178, 18); + RT_INTERFACE!{interface IDependencyObject2(IDependencyObject2Vtbl): IInspectable(IInspectableVtbl) [IID_IDependencyObject2] { + fn RegisterPropertyChangedCallback(&mut self, dp: *mut DependencyProperty, callback: *mut DependencyPropertyChangedCallback, out: *mut i64) -> HRESULT, + fn UnregisterPropertyChangedCallback(&mut self, dp: *mut DependencyProperty, token: i64) -> HRESULT + }} + impl IDependencyObject2 { + #[inline] pub unsafe fn register_property_changed_callback(&mut self, dp: &DependencyProperty, callback: &DependencyPropertyChangedCallback) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).RegisterPropertyChangedCallback)(self, dp as *const _ as *mut _, callback as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn unregister_property_changed_callback(&mut self, dp: &DependencyProperty, token: i64) -> Result<()> { + let hr = ((*self.lpVtbl).UnregisterPropertyChangedCallback)(self, dp as *const _ as *mut _, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDependencyProperty, 2242984304, 39876, 20118, 172, 241, 48, 200, 253, 61, 85, 200); + RT_INTERFACE!{interface IDependencyProperty(IDependencyPropertyVtbl): IInspectable(IInspectableVtbl) [IID_IDependencyProperty] { + fn GetMetadata(&mut self, forType: interop::TypeName, out: *mut *mut PropertyMetadata) -> HRESULT + }} + impl IDependencyProperty { + #[inline] pub unsafe fn get_metadata(&mut self, forType: interop::TypeName) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetMetadata)(self, forType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PropertyMetadata: IPropertyMetadata} + RT_ACTIVATABLE!{IPropertyMetadataStatics [CLSID_PropertyMetadata]} + DEFINE_CLSID!(CLSID_PropertyMetadata = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,80,114,111,112,101,114,116,121,77,101,116,97,100,97,116,97,0]); + DEFINE_IID!(IID_IDependencyPropertyStatics, 1239806607, 33369, 19804, 170, 224, 131, 213, 109, 187, 104, 217); + RT_INTERFACE!{static interface IDependencyPropertyStatics(IDependencyPropertyStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDependencyPropertyStatics] { + fn get_UnsetValue(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn Register(&mut self, name: HSTRING, propertyType: interop::TypeName, ownerType: interop::TypeName, typeMetadata: *mut PropertyMetadata, out: *mut *mut DependencyProperty) -> HRESULT, + fn RegisterAttached(&mut self, name: HSTRING, propertyType: interop::TypeName, ownerType: interop::TypeName, defaultMetadata: *mut PropertyMetadata, out: *mut *mut DependencyProperty) -> HRESULT + }} + impl IDependencyPropertyStatics { + #[inline] pub unsafe fn get_unset_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UnsetValue)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn register(&mut self, name: &HStringArg, propertyType: interop::TypeName, ownerType: interop::TypeName, typeMetadata: &PropertyMetadata) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).Register)(self, name.get(), propertyType, ownerType, typeMetadata as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn register_attached(&mut self, name: &HStringArg, propertyType: interop::TypeName, ownerType: interop::TypeName, defaultMetadata: &PropertyMetadata) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).RegisterAttached)(self, name.get(), propertyType, ownerType, defaultMetadata as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDependencyPropertyChangedEventArgs, 2166434859, 9424, 18775, 171, 195, 34, 68, 112, 169, 58, 78); + RT_INTERFACE!{interface IDependencyPropertyChangedEventArgs(IDependencyPropertyChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDependencyPropertyChangedEventArgs] { + fn get_Property(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_OldValue(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_NewValue(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IDependencyPropertyChangedEventArgs { + #[inline] pub unsafe fn get_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_old_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OldValue)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NewValue)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDragOperationDeferral, 3128159418, 7027, 16518, 179, 211, 194, 35, 190, 234, 22, 51); + RT_INTERFACE!{interface IDragOperationDeferral(IDragOperationDeferralVtbl): IInspectable(IInspectableVtbl) [IID_IDragOperationDeferral] { + fn Complete(&mut self) -> HRESULT + }} + impl IDragOperationDeferral { + #[inline] pub unsafe fn complete(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Complete)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DragOperationDeferral: IDragOperationDeferral} + DEFINE_IID!(IID_IDragUI, 765188152, 31840, 18498, 145, 112, 52, 111, 225, 10, 34, 106); + RT_INTERFACE!{interface IDragUI(IDragUIVtbl): IInspectable(IInspectableVtbl) [IID_IDragUI] { + fn SetContentFromBitmapImage(&mut self, bitmapImage: *mut media::imaging::BitmapImage) -> HRESULT, + fn SetContentFromBitmapImageWithAnchorPoint(&mut self, bitmapImage: *mut media::imaging::BitmapImage, anchorPoint: super::super::foundation::Point) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn SetContentFromSoftwareBitmap(&mut self, softwareBitmap: *mut super::super::graphics::imaging::SoftwareBitmap) -> HRESULT, + #[cfg(not(feature="windows.graphics"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.graphics")] fn SetContentFromSoftwareBitmapWithAnchorPoint(&mut self, softwareBitmap: *mut super::super::graphics::imaging::SoftwareBitmap, anchorPoint: super::super::foundation::Point) -> HRESULT, + fn SetContentFromDataPackage(&mut self) -> HRESULT + }} + impl IDragUI { + #[inline] pub unsafe fn set_content_from_bitmap_image(&mut self, bitmapImage: &media::imaging::BitmapImage) -> Result<()> { + let hr = ((*self.lpVtbl).SetContentFromBitmapImage)(self, bitmapImage as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_from_bitmap_image_with_anchor_point(&mut self, bitmapImage: &media::imaging::BitmapImage, anchorPoint: super::super::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).SetContentFromBitmapImageWithAnchorPoint)(self, bitmapImage as *const _ as *mut _, anchorPoint); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_content_from_software_bitmap(&mut self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap) -> Result<()> { + let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmap)(self, softwareBitmap as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_content_from_software_bitmap_with_anchor_point(&mut self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap, anchorPoint: super::super::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmapWithAnchorPoint)(self, softwareBitmap as *const _ as *mut _, anchorPoint); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_from_data_package(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SetContentFromDataPackage)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DragUI: IDragUI} + DEFINE_IID!(IID_IDragUIOverride, 3178012154, 51553, 18529, 183, 165, 191, 79, 228, 168, 166, 239); + RT_INTERFACE!{interface IDragUIOverride(IDragUIOverrideVtbl): IInspectable(IInspectableVtbl) [IID_IDragUIOverride] { + fn get_Caption(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Caption(&mut self, value: HSTRING) -> HRESULT, + fn get_IsContentVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsContentVisible(&mut self, value: bool) -> HRESULT, + fn get_IsCaptionVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsCaptionVisible(&mut self, value: bool) -> HRESULT, + fn get_IsGlyphVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsGlyphVisible(&mut self, value: bool) -> HRESULT, + fn Clear(&mut self) -> HRESULT, + fn SetContentFromBitmapImage(&mut self, bitmapImage: *mut media::imaging::BitmapImage) -> HRESULT, + fn SetContentFromBitmapImageWithAnchorPoint(&mut self, bitmapImage: *mut media::imaging::BitmapImage, anchorPoint: super::super::foundation::Point) -> HRESULT, + #[cfg(feature="windows.graphics")] fn SetContentFromSoftwareBitmap(&mut self, softwareBitmap: *mut super::super::graphics::imaging::SoftwareBitmap) -> HRESULT, + #[cfg(feature="windows.graphics")] fn SetContentFromSoftwareBitmapWithAnchorPoint(&mut self, softwareBitmap: *mut super::super::graphics::imaging::SoftwareBitmap, anchorPoint: super::super::foundation::Point) -> HRESULT + }} + impl IDragUIOverride { + #[inline] pub unsafe fn get_caption(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Caption)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_caption(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Caption)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_content_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsContentVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_content_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsContentVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_caption_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCaptionVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_caption_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsCaptionVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_glyph_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsGlyphVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_glyph_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsGlyphVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn clear(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Clear)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_from_bitmap_image(&mut self, bitmapImage: &media::imaging::BitmapImage) -> Result<()> { + let hr = ((*self.lpVtbl).SetContentFromBitmapImage)(self, bitmapImage as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_from_bitmap_image_with_anchor_point(&mut self, bitmapImage: &media::imaging::BitmapImage, anchorPoint: super::super::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).SetContentFromBitmapImageWithAnchorPoint)(self, bitmapImage as *const _ as *mut _, anchorPoint); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_content_from_software_bitmap(&mut self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap) -> Result<()> { + let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmap)(self, softwareBitmap as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.graphics")] #[inline] pub unsafe fn set_content_from_software_bitmap_with_anchor_point(&mut self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap, anchorPoint: super::super::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmapWithAnchorPoint)(self, softwareBitmap as *const _ as *mut _, anchorPoint); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DragUIOverride: IDragUIOverride} + DEFINE_IID!(IID_IElementSoundPlayer, 947352485, 61494, 17932, 155, 129, 243, 214, 234, 67, 246, 242); + RT_INTERFACE!{interface IElementSoundPlayer(IElementSoundPlayerVtbl): IInspectable(IInspectableVtbl) [IID_IElementSoundPlayer] { + + }} + DEFINE_IID!(IID_IElementSoundPlayerStatics, 561680388, 38941, 16841, 177, 82, 173, 169, 17, 164, 177, 58); + RT_INTERFACE!{static interface IElementSoundPlayerStatics(IElementSoundPlayerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IElementSoundPlayerStatics] { + fn get_Volume(&mut self, out: *mut f64) -> HRESULT, + fn put_Volume(&mut self, value: f64) -> HRESULT, + fn get_State(&mut self, out: *mut ElementSoundPlayerState) -> HRESULT, + fn put_State(&mut self, value: ElementSoundPlayerState) -> HRESULT, + fn Play(&mut self, sound: ElementSoundKind) -> HRESULT + }} + impl IElementSoundPlayerStatics { + #[inline] pub unsafe fn get_volume(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Volume)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_volume(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Volume)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_state(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_State)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_state(&mut self, value: ElementSoundPlayerState) -> Result<()> { + let hr = ((*self.lpVtbl).put_State)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn play(&mut self, sound: ElementSoundKind) -> Result<()> { + let hr = ((*self.lpVtbl).Play)(self, sound); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ElementSoundPlayer: IElementSoundPlayer} + RT_ACTIVATABLE!{IElementSoundPlayerStatics [CLSID_ElementSoundPlayer]} + DEFINE_CLSID!(CLSID_ElementSoundPlayer = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,69,108,101,109,101,110,116,83,111,117,110,100,80,108,97,121,101,114,0]); + DEFINE_IID!(IID_IFrameworkView, 3719980619, 46595, 18346, 148, 45, 56, 51, 23, 79, 13, 128); + RT_INTERFACE!{interface IFrameworkView(IFrameworkViewVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkView] { + + }} + RT_CLASS!{class FrameworkView: IFrameworkView} + DEFINE_IID!(IID_IPropertyMetadata, 2169434893, 36120, 17546, 134, 68, 242, 203, 81, 231, 3, 128); + RT_INTERFACE!{interface IPropertyMetadata(IPropertyMetadataVtbl): IInspectable(IInspectableVtbl) [IID_IPropertyMetadata] { + fn get_DefaultValue(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_CreateDefaultValueCallback(&mut self, out: *mut *mut CreateDefaultValueCallback) -> HRESULT + }} + impl IPropertyMetadata { + #[inline] pub unsafe fn get_default_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DefaultValue)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_create_default_value_callback(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CreateDefaultValueCallback)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPropertyMetadataStatics, 989923194, 28166, 17897, 139, 92, 175, 36, 52, 88, 192, 98); + RT_INTERFACE!{static interface IPropertyMetadataStatics(IPropertyMetadataStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPropertyMetadataStatics] { + fn CreateWithDefaultValue(&mut self, defaultValue: *mut IInspectable, out: *mut *mut PropertyMetadata) -> HRESULT, + fn CreateWithDefaultValueAndCallback(&mut self, defaultValue: *mut IInspectable, propertyChangedCallback: *mut PropertyChangedCallback, out: *mut *mut PropertyMetadata) -> HRESULT, + fn CreateWithFactory(&mut self, createDefaultValueCallback: *mut CreateDefaultValueCallback, out: *mut *mut PropertyMetadata) -> HRESULT, + fn CreateWithFactoryAndCallback(&mut self, createDefaultValueCallback: *mut CreateDefaultValueCallback, propertyChangedCallback: *mut PropertyChangedCallback, out: *mut *mut PropertyMetadata) -> HRESULT + }} + impl IPropertyMetadataStatics { + #[inline] pub unsafe fn create_with_default_value(&mut self, defaultValue: &IInspectable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithDefaultValue)(self, defaultValue as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_default_value_and_callback(&mut self, defaultValue: &IInspectable, propertyChangedCallback: &PropertyChangedCallback) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithDefaultValueAndCallback)(self, defaultValue as *const _ as *mut _, propertyChangedCallback as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_factory(&mut self, createDefaultValueCallback: &CreateDefaultValueCallback) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithFactory)(self, createDefaultValueCallback as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn create_with_factory_and_callback(&mut self, createDefaultValueCallback: &CreateDefaultValueCallback, propertyChangedCallback: &PropertyChangedCallback) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateWithFactoryAndCallback)(self, createDefaultValueCallback as *const _ as *mut _, propertyChangedCallback as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPropertyMetadataFactory, 3250068672, 22477, 20271, 176, 169, 225, 128, 27, 40, 247, 107); + RT_INTERFACE!{interface IPropertyMetadataFactory(IPropertyMetadataFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPropertyMetadataFactory] { + fn CreateInstanceWithDefaultValue(&mut self, defaultValue: *mut IInspectable, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut PropertyMetadata) -> HRESULT, + fn CreateInstanceWithDefaultValueAndCallback(&mut self, defaultValue: *mut IInspectable, propertyChangedCallback: *mut PropertyChangedCallback, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut PropertyMetadata) -> HRESULT + }} + impl IPropertyMetadataFactory { + #[inline] pub unsafe fn create_instance_with_default_value(&mut self, defaultValue: &IInspectable, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstanceWithDefaultValue)(self, defaultValue as *const _ as *mut _, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + #[inline] pub unsafe fn create_instance_with_default_value_and_callback(&mut self, defaultValue: &IInspectable, propertyChangedCallback: &PropertyChangedCallback, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstanceWithDefaultValueAndCallback)(self, defaultValue as *const _ as *mut _, propertyChangedCallback as *const _ as *mut _, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRoutedEvent, 2796705816, 17345, 19568, 134, 92, 123, 221, 90, 50, 227, 39); + RT_INTERFACE!{interface IRoutedEvent(IRoutedEventVtbl): IInspectable(IInspectableVtbl) [IID_IRoutedEvent] { + + }} + RT_CLASS!{class RoutedEvent: IRoutedEvent} + DEFINE_IID!(IID_IRoutedEventArgs, 1553488582, 55298, 19256, 162, 35, 191, 7, 12, 67, 254, 223); + RT_INTERFACE!{interface IRoutedEventArgs(IRoutedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRoutedEventArgs] { + fn get_OriginalSource(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IRoutedEventArgs { + #[inline] pub unsafe fn get_original_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OriginalSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRoutedEventArgsFactory, 3055308167, 28901, 16686, 181, 32, 26, 65, 238, 118, 187, 244); + RT_INTERFACE!{interface IRoutedEventArgsFactory(IRoutedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IRoutedEventArgsFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut RoutedEventArgs) -> HRESULT + }} + impl IRoutedEventArgsFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISetterBaseCollection, 63179944, 37022, 16663, 129, 28, 164, 82, 148, 150, 189, 241); + RT_INTERFACE!{interface ISetterBaseCollection(ISetterBaseCollectionVtbl): IInspectable(IInspectableVtbl) [IID_ISetterBaseCollection] { + fn get_IsSealed(&mut self, out: *mut bool) -> HRESULT + }} + impl ISetterBaseCollection { + #[inline] pub unsafe fn get_is_sealed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSealed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SetterBaseCollection: ISetterBaseCollection} + DEFINE_IID!(IID_ITargetPropertyPath, 1081347982, 2143, 19693, 190, 112, 111, 71, 172, 241, 90, 208); + RT_INTERFACE!{interface ITargetPropertyPath(ITargetPropertyPathVtbl): IInspectable(IInspectableVtbl) [IID_ITargetPropertyPath] { + fn get_Path(&mut self, out: *mut *mut PropertyPath) -> HRESULT, + fn put_Path(&mut self, value: *mut PropertyPath) -> HRESULT, + fn get_Target(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Target(&mut self, value: *mut IInspectable) -> HRESULT + }} + impl ITargetPropertyPath { + #[inline] pub unsafe fn get_path(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Path)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_path(&mut self, value: &PropertyPath) -> Result<()> { + let hr = ((*self.lpVtbl).put_Path)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_target(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Target)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_target(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Target)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITargetPropertyPathFactory, 2297351368, 39394, 19012, 153, 7, 180, 75, 200, 110, 43, 190); + RT_INTERFACE!{static interface ITargetPropertyPathFactory(ITargetPropertyPathFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITargetPropertyPathFactory] { + fn CreateInstance(&mut self, targetProperty: *mut DependencyProperty, out: *mut *mut TargetPropertyPath) -> HRESULT + }} + impl ITargetPropertyPathFactory { + #[inline] pub unsafe fn create_instance(&mut self, targetProperty: &DependencyProperty) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, targetProperty as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TargetPropertyPath: ITargetPropertyPath [ITargetPropertyPathFactory] [CLSID_TargetPropertyPath]} + DEFINE_CLSID!(CLSID_TargetPropertyPath = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,84,97,114,103,101,116,80,114,111,112,101,114,116,121,80,97,116,104,0]); + RT_CLASS!{class TriggerActionCollection: super::super::foundation::collections::IVector} + RT_CLASS!{class TriggerCollection: super::super::foundation::collections::IVector} + DEFINE_IID!(IID_IUnhandledExceptionEventArgs, 1915758236, 1358, 19699, 134, 197, 190, 144, 235, 104, 99, 213); + RT_INTERFACE!{interface IUnhandledExceptionEventArgs(IUnhandledExceptionEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUnhandledExceptionEventArgs] { + fn get_Exception(&mut self, out: *mut super::super::foundation::HResult) -> HRESULT, + fn get_Message(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT + }} + impl IUnhandledExceptionEventArgs { + #[inline] pub unsafe fn get_exception(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Exception)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVisualStateChangedEventArgs, 4263602865, 62239, 18321, 137, 137, 199, 14, 29, 155, 89, 255); + RT_INTERFACE!{interface IVisualStateChangedEventArgs(IVisualStateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVisualStateChangedEventArgs] { + fn get_OldState(&mut self, out: *mut *mut VisualState) -> HRESULT, + fn put_OldState(&mut self, value: *mut VisualState) -> HRESULT, + fn get_NewState(&mut self, out: *mut *mut VisualState) -> HRESULT, + fn put_NewState(&mut self, value: *mut VisualState) -> HRESULT, + fn get_Control(&mut self, out: *mut *mut controls::Control) -> HRESULT, + fn put_Control(&mut self, value: *mut controls::Control) -> HRESULT + }} + impl IVisualStateChangedEventArgs { + #[inline] pub unsafe fn get_old_state(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OldState)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_old_state(&mut self, value: &VisualState) -> Result<()> { + let hr = ((*self.lpVtbl).put_OldState)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_state(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NewState)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_new_state(&mut self, value: &VisualState) -> Result<()> { + let hr = ((*self.lpVtbl).put_NewState)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_control(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Control)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_control(&mut self, value: &controls::Control) -> Result<()> { + let hr = ((*self.lpVtbl).put_Control)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWindow, 846599805, 51702, 17965, 157, 226, 174, 76, 31, 216, 194, 229); + RT_INTERFACE!{interface IWindow(IWindowVtbl): IInspectable(IInspectableVtbl) [IID_IWindow] { + fn get_Bounds(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_Visible(&mut self, out: *mut bool) -> HRESULT, + fn get_Content(&mut self, out: *mut *mut UIElement) -> HRESULT, + fn put_Content(&mut self, value: *mut UIElement) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_CoreWindow(&mut self, out: *mut *mut super::core::CoreWindow) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_Dispatcher(&mut self, out: *mut *mut super::core::CoreDispatcher) -> HRESULT, + fn add_Activated(&mut self, value: *mut WindowActivatedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Activated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Closed(&mut self, value: *mut WindowClosedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SizeChanged(&mut self, value: *mut WindowSizeChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SizeChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VisibilityChanged(&mut self, value: *mut WindowVisibilityChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisibilityChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn Activate(&mut self) -> HRESULT, + fn Close(&mut self) -> HRESULT + }} + impl IWindow { + #[inline] pub unsafe fn get_bounds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Visible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content(&mut self, value: &UIElement) -> Result<()> { + let hr = ((*self.lpVtbl).put_Content)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_core_window(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CoreWindow)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_dispatcher(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Dispatcher)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_activated(&mut self, value: &WindowActivatedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Activated)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_activated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Activated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_closed(&mut self, value: &WindowClosedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Closed)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Closed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_size_changed(&mut self, value: &WindowSizeChangedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SizeChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_size_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SizeChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_visibility_changed(&mut self, value: &WindowVisibilityChangedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_VisibilityChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_visibility_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_VisibilityChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn activate(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Activate)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn close(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Close)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWindowStatics, 2469561353, 20129, 19194, 131, 220, 12, 78, 115, 232, 139, 177); + RT_INTERFACE!{static interface IWindowStatics(IWindowStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IWindowStatics] { + fn get_Current(&mut self, out: *mut *mut Window) -> HRESULT + }} + impl IWindowStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class Window: IWindow} + RT_ACTIVATABLE!{IWindowStatics [CLSID_Window]} + DEFINE_CLSID!(CLSID_Window = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,87,105,110,100,111,119,0]); + DEFINE_IID!(IID_IWindow2, 3548673439, 13558, 17538, 132, 53, 245, 82, 249, 178, 76, 200); + RT_INTERFACE!{interface IWindow2(IWindow2Vtbl): IInspectable(IInspectableVtbl) [IID_IWindow2] { + fn SetTitleBar(&mut self, value: *mut UIElement) -> HRESULT + }} + impl IWindow2 { + #[inline] pub unsafe fn set_title_bar(&mut self, value: &UIElement) -> Result<()> { + let hr = ((*self.lpVtbl).SetTitleBar)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IWindowCreatedEventArgs, 834081904, 65279, 18004, 175, 72, 155, 57, 138, 181, 119, 43); + RT_INTERFACE!{interface IWindowCreatedEventArgs(IWindowCreatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWindowCreatedEventArgs] { + fn get_Window(&mut self, out: *mut *mut Window) -> HRESULT + }} + impl IWindowCreatedEventArgs { + #[inline] pub unsafe fn get_window(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Window)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class WindowCreatedEventArgs: IWindowCreatedEventArgs} + DEFINE_IID!(IID_IDependencyObjectCollectionFactory, 85883391, 45992, 18926, 181, 175, 172, 143, 104, 182, 73, 228); + RT_INTERFACE!{interface IDependencyObjectCollectionFactory(IDependencyObjectCollectionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDependencyObjectCollectionFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DependencyObjectCollection) -> HRESULT + }} + impl IDependencyObjectCollectionFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + RT_CLASS!{class DependencyObjectCollection: super::super::foundation::collections::IObservableVector} + DEFINE_IID!(IID_IDragEventArgs, 3024144323, 692, 18816, 147, 66, 37, 218, 225, 192, 241, 136); + RT_INTERFACE!{interface IDragEventArgs(IDragEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDragEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_Data(&mut self, out: *mut *mut super::super::applicationmodel::datatransfer::DataPackage) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn put_Data(&mut self, value: *mut super::super::applicationmodel::datatransfer::DataPackage) -> HRESULT, + fn GetPosition(&mut self, relativeTo: *mut UIElement, out: *mut super::super::foundation::Point) -> HRESULT + }} + impl IDragEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn set_data(&mut self, value: &super::super::applicationmodel::datatransfer::DataPackage) -> Result<()> { + let hr = ((*self.lpVtbl).put_Data)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self, relativeTo: &UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetPosition)(self, relativeTo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDragEventArgs2, 640902744, 10519, 16669, 191, 195, 47, 34, 71, 28, 187, 231); + RT_INTERFACE!{interface IDragEventArgs2(IDragEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IDragEventArgs2] { + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_DataView(&mut self, out: *mut *mut super::super::applicationmodel::datatransfer::DataPackageView) -> HRESULT, + fn get_DragUIOverride(&mut self, out: *mut *mut DragUIOverride) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_Modifiers(&mut self, out: *mut super::super::applicationmodel::datatransfer::dragdrop::DragDropModifiers) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_AcceptedOperation(&mut self, out: *mut super::super::applicationmodel::datatransfer::DataPackageOperation) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn put_AcceptedOperation(&mut self, value: super::super::applicationmodel::datatransfer::DataPackageOperation) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut DragOperationDeferral) -> HRESULT + }} + impl IDragEventArgs2 { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_data_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_drag_uioverride(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DragUIOverride)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_modifiers(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Modifiers)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_accepted_operation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AcceptedOperation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn set_accepted_operation(&mut self, value: super::super::applicationmodel::datatransfer::DataPackageOperation) -> Result<()> { + let hr = ((*self.lpVtbl).put_AcceptedOperation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDragEventArgs3, 3494888390, 33049, 17018, 129, 82, 95, 149, 80, 204, 4, 22); + RT_INTERFACE!{interface IDragEventArgs3(IDragEventArgs3Vtbl): IInspectable(IInspectableVtbl) [IID_IDragEventArgs3] { + #[cfg(feature="windows.applicationmodel")] fn get_AllowedOperations(&mut self, out: *mut super::super::applicationmodel::datatransfer::DataPackageOperation) -> HRESULT + }} + impl IDragEventArgs3 { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_allowed_operations(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowedOperations)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class DragEventArgs: IDragEventArgs} + DEFINE_IID!(IID_IDragStartingEventArgs, 1744884730, 37048, 18169, 142, 48, 90, 194, 95, 115, 240, 249); + RT_INTERFACE!{interface IDragStartingEventArgs(IDragStartingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDragStartingEventArgs] { + fn get_Cancel(&mut self, out: *mut bool) -> HRESULT, + fn put_Cancel(&mut self, value: bool) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn get_Data(&mut self, out: *mut *mut super::super::applicationmodel::datatransfer::DataPackage) -> HRESULT, + fn get_DragUI(&mut self, out: *mut *mut DragUI) -> HRESULT, + fn GetDeferral(&mut self, out: *mut *mut DragOperationDeferral) -> HRESULT, + fn GetPosition(&mut self, relativeTo: *mut UIElement, out: *mut super::super::foundation::Point) -> HRESULT + }} + impl IDragStartingEventArgs { + #[inline] pub unsafe fn get_cancel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Cancel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cancel(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Cancel)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_drag_ui(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DragUI)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_deferral(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDeferral)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_position(&mut self, relativeTo: &UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetPosition)(self, relativeTo as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDragStartingEventArgs2, 3629506702, 17590, 16913, 189, 11, 127, 221, 187, 110, 130, 49); + RT_INTERFACE!{interface IDragStartingEventArgs2(IDragStartingEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IDragStartingEventArgs2] { + #[cfg(feature="windows.applicationmodel")] fn get_AllowedOperations(&mut self, out: *mut super::super::applicationmodel::datatransfer::DataPackageOperation) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn put_AllowedOperations(&mut self, value: super::super::applicationmodel::datatransfer::DataPackageOperation) -> HRESULT + }} + impl IDragStartingEventArgs2 { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_allowed_operations(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowedOperations)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn set_allowed_operations(&mut self, value: super::super::applicationmodel::datatransfer::DataPackageOperation) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowedOperations)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DragStartingEventArgs: IDragStartingEventArgs} + DEFINE_IID!(IID_IDropCompletedEventArgs, 1817166216, 38332, 16993, 158, 197, 33, 202, 182, 119, 183, 52); + RT_INTERFACE!{interface IDropCompletedEventArgs(IDropCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDropCompletedEventArgs] { + #[cfg(feature="windows.applicationmodel")] fn get_DropResult(&mut self, out: *mut super::super::applicationmodel::datatransfer::DataPackageOperation) -> HRESULT + }} + impl IDropCompletedEventArgs { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_drop_result(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DropResult)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class DropCompletedEventArgs: IDropCompletedEventArgs} + DEFINE_IID!(IID_IExceptionRoutedEventArgs, 3718246762, 19298, 19052, 164, 157, 6, 113, 239, 97, 54, 190); + RT_INTERFACE!{interface IExceptionRoutedEventArgs(IExceptionRoutedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IExceptionRoutedEventArgs] { + fn get_ErrorMessage(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IExceptionRoutedEventArgs { + #[inline] pub unsafe fn get_error_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ErrorMessage)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ExceptionRoutedEventArgs: IExceptionRoutedEventArgs} + DEFINE_IID!(IID_IExceptionRoutedEventArgsFactory, 3148448365, 23930, 17639, 184, 147, 178, 174, 13, 210, 66, 115); + RT_INTERFACE!{interface IExceptionRoutedEventArgsFactory(IExceptionRoutedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IExceptionRoutedEventArgsFactory] { + + }} + DEFINE_IID!(IID_IFrameworkTemplate, 2715964632, 42054, 18983, 154, 157, 160, 245, 158, 18, 88, 165); + RT_INTERFACE!{interface IFrameworkTemplate(IFrameworkTemplateVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkTemplate] { + + }} + DEFINE_IID!(IID_IFrameworkTemplateFactory, 444113061, 37757, 18132, 131, 43, 148, 255, 20, 218, 176, 97); + RT_INTERFACE!{interface IFrameworkTemplateFactory(IFrameworkTemplateFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkTemplateFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut FrameworkTemplate) -> HRESULT + }} + impl IFrameworkTemplateFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + RT_CLASS!{class FrameworkTemplate: IFrameworkTemplate} + RT_CLASS!{class DataTemplate: IDataTemplate} + RT_ACTIVATABLE!{IDataTemplateStatics2 [CLSID_DataTemplate]} + DEFINE_CLSID!(CLSID_DataTemplate = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,68,97,116,97,84,101,109,112,108,97,116,101,0]); + DEFINE_IID!(IID_IPropertyPath, 806247818, 8179, 19756, 149, 236, 39, 248, 29, 235, 172, 184); + RT_INTERFACE!{interface IPropertyPath(IPropertyPathVtbl): IInspectable(IInspectableVtbl) [IID_IPropertyPath] { + fn get_Path(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IPropertyPath { + #[inline] pub unsafe fn get_path(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Path)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class PropertyPath: IPropertyPath [IPropertyPathFactory] [CLSID_PropertyPath]} + DEFINE_CLSID!(CLSID_PropertyPath = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,80,114,111,112,101,114,116,121,80,97,116,104,0]); + DEFINE_IID!(IID_IPropertyPathFactory, 1313660825, 38950, 20054, 132, 124, 202, 5, 95, 22, 41, 5); + RT_INTERFACE!{static interface IPropertyPathFactory(IPropertyPathFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPropertyPathFactory] { + fn CreateInstance(&mut self, path: HSTRING, out: *mut *mut PropertyPath) -> HRESULT + }} + impl IPropertyPathFactory { + #[inline] pub unsafe fn create_instance(&mut self, path: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, path.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IResourceDictionary, 3253358372, 55006, 16785, 142, 58, 244, 134, 1, 247, 72, 156); + RT_INTERFACE!{interface IResourceDictionary(IResourceDictionaryVtbl): IInspectable(IInspectableVtbl) [IID_IResourceDictionary] { + fn get_Source(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_Source(&mut self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_MergedDictionaries(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ThemeDictionaries(&mut self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT + }} + impl IResourceDictionary { + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_source(&mut self, value: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_Source)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_merged_dictionaries(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MergedDictionaries)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_theme_dictionaries(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ThemeDictionaries)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ResourceDictionary: IResourceDictionary} + DEFINE_IID!(IID_IResourceDictionaryFactory, 3929422261, 12727, 17009, 146, 201, 124, 149, 132, 169, 28, 34); + RT_INTERFACE!{interface IResourceDictionaryFactory(IResourceDictionaryFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IResourceDictionaryFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut ResourceDictionary) -> HRESULT + }} + impl IResourceDictionaryFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISetterBase, 1099686524, 10948, 20258, 128, 151, 222, 163, 174, 235, 47, 179); + RT_INTERFACE!{interface ISetterBase(ISetterBaseVtbl): IInspectable(IInspectableVtbl) [IID_ISetterBase] { + fn get_IsSealed(&mut self, out: *mut bool) -> HRESULT + }} + impl ISetterBase { + #[inline] pub unsafe fn get_is_sealed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSealed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SetterBase: ISetterBase} + DEFINE_IID!(IID_ISetterBaseFactory, 2180558176, 7400, 18077, 166, 103, 22, 227, 124, 239, 139, 169); + RT_INTERFACE!{interface ISetterBaseFactory(ISetterBaseFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISetterBaseFactory] { + + }} + DEFINE_IID!(IID_ISizeChangedEventArgs, 3576770144, 23745, 17057, 146, 12, 26, 244, 107, 226, 249, 134); + RT_INTERFACE!{interface ISizeChangedEventArgs(ISizeChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISizeChangedEventArgs] { + fn get_PreviousSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_NewSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT + }} + impl ISizeChangedEventArgs { + #[inline] pub unsafe fn get_previous_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreviousSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_new_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NewSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SizeChangedEventArgs: ISizeChangedEventArgs} + DEFINE_IID!(IID_IStateTriggerBase, 1219626648, 44806, 18028, 128, 82, 147, 102, 109, 222, 14, 73); + RT_INTERFACE!{interface IStateTriggerBase(IStateTriggerBaseVtbl): IInspectable(IInspectableVtbl) [IID_IStateTriggerBase] { + + }} + DEFINE_IID!(IID_IStateTriggerBaseProtected, 1010950739, 36116, 16918, 153, 76, 249, 147, 4, 41, 246, 229); + RT_INTERFACE!{interface IStateTriggerBaseProtected(IStateTriggerBaseProtectedVtbl): IInspectable(IInspectableVtbl) [IID_IStateTriggerBaseProtected] { + fn SetActive(&mut self, isActive: bool) -> HRESULT + }} + impl IStateTriggerBaseProtected { + #[inline] pub unsafe fn set_active(&mut self, isActive: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetActive)(self, isActive); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStateTriggerBaseFactory, 2534288459, 49071, 18352, 190, 66, 193, 215, 17, 187, 46, 159); + RT_INTERFACE!{interface IStateTriggerBaseFactory(IStateTriggerBaseFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IStateTriggerBaseFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut StateTriggerBase) -> HRESULT + }} + impl IStateTriggerBaseFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + RT_CLASS!{class StateTriggerBase: IStateTriggerBase} + DEFINE_IID!(IID_IStyle, 3299471909, 40375, 19069, 182, 209, 247, 78, 219, 146, 147, 194); + RT_INTERFACE!{interface IStyle(IStyleVtbl): IInspectable(IInspectableVtbl) [IID_IStyle] { + fn get_IsSealed(&mut self, out: *mut bool) -> HRESULT, + fn get_Setters(&mut self, out: *mut *mut SetterBaseCollection) -> HRESULT, + fn get_TargetType(&mut self, out: *mut interop::TypeName) -> HRESULT, + fn put_TargetType(&mut self, value: interop::TypeName) -> HRESULT, + fn get_BasedOn(&mut self, out: *mut *mut Style) -> HRESULT, + fn put_BasedOn(&mut self, value: *mut Style) -> HRESULT, + fn Seal(&mut self) -> HRESULT + }} + impl IStyle { + #[inline] pub unsafe fn get_is_sealed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSealed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_setters(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Setters)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_target_type(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TargetType)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_target_type(&mut self, value: interop::TypeName) -> Result<()> { + let hr = ((*self.lpVtbl).put_TargetType)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_based_on(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BasedOn)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_based_on(&mut self, value: &Style) -> Result<()> { + let hr = ((*self.lpVtbl).put_BasedOn)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn seal(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Seal)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Style: IStyle [IStyleFactory] [CLSID_Style]} + DEFINE_CLSID!(CLSID_Style = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,83,116,121,108,101,0]); + DEFINE_IID!(IID_IStyleFactory, 2741511395, 15745, 19685, 170, 81, 139, 65, 15, 96, 47, 205); + RT_INTERFACE!{static interface IStyleFactory(IStyleFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IStyleFactory] { + fn CreateInstance(&mut self, targetType: interop::TypeName, out: *mut *mut Style) -> HRESULT + }} + impl IStyleFactory { + #[inline] pub unsafe fn create_instance(&mut self, targetType: interop::TypeName) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, targetType, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITriggerAction, 2730548994, 25557, 19270, 155, 131, 8, 104, 211, 7, 150, 33); + RT_INTERFACE!{interface ITriggerAction(ITriggerActionVtbl): IInspectable(IInspectableVtbl) [IID_ITriggerAction] { + + }} + DEFINE_IID!(IID_ITriggerActionFactory, 1758642361, 12937, 16719, 143, 110, 198, 185, 122, 237, 218, 3); + RT_INTERFACE!{interface ITriggerActionFactory(ITriggerActionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITriggerActionFactory] { + + }} + RT_CLASS!{class TriggerAction: ITriggerAction} + DEFINE_IID!(IID_ITriggerBase, 3890881071, 57062, 17299, 168, 178, 137, 35, 214, 65, 243, 149); + RT_INTERFACE!{interface ITriggerBase(ITriggerBaseVtbl): IInspectable(IInspectableVtbl) [IID_ITriggerBase] { + + }} + DEFINE_IID!(IID_ITriggerBaseFactory, 1782292055, 64605, 17104, 140, 185, 202, 80, 102, 122, 247, 70); + RT_INTERFACE!{interface ITriggerBaseFactory(ITriggerBaseFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITriggerBaseFactory] { + + }} + RT_CLASS!{class TriggerBase: ITriggerBase} + DEFINE_IID!(IID_IUIElement, 1735199721, 46684, 16838, 186, 64, 88, 207, 135, 242, 1, 193); + RT_INTERFACE!{interface IUIElement(IUIElementVtbl): IInspectable(IInspectableVtbl) [IID_IUIElement] { + fn get_DesiredSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_AllowDrop(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowDrop(&mut self, value: bool) -> HRESULT, + fn get_Opacity(&mut self, out: *mut f64) -> HRESULT, + fn put_Opacity(&mut self, value: f64) -> HRESULT, + fn get_Clip(&mut self, out: *mut *mut media::RectangleGeometry) -> HRESULT, + fn put_Clip(&mut self, value: *mut media::RectangleGeometry) -> HRESULT, + fn get_RenderTransform(&mut self, out: *mut *mut media::Transform) -> HRESULT, + fn put_RenderTransform(&mut self, value: *mut media::Transform) -> HRESULT, + fn get_Projection(&mut self, out: *mut *mut media::Projection) -> HRESULT, + fn put_Projection(&mut self, value: *mut media::Projection) -> HRESULT, + fn get_RenderTransformOrigin(&mut self, out: *mut super::super::foundation::Point) -> HRESULT, + fn put_RenderTransformOrigin(&mut self, value: super::super::foundation::Point) -> HRESULT, + fn get_IsHitTestVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsHitTestVisible(&mut self, value: bool) -> HRESULT, + fn get_Visibility(&mut self, out: *mut Visibility) -> HRESULT, + fn put_Visibility(&mut self, value: Visibility) -> HRESULT, + fn get_RenderSize(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_UseLayoutRounding(&mut self, out: *mut bool) -> HRESULT, + fn put_UseLayoutRounding(&mut self, value: bool) -> HRESULT, + fn get_Transitions(&mut self, out: *mut *mut media::animation::TransitionCollection) -> HRESULT, + fn put_Transitions(&mut self, value: *mut media::animation::TransitionCollection) -> HRESULT, + fn get_CacheMode(&mut self, out: *mut *mut media::CacheMode) -> HRESULT, + fn put_CacheMode(&mut self, value: *mut media::CacheMode) -> HRESULT, + fn get_IsTapEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsTapEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsDoubleTapEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsDoubleTapEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsRightTapEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsRightTapEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsHoldingEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsHoldingEnabled(&mut self, value: bool) -> HRESULT, + fn get_ManipulationMode(&mut self, out: *mut input::ManipulationModes) -> HRESULT, + fn put_ManipulationMode(&mut self, value: input::ManipulationModes) -> HRESULT, + fn get_PointerCaptures(&mut self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn add_KeyUp(&mut self, value: *mut input::KeyEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyUp(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyDown(&mut self, value: *mut input::KeyEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyDown(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_GotFocus(&mut self, value: *mut RoutedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_GotFocus(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_LostFocus(&mut self, value: *mut RoutedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LostFocus(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DragEnter(&mut self, value: *mut DragEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DragEnter(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DragLeave(&mut self, value: *mut DragEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DragLeave(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DragOver(&mut self, value: *mut DragEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DragOver(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Drop(&mut self, value: *mut DragEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Drop(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerPressed(&mut self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerPressed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerMoved(&mut self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerMoved(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerReleased(&mut self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerReleased(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerEntered(&mut self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerEntered(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerExited(&mut self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerExited(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerCaptureLost(&mut self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerCaptureLost(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerCanceled(&mut self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerCanceled(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerWheelChanged(&mut self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerWheelChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Tapped(&mut self, value: *mut input::TappedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Tapped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DoubleTapped(&mut self, value: *mut input::DoubleTappedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DoubleTapped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Holding(&mut self, value: *mut input::HoldingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Holding(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_RightTapped(&mut self, value: *mut input::RightTappedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_RightTapped(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationStarting(&mut self, value: *mut input::ManipulationStartingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationStarting(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationInertiaStarting(&mut self, value: *mut input::ManipulationInertiaStartingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationInertiaStarting(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationStarted(&mut self, value: *mut input::ManipulationStartedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationStarted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationDelta(&mut self, value: *mut input::ManipulationDeltaEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationDelta(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationCompleted(&mut self, value: *mut input::ManipulationCompletedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn Measure(&mut self, availableSize: super::super::foundation::Size) -> HRESULT, + fn Arrange(&mut self, finalRect: super::super::foundation::Rect) -> HRESULT, + fn CapturePointer(&mut self, value: *mut input::Pointer, out: *mut bool) -> HRESULT, + fn ReleasePointerCapture(&mut self, value: *mut input::Pointer) -> HRESULT, + fn ReleasePointerCaptures(&mut self) -> HRESULT, + fn AddHandler(&mut self, routedEvent: *mut RoutedEvent, handler: *mut IInspectable, handledEventsToo: bool) -> HRESULT, + fn RemoveHandler(&mut self, routedEvent: *mut RoutedEvent, handler: *mut IInspectable) -> HRESULT, + fn TransformToVisual(&mut self, visual: *mut UIElement, out: *mut *mut media::GeneralTransform) -> HRESULT, + fn InvalidateMeasure(&mut self) -> HRESULT, + fn InvalidateArrange(&mut self) -> HRESULT, + fn UpdateLayout(&mut self) -> HRESULT + }} + impl IUIElement { + #[inline] pub unsafe fn get_desired_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_allow_drop(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowDrop)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_drop(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowDrop)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_opacity(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Opacity)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_opacity(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Opacity)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_clip(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Clip)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_clip(&mut self, value: &media::RectangleGeometry) -> Result<()> { + let hr = ((*self.lpVtbl).put_Clip)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_render_transform(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RenderTransform)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_render_transform(&mut self, value: &media::Transform) -> Result<()> { + let hr = ((*self.lpVtbl).put_RenderTransform)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_projection(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Projection)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_projection(&mut self, value: &media::Projection) -> Result<()> { + let hr = ((*self.lpVtbl).put_Projection)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_render_transform_origin(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RenderTransformOrigin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_render_transform_origin(&mut self, value: super::super::foundation::Point) -> Result<()> { + let hr = ((*self.lpVtbl).put_RenderTransformOrigin)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_hit_test_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsHitTestVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_hit_test_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsHitTestVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_visibility(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Visibility)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_visibility(&mut self, value: Visibility) -> Result<()> { + let hr = ((*self.lpVtbl).put_Visibility)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_render_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RenderSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_use_layout_rounding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UseLayoutRounding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_use_layout_rounding(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_UseLayoutRounding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_transitions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Transitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_transitions(&mut self, value: &media::animation::TransitionCollection) -> Result<()> { + let hr = ((*self.lpVtbl).put_Transitions)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cache_mode(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CacheMode)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_cache_mode(&mut self, value: &media::CacheMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_CacheMode)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_tap_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTapEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_tap_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTapEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_double_tap_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDoubleTapEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_double_tap_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDoubleTapEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_right_tap_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsRightTapEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_right_tap_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsRightTapEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_holding_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsHoldingEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_holding_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsHoldingEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_manipulation_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ManipulationMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_manipulation_mode(&mut self, value: input::ManipulationModes) -> Result<()> { + let hr = ((*self.lpVtbl).put_ManipulationMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_captures(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerCaptures)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_key_up(&mut self, value: &input::KeyEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_KeyUp)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_key_up(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_KeyUp)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_key_down(&mut self, value: &input::KeyEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_KeyDown)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_key_down(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_KeyDown)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_got_focus(&mut self, value: &RoutedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_GotFocus)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_got_focus(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_GotFocus)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_lost_focus(&mut self, value: &RoutedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LostFocus)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_lost_focus(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LostFocus)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_drag_enter(&mut self, value: &DragEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DragEnter)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_drag_enter(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DragEnter)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_drag_leave(&mut self, value: &DragEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DragLeave)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_drag_leave(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DragLeave)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_drag_over(&mut self, value: &DragEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DragOver)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_drag_over(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DragOver)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_drop(&mut self, value: &DragEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Drop)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_drop(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Drop)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_pressed(&mut self, value: &input::PointerEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerPressed)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_pressed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerPressed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_moved(&mut self, value: &input::PointerEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerMoved)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_moved(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerMoved)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_released(&mut self, value: &input::PointerEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerReleased)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_released(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerReleased)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_entered(&mut self, value: &input::PointerEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerEntered)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_entered(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerEntered)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_exited(&mut self, value: &input::PointerEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerExited)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_exited(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerExited)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_capture_lost(&mut self, value: &input::PointerEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerCaptureLost)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_capture_lost(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerCaptureLost)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_canceled(&mut self, value: &input::PointerEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerCanceled)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_canceled(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerCanceled)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_pointer_wheel_changed(&mut self, value: &input::PointerEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PointerWheelChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_pointer_wheel_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PointerWheelChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_tapped(&mut self, value: &input::TappedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Tapped)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_tapped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Tapped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_double_tapped(&mut self, value: &input::DoubleTappedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DoubleTapped)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_double_tapped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DoubleTapped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_holding(&mut self, value: &input::HoldingEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Holding)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_holding(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Holding)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_right_tapped(&mut self, value: &input::RightTappedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_RightTapped)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_right_tapped(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_RightTapped)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_starting(&mut self, value: &input::ManipulationStartingEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationStarting)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_starting(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationStarting)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_inertia_starting(&mut self, value: &input::ManipulationInertiaStartingEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationInertiaStarting)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_inertia_starting(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationInertiaStarting)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_started(&mut self, value: &input::ManipulationStartedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationStarted)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_started(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_delta(&mut self, value: &input::ManipulationDeltaEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationDelta)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_delta(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationDelta)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_manipulation_completed(&mut self, value: &input::ManipulationCompletedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ManipulationCompleted)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_manipulation_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ManipulationCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn measure(&mut self, availableSize: super::super::foundation::Size) -> Result<()> { + let hr = ((*self.lpVtbl).Measure)(self, availableSize); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn arrange(&mut self, finalRect: super::super::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).Arrange)(self, finalRect); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn capture_pointer(&mut self, value: &input::Pointer) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CapturePointer)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn release_pointer_capture(&mut self, value: &input::Pointer) -> Result<()> { + let hr = ((*self.lpVtbl).ReleasePointerCapture)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn release_pointer_captures(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ReleasePointerCaptures)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_handler(&mut self, routedEvent: &RoutedEvent, handler: &IInspectable, handledEventsToo: bool) -> Result<()> { + let hr = ((*self.lpVtbl).AddHandler)(self, routedEvent as *const _ as *mut _, handler as *const _ as *mut _, handledEventsToo); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_handler(&mut self, routedEvent: &RoutedEvent, handler: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveHandler)(self, routedEvent as *const _ as *mut _, handler as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn transform_to_visual(&mut self, visual: &UIElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).TransformToVisual)(self, visual as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn invalidate_measure(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).InvalidateMeasure)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn invalidate_arrange(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).InvalidateArrange)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn update_layout(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).UpdateLayout)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUIElementOverrides, 1619865373, 30808, 19179, 137, 228, 181, 78, 44, 126, 211, 211); + RT_INTERFACE!{interface IUIElementOverrides(IUIElementOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IUIElementOverrides] { + fn OnCreateAutomationPeer(&mut self, out: *mut *mut automation::peers::AutomationPeer) -> HRESULT, + fn OnDisconnectVisualChildren(&mut self) -> HRESULT, + fn FindSubElementsForTouchTargeting(&mut self, point: super::super::foundation::Point, boundingRect: super::super::foundation::Rect, out: *mut *mut super::super::foundation::collections::IIterable>) -> HRESULT + }} + impl IUIElementOverrides { + #[inline] pub unsafe fn on_create_automation_peer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).OnCreateAutomationPeer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn on_disconnect_visual_children(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).OnDisconnectVisualChildren)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn find_sub_elements_for_touch_targeting(&mut self, point: super::super::foundation::Point, boundingRect: super::super::foundation::Rect) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindSubElementsForTouchTargeting)(self, point, boundingRect, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUIElementStatics, 1490245435, 62764, 17854, 152, 139, 165, 134, 149, 100, 135, 60); + RT_INTERFACE!{static interface IUIElementStatics(IUIElementStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUIElementStatics] { + fn get_KeyDownEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_KeyUpEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_PointerEnteredEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_PointerPressedEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_PointerMovedEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_PointerReleasedEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_PointerExitedEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_PointerCaptureLostEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_PointerCanceledEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_PointerWheelChangedEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_TappedEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_DoubleTappedEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_HoldingEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_RightTappedEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_ManipulationStartingEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_ManipulationInertiaStartingEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_ManipulationStartedEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_ManipulationDeltaEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_ManipulationCompletedEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_DragEnterEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_DragLeaveEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_DragOverEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_DropEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn get_AllowDropProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_OpacityProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_ClipProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_RenderTransformProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_ProjectionProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_RenderTransformOriginProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_IsHitTestVisibleProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_VisibilityProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_UseLayoutRoundingProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_TransitionsProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_CacheModeProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_IsTapEnabledProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_IsDoubleTapEnabledProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_IsRightTapEnabledProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_IsHoldingEnabledProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_ManipulationModeProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_PointerCapturesProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT + }} + impl IUIElementStatics { + #[inline] pub unsafe fn get_key_down_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyDownEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_key_up_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KeyUpEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_entered_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerEnteredEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_pressed_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerPressedEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_moved_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerMovedEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_released_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerReleasedEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_exited_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerExitedEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_capture_lost_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerCaptureLostEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_canceled_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerCanceledEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_wheel_changed_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerWheelChangedEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tapped_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TappedEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_double_tapped_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DoubleTappedEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_holding_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HoldingEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_right_tapped_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RightTappedEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manipulation_starting_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ManipulationStartingEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manipulation_inertia_starting_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ManipulationInertiaStartingEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manipulation_started_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ManipulationStartedEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manipulation_delta_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ManipulationDeltaEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manipulation_completed_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ManipulationCompletedEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_drag_enter_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DragEnterEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_drag_leave_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DragLeaveEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_drag_over_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DragOverEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_drop_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DropEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_allow_drop_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AllowDropProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_opacity_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OpacityProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_clip_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ClipProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_render_transform_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RenderTransformProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_projection_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ProjectionProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_render_transform_origin_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RenderTransformOriginProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_hit_test_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsHitTestVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_visibility_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VisibilityProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_use_layout_rounding_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UseLayoutRoundingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transitions_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TransitionsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cache_mode_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CacheModeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_tap_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsTapEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_double_tap_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsDoubleTapEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_right_tap_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsRightTapEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_holding_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsHoldingEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_manipulation_mode_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ManipulationModeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_pointer_captures_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PointerCapturesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUIElementFactory, 3119420414, 41784, 16799, 172, 50, 145, 220, 170, 223, 93, 8); + RT_INTERFACE!{interface IUIElementFactory(IUIElementFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IUIElementFactory] { + + }} + DEFINE_IID!(IID_IUIElement2, 1735199737, 46700, 16854, 186, 80, 88, 207, 135, 242, 1, 209); + RT_INTERFACE!{interface IUIElement2(IUIElement2Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElement2] { + fn get_CompositeMode(&mut self, out: *mut media::ElementCompositeMode) -> HRESULT, + fn put_CompositeMode(&mut self, value: media::ElementCompositeMode) -> HRESULT, + fn CancelDirectManipulations(&mut self, out: *mut bool) -> HRESULT + }} + impl IUIElement2 { + #[inline] pub unsafe fn get_composite_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CompositeMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_composite_mode(&mut self, value: media::ElementCompositeMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_CompositeMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn cancel_direct_manipulations(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).CancelDirectManipulations)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUIElementStatics2, 1490245451, 62780, 17854, 152, 155, 165, 134, 149, 100, 135, 76); + RT_INTERFACE!{static interface IUIElementStatics2(IUIElementStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElementStatics2] { + fn get_CompositeModeProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT + }} + impl IUIElementStatics2 { + #[inline] pub unsafe fn get_composite_mode_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CompositeModeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUIElement3, 3156945137, 9970, 19115, 178, 86, 59, 83, 80, 136, 30, 55); + RT_INTERFACE!{interface IUIElement3(IUIElement3Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElement3] { + fn get_Transform3D(&mut self, out: *mut *mut media::media3d::Transform3D) -> HRESULT, + fn put_Transform3D(&mut self, value: *mut media::media3d::Transform3D) -> HRESULT, + fn get_CanDrag(&mut self, out: *mut bool) -> HRESULT, + fn put_CanDrag(&mut self, value: bool) -> HRESULT, + fn add_DragStarting(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DragStarting(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DropCompleted(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DropCompleted(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(all(feature="windows.applicationmodel",feature="windows.ui"))] fn StartDragAsync(&mut self, pointerPoint: *mut super::input::PointerPoint, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + }} + impl IUIElement3 { + #[inline] pub unsafe fn get_transform3_d(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Transform3D)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_transform3_d(&mut self, value: &media::media3d::Transform3D) -> Result<()> { + let hr = ((*self.lpVtbl).put_Transform3D)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_drag(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanDrag)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_can_drag(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanDrag)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_drag_starting(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DragStarting)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_drag_starting(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DragStarting)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_drop_completed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DropCompleted)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_drop_completed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DropCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(all(feature="windows.applicationmodel",feature="windows.ui"))] #[inline] pub unsafe fn start_drag_async(&mut self, pointerPoint: &super::input::PointerPoint) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).StartDragAsync)(self, pointerPoint as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUIElementStatics3, 3522722526, 60577, 17761, 163, 43, 100, 96, 27, 78, 5, 151); + RT_INTERFACE!{static interface IUIElementStatics3(IUIElementStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElementStatics3] { + fn get_Transform3DProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_CanDragProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn TryStartDirectManipulation(&mut self, value: *mut input::Pointer, out: *mut bool) -> HRESULT + }} + impl IUIElementStatics3 { + #[inline] pub unsafe fn get_transform3_dproperty(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Transform3DProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_drag_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CanDragProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn try_start_direct_manipulation(&mut self, value: &input::Pointer) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).TryStartDirectManipulation)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUIElement4, 1762942164, 6554, 18007, 158, 87, 233, 158, 143, 19, 103, 18); + RT_INTERFACE!{interface IUIElement4(IUIElement4Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElement4] { + fn get_ContextFlyout(&mut self, out: *mut *mut controls::primitives::FlyoutBase) -> HRESULT, + fn put_ContextFlyout(&mut self, value: *mut controls::primitives::FlyoutBase) -> HRESULT, + fn get_ExitDisplayModeOnAccessKeyInvoked(&mut self, out: *mut bool) -> HRESULT, + fn put_ExitDisplayModeOnAccessKeyInvoked(&mut self, value: bool) -> HRESULT, + fn get_IsAccessKeyScope(&mut self, out: *mut bool) -> HRESULT, + fn put_IsAccessKeyScope(&mut self, value: bool) -> HRESULT, + fn get_AccessKeyScopeOwner(&mut self, out: *mut *mut DependencyObject) -> HRESULT, + fn put_AccessKeyScopeOwner(&mut self, value: *mut DependencyObject) -> HRESULT, + fn get_AccessKey(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AccessKey(&mut self, value: HSTRING) -> HRESULT, + fn add_ContextRequested(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContextRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ContextCanceled(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContextCanceled(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AccessKeyDisplayRequested(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccessKeyDisplayRequested(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AccessKeyDisplayDismissed(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccessKeyDisplayDismissed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AccessKeyInvoked(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccessKeyInvoked(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IUIElement4 { + #[inline] pub unsafe fn get_context_flyout(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContextFlyout)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_context_flyout(&mut self, value: &controls::primitives::FlyoutBase) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContextFlyout)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_exit_display_mode_on_access_key_invoked(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExitDisplayModeOnAccessKeyInvoked)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_exit_display_mode_on_access_key_invoked(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExitDisplayModeOnAccessKeyInvoked)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_access_key_scope(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsAccessKeyScope)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_access_key_scope(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsAccessKeyScope)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_access_key_scope_owner(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccessKeyScopeOwner)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_access_key_scope_owner(&mut self, value: &DependencyObject) -> Result<()> { + let hr = ((*self.lpVtbl).put_AccessKeyScopeOwner)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_access_key(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccessKey)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_access_key(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AccessKey)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_context_requested(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ContextRequested)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_context_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContextRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_context_canceled(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ContextCanceled)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_context_canceled(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContextCanceled)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_access_key_display_requested(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AccessKeyDisplayRequested)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_access_key_display_requested(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AccessKeyDisplayRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_access_key_display_dismissed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AccessKeyDisplayDismissed)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_access_key_display_dismissed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AccessKeyDisplayDismissed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_access_key_invoked(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_AccessKeyInvoked)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_access_key_invoked(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_AccessKeyInvoked)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class UIElement: IUIElement} + RT_ACTIVATABLE!{IUIElementStatics4 [CLSID_UIElement]} + RT_ACTIVATABLE!{IUIElementStatics [CLSID_UIElement]} + RT_ACTIVATABLE!{IUIElementStatics2 [CLSID_UIElement]} + RT_ACTIVATABLE!{IUIElementStatics3 [CLSID_UIElement]} + DEFINE_CLSID!(CLSID_UIElement = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,85,73,69,108,101,109,101,110,116,0]); + DEFINE_IID!(IID_IUIElementStatics4, 487947617, 5807, 16671, 183, 116, 39, 35, 117, 164, 172, 44); + RT_INTERFACE!{static interface IUIElementStatics4(IUIElementStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElementStatics4] { + fn get_ContextFlyoutProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_ExitDisplayModeOnAccessKeyInvokedProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_IsAccessKeyScopeProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_AccessKeyScopeOwnerProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_AccessKeyProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT + }} + impl IUIElementStatics4 { + #[inline] pub unsafe fn get_context_flyout_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContextFlyoutProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_exit_display_mode_on_access_key_invoked_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExitDisplayModeOnAccessKeyInvokedProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_access_key_scope_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsAccessKeyScopeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_access_key_scope_owner_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccessKeyScopeOwnerProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_access_key_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccessKeyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVisualState, 1663086588, 49946, 17488, 175, 222, 246, 234, 123, 209, 245, 134); + RT_INTERFACE!{interface IVisualState(IVisualStateVtbl): IInspectable(IInspectableVtbl) [IID_IVisualState] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Storyboard(&mut self, out: *mut *mut media::animation::Storyboard) -> HRESULT, + fn put_Storyboard(&mut self, value: *mut media::animation::Storyboard) -> HRESULT + }} + impl IVisualState { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_storyboard(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Storyboard)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_storyboard(&mut self, value: &media::animation::Storyboard) -> Result<()> { + let hr = ((*self.lpVtbl).put_Storyboard)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVisualState2, 262207638, 25792, 17915, 141, 36, 251, 131, 41, 140, 13, 147); + RT_INTERFACE!{interface IVisualState2(IVisualState2Vtbl): IInspectable(IInspectableVtbl) [IID_IVisualState2] { + fn get_Setters(&mut self, out: *mut *mut SetterBaseCollection) -> HRESULT, + fn get_StateTriggers(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + }} + impl IVisualState2 { + #[inline] pub unsafe fn get_setters(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Setters)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_state_triggers(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StateTriggers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class VisualState: IVisualState} + DEFINE_IID!(IID_IVisualStateGroup, 3841579428, 57384, 17630, 155, 21, 73, 41, 174, 10, 38, 194); + RT_INTERFACE!{interface IVisualStateGroup(IVisualStateGroupVtbl): IInspectable(IInspectableVtbl) [IID_IVisualStateGroup] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_Transitions(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_States(&mut self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_CurrentState(&mut self, out: *mut *mut VisualState) -> HRESULT, + fn add_CurrentStateChanged(&mut self, value: *mut VisualStateChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CurrentStateChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CurrentStateChanging(&mut self, value: *mut VisualStateChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CurrentStateChanging(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IVisualStateGroup { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_transitions(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Transitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_states(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_States)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_current_state(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CurrentState)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_current_state_changed(&mut self, value: &VisualStateChangedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CurrentStateChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_current_state_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CurrentStateChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_current_state_changing(&mut self, value: &VisualStateChangedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CurrentStateChanging)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_current_state_changing(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CurrentStateChanging)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class VisualStateGroup: IVisualStateGroup} + DEFINE_IID!(IID_IVisualStateManager, 1876598682, 28587, 16658, 146, 88, 16, 6, 163, 195, 71, 110); + RT_INTERFACE!{interface IVisualStateManager(IVisualStateManagerVtbl): IInspectable(IInspectableVtbl) [IID_IVisualStateManager] { + + }} + DEFINE_IID!(IID_IVisualStateManagerOverrides, 1248235790, 31097, 17352, 143, 244, 236, 97, 34, 117, 0, 6); + RT_INTERFACE!{interface IVisualStateManagerOverrides(IVisualStateManagerOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IVisualStateManagerOverrides] { + fn GoToStateCore(&mut self, control: *mut controls::Control, templateRoot: *mut FrameworkElement, stateName: HSTRING, group: *mut VisualStateGroup, state: *mut VisualState, useTransitions: bool, out: *mut bool) -> HRESULT + }} + impl IVisualStateManagerOverrides { + #[inline] pub unsafe fn go_to_state_core(&mut self, control: &controls::Control, templateRoot: &FrameworkElement, stateName: &HStringArg, group: &VisualStateGroup, state: &VisualState, useTransitions: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GoToStateCore)(self, control as *const _ as *mut _, templateRoot as *const _ as *mut _, stateName.get(), group as *const _ as *mut _, state as *const _ as *mut _, useTransitions, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVisualStateManagerProtected, 1262192192, 45239, 16460, 158, 244, 217, 73, 100, 14, 36, 93); + RT_INTERFACE!{interface IVisualStateManagerProtected(IVisualStateManagerProtectedVtbl): IInspectable(IInspectableVtbl) [IID_IVisualStateManagerProtected] { + fn RaiseCurrentStateChanging(&mut self, stateGroup: *mut VisualStateGroup, oldState: *mut VisualState, newState: *mut VisualState, control: *mut controls::Control) -> HRESULT, + fn RaiseCurrentStateChanged(&mut self, stateGroup: *mut VisualStateGroup, oldState: *mut VisualState, newState: *mut VisualState, control: *mut controls::Control) -> HRESULT + }} + impl IVisualStateManagerProtected { + #[inline] pub unsafe fn raise_current_state_changing(&mut self, stateGroup: &VisualStateGroup, oldState: &VisualState, newState: &VisualState, control: &controls::Control) -> Result<()> { + let hr = ((*self.lpVtbl).RaiseCurrentStateChanging)(self, stateGroup as *const _ as *mut _, oldState as *const _ as *mut _, newState as *const _ as *mut _, control as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn raise_current_state_changed(&mut self, stateGroup: &VisualStateGroup, oldState: &VisualState, newState: &VisualState, control: &controls::Control) -> Result<()> { + let hr = ((*self.lpVtbl).RaiseCurrentStateChanged)(self, stateGroup as *const _ as *mut _, oldState as *const _ as *mut _, newState as *const _ as *mut _, control as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVisualStateManagerStatics, 30468576, 55059, 16718, 167, 78, 230, 62, 199, 172, 140, 61); + RT_INTERFACE!{static interface IVisualStateManagerStatics(IVisualStateManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IVisualStateManagerStatics] { + fn GetVisualStateGroups(&mut self, obj: *mut FrameworkElement, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_CustomVisualStateManagerProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn GetCustomVisualStateManager(&mut self, obj: *mut FrameworkElement, out: *mut *mut VisualStateManager) -> HRESULT, + fn SetCustomVisualStateManager(&mut self, obj: *mut FrameworkElement, value: *mut VisualStateManager) -> HRESULT, + fn GoToState(&mut self, control: *mut controls::Control, stateName: HSTRING, useTransitions: bool, out: *mut bool) -> HRESULT + }} + impl IVisualStateManagerStatics { + #[inline] pub unsafe fn get_visual_state_groups(&mut self, obj: &FrameworkElement) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetVisualStateGroups)(self, obj as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_visual_state_manager_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CustomVisualStateManagerProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_custom_visual_state_manager(&mut self, obj: &FrameworkElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetCustomVisualStateManager)(self, obj as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_custom_visual_state_manager(&mut self, obj: &FrameworkElement, value: &VisualStateManager) -> Result<()> { + let hr = ((*self.lpVtbl).SetCustomVisualStateManager)(self, obj as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn go_to_state(&mut self, control: &controls::Control, stateName: &HStringArg, useTransitions: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GoToState)(self, control as *const _ as *mut _, stateName.get(), useTransitions, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class VisualStateManager: IVisualStateManager} + RT_ACTIVATABLE!{IVisualStateManagerStatics [CLSID_VisualStateManager]} + DEFINE_CLSID!(CLSID_VisualStateManager = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,86,105,115,117,97,108,83,116,97,116,101,77,97,110,97,103,101,114,0]); + DEFINE_IID!(IID_IVisualStateManagerFactory, 2246416637, 42357, 18358, 158, 48, 56, 60, 208, 133, 133, 242); + RT_INTERFACE!{interface IVisualStateManagerFactory(IVisualStateManagerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVisualStateManagerFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut VisualStateManager) -> HRESULT + }} + impl IVisualStateManagerFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVisualTransition, 1439010910, 11207, 16397, 170, 164, 26, 41, 129, 73, 30, 224); + RT_INTERFACE!{interface IVisualTransition(IVisualTransitionVtbl): IInspectable(IInspectableVtbl) [IID_IVisualTransition] { + fn get_GeneratedDuration(&mut self, out: *mut Duration) -> HRESULT, + fn put_GeneratedDuration(&mut self, value: Duration) -> HRESULT, + fn get_GeneratedEasingFunction(&mut self, out: *mut *mut media::animation::EasingFunctionBase) -> HRESULT, + fn put_GeneratedEasingFunction(&mut self, value: *mut media::animation::EasingFunctionBase) -> HRESULT, + fn get_To(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_To(&mut self, value: HSTRING) -> HRESULT, + fn get_From(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_From(&mut self, value: HSTRING) -> HRESULT, + fn get_Storyboard(&mut self, out: *mut *mut media::animation::Storyboard) -> HRESULT, + fn put_Storyboard(&mut self, value: *mut media::animation::Storyboard) -> HRESULT + }} + impl IVisualTransition { + #[inline] pub unsafe fn get_generated_duration(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GeneratedDuration)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_generated_duration(&mut self, value: Duration) -> Result<()> { + let hr = ((*self.lpVtbl).put_GeneratedDuration)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_generated_easing_function(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GeneratedEasingFunction)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_generated_easing_function(&mut self, value: &media::animation::EasingFunctionBase) -> Result<()> { + let hr = ((*self.lpVtbl).put_GeneratedEasingFunction)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_to(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_To)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_to(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_To)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_from(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_From)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_from(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_From)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_storyboard(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Storyboard)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_storyboard(&mut self, value: &media::animation::Storyboard) -> Result<()> { + let hr = ((*self.lpVtbl).put_Storyboard)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class VisualTransition: IVisualTransition} + DEFINE_IID!(IID_IVisualTransitionFactory, 3933570639, 53728, 19886, 180, 41, 137, 252, 50, 39, 36, 244); + RT_INTERFACE!{interface IVisualTransitionFactory(IVisualTransitionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVisualTransitionFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut VisualTransition) -> HRESULT + }} + impl IVisualTransitionFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdaptiveTrigger, 2783985945, 3289, 18929, 162, 63, 68, 229, 71, 171, 159, 26); + RT_INTERFACE!{interface IAdaptiveTrigger(IAdaptiveTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveTrigger] { + fn get_MinWindowWidth(&mut self, out: *mut f64) -> HRESULT, + fn put_MinWindowWidth(&mut self, value: f64) -> HRESULT, + fn get_MinWindowHeight(&mut self, out: *mut f64) -> HRESULT, + fn put_MinWindowHeight(&mut self, value: f64) -> HRESULT + }} + impl IAdaptiveTrigger { + #[inline] pub unsafe fn get_min_window_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinWindowWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_window_width(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinWindowWidth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_window_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinWindowHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_window_height(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinWindowHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdaptiveTriggerStatics, 3106810346, 5653, 17232, 156, 59, 146, 178, 152, 107, 244, 68); + RT_INTERFACE!{static interface IAdaptiveTriggerStatics(IAdaptiveTriggerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveTriggerStatics] { + fn get_MinWindowWidthProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_MinWindowHeightProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT + }} + impl IAdaptiveTriggerStatics { + #[inline] pub unsafe fn get_min_window_width_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MinWindowWidthProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_window_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MinWindowHeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IAdaptiveTriggerFactory, 3378959490, 23275, 18497, 146, 71, 193, 160, 189, 214, 245, 159); + RT_INTERFACE!{interface IAdaptiveTriggerFactory(IAdaptiveTriggerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveTriggerFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut AdaptiveTrigger) -> HRESULT + }} + impl IAdaptiveTriggerFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + RT_CLASS!{class AdaptiveTrigger: IAdaptiveTrigger} + RT_ACTIVATABLE!{IAdaptiveTriggerStatics [CLSID_AdaptiveTrigger]} + DEFINE_CLSID!(CLSID_AdaptiveTrigger = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,65,100,97,112,116,105,118,101,84,114,105,103,103,101,114,0]); + DEFINE_IID!(IID_IEventTrigger, 3740858453, 2889, 16519, 177, 169, 184, 179, 132, 136, 247, 134); + RT_INTERFACE!{interface IEventTrigger(IEventTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IEventTrigger] { + fn get_RoutedEvent(&mut self, out: *mut *mut RoutedEvent) -> HRESULT, + fn put_RoutedEvent(&mut self, value: *mut RoutedEvent) -> HRESULT, + fn get_Actions(&mut self, out: *mut *mut TriggerActionCollection) -> HRESULT + }} + impl IEventTrigger { + #[inline] pub unsafe fn get_routed_event(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RoutedEvent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_routed_event(&mut self, value: &RoutedEvent) -> Result<()> { + let hr = ((*self.lpVtbl).put_RoutedEvent)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_actions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Actions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class EventTrigger: IEventTrigger} + DEFINE_IID!(IID_IFrameworkElement, 2744242331, 19097, 19324, 157, 141, 111, 165, 208, 31, 111, 191); + RT_INTERFACE!{interface IFrameworkElement(IFrameworkElementVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElement] { + fn get_Triggers(&mut self, out: *mut *mut TriggerCollection) -> HRESULT, + fn get_Resources(&mut self, out: *mut *mut ResourceDictionary) -> HRESULT, + fn put_Resources(&mut self, value: *mut ResourceDictionary) -> HRESULT, + fn get_Tag(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Tag(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Language(&mut self, value: HSTRING) -> HRESULT, + fn get_ActualWidth(&mut self, out: *mut f64) -> HRESULT, + fn get_ActualHeight(&mut self, out: *mut f64) -> HRESULT, + fn get_Width(&mut self, out: *mut f64) -> HRESULT, + fn put_Width(&mut self, value: f64) -> HRESULT, + fn get_Height(&mut self, out: *mut f64) -> HRESULT, + fn put_Height(&mut self, value: f64) -> HRESULT, + fn get_MinWidth(&mut self, out: *mut f64) -> HRESULT, + fn put_MinWidth(&mut self, value: f64) -> HRESULT, + fn get_MaxWidth(&mut self, out: *mut f64) -> HRESULT, + fn put_MaxWidth(&mut self, value: f64) -> HRESULT, + fn get_MinHeight(&mut self, out: *mut f64) -> HRESULT, + fn put_MinHeight(&mut self, value: f64) -> HRESULT, + fn get_MaxHeight(&mut self, out: *mut f64) -> HRESULT, + fn put_MaxHeight(&mut self, value: f64) -> HRESULT, + fn get_HorizontalAlignment(&mut self, out: *mut HorizontalAlignment) -> HRESULT, + fn put_HorizontalAlignment(&mut self, value: HorizontalAlignment) -> HRESULT, + fn get_VerticalAlignment(&mut self, out: *mut VerticalAlignment) -> HRESULT, + fn put_VerticalAlignment(&mut self, value: VerticalAlignment) -> HRESULT, + fn get_Margin(&mut self, out: *mut Thickness) -> HRESULT, + fn put_Margin(&mut self, value: Thickness) -> HRESULT, + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Name(&mut self, value: HSTRING) -> HRESULT, + fn get_BaseUri(&mut self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_DataContext(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_DataContext(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_Style(&mut self, out: *mut *mut Style) -> HRESULT, + fn put_Style(&mut self, value: *mut Style) -> HRESULT, + fn get_Parent(&mut self, out: *mut *mut DependencyObject) -> HRESULT, + fn get_FlowDirection(&mut self, out: *mut FlowDirection) -> HRESULT, + fn put_FlowDirection(&mut self, value: FlowDirection) -> HRESULT, + fn add_Loaded(&mut self, value: *mut RoutedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Loaded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Unloaded(&mut self, value: *mut RoutedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Unloaded(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SizeChanged(&mut self, value: *mut SizeChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SizeChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_LayoutUpdated(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LayoutUpdated(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn FindName(&mut self, name: HSTRING, out: *mut *mut IInspectable) -> HRESULT, + fn SetBinding(&mut self, dp: *mut DependencyProperty, binding: *mut data::BindingBase) -> HRESULT + }} + impl IFrameworkElement { + #[inline] pub unsafe fn get_triggers(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Triggers)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_resources(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Resources)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_resources(&mut self, value: &ResourceDictionary) -> Result<()> { + let hr = ((*self.lpVtbl).put_Resources)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tag(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Tag)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_tag(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Tag)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_language(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Language)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_actual_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActualWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_actual_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActualHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_width(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Width)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_height(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_Height)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_width(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinWidth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_width(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxWidth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_height(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_height(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_horizontal_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HorizontalAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_horizontal_alignment(&mut self, value: HorizontalAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_HorizontalAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VerticalAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_vertical_alignment(&mut self, value: VerticalAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_VerticalAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_margin(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Margin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_margin(&mut self, value: Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_Margin)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_name(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Name)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_base_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BaseUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_context(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataContext)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_data_context(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_DataContext)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_style(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Style)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_style(&mut self, value: &Style) -> Result<()> { + let hr = ((*self.lpVtbl).put_Style)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_parent(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Parent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_flow_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FlowDirection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_flow_direction(&mut self, value: FlowDirection) -> Result<()> { + let hr = ((*self.lpVtbl).put_FlowDirection)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_loaded(&mut self, value: &RoutedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Loaded)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_loaded(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Loaded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_unloaded(&mut self, value: &RoutedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Unloaded)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_unloaded(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Unloaded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_size_changed(&mut self, value: &SizeChangedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SizeChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_size_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SizeChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_layout_updated(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LayoutUpdated)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_layout_updated(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LayoutUpdated)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn find_name(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindName)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_binding(&mut self, dp: &DependencyProperty, binding: &data::BindingBase) -> Result<()> { + let hr = ((*self.lpVtbl).SetBinding)(self, dp as *const _ as *mut _, binding as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameworkElementOverrides, 3657465428, 46018, 19354, 170, 142, 211, 240, 113, 38, 43, 151); + RT_INTERFACE!{interface IFrameworkElementOverrides(IFrameworkElementOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElementOverrides] { + fn MeasureOverride(&mut self, availableSize: super::super::foundation::Size, out: *mut super::super::foundation::Size) -> HRESULT, + fn ArrangeOverride(&mut self, finalSize: super::super::foundation::Size, out: *mut super::super::foundation::Size) -> HRESULT, + fn OnApplyTemplate(&mut self) -> HRESULT + }} + impl IFrameworkElementOverrides { + #[inline] pub unsafe fn measure_override(&mut self, availableSize: super::super::foundation::Size) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).MeasureOverride)(self, availableSize, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn arrange_override(&mut self, finalSize: super::super::foundation::Size) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).ArrangeOverride)(self, finalSize, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn on_apply_template(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).OnApplyTemplate)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameworkElementStatics, 1211641906, 64491, 20362, 174, 210, 238, 33, 251, 39, 165, 123); + RT_INTERFACE!{static interface IFrameworkElementStatics(IFrameworkElementStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElementStatics] { + fn get_TagProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_LanguageProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_ActualWidthProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_ActualHeightProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_WidthProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_HeightProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_MinWidthProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_MaxWidthProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_MinHeightProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_MaxHeightProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_HorizontalAlignmentProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_VerticalAlignmentProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_MarginProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_NameProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_DataContextProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_StyleProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_FlowDirectionProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT + }} + impl IFrameworkElementStatics { + #[inline] pub unsafe fn get_tag_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TagProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_language_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LanguageProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_actual_width_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActualWidthProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_actual_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ActualHeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_width_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WidthProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_width_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MinWidthProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_width_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxWidthProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MinHeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxHeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_horizontal_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HorizontalAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VerticalAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_margin_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MarginProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_name_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NameProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_data_context_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DataContextProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_style_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StyleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_flow_direction_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FlowDirectionProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameworkElementFactory, 3736002854, 970, 18790, 181, 118, 96, 76, 206, 147, 181, 232); + RT_INTERFACE!{interface IFrameworkElementFactory(IFrameworkElementFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElementFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut FrameworkElement) -> HRESULT + }} + impl IFrameworkElementFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameworkElement2, 4052812990, 16938, 18692, 165, 47, 238, 114, 1, 4, 41, 229); + RT_INTERFACE!{interface IFrameworkElement2(IFrameworkElement2Vtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElement2] { + fn get_RequestedTheme(&mut self, out: *mut ElementTheme) -> HRESULT, + fn put_RequestedTheme(&mut self, value: ElementTheme) -> HRESULT, + fn add_DataContextChanged(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataContextChanged(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetBindingExpression(&mut self, dp: *mut DependencyProperty, out: *mut *mut data::BindingExpression) -> HRESULT + }} + impl IFrameworkElement2 { + #[inline] pub unsafe fn get_requested_theme(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestedTheme)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_requested_theme(&mut self, value: ElementTheme) -> Result<()> { + let hr = ((*self.lpVtbl).put_RequestedTheme)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_data_context_changed(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_DataContextChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_data_context_changed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_DataContextChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_binding_expression(&mut self, dp: &DependencyProperty) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBindingExpression)(self, dp as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameworkElementOverrides2, 3411858105, 58292, 17804, 182, 78, 20, 52, 253, 27, 216, 138); + RT_INTERFACE!{interface IFrameworkElementOverrides2(IFrameworkElementOverrides2Vtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElementOverrides2] { + fn GoToElementStateCore(&mut self, stateName: HSTRING, useTransitions: bool, out: *mut bool) -> HRESULT + }} + impl IFrameworkElementOverrides2 { + #[inline] pub unsafe fn go_to_element_state_core(&mut self, stateName: &HStringArg, useTransitions: bool) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GoToElementStateCore)(self, stateName.get(), useTransitions, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameworkElementStatics2, 2526403330, 49368, 20386, 177, 0, 63, 162, 223, 139, 149, 56); + RT_INTERFACE!{static interface IFrameworkElementStatics2(IFrameworkElementStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElementStatics2] { + fn get_RequestedThemeProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT + }} + impl IFrameworkElementStatics2 { + #[inline] pub unsafe fn get_requested_theme_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RequestedThemeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameworkElement3, 3357288224, 23634, 19390, 161, 153, 43, 30, 52, 240, 15, 112); + RT_INTERFACE!{interface IFrameworkElement3(IFrameworkElement3Vtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElement3] { + fn add_Loading(&mut self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Loading(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IFrameworkElement3 { + #[inline] pub unsafe fn add_loading(&mut self, value: &super::super::foundation::TypedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Loading)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_loading(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Loading)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameworkElement4, 1802918835, 64419, 17412, 189, 238, 26, 69, 209, 202, 95, 33); + RT_INTERFACE!{interface IFrameworkElement4(IFrameworkElement4Vtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElement4] { + fn get_AllowFocusOnInteraction(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowFocusOnInteraction(&mut self, value: bool) -> HRESULT, + fn get_FocusVisualMargin(&mut self, out: *mut Thickness) -> HRESULT, + fn put_FocusVisualMargin(&mut self, value: Thickness) -> HRESULT, + fn get_FocusVisualSecondaryThickness(&mut self, out: *mut Thickness) -> HRESULT, + fn put_FocusVisualSecondaryThickness(&mut self, value: Thickness) -> HRESULT, + fn get_FocusVisualPrimaryThickness(&mut self, out: *mut Thickness) -> HRESULT, + fn put_FocusVisualPrimaryThickness(&mut self, value: Thickness) -> HRESULT, + fn get_FocusVisualSecondaryBrush(&mut self, out: *mut *mut media::Brush) -> HRESULT, + fn put_FocusVisualSecondaryBrush(&mut self, value: *mut media::Brush) -> HRESULT, + fn get_FocusVisualPrimaryBrush(&mut self, out: *mut *mut media::Brush) -> HRESULT, + fn put_FocusVisualPrimaryBrush(&mut self, value: *mut media::Brush) -> HRESULT, + fn get_AllowFocusWhenDisabled(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowFocusWhenDisabled(&mut self, value: bool) -> HRESULT + }} + impl IFrameworkElement4 { + #[inline] pub unsafe fn get_allow_focus_on_interaction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowFocusOnInteraction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_focus_on_interaction(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowFocusOnInteraction)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_visual_margin(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FocusVisualMargin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_focus_visual_margin(&mut self, value: Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_FocusVisualMargin)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_visual_secondary_thickness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FocusVisualSecondaryThickness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_focus_visual_secondary_thickness(&mut self, value: Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_FocusVisualSecondaryThickness)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_visual_primary_thickness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FocusVisualPrimaryThickness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_focus_visual_primary_thickness(&mut self, value: Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_FocusVisualPrimaryThickness)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_visual_secondary_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FocusVisualSecondaryBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_focus_visual_secondary_brush(&mut self, value: &media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_FocusVisualSecondaryBrush)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_visual_primary_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FocusVisualPrimaryBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_focus_visual_primary_brush(&mut self, value: &media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_FocusVisualPrimaryBrush)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_allow_focus_when_disabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowFocusWhenDisabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_focus_when_disabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowFocusWhenDisabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class FrameworkElement: IFrameworkElement} + RT_ACTIVATABLE!{IFrameworkElementStatics4 [CLSID_FrameworkElement]} + RT_ACTIVATABLE!{IFrameworkElementStatics2 [CLSID_FrameworkElement]} + RT_ACTIVATABLE!{IFrameworkElementStatics [CLSID_FrameworkElement]} + DEFINE_CLSID!(CLSID_FrameworkElement = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,70,114,97,109,101,119,111,114,107,69,108,101,109,101,110,116,0]); + DEFINE_IID!(IID_IFrameworkElementStatics4, 2621550933, 50648, 18019, 191, 242, 216, 213, 79, 181, 219, 179); + RT_INTERFACE!{static interface IFrameworkElementStatics4(IFrameworkElementStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElementStatics4] { + fn get_AllowFocusOnInteractionProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_FocusVisualMarginProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_FocusVisualSecondaryThicknessProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_FocusVisualPrimaryThicknessProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_FocusVisualSecondaryBrushProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_FocusVisualPrimaryBrushProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn get_AllowFocusWhenDisabledProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT + }} + impl IFrameworkElementStatics4 { + #[inline] pub unsafe fn get_allow_focus_on_interaction_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AllowFocusOnInteractionProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_visual_margin_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FocusVisualMarginProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_visual_secondary_thickness_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FocusVisualSecondaryThicknessProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_visual_primary_thickness_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FocusVisualPrimaryThicknessProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_visual_secondary_brush_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FocusVisualSecondaryBrushProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_focus_visual_primary_brush_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FocusVisualPrimaryBrushProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_allow_focus_when_disabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AllowFocusWhenDisabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaFailedRoutedEventArgs, 1188166285, 20809, 16723, 186, 60, 176, 62, 100, 238, 83, 30); + RT_INTERFACE!{interface IMediaFailedRoutedEventArgs(IMediaFailedRoutedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFailedRoutedEventArgs] { + fn get_ErrorTrace(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IMediaFailedRoutedEventArgs { + #[inline] pub unsafe fn get_error_trace(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ErrorTrace)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class MediaFailedRoutedEventArgs: IMediaFailedRoutedEventArgs} + DEFINE_IID!(IID_ISetter, 2805853481, 46254, 19073, 190, 133, 230, 144, 186, 13, 59, 110); + RT_INTERFACE!{interface ISetter(ISetterVtbl): IInspectable(IInspectableVtbl) [IID_ISetter] { + fn get_Property(&mut self, out: *mut *mut DependencyProperty) -> HRESULT, + fn put_Property(&mut self, value: *mut DependencyProperty) -> HRESULT, + fn get_Value(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Value(&mut self, value: *mut IInspectable) -> HRESULT + }} + impl ISetter { + #[inline] pub unsafe fn get_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_property(&mut self, value: &DependencyProperty) -> Result<()> { + let hr = ((*self.lpVtbl).put_Property)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_value(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Value)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISetterFactory, 3553246530, 2481, 18901, 136, 145, 231, 181, 100, 142, 2, 162); + RT_INTERFACE!{static interface ISetterFactory(ISetterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISetterFactory] { + fn CreateInstance(&mut self, targetProperty: *mut DependencyProperty, value: *mut IInspectable, out: *mut *mut Setter) -> HRESULT + }} + impl ISetterFactory { + #[inline] pub unsafe fn create_instance(&mut self, targetProperty: &DependencyProperty, value: &IInspectable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, targetProperty as *const _ as *mut _, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISetter2, 1880528225, 1457, 20387, 157, 83, 142, 12, 140, 116, 122, 252); + RT_INTERFACE!{interface ISetter2(ISetter2Vtbl): IInspectable(IInspectableVtbl) [IID_ISetter2] { + fn get_Target(&mut self, out: *mut *mut TargetPropertyPath) -> HRESULT, + fn put_Target(&mut self, value: *mut TargetPropertyPath) -> HRESULT + }} + impl ISetter2 { + #[inline] pub unsafe fn get_target(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Target)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_target(&mut self, value: &TargetPropertyPath) -> Result<()> { + let hr = ((*self.lpVtbl).put_Target)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Setter: ISetter [ISetterFactory] [CLSID_Setter]} + DEFINE_CLSID!(CLSID_Setter = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,83,101,116,116,101,114,0]); + DEFINE_IID!(IID_IStateTrigger, 1739452206, 55513, 18935, 161, 253, 46, 53, 238, 221, 35, 205); + RT_INTERFACE!{interface IStateTrigger(IStateTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IStateTrigger] { + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn put_IsActive(&mut self, value: bool) -> HRESULT + }} + impl IStateTrigger { + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_active(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsActive)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStateTriggerStatics, 1911118992, 46078, 19923, 168, 168, 68, 162, 206, 37, 224, 184); + RT_INTERFACE!{static interface IStateTriggerStatics(IStateTriggerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStateTriggerStatics] { + fn get_IsActiveProperty(&mut self, out: *mut *mut DependencyProperty) -> HRESULT + }} + impl IStateTriggerStatics { + #[inline] pub unsafe fn get_is_active_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsActiveProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class StateTrigger: IStateTrigger} + RT_ACTIVATABLE!{IStateTriggerStatics [CLSID_StateTrigger]} + DEFINE_CLSID!(CLSID_StateTrigger = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,83,116,97,116,101,84,114,105,103,103,101,114,0]); + RT_ENUM! { enum ApplicationRequiresPointerMode: i32 { + Auto (ApplicationRequiresPointerMode_Auto) = 0, WhenRequested (ApplicationRequiresPointerMode_WhenRequested) = 1, + }} + RT_ENUM! { enum ApplicationTheme: i32 { + Light (ApplicationTheme_Light) = 0, Dark (ApplicationTheme_Dark) = 1, + }} + RT_ENUM! { enum AutomationTextAttributesEnum: i32 { + AnimationStyleAttribute (AutomationTextAttributesEnum_AnimationStyleAttribute) = 40000, BackgroundColorAttribute (AutomationTextAttributesEnum_BackgroundColorAttribute) = 40001, BulletStyleAttribute (AutomationTextAttributesEnum_BulletStyleAttribute) = 40002, CapStyleAttribute (AutomationTextAttributesEnum_CapStyleAttribute) = 40003, CultureAttribute (AutomationTextAttributesEnum_CultureAttribute) = 40004, FontNameAttribute (AutomationTextAttributesEnum_FontNameAttribute) = 40005, FontSizeAttribute (AutomationTextAttributesEnum_FontSizeAttribute) = 40006, FontWeightAttribute (AutomationTextAttributesEnum_FontWeightAttribute) = 40007, ForegroundColorAttribute (AutomationTextAttributesEnum_ForegroundColorAttribute) = 40008, HorizontalTextAlignmentAttribute (AutomationTextAttributesEnum_HorizontalTextAlignmentAttribute) = 40009, IndentationFirstLineAttribute (AutomationTextAttributesEnum_IndentationFirstLineAttribute) = 40010, IndentationLeadingAttribute (AutomationTextAttributesEnum_IndentationLeadingAttribute) = 40011, IndentationTrailingAttribute (AutomationTextAttributesEnum_IndentationTrailingAttribute) = 40012, IsHiddenAttribute (AutomationTextAttributesEnum_IsHiddenAttribute) = 40013, IsItalicAttribute (AutomationTextAttributesEnum_IsItalicAttribute) = 40014, IsReadOnlyAttribute (AutomationTextAttributesEnum_IsReadOnlyAttribute) = 40015, IsSubscriptAttribute (AutomationTextAttributesEnum_IsSubscriptAttribute) = 40016, IsSuperscriptAttribute (AutomationTextAttributesEnum_IsSuperscriptAttribute) = 40017, MarginBottomAttribute (AutomationTextAttributesEnum_MarginBottomAttribute) = 40018, MarginLeadingAttribute (AutomationTextAttributesEnum_MarginLeadingAttribute) = 40019, MarginTopAttribute (AutomationTextAttributesEnum_MarginTopAttribute) = 40020, MarginTrailingAttribute (AutomationTextAttributesEnum_MarginTrailingAttribute) = 40021, OutlineStylesAttribute (AutomationTextAttributesEnum_OutlineStylesAttribute) = 40022, OverlineColorAttribute (AutomationTextAttributesEnum_OverlineColorAttribute) = 40023, OverlineStyleAttribute (AutomationTextAttributesEnum_OverlineStyleAttribute) = 40024, StrikethroughColorAttribute (AutomationTextAttributesEnum_StrikethroughColorAttribute) = 40025, StrikethroughStyleAttribute (AutomationTextAttributesEnum_StrikethroughStyleAttribute) = 40026, TabsAttribute (AutomationTextAttributesEnum_TabsAttribute) = 40027, TextFlowDirectionsAttribute (AutomationTextAttributesEnum_TextFlowDirectionsAttribute) = 40028, UnderlineColorAttribute (AutomationTextAttributesEnum_UnderlineColorAttribute) = 40029, UnderlineStyleAttribute (AutomationTextAttributesEnum_UnderlineStyleAttribute) = 40030, AnnotationTypesAttribute (AutomationTextAttributesEnum_AnnotationTypesAttribute) = 40031, AnnotationObjectsAttribute (AutomationTextAttributesEnum_AnnotationObjectsAttribute) = 40032, StyleNameAttribute (AutomationTextAttributesEnum_StyleNameAttribute) = 40033, StyleIdAttribute (AutomationTextAttributesEnum_StyleIdAttribute) = 40034, LinkAttribute (AutomationTextAttributesEnum_LinkAttribute) = 40035, IsActiveAttribute (AutomationTextAttributesEnum_IsActiveAttribute) = 40036, SelectionActiveEndAttribute (AutomationTextAttributesEnum_SelectionActiveEndAttribute) = 40037, CaretPositionAttribute (AutomationTextAttributesEnum_CaretPositionAttribute) = 40038, CaretBidiModeAttribute (AutomationTextAttributesEnum_CaretBidiModeAttribute) = 40039, + }} + RT_ENUM! { enum FontCapitals: i32 { + Normal (FontCapitals_Normal) = 0, AllSmallCaps (FontCapitals_AllSmallCaps) = 1, SmallCaps (FontCapitals_SmallCaps) = 2, AllPetiteCaps (FontCapitals_AllPetiteCaps) = 3, PetiteCaps (FontCapitals_PetiteCaps) = 4, Unicase (FontCapitals_Unicase) = 5, Titling (FontCapitals_Titling) = 6, + }} + RT_ENUM! { enum FontEastAsianLanguage: i32 { + Normal (FontEastAsianLanguage_Normal) = 0, HojoKanji (FontEastAsianLanguage_HojoKanji) = 1, Jis04 (FontEastAsianLanguage_Jis04) = 2, Jis78 (FontEastAsianLanguage_Jis78) = 3, Jis83 (FontEastAsianLanguage_Jis83) = 4, Jis90 (FontEastAsianLanguage_Jis90) = 5, NlcKanji (FontEastAsianLanguage_NlcKanji) = 6, Simplified (FontEastAsianLanguage_Simplified) = 7, Traditional (FontEastAsianLanguage_Traditional) = 8, TraditionalNames (FontEastAsianLanguage_TraditionalNames) = 9, + }} + RT_ENUM! { enum FontEastAsianWidths: i32 { + Normal (FontEastAsianWidths_Normal) = 0, Full (FontEastAsianWidths_Full) = 1, Half (FontEastAsianWidths_Half) = 2, Proportional (FontEastAsianWidths_Proportional) = 3, Quarter (FontEastAsianWidths_Quarter) = 4, Third (FontEastAsianWidths_Third) = 5, + }} + RT_ENUM! { enum FontFraction: i32 { + Normal (FontFraction_Normal) = 0, Stacked (FontFraction_Stacked) = 1, Slashed (FontFraction_Slashed) = 2, + }} + RT_ENUM! { enum FontNumeralAlignment: i32 { + Normal (FontNumeralAlignment_Normal) = 0, Proportional (FontNumeralAlignment_Proportional) = 1, Tabular (FontNumeralAlignment_Tabular) = 2, + }} + RT_ENUM! { enum FontNumeralStyle: i32 { + Normal (FontNumeralStyle_Normal) = 0, Lining (FontNumeralStyle_Lining) = 1, OldStyle (FontNumeralStyle_OldStyle) = 2, + }} + RT_ENUM! { enum FontVariants: i32 { + Normal (FontVariants_Normal) = 0, Superscript (FontVariants_Superscript) = 1, Subscript (FontVariants_Subscript) = 2, Ordinal (FontVariants_Ordinal) = 3, Inferior (FontVariants_Inferior) = 4, Ruby (FontVariants_Ruby) = 5, + }} + RT_ENUM! { enum GridUnitType: i32 { + Auto (GridUnitType_Auto) = 0, Pixel (GridUnitType_Pixel) = 1, Star (GridUnitType_Star) = 2, + }} + RT_ENUM! { enum LineStackingStrategy: i32 { + MaxHeight (LineStackingStrategy_MaxHeight) = 0, BlockLineHeight (LineStackingStrategy_BlockLineHeight) = 1, BaselineToBaseline (LineStackingStrategy_BaselineToBaseline) = 2, + }} + RT_ENUM! { enum OpticalMarginAlignment: i32 { + None (OpticalMarginAlignment_None) = 0, TrimSideBearings (OpticalMarginAlignment_TrimSideBearings) = 1, + }} + RT_ENUM! { enum TextAlignment: i32 { + Center (TextAlignment_Center) = 0, Left (TextAlignment_Left) = 1, Right (TextAlignment_Right) = 2, Justify (TextAlignment_Justify) = 3, DetectFromContent (TextAlignment_DetectFromContent) = 4, + }} + RT_ENUM! { enum TextLineBounds: i32 { + Full (TextLineBounds_Full) = 0, TrimToCapHeight (TextLineBounds_TrimToCapHeight) = 1, TrimToBaseline (TextLineBounds_TrimToBaseline) = 2, Tight (TextLineBounds_Tight) = 3, + }} + RT_ENUM! { enum TextReadingOrder: i32 { + Default (TextReadingOrder_Default) = 0, UseFlowDirection (TextReadingOrder_UseFlowDirection) = 0, DetectFromContent (TextReadingOrder_DetectFromContent) = 1, + }} + RT_ENUM! { enum TextTrimming: i32 { + None (TextTrimming_None) = 0, CharacterEllipsis (TextTrimming_CharacterEllipsis) = 1, WordEllipsis (TextTrimming_WordEllipsis) = 2, Clip (TextTrimming_Clip) = 3, + }} + RT_ENUM! { enum TextWrapping: i32 { + NoWrap (TextWrapping_NoWrap) = 1, Wrap (TextWrapping_Wrap) = 2, WrapWholeWords (TextWrapping_WrapWholeWords) = 3, + }} + RT_STRUCT! { struct GridLength { + Value: f64, GridUnitType: GridUnitType, + }} + DEFINE_IID!(IID_IGridLengthHelper, 2055367905, 1952, 16515, 182, 209, 177, 217, 23, 185, 118, 172); + RT_INTERFACE!{interface IGridLengthHelper(IGridLengthHelperVtbl): IInspectable(IInspectableVtbl) [IID_IGridLengthHelper] { + + }} + DEFINE_IID!(IID_IGridLengthHelperStatics, 2638576539, 415, 16998, 136, 114, 33, 95, 25, 143, 106, 157); + RT_INTERFACE!{static interface IGridLengthHelperStatics(IGridLengthHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGridLengthHelperStatics] { + fn get_Auto(&mut self, out: *mut GridLength) -> HRESULT, + fn FromPixels(&mut self, pixels: f64, out: *mut GridLength) -> HRESULT, + fn FromValueAndType(&mut self, value: f64, type_: GridUnitType, out: *mut GridLength) -> HRESULT, + fn GetIsAbsolute(&mut self, target: GridLength, out: *mut bool) -> HRESULT, + fn GetIsAuto(&mut self, target: GridLength, out: *mut bool) -> HRESULT, + fn GetIsStar(&mut self, target: GridLength, out: *mut bool) -> HRESULT, + fn Equals(&mut self, target: GridLength, value: GridLength, out: *mut bool) -> HRESULT + }} + impl IGridLengthHelperStatics { + #[inline] pub unsafe fn get_auto(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Auto)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn from_pixels(&mut self, pixels: f64) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromPixels)(self, pixels, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn from_value_and_type(&mut self, value: f64, type_: GridUnitType) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromValueAndType)(self, value, type_, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_absolute(&mut self, target: GridLength) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetIsAbsolute)(self, target, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_auto(&mut self, target: GridLength) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetIsAuto)(self, target, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_star(&mut self, target: GridLength) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetIsStar)(self, target, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn equals(&mut self, target: GridLength, value: GridLength) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Equals)(self, target, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class GridLengthHelper: IGridLengthHelper} + RT_ACTIVATABLE!{IGridLengthHelperStatics [CLSID_GridLengthHelper]} + DEFINE_CLSID!(CLSID_GridLengthHelper = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,71,114,105,100,76,101,110,103,116,104,72,101,108,112,101,114,0]); + DEFINE_IID!(IID_BindingFailedEventHandler, 325785474, 21690, 16909, 161, 170, 130, 130, 135, 33, 205, 230); + RT_DELEGATE!{delegate BindingFailedEventHandler(BindingFailedEventHandlerVtbl, BindingFailedEventHandlerImpl) [IID_BindingFailedEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut BindingFailedEventArgs) -> HRESULT + }} + impl BindingFailedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &BindingFailedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class BindingFailedEventArgs: IBindingFailedEventArgs} + DEFINE_IID!(IID_IBindingFailedEventArgs, 851562515, 19901, 17517, 187, 184, 13, 227, 80, 72, 164, 73); + RT_INTERFACE!{interface IBindingFailedEventArgs(IBindingFailedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBindingFailedEventArgs] { + fn get_Message(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl IBindingFailedEventArgs { + #[inline] pub unsafe fn get_message(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Message)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDebugSettings, 1027940248, 50855, 19735, 131, 152, 216, 58, 6, 113, 131, 216); + RT_INTERFACE!{interface IDebugSettings(IDebugSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IDebugSettings] { + fn get_EnableFrameRateCounter(&mut self, out: *mut bool) -> HRESULT, + fn put_EnableFrameRateCounter(&mut self, value: bool) -> HRESULT, + fn get_IsBindingTracingEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsBindingTracingEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsOverdrawHeatMapEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsOverdrawHeatMapEnabled(&mut self, value: bool) -> HRESULT, + fn add_BindingFailed(&mut self, value: *mut BindingFailedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BindingFailed(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IDebugSettings { + #[inline] pub unsafe fn get_enable_frame_rate_counter(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EnableFrameRateCounter)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_enable_frame_rate_counter(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_EnableFrameRateCounter)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_binding_tracing_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsBindingTracingEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_binding_tracing_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsBindingTracingEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_overdraw_heat_map_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsOverdrawHeatMapEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_overdraw_heat_map_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsOverdrawHeatMapEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_binding_failed(&mut self, value: &BindingFailedEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BindingFailed)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_binding_failed(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BindingFailed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDebugSettings2, 1221817733, 57766, 18075, 131, 200, 48, 130, 80, 55, 17, 158); + RT_INTERFACE!{interface IDebugSettings2(IDebugSettings2Vtbl): IInspectable(IInspectableVtbl) [IID_IDebugSettings2] { + fn get_EnableRedrawRegions(&mut self, out: *mut bool) -> HRESULT, + fn put_EnableRedrawRegions(&mut self, value: bool) -> HRESULT + }} + impl IDebugSettings2 { + #[inline] pub unsafe fn get_enable_redraw_regions(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_EnableRedrawRegions)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_enable_redraw_regions(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_EnableRedrawRegions)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDebugSettings3, 3871035426, 1573, 18335, 142, 50, 75, 88, 61, 115, 183, 172); + RT_INTERFACE!{interface IDebugSettings3(IDebugSettings3Vtbl): IInspectable(IInspectableVtbl) [IID_IDebugSettings3] { + fn get_IsTextPerformanceVisualizationEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsTextPerformanceVisualizationEnabled(&mut self, value: bool) -> HRESULT + }} + impl IDebugSettings3 { + #[inline] pub unsafe fn get_is_text_performance_visualization_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTextPerformanceVisualizationEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_text_performance_visualization_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTextPerformanceVisualizationEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DebugSettings: IDebugSettings} + DEFINE_IID!(IID_IApplication, 1958240673, 29831, 18089, 154, 110, 199, 139, 81, 39, 38, 197); + RT_INTERFACE!{interface IApplication(IApplicationVtbl): IInspectable(IInspectableVtbl) [IID_IApplication] { + fn get_Resources(&mut self, out: *mut *mut ResourceDictionary) -> HRESULT, + fn put_Resources(&mut self, value: *mut ResourceDictionary) -> HRESULT, + fn get_DebugSettings(&mut self, out: *mut *mut DebugSettings) -> HRESULT, + fn get_RequestedTheme(&mut self, out: *mut ApplicationTheme) -> HRESULT, + fn put_RequestedTheme(&mut self, value: ApplicationTheme) -> HRESULT, + fn add_UnhandledException(&mut self, value: *mut UnhandledExceptionEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_UnhandledException(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Suspending(&mut self, value: *mut SuspendingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Suspending(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Resuming(&mut self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Resuming(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn Exit(&mut self) -> HRESULT + }} + impl IApplication { + #[inline] pub unsafe fn get_resources(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Resources)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_resources(&mut self, value: &ResourceDictionary) -> Result<()> { + let hr = ((*self.lpVtbl).put_Resources)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_debug_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DebugSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_requested_theme(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequestedTheme)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_requested_theme(&mut self, value: ApplicationTheme) -> Result<()> { + let hr = ((*self.lpVtbl).put_RequestedTheme)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_unhandled_exception(&mut self, value: &UnhandledExceptionEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_UnhandledException)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_unhandled_exception(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_UnhandledException)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_suspending(&mut self, value: &SuspendingEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Suspending)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_suspending(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Suspending)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_resuming(&mut self, value: &super::super::foundation::EventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Resuming)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_resuming(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Resuming)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn exit(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Exit)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationOverrides, 637116407, 37703, 17818, 159, 172, 178, 208, 225, 28, 26, 15); + RT_INTERFACE!{interface IApplicationOverrides(IApplicationOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationOverrides] { + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn OnActivated(&mut self, args: *mut super::super::applicationmodel::activation::IActivatedEventArgs) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn OnLaunched(&mut self, args: *mut super::super::applicationmodel::activation::LaunchActivatedEventArgs) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy2(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn OnFileActivated(&mut self, args: *mut super::super::applicationmodel::activation::FileActivatedEventArgs) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy3(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn OnSearchActivated(&mut self, args: *mut super::super::applicationmodel::activation::SearchActivatedEventArgs) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn OnShareTargetActivated(&mut self, args: *mut super::super::applicationmodel::activation::ShareTargetActivatedEventArgs) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn OnFileOpenPickerActivated(&mut self, args: *mut super::super::applicationmodel::activation::FileOpenPickerActivatedEventArgs) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn OnFileSavePickerActivated(&mut self, args: *mut super::super::applicationmodel::activation::FileSavePickerActivatedEventArgs) -> HRESULT, + #[cfg(not(feature="windows.applicationmodel"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.applicationmodel")] fn OnCachedFileUpdaterActivated(&mut self, args: *mut super::super::applicationmodel::activation::CachedFileUpdaterActivatedEventArgs) -> HRESULT, + fn OnWindowCreated(&mut self, args: *mut WindowCreatedEventArgs) -> HRESULT + }} + impl IApplicationOverrides { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn on_activated(&mut self, args: &super::super::applicationmodel::activation::IActivatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).OnActivated)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn on_launched(&mut self, args: &super::super::applicationmodel::activation::LaunchActivatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).OnLaunched)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn on_file_activated(&mut self, args: &super::super::applicationmodel::activation::FileActivatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).OnFileActivated)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn on_search_activated(&mut self, args: &super::super::applicationmodel::activation::SearchActivatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).OnSearchActivated)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn on_share_target_activated(&mut self, args: &super::super::applicationmodel::activation::ShareTargetActivatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).OnShareTargetActivated)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn on_file_open_picker_activated(&mut self, args: &super::super::applicationmodel::activation::FileOpenPickerActivatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).OnFileOpenPickerActivated)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn on_file_save_picker_activated(&mut self, args: &super::super::applicationmodel::activation::FileSavePickerActivatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).OnFileSavePickerActivated)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn on_cached_file_updater_activated(&mut self, args: &super::super::applicationmodel::activation::CachedFileUpdaterActivatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).OnCachedFileUpdaterActivated)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_window_created(&mut self, args: &WindowCreatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).OnWindowCreated)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationStatics, 105486743, 63412, 17918, 183, 99, 117, 119, 209, 211, 203, 74); + RT_INTERFACE!{static interface IApplicationStatics(IApplicationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationStatics] { + fn get_Current(&mut self, out: *mut *mut Application) -> HRESULT, + fn Start(&mut self, callback: *mut ApplicationInitializationCallback) -> HRESULT, + fn LoadComponent(&mut self, component: *mut IInspectable, resourceLocator: *mut super::super::foundation::Uri) -> HRESULT, + fn LoadComponentWithResourceLocation(&mut self, component: *mut IInspectable, resourceLocator: *mut super::super::foundation::Uri, componentResourceLocation: controls::primitives::ComponentResourceLocation) -> HRESULT + }} + impl IApplicationStatics { + #[inline] pub unsafe fn get_current(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Current)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start(&mut self, callback: &ApplicationInitializationCallback) -> Result<()> { + let hr = ((*self.lpVtbl).Start)(self, callback as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn load_component(&mut self, component: &IInspectable, resourceLocator: &super::super::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).LoadComponent)(self, component as *const _ as *mut _, resourceLocator as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn load_component_with_resource_location(&mut self, component: &IInspectable, resourceLocator: &super::super::foundation::Uri, componentResourceLocation: controls::primitives::ComponentResourceLocation) -> Result<()> { + let hr = ((*self.lpVtbl).LoadComponentWithResourceLocation)(self, component as *const _ as *mut _, resourceLocator as *const _ as *mut _, componentResourceLocation); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Application: IApplication} + RT_ACTIVATABLE!{IApplicationStatics [CLSID_Application]} + DEFINE_CLSID!(CLSID_Application = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,65,112,112,108,105,99,97,116,105,111,110,0]); + DEFINE_IID!(IID_IApplicationFactory, 2478564193, 48730, 20195, 180, 163, 149, 17, 141, 201, 122, 137); + RT_INTERFACE!{interface IApplicationFactory(IApplicationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut Application) -> HRESULT + }} + impl IApplicationFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplication2, 26281150, 21034, 22788, 245, 47, 222, 114, 1, 4, 41, 224); + RT_INTERFACE!{interface IApplication2(IApplication2Vtbl): IInspectable(IInspectableVtbl) [IID_IApplication2] { + fn get_FocusVisualKind(&mut self, out: *mut FocusVisualKind) -> HRESULT, + fn put_FocusVisualKind(&mut self, value: FocusVisualKind) -> HRESULT, + fn get_RequiresPointerMode(&mut self, out: *mut ApplicationRequiresPointerMode) -> HRESULT, + fn put_RequiresPointerMode(&mut self, value: ApplicationRequiresPointerMode) -> HRESULT, + fn add_LeavingBackground(&mut self, value: *mut LeavingBackgroundEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_LeavingBackground(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnteredBackground(&mut self, value: *mut EnteredBackgroundEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnteredBackground(&mut self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + }} + impl IApplication2 { + #[inline] pub unsafe fn get_focus_visual_kind(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FocusVisualKind)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_focus_visual_kind(&mut self, value: FocusVisualKind) -> Result<()> { + let hr = ((*self.lpVtbl).put_FocusVisualKind)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_requires_pointer_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_RequiresPointerMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_requires_pointer_mode(&mut self, value: ApplicationRequiresPointerMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_RequiresPointerMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_leaving_background(&mut self, value: &LeavingBackgroundEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_LeavingBackground)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_leaving_background(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_LeavingBackground)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_entered_background(&mut self, value: &EnteredBackgroundEventHandler) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_EnteredBackground)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_entered_background(&mut self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_EnteredBackground)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IApplicationOverrides2, 3680293561, 54196, 21900, 198, 78, 4, 52, 253, 27, 216, 137); + RT_INTERFACE!{interface IApplicationOverrides2(IApplicationOverrides2Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationOverrides2] { + #[cfg(feature="windows.applicationmodel")] fn OnBackgroundActivated(&mut self, args: *mut super::super::applicationmodel::activation::BackgroundActivatedEventArgs) -> HRESULT + }} + impl IApplicationOverrides2 { + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn on_background_activated(&mut self, args: &super::super::applicationmodel::activation::BackgroundActivatedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).OnBackgroundActivated)(self, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IFrameworkViewSource, 3819993050, 13741, 19209, 181, 178, 39, 66, 0, 65, 186, 159); + RT_INTERFACE!{interface IFrameworkViewSource(IFrameworkViewSourceVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkViewSource] { + + }} + RT_CLASS!{class FrameworkViewSource: IFrameworkViewSource} + DEFINE_IID!(IID_IPointHelper, 1920720274, 25776, 18895, 163, 33, 169, 121, 62, 115, 226, 231); + RT_INTERFACE!{interface IPointHelper(IPointHelperVtbl): IInspectable(IInspectableVtbl) [IID_IPointHelper] { + + }} + DEFINE_IID!(IID_IPointHelperStatics, 22727285, 30424, 19326, 138, 51, 125, 121, 32, 70, 145, 238); + RT_INTERFACE!{static interface IPointHelperStatics(IPointHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPointHelperStatics] { + fn FromCoordinates(&mut self, x: f32, y: f32, out: *mut super::super::foundation::Point) -> HRESULT + }} + impl IPointHelperStatics { + #[inline] pub unsafe fn from_coordinates(&mut self, x: f32, y: f32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromCoordinates)(self, x, y, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class PointHelper: IPointHelper} + RT_ACTIVATABLE!{IPointHelperStatics [CLSID_PointHelper]} + DEFINE_CLSID!(CLSID_PointHelper = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,80,111,105,110,116,72,101,108,112,101,114,0]); + DEFINE_IID!(IID_IRectHelper, 2743566818, 19451, 20194, 175, 229, 137, 243, 27, 55, 71, 141); + RT_INTERFACE!{interface IRectHelper(IRectHelperVtbl): IInspectable(IInspectableVtbl) [IID_IRectHelper] { + + }} + DEFINE_IID!(IID_IRectHelperStatics, 1591829476, 49534, 18767, 181, 128, 47, 5, 116, 252, 58, 21); + RT_INTERFACE!{static interface IRectHelperStatics(IRectHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRectHelperStatics] { + fn get_Empty(&mut self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn FromCoordinatesAndDimensions(&mut self, x: f32, y: f32, width: f32, height: f32, out: *mut super::super::foundation::Rect) -> HRESULT, + fn FromPoints(&mut self, point1: super::super::foundation::Point, point2: super::super::foundation::Point, out: *mut super::super::foundation::Rect) -> HRESULT, + fn FromLocationAndSize(&mut self, location: super::super::foundation::Point, size: super::super::foundation::Size, out: *mut super::super::foundation::Rect) -> HRESULT, + fn GetIsEmpty(&mut self, target: super::super::foundation::Rect, out: *mut bool) -> HRESULT, + fn GetBottom(&mut self, target: super::super::foundation::Rect, out: *mut f32) -> HRESULT, + fn GetLeft(&mut self, target: super::super::foundation::Rect, out: *mut f32) -> HRESULT, + fn GetRight(&mut self, target: super::super::foundation::Rect, out: *mut f32) -> HRESULT, + fn GetTop(&mut self, target: super::super::foundation::Rect, out: *mut f32) -> HRESULT, + fn Contains(&mut self, target: super::super::foundation::Rect, point: super::super::foundation::Point, out: *mut bool) -> HRESULT, + fn Equals(&mut self, target: super::super::foundation::Rect, value: super::super::foundation::Rect, out: *mut bool) -> HRESULT, + fn Intersect(&mut self, target: super::super::foundation::Rect, rect: super::super::foundation::Rect, out: *mut super::super::foundation::Rect) -> HRESULT, + fn UnionWithPoint(&mut self, target: super::super::foundation::Rect, point: super::super::foundation::Point, out: *mut super::super::foundation::Rect) -> HRESULT, + fn UnionWithRect(&mut self, target: super::super::foundation::Rect, rect: super::super::foundation::Rect, out: *mut super::super::foundation::Rect) -> HRESULT + }} + impl IRectHelperStatics { + #[inline] pub unsafe fn get_empty(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Empty)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn from_coordinates_and_dimensions(&mut self, x: f32, y: f32, width: f32, height: f32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromCoordinatesAndDimensions)(self, x, y, width, height, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn from_points(&mut self, point1: super::super::foundation::Point, point2: super::super::foundation::Point) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromPoints)(self, point1, point2, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn from_location_and_size(&mut self, location: super::super::foundation::Point, size: super::super::foundation::Size) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromLocationAndSize)(self, location, size, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_empty(&mut self, target: super::super::foundation::Rect) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetIsEmpty)(self, target, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_bottom(&mut self, target: super::super::foundation::Rect) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetBottom)(self, target, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_left(&mut self, target: super::super::foundation::Rect) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetLeft)(self, target, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_right(&mut self, target: super::super::foundation::Rect) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetRight)(self, target, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_top(&mut self, target: super::super::foundation::Rect) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetTop)(self, target, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn contains(&mut self, target: super::super::foundation::Rect, point: super::super::foundation::Point) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Contains)(self, target, point, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn equals(&mut self, target: super::super::foundation::Rect, value: super::super::foundation::Rect) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Equals)(self, target, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn intersect(&mut self, target: super::super::foundation::Rect, rect: super::super::foundation::Rect) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Intersect)(self, target, rect, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn union_with_point(&mut self, target: super::super::foundation::Rect, point: super::super::foundation::Point) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).UnionWithPoint)(self, target, point, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn union_with_rect(&mut self, target: super::super::foundation::Rect, rect: super::super::foundation::Rect) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).UnionWithRect)(self, target, rect, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class RectHelper: IRectHelper} + RT_ACTIVATABLE!{IRectHelperStatics [CLSID_RectHelper]} + DEFINE_CLSID!(CLSID_RectHelper = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,82,101,99,116,72,101,108,112,101,114,0]); + DEFINE_IID!(IID_ISizeHelper, 3877788308, 23811, 18947, 186, 148, 150, 127, 198, 143, 206, 254); + RT_INTERFACE!{interface ISizeHelper(ISizeHelperVtbl): IInspectable(IInspectableVtbl) [IID_ISizeHelper] { + + }} + DEFINE_IID!(IID_ISizeHelperStatics, 1652999602, 53112, 18709, 170, 64, 118, 0, 74, 22, 95, 94); + RT_INTERFACE!{static interface ISizeHelperStatics(ISizeHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISizeHelperStatics] { + fn get_Empty(&mut self, out: *mut super::super::foundation::Size) -> HRESULT, + fn FromDimensions(&mut self, width: f32, height: f32, out: *mut super::super::foundation::Size) -> HRESULT, + fn GetIsEmpty(&mut self, target: super::super::foundation::Size, out: *mut bool) -> HRESULT, + fn Equals(&mut self, target: super::super::foundation::Size, value: super::super::foundation::Size, out: *mut bool) -> HRESULT + }} + impl ISizeHelperStatics { + #[inline] pub unsafe fn get_empty(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Empty)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn from_dimensions(&mut self, width: f32, height: f32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).FromDimensions)(self, width, height, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_empty(&mut self, target: super::super::foundation::Size) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetIsEmpty)(self, target, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn equals(&mut self, target: super::super::foundation::Size, value: super::super::foundation::Size) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Equals)(self, target, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class SizeHelper: ISizeHelper} + RT_ACTIVATABLE!{ISizeHelperStatics [CLSID_SizeHelper]} + DEFINE_CLSID!(CLSID_SizeHelper = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,83,105,122,101,72,101,108,112,101,114,0]); +pub mod documents { // Windows.UI.Xaml.Documents +use ::prelude::*; + RT_ENUM! { enum LogicalDirection: i32 { + Backward (LogicalDirection_Backward) = 0, Forward (LogicalDirection_Forward) = 1, + }} + RT_ENUM! { enum UnderlineStyle: i32 { + None (UnderlineStyle_None) = 0, Single (UnderlineStyle_Single) = 1, + }} + RT_CLASS!{class BlockCollection: ::rt::gen::windows::foundation::collections::IVector} + RT_CLASS!{class InlineCollection: ::rt::gen::windows::foundation::collections::IVector} + DEFINE_IID!(IID_ITextPointer, 2892528289, 27201, 17407, 133, 30, 69, 52, 138, 162, 207, 123); + RT_INTERFACE!{interface ITextPointer(ITextPointerVtbl): IInspectable(IInspectableVtbl) [IID_ITextPointer] { + fn get_Parent(&mut self, out: *mut *mut super::DependencyObject) -> HRESULT, + fn get_VisualParent(&mut self, out: *mut *mut super::FrameworkElement) -> HRESULT, + fn get_LogicalDirection(&mut self, out: *mut LogicalDirection) -> HRESULT, + fn get_Offset(&mut self, out: *mut i32) -> HRESULT, + fn GetCharacterRect(&mut self, direction: LogicalDirection, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn GetPositionAtOffset(&mut self, offset: i32, direction: LogicalDirection, out: *mut *mut TextPointer) -> HRESULT + }} + impl ITextPointer { + #[inline] pub unsafe fn get_parent(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Parent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_visual_parent(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VisualParent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_logical_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LogicalDirection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Offset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_rect(&mut self, direction: LogicalDirection) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCharacterRect)(self, direction, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_at_offset(&mut self, offset: i32, direction: LogicalDirection) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPositionAtOffset)(self, offset, direction, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TextPointer: ITextPointer} + DEFINE_IID!(IID_ITypography, 2255447509, 60055, 17067, 146, 136, 156, 1, 174, 188, 122, 151); + RT_INTERFACE!{interface ITypography(ITypographyVtbl): IInspectable(IInspectableVtbl) [IID_ITypography] { + + }} + DEFINE_IID!(IID_ITypographyStatics, 1740237960, 27735, 19680, 149, 241, 212, 185, 237, 99, 47, 180); + RT_INTERFACE!{static interface ITypographyStatics(ITypographyStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ITypographyStatics] { + fn get_AnnotationAlternatesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAnnotationAlternates(&mut self, element: *mut super::DependencyObject, out: *mut i32) -> HRESULT, + fn SetAnnotationAlternates(&mut self, element: *mut super::DependencyObject, value: i32) -> HRESULT, + fn get_EastAsianExpertFormsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetEastAsianExpertForms(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetEastAsianExpertForms(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_EastAsianLanguageProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetEastAsianLanguage(&mut self, element: *mut super::DependencyObject, out: *mut super::FontEastAsianLanguage) -> HRESULT, + fn SetEastAsianLanguage(&mut self, element: *mut super::DependencyObject, value: super::FontEastAsianLanguage) -> HRESULT, + fn get_EastAsianWidthsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetEastAsianWidths(&mut self, element: *mut super::DependencyObject, out: *mut super::FontEastAsianWidths) -> HRESULT, + fn SetEastAsianWidths(&mut self, element: *mut super::DependencyObject, value: super::FontEastAsianWidths) -> HRESULT, + fn get_StandardLigaturesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStandardLigatures(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStandardLigatures(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_ContextualLigaturesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetContextualLigatures(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetContextualLigatures(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_DiscretionaryLigaturesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetDiscretionaryLigatures(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetDiscretionaryLigatures(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_HistoricalLigaturesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetHistoricalLigatures(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetHistoricalLigatures(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StandardSwashesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStandardSwashes(&mut self, element: *mut super::DependencyObject, out: *mut i32) -> HRESULT, + fn SetStandardSwashes(&mut self, element: *mut super::DependencyObject, value: i32) -> HRESULT, + fn get_ContextualSwashesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetContextualSwashes(&mut self, element: *mut super::DependencyObject, out: *mut i32) -> HRESULT, + fn SetContextualSwashes(&mut self, element: *mut super::DependencyObject, value: i32) -> HRESULT, + fn get_ContextualAlternatesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetContextualAlternates(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetContextualAlternates(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticAlternatesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticAlternates(&mut self, element: *mut super::DependencyObject, out: *mut i32) -> HRESULT, + fn SetStylisticAlternates(&mut self, element: *mut super::DependencyObject, value: i32) -> HRESULT, + fn get_StylisticSet1Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet1(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet1(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet2Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet2(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet2(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet3Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet3(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet3(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet4Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet4(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet4(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet5Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet5(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet5(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet6Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet6(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet6(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet7Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet7(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet7(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet8Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet8(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet8(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet9Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet9(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet9(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet10Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet10(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet10(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet11Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet11(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet11(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet12Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet12(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet12(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet13Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet13(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet13(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet14Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet14(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet14(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet15Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet15(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet15(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet16Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet16(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet16(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet17Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet17(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet17(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet18Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet18(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet18(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet19Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet19(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet19(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_StylisticSet20Property(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetStylisticSet20(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetStylisticSet20(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_CapitalsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetCapitals(&mut self, element: *mut super::DependencyObject, out: *mut super::FontCapitals) -> HRESULT, + fn SetCapitals(&mut self, element: *mut super::DependencyObject, value: super::FontCapitals) -> HRESULT, + fn get_CapitalSpacingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetCapitalSpacing(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetCapitalSpacing(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_KerningProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetKerning(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetKerning(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_CaseSensitiveFormsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetCaseSensitiveForms(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetCaseSensitiveForms(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_HistoricalFormsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetHistoricalForms(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetHistoricalForms(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_FractionProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetFraction(&mut self, element: *mut super::DependencyObject, out: *mut super::FontFraction) -> HRESULT, + fn SetFraction(&mut self, element: *mut super::DependencyObject, value: super::FontFraction) -> HRESULT, + fn get_NumeralStyleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetNumeralStyle(&mut self, element: *mut super::DependencyObject, out: *mut super::FontNumeralStyle) -> HRESULT, + fn SetNumeralStyle(&mut self, element: *mut super::DependencyObject, value: super::FontNumeralStyle) -> HRESULT, + fn get_NumeralAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetNumeralAlignment(&mut self, element: *mut super::DependencyObject, out: *mut super::FontNumeralAlignment) -> HRESULT, + fn SetNumeralAlignment(&mut self, element: *mut super::DependencyObject, value: super::FontNumeralAlignment) -> HRESULT, + fn get_SlashedZeroProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetSlashedZero(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetSlashedZero(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_MathematicalGreekProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetMathematicalGreek(&mut self, element: *mut super::DependencyObject, out: *mut bool) -> HRESULT, + fn SetMathematicalGreek(&mut self, element: *mut super::DependencyObject, value: bool) -> HRESULT, + fn get_VariantsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetVariants(&mut self, element: *mut super::DependencyObject, out: *mut super::FontVariants) -> HRESULT, + fn SetVariants(&mut self, element: *mut super::DependencyObject, value: super::FontVariants) -> HRESULT + }} + impl ITypographyStatics { + #[inline] pub unsafe fn get_annotation_alternates_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AnnotationAlternatesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_annotation_alternates(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetAnnotationAlternates)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_annotation_alternates(&mut self, element: &super::DependencyObject, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetAnnotationAlternates)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_east_asian_expert_forms_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EastAsianExpertFormsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_east_asian_expert_forms(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetEastAsianExpertForms)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_east_asian_expert_forms(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetEastAsianExpertForms)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_east_asian_language_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EastAsianLanguageProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_east_asian_language(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetEastAsianLanguage)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_east_asian_language(&mut self, element: &super::DependencyObject, value: super::FontEastAsianLanguage) -> Result<()> { + let hr = ((*self.lpVtbl).SetEastAsianLanguage)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_east_asian_widths_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_EastAsianWidthsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_east_asian_widths(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetEastAsianWidths)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_east_asian_widths(&mut self, element: &super::DependencyObject, value: super::FontEastAsianWidths) -> Result<()> { + let hr = ((*self.lpVtbl).SetEastAsianWidths)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_standard_ligatures_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StandardLigaturesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_standard_ligatures(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStandardLigatures)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_standard_ligatures(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStandardLigatures)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_contextual_ligatures_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContextualLigaturesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_contextual_ligatures(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetContextualLigatures)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_contextual_ligatures(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetContextualLigatures)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_discretionary_ligatures_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DiscretionaryLigaturesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_discretionary_ligatures(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetDiscretionaryLigatures)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_discretionary_ligatures(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetDiscretionaryLigatures)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_historical_ligatures_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HistoricalLigaturesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_historical_ligatures(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetHistoricalLigatures)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_historical_ligatures(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetHistoricalLigatures)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_standard_swashes_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StandardSwashesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_standard_swashes(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStandardSwashes)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_standard_swashes(&mut self, element: &super::DependencyObject, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetStandardSwashes)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_contextual_swashes_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContextualSwashesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_contextual_swashes(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetContextualSwashes)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_contextual_swashes(&mut self, element: &super::DependencyObject, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetContextualSwashes)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_contextual_alternates_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContextualAlternatesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_contextual_alternates(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetContextualAlternates)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_contextual_alternates(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetContextualAlternates)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_alternates_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticAlternatesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_alternates(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticAlternates)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_alternates(&mut self, element: &super::DependencyObject, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticAlternates)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set1_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet1Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set1(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet1)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set1(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet1)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set2_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet2Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set2(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet2)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set2(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet2)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set3_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet3Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set3(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet3)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set3(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet3)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set4_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet4Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set4(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet4)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set4(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet4)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set5_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet5Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set5(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet5)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set5(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet5)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set6_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet6Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set6(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet6)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set6(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet6)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set7_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet7Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set7(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet7)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set7(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet7)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set8_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet8Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set8(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet8)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set8(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet8)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set9_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet9Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set9(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet9)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set9(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet9)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set10_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet10Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set10(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet10)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set10(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet10)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set11_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet11Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set11(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet11)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set11(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet11)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set12_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet12Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set12(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet12)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set12(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet12)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set13_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet13Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set13(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet13)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set13(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet13)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set14_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet14Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set14(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet14)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set14(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet14)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set15_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet15Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set15(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet15)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set15(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet15)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set16_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet16Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set16(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet16)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set16(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet16)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set17_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet17Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set17(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet17)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set17(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet17)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set18_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet18Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set18(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet18)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set18(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet18)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set19_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet19Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set19(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet19)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set19(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet19)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set20_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StylisticSet20Property)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stylistic_set20(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetStylisticSet20)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stylistic_set20(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetStylisticSet20)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_capitals_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CapitalsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capitals(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCapitals)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_capitals(&mut self, element: &super::DependencyObject, value: super::FontCapitals) -> Result<()> { + let hr = ((*self.lpVtbl).SetCapitals)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_capital_spacing_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CapitalSpacingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_capital_spacing(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCapitalSpacing)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_capital_spacing(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetCapitalSpacing)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_kerning_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_KerningProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_kerning(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetKerning)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_kerning(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetKerning)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_case_sensitive_forms_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CaseSensitiveFormsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_case_sensitive_forms(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetCaseSensitiveForms)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_case_sensitive_forms(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetCaseSensitiveForms)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_historical_forms_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HistoricalFormsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_historical_forms(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetHistoricalForms)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_historical_forms(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetHistoricalForms)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_fraction_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FractionProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_fraction(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetFraction)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_fraction(&mut self, element: &super::DependencyObject, value: super::FontFraction) -> Result<()> { + let hr = ((*self.lpVtbl).SetFraction)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeral_style_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NumeralStyleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeral_style(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetNumeralStyle)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_numeral_style(&mut self, element: &super::DependencyObject, value: super::FontNumeralStyle) -> Result<()> { + let hr = ((*self.lpVtbl).SetNumeralStyle)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeral_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NumeralAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_numeral_alignment(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetNumeralAlignment)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_numeral_alignment(&mut self, element: &super::DependencyObject, value: super::FontNumeralAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).SetNumeralAlignment)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_slashed_zero_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SlashedZeroProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_slashed_zero(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetSlashedZero)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_slashed_zero(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetSlashedZero)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_mathematical_greek_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MathematicalGreekProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_mathematical_greek(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetMathematicalGreek)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_mathematical_greek(&mut self, element: &super::DependencyObject, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetMathematicalGreek)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_variants_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VariantsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_variants(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetVariants)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_variants(&mut self, element: &super::DependencyObject, value: super::FontVariants) -> Result<()> { + let hr = ((*self.lpVtbl).SetVariants)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class Typography: ITypography} + RT_ACTIVATABLE!{ITypographyStatics [CLSID_Typography]} + DEFINE_CLSID!(CLSID_Typography = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,68,111,99,117,109,101,110,116,115,46,84,121,112,111,103,114,97,112,104,121,0]); + DEFINE_IID!(IID_ITextElement, 3896180834, 55158, 20370, 186, 234, 64, 231, 125, 71, 145, 213); + RT_INTERFACE!{interface ITextElement(ITextElementVtbl): IInspectable(IInspectableVtbl) [IID_ITextElement] { + fn get_Name(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_FontSize(&mut self, out: *mut f64) -> HRESULT, + fn put_FontSize(&mut self, value: f64) -> HRESULT, + fn get_FontFamily(&mut self, out: *mut *mut super::media::FontFamily) -> HRESULT, + fn put_FontFamily(&mut self, value: *mut super::media::FontFamily) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontWeight(&mut self, out: *mut super::super::text::FontWeight) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontWeight(&mut self, value: super::super::text::FontWeight) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontStyle(&mut self, out: *mut super::super::text::FontStyle) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontStyle(&mut self, value: super::super::text::FontStyle) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontStretch(&mut self, out: *mut super::super::text::FontStretch) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy10(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontStretch(&mut self, value: super::super::text::FontStretch) -> HRESULT, + fn get_CharacterSpacing(&mut self, out: *mut i32) -> HRESULT, + fn put_CharacterSpacing(&mut self, value: i32) -> HRESULT, + fn get_Foreground(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_Foreground(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_Language(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Language(&mut self, value: HSTRING) -> HRESULT, + fn get_ContentStart(&mut self, out: *mut *mut TextPointer) -> HRESULT, + fn get_ContentEnd(&mut self, out: *mut *mut TextPointer) -> HRESULT, + fn get_ElementStart(&mut self, out: *mut *mut TextPointer) -> HRESULT, + fn get_ElementEnd(&mut self, out: *mut *mut TextPointer) -> HRESULT, + fn FindName(&mut self, name: HSTRING, out: *mut *mut IInspectable) -> HRESULT + }} + impl ITextElement { + #[inline] pub unsafe fn get_name(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Name)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_size(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_family(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontFamily)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_family(&mut self, value: &super::media::FontFamily) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontFamily)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_weight(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontWeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_weight(&mut self, value: super::super::text::FontWeight) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontWeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_style(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStyle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_style(&mut self, value: super::super::text::FontStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontStyle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_stretch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStretch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_stretch(&mut self, value: super::super::text::FontStretch) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontStretch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_spacing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharacterSpacing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_character_spacing(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CharacterSpacing)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Foreground)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_foreground(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Foreground)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_language(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Language)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_language(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Language)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_start(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentStart)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_end(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentEnd)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_element_start(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ElementStart)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_element_end(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ElementEnd)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn find_name(&mut self, name: &HStringArg) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).FindName)(self, name.get(), &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextElementOverrides, 216145639, 20342, 19929, 191, 145, 22, 59, 236, 207, 132, 188); + RT_INTERFACE!{interface ITextElementOverrides(ITextElementOverridesVtbl): IInspectable(IInspectableVtbl) [IID_ITextElementOverrides] { + fn OnDisconnectVisualChildren(&mut self) -> HRESULT + }} + impl ITextElementOverrides { + #[inline] pub unsafe fn on_disconnect_visual_children(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).OnDisconnectVisualChildren)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextElementStatics, 170892184, 27651, 17520, 167, 155, 50, 152, 161, 4, 130, 206); + RT_INTERFACE!{static interface ITextElementStatics(ITextElementStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ITextElementStatics] { + fn get_FontSizeProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontFamilyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontWeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontStyleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontStretchProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_CharacterSpacingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ForegroundProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_LanguageProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ITextElementStatics { + #[inline] pub unsafe fn get_font_size_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontSizeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_family_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontFamilyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_weight_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontWeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_style_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontStyleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_stretch_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontStretchProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_spacing_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CharacterSpacingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ForegroundProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_language_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LanguageProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextElementFactory, 889221765, 53063, 19454, 177, 188, 57, 201, 58, 244, 174, 128); + RT_INTERFACE!{interface ITextElementFactory(ITextElementFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITextElementFactory] { + + }} + DEFINE_IID!(IID_ITextElement2, 2819058344, 63634, 18934, 140, 210, 137, 173, 218, 240, 109, 45); + RT_INTERFACE!{interface ITextElement2(ITextElement2Vtbl): IInspectable(IInspectableVtbl) [IID_ITextElement2] { + fn get_IsTextScaleFactorEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsTextScaleFactorEnabled(&mut self, value: bool) -> HRESULT + }} + impl ITextElement2 { + #[inline] pub unsafe fn get_is_text_scale_factor_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTextScaleFactorEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_text_scale_factor_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTextScaleFactorEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextElementStatics2, 373462962, 38955, 18913, 140, 3, 202, 67, 188, 77, 91, 109); + RT_INTERFACE!{static interface ITextElementStatics2(ITextElementStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ITextElementStatics2] { + fn get_IsTextScaleFactorEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ITextElementStatics2 { + #[inline] pub unsafe fn get_is_text_scale_factor_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsTextScaleFactorEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextElement3, 3520803855, 7108, 19624, 188, 247, 119, 11, 255, 155, 39, 171); + RT_INTERFACE!{interface ITextElement3(ITextElement3Vtbl): IInspectable(IInspectableVtbl) [IID_ITextElement3] { + fn get_AllowFocusOnInteraction(&mut self, out: *mut bool) -> HRESULT, + fn put_AllowFocusOnInteraction(&mut self, value: bool) -> HRESULT, + fn get_AccessKey(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_AccessKey(&mut self, value: HSTRING) -> HRESULT, + fn get_ExitDisplayModeOnAccessKeyInvoked(&mut self, out: *mut bool) -> HRESULT, + fn put_ExitDisplayModeOnAccessKeyInvoked(&mut self, value: bool) -> HRESULT + }} + impl ITextElement3 { + #[inline] pub unsafe fn get_allow_focus_on_interaction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AllowFocusOnInteraction)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_allow_focus_on_interaction(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AllowFocusOnInteraction)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_access_key(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccessKey)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_access_key(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_AccessKey)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_exit_display_mode_on_access_key_invoked(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ExitDisplayModeOnAccessKeyInvoked)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_exit_display_mode_on_access_key_invoked(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ExitDisplayModeOnAccessKeyInvoked)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextElementStatics3, 3488599983, 4001, 17900, 154, 78, 155, 51, 102, 77, 200, 177); + RT_INTERFACE!{static interface ITextElementStatics3(ITextElementStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_ITextElementStatics3] { + fn get_AllowFocusOnInteractionProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_AccessKeyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ExitDisplayModeOnAccessKeyInvokedProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ITextElementStatics3 { + #[inline] pub unsafe fn get_allow_focus_on_interaction_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AllowFocusOnInteractionProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_access_key_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AccessKeyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_exit_display_mode_on_access_key_invoked_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ExitDisplayModeOnAccessKeyInvokedProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBlock, 1271791638, 56647, 17232, 140, 176, 225, 113, 96, 10, 200, 150); + RT_INTERFACE!{interface IBlock(IBlockVtbl): IInspectable(IInspectableVtbl) [IID_IBlock] { + fn get_TextAlignment(&mut self, out: *mut super::TextAlignment) -> HRESULT, + fn put_TextAlignment(&mut self, value: super::TextAlignment) -> HRESULT, + fn get_LineHeight(&mut self, out: *mut f64) -> HRESULT, + fn put_LineHeight(&mut self, value: f64) -> HRESULT, + fn get_LineStackingStrategy(&mut self, out: *mut super::LineStackingStrategy) -> HRESULT, + fn put_LineStackingStrategy(&mut self, value: super::LineStackingStrategy) -> HRESULT, + fn get_Margin(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_Margin(&mut self, value: super::Thickness) -> HRESULT + }} + impl IBlock { + #[inline] pub unsafe fn get_text_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_alignment(&mut self, value: super::TextAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_height(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_stacking_strategy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineStackingStrategy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_stacking_strategy(&mut self, value: super::LineStackingStrategy) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineStackingStrategy)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_margin(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Margin)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_margin(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_Margin)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBlockStatics, 4167732276, 36120, 19539, 174, 189, 145, 230, 16, 165, 224, 16); + RT_INTERFACE!{static interface IBlockStatics(IBlockStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBlockStatics] { + fn get_TextAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_LineHeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_LineStackingStrategyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_MarginProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IBlockStatics { + #[inline] pub unsafe fn get_text_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LineHeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_stacking_strategy_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LineStackingStrategyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_margin_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MarginProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBlockFactory, 118555954, 20313, 20283, 156, 229, 37, 120, 76, 67, 5, 7); + RT_INTERFACE!{interface IBlockFactory(IBlockFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBlockFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut Block) -> HRESULT + }} + impl IBlockFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInline, 210923821, 7113, 18737, 140, 177, 26, 234, 223, 28, 198, 133); + RT_INTERFACE!{interface IInline(IInlineVtbl): IInspectable(IInspectableVtbl) [IID_IInline] { + + }} + DEFINE_IID!(IID_IInlineFactory, 1079553233, 12176, 19343, 153, 221, 66, 24, 239, 95, 3, 222); + RT_INTERFACE!{interface IInlineFactory(IInlineFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IInlineFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut Inline) -> HRESULT + }} + impl IInlineFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IInlineUIContainer, 337038977, 10478, 17710, 177, 33, 95, 196, 246, 11, 134, 166); + RT_INTERFACE!{interface IInlineUIContainer(IInlineUIContainerVtbl): IInspectable(IInspectableVtbl) [IID_IInlineUIContainer] { + fn get_Child(&mut self, out: *mut *mut super::UIElement) -> HRESULT, + fn put_Child(&mut self, value: *mut super::UIElement) -> HRESULT + }} + impl IInlineUIContainer { + #[inline] pub unsafe fn get_child(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Child)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_child(&mut self, value: &super::UIElement) -> Result<()> { + let hr = ((*self.lpVtbl).put_Child)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ILineBreak, 1683327428, 63337, 16877, 137, 91, 138, 27, 47, 179, 21, 98); + RT_INTERFACE!{interface ILineBreak(ILineBreakVtbl): IInspectable(IInspectableVtbl) [IID_ILineBreak] { + + }} + DEFINE_IID!(IID_IParagraph, 4164875674, 64097, 19439, 174, 51, 11, 10, 215, 86, 168, 77); + RT_INTERFACE!{interface IParagraph(IParagraphVtbl): IInspectable(IInspectableVtbl) [IID_IParagraph] { + fn get_Inlines(&mut self, out: *mut *mut InlineCollection) -> HRESULT, + fn get_TextIndent(&mut self, out: *mut f64) -> HRESULT, + fn put_TextIndent(&mut self, value: f64) -> HRESULT + }} + impl IParagraph { + #[inline] pub unsafe fn get_inlines(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Inlines)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_indent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextIndent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_indent(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextIndent)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IParagraphStatics, 4010313882, 21339, 20044, 141, 132, 40, 59, 51, 233, 138, 55); + RT_INTERFACE!{static interface IParagraphStatics(IParagraphStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IParagraphStatics] { + fn get_TextIndentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IParagraphStatics { + #[inline] pub unsafe fn get_text_indent_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextIndentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRun, 1498758275, 3604, 18877, 184, 75, 197, 38, 243, 3, 67, 73); + RT_INTERFACE!{interface IRun(IRunVtbl): IInspectable(IInspectableVtbl) [IID_IRun] { + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Text(&mut self, value: HSTRING) -> HRESULT, + fn get_FlowDirection(&mut self, out: *mut super::FlowDirection) -> HRESULT, + fn put_FlowDirection(&mut self, value: super::FlowDirection) -> HRESULT + }} + impl IRun { + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Text)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_flow_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FlowDirection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_flow_direction(&mut self, value: super::FlowDirection) -> Result<()> { + let hr = ((*self.lpVtbl).put_FlowDirection)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRunStatics, 3912252655, 26016, 19341, 167, 247, 143, 219, 40, 123, 70, 243); + RT_INTERFACE!{static interface IRunStatics(IRunStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRunStatics] { + fn get_FlowDirectionProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRunStatics { + #[inline] pub unsafe fn get_flow_direction_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FlowDirectionProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpan, 2553926825, 687, 18449, 170, 21, 107, 239, 58, 202, 201, 122); + RT_INTERFACE!{interface ISpan(ISpanVtbl): IInspectable(IInspectableVtbl) [IID_ISpan] { + fn get_Inlines(&mut self, out: *mut *mut InlineCollection) -> HRESULT, + fn put_Inlines(&mut self, value: *mut InlineCollection) -> HRESULT + }} + impl ISpan { + #[inline] pub unsafe fn get_inlines(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Inlines)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_inlines(&mut self, value: &InlineCollection) -> Result<()> { + let hr = ((*self.lpVtbl).put_Inlines)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISpanFactory, 1536257884, 52525, 16576, 149, 106, 56, 100, 72, 50, 47, 121); + RT_INTERFACE!{interface ISpanFactory(ISpanFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISpanFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut Span) -> HRESULT + }} + impl ISpanFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBold, 2917611396, 7001, 19876, 187, 35, 15, 32, 232, 133, 180, 191); + RT_INTERFACE!{interface IBold(IBoldVtbl): IInspectable(IInspectableVtbl) [IID_IBold] { + + }} + DEFINE_IID!(IID_IItalic, 2448712092, 64699, 16727, 128, 44, 118, 246, 59, 95, 182, 87); + RT_INTERFACE!{interface IItalic(IItalicVtbl): IInspectable(IInspectableVtbl) [IID_IItalic] { + + }} + DEFINE_IID!(IID_IUnderline, 2784657922, 25024, 18391, 147, 239, 188, 11, 87, 124, 95, 38); + RT_INTERFACE!{interface IUnderline(IUnderlineVtbl): IInspectable(IInspectableVtbl) [IID_IUnderline] { + + }} + DEFINE_IID!(IID_IHyperlinkClickEventArgs, 3344273771, 31708, 19431, 179, 115, 146, 64, 165, 3, 216, 112); + RT_INTERFACE!{interface IHyperlinkClickEventArgs(IHyperlinkClickEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IHyperlinkClickEventArgs] { + + }} + DEFINE_IID!(IID_IGlyphs, 3497609611, 62129, 17025, 153, 162, 228, 208, 89, 50, 178, 181); + RT_INTERFACE!{interface IGlyphs(IGlyphsVtbl): IInspectable(IInspectableVtbl) [IID_IGlyphs] { + fn get_UnicodeString(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_UnicodeString(&mut self, value: HSTRING) -> HRESULT, + fn get_Indices(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Indices(&mut self, value: HSTRING) -> HRESULT, + fn get_FontUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn put_FontUri(&mut self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_StyleSimulations(&mut self, out: *mut super::media::StyleSimulations) -> HRESULT, + fn put_StyleSimulations(&mut self, value: super::media::StyleSimulations) -> HRESULT, + fn get_FontRenderingEmSize(&mut self, out: *mut f64) -> HRESULT, + fn put_FontRenderingEmSize(&mut self, value: f64) -> HRESULT, + fn get_OriginX(&mut self, out: *mut f64) -> HRESULT, + fn put_OriginX(&mut self, value: f64) -> HRESULT, + fn get_OriginY(&mut self, out: *mut f64) -> HRESULT, + fn put_OriginY(&mut self, value: f64) -> HRESULT, + fn get_Fill(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_Fill(&mut self, value: *mut super::media::Brush) -> HRESULT + }} + impl IGlyphs { + #[inline] pub unsafe fn get_unicode_string(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UnicodeString)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_unicode_string(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_UnicodeString)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_indices(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Indices)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_indices(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Indices)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_uri(&mut self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_style_simulations(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StyleSimulations)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_style_simulations(&mut self, value: super::media::StyleSimulations) -> Result<()> { + let hr = ((*self.lpVtbl).put_StyleSimulations)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_rendering_em_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontRenderingEmSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_rendering_em_size(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontRenderingEmSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_origin_x(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OriginX)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_origin_x(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_OriginX)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_origin_y(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OriginY)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_origin_y(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_OriginY)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_fill(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Fill)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_fill(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Fill)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGlyphsStatics, 576517317, 65009, 17389, 149, 143, 65, 78, 134, 241, 3, 242); + RT_INTERFACE!{static interface IGlyphsStatics(IGlyphsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGlyphsStatics] { + fn get_UnicodeStringProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IndicesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontUriProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_StyleSimulationsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontRenderingEmSizeProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OriginXProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OriginYProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FillProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IGlyphsStatics { + #[inline] pub unsafe fn get_unicode_string_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UnicodeStringProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_indices_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IndicesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_uri_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontUriProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_style_simulations_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StyleSimulationsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_rendering_em_size_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontRenderingEmSizeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_origin_xproperty(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OriginXProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_origin_yproperty(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OriginYProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_fill_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FillProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGlyphs2, 2861301340, 14164, 19438, 187, 225, 68, 3, 238, 155, 134, 240); + RT_INTERFACE!{interface IGlyphs2(IGlyphs2Vtbl): IInspectable(IInspectableVtbl) [IID_IGlyphs2] { + fn get_IsColorFontEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsColorFontEnabled(&mut self, value: bool) -> HRESULT, + fn get_ColorFontPaletteIndex(&mut self, out: *mut i32) -> HRESULT, + fn put_ColorFontPaletteIndex(&mut self, value: i32) -> HRESULT + }} + impl IGlyphs2 { + #[inline] pub unsafe fn get_is_color_font_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsColorFontEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_color_font_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsColorFontEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_color_font_palette_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ColorFontPaletteIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_color_font_palette_index(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_ColorFontPaletteIndex)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGlyphsStatics2, 273193639, 5653, 18995, 170, 2, 215, 239, 42, 239, 199, 57); + RT_INTERFACE!{static interface IGlyphsStatics2(IGlyphsStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGlyphsStatics2] { + fn get_IsColorFontEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ColorFontPaletteIndexProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IGlyphsStatics2 { + #[inline] pub unsafe fn get_is_color_font_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsColorFontEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_color_font_palette_index_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ColorFontPaletteIndexProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHyperlink, 266483259, 5353, 16722, 158, 88, 90, 234, 91, 33, 240, 141); + RT_INTERFACE!{interface IHyperlink(IHyperlinkVtbl): IInspectable(IInspectableVtbl) [IID_IHyperlink] { + fn get_NavigateUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn put_NavigateUri(&mut self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn add_Click(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Click(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IHyperlink { + #[inline] pub unsafe fn get_navigate_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NavigateUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_navigate_uri(&mut self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + let hr = ((*self.lpVtbl).put_NavigateUri)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_click(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Click)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_click(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Click)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHyperlinkStatics, 977589204, 64833, 16859, 140, 114, 59, 121, 10, 205, 159, 211); + RT_INTERFACE!{static interface IHyperlinkStatics(IHyperlinkStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IHyperlinkStatics] { + fn get_NavigateUriProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IHyperlinkStatics { + #[inline] pub unsafe fn get_navigate_uri_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NavigateUriProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHyperlink2, 1290394207, 31999, 17041, 183, 143, 223, 236, 114, 73, 5, 118); + RT_INTERFACE!{interface IHyperlink2(IHyperlink2Vtbl): IInspectable(IInspectableVtbl) [IID_IHyperlink2] { + fn get_UnderlineStyle(&mut self, out: *mut UnderlineStyle) -> HRESULT, + fn put_UnderlineStyle(&mut self, value: UnderlineStyle) -> HRESULT + }} + impl IHyperlink2 { + #[inline] pub unsafe fn get_underline_style(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_UnderlineStyle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_underline_style(&mut self, value: UnderlineStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_UnderlineStyle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHyperlinkStatics2, 1344854199, 31455, 17390, 164, 174, 156, 146, 95, 117, 87, 22); + RT_INTERFACE!{static interface IHyperlinkStatics2(IHyperlinkStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IHyperlinkStatics2] { + fn get_UnderlineStyleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IHyperlinkStatics2 { + #[inline] pub unsafe fn get_underline_style_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UnderlineStyleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHyperlink3, 3287373785, 58835, 20407, 135, 2, 79, 109, 133, 221, 158, 10); + RT_INTERFACE!{interface IHyperlink3(IHyperlink3Vtbl): IInspectable(IInspectableVtbl) [IID_IHyperlink3] { + fn get_XYFocusLeft(&mut self, out: *mut *mut super::DependencyObject) -> HRESULT, + fn put_XYFocusLeft(&mut self, value: *mut super::DependencyObject) -> HRESULT, + fn get_XYFocusRight(&mut self, out: *mut *mut super::DependencyObject) -> HRESULT, + fn put_XYFocusRight(&mut self, value: *mut super::DependencyObject) -> HRESULT, + fn get_XYFocusUp(&mut self, out: *mut *mut super::DependencyObject) -> HRESULT, + fn put_XYFocusUp(&mut self, value: *mut super::DependencyObject) -> HRESULT, + fn get_XYFocusDown(&mut self, out: *mut *mut super::DependencyObject) -> HRESULT, + fn put_XYFocusDown(&mut self, value: *mut super::DependencyObject) -> HRESULT, + fn get_ElementSoundMode(&mut self, out: *mut super::ElementSoundMode) -> HRESULT, + fn put_ElementSoundMode(&mut self, value: super::ElementSoundMode) -> HRESULT + }} + impl IHyperlink3 { + #[inline] pub unsafe fn get_xyfocus_left(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XYFocusLeft)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_xyfocus_left(&mut self, value: &super::DependencyObject) -> Result<()> { + let hr = ((*self.lpVtbl).put_XYFocusLeft)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_xyfocus_right(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XYFocusRight)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_xyfocus_right(&mut self, value: &super::DependencyObject) -> Result<()> { + let hr = ((*self.lpVtbl).put_XYFocusRight)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_xyfocus_up(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XYFocusUp)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_xyfocus_up(&mut self, value: &super::DependencyObject) -> Result<()> { + let hr = ((*self.lpVtbl).put_XYFocusUp)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_xyfocus_down(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XYFocusDown)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_xyfocus_down(&mut self, value: &super::DependencyObject) -> Result<()> { + let hr = ((*self.lpVtbl).put_XYFocusDown)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_element_sound_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ElementSoundMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_element_sound_mode(&mut self, value: super::ElementSoundMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_ElementSoundMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IHyperlinkStatics3, 1041620640, 8286, 18759, 153, 165, 116, 231, 87, 232, 225, 180); + RT_INTERFACE!{static interface IHyperlinkStatics3(IHyperlinkStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IHyperlinkStatics3] { + fn get_XYFocusLeftProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_XYFocusRightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_XYFocusUpProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_XYFocusDownProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ElementSoundModeProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IHyperlinkStatics3 { + #[inline] pub unsafe fn get_xyfocus_left_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XYFocusLeftProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_xyfocus_right_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XYFocusRightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_xyfocus_up_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XYFocusUpProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_xyfocus_down_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_XYFocusDownProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_element_sound_mode_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ElementSoundModeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class TextElement: ITextElement} + RT_ACTIVATABLE!{ITextElementStatics2 [CLSID_TextElement]} + RT_ACTIVATABLE!{ITextElementStatics [CLSID_TextElement]} + RT_ACTIVATABLE!{ITextElementStatics3 [CLSID_TextElement]} + DEFINE_CLSID!(CLSID_TextElement = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,68,111,99,117,109,101,110,116,115,46,84,101,120,116,69,108,101,109,101,110,116,0]); + RT_CLASS!{class Block: IBlock} + RT_ACTIVATABLE!{IBlockStatics [CLSID_Block]} + DEFINE_CLSID!(CLSID_Block = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,68,111,99,117,109,101,110,116,115,46,66,108,111,99,107,0]); + RT_CLASS!{class Inline: IInline} + RT_CLASS!{class InlineUIContainer: IInlineUIContainer} + RT_CLASS!{class LineBreak: ILineBreak} + RT_CLASS!{class Paragraph: IParagraph} + RT_ACTIVATABLE!{IParagraphStatics [CLSID_Paragraph]} + DEFINE_CLSID!(CLSID_Paragraph = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,68,111,99,117,109,101,110,116,115,46,80,97,114,97,103,114,97,112,104,0]); + RT_CLASS!{class Run: IRun} + RT_ACTIVATABLE!{IRunStatics [CLSID_Run]} + DEFINE_CLSID!(CLSID_Run = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,68,111,99,117,109,101,110,116,115,46,82,117,110,0]); + RT_CLASS!{class Span: ISpan} + RT_CLASS!{class Bold: IBold} + RT_CLASS!{class Italic: IItalic} + RT_CLASS!{class Underline: IUnderline} + RT_CLASS!{class Hyperlink: IHyperlink} + RT_ACTIVATABLE!{IHyperlinkStatics2 [CLSID_Hyperlink]} + RT_ACTIVATABLE!{IHyperlinkStatics [CLSID_Hyperlink]} + RT_ACTIVATABLE!{IHyperlinkStatics3 [CLSID_Hyperlink]} + DEFINE_CLSID!(CLSID_Hyperlink = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,68,111,99,117,109,101,110,116,115,46,72,121,112,101,114,108,105,110,107,0]); + RT_CLASS!{class HyperlinkClickEventArgs: IHyperlinkClickEventArgs} + RT_CLASS!{class Glyphs: IGlyphs} + RT_ACTIVATABLE!{IGlyphsStatics [CLSID_Glyphs]} + RT_ACTIVATABLE!{IGlyphsStatics2 [CLSID_Glyphs]} + DEFINE_CLSID!(CLSID_Glyphs = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,68,111,99,117,109,101,110,116,115,46,71,108,121,112,104,115,0]); +} // Windows.UI.Xaml.Documents +pub mod controls { // Windows.UI.Xaml.Controls +use ::prelude::*; + RT_ENUM! { enum CandidateWindowAlignment: i32 { + Default (CandidateWindowAlignment_Default) = 0, BottomEdge (CandidateWindowAlignment_BottomEdge) = 1, + }} + RT_ENUM! { enum ClickMode: i32 { + Release (ClickMode_Release) = 0, Press (ClickMode_Press) = 1, Hover (ClickMode_Hover) = 2, + }} + RT_ENUM! { enum IncrementalLoadingTrigger: i32 { + None (IncrementalLoadingTrigger_None) = 0, Edge (IncrementalLoadingTrigger_Edge) = 1, + }} + RT_ENUM! { enum ItemsUpdatingScrollMode: i32 { + KeepItemsInView (ItemsUpdatingScrollMode_KeepItemsInView) = 0, KeepScrollOffset (ItemsUpdatingScrollMode_KeepScrollOffset) = 1, KeepLastItemInView (ItemsUpdatingScrollMode_KeepLastItemInView) = 2, + }} + RT_ENUM! { enum ListViewReorderMode: i32 { + Disabled (ListViewReorderMode_Disabled) = 0, Enabled (ListViewReorderMode_Enabled) = 1, + }} + RT_ENUM! { enum ListViewSelectionMode: i32 { + None (ListViewSelectionMode_None) = 0, Single (ListViewSelectionMode_Single) = 1, Multiple (ListViewSelectionMode_Multiple) = 2, Extended (ListViewSelectionMode_Extended) = 3, + }} + RT_ENUM! { enum Orientation: i32 { + Vertical (Orientation_Vertical) = 0, Horizontal (Orientation_Horizontal) = 1, + }} + RT_ENUM! { enum PanelScrollingDirection: i32 { + None (PanelScrollingDirection_None) = 0, Forward (PanelScrollingDirection_Forward) = 1, Backward (PanelScrollingDirection_Backward) = 2, + }} + RT_ENUM! { enum PasswordRevealMode: i32 { + Peek (PasswordRevealMode_Peek) = 0, Hidden (PasswordRevealMode_Hidden) = 1, Visible (PasswordRevealMode_Visible) = 2, + }} + RT_ENUM! { enum RichEditClipboardFormat: i32 { + AllFormats (RichEditClipboardFormat_AllFormats) = 0, PlainText (RichEditClipboardFormat_PlainText) = 1, + }} + RT_ENUM! { enum ScrollBarVisibility: i32 { + Disabled (ScrollBarVisibility_Disabled) = 0, Auto (ScrollBarVisibility_Auto) = 1, Hidden (ScrollBarVisibility_Hidden) = 2, Visible (ScrollBarVisibility_Visible) = 3, + }} + RT_ENUM! { enum ScrollIntoViewAlignment: i32 { + Default (ScrollIntoViewAlignment_Default) = 0, Leading (ScrollIntoViewAlignment_Leading) = 1, + }} + RT_ENUM! { enum ScrollMode: i32 { + Disabled (ScrollMode_Disabled) = 0, Enabled (ScrollMode_Enabled) = 1, Auto (ScrollMode_Auto) = 2, + }} + RT_ENUM! { enum SelectionMode: i32 { + Single (SelectionMode_Single) = 0, Multiple (SelectionMode_Multiple) = 1, Extended (SelectionMode_Extended) = 2, + }} + RT_ENUM! { enum SnapPointsType: i32 { + None (SnapPointsType_None) = 0, Optional (SnapPointsType_Optional) = 1, Mandatory (SnapPointsType_Mandatory) = 2, OptionalSingle (SnapPointsType_OptionalSingle) = 3, MandatorySingle (SnapPointsType_MandatorySingle) = 4, + }} + RT_ENUM! { enum StretchDirection: i32 { + UpOnly (StretchDirection_UpOnly) = 0, DownOnly (StretchDirection_DownOnly) = 1, Both (StretchDirection_Both) = 2, + }} + RT_ENUM! { enum VirtualizationMode: i32 { + Standard (VirtualizationMode_Standard) = 0, Recycling (VirtualizationMode_Recycling) = 1, + }} + RT_ENUM! { enum ZoomMode: i32 { + Disabled (ZoomMode_Disabled) = 0, Enabled (ZoomMode_Enabled) = 1, + }} + DEFINE_IID!(IID_BackClickEventHandler, 4204511775, 39058, 18478, 171, 246, 235, 45, 96, 125, 50, 222); + RT_DELEGATE!{delegate BackClickEventHandler(BackClickEventHandlerVtbl, BackClickEventHandlerImpl) [IID_BackClickEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut BackClickEventArgs) -> HRESULT + }} + impl BackClickEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &BackClickEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class BackClickEventArgs: IBackClickEventArgs} + DEFINE_IID!(IID_CleanUpVirtualizedItemEventHandler, 3402289366, 3853, 18544, 136, 77, 242, 222, 223, 103, 66, 136); + RT_DELEGATE!{delegate CleanUpVirtualizedItemEventHandler(CleanUpVirtualizedItemEventHandlerVtbl, CleanUpVirtualizedItemEventHandlerImpl) [IID_CleanUpVirtualizedItemEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut CleanUpVirtualizedItemEventArgs) -> HRESULT + }} + impl CleanUpVirtualizedItemEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &CleanUpVirtualizedItemEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ContextMenuOpeningEventHandler, 3751039313, 29788, 17478, 178, 252, 33, 109, 118, 88, 71, 160); + RT_DELEGATE!{delegate ContextMenuOpeningEventHandler(ContextMenuOpeningEventHandlerVtbl, ContextMenuOpeningEventHandlerImpl) [IID_ContextMenuOpeningEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut ContextMenuEventArgs) -> HRESULT + }} + impl ContextMenuOpeningEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &ContextMenuEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_DragItemsStartingEventHandler, 984525644, 5323, 17460, 190, 204, 136, 168, 88, 92, 47, 137); + RT_DELEGATE!{delegate DragItemsStartingEventHandler(DragItemsStartingEventHandlerVtbl, DragItemsStartingEventHandlerImpl) [IID_DragItemsStartingEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut DragItemsStartingEventArgs) -> HRESULT + }} + impl DragItemsStartingEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &DragItemsStartingEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class DragItemsStartingEventArgs: IDragItemsStartingEventArgs} + DEFINE_IID!(IID_ItemClickEventHandler, 1039585614, 57738, 19061, 147, 149, 98, 124, 95, 60, 212, 137); + RT_DELEGATE!{delegate ItemClickEventHandler(ItemClickEventHandlerVtbl, ItemClickEventHandlerImpl) [IID_ItemClickEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut ItemClickEventArgs) -> HRESULT + }} + impl ItemClickEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &ItemClickEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_NotifyEventHandler, 3271414264, 28933, 19060, 161, 9, 222, 41, 223, 245, 107, 152); + RT_DELEGATE!{delegate NotifyEventHandler(NotifyEventHandlerVtbl, NotifyEventHandlerImpl) [IID_NotifyEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut NotifyEventArgs) -> HRESULT + }} + impl NotifyEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &NotifyEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class NotifyEventArgs: INotifyEventArgs} + DEFINE_IID!(IID_SelectionChangedEventHandler, 3785380690, 23200, 17098, 156, 217, 6, 138, 20, 219, 110, 104); + RT_DELEGATE!{delegate SelectionChangedEventHandler(SelectionChangedEventHandlerVtbl, SelectionChangedEventHandlerImpl) [IID_SelectionChangedEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut SelectionChangedEventArgs) -> HRESULT + }} + impl SelectionChangedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &SelectionChangedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_SemanticZoomViewChangedEventHandler, 531174941, 23923, 17659, 129, 172, 209, 201, 56, 73, 25, 212); + RT_DELEGATE!{delegate SemanticZoomViewChangedEventHandler(SemanticZoomViewChangedEventHandlerVtbl, SemanticZoomViewChangedEventHandlerImpl) [IID_SemanticZoomViewChangedEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut SemanticZoomViewChangedEventArgs) -> HRESULT + }} + impl SemanticZoomViewChangedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &SemanticZoomViewChangedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SemanticZoomViewChangedEventArgs: ISemanticZoomViewChangedEventArgs} + DEFINE_IID!(IID_TextChangedEventHandler, 2394119063, 44423, 16616, 129, 139, 119, 219, 36, 117, 149, 102); + RT_DELEGATE!{delegate TextChangedEventHandler(TextChangedEventHandlerVtbl, TextChangedEventHandlerImpl) [IID_TextChangedEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut TextChangedEventArgs) -> HRESULT + }} + impl TextChangedEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &TextChangedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_TextControlPasteEventHandler, 3580736345, 28535, 17046, 171, 156, 121, 73, 57, 68, 67, 101); + RT_DELEGATE!{delegate TextControlPasteEventHandler(TextControlPasteEventHandlerVtbl, TextControlPasteEventHandlerImpl) [IID_TextControlPasteEventHandler] { + fn Invoke(&mut self, sender: *mut IInspectable, e: *mut TextControlPasteEventArgs) -> HRESULT + }} + impl TextControlPasteEventHandler { + #[inline] pub unsafe fn invoke(&mut self, sender: &IInspectable, e: &TextControlPasteEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).Invoke)(self, sender as *const _ as *mut _, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class TextControlPasteEventArgs: ITextControlPasteEventArgs} + RT_CLASS!{class ContainerContentChangingEventArgs: IContainerContentChangingEventArgs} + DEFINE_IID!(IID_IInsertionPanel, 1804460175, 25895, 19769, 188, 191, 88, 176, 29, 169, 35, 215); + RT_INTERFACE!{interface IInsertionPanel(IInsertionPanelVtbl): IInspectable(IInspectableVtbl) [IID_IInsertionPanel] { + fn GetInsertionIndexes(&mut self, position: ::rt::gen::windows::foundation::Point, first: *mut i32, second: *mut i32) -> HRESULT + }} + impl IInsertionPanel { + #[inline] pub unsafe fn get_insertion_indexes(&mut self, position: ::rt::gen::windows::foundation::Point) -> Result<(i32, i32)> { + let mut first = zeroed(); let mut second = zeroed(); + let hr = ((*self.lpVtbl).GetInsertionIndexes)(self, position, &mut first, &mut second); + if hr == S_OK { Ok((first, second)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemContainerMapping, 1405743674, 62045, 17514, 153, 184, 199, 174, 184, 57, 5, 15); + RT_INTERFACE!{interface IItemContainerMapping(IItemContainerMappingVtbl): IInspectable(IInspectableVtbl) [IID_IItemContainerMapping] { + fn ItemFromContainer(&mut self, container: *mut super::DependencyObject, out: *mut *mut IInspectable) -> HRESULT, + fn ContainerFromItem(&mut self, item: *mut IInspectable, out: *mut *mut super::DependencyObject) -> HRESULT, + fn IndexFromContainer(&mut self, container: *mut super::DependencyObject, out: *mut i32) -> HRESULT, + fn ContainerFromIndex(&mut self, index: i32, out: *mut *mut super::DependencyObject) -> HRESULT + }} + impl IItemContainerMapping { + #[inline] pub unsafe fn item_from_container(&mut self, container: &super::DependencyObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ItemFromContainer)(self, container as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn container_from_item(&mut self, item: &IInspectable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ContainerFromItem)(self, item as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn index_from_container(&mut self, container: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IndexFromContainer)(self, container as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn container_from_index(&mut self, index: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ContainerFromIndex)(self, index, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INavigate, 3206649257, 62698, 17206, 151, 124, 248, 252, 247, 139, 13, 158); + RT_INTERFACE!{interface INavigate(INavigateVtbl): IInspectable(IInspectableVtbl) [IID_INavigate] { + fn Navigate(&mut self, sourcePageType: super::interop::TypeName, out: *mut bool) -> HRESULT + }} + impl INavigate { + #[inline] pub unsafe fn navigate(&mut self, sourcePageType: super::interop::TypeName) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Navigate)(self, sourcePageType, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISemanticZoomInformation, 2808757091, 8859, 19909, 170, 17, 157, 146, 47, 191, 138, 152); + RT_INTERFACE!{interface ISemanticZoomInformation(ISemanticZoomInformationVtbl): IInspectable(IInspectableVtbl) [IID_ISemanticZoomInformation] { + fn get_SemanticZoomOwner(&mut self, out: *mut *mut SemanticZoom) -> HRESULT, + fn put_SemanticZoomOwner(&mut self, value: *mut SemanticZoom) -> HRESULT, + fn get_IsActiveView(&mut self, out: *mut bool) -> HRESULT, + fn put_IsActiveView(&mut self, value: bool) -> HRESULT, + fn get_IsZoomedInView(&mut self, out: *mut bool) -> HRESULT, + fn put_IsZoomedInView(&mut self, value: bool) -> HRESULT, + fn InitializeViewChange(&mut self) -> HRESULT, + fn CompleteViewChange(&mut self) -> HRESULT, + fn MakeVisible(&mut self, item: *mut SemanticZoomLocation) -> HRESULT, + fn StartViewChangeFrom(&mut self, source: *mut SemanticZoomLocation, destination: *mut SemanticZoomLocation) -> HRESULT, + fn StartViewChangeTo(&mut self, source: *mut SemanticZoomLocation, destination: *mut SemanticZoomLocation) -> HRESULT, + fn CompleteViewChangeFrom(&mut self, source: *mut SemanticZoomLocation, destination: *mut SemanticZoomLocation) -> HRESULT, + fn CompleteViewChangeTo(&mut self, source: *mut SemanticZoomLocation, destination: *mut SemanticZoomLocation) -> HRESULT + }} + impl ISemanticZoomInformation { + #[inline] pub unsafe fn get_semantic_zoom_owner(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SemanticZoomOwner)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_semantic_zoom_owner(&mut self, value: &SemanticZoom) -> Result<()> { + let hr = ((*self.lpVtbl).put_SemanticZoomOwner)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_active_view(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsActiveView)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_active_view(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsActiveView)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_zoomed_in_view(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsZoomedInView)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_zoomed_in_view(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsZoomedInView)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn initialize_view_change(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).InitializeViewChange)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn complete_view_change(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).CompleteViewChange)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn make_visible(&mut self, item: &SemanticZoomLocation) -> Result<()> { + let hr = ((*self.lpVtbl).MakeVisible)(self, item as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_view_change_from(&mut self, source: &SemanticZoomLocation, destination: &SemanticZoomLocation) -> Result<()> { + let hr = ((*self.lpVtbl).StartViewChangeFrom)(self, source as *const _ as *mut _, destination as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn start_view_change_to(&mut self, source: &SemanticZoomLocation, destination: &SemanticZoomLocation) -> Result<()> { + let hr = ((*self.lpVtbl).StartViewChangeTo)(self, source as *const _ as *mut _, destination as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn complete_view_change_from(&mut self, source: &SemanticZoomLocation, destination: &SemanticZoomLocation) -> Result<()> { + let hr = ((*self.lpVtbl).CompleteViewChangeFrom)(self, source as *const _ as *mut _, destination as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn complete_view_change_to(&mut self, source: &SemanticZoomLocation, destination: &SemanticZoomLocation) -> Result<()> { + let hr = ((*self.lpVtbl).CompleteViewChangeTo)(self, source as *const _ as *mut _, destination as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class SemanticZoomLocation: ISemanticZoomLocation} + DEFINE_IID!(IID_IBackClickEventArgs, 719721580, 18302, 18633, 136, 48, 44, 70, 75, 124, 113, 4); + RT_INTERFACE!{interface IBackClickEventArgs(IBackClickEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBackClickEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT + }} + impl IBackClickEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICandidateWindowBoundsChangedEventArgs, 2324980824, 33712, 19506, 148, 80, 81, 105, 165, 131, 139, 85); + RT_INTERFACE!{interface ICandidateWindowBoundsChangedEventArgs(ICandidateWindowBoundsChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICandidateWindowBoundsChangedEventArgs] { + fn get_Bounds(&mut self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT + }} + impl ICandidateWindowBoundsChangedEventArgs { + #[inline] pub unsafe fn get_bounds(&mut self) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class CandidateWindowBoundsChangedEventArgs: ICandidateWindowBoundsChangedEventArgs} + DEFINE_IID!(IID_IChoosingGroupHeaderContainerEventArgs, 1742423254, 53761, 19826, 190, 172, 94, 142, 88, 175, 216, 199); + RT_INTERFACE!{interface IChoosingGroupHeaderContainerEventArgs(IChoosingGroupHeaderContainerEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IChoosingGroupHeaderContainerEventArgs] { + fn get_GroupHeaderContainer(&mut self, out: *mut *mut ListViewBaseHeaderItem) -> HRESULT, + fn put_GroupHeaderContainer(&mut self, value: *mut ListViewBaseHeaderItem) -> HRESULT, + fn get_GroupIndex(&mut self, out: *mut i32) -> HRESULT, + fn get_Group(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IChoosingGroupHeaderContainerEventArgs { + #[inline] pub unsafe fn get_group_header_container(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GroupHeaderContainer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_group_header_container(&mut self, value: &ListViewBaseHeaderItem) -> Result<()> { + let hr = ((*self.lpVtbl).put_GroupHeaderContainer)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_group_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_GroupIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_group(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Group)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + RT_CLASS!{class ChoosingGroupHeaderContainerEventArgs: IChoosingGroupHeaderContainerEventArgs} + DEFINE_IID!(IID_IChoosingItemContainerEventArgs, 2612280270, 44647, 19072, 131, 99, 227, 254, 27, 36, 79, 44); + RT_INTERFACE!{interface IChoosingItemContainerEventArgs(IChoosingItemContainerEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IChoosingItemContainerEventArgs] { + fn get_ItemIndex(&mut self, out: *mut i32) -> HRESULT, + fn get_Item(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_ItemContainer(&mut self, out: *mut *mut primitives::SelectorItem) -> HRESULT, + fn put_ItemContainer(&mut self, value: *mut primitives::SelectorItem) -> HRESULT, + fn get_IsContainerPrepared(&mut self, out: *mut bool) -> HRESULT, + fn put_IsContainerPrepared(&mut self, value: bool) -> HRESULT + }} + impl IChoosingItemContainerEventArgs { + #[inline] pub unsafe fn get_item_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ItemIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Item)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_container(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemContainer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_item_container(&mut self, value: &primitives::SelectorItem) -> Result<()> { + let hr = ((*self.lpVtbl).put_ItemContainer)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_container_prepared(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsContainerPrepared)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_container_prepared(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsContainerPrepared)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ChoosingItemContainerEventArgs: IChoosingItemContainerEventArgs} + RT_CLASS!{class ColumnDefinitionCollection: ::rt::gen::windows::foundation::collections::IVector} + DEFINE_IID!(IID_IContainerContentChangingEventArgs, 132049575, 399, 19930, 179, 153, 253, 78, 19, 163, 27, 234); + RT_INTERFACE!{interface IContainerContentChangingEventArgs(IContainerContentChangingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContainerContentChangingEventArgs] { + fn get_ItemContainer(&mut self, out: *mut *mut primitives::SelectorItem) -> HRESULT, + fn get_InRecycleQueue(&mut self, out: *mut bool) -> HRESULT, + fn get_ItemIndex(&mut self, out: *mut i32) -> HRESULT, + fn get_Item(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_Phase(&mut self, out: *mut u32) -> HRESULT, + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn RegisterUpdateCallback(&mut self, callback: *mut ::rt::gen::windows::foundation::TypedEventHandler) -> HRESULT, + fn RegisterUpdateCallbackWithPhase(&mut self, callbackPhase: u32, callback: *mut ::rt::gen::windows::foundation::TypedEventHandler) -> HRESULT + }} + impl IContainerContentChangingEventArgs { + #[inline] pub unsafe fn get_item_container(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemContainer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_in_recycle_queue(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_InRecycleQueue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ItemIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Item)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_phase(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Phase)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_update_callback(&mut self, callback: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterUpdateCallback)(self, callback as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn register_update_callback_with_phase(&mut self, callbackPhase: u32, callback: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<()> { + let hr = ((*self.lpVtbl).RegisterUpdateCallbackWithPhase)(self, callbackPhase, callback as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataTemplateSelector, 2835862678, 18080, 19671, 141, 190, 249, 165, 129, 223, 96, 177); + RT_INTERFACE!{interface IDataTemplateSelector(IDataTemplateSelectorVtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplateSelector] { + fn SelectTemplate(&mut self, item: *mut IInspectable, container: *mut super::DependencyObject, out: *mut *mut super::DataTemplate) -> HRESULT + }} + impl IDataTemplateSelector { + #[inline] pub unsafe fn select_template(&mut self, item: &IInspectable, container: &super::DependencyObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectTemplate)(self, item as *const _ as *mut _, container as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataTemplateSelectorOverrides, 756427045, 22886, 19450, 134, 56, 77, 52, 86, 137, 246, 207); + RT_INTERFACE!{interface IDataTemplateSelectorOverrides(IDataTemplateSelectorOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplateSelectorOverrides] { + fn SelectTemplateCore(&mut self, item: *mut IInspectable, container: *mut super::DependencyObject, out: *mut *mut super::DataTemplate) -> HRESULT + }} + impl IDataTemplateSelectorOverrides { + #[inline] pub unsafe fn select_template_core(&mut self, item: &IInspectable, container: &super::DependencyObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectTemplateCore)(self, item as *const _ as *mut _, container as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataTemplateSelectorFactory, 1360767696, 8458, 17789, 149, 33, 67, 61, 43, 17, 183, 210); + RT_INTERFACE!{interface IDataTemplateSelectorFactory(IDataTemplateSelectorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplateSelectorFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DataTemplateSelector) -> HRESULT + }} + impl IDataTemplateSelectorFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + RT_CLASS!{class DataTemplateSelector: IDataTemplateSelector} + DEFINE_IID!(IID_IDataTemplateSelector2, 932363335, 35915, 16983, 165, 174, 204, 63, 142, 215, 134, 235); + RT_INTERFACE!{interface IDataTemplateSelector2(IDataTemplateSelector2Vtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplateSelector2] { + fn SelectTemplateForItem(&mut self, item: *mut IInspectable, out: *mut *mut super::DataTemplate) -> HRESULT + }} + impl IDataTemplateSelector2 { + #[inline] pub unsafe fn select_template_for_item(&mut self, item: &IInspectable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectTemplateForItem)(self, item as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDataTemplateSelectorOverrides2, 1816114684, 36484, 19601, 172, 21, 4, 161, 216, 133, 80, 15); + RT_INTERFACE!{interface IDataTemplateSelectorOverrides2(IDataTemplateSelectorOverrides2Vtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplateSelectorOverrides2] { + fn SelectTemplateForItemCore(&mut self, item: *mut IInspectable, out: *mut *mut super::DataTemplate) -> HRESULT + }} + impl IDataTemplateSelectorOverrides2 { + #[inline] pub unsafe fn select_template_for_item_core(&mut self, item: &IInspectable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectTemplateForItemCore)(self, item as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IDragItemsCompletedEventArgs, 2936402479, 40568, 19233, 154, 142, 65, 194, 209, 54, 122, 42); + RT_INTERFACE!{interface IDragItemsCompletedEventArgs(IDragItemsCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDragItemsCompletedEventArgs] { + fn get_Items(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn get_DropResult(&mut self, out: *mut ::rt::gen::windows::applicationmodel::datatransfer::DataPackageOperation) -> HRESULT + }} + impl IDragItemsCompletedEventArgs { + #[inline] pub unsafe fn get_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Items)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_drop_result(&mut self) -> Result<::rt::gen::windows::applicationmodel::datatransfer::DataPackageOperation> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DropResult)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class DragItemsCompletedEventArgs: IDragItemsCompletedEventArgs} + DEFINE_IID!(IID_IDragItemsStartingEventArgs, 1909399900, 56045, 18307, 170, 17, 220, 87, 77, 39, 19, 233); + RT_INTERFACE!{interface IDragItemsStartingEventArgs(IDragItemsStartingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDragItemsStartingEventArgs] { + fn get_Cancel(&mut self, out: *mut bool) -> HRESULT, + fn put_Cancel(&mut self, value: bool) -> HRESULT, + fn get_Items(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows.applicationmodel")] fn get_Data(&mut self, out: *mut *mut ::rt::gen::windows::applicationmodel::datatransfer::DataPackage) -> HRESULT + }} + impl IDragItemsStartingEventArgs { + #[inline] pub unsafe fn get_cancel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Cancel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cancel(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Cancel)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Items)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.applicationmodel")] #[inline] pub unsafe fn get_data(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Data)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGroupStyle, 1909075979, 47262, 16772, 176, 223, 169, 233, 84, 71, 222, 141); + RT_INTERFACE!{interface IGroupStyle(IGroupStyleVtbl): IInspectable(IInspectableVtbl) [IID_IGroupStyle] { + fn get_Panel(&mut self, out: *mut *mut ItemsPanelTemplate) -> HRESULT, + fn put_Panel(&mut self, value: *mut ItemsPanelTemplate) -> HRESULT, + fn get_ContainerStyle(&mut self, out: *mut *mut super::Style) -> HRESULT, + fn put_ContainerStyle(&mut self, value: *mut super::Style) -> HRESULT, + fn get_ContainerStyleSelector(&mut self, out: *mut *mut StyleSelector) -> HRESULT, + fn put_ContainerStyleSelector(&mut self, value: *mut StyleSelector) -> HRESULT, + fn get_HeaderTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_HeaderTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_HeaderTemplateSelector(&mut self, out: *mut *mut DataTemplateSelector) -> HRESULT, + fn put_HeaderTemplateSelector(&mut self, value: *mut DataTemplateSelector) -> HRESULT, + fn get_HidesIfEmpty(&mut self, out: *mut bool) -> HRESULT, + fn put_HidesIfEmpty(&mut self, value: bool) -> HRESULT + }} + impl IGroupStyle { + #[inline] pub unsafe fn get_panel(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Panel)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_panel(&mut self, value: &ItemsPanelTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_Panel)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_container_style(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContainerStyle)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_container_style(&mut self, value: &super::Style) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContainerStyle)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_container_style_selector(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContainerStyleSelector)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_container_style_selector(&mut self, value: &StyleSelector) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContainerStyleSelector)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template_selector(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplateSelector)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_template_selector(&mut self, value: &DataTemplateSelector) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderTemplateSelector)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_hides_if_empty(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HidesIfEmpty)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_hides_if_empty(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_HidesIfEmpty)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class StyleSelector: IStyleSelector} + DEFINE_IID!(IID_IGroupStyleFactory, 1459578447, 58071, 20297, 128, 61, 199, 39, 205, 249, 55, 45); + RT_INTERFACE!{interface IGroupStyleFactory(IGroupStyleFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGroupStyleFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut GroupStyle) -> HRESULT + }} + impl IGroupStyleFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + RT_CLASS!{class GroupStyle: IGroupStyle} + DEFINE_IID!(IID_IGroupStyle2, 1777927801, 14865, 20455, 180, 223, 42, 1, 57, 212, 1, 139); + RT_INTERFACE!{interface IGroupStyle2(IGroupStyle2Vtbl): IInspectable(IInspectableVtbl) [IID_IGroupStyle2] { + fn get_HeaderContainerStyle(&mut self, out: *mut *mut super::Style) -> HRESULT, + fn put_HeaderContainerStyle(&mut self, value: *mut super::Style) -> HRESULT + }} + impl IGroupStyle2 { + #[inline] pub unsafe fn get_header_container_style(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderContainerStyle)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_container_style(&mut self, value: &super::Style) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderContainerStyle)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGroupStyleSelector, 1843007902, 39540, 18319, 163, 57, 91, 181, 45, 230, 197, 30); + RT_INTERFACE!{interface IGroupStyleSelector(IGroupStyleSelectorVtbl): IInspectable(IInspectableVtbl) [IID_IGroupStyleSelector] { + fn SelectGroupStyle(&mut self, group: *mut IInspectable, level: u32, out: *mut *mut GroupStyle) -> HRESULT + }} + impl IGroupStyleSelector { + #[inline] pub unsafe fn select_group_style(&mut self, group: &IInspectable, level: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectGroupStyle)(self, group as *const _ as *mut _, level, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGroupStyleSelectorOverrides, 4136749746, 30637, 19773, 165, 28, 142, 249, 195, 131, 100, 86); + RT_INTERFACE!{interface IGroupStyleSelectorOverrides(IGroupStyleSelectorOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IGroupStyleSelectorOverrides] { + fn SelectGroupStyleCore(&mut self, group: *mut IInspectable, level: u32, out: *mut *mut GroupStyle) -> HRESULT + }} + impl IGroupStyleSelectorOverrides { + #[inline] pub unsafe fn select_group_style_core(&mut self, group: &IInspectable, level: u32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectGroupStyleCore)(self, group as *const _ as *mut _, level, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGroupStyleSelectorFactory, 3210153267, 45814, 18463, 164, 80, 200, 12, 41, 31, 178, 45); + RT_INTERFACE!{interface IGroupStyleSelectorFactory(IGroupStyleSelectorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGroupStyleSelectorFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut GroupStyleSelector) -> HRESULT + }} + impl IGroupStyleSelectorFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + RT_CLASS!{class GroupStyleSelector: IGroupStyleSelector} + RT_CLASS!{class ItemCollection: ::rt::gen::windows::foundation::collections::IObservableVector} + DEFINE_IID!(IID_IItemContainerGenerator, 1081499392, 33776, 19839, 177, 184, 241, 157, 228, 241, 213, 218); + RT_INTERFACE!{interface IItemContainerGenerator(IItemContainerGeneratorVtbl): IInspectable(IInspectableVtbl) [IID_IItemContainerGenerator] { + fn add_ItemsChanged(&mut self, value: *mut primitives::ItemsChangedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemsChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn ItemFromContainer(&mut self, container: *mut super::DependencyObject, out: *mut *mut IInspectable) -> HRESULT, + fn ContainerFromItem(&mut self, item: *mut IInspectable, out: *mut *mut super::DependencyObject) -> HRESULT, + fn IndexFromContainer(&mut self, container: *mut super::DependencyObject, out: *mut i32) -> HRESULT, + fn ContainerFromIndex(&mut self, index: i32, out: *mut *mut super::DependencyObject) -> HRESULT, + fn GetItemContainerGeneratorForPanel(&mut self, panel: *mut Panel, out: *mut *mut ItemContainerGenerator) -> HRESULT, + fn StartAt(&mut self, position: primitives::GeneratorPosition, direction: primitives::GeneratorDirection, allowStartAtRealizedItem: bool) -> HRESULT, + fn Stop(&mut self) -> HRESULT, + fn GenerateNext(&mut self, isNewlyRealized: *mut bool, out: *mut *mut super::DependencyObject) -> HRESULT, + fn PrepareItemContainer(&mut self, container: *mut super::DependencyObject) -> HRESULT, + fn RemoveAll(&mut self) -> HRESULT, + fn Remove(&mut self, position: primitives::GeneratorPosition, count: i32) -> HRESULT, + fn GeneratorPositionFromIndex(&mut self, itemIndex: i32, out: *mut primitives::GeneratorPosition) -> HRESULT, + fn IndexFromGeneratorPosition(&mut self, position: primitives::GeneratorPosition, out: *mut i32) -> HRESULT, + fn Recycle(&mut self, position: primitives::GeneratorPosition, count: i32) -> HRESULT + }} + impl IItemContainerGenerator { + #[inline] pub unsafe fn add_items_changed(&mut self, value: &primitives::ItemsChangedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ItemsChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_items_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ItemsChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn item_from_container(&mut self, container: &super::DependencyObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ItemFromContainer)(self, container as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn container_from_item(&mut self, item: &IInspectable) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ContainerFromItem)(self, item as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn index_from_container(&mut self, container: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IndexFromContainer)(self, container as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn container_from_index(&mut self, index: i32) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ContainerFromIndex)(self, index, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_container_generator_for_panel(&mut self, panel: &Panel) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemContainerGeneratorForPanel)(self, panel as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn start_at(&mut self, position: primitives::GeneratorPosition, direction: primitives::GeneratorDirection, allowStartAtRealizedItem: bool) -> Result<()> { + let hr = ((*self.lpVtbl).StartAt)(self, position, direction, allowStartAtRealizedItem); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn stop(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Stop)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn generate_next(&mut self) -> Result<(bool, ComPtr)> { + let mut isNewlyRealized = zeroed(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).GenerateNext)(self, &mut isNewlyRealized, &mut out); + if hr == S_OK { Ok((isNewlyRealized, ComPtr::wrap(out))) } else { err(hr) } + } + #[inline] pub unsafe fn prepare_item_container(&mut self, container: &super::DependencyObject) -> Result<()> { + let hr = ((*self.lpVtbl).PrepareItemContainer)(self, container as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove(&mut self, position: primitives::GeneratorPosition, count: i32) -> Result<()> { + let hr = ((*self.lpVtbl).Remove)(self, position, count); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn generator_position_from_index(&mut self, itemIndex: i32) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GeneratorPositionFromIndex)(self, itemIndex, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn index_from_generator_position(&mut self, position: primitives::GeneratorPosition) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IndexFromGeneratorPosition)(self, position, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn recycle(&mut self, position: primitives::GeneratorPosition, count: i32) -> Result<()> { + let hr = ((*self.lpVtbl).Recycle)(self, position, count); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ItemContainerGenerator: IItemContainerGenerator} + DEFINE_IID!(IID_IMediaTransportControlsHelper, 1027724553, 65348, 17440, 128, 126, 143, 122, 46, 44, 66, 81); + RT_INTERFACE!{interface IMediaTransportControlsHelper(IMediaTransportControlsHelperVtbl): IInspectable(IInspectableVtbl) [IID_IMediaTransportControlsHelper] { + + }} + DEFINE_IID!(IID_IMediaTransportControlsHelperStatics, 1517756487, 43425, 17957, 146, 112, 127, 73, 135, 93, 67, 148); + RT_INTERFACE!{static interface IMediaTransportControlsHelperStatics(IMediaTransportControlsHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaTransportControlsHelperStatics] { + fn get_DropoutOrderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetDropoutOrder(&mut self, element: *mut super::UIElement, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn SetDropoutOrder(&mut self, element: *mut super::UIElement, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + }} + impl IMediaTransportControlsHelperStatics { + #[inline] pub unsafe fn get_dropout_order_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DropoutOrderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_dropout_order(&mut self, element: &super::UIElement) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetDropoutOrder)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_dropout_order(&mut self, element: &super::UIElement, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + let hr = ((*self.lpVtbl).SetDropoutOrder)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class MediaTransportControlsHelper: IMediaTransportControlsHelper} + RT_ACTIVATABLE!{IMediaTransportControlsHelperStatics [CLSID_MediaTransportControlsHelper]} + DEFINE_CLSID!(CLSID_MediaTransportControlsHelper = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,67,111,110,116,114,111,108,115,46,77,101,100,105,97,84,114,97,110,115,112,111,114,116,67,111,110,116,114,111,108,115,72,101,108,112,101,114,0]); + DEFINE_IID!(IID_INotifyEventArgs, 2936931831, 50359, 17605, 176, 157, 92, 183, 5, 43, 58, 151); + RT_INTERFACE!{interface INotifyEventArgs(INotifyEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_INotifyEventArgs] { + fn get_Value(&mut self, out: *mut HSTRING) -> HRESULT + }} + impl INotifyEventArgs { + #[inline] pub unsafe fn get_value(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_INotifyEventArgs2, 219418454, 7630, 20429, 133, 188, 90, 85, 114, 39, 59, 156); + RT_INTERFACE!{interface INotifyEventArgs2(INotifyEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_INotifyEventArgs2] { + fn get_CallingUri(&mut self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT + }} + impl INotifyEventArgs2 { + #[inline] pub unsafe fn get_calling_uri(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CallingUri)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichEditBoxTextChangingEventArgs, 1409699864, 10259, 18722, 159, 142, 182, 187, 175, 217, 149, 216); + RT_INTERFACE!{interface IRichEditBoxTextChangingEventArgs(IRichEditBoxTextChangingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRichEditBoxTextChangingEventArgs] { + + }} + RT_CLASS!{class RichEditBoxTextChangingEventArgs: IRichEditBoxTextChangingEventArgs} + RT_CLASS!{class RowDefinitionCollection: ::rt::gen::windows::foundation::collections::IVector} + DEFINE_IID!(IID_ISemanticZoomLocation, 1107367734, 58306, 18795, 188, 78, 215, 80, 212, 55, 91, 154); + RT_INTERFACE!{interface ISemanticZoomLocation(ISemanticZoomLocationVtbl): IInspectable(IInspectableVtbl) [IID_ISemanticZoomLocation] { + fn get_Item(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Item(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_Bounds(&mut self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn put_Bounds(&mut self, value: ::rt::gen::windows::foundation::Rect) -> HRESULT + }} + impl ISemanticZoomLocation { + #[inline] pub unsafe fn get_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Item)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_item(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Item)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_bounds(&mut self) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Bounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_bounds(&mut self, value: ::rt::gen::windows::foundation::Rect) -> Result<()> { + let hr = ((*self.lpVtbl).put_Bounds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISemanticZoomViewChangedEventArgs, 1205846120, 46441, 19225, 132, 45, 142, 108, 249, 9, 137, 175); + RT_INTERFACE!{interface ISemanticZoomViewChangedEventArgs(ISemanticZoomViewChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISemanticZoomViewChangedEventArgs] { + fn get_IsSourceZoomedInView(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSourceZoomedInView(&mut self, value: bool) -> HRESULT, + fn get_SourceItem(&mut self, out: *mut *mut SemanticZoomLocation) -> HRESULT, + fn put_SourceItem(&mut self, value: *mut SemanticZoomLocation) -> HRESULT, + fn get_DestinationItem(&mut self, out: *mut *mut SemanticZoomLocation) -> HRESULT, + fn put_DestinationItem(&mut self, value: *mut SemanticZoomLocation) -> HRESULT + }} + impl ISemanticZoomViewChangedEventArgs { + #[inline] pub unsafe fn get_is_source_zoomed_in_view(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSourceZoomedInView)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_source_zoomed_in_view(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSourceZoomedInView)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_source_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_source_item(&mut self, value: &SemanticZoomLocation) -> Result<()> { + let hr = ((*self.lpVtbl).put_SourceItem)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_destination_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DestinationItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_destination_item(&mut self, value: &SemanticZoomLocation) -> Result<()> { + let hr = ((*self.lpVtbl).put_DestinationItem)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStyleSelector, 3507568487, 55489, 19172, 152, 240, 216, 80, 69, 2, 240, 139); + RT_INTERFACE!{interface IStyleSelector(IStyleSelectorVtbl): IInspectable(IInspectableVtbl) [IID_IStyleSelector] { + fn SelectStyle(&mut self, item: *mut IInspectable, container: *mut super::DependencyObject, out: *mut *mut super::Style) -> HRESULT + }} + impl IStyleSelector { + #[inline] pub unsafe fn select_style(&mut self, item: &IInspectable, container: &super::DependencyObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectStyle)(self, item as *const _ as *mut _, container as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStyleSelectorOverrides, 145610349, 3630, 17312, 174, 202, 143, 170, 148, 185, 208, 23); + RT_INTERFACE!{interface IStyleSelectorOverrides(IStyleSelectorOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IStyleSelectorOverrides] { + fn SelectStyleCore(&mut self, item: *mut IInspectable, container: *mut super::DependencyObject, out: *mut *mut super::Style) -> HRESULT + }} + impl IStyleSelectorOverrides { + #[inline] pub unsafe fn select_style_core(&mut self, item: &IInspectable, container: &super::DependencyObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).SelectStyleCore)(self, item as *const _ as *mut _, container as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStyleSelectorFactory, 2660510439, 14177, 17535, 143, 151, 41, 227, 157, 94, 179, 16); + RT_INTERFACE!{interface IStyleSelectorFactory(IStyleSelectorFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IStyleSelectorFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut StyleSelector) -> HRESULT + }} + impl IStyleSelectorFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBoxTextChangingEventArgs, 1315588981, 17373, 20019, 172, 190, 45, 135, 150, 161, 121, 39); + RT_INTERFACE!{interface ITextBoxTextChangingEventArgs(ITextBoxTextChangingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITextBoxTextChangingEventArgs] { + + }} + RT_CLASS!{class TextBoxTextChangingEventArgs: ITextBoxTextChangingEventArgs} + DEFINE_IID!(IID_ITextCompositionChangedEventArgs, 3116884210, 20663, 17437, 153, 12, 104, 85, 62, 46, 5, 107); + RT_INTERFACE!{interface ITextCompositionChangedEventArgs(ITextCompositionChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITextCompositionChangedEventArgs] { + fn get_StartIndex(&mut self, out: *mut i32) -> HRESULT, + fn get_Length(&mut self, out: *mut i32) -> HRESULT + }} + impl ITextCompositionChangedEventArgs { + #[inline] pub unsafe fn get_start_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class TextCompositionChangedEventArgs: ITextCompositionChangedEventArgs} + DEFINE_IID!(IID_ITextCompositionEndedEventArgs, 1189301682, 30656, 16405, 142, 180, 146, 238, 253, 252, 89, 20); + RT_INTERFACE!{interface ITextCompositionEndedEventArgs(ITextCompositionEndedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITextCompositionEndedEventArgs] { + fn get_StartIndex(&mut self, out: *mut i32) -> HRESULT, + fn get_Length(&mut self, out: *mut i32) -> HRESULT + }} + impl ITextCompositionEndedEventArgs { + #[inline] pub unsafe fn get_start_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class TextCompositionEndedEventArgs: ITextCompositionEndedEventArgs} + DEFINE_IID!(IID_ITextCompositionStartedEventArgs, 3743591346, 4303, 18718, 145, 232, 211, 205, 114, 216, 160, 211); + RT_INTERFACE!{interface ITextCompositionStartedEventArgs(ITextCompositionStartedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITextCompositionStartedEventArgs] { + fn get_StartIndex(&mut self, out: *mut i32) -> HRESULT, + fn get_Length(&mut self, out: *mut i32) -> HRESULT + }} + impl ITextCompositionStartedEventArgs { + #[inline] pub unsafe fn get_start_index(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StartIndex)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Length)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + RT_CLASS!{class TextCompositionStartedEventArgs: ITextCompositionStartedEventArgs} + DEFINE_IID!(IID_ITextControlPasteEventArgs, 1272043045, 8730, 18302, 187, 44, 173, 12, 30, 209, 37, 231); + RT_INTERFACE!{interface ITextControlPasteEventArgs(ITextControlPasteEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITextControlPasteEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT + }} + impl ITextControlPasteEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToolTipService, 61169543, 49100, 18974, 143, 234, 152, 246, 16, 131, 44, 234); + RT_INTERFACE!{interface IToolTipService(IToolTipServiceVtbl): IInspectable(IInspectableVtbl) [IID_IToolTipService] { + + }} + DEFINE_IID!(IID_IToolTipServiceStatics, 2263239160, 57925, 18602, 168, 200, 209, 7, 62, 215, 99, 25); + RT_INTERFACE!{static interface IToolTipServiceStatics(IToolTipServiceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IToolTipServiceStatics] { + fn get_PlacementProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetPlacement(&mut self, element: *mut super::DependencyObject, out: *mut primitives::PlacementMode) -> HRESULT, + fn SetPlacement(&mut self, element: *mut super::DependencyObject, value: primitives::PlacementMode) -> HRESULT, + fn get_PlacementTargetProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetPlacementTarget(&mut self, element: *mut super::DependencyObject, out: *mut *mut super::UIElement) -> HRESULT, + fn SetPlacementTarget(&mut self, element: *mut super::DependencyObject, value: *mut super::UIElement) -> HRESULT, + fn get_ToolTipProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetToolTip(&mut self, element: *mut super::DependencyObject, out: *mut *mut IInspectable) -> HRESULT, + fn SetToolTip(&mut self, element: *mut super::DependencyObject, value: *mut IInspectable) -> HRESULT + }} + impl IToolTipServiceStatics { + #[inline] pub unsafe fn get_placement_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlacementProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_placement(&mut self, element: &super::DependencyObject) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetPlacement)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_placement(&mut self, element: &super::DependencyObject, value: primitives::PlacementMode) -> Result<()> { + let hr = ((*self.lpVtbl).SetPlacement)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_placement_target_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlacementTargetProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_placement_target(&mut self, element: &super::DependencyObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPlacementTarget)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_placement_target(&mut self, element: &super::DependencyObject, value: &super::UIElement) -> Result<()> { + let hr = ((*self.lpVtbl).SetPlacementTarget)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tool_tip_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ToolTipProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tool_tip(&mut self, element: &super::DependencyObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetToolTip)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_tool_tip(&mut self, element: &super::DependencyObject, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetToolTip)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class ToolTipService: IToolTipService} + RT_ACTIVATABLE!{IToolTipServiceStatics [CLSID_ToolTipService]} + DEFINE_CLSID!(CLSID_ToolTipService = &[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,67,111,110,116,114,111,108,115,46,84,111,111,108,84,105,112,83,101,114,118,105,99,101,0]); + DEFINE_IID!(IID_IUIElementCollection, 3596627284, 35062, 17398, 133, 216, 169, 217, 20, 166, 221, 59); + RT_INTERFACE!{interface IUIElementCollection(IUIElementCollectionVtbl): IInspectable(IInspectableVtbl) [IID_IUIElementCollection] { + fn Move(&mut self, oldIndex: u32, newIndex: u32) -> HRESULT + }} + impl IUIElementCollection { + #[inline] pub unsafe fn move_(&mut self, oldIndex: u32, newIndex: u32) -> Result<()> { + let hr = ((*self.lpVtbl).Move)(self, oldIndex, newIndex); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + RT_CLASS!{class UIElementCollection: ::rt::gen::windows::foundation::collections::IVector} + DEFINE_IID!(IID_ICleanUpVirtualizedItemEventArgs, 3926248681, 37756, 16672, 132, 6, 121, 33, 133, 120, 67, 56); + RT_INTERFACE!{interface ICleanUpVirtualizedItemEventArgs(ICleanUpVirtualizedItemEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICleanUpVirtualizedItemEventArgs] { + fn get_Value(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn get_UIElement(&mut self, out: *mut *mut super::UIElement) -> HRESULT, + fn get_Cancel(&mut self, out: *mut bool) -> HRESULT, + fn put_Cancel(&mut self, value: bool) -> HRESULT + }} + impl ICleanUpVirtualizedItemEventArgs { + #[inline] pub unsafe fn get_value(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Value)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_uielement(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_UIElement)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_cancel(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Cancel)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_cancel(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Cancel)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IColumnDefinition, 4159812137, 61476, 18047, 151, 10, 126, 112, 86, 21, 219, 123); + RT_INTERFACE!{interface IColumnDefinition(IColumnDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IColumnDefinition] { + fn get_Width(&mut self, out: *mut super::GridLength) -> HRESULT, + fn put_Width(&mut self, value: super::GridLength) -> HRESULT, + fn get_MaxWidth(&mut self, out: *mut f64) -> HRESULT, + fn put_MaxWidth(&mut self, value: f64) -> HRESULT, + fn get_MinWidth(&mut self, out: *mut f64) -> HRESULT, + fn put_MinWidth(&mut self, value: f64) -> HRESULT, + fn get_ActualWidth(&mut self, out: *mut f64) -> HRESULT + }} + impl IColumnDefinition { + #[inline] pub unsafe fn get_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Width)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_width(&mut self, value: super::GridLength) -> Result<()> { + let hr = ((*self.lpVtbl).put_Width)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_width(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxWidth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_width(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinWidth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_actual_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActualWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IColumnDefinitionStatics, 112252712, 53316, 16582, 148, 46, 174, 96, 234, 199, 72, 81); + RT_INTERFACE!{static interface IColumnDefinitionStatics(IColumnDefinitionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IColumnDefinitionStatics] { + fn get_WidthProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_MaxWidthProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_MinWidthProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IColumnDefinitionStatics { + #[inline] pub unsafe fn get_width_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_WidthProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_width_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxWidthProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_width_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MinWidthProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContextMenuEventArgs, 528347747, 49483, 17704, 182, 240, 99, 121, 153, 216, 60, 198); + RT_INTERFACE!{interface IContextMenuEventArgs(IContextMenuEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContextMenuEventArgs] { + fn get_Handled(&mut self, out: *mut bool) -> HRESULT, + fn put_Handled(&mut self, value: bool) -> HRESULT, + fn get_CursorLeft(&mut self, out: *mut f64) -> HRESULT, + fn get_CursorTop(&mut self, out: *mut f64) -> HRESULT + }} + impl IContextMenuEventArgs { + #[inline] pub unsafe fn get_handled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Handled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_handled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_Handled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_cursor_left(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CursorLeft)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_cursor_top(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CursorTop)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemClickEventArgs, 2620473922, 62106, 18765, 163, 165, 212, 199, 178, 164, 104, 82); + RT_INTERFACE!{interface IItemClickEventArgs(IItemClickEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IItemClickEventArgs] { + fn get_ClickedItem(&mut self, out: *mut *mut IInspectable) -> HRESULT + }} + impl IItemClickEventArgs { + #[inline] pub unsafe fn get_clicked_item(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ClickedItem)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRowDefinition, 1253763113, 55308, 19038, 164, 140, 248, 179, 211, 182, 83, 61); + RT_INTERFACE!{interface IRowDefinition(IRowDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IRowDefinition] { + fn get_Height(&mut self, out: *mut super::GridLength) -> HRESULT, + fn put_Height(&mut self, value: super::GridLength) -> HRESULT, + fn get_MaxHeight(&mut self, out: *mut f64) -> HRESULT, + fn put_MaxHeight(&mut self, value: f64) -> HRESULT, + fn get_MinHeight(&mut self, out: *mut f64) -> HRESULT, + fn put_MinHeight(&mut self, value: f64) -> HRESULT, + fn get_ActualHeight(&mut self, out: *mut f64) -> HRESULT + }} + impl IRowDefinition { + #[inline] pub unsafe fn get_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Height)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_height(&mut self, value: super::GridLength) -> Result<()> { + let hr = ((*self.lpVtbl).put_Height)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_height(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MinHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_min_height(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_MinHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_actual_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ActualHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRowDefinitionStatics, 1524580325, 8278, 18212, 148, 214, 228, 129, 43, 2, 46, 200); + RT_INTERFACE!{static interface IRowDefinitionStatics(IRowDefinitionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRowDefinitionStatics] { + fn get_HeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_MaxHeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_MinHeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRowDefinitionStatics { + #[inline] pub unsafe fn get_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxHeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_min_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MinHeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISelectionChangedEventArgs, 3379745500, 46601, 18264, 133, 30, 167, 153, 194, 29, 233, 125); + RT_INTERFACE!{interface ISelectionChangedEventArgs(ISelectionChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISelectionChangedEventArgs] { + fn get_AddedItems(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_RemovedItems(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + }} + impl ISelectionChangedEventArgs { + #[inline] pub unsafe fn get_added_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AddedItems)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_removed_items(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RemovedItems)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISelectionChangedEventArgsFactory, 296269493, 10288, 17687, 132, 205, 85, 36, 200, 184, 139, 69); + RT_INTERFACE!{interface ISelectionChangedEventArgsFactory(ISelectionChangedEventArgsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISelectionChangedEventArgsFactory] { + fn CreateInstanceWithRemovedItemsAndAddedItems(&mut self, removedItems: *mut ::rt::gen::windows::foundation::collections::IVector, addedItems: *mut ::rt::gen::windows::foundation::collections::IVector, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut SelectionChangedEventArgs) -> HRESULT + }} + impl ISelectionChangedEventArgsFactory { + #[inline] pub unsafe fn create_instance_with_removed_items_and_added_items(&mut self, removedItems: &::rt::gen::windows::foundation::collections::IVector, addedItems: &::rt::gen::windows::foundation::collections::IVector, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstanceWithRemovedItemsAndAddedItems)(self, removedItems as *const _ as *mut _, addedItems as *const _ as *mut _, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextChangedEventArgs, 1305497469, 31249, 19246, 153, 51, 87, 125, 243, 146, 82, 182); + RT_INTERFACE!{interface ITextChangedEventArgs(ITextChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITextChangedEventArgs] { + + }} + DEFINE_IID!(IID_IItemsPanelTemplate, 350934888, 13490, 19351, 191, 60, 232, 215, 50, 48, 162, 170); + RT_INTERFACE!{interface IItemsPanelTemplate(IItemsPanelTemplateVtbl): IInspectable(IInspectableVtbl) [IID_IItemsPanelTemplate] { + + }} + DEFINE_IID!(IID_IBorder, 2038187321, 17853, 17971, 160, 68, 191, 176, 46, 245, 23, 15); + RT_INTERFACE!{interface IBorder(IBorderVtbl): IInspectable(IInspectableVtbl) [IID_IBorder] { + fn get_BorderBrush(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_BorderBrush(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_BorderThickness(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_BorderThickness(&mut self, value: super::Thickness) -> HRESULT, + fn get_Background(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_Background(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_CornerRadius(&mut self, out: *mut super::CornerRadius) -> HRESULT, + fn put_CornerRadius(&mut self, value: super::CornerRadius) -> HRESULT, + fn get_Padding(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_Padding(&mut self, value: super::Thickness) -> HRESULT, + fn get_Child(&mut self, out: *mut *mut super::UIElement) -> HRESULT, + fn put_Child(&mut self, value: *mut super::UIElement) -> HRESULT, + fn get_ChildTransitions(&mut self, out: *mut *mut super::media::animation::TransitionCollection) -> HRESULT, + fn put_ChildTransitions(&mut self, value: *mut super::media::animation::TransitionCollection) -> HRESULT + }} + impl IBorder { + #[inline] pub unsafe fn get_border_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_border_brush(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_BorderBrush)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_thickness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BorderThickness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_border_thickness(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_BorderThickness)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_background(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Background)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_background(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Background)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_corner_radius(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CornerRadius)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_corner_radius(&mut self, value: super::CornerRadius) -> Result<()> { + let hr = ((*self.lpVtbl).put_CornerRadius)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Padding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_padding(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_Padding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_child(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Child)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_child(&mut self, value: &super::UIElement) -> Result<()> { + let hr = ((*self.lpVtbl).put_Child)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_child_transitions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChildTransitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_child_transitions(&mut self, value: &super::media::animation::TransitionCollection) -> Result<()> { + let hr = ((*self.lpVtbl).put_ChildTransitions)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IBorderStatics, 3088913977, 59665, 20439, 164, 196, 185, 199, 240, 8, 183, 252); + RT_INTERFACE!{static interface IBorderStatics(IBorderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBorderStatics] { + fn get_BorderBrushProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_BorderThicknessProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_BackgroundProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_CornerRadiusProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PaddingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ChildTransitionsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IBorderStatics { + #[inline] pub unsafe fn get_border_brush_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderBrushProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_thickness_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderThicknessProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BackgroundProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_corner_radius_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CornerRadiusProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PaddingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_child_transitions_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChildTransitionsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICaptureElement, 832946407, 62215, 19786, 182, 38, 233, 120, 134, 63, 91, 116); + RT_INTERFACE!{interface ICaptureElement(ICaptureElementVtbl): IInspectable(IInspectableVtbl) [IID_ICaptureElement] { + #[cfg(not(feature="windows.media"))] fn __Dummy0(&mut self) -> (), + #[cfg(feature="windows.media")] fn get_Source(&mut self, out: *mut *mut ::rt::gen::windows::media::capture::MediaCapture) -> HRESULT, + #[cfg(not(feature="windows.media"))] fn __Dummy1(&mut self) -> (), + #[cfg(feature="windows.media")] fn put_Source(&mut self, value: *mut ::rt::gen::windows::media::capture::MediaCapture) -> HRESULT, + fn get_Stretch(&mut self, out: *mut super::media::Stretch) -> HRESULT, + fn put_Stretch(&mut self, value: super::media::Stretch) -> HRESULT + }} + impl ICaptureElement { + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[cfg(feature="windows.media")] #[inline] pub unsafe fn set_source(&mut self, value: &::rt::gen::windows::media::capture::MediaCapture) -> Result<()> { + let hr = ((*self.lpVtbl).put_Source)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stretch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Stretch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stretch(&mut self, value: super::media::Stretch) -> Result<()> { + let hr = ((*self.lpVtbl).put_Stretch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICaptureElementStatics, 507743725, 32166, 16542, 128, 110, 48, 90, 228, 173, 155, 63); + RT_INTERFACE!{static interface ICaptureElementStatics(ICaptureElementStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICaptureElementStatics] { + fn get_SourceProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_StretchProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ICaptureElementStatics { + #[inline] pub unsafe fn get_source_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stretch_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StretchProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPresenter, 2046682548, 52535, 18716, 136, 69, 218, 244, 114, 222, 255, 246); + RT_INTERFACE!{interface IContentPresenter(IContentPresenterVtbl): IInspectable(IInspectableVtbl) [IID_IContentPresenter] { + fn get_Content(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Content(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_ContentTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_ContentTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_ContentTemplateSelector(&mut self, out: *mut *mut DataTemplateSelector) -> HRESULT, + fn put_ContentTemplateSelector(&mut self, value: *mut DataTemplateSelector) -> HRESULT, + fn get_ContentTransitions(&mut self, out: *mut *mut super::media::animation::TransitionCollection) -> HRESULT, + fn put_ContentTransitions(&mut self, value: *mut super::media::animation::TransitionCollection) -> HRESULT, + fn get_FontSize(&mut self, out: *mut f64) -> HRESULT, + fn put_FontSize(&mut self, value: f64) -> HRESULT, + fn get_FontFamily(&mut self, out: *mut *mut super::media::FontFamily) -> HRESULT, + fn put_FontFamily(&mut self, value: *mut super::media::FontFamily) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy12(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontWeight(&mut self, out: *mut super::super::text::FontWeight) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy13(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontWeight(&mut self, value: super::super::text::FontWeight) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy14(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontStyle(&mut self, out: *mut super::super::text::FontStyle) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy15(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontStyle(&mut self, value: super::super::text::FontStyle) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy16(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontStretch(&mut self, out: *mut super::super::text::FontStretch) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy17(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontStretch(&mut self, value: super::super::text::FontStretch) -> HRESULT, + fn get_CharacterSpacing(&mut self, out: *mut i32) -> HRESULT, + fn put_CharacterSpacing(&mut self, value: i32) -> HRESULT, + fn get_Foreground(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_Foreground(&mut self, value: *mut super::media::Brush) -> HRESULT + }} + impl IContentPresenter { + #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Content)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_template_selector(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTemplateSelector)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_template_selector(&mut self, value: &DataTemplateSelector) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentTemplateSelector)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_transitions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTransitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_transitions(&mut self, value: &super::media::animation::TransitionCollection) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentTransitions)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_size(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_family(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontFamily)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_family(&mut self, value: &super::media::FontFamily) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontFamily)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_weight(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontWeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_weight(&mut self, value: super::super::text::FontWeight) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontWeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_style(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStyle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_style(&mut self, value: super::super::text::FontStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontStyle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_stretch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStretch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_stretch(&mut self, value: super::super::text::FontStretch) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontStretch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_spacing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharacterSpacing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_character_spacing(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CharacterSpacing)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Foreground)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_foreground(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Foreground)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPresenterOverrides, 2808297965, 13055, 17291, 170, 213, 29, 104, 250, 233, 52, 38); + RT_INTERFACE!{interface IContentPresenterOverrides(IContentPresenterOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IContentPresenterOverrides] { + fn OnContentTemplateChanged(&mut self, oldContentTemplate: *mut super::DataTemplate, newContentTemplate: *mut super::DataTemplate) -> HRESULT, + fn OnContentTemplateSelectorChanged(&mut self, oldContentTemplateSelector: *mut DataTemplateSelector, newContentTemplateSelector: *mut DataTemplateSelector) -> HRESULT + }} + impl IContentPresenterOverrides { + #[inline] pub unsafe fn on_content_template_changed(&mut self, oldContentTemplate: &super::DataTemplate, newContentTemplate: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).OnContentTemplateChanged)(self, oldContentTemplate as *const _ as *mut _, newContentTemplate as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_content_template_selector_changed(&mut self, oldContentTemplateSelector: &DataTemplateSelector, newContentTemplateSelector: &DataTemplateSelector) -> Result<()> { + let hr = ((*self.lpVtbl).OnContentTemplateSelectorChanged)(self, oldContentTemplateSelector as *const _ as *mut _, newContentTemplateSelector as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPresenterStatics, 415402299, 55854, 17446, 184, 90, 44, 126, 33, 113, 190, 223); + RT_INTERFACE!{static interface IContentPresenterStatics(IContentPresenterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IContentPresenterStatics] { + fn get_ContentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ContentTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ContentTemplateSelectorProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ContentTransitionsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontSizeProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontFamilyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontWeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontStyleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontStretchProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_CharacterSpacingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ForegroundProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IContentPresenterStatics { + #[inline] pub unsafe fn get_content_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_template_selector_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTemplateSelectorProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_transitions_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTransitionsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_size_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontSizeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_family_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontFamilyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_weight_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontWeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_style_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontStyleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_stretch_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontStretchProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_spacing_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CharacterSpacingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ForegroundProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPresenterFactory, 859428087, 18453, 17604, 159, 118, 104, 200, 56, 128, 239, 16); + RT_INTERFACE!{interface IContentPresenterFactory(IContentPresenterFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IContentPresenterFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut ContentPresenter) -> HRESULT + }} + impl IContentPresenterFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPresenter2, 1362684248, 13149, 16912, 139, 187, 10, 162, 180, 181, 194, 158); + RT_INTERFACE!{interface IContentPresenter2(IContentPresenter2Vtbl): IInspectable(IInspectableVtbl) [IID_IContentPresenter2] { + fn get_OpticalMarginAlignment(&mut self, out: *mut super::OpticalMarginAlignment) -> HRESULT, + fn put_OpticalMarginAlignment(&mut self, value: super::OpticalMarginAlignment) -> HRESULT, + fn get_TextLineBounds(&mut self, out: *mut super::TextLineBounds) -> HRESULT, + fn put_TextLineBounds(&mut self, value: super::TextLineBounds) -> HRESULT + }} + impl IContentPresenter2 { + #[inline] pub unsafe fn get_optical_margin_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OpticalMarginAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_optical_margin_alignment(&mut self, value: super::OpticalMarginAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_OpticalMarginAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_line_bounds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextLineBounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_line_bounds(&mut self, value: super::TextLineBounds) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextLineBounds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPresenterStatics2, 3352862169, 1766, 18110, 168, 160, 156, 17, 125, 48, 36, 163); + RT_INTERFACE!{static interface IContentPresenterStatics2(IContentPresenterStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IContentPresenterStatics2] { + fn get_OpticalMarginAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextLineBoundsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IContentPresenterStatics2 { + #[inline] pub unsafe fn get_optical_margin_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OpticalMarginAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_line_bounds_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextLineBoundsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPresenter3, 2956494698, 40013, 17410, 172, 86, 162, 35, 72, 125, 198, 200); + RT_INTERFACE!{interface IContentPresenter3(IContentPresenter3Vtbl): IInspectable(IInspectableVtbl) [IID_IContentPresenter3] { + fn get_IsTextScaleFactorEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsTextScaleFactorEnabled(&mut self, value: bool) -> HRESULT + }} + impl IContentPresenter3 { + #[inline] pub unsafe fn get_is_text_scale_factor_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTextScaleFactorEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_text_scale_factor_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTextScaleFactorEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPresenterStatics3, 3420901211, 14513, 19805, 176, 152, 188, 148, 179, 92, 141, 223); + RT_INTERFACE!{static interface IContentPresenterStatics3(IContentPresenterStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IContentPresenterStatics3] { + fn get_IsTextScaleFactorEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IContentPresenterStatics3 { + #[inline] pub unsafe fn get_is_text_scale_factor_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsTextScaleFactorEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPresenter4, 2574981911, 15352, 17195, 143, 217, 104, 199, 186, 178, 31, 157); + RT_INTERFACE!{interface IContentPresenter4(IContentPresenter4Vtbl): IInspectable(IInspectableVtbl) [IID_IContentPresenter4] { + fn get_TextWrapping(&mut self, out: *mut super::TextWrapping) -> HRESULT, + fn put_TextWrapping(&mut self, value: super::TextWrapping) -> HRESULT, + fn get_MaxLines(&mut self, out: *mut i32) -> HRESULT, + fn put_MaxLines(&mut self, value: i32) -> HRESULT, + fn get_LineStackingStrategy(&mut self, out: *mut super::LineStackingStrategy) -> HRESULT, + fn put_LineStackingStrategy(&mut self, value: super::LineStackingStrategy) -> HRESULT, + fn get_LineHeight(&mut self, out: *mut f64) -> HRESULT, + fn put_LineHeight(&mut self, value: f64) -> HRESULT, + fn get_BorderBrush(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_BorderBrush(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_BorderThickness(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_BorderThickness(&mut self, value: super::Thickness) -> HRESULT, + fn get_CornerRadius(&mut self, out: *mut super::CornerRadius) -> HRESULT, + fn put_CornerRadius(&mut self, value: super::CornerRadius) -> HRESULT, + fn get_Padding(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_Padding(&mut self, value: super::Thickness) -> HRESULT, + fn get_Background(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_Background(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_HorizontalContentAlignment(&mut self, out: *mut super::HorizontalAlignment) -> HRESULT, + fn put_HorizontalContentAlignment(&mut self, value: super::HorizontalAlignment) -> HRESULT, + fn get_VerticalContentAlignment(&mut self, out: *mut super::VerticalAlignment) -> HRESULT, + fn put_VerticalContentAlignment(&mut self, value: super::VerticalAlignment) -> HRESULT + }} + impl IContentPresenter4 { + #[inline] pub unsafe fn get_text_wrapping(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextWrapping)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_wrapping(&mut self, value: super::TextWrapping) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextWrapping)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_lines(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxLines)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_lines(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxLines)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_stacking_strategy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineStackingStrategy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_stacking_strategy(&mut self, value: super::LineStackingStrategy) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineStackingStrategy)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_height(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_border_brush(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_BorderBrush)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_thickness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BorderThickness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_border_thickness(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_BorderThickness)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_corner_radius(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CornerRadius)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_corner_radius(&mut self, value: super::CornerRadius) -> Result<()> { + let hr = ((*self.lpVtbl).put_CornerRadius)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Padding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_padding(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_Padding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_background(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Background)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_background(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Background)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_horizontal_content_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HorizontalContentAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_horizontal_content_alignment(&mut self, value: super::HorizontalAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_HorizontalContentAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_content_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VerticalContentAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_vertical_content_alignment(&mut self, value: super::VerticalAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_VerticalContentAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentPresenterStatics4, 4287357586, 44840, 18411, 165, 195, 220, 68, 206, 212, 15, 210); + RT_INTERFACE!{static interface IContentPresenterStatics4(IContentPresenterStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IContentPresenterStatics4] { + fn get_TextWrappingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_MaxLinesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_LineStackingStrategyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_LineHeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_BorderBrushProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_BorderThicknessProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_CornerRadiusProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PaddingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_BackgroundProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HorizontalContentAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_VerticalContentAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IContentPresenterStatics4 { + #[inline] pub unsafe fn get_text_wrapping_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextWrappingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_lines_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxLinesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_stacking_strategy_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LineStackingStrategyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LineHeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_brush_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderBrushProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_thickness_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderThicknessProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_corner_radius_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CornerRadiusProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PaddingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_background_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BackgroundProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_horizontal_content_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HorizontalContentAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_content_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VerticalContentAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IImage, 1230730242, 39667, 20048, 170, 144, 3, 56, 143, 48, 134, 210); + RT_INTERFACE!{interface IImage(IImageVtbl): IInspectable(IInspectableVtbl) [IID_IImage] { + fn get_Source(&mut self, out: *mut *mut super::media::ImageSource) -> HRESULT, + fn put_Source(&mut self, value: *mut super::media::ImageSource) -> HRESULT, + fn get_Stretch(&mut self, out: *mut super::media::Stretch) -> HRESULT, + fn put_Stretch(&mut self, value: super::media::Stretch) -> HRESULT, + fn get_NineGrid(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_NineGrid(&mut self, value: super::Thickness) -> HRESULT, + #[cfg(not(feature="windows.media"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.media")] fn get_PlayToSource(&mut self, out: *mut *mut ::rt::gen::windows::media::playto::PlayToSource) -> HRESULT, + fn add_ImageFailed(&mut self, value: *mut super::ExceptionRoutedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ImageFailed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ImageOpened(&mut self, value: *mut super::RoutedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ImageOpened(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IImage { + #[inline] pub unsafe fn get_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Source)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_source(&mut self, value: &super::media::ImageSource) -> Result<()> { + let hr = ((*self.lpVtbl).put_Source)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stretch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Stretch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stretch(&mut self, value: super::media::Stretch) -> Result<()> { + let hr = ((*self.lpVtbl).put_Stretch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_nine_grid(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_NineGrid)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_nine_grid(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_NineGrid)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_play_to_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlayToSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_image_failed(&mut self, value: &super::ExceptionRoutedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ImageFailed)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_image_failed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ImageFailed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_image_opened(&mut self, value: &super::RoutedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ImageOpened)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_image_opened(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ImageOpened)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IImageStatics, 2307929970, 49974, 17361, 157, 81, 195, 187, 213, 213, 214, 145); + RT_INTERFACE!{static interface IImageStatics(IImageStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IImageStatics] { + fn get_SourceProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_StretchProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_NineGridProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PlayToSourceProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IImageStatics { + #[inline] pub unsafe fn get_source_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SourceProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stretch_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StretchProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_nine_grid_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_NineGridProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_play_to_source_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlayToSourceProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IImage2, 4098167198, 34847, 18619, 135, 58, 100, 65, 124, 164, 240, 2); + RT_INTERFACE!{interface IImage2(IImage2Vtbl): IInspectable(IInspectableVtbl) [IID_IImage2] { + #[cfg(feature="windows.media")] fn GetAsCastingSource(&mut self, out: *mut *mut ::rt::gen::windows::media::casting::CastingSource) -> HRESULT + }} + impl IImage2 { + #[cfg(feature="windows.media")] #[inline] pub unsafe fn get_as_casting_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAsCastingSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IImage3, 116123538, 18370, 19858, 164, 136, 140, 214, 133, 208, 106, 202); + RT_INTERFACE!{interface IImage3(IImage3Vtbl): IInspectable(IInspectableVtbl) [IID_IImage3] { + #[cfg(feature="windows.ui")] fn GetAlphaMask(&mut self, out: *mut *mut super::super::composition::CompositionBrush) -> HRESULT + }} + impl IImage3 { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_alpha_mask(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAlphaMask)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemsPresenter, 3262207643, 28106, 20011, 142, 20, 197, 81, 54, 176, 42, 113); + RT_INTERFACE!{interface IItemsPresenter(IItemsPresenterVtbl): IInspectable(IInspectableVtbl) [IID_IItemsPresenter] { + fn get_Header(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Header(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_HeaderTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_HeaderTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_HeaderTransitions(&mut self, out: *mut *mut super::media::animation::TransitionCollection) -> HRESULT, + fn put_HeaderTransitions(&mut self, value: *mut super::media::animation::TransitionCollection) -> HRESULT, + fn get_Padding(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_Padding(&mut self, value: super::Thickness) -> HRESULT + }} + impl IItemsPresenter { + #[inline] pub unsafe fn get_header(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Header)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Header)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_transitions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTransitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_transitions(&mut self, value: &super::media::animation::TransitionCollection) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderTransitions)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Padding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_padding(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_Padding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemsPresenterStatics, 417228493, 19052, 19246, 170, 134, 203, 18, 108, 154, 41, 32); + RT_INTERFACE!{static interface IItemsPresenterStatics(IItemsPresenterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IItemsPresenterStatics] { + fn get_HeaderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HeaderTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HeaderTransitionsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PaddingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IItemsPresenterStatics { + #[inline] pub unsafe fn get_header_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_transitions_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTransitionsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PaddingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemsPresenter2, 1543809587, 7667, 18225, 164, 201, 218, 129, 131, 120, 214, 61); + RT_INTERFACE!{interface IItemsPresenter2(IItemsPresenter2Vtbl): IInspectable(IInspectableVtbl) [IID_IItemsPresenter2] { + fn get_Footer(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Footer(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_FooterTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_FooterTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_FooterTransitions(&mut self, out: *mut *mut super::media::animation::TransitionCollection) -> HRESULT, + fn put_FooterTransitions(&mut self, value: *mut super::media::animation::TransitionCollection) -> HRESULT + }} + impl IItemsPresenter2 { + #[inline] pub unsafe fn get_footer(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Footer)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_footer(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Footer)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_footer_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FooterTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_footer_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_FooterTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_footer_transitions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FooterTransitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_footer_transitions(&mut self, value: &super::media::animation::TransitionCollection) -> Result<()> { + let hr = ((*self.lpVtbl).put_FooterTransitions)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemsPresenterStatics2, 2305909550, 30823, 19814, 150, 48, 41, 241, 197, 247, 64, 63); + RT_INTERFACE!{static interface IItemsPresenterStatics2(IItemsPresenterStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IItemsPresenterStatics2] { + fn get_FooterProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FooterTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FooterTransitionsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IItemsPresenterStatics2 { + #[inline] pub unsafe fn get_footer_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FooterProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_footer_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FooterTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_footer_transitions_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FooterTransitionsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPanel, 2768915389, 33633, 18076, 144, 218, 233, 164, 12, 116, 116, 223); + RT_INTERFACE!{interface IPanel(IPanelVtbl): IInspectable(IInspectableVtbl) [IID_IPanel] { + fn get_Children(&mut self, out: *mut *mut UIElementCollection) -> HRESULT, + fn get_Background(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_Background(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_IsItemsHost(&mut self, out: *mut bool) -> HRESULT, + fn get_ChildrenTransitions(&mut self, out: *mut *mut super::media::animation::TransitionCollection) -> HRESULT, + fn put_ChildrenTransitions(&mut self, value: *mut super::media::animation::TransitionCollection) -> HRESULT + }} + impl IPanel { + #[inline] pub unsafe fn get_children(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Children)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_background(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Background)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_background(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Background)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_items_host(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsItemsHost)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_children_transitions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChildrenTransitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_children_transitions(&mut self, value: &super::media::animation::TransitionCollection) -> Result<()> { + let hr = ((*self.lpVtbl).put_ChildrenTransitions)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPanelStatics, 4064111453, 33584, 18342, 160, 70, 37, 245, 9, 178, 82, 50); + RT_INTERFACE!{static interface IPanelStatics(IPanelStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPanelStatics] { + fn get_BackgroundProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsItemsHostProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ChildrenTransitionsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IPanelStatics { + #[inline] pub unsafe fn get_background_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BackgroundProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_items_host_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsItemsHostProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_children_transitions_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ChildrenTransitionsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPanelFactory, 4008083729, 51148, 17215, 149, 205, 214, 48, 195, 67, 2, 221); + RT_INTERFACE!{interface IPanelFactory(IPanelFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPanelFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut Panel) -> HRESULT + }} + impl IPanelFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichTextBlock, 3858758114, 47464, 18919, 151, 212, 140, 202, 42, 195, 174, 124); + RT_INTERFACE!{interface IRichTextBlock(IRichTextBlockVtbl): IInspectable(IInspectableVtbl) [IID_IRichTextBlock] { + fn get_FontSize(&mut self, out: *mut f64) -> HRESULT, + fn put_FontSize(&mut self, value: f64) -> HRESULT, + fn get_FontFamily(&mut self, out: *mut *mut super::media::FontFamily) -> HRESULT, + fn put_FontFamily(&mut self, value: *mut super::media::FontFamily) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontWeight(&mut self, out: *mut super::super::text::FontWeight) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontWeight(&mut self, value: super::super::text::FontWeight) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontStyle(&mut self, out: *mut super::super::text::FontStyle) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontStyle(&mut self, value: super::super::text::FontStyle) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontStretch(&mut self, out: *mut super::super::text::FontStretch) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontStretch(&mut self, value: super::super::text::FontStretch) -> HRESULT, + fn get_Foreground(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_Foreground(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_TextWrapping(&mut self, out: *mut super::TextWrapping) -> HRESULT, + fn put_TextWrapping(&mut self, value: super::TextWrapping) -> HRESULT, + fn get_TextTrimming(&mut self, out: *mut super::TextTrimming) -> HRESULT, + fn put_TextTrimming(&mut self, value: super::TextTrimming) -> HRESULT, + fn get_TextAlignment(&mut self, out: *mut super::TextAlignment) -> HRESULT, + fn put_TextAlignment(&mut self, value: super::TextAlignment) -> HRESULT, + fn get_Blocks(&mut self, out: *mut *mut super::documents::BlockCollection) -> HRESULT, + fn get_Padding(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_Padding(&mut self, value: super::Thickness) -> HRESULT, + fn get_LineHeight(&mut self, out: *mut f64) -> HRESULT, + fn put_LineHeight(&mut self, value: f64) -> HRESULT, + fn get_LineStackingStrategy(&mut self, out: *mut super::LineStackingStrategy) -> HRESULT, + fn put_LineStackingStrategy(&mut self, value: super::LineStackingStrategy) -> HRESULT, + fn get_CharacterSpacing(&mut self, out: *mut i32) -> HRESULT, + fn put_CharacterSpacing(&mut self, value: i32) -> HRESULT, + fn get_OverflowContentTarget(&mut self, out: *mut *mut RichTextBlockOverflow) -> HRESULT, + fn put_OverflowContentTarget(&mut self, value: *mut RichTextBlockOverflow) -> HRESULT, + fn get_IsTextSelectionEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsTextSelectionEnabled(&mut self, value: bool) -> HRESULT, + fn get_HasOverflowContent(&mut self, out: *mut bool) -> HRESULT, + fn get_SelectedText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ContentStart(&mut self, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn get_ContentEnd(&mut self, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn get_SelectionStart(&mut self, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn get_SelectionEnd(&mut self, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn get_BaselineOffset(&mut self, out: *mut f64) -> HRESULT, + fn add_SelectionChanged(&mut self, value: *mut super::RoutedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectionChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ContextMenuOpening(&mut self, value: *mut ContextMenuOpeningEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContextMenuOpening(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn SelectAll(&mut self) -> HRESULT, + fn Select(&mut self, start: *mut super::documents::TextPointer, end: *mut super::documents::TextPointer) -> HRESULT, + fn GetPositionFromPoint(&mut self, point: ::rt::gen::windows::foundation::Point, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn Focus(&mut self, value: super::FocusState, out: *mut bool) -> HRESULT, + fn get_TextIndent(&mut self, out: *mut f64) -> HRESULT, + fn put_TextIndent(&mut self, value: f64) -> HRESULT + }} + impl IRichTextBlock { + #[inline] pub unsafe fn get_font_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_size(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_family(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontFamily)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_family(&mut self, value: &super::media::FontFamily) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontFamily)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_weight(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontWeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_weight(&mut self, value: super::super::text::FontWeight) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontWeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_style(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStyle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_style(&mut self, value: super::super::text::FontStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontStyle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_stretch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStretch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_stretch(&mut self, value: super::super::text::FontStretch) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontStretch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Foreground)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_foreground(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Foreground)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_wrapping(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextWrapping)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_wrapping(&mut self, value: super::TextWrapping) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextWrapping)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_trimming(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextTrimming)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_trimming(&mut self, value: super::TextTrimming) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextTrimming)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_alignment(&mut self, value: super::TextAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_blocks(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Blocks)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Padding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_padding(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_Padding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_height(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_stacking_strategy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineStackingStrategy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_stacking_strategy(&mut self, value: super::LineStackingStrategy) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineStackingStrategy)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_spacing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharacterSpacing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_character_spacing(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CharacterSpacing)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_overflow_content_target(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OverflowContentTarget)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_overflow_content_target(&mut self, value: &RichTextBlockOverflow) -> Result<()> { + let hr = ((*self.lpVtbl).put_OverflowContentTarget)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_text_selection_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTextSelectionEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_text_selection_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTextSelectionEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_overflow_content(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasOverflowContent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectedText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_start(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentStart)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_end(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentEnd)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_start(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionStart)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_end(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionEnd)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_baseline_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BaselineOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_selection_changed(&mut self, value: &super::RoutedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SelectionChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_selection_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SelectionChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_context_menu_opening(&mut self, value: &ContextMenuOpeningEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ContextMenuOpening)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_context_menu_opening(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContextMenuOpening)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn select_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SelectAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn select(&mut self, start: &super::documents::TextPointer, end: &super::documents::TextPointer) -> Result<()> { + let hr = ((*self.lpVtbl).Select)(self, start as *const _ as *mut _, end as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_from_point(&mut self, point: ::rt::gen::windows::foundation::Point) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPositionFromPoint)(self, point, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn focus(&mut self, value: super::FocusState) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Focus)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_indent(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextIndent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_indent(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextIndent)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichTextBlockStatics, 1227720764, 44522, 17212, 190, 28, 32, 138, 22, 66, 98, 190); + RT_INTERFACE!{static interface IRichTextBlockStatics(IRichTextBlockStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRichTextBlockStatics] { + fn get_FontSizeProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontFamilyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontWeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontStyleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontStretchProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ForegroundProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextWrappingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextTrimmingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PaddingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_LineHeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_LineStackingStrategyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_CharacterSpacingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OverflowContentTargetProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsTextSelectionEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HasOverflowContentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_SelectedTextProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextIndentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRichTextBlockStatics { + #[inline] pub unsafe fn get_font_size_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontSizeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_family_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontFamilyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_weight_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontWeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_style_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontStyleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_stretch_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontStretchProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ForegroundProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_wrapping_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextWrappingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_trimming_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextTrimmingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PaddingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LineHeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_stacking_strategy_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LineStackingStrategyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_spacing_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CharacterSpacingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_overflow_content_target_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OverflowContentTargetProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_text_selection_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsTextSelectionEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_overflow_content_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HasOverflowContentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_text_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectedTextProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_indent_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextIndentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichTextBlock2, 1059098643, 999, 17672, 150, 74, 145, 174, 218, 179, 209, 30); + RT_INTERFACE!{interface IRichTextBlock2(IRichTextBlock2Vtbl): IInspectable(IInspectableVtbl) [IID_IRichTextBlock2] { + fn get_MaxLines(&mut self, out: *mut i32) -> HRESULT, + fn put_MaxLines(&mut self, value: i32) -> HRESULT, + fn get_TextLineBounds(&mut self, out: *mut super::TextLineBounds) -> HRESULT, + fn put_TextLineBounds(&mut self, value: super::TextLineBounds) -> HRESULT, + fn get_SelectionHighlightColor(&mut self, out: *mut *mut super::media::SolidColorBrush) -> HRESULT, + fn put_SelectionHighlightColor(&mut self, value: *mut super::media::SolidColorBrush) -> HRESULT, + fn get_OpticalMarginAlignment(&mut self, out: *mut super::OpticalMarginAlignment) -> HRESULT, + fn put_OpticalMarginAlignment(&mut self, value: super::OpticalMarginAlignment) -> HRESULT, + fn get_IsColorFontEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsColorFontEnabled(&mut self, value: bool) -> HRESULT, + fn get_TextReadingOrder(&mut self, out: *mut super::TextReadingOrder) -> HRESULT, + fn put_TextReadingOrder(&mut self, value: super::TextReadingOrder) -> HRESULT + }} + impl IRichTextBlock2 { + #[inline] pub unsafe fn get_max_lines(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxLines)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_lines(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxLines)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_line_bounds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextLineBounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_line_bounds(&mut self, value: super::TextLineBounds) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextLineBounds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_highlight_color(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionHighlightColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_selection_highlight_color(&mut self, value: &super::media::SolidColorBrush) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectionHighlightColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_optical_margin_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OpticalMarginAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_optical_margin_alignment(&mut self, value: super::OpticalMarginAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_OpticalMarginAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_color_font_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsColorFontEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_color_font_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsColorFontEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_reading_order(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextReadingOrder)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_reading_order(&mut self, value: super::TextReadingOrder) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextReadingOrder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichTextBlockStatics2, 224473569, 44841, 18638, 138, 175, 116, 236, 194, 139, 251, 176); + RT_INTERFACE!{static interface IRichTextBlockStatics2(IRichTextBlockStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IRichTextBlockStatics2] { + fn get_MaxLinesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextLineBoundsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_SelectionHighlightColorProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OpticalMarginAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsColorFontEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextReadingOrderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRichTextBlockStatics2 { + #[inline] pub unsafe fn get_max_lines_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxLinesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_line_bounds_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextLineBoundsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_highlight_color_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionHighlightColorProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_optical_margin_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OpticalMarginAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_color_font_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsColorFontEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_reading_order_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextReadingOrderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichTextBlock3, 2100932227, 35096, 17939, 176, 7, 124, 137, 139, 162, 149, 14); + RT_INTERFACE!{interface IRichTextBlock3(IRichTextBlock3Vtbl): IInspectable(IInspectableVtbl) [IID_IRichTextBlock3] { + fn get_IsTextScaleFactorEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsTextScaleFactorEnabled(&mut self, value: bool) -> HRESULT + }} + impl IRichTextBlock3 { + #[inline] pub unsafe fn get_is_text_scale_factor_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTextScaleFactorEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_text_scale_factor_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTextScaleFactorEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichTextBlockStatics3, 121601780, 51755, 19273, 165, 154, 49, 216, 250, 116, 51, 50); + RT_INTERFACE!{static interface IRichTextBlockStatics3(IRichTextBlockStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IRichTextBlockStatics3] { + fn get_IsTextScaleFactorEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRichTextBlockStatics3 { + #[inline] pub unsafe fn get_is_text_scale_factor_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsTextScaleFactorEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichTextBlockOverflow, 1335063707, 56003, 19010, 156, 187, 153, 240, 222, 55, 192, 113); + RT_INTERFACE!{interface IRichTextBlockOverflow(IRichTextBlockOverflowVtbl): IInspectable(IInspectableVtbl) [IID_IRichTextBlockOverflow] { + fn get_OverflowContentTarget(&mut self, out: *mut *mut RichTextBlockOverflow) -> HRESULT, + fn put_OverflowContentTarget(&mut self, value: *mut RichTextBlockOverflow) -> HRESULT, + fn get_Padding(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_Padding(&mut self, value: super::Thickness) -> HRESULT, + fn get_ContentSource(&mut self, out: *mut *mut RichTextBlock) -> HRESULT, + fn get_HasOverflowContent(&mut self, out: *mut bool) -> HRESULT, + fn get_ContentStart(&mut self, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn get_ContentEnd(&mut self, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn get_BaselineOffset(&mut self, out: *mut f64) -> HRESULT, + fn GetPositionFromPoint(&mut self, point: ::rt::gen::windows::foundation::Point, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn Focus(&mut self, value: super::FocusState, out: *mut bool) -> HRESULT + }} + impl IRichTextBlockOverflow { + #[inline] pub unsafe fn get_overflow_content_target(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OverflowContentTarget)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_overflow_content_target(&mut self, value: &RichTextBlockOverflow) -> Result<()> { + let hr = ((*self.lpVtbl).put_OverflowContentTarget)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Padding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_padding(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_Padding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_overflow_content(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HasOverflowContent)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_start(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentStart)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_end(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentEnd)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_baseline_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BaselineOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_position_from_point(&mut self, point: ::rt::gen::windows::foundation::Point) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetPositionFromPoint)(self, point, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn focus(&mut self, value: super::FocusState) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Focus)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichTextBlockOverflowStatics, 68862711, 20267, 17347, 161, 34, 63, 234, 156, 169, 220, 135); + RT_INTERFACE!{static interface IRichTextBlockOverflowStatics(IRichTextBlockOverflowStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRichTextBlockOverflowStatics] { + fn get_OverflowContentTargetProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PaddingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HasOverflowContentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRichTextBlockOverflowStatics { + #[inline] pub unsafe fn get_overflow_content_target_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OverflowContentTargetProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PaddingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_has_overflow_content_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HasOverflowContentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichTextBlockOverflow2, 2269274702, 43138, 18470, 185, 41, 77, 92, 57, 5, 185, 161); + RT_INTERFACE!{interface IRichTextBlockOverflow2(IRichTextBlockOverflow2Vtbl): IInspectable(IInspectableVtbl) [IID_IRichTextBlockOverflow2] { + fn get_MaxLines(&mut self, out: *mut i32) -> HRESULT, + fn put_MaxLines(&mut self, value: i32) -> HRESULT + }} + impl IRichTextBlockOverflow2 { + #[inline] pub unsafe fn get_max_lines(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxLines)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_lines(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxLines)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichTextBlockOverflowStatics2, 3052137804, 63684, 19002, 144, 127, 229, 62, 120, 39, 159, 163); + RT_INTERFACE!{static interface IRichTextBlockOverflowStatics2(IRichTextBlockOverflowStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IRichTextBlockOverflowStatics2] { + fn get_MaxLinesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRichTextBlockOverflowStatics2 { + #[inline] pub unsafe fn get_max_lines_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxLinesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBlock, 2922222193, 15178, 17916, 132, 104, 247, 148, 149, 72, 244, 213); + RT_INTERFACE!{interface ITextBlock(ITextBlockVtbl): IInspectable(IInspectableVtbl) [IID_ITextBlock] { + fn get_FontSize(&mut self, out: *mut f64) -> HRESULT, + fn put_FontSize(&mut self, value: f64) -> HRESULT, + fn get_FontFamily(&mut self, out: *mut *mut super::media::FontFamily) -> HRESULT, + fn put_FontFamily(&mut self, value: *mut super::media::FontFamily) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy4(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontWeight(&mut self, out: *mut super::super::text::FontWeight) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy5(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontWeight(&mut self, value: super::super::text::FontWeight) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy6(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontStyle(&mut self, out: *mut super::super::text::FontStyle) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy7(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontStyle(&mut self, value: super::super::text::FontStyle) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy8(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_FontStretch(&mut self, out: *mut super::super::text::FontStretch) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy9(&mut self) -> (), + #[cfg(feature="windows.ui")] fn put_FontStretch(&mut self, value: super::super::text::FontStretch) -> HRESULT, + fn get_CharacterSpacing(&mut self, out: *mut i32) -> HRESULT, + fn put_CharacterSpacing(&mut self, value: i32) -> HRESULT, + fn get_Foreground(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_Foreground(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_TextWrapping(&mut self, out: *mut super::TextWrapping) -> HRESULT, + fn put_TextWrapping(&mut self, value: super::TextWrapping) -> HRESULT, + fn get_TextTrimming(&mut self, out: *mut super::TextTrimming) -> HRESULT, + fn put_TextTrimming(&mut self, value: super::TextTrimming) -> HRESULT, + fn get_TextAlignment(&mut self, out: *mut super::TextAlignment) -> HRESULT, + fn put_TextAlignment(&mut self, value: super::TextAlignment) -> HRESULT, + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Text(&mut self, value: HSTRING) -> HRESULT, + fn get_Inlines(&mut self, out: *mut *mut super::documents::InlineCollection) -> HRESULT, + fn get_Padding(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_Padding(&mut self, value: super::Thickness) -> HRESULT, + fn get_LineHeight(&mut self, out: *mut f64) -> HRESULT, + fn put_LineHeight(&mut self, value: f64) -> HRESULT, + fn get_LineStackingStrategy(&mut self, out: *mut super::LineStackingStrategy) -> HRESULT, + fn put_LineStackingStrategy(&mut self, value: super::LineStackingStrategy) -> HRESULT, + fn get_IsTextSelectionEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsTextSelectionEnabled(&mut self, value: bool) -> HRESULT, + fn get_SelectedText(&mut self, out: *mut HSTRING) -> HRESULT, + fn get_ContentStart(&mut self, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn get_ContentEnd(&mut self, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn get_SelectionStart(&mut self, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn get_SelectionEnd(&mut self, out: *mut *mut super::documents::TextPointer) -> HRESULT, + fn get_BaselineOffset(&mut self, out: *mut f64) -> HRESULT, + fn add_SelectionChanged(&mut self, value: *mut super::RoutedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectionChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ContextMenuOpening(&mut self, value: *mut ContextMenuOpeningEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContextMenuOpening(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn SelectAll(&mut self) -> HRESULT, + fn Select(&mut self, start: *mut super::documents::TextPointer, end: *mut super::documents::TextPointer) -> HRESULT, + fn Focus(&mut self, value: super::FocusState, out: *mut bool) -> HRESULT + }} + impl ITextBlock { + #[inline] pub unsafe fn get_font_size(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontSize)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_size(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontSize)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_family(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontFamily)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_font_family(&mut self, value: &super::media::FontFamily) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontFamily)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_weight(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontWeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_weight(&mut self, value: super::super::text::FontWeight) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontWeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_style(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStyle)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_style(&mut self, value: super::super::text::FontStyle) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontStyle)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_font_stretch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FontStretch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn set_font_stretch(&mut self, value: super::super::text::FontStretch) -> Result<()> { + let hr = ((*self.lpVtbl).put_FontStretch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_spacing(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CharacterSpacing)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_character_spacing(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_CharacterSpacing)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Foreground)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_foreground(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_Foreground)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_wrapping(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextWrapping)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_wrapping(&mut self, value: super::TextWrapping) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextWrapping)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_trimming(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextTrimming)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_trimming(&mut self, value: super::TextTrimming) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextTrimming)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_alignment(&mut self, value: super::TextAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Text)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_inlines(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Inlines)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Padding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_padding(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_Padding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_height(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_stacking_strategy(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_LineStackingStrategy)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_line_stacking_strategy(&mut self, value: super::LineStackingStrategy) -> Result<()> { + let hr = ((*self.lpVtbl).put_LineStackingStrategy)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_text_selection_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTextSelectionEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_text_selection_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTextSelectionEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectedText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_start(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentStart)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_end(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentEnd)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_start(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionStart)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_end(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionEnd)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_baseline_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BaselineOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn add_selection_changed(&mut self, value: &super::RoutedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SelectionChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_selection_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SelectionChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_context_menu_opening(&mut self, value: &ContextMenuOpeningEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ContextMenuOpening)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_context_menu_opening(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContextMenuOpening)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn select_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SelectAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn select(&mut self, start: &super::documents::TextPointer, end: &super::documents::TextPointer) -> Result<()> { + let hr = ((*self.lpVtbl).Select)(self, start as *const _ as *mut _, end as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn focus(&mut self, value: super::FocusState) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).Focus)(self, value, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBlockStatics, 423542850, 43079, 17746, 180, 232, 219, 54, 101, 91, 132, 10); + RT_INTERFACE!{static interface ITextBlockStatics(ITextBlockStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ITextBlockStatics] { + fn get_FontSizeProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontFamilyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontWeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontStyleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FontStretchProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_CharacterSpacingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ForegroundProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextWrappingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextTrimmingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PaddingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_LineHeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_LineStackingStrategyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsTextSelectionEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_SelectedTextProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ITextBlockStatics { + #[inline] pub unsafe fn get_font_size_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontSizeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_family_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontFamilyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_weight_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontWeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_style_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontStyleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_font_stretch_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FontStretchProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_character_spacing_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CharacterSpacingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_foreground_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ForegroundProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_wrapping_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextWrappingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_trimming_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextTrimmingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PaddingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LineHeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_line_stacking_strategy_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LineStackingStrategyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_text_selection_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsTextSelectionEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_text_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectedTextProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBlock2, 1159752268, 2638, 20415, 174, 233, 51, 93, 90, 32, 95, 110); + RT_INTERFACE!{interface ITextBlock2(ITextBlock2Vtbl): IInspectable(IInspectableVtbl) [IID_ITextBlock2] { + fn get_SelectionHighlightColor(&mut self, out: *mut *mut super::media::SolidColorBrush) -> HRESULT, + fn put_SelectionHighlightColor(&mut self, value: *mut super::media::SolidColorBrush) -> HRESULT, + fn get_MaxLines(&mut self, out: *mut i32) -> HRESULT, + fn put_MaxLines(&mut self, value: i32) -> HRESULT, + fn get_TextLineBounds(&mut self, out: *mut super::TextLineBounds) -> HRESULT, + fn put_TextLineBounds(&mut self, value: super::TextLineBounds) -> HRESULT, + fn get_OpticalMarginAlignment(&mut self, out: *mut super::OpticalMarginAlignment) -> HRESULT, + fn put_OpticalMarginAlignment(&mut self, value: super::OpticalMarginAlignment) -> HRESULT, + fn get_IsColorFontEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsColorFontEnabled(&mut self, value: bool) -> HRESULT, + fn get_TextReadingOrder(&mut self, out: *mut super::TextReadingOrder) -> HRESULT, + fn put_TextReadingOrder(&mut self, value: super::TextReadingOrder) -> HRESULT + }} + impl ITextBlock2 { + #[inline] pub unsafe fn get_selection_highlight_color(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionHighlightColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_selection_highlight_color(&mut self, value: &super::media::SolidColorBrush) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectionHighlightColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_lines(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxLines)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_lines(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxLines)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_line_bounds(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextLineBounds)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_line_bounds(&mut self, value: super::TextLineBounds) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextLineBounds)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_optical_margin_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_OpticalMarginAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_optical_margin_alignment(&mut self, value: super::OpticalMarginAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_OpticalMarginAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_color_font_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsColorFontEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_color_font_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsColorFontEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_reading_order(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextReadingOrder)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_reading_order(&mut self, value: super::TextReadingOrder) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextReadingOrder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBlockStatics2, 2282752795, 65316, 19347, 160, 230, 240, 41, 201, 72, 113, 241); + RT_INTERFACE!{static interface ITextBlockStatics2(ITextBlockStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ITextBlockStatics2] { + fn get_SelectionHighlightColorProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_MaxLinesProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextLineBoundsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OpticalMarginAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsColorFontEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextReadingOrderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ITextBlockStatics2 { + #[inline] pub unsafe fn get_selection_highlight_color_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionHighlightColorProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_lines_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxLinesProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_line_bounds_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextLineBoundsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_optical_margin_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OpticalMarginAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_color_font_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsColorFontEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_reading_order_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextReadingOrderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBlock3, 3058818394, 16971, 18627, 155, 103, 72, 111, 78, 19, 152, 153); + RT_INTERFACE!{interface ITextBlock3(ITextBlock3Vtbl): IInspectable(IInspectableVtbl) [IID_ITextBlock3] { + fn get_IsTextScaleFactorEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsTextScaleFactorEnabled(&mut self, value: bool) -> HRESULT + }} + impl ITextBlock3 { + #[inline] pub unsafe fn get_is_text_scale_factor_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTextScaleFactorEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_text_scale_factor_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTextScaleFactorEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBlockStatics3, 2367076843, 8353, 20139, 187, 242, 29, 107, 220, 188, 215, 5); + RT_INTERFACE!{static interface ITextBlockStatics3(ITextBlockStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_ITextBlockStatics3] { + fn get_IsTextScaleFactorEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ITextBlockStatics3 { + #[inline] pub unsafe fn get_is_text_scale_factor_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsTextScaleFactorEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBlock4, 2954162800, 38920, 19164, 180, 82, 96, 205, 165, 65, 0, 193); + RT_INTERFACE!{interface ITextBlock4(ITextBlock4Vtbl): IInspectable(IInspectableVtbl) [IID_ITextBlock4] { + #[cfg(feature="windows.ui")] fn GetAlphaMask(&mut self, out: *mut *mut super::super::composition::CompositionBrush) -> HRESULT + }} + impl ITextBlock4 { + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_alpha_mask(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAlphaMask)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IViewbox, 86322264, 47773, 18441, 158, 195, 250, 13, 22, 113, 11, 161); + RT_INTERFACE!{interface IViewbox(IViewboxVtbl): IInspectable(IInspectableVtbl) [IID_IViewbox] { + fn get_Child(&mut self, out: *mut *mut super::UIElement) -> HRESULT, + fn put_Child(&mut self, value: *mut super::UIElement) -> HRESULT, + fn get_Stretch(&mut self, out: *mut super::media::Stretch) -> HRESULT, + fn put_Stretch(&mut self, value: super::media::Stretch) -> HRESULT, + fn get_StretchDirection(&mut self, out: *mut StretchDirection) -> HRESULT, + fn put_StretchDirection(&mut self, value: StretchDirection) -> HRESULT + }} + impl IViewbox { + #[inline] pub unsafe fn get_child(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Child)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_child(&mut self, value: &super::UIElement) -> Result<()> { + let hr = ((*self.lpVtbl).put_Child)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stretch(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Stretch)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stretch(&mut self, value: super::media::Stretch) -> Result<()> { + let hr = ((*self.lpVtbl).put_Stretch)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_stretch_direction(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StretchDirection)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_stretch_direction(&mut self, value: StretchDirection) -> Result<()> { + let hr = ((*self.lpVtbl).put_StretchDirection)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IViewboxStatics, 1557260077, 59603, 18533, 143, 8, 182, 178, 214, 137, 173, 241); + RT_INTERFACE!{static interface IViewboxStatics(IViewboxStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IViewboxStatics] { + fn get_StretchProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_StretchDirectionProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IViewboxStatics { + #[inline] pub unsafe fn get_stretch_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StretchProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_stretch_direction_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StretchDirectionProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICanvas, 2031685145, 52536, 18467, 174, 174, 100, 167, 113, 50, 245, 25); + RT_INTERFACE!{interface ICanvas(ICanvasVtbl): IInspectable(IInspectableVtbl) [IID_ICanvas] { + + }} + DEFINE_IID!(IID_ICanvasStatics, 1087265862, 10594, 17519, 170, 251, 76, 220, 72, 105, 57, 201); + RT_INTERFACE!{static interface ICanvasStatics(ICanvasStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICanvasStatics] { + fn get_LeftProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetLeft(&mut self, element: *mut super::UIElement, out: *mut f64) -> HRESULT, + fn SetLeft(&mut self, element: *mut super::UIElement, length: f64) -> HRESULT, + fn get_TopProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetTop(&mut self, element: *mut super::UIElement, out: *mut f64) -> HRESULT, + fn SetTop(&mut self, element: *mut super::UIElement, length: f64) -> HRESULT, + fn get_ZIndexProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetZIndex(&mut self, element: *mut super::UIElement, out: *mut i32) -> HRESULT, + fn SetZIndex(&mut self, element: *mut super::UIElement, value: i32) -> HRESULT + }} + impl ICanvasStatics { + #[inline] pub unsafe fn get_left_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LeftProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_left(&mut self, element: &super::UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetLeft)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_left(&mut self, element: &super::UIElement, length: f64) -> Result<()> { + let hr = ((*self.lpVtbl).SetLeft)(self, element as *const _ as *mut _, length); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_top_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TopProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_top(&mut self, element: &super::UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetTop)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_top(&mut self, element: &super::UIElement, length: f64) -> Result<()> { + let hr = ((*self.lpVtbl).SetTop)(self, element as *const _ as *mut _, length); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_zindex_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZIndexProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zindex(&mut self, element: &super::UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetZIndex)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_zindex(&mut self, element: &super::UIElement, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetZIndex)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ICanvasFactory, 456297425, 46080, 19086, 148, 59, 90, 210, 196, 91, 224, 223); + RT_INTERFACE!{interface ICanvasFactory(ICanvasFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICanvasFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut Canvas) -> HRESULT + }} + impl ICanvasFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentControl, 2725106140, 52548, 17244, 190, 148, 1, 214, 36, 28, 35, 28); + RT_INTERFACE!{interface IContentControl(IContentControlVtbl): IInspectable(IInspectableVtbl) [IID_IContentControl] { + fn get_Content(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Content(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_ContentTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_ContentTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_ContentTemplateSelector(&mut self, out: *mut *mut DataTemplateSelector) -> HRESULT, + fn put_ContentTemplateSelector(&mut self, value: *mut DataTemplateSelector) -> HRESULT, + fn get_ContentTransitions(&mut self, out: *mut *mut super::media::animation::TransitionCollection) -> HRESULT, + fn put_ContentTransitions(&mut self, value: *mut super::media::animation::TransitionCollection) -> HRESULT + }} + impl IContentControl { + #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Content)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_template_selector(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTemplateSelector)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_template_selector(&mut self, value: &DataTemplateSelector) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentTemplateSelector)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_transitions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTransitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content_transitions(&mut self, value: &super::media::animation::TransitionCollection) -> Result<()> { + let hr = ((*self.lpVtbl).put_ContentTransitions)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentControlOverrides, 1598819088, 58254, 19293, 190, 26, 94, 208, 66, 70, 166, 53); + RT_INTERFACE!{interface IContentControlOverrides(IContentControlOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IContentControlOverrides] { + fn OnContentChanged(&mut self, oldContent: *mut IInspectable, newContent: *mut IInspectable) -> HRESULT, + fn OnContentTemplateChanged(&mut self, oldContentTemplate: *mut super::DataTemplate, newContentTemplate: *mut super::DataTemplate) -> HRESULT, + fn OnContentTemplateSelectorChanged(&mut self, oldContentTemplateSelector: *mut DataTemplateSelector, newContentTemplateSelector: *mut DataTemplateSelector) -> HRESULT + }} + impl IContentControlOverrides { + #[inline] pub unsafe fn on_content_changed(&mut self, oldContent: &IInspectable, newContent: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).OnContentChanged)(self, oldContent as *const _ as *mut _, newContent as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_content_template_changed(&mut self, oldContentTemplate: &super::DataTemplate, newContentTemplate: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).OnContentTemplateChanged)(self, oldContentTemplate as *const _ as *mut _, newContentTemplate as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_content_template_selector_changed(&mut self, oldContentTemplateSelector: &DataTemplateSelector, newContentTemplateSelector: &DataTemplateSelector) -> Result<()> { + let hr = ((*self.lpVtbl).OnContentTemplateSelectorChanged)(self, oldContentTemplateSelector as *const _ as *mut _, newContentTemplateSelector as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentControlStatics, 292127396, 23797, 19461, 165, 63, 21, 228, 135, 108, 133, 236); + RT_INTERFACE!{static interface IContentControlStatics(IContentControlStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IContentControlStatics] { + fn get_ContentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ContentTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ContentTemplateSelectorProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ContentTransitionsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IContentControlStatics { + #[inline] pub unsafe fn get_content_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_template_selector_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTemplateSelectorProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_content_transitions_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTransitionsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentControlFactory, 2869000985, 6510, 20181, 162, 127, 85, 197, 143, 177, 103, 63); + RT_INTERFACE!{interface IContentControlFactory(IContentControlFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IContentControlFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut ContentControl) -> HRESULT + }} + impl IContentControlFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IContentControl2, 1697390732, 36047, 17305, 189, 62, 90, 1, 90, 161, 188, 3); + RT_INTERFACE!{interface IContentControl2(IContentControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IContentControl2] { + fn get_ContentTemplateRoot(&mut self, out: *mut *mut super::UIElement) -> HRESULT + }} + impl IContentControl2 { + #[inline] pub unsafe fn get_content_template_root(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentTemplateRoot)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGrid, 4245701728, 11797, 19363, 139, 143, 250, 105, 58, 65, 97, 233); + RT_INTERFACE!{interface IGrid(IGridVtbl): IInspectable(IInspectableVtbl) [IID_IGrid] { + fn get_RowDefinitions(&mut self, out: *mut *mut RowDefinitionCollection) -> HRESULT, + fn get_ColumnDefinitions(&mut self, out: *mut *mut ColumnDefinitionCollection) -> HRESULT + }} + impl IGrid { + #[inline] pub unsafe fn get_row_definitions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RowDefinitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_column_definitions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ColumnDefinitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGridStatics, 1694379679, 63825, 17078, 169, 206, 187, 23, 154, 241, 21, 149); + RT_INTERFACE!{static interface IGridStatics(IGridStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGridStatics] { + fn get_RowProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetRow(&mut self, element: *mut super::FrameworkElement, out: *mut i32) -> HRESULT, + fn SetRow(&mut self, element: *mut super::FrameworkElement, value: i32) -> HRESULT, + fn get_ColumnProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetColumn(&mut self, element: *mut super::FrameworkElement, out: *mut i32) -> HRESULT, + fn SetColumn(&mut self, element: *mut super::FrameworkElement, value: i32) -> HRESULT, + fn get_RowSpanProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetRowSpan(&mut self, element: *mut super::FrameworkElement, out: *mut i32) -> HRESULT, + fn SetRowSpan(&mut self, element: *mut super::FrameworkElement, value: i32) -> HRESULT, + fn get_ColumnSpanProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetColumnSpan(&mut self, element: *mut super::FrameworkElement, out: *mut i32) -> HRESULT, + fn SetColumnSpan(&mut self, element: *mut super::FrameworkElement, value: i32) -> HRESULT + }} + impl IGridStatics { + #[inline] pub unsafe fn get_row_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RowProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_row(&mut self, element: &super::FrameworkElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetRow)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_row(&mut self, element: &super::FrameworkElement, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetRow)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_column_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ColumnProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_column(&mut self, element: &super::FrameworkElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetColumn)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_column(&mut self, element: &super::FrameworkElement, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetColumn)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_row_span_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RowSpanProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_row_span(&mut self, element: &super::FrameworkElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetRowSpan)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_row_span(&mut self, element: &super::FrameworkElement, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetRowSpan)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_column_span_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ColumnSpanProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_column_span(&mut self, element: &super::FrameworkElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetColumnSpan)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_column_span(&mut self, element: &super::FrameworkElement, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetColumnSpan)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGridFactory, 2927706177, 50481, 17332, 191, 153, 18, 245, 6, 247, 176, 28); + RT_INTERFACE!{interface IGridFactory(IGridFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGridFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut Grid) -> HRESULT + }} + impl IGridFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGrid2, 4151245377, 14350, 17883, 190, 135, 158, 19, 38, 186, 75, 87); + RT_INTERFACE!{interface IGrid2(IGrid2Vtbl): IInspectable(IInspectableVtbl) [IID_IGrid2] { + fn get_BorderBrush(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_BorderBrush(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_BorderThickness(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_BorderThickness(&mut self, value: super::Thickness) -> HRESULT, + fn get_CornerRadius(&mut self, out: *mut super::CornerRadius) -> HRESULT, + fn put_CornerRadius(&mut self, value: super::CornerRadius) -> HRESULT, + fn get_Padding(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_Padding(&mut self, value: super::Thickness) -> HRESULT + }} + impl IGrid2 { + #[inline] pub unsafe fn get_border_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_border_brush(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_BorderBrush)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_thickness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BorderThickness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_border_thickness(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_BorderThickness)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_corner_radius(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CornerRadius)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_corner_radius(&mut self, value: super::CornerRadius) -> Result<()> { + let hr = ((*self.lpVtbl).put_CornerRadius)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Padding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_padding(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_Padding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IGridStatics2, 761685592, 22710, 18971, 132, 27, 135, 91, 169, 59, 93, 106); + RT_INTERFACE!{static interface IGridStatics2(IGridStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGridStatics2] { + fn get_BorderBrushProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_BorderThicknessProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_CornerRadiusProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PaddingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IGridStatics2 { + #[inline] pub unsafe fn get_border_brush_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderBrushProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_thickness_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderThicknessProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_corner_radius_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CornerRadiusProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PaddingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemsControl, 4104723928, 55673, 17281, 134, 82, 189, 160, 52, 42, 118, 94); + RT_INTERFACE!{interface IItemsControl(IItemsControlVtbl): IInspectable(IInspectableVtbl) [IID_IItemsControl] { + fn get_ItemsSource(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_ItemsSource(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_Items(&mut self, out: *mut *mut ItemCollection) -> HRESULT, + fn get_ItemTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_ItemTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_ItemTemplateSelector(&mut self, out: *mut *mut DataTemplateSelector) -> HRESULT, + fn put_ItemTemplateSelector(&mut self, value: *mut DataTemplateSelector) -> HRESULT, + fn get_ItemsPanel(&mut self, out: *mut *mut ItemsPanelTemplate) -> HRESULT, + fn put_ItemsPanel(&mut self, value: *mut ItemsPanelTemplate) -> HRESULT, + fn get_DisplayMemberPath(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_DisplayMemberPath(&mut self, value: HSTRING) -> HRESULT, + fn get_ItemContainerStyle(&mut self, out: *mut *mut super::Style) -> HRESULT, + fn put_ItemContainerStyle(&mut self, value: *mut super::Style) -> HRESULT, + fn get_ItemContainerStyleSelector(&mut self, out: *mut *mut StyleSelector) -> HRESULT, + fn put_ItemContainerStyleSelector(&mut self, value: *mut StyleSelector) -> HRESULT, + fn get_ItemContainerGenerator(&mut self, out: *mut *mut ItemContainerGenerator) -> HRESULT, + fn get_ItemContainerTransitions(&mut self, out: *mut *mut super::media::animation::TransitionCollection) -> HRESULT, + fn put_ItemContainerTransitions(&mut self, value: *mut super::media::animation::TransitionCollection) -> HRESULT, + fn get_GroupStyle(&mut self, out: *mut *mut ::rt::gen::windows::foundation::collections::IObservableVector) -> HRESULT, + fn get_GroupStyleSelector(&mut self, out: *mut *mut GroupStyleSelector) -> HRESULT, + fn put_GroupStyleSelector(&mut self, value: *mut GroupStyleSelector) -> HRESULT, + fn get_IsGrouping(&mut self, out: *mut bool) -> HRESULT + }} + impl IItemsControl { + #[inline] pub unsafe fn get_items_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemsSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_items_source(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_ItemsSource)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_items(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Items)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_item_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_ItemTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_template_selector(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemTemplateSelector)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_item_template_selector(&mut self, value: &DataTemplateSelector) -> Result<()> { + let hr = ((*self.lpVtbl).put_ItemTemplateSelector)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_items_panel(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemsPanel)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_items_panel(&mut self, value: &ItemsPanelTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_ItemsPanel)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_member_path(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayMemberPath)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_display_member_path(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_DisplayMemberPath)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_container_style(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemContainerStyle)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_item_container_style(&mut self, value: &super::Style) -> Result<()> { + let hr = ((*self.lpVtbl).put_ItemContainerStyle)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_container_style_selector(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemContainerStyleSelector)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_item_container_style_selector(&mut self, value: &StyleSelector) -> Result<()> { + let hr = ((*self.lpVtbl).put_ItemContainerStyleSelector)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_container_generator(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemContainerGenerator)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_container_transitions(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemContainerTransitions)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_item_container_transitions(&mut self, value: &super::media::animation::TransitionCollection) -> Result<()> { + let hr = ((*self.lpVtbl).put_ItemContainerTransitions)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_group_style(&mut self) -> Result>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GroupStyle)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_group_style_selector(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GroupStyleSelector)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_group_style_selector(&mut self, value: &GroupStyleSelector) -> Result<()> { + let hr = ((*self.lpVtbl).put_GroupStyleSelector)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_grouping(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsGrouping)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemsControlOverrides, 3348870171, 41092, 17153, 164, 150, 114, 151, 31, 54, 78, 209); + RT_INTERFACE!{interface IItemsControlOverrides(IItemsControlOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IItemsControlOverrides] { + fn IsItemItsOwnContainerOverride(&mut self, item: *mut IInspectable, out: *mut bool) -> HRESULT, + fn GetContainerForItemOverride(&mut self, out: *mut *mut super::DependencyObject) -> HRESULT, + fn ClearContainerForItemOverride(&mut self, element: *mut super::DependencyObject, item: *mut IInspectable) -> HRESULT, + fn PrepareContainerForItemOverride(&mut self, element: *mut super::DependencyObject, item: *mut IInspectable) -> HRESULT, + fn OnItemsChanged(&mut self, e: *mut IInspectable) -> HRESULT, + fn OnItemContainerStyleChanged(&mut self, oldItemContainerStyle: *mut super::Style, newItemContainerStyle: *mut super::Style) -> HRESULT, + fn OnItemContainerStyleSelectorChanged(&mut self, oldItemContainerStyleSelector: *mut StyleSelector, newItemContainerStyleSelector: *mut StyleSelector) -> HRESULT, + fn OnItemTemplateChanged(&mut self, oldItemTemplate: *mut super::DataTemplate, newItemTemplate: *mut super::DataTemplate) -> HRESULT, + fn OnItemTemplateSelectorChanged(&mut self, oldItemTemplateSelector: *mut DataTemplateSelector, newItemTemplateSelector: *mut DataTemplateSelector) -> HRESULT, + fn OnGroupStyleSelectorChanged(&mut self, oldGroupStyleSelector: *mut GroupStyleSelector, newGroupStyleSelector: *mut GroupStyleSelector) -> HRESULT + }} + impl IItemsControlOverrides { + #[inline] pub unsafe fn is_item_its_own_container_override(&mut self, item: &IInspectable) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).IsItemItsOwnContainerOverride)(self, item as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn get_container_for_item_override(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetContainerForItemOverride)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn clear_container_for_item_override(&mut self, element: &super::DependencyObject, item: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).ClearContainerForItemOverride)(self, element as *const _ as *mut _, item as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn prepare_container_for_item_override(&mut self, element: &super::DependencyObject, item: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).PrepareContainerForItemOverride)(self, element as *const _ as *mut _, item as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_items_changed(&mut self, e: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).OnItemsChanged)(self, e as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_item_container_style_changed(&mut self, oldItemContainerStyle: &super::Style, newItemContainerStyle: &super::Style) -> Result<()> { + let hr = ((*self.lpVtbl).OnItemContainerStyleChanged)(self, oldItemContainerStyle as *const _ as *mut _, newItemContainerStyle as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_item_container_style_selector_changed(&mut self, oldItemContainerStyleSelector: &StyleSelector, newItemContainerStyleSelector: &StyleSelector) -> Result<()> { + let hr = ((*self.lpVtbl).OnItemContainerStyleSelectorChanged)(self, oldItemContainerStyleSelector as *const _ as *mut _, newItemContainerStyleSelector as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_item_template_changed(&mut self, oldItemTemplate: &super::DataTemplate, newItemTemplate: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).OnItemTemplateChanged)(self, oldItemTemplate as *const _ as *mut _, newItemTemplate as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_item_template_selector_changed(&mut self, oldItemTemplateSelector: &DataTemplateSelector, newItemTemplateSelector: &DataTemplateSelector) -> Result<()> { + let hr = ((*self.lpVtbl).OnItemTemplateSelectorChanged)(self, oldItemTemplateSelector as *const _ as *mut _, newItemTemplateSelector as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_group_style_selector_changed(&mut self, oldGroupStyleSelector: &GroupStyleSelector, newGroupStyleSelector: &GroupStyleSelector) -> Result<()> { + let hr = ((*self.lpVtbl).OnGroupStyleSelectorChanged)(self, oldGroupStyleSelector as *const _ as *mut _, newGroupStyleSelector as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemsControlStatics, 937082249, 56571, 17848, 154, 254, 135, 77, 240, 151, 144, 94); + RT_INTERFACE!{static interface IItemsControlStatics(IItemsControlStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IItemsControlStatics] { + fn get_ItemsSourceProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ItemTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ItemTemplateSelectorProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ItemsPanelProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_DisplayMemberPathProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ItemContainerStyleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ItemContainerStyleSelectorProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ItemContainerTransitionsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_GroupStyleSelectorProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsGroupingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetItemsOwner(&mut self, element: *mut super::DependencyObject, out: *mut *mut ItemsControl) -> HRESULT, + fn ItemsControlFromItemContainer(&mut self, container: *mut super::DependencyObject, out: *mut *mut ItemsControl) -> HRESULT + }} + impl IItemsControlStatics { + #[inline] pub unsafe fn get_items_source_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemsSourceProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_template_selector_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemTemplateSelectorProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_items_panel_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemsPanelProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_display_member_path_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DisplayMemberPathProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_container_style_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemContainerStyleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_container_style_selector_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemContainerStyleSelectorProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_container_transitions_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemContainerTransitionsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_group_style_selector_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_GroupStyleSelectorProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_grouping_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsGroupingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_items_owner(&mut self, element: &super::DependencyObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetItemsOwner)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn items_control_from_item_container(&mut self, container: &super::DependencyObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).ItemsControlFromItemContainer)(self, container as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemsControlFactory, 4156277593, 63741, 18204, 188, 178, 44, 116, 190, 142, 191, 140); + RT_INTERFACE!{interface IItemsControlFactory(IItemsControlFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IItemsControlFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut ItemsControl) -> HRESULT + }} + impl IItemsControlFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemsControl2, 1967927910, 1321, 17891, 135, 72, 191, 116, 125, 21, 131, 87); + RT_INTERFACE!{interface IItemsControl2(IItemsControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IItemsControl2] { + fn get_ItemsPanelRoot(&mut self, out: *mut *mut Panel) -> HRESULT + }} + impl IItemsControl2 { + #[inline] pub unsafe fn get_items_panel_root(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemsPanelRoot)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IItemsControl3, 1345025161, 44772, 19939, 162, 171, 25, 90, 194, 12, 66, 18); + RT_INTERFACE!{interface IItemsControl3(IItemsControl3Vtbl): IInspectable(IInspectableVtbl) [IID_IItemsControl3] { + fn GroupHeaderContainerFromItemContainer(&mut self, itemContainer: *mut super::DependencyObject, out: *mut *mut super::DependencyObject) -> HRESULT + }} + impl IItemsControl3 { + #[inline] pub unsafe fn group_header_container_from_item_container(&mut self, itemContainer: &super::DependencyObject) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GroupHeaderContainerFromItemContainer)(self, itemContainer as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaTransportControls, 3606486653, 2085, 18857, 159, 206, 85, 134, 216, 105, 79, 12); + RT_INTERFACE!{interface IMediaTransportControls(IMediaTransportControlsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaTransportControls] { + fn get_IsFullWindowButtonVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsFullWindowButtonVisible(&mut self, value: bool) -> HRESULT, + fn get_IsFullWindowEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsFullWindowEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsZoomButtonVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsZoomButtonVisible(&mut self, value: bool) -> HRESULT, + fn get_IsZoomEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsZoomEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsFastForwardButtonVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsFastForwardButtonVisible(&mut self, value: bool) -> HRESULT, + fn get_IsFastForwardEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsFastForwardEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsFastRewindButtonVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsFastRewindButtonVisible(&mut self, value: bool) -> HRESULT, + fn get_IsFastRewindEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsFastRewindEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsStopButtonVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsStopButtonVisible(&mut self, value: bool) -> HRESULT, + fn get_IsStopEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsStopEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsVolumeButtonVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsVolumeButtonVisible(&mut self, value: bool) -> HRESULT, + fn get_IsVolumeEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsVolumeEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsPlaybackRateButtonVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPlaybackRateButtonVisible(&mut self, value: bool) -> HRESULT, + fn get_IsPlaybackRateEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPlaybackRateEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsSeekBarVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSeekBarVisible(&mut self, value: bool) -> HRESULT, + fn get_IsSeekEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSeekEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsCompact(&mut self, out: *mut bool) -> HRESULT, + fn put_IsCompact(&mut self, value: bool) -> HRESULT + }} + impl IMediaTransportControls { + #[inline] pub unsafe fn get_is_full_window_button_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFullWindowButtonVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_full_window_button_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsFullWindowButtonVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_full_window_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFullWindowEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_full_window_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsFullWindowEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_zoom_button_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsZoomButtonVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_zoom_button_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsZoomButtonVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_zoom_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsZoomEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_zoom_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsZoomEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_fast_forward_button_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFastForwardButtonVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_fast_forward_button_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsFastForwardButtonVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_fast_forward_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFastForwardEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_fast_forward_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsFastForwardEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_fast_rewind_button_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFastRewindButtonVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_fast_rewind_button_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsFastRewindButtonVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_fast_rewind_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsFastRewindEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_fast_rewind_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsFastRewindEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_stop_button_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStopButtonVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_stop_button_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsStopButtonVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_stop_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsStopEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_stop_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsStopEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_volume_button_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsVolumeButtonVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_volume_button_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsVolumeButtonVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_volume_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsVolumeEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_volume_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsVolumeEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_playback_rate_button_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPlaybackRateButtonVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_playback_rate_button_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPlaybackRateButtonVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_playback_rate_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPlaybackRateEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_playback_rate_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPlaybackRateEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_seek_bar_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSeekBarVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_seek_bar_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSeekBarVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_seek_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSeekEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_seek_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSeekEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_compact(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsCompact)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_compact(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsCompact)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaTransportControlsStatics, 1494132999, 53999, 19482, 148, 41, 180, 177, 93, 100, 253, 86); + RT_INTERFACE!{static interface IMediaTransportControlsStatics(IMediaTransportControlsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaTransportControlsStatics] { + fn get_IsFullWindowButtonVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsFullWindowEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsZoomButtonVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsZoomEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsFastForwardButtonVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsFastForwardEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsFastRewindButtonVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsFastRewindEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsStopButtonVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsStopEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsVolumeButtonVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsVolumeEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsPlaybackRateButtonVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsPlaybackRateEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsSeekBarVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsSeekEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsCompactProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IMediaTransportControlsStatics { + #[inline] pub unsafe fn get_is_full_window_button_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsFullWindowButtonVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_full_window_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsFullWindowEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_zoom_button_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsZoomButtonVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_zoom_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsZoomEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_fast_forward_button_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsFastForwardButtonVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_fast_forward_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsFastForwardEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_fast_rewind_button_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsFastRewindButtonVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_fast_rewind_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsFastRewindEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_stop_button_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsStopButtonVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_stop_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsStopEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_volume_button_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsVolumeButtonVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_volume_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsVolumeEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_playback_rate_button_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsPlaybackRateButtonVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_playback_rate_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsPlaybackRateEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_seek_bar_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsSeekBarVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_seek_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsSeekEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_compact_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsCompactProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaTransportControlsFactory, 497156442, 43236, 19483, 136, 201, 11, 24, 62, 204, 98, 227); + RT_INTERFACE!{interface IMediaTransportControlsFactory(IMediaTransportControlsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IMediaTransportControlsFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut MediaTransportControls) -> HRESULT + }} + impl IMediaTransportControlsFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaTransportControls2, 730460140, 7146, 17694, 139, 205, 207, 226, 217, 66, 50, 98); + RT_INTERFACE!{interface IMediaTransportControls2(IMediaTransportControls2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaTransportControls2] { + fn get_IsSkipForwardButtonVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSkipForwardButtonVisible(&mut self, value: bool) -> HRESULT, + fn get_IsSkipForwardEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSkipForwardEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsSkipBackwardButtonVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSkipBackwardButtonVisible(&mut self, value: bool) -> HRESULT, + fn get_IsSkipBackwardEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSkipBackwardEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsNextTrackButtonVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsNextTrackButtonVisible(&mut self, value: bool) -> HRESULT, + fn get_IsPreviousTrackButtonVisible(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPreviousTrackButtonVisible(&mut self, value: bool) -> HRESULT, + fn get_FastPlayFallbackBehaviour(&mut self, out: *mut super::media::FastPlayFallbackBehaviour) -> HRESULT, + fn put_FastPlayFallbackBehaviour(&mut self, value: super::media::FastPlayFallbackBehaviour) -> HRESULT, + fn add_ThumbnailRequested(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ThumbnailRequested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IMediaTransportControls2 { + #[inline] pub unsafe fn get_is_skip_forward_button_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSkipForwardButtonVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_skip_forward_button_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSkipForwardButtonVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_skip_forward_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSkipForwardEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_skip_forward_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSkipForwardEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_skip_backward_button_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSkipBackwardButtonVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_skip_backward_button_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSkipBackwardButtonVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_skip_backward_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSkipBackwardEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_skip_backward_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSkipBackwardEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_next_track_button_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsNextTrackButtonVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_next_track_button_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsNextTrackButtonVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_previous_track_button_visible(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPreviousTrackButtonVisible)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_previous_track_button_visible(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPreviousTrackButtonVisible)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_fast_play_fallback_behaviour(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_FastPlayFallbackBehaviour)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_fast_play_fallback_behaviour(&mut self, value: super::media::FastPlayFallbackBehaviour) -> Result<()> { + let hr = ((*self.lpVtbl).put_FastPlayFallbackBehaviour)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_thumbnail_requested(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ThumbnailRequested)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_thumbnail_requested(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ThumbnailRequested)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IMediaTransportControlsStatics2, 388550620, 22047, 17286, 167, 248, 9, 13, 149, 246, 141, 150); + RT_INTERFACE!{static interface IMediaTransportControlsStatics2(IMediaTransportControlsStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaTransportControlsStatics2] { + fn get_IsSkipForwardButtonVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsSkipForwardEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsSkipBackwardButtonVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsSkipBackwardEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsNextTrackButtonVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsPreviousTrackButtonVisibleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_FastPlayFallbackBehaviourProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IMediaTransportControlsStatics2 { + #[inline] pub unsafe fn get_is_skip_forward_button_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsSkipForwardButtonVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_skip_forward_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsSkipForwardEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_skip_backward_button_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsSkipBackwardButtonVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_skip_backward_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsSkipBackwardEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_next_track_button_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsNextTrackButtonVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_previous_track_button_visible_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsPreviousTrackButtonVisibleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_fast_play_fallback_behaviour_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_FastPlayFallbackBehaviourProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPasswordBox, 45722129, 2887, 20093, 173, 145, 58, 65, 104, 237, 35, 13); + RT_INTERFACE!{interface IPasswordBox(IPasswordBoxVtbl): IInspectable(IInspectableVtbl) [IID_IPasswordBox] { + fn get_Password(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Password(&mut self, value: HSTRING) -> HRESULT, + fn get_PasswordChar(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PasswordChar(&mut self, value: HSTRING) -> HRESULT, + fn get_IsPasswordRevealButtonEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsPasswordRevealButtonEnabled(&mut self, value: bool) -> HRESULT, + fn get_MaxLength(&mut self, out: *mut i32) -> HRESULT, + fn put_MaxLength(&mut self, value: i32) -> HRESULT, + fn add_PasswordChanged(&mut self, value: *mut super::RoutedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_PasswordChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ContextMenuOpening(&mut self, value: *mut ContextMenuOpeningEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContextMenuOpening(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn SelectAll(&mut self) -> HRESULT + }} + impl IPasswordBox { + #[inline] pub unsafe fn get_password(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Password)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_password(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Password)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_password_char(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PasswordChar)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_password_char(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PasswordChar)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_password_reveal_button_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsPasswordRevealButtonEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_password_reveal_button_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsPasswordRevealButtonEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_length(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxLength)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_password_changed(&mut self, value: &super::RoutedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_PasswordChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_password_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_PasswordChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_context_menu_opening(&mut self, value: &ContextMenuOpeningEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ContextMenuOpening)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_context_menu_opening(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContextMenuOpening)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn select_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SelectAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPasswordBoxStatics, 1592161635, 11636, 19150, 189, 121, 252, 171, 97, 167, 215, 123); + RT_INTERFACE!{static interface IPasswordBoxStatics(IPasswordBoxStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPasswordBoxStatics] { + fn get_PasswordProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PasswordCharProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsPasswordRevealButtonEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_MaxLengthProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IPasswordBoxStatics { + #[inline] pub unsafe fn get_password_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PasswordProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_password_char_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PasswordCharProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_password_reveal_button_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsPasswordRevealButtonEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_length_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxLengthProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPasswordBox2, 1591163103, 8495, 19179, 181, 184, 44, 33, 154, 236, 60, 12); + RT_INTERFACE!{interface IPasswordBox2(IPasswordBox2Vtbl): IInspectable(IInspectableVtbl) [IID_IPasswordBox2] { + fn get_Header(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Header(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_HeaderTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_HeaderTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_PlaceholderText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PlaceholderText(&mut self, value: HSTRING) -> HRESULT, + fn get_SelectionHighlightColor(&mut self, out: *mut *mut super::media::SolidColorBrush) -> HRESULT, + fn put_SelectionHighlightColor(&mut self, value: *mut super::media::SolidColorBrush) -> HRESULT, + fn get_PreventKeyboardDisplayOnProgrammaticFocus(&mut self, out: *mut bool) -> HRESULT, + fn put_PreventKeyboardDisplayOnProgrammaticFocus(&mut self, value: bool) -> HRESULT, + fn add_Paste(&mut self, value: *mut TextControlPasteEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Paste(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IPasswordBox2 { + #[inline] pub unsafe fn get_header(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Header)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Header)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_placeholder_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaceholderText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_placeholder_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlaceholderText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_highlight_color(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionHighlightColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_selection_highlight_color(&mut self, value: &super::media::SolidColorBrush) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectionHighlightColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_prevent_keyboard_display_on_programmatic_focus(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreventKeyboardDisplayOnProgrammaticFocus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_prevent_keyboard_display_on_programmatic_focus(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreventKeyboardDisplayOnProgrammaticFocus)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_paste(&mut self, value: &TextControlPasteEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Paste)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_paste(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Paste)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPasswordBoxStatics2, 4233597791, 39162, 16486, 183, 133, 250, 114, 94, 205, 226, 50); + RT_INTERFACE!{static interface IPasswordBoxStatics2(IPasswordBoxStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IPasswordBoxStatics2] { + fn get_HeaderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HeaderTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PlaceholderTextProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_SelectionHighlightColorProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PreventKeyboardDisplayOnProgrammaticFocusProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IPasswordBoxStatics2 { + #[inline] pub unsafe fn get_header_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_placeholder_text_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaceholderTextProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_highlight_color_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionHighlightColorProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_prevent_keyboard_display_on_programmatic_focus_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreventKeyboardDisplayOnProgrammaticFocusProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPasswordBox3, 1613027793, 22199, 16880, 149, 88, 57, 52, 193, 66, 68, 214); + RT_INTERFACE!{interface IPasswordBox3(IPasswordBox3Vtbl): IInspectable(IInspectableVtbl) [IID_IPasswordBox3] { + fn get_PasswordRevealMode(&mut self, out: *mut PasswordRevealMode) -> HRESULT, + fn put_PasswordRevealMode(&mut self, value: PasswordRevealMode) -> HRESULT, + fn get_TextReadingOrder(&mut self, out: *mut super::TextReadingOrder) -> HRESULT, + fn put_TextReadingOrder(&mut self, value: super::TextReadingOrder) -> HRESULT, + fn get_InputScope(&mut self, out: *mut *mut super::input::InputScope) -> HRESULT, + fn put_InputScope(&mut self, value: *mut super::input::InputScope) -> HRESULT + }} + impl IPasswordBox3 { + #[inline] pub unsafe fn get_password_reveal_mode(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PasswordRevealMode)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_password_reveal_mode(&mut self, value: PasswordRevealMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_PasswordRevealMode)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_reading_order(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextReadingOrder)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_reading_order(&mut self, value: super::TextReadingOrder) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextReadingOrder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_scope(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputScope)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_input_scope(&mut self, value: &super::input::InputScope) -> Result<()> { + let hr = ((*self.lpVtbl).put_InputScope)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IPasswordBoxStatics3, 2731397913, 44394, 17234, 181, 144, 246, 150, 255, 203, 142, 63); + RT_INTERFACE!{static interface IPasswordBoxStatics3(IPasswordBoxStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IPasswordBoxStatics3] { + fn get_PasswordRevealModeProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextReadingOrderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_InputScopeProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IPasswordBoxStatics3 { + #[inline] pub unsafe fn get_password_reveal_mode_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PasswordRevealModeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_reading_order_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextReadingOrderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_scope_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputScopeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProgressRing, 1839588510, 28317, 16988, 189, 124, 2, 23, 62, 57, 118, 63); + RT_INTERFACE!{interface IProgressRing(IProgressRingVtbl): IInspectable(IInspectableVtbl) [IID_IProgressRing] { + fn get_IsActive(&mut self, out: *mut bool) -> HRESULT, + fn put_IsActive(&mut self, value: bool) -> HRESULT, + fn get_TemplateSettings(&mut self, out: *mut *mut primitives::ProgressRingTemplateSettings) -> HRESULT + }} + impl IProgressRing { + #[inline] pub unsafe fn get_is_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsActive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_active(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsActive)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_template_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TemplateSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProgressRingStatics, 3904251143, 20012, 18389, 165, 74, 198, 196, 138, 94, 105, 137); + RT_INTERFACE!{static interface IProgressRingStatics(IProgressRingStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IProgressRingStatics] { + fn get_IsActiveProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IProgressRingStatics { + #[inline] pub unsafe fn get_is_active_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsActiveProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRelativePanel, 783022827, 45914, 16437, 172, 234, 60, 74, 55, 48, 104, 63); + RT_INTERFACE!{interface IRelativePanel(IRelativePanelVtbl): IInspectable(IInspectableVtbl) [IID_IRelativePanel] { + fn get_BorderBrush(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_BorderBrush(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_BorderThickness(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_BorderThickness(&mut self, value: super::Thickness) -> HRESULT, + fn get_CornerRadius(&mut self, out: *mut super::CornerRadius) -> HRESULT, + fn put_CornerRadius(&mut self, value: super::CornerRadius) -> HRESULT, + fn get_Padding(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_Padding(&mut self, value: super::Thickness) -> HRESULT + }} + impl IRelativePanel { + #[inline] pub unsafe fn get_border_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_border_brush(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_BorderBrush)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_thickness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BorderThickness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_border_thickness(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_BorderThickness)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_corner_radius(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CornerRadius)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_corner_radius(&mut self, value: super::CornerRadius) -> Result<()> { + let hr = ((*self.lpVtbl).put_CornerRadius)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Padding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_padding(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_Padding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRelativePanelStatics, 361774119, 61836, 19509, 142, 25, 106, 116, 89, 217, 7, 182); + RT_INTERFACE!{static interface IRelativePanelStatics(IRelativePanelStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRelativePanelStatics] { + fn get_LeftOfProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetLeftOf(&mut self, element: *mut super::UIElement, out: *mut *mut IInspectable) -> HRESULT, + fn SetLeftOf(&mut self, element: *mut super::UIElement, value: *mut IInspectable) -> HRESULT, + fn get_AboveProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAbove(&mut self, element: *mut super::UIElement, out: *mut *mut IInspectable) -> HRESULT, + fn SetAbove(&mut self, element: *mut super::UIElement, value: *mut IInspectable) -> HRESULT, + fn get_RightOfProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetRightOf(&mut self, element: *mut super::UIElement, out: *mut *mut IInspectable) -> HRESULT, + fn SetRightOf(&mut self, element: *mut super::UIElement, value: *mut IInspectable) -> HRESULT, + fn get_BelowProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetBelow(&mut self, element: *mut super::UIElement, out: *mut *mut IInspectable) -> HRESULT, + fn SetBelow(&mut self, element: *mut super::UIElement, value: *mut IInspectable) -> HRESULT, + fn get_AlignHorizontalCenterWithProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignHorizontalCenterWith(&mut self, element: *mut super::UIElement, out: *mut *mut IInspectable) -> HRESULT, + fn SetAlignHorizontalCenterWith(&mut self, element: *mut super::UIElement, value: *mut IInspectable) -> HRESULT, + fn get_AlignVerticalCenterWithProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignVerticalCenterWith(&mut self, element: *mut super::UIElement, out: *mut *mut IInspectable) -> HRESULT, + fn SetAlignVerticalCenterWith(&mut self, element: *mut super::UIElement, value: *mut IInspectable) -> HRESULT, + fn get_AlignLeftWithProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignLeftWith(&mut self, element: *mut super::UIElement, out: *mut *mut IInspectable) -> HRESULT, + fn SetAlignLeftWith(&mut self, element: *mut super::UIElement, value: *mut IInspectable) -> HRESULT, + fn get_AlignTopWithProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignTopWith(&mut self, element: *mut super::UIElement, out: *mut *mut IInspectable) -> HRESULT, + fn SetAlignTopWith(&mut self, element: *mut super::UIElement, value: *mut IInspectable) -> HRESULT, + fn get_AlignRightWithProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignRightWith(&mut self, element: *mut super::UIElement, out: *mut *mut IInspectable) -> HRESULT, + fn SetAlignRightWith(&mut self, element: *mut super::UIElement, value: *mut IInspectable) -> HRESULT, + fn get_AlignBottomWithProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignBottomWith(&mut self, element: *mut super::UIElement, out: *mut *mut IInspectable) -> HRESULT, + fn SetAlignBottomWith(&mut self, element: *mut super::UIElement, value: *mut IInspectable) -> HRESULT, + fn get_AlignLeftWithPanelProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignLeftWithPanel(&mut self, element: *mut super::UIElement, out: *mut bool) -> HRESULT, + fn SetAlignLeftWithPanel(&mut self, element: *mut super::UIElement, value: bool) -> HRESULT, + fn get_AlignTopWithPanelProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignTopWithPanel(&mut self, element: *mut super::UIElement, out: *mut bool) -> HRESULT, + fn SetAlignTopWithPanel(&mut self, element: *mut super::UIElement, value: bool) -> HRESULT, + fn get_AlignRightWithPanelProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignRightWithPanel(&mut self, element: *mut super::UIElement, out: *mut bool) -> HRESULT, + fn SetAlignRightWithPanel(&mut self, element: *mut super::UIElement, value: bool) -> HRESULT, + fn get_AlignBottomWithPanelProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignBottomWithPanel(&mut self, element: *mut super::UIElement, out: *mut bool) -> HRESULT, + fn SetAlignBottomWithPanel(&mut self, element: *mut super::UIElement, value: bool) -> HRESULT, + fn get_AlignHorizontalCenterWithPanelProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignHorizontalCenterWithPanel(&mut self, element: *mut super::UIElement, out: *mut bool) -> HRESULT, + fn SetAlignHorizontalCenterWithPanel(&mut self, element: *mut super::UIElement, value: bool) -> HRESULT, + fn get_AlignVerticalCenterWithPanelProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetAlignVerticalCenterWithPanel(&mut self, element: *mut super::UIElement, out: *mut bool) -> HRESULT, + fn SetAlignVerticalCenterWithPanel(&mut self, element: *mut super::UIElement, value: bool) -> HRESULT, + fn get_BorderBrushProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_BorderThicknessProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_CornerRadiusProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PaddingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRelativePanelStatics { + #[inline] pub unsafe fn get_left_of_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_LeftOfProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_left_of(&mut self, element: &super::UIElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetLeftOf)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_left_of(&mut self, element: &super::UIElement, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetLeftOf)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_above_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AboveProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_above(&mut self, element: &super::UIElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAbove)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_above(&mut self, element: &super::UIElement, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetAbove)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_right_of_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RightOfProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_right_of(&mut self, element: &super::UIElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetRightOf)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_right_of(&mut self, element: &super::UIElement, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetRightOf)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_below_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BelowProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_below(&mut self, element: &super::UIElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetBelow)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_below(&mut self, element: &super::UIElement, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetBelow)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_horizontal_center_with_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignHorizontalCenterWithProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_horizontal_center_with(&mut self, element: &super::UIElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAlignHorizontalCenterWith)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_horizontal_center_with(&mut self, element: &super::UIElement, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignHorizontalCenterWith)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_vertical_center_with_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignVerticalCenterWithProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_vertical_center_with(&mut self, element: &super::UIElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAlignVerticalCenterWith)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_vertical_center_with(&mut self, element: &super::UIElement, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignVerticalCenterWith)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_left_with_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignLeftWithProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_left_with(&mut self, element: &super::UIElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAlignLeftWith)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_left_with(&mut self, element: &super::UIElement, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignLeftWith)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_top_with_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignTopWithProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_top_with(&mut self, element: &super::UIElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAlignTopWith)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_top_with(&mut self, element: &super::UIElement, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignTopWith)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_right_with_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignRightWithProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_right_with(&mut self, element: &super::UIElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAlignRightWith)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_right_with(&mut self, element: &super::UIElement, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignRightWith)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_bottom_with_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignBottomWithProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_bottom_with(&mut self, element: &super::UIElement) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetAlignBottomWith)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_bottom_with(&mut self, element: &super::UIElement, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignBottomWith)(self, element as *const _ as *mut _, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_left_with_panel_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignLeftWithPanelProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_left_with_panel(&mut self, element: &super::UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetAlignLeftWithPanel)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_left_with_panel(&mut self, element: &super::UIElement, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignLeftWithPanel)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_top_with_panel_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignTopWithPanelProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_top_with_panel(&mut self, element: &super::UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetAlignTopWithPanel)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_top_with_panel(&mut self, element: &super::UIElement, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignTopWithPanel)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_right_with_panel_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignRightWithPanelProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_right_with_panel(&mut self, element: &super::UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetAlignRightWithPanel)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_right_with_panel(&mut self, element: &super::UIElement, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignRightWithPanel)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_bottom_with_panel_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignBottomWithPanelProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_bottom_with_panel(&mut self, element: &super::UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetAlignBottomWithPanel)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_bottom_with_panel(&mut self, element: &super::UIElement, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignBottomWithPanel)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_horizontal_center_with_panel_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignHorizontalCenterWithPanelProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_horizontal_center_with_panel(&mut self, element: &super::UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetAlignHorizontalCenterWithPanel)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_horizontal_center_with_panel(&mut self, element: &super::UIElement, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignHorizontalCenterWithPanel)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_vertical_center_with_panel_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AlignVerticalCenterWithPanelProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_align_vertical_center_with_panel(&mut self, element: &super::UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetAlignVerticalCenterWithPanel)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_align_vertical_center_with_panel(&mut self, element: &super::UIElement, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).SetAlignVerticalCenterWithPanel)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_brush_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderBrushProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_thickness_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderThicknessProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_corner_radius_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CornerRadiusProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PaddingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRelativePanelFactory, 2220890428, 13851, 17594, 161, 126, 184, 76, 157, 205, 199, 114); + RT_INTERFACE!{interface IRelativePanelFactory(IRelativePanelFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IRelativePanelFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut RelativePanel) -> HRESULT + }} + impl IRelativePanelFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichEditBox, 2426763840, 32950, 20430, 177, 236, 227, 198, 22, 40, 75, 106); + RT_INTERFACE!{interface IRichEditBox(IRichEditBoxVtbl): IInspectable(IInspectableVtbl) [IID_IRichEditBox] { + fn get_IsReadOnly(&mut self, out: *mut bool) -> HRESULT, + fn put_IsReadOnly(&mut self, value: bool) -> HRESULT, + fn get_AcceptsReturn(&mut self, out: *mut bool) -> HRESULT, + fn put_AcceptsReturn(&mut self, value: bool) -> HRESULT, + fn get_TextAlignment(&mut self, out: *mut super::TextAlignment) -> HRESULT, + fn put_TextAlignment(&mut self, value: super::TextAlignment) -> HRESULT, + fn get_TextWrapping(&mut self, out: *mut super::TextWrapping) -> HRESULT, + fn put_TextWrapping(&mut self, value: super::TextWrapping) -> HRESULT, + fn get_IsSpellCheckEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSpellCheckEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsTextPredictionEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsTextPredictionEnabled(&mut self, value: bool) -> HRESULT, + #[cfg(not(feature="windows.ui"))] fn __Dummy12(&mut self) -> (), + #[cfg(feature="windows.ui")] fn get_Document(&mut self, out: *mut *mut super::super::text::ITextDocument) -> HRESULT, + fn get_InputScope(&mut self, out: *mut *mut super::input::InputScope) -> HRESULT, + fn put_InputScope(&mut self, value: *mut super::input::InputScope) -> HRESULT, + fn add_TextChanged(&mut self, value: *mut super::RoutedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SelectionChanged(&mut self, value: *mut super::RoutedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectionChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ContextMenuOpening(&mut self, value: *mut ContextMenuOpeningEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContextMenuOpening(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IRichEditBox { + #[inline] pub unsafe fn get_is_read_only(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsReadOnly)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_read_only(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsReadOnly)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_accepts_return(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AcceptsReturn)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_accepts_return(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AcceptsReturn)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_alignment(&mut self, value: super::TextAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_wrapping(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextWrapping)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_wrapping(&mut self, value: super::TextWrapping) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextWrapping)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_spell_check_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSpellCheckEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_spell_check_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSpellCheckEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_text_prediction_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTextPredictionEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_text_prediction_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTextPredictionEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[cfg(feature="windows.ui")] #[inline] pub unsafe fn get_document(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Document)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_scope(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputScope)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_input_scope(&mut self, value: &super::input::InputScope) -> Result<()> { + let hr = ((*self.lpVtbl).put_InputScope)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_text_changed(&mut self, value: &super::RoutedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_selection_changed(&mut self, value: &super::RoutedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SelectionChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_selection_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SelectionChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_context_menu_opening(&mut self, value: &ContextMenuOpeningEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ContextMenuOpening)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_context_menu_opening(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContextMenuOpening)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichEditBoxStatics, 4125112948, 35050, 18331, 154, 5, 55, 8, 159, 243, 14, 222); + RT_INTERFACE!{static interface IRichEditBoxStatics(IRichEditBoxStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRichEditBoxStatics] { + fn get_IsReadOnlyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_AcceptsReturnProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextWrappingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsSpellCheckEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsTextPredictionEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_InputScopeProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRichEditBoxStatics { + #[inline] pub unsafe fn get_is_read_only_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsReadOnlyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_accepts_return_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AcceptsReturnProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_wrapping_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextWrappingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_spell_check_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsSpellCheckEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_text_prediction_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsTextPredictionEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_scope_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputScopeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichEditBoxFactory, 1637998434, 10246, 16877, 136, 237, 174, 33, 244, 122, 180, 34); + RT_INTERFACE!{interface IRichEditBoxFactory(IRichEditBoxFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IRichEditBoxFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut RichEditBox) -> HRESULT + }} + impl IRichEditBoxFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichEditBox2, 3152703149, 59397, 18340, 187, 231, 71, 229, 155, 143, 116, 167); + RT_INTERFACE!{interface IRichEditBox2(IRichEditBox2Vtbl): IInspectable(IInspectableVtbl) [IID_IRichEditBox2] { + fn get_Header(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Header(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_HeaderTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_HeaderTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_PlaceholderText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PlaceholderText(&mut self, value: HSTRING) -> HRESULT, + fn get_SelectionHighlightColor(&mut self, out: *mut *mut super::media::SolidColorBrush) -> HRESULT, + fn put_SelectionHighlightColor(&mut self, value: *mut super::media::SolidColorBrush) -> HRESULT, + fn get_PreventKeyboardDisplayOnProgrammaticFocus(&mut self, out: *mut bool) -> HRESULT, + fn put_PreventKeyboardDisplayOnProgrammaticFocus(&mut self, value: bool) -> HRESULT, + fn get_IsColorFontEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsColorFontEnabled(&mut self, value: bool) -> HRESULT, + fn add_Paste(&mut self, value: *mut TextControlPasteEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Paste(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IRichEditBox2 { + #[inline] pub unsafe fn get_header(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Header)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Header)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_placeholder_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaceholderText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_placeholder_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlaceholderText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_highlight_color(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionHighlightColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_selection_highlight_color(&mut self, value: &super::media::SolidColorBrush) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectionHighlightColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_prevent_keyboard_display_on_programmatic_focus(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreventKeyboardDisplayOnProgrammaticFocus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_prevent_keyboard_display_on_programmatic_focus(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreventKeyboardDisplayOnProgrammaticFocus)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_color_font_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsColorFontEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_color_font_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsColorFontEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_paste(&mut self, value: &TextControlPasteEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Paste)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_paste(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Paste)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichEditBoxStatics2, 3823838942, 10056, 16907, 177, 252, 206, 149, 182, 232, 94, 236); + RT_INTERFACE!{static interface IRichEditBoxStatics2(IRichEditBoxStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IRichEditBoxStatics2] { + fn get_HeaderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HeaderTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PlaceholderTextProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_SelectionHighlightColorProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PreventKeyboardDisplayOnProgrammaticFocusProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsColorFontEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRichEditBoxStatics2 { + #[inline] pub unsafe fn get_header_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_placeholder_text_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaceholderTextProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_highlight_color_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionHighlightColorProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_prevent_keyboard_display_on_programmatic_focus_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreventKeyboardDisplayOnProgrammaticFocusProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_color_font_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsColorFontEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichEditBox3, 1796711522, 64438, 20479, 153, 145, 147, 153, 203, 156, 11, 144); + RT_INTERFACE!{interface IRichEditBox3(IRichEditBox3Vtbl): IInspectable(IInspectableVtbl) [IID_IRichEditBox3] { + fn add_TextCompositionStarted(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextCompositionStarted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_TextCompositionChanged(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextCompositionChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_TextCompositionEnded(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextCompositionEnded(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_TextReadingOrder(&mut self, out: *mut super::TextReadingOrder) -> HRESULT, + fn put_TextReadingOrder(&mut self, value: super::TextReadingOrder) -> HRESULT, + fn get_DesiredCandidateWindowAlignment(&mut self, out: *mut CandidateWindowAlignment) -> HRESULT, + fn put_DesiredCandidateWindowAlignment(&mut self, value: CandidateWindowAlignment) -> HRESULT, + fn add_CandidateWindowBoundsChanged(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CandidateWindowBoundsChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_TextChanging(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextChanging(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IRichEditBox3 { + #[inline] pub unsafe fn add_text_composition_started(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextCompositionStarted)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_composition_started(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextCompositionStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_text_composition_changed(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextCompositionChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_composition_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextCompositionChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_text_composition_ended(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextCompositionEnded)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_composition_ended(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextCompositionEnded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_reading_order(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextReadingOrder)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_reading_order(&mut self, value: super::TextReadingOrder) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextReadingOrder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_candidate_window_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredCandidateWindowAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_candidate_window_alignment(&mut self, value: CandidateWindowAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredCandidateWindowAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_candidate_window_bounds_changed(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CandidateWindowBoundsChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_candidate_window_bounds_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CandidateWindowBoundsChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_text_changing(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextChanging)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_changing(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextChanging)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichEditBoxStatics3, 1830284997, 8115, 19595, 170, 35, 245, 225, 93, 106, 182, 78); + RT_INTERFACE!{static interface IRichEditBoxStatics3(IRichEditBoxStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IRichEditBoxStatics3] { + fn get_DesiredCandidateWindowAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextReadingOrderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRichEditBoxStatics3 { + #[inline] pub unsafe fn get_desired_candidate_window_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesiredCandidateWindowAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_reading_order_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextReadingOrderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichEditBox4, 1554681141, 51256, 19373, 160, 124, 32, 65, 131, 187, 117, 31); + RT_INTERFACE!{interface IRichEditBox4(IRichEditBox4Vtbl): IInspectable(IInspectableVtbl) [IID_IRichEditBox4] { + fn GetLinguisticAlternativesAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn get_ClipboardCopyFormat(&mut self, out: *mut RichEditClipboardFormat) -> HRESULT, + fn put_ClipboardCopyFormat(&mut self, value: RichEditClipboardFormat) -> HRESULT + }} + impl IRichEditBox4 { + #[inline] pub unsafe fn get_linguistic_alternatives_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetLinguisticAlternativesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_clipboard_copy_format(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ClipboardCopyFormat)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_clipboard_copy_format(&mut self, value: RichEditClipboardFormat) -> Result<()> { + let hr = ((*self.lpVtbl).put_ClipboardCopyFormat)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IRichEditBoxStatics4, 4124397527, 30614, 17061, 165, 229, 44, 210, 17, 238, 129, 118); + RT_INTERFACE!{static interface IRichEditBoxStatics4(IRichEditBoxStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IRichEditBoxStatics4] { + fn get_ClipboardCopyFormatProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IRichEditBoxStatics4 { + #[inline] pub unsafe fn get_clipboard_copy_format_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ClipboardCopyFormatProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISemanticZoom, 27262753, 60646, 20412, 191, 64, 137, 56, 212, 129, 62, 39); + RT_INTERFACE!{interface ISemanticZoom(ISemanticZoomVtbl): IInspectable(IInspectableVtbl) [IID_ISemanticZoom] { + fn get_ZoomedInView(&mut self, out: *mut *mut ISemanticZoomInformation) -> HRESULT, + fn put_ZoomedInView(&mut self, value: *mut ISemanticZoomInformation) -> HRESULT, + fn get_ZoomedOutView(&mut self, out: *mut *mut ISemanticZoomInformation) -> HRESULT, + fn put_ZoomedOutView(&mut self, value: *mut ISemanticZoomInformation) -> HRESULT, + fn get_IsZoomedInViewActive(&mut self, out: *mut bool) -> HRESULT, + fn put_IsZoomedInViewActive(&mut self, value: bool) -> HRESULT, + fn get_CanChangeViews(&mut self, out: *mut bool) -> HRESULT, + fn put_CanChangeViews(&mut self, value: bool) -> HRESULT, + fn add_ViewChangeStarted(&mut self, value: *mut SemanticZoomViewChangedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ViewChangeStarted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ViewChangeCompleted(&mut self, value: *mut SemanticZoomViewChangedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ViewChangeCompleted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn ToggleActiveView(&mut self) -> HRESULT, + fn get_IsZoomOutButtonEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsZoomOutButtonEnabled(&mut self, value: bool) -> HRESULT + }} + impl ISemanticZoom { + #[inline] pub unsafe fn get_zoomed_in_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZoomedInView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_zoomed_in_view(&mut self, value: &ISemanticZoomInformation) -> Result<()> { + let hr = ((*self.lpVtbl).put_ZoomedInView)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_zoomed_out_view(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZoomedOutView)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_zoomed_out_view(&mut self, value: &ISemanticZoomInformation) -> Result<()> { + let hr = ((*self.lpVtbl).put_ZoomedOutView)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_zoomed_in_view_active(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsZoomedInViewActive)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_zoomed_in_view_active(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsZoomedInViewActive)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_change_views(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CanChangeViews)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_can_change_views(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_CanChangeViews)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_view_change_started(&mut self, value: &SemanticZoomViewChangedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ViewChangeStarted)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_view_change_started(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ViewChangeStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_view_change_completed(&mut self, value: &SemanticZoomViewChangedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ViewChangeCompleted)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_view_change_completed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ViewChangeCompleted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn toggle_active_view(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ToggleActiveView)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_zoom_out_button_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsZoomOutButtonEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_zoom_out_button_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsZoomOutButtonEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISemanticZoomStatics, 2398191346, 39064, 18022, 178, 133, 62, 211, 138, 7, 145, 14); + RT_INTERFACE!{static interface ISemanticZoomStatics(ISemanticZoomStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISemanticZoomStatics] { + fn get_ZoomedInViewProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ZoomedOutViewProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsZoomedInViewActiveProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_CanChangeViewsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsZoomOutButtonEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ISemanticZoomStatics { + #[inline] pub unsafe fn get_zoomed_in_view_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZoomedInViewProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_zoomed_out_view_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ZoomedOutViewProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_zoomed_in_view_active_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsZoomedInViewActiveProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_can_change_views_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CanChangeViewsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_zoom_out_button_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsZoomOutButtonEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStackPanel, 3098447842, 54849, 20439, 128, 180, 116, 57, 32, 125, 39, 152); + RT_INTERFACE!{interface IStackPanel(IStackPanelVtbl): IInspectable(IInspectableVtbl) [IID_IStackPanel] { + fn get_AreScrollSnapPointsRegular(&mut self, out: *mut bool) -> HRESULT, + fn put_AreScrollSnapPointsRegular(&mut self, value: bool) -> HRESULT, + fn get_Orientation(&mut self, out: *mut Orientation) -> HRESULT, + fn put_Orientation(&mut self, value: Orientation) -> HRESULT + }} + impl IStackPanel { + #[inline] pub unsafe fn get_are_scroll_snap_points_regular(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AreScrollSnapPointsRegular)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_are_scroll_snap_points_regular(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AreScrollSnapPointsRegular)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_orientation(&mut self, value: Orientation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Orientation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStackPanelStatics, 4040215955, 19900, 18599, 153, 20, 149, 73, 36, 101, 119, 113); + RT_INTERFACE!{static interface IStackPanelStatics(IStackPanelStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStackPanelStatics] { + fn get_AreScrollSnapPointsRegularProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OrientationProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IStackPanelStatics { + #[inline] pub unsafe fn get_are_scroll_snap_points_regular_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AreScrollSnapPointsRegularProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OrientationProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStackPanelFactory, 1675109514, 35636, 17498, 128, 143, 182, 236, 214, 42, 39, 217); + RT_INTERFACE!{interface IStackPanelFactory(IStackPanelFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IStackPanelFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut StackPanel) -> HRESULT + }} + impl IStackPanelFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStackPanel2, 921842521, 1038, 18679, 154, 152, 242, 102, 69, 145, 149, 156); + RT_INTERFACE!{interface IStackPanel2(IStackPanel2Vtbl): IInspectable(IInspectableVtbl) [IID_IStackPanel2] { + fn get_BorderBrush(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_BorderBrush(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_BorderThickness(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_BorderThickness(&mut self, value: super::Thickness) -> HRESULT, + fn get_CornerRadius(&mut self, out: *mut super::CornerRadius) -> HRESULT, + fn put_CornerRadius(&mut self, value: super::CornerRadius) -> HRESULT, + fn get_Padding(&mut self, out: *mut super::Thickness) -> HRESULT, + fn put_Padding(&mut self, value: super::Thickness) -> HRESULT + }} + impl IStackPanel2 { + #[inline] pub unsafe fn get_border_brush(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderBrush)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_border_brush(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_BorderBrush)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_thickness(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_BorderThickness)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_border_thickness(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_BorderThickness)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_corner_radius(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_CornerRadius)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_corner_radius(&mut self, value: super::CornerRadius) -> Result<()> { + let hr = ((*self.lpVtbl).put_CornerRadius)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Padding)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_padding(&mut self, value: super::Thickness) -> Result<()> { + let hr = ((*self.lpVtbl).put_Padding)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IStackPanelStatics2, 3648938583, 2061, 16686, 169, 26, 206, 110, 93, 2, 170, 211); + RT_INTERFACE!{static interface IStackPanelStatics2(IStackPanelStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IStackPanelStatics2] { + fn get_BorderBrushProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_BorderThicknessProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_CornerRadiusProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PaddingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IStackPanelStatics2 { + #[inline] pub unsafe fn get_border_brush_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderBrushProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_border_thickness_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_BorderThicknessProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_corner_radius_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_CornerRadiusProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_padding_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PaddingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBox, 3834600075, 7679, 17234, 161, 244, 229, 22, 81, 78, 200, 130); + RT_INTERFACE!{interface ITextBox(ITextBoxVtbl): IInspectable(IInspectableVtbl) [IID_ITextBox] { + fn get_Text(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Text(&mut self, value: HSTRING) -> HRESULT, + fn get_SelectedText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_SelectedText(&mut self, value: HSTRING) -> HRESULT, + fn get_SelectionLength(&mut self, out: *mut i32) -> HRESULT, + fn put_SelectionLength(&mut self, value: i32) -> HRESULT, + fn get_SelectionStart(&mut self, out: *mut i32) -> HRESULT, + fn put_SelectionStart(&mut self, value: i32) -> HRESULT, + fn get_MaxLength(&mut self, out: *mut i32) -> HRESULT, + fn put_MaxLength(&mut self, value: i32) -> HRESULT, + fn get_IsReadOnly(&mut self, out: *mut bool) -> HRESULT, + fn put_IsReadOnly(&mut self, value: bool) -> HRESULT, + fn get_AcceptsReturn(&mut self, out: *mut bool) -> HRESULT, + fn put_AcceptsReturn(&mut self, value: bool) -> HRESULT, + fn get_TextAlignment(&mut self, out: *mut super::TextAlignment) -> HRESULT, + fn put_TextAlignment(&mut self, value: super::TextAlignment) -> HRESULT, + fn get_TextWrapping(&mut self, out: *mut super::TextWrapping) -> HRESULT, + fn put_TextWrapping(&mut self, value: super::TextWrapping) -> HRESULT, + fn get_IsSpellCheckEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsSpellCheckEnabled(&mut self, value: bool) -> HRESULT, + fn get_IsTextPredictionEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsTextPredictionEnabled(&mut self, value: bool) -> HRESULT, + fn get_InputScope(&mut self, out: *mut *mut super::input::InputScope) -> HRESULT, + fn put_InputScope(&mut self, value: *mut super::input::InputScope) -> HRESULT, + fn add_TextChanged(&mut self, value: *mut TextChangedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SelectionChanged(&mut self, value: *mut super::RoutedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectionChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ContextMenuOpening(&mut self, value: *mut ContextMenuOpeningEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContextMenuOpening(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn Select(&mut self, start: i32, length: i32) -> HRESULT, + fn SelectAll(&mut self) -> HRESULT, + fn GetRectFromCharacterIndex(&mut self, charIndex: i32, trailingEdge: bool, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT + }} + impl ITextBox { + #[inline] pub unsafe fn get_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Text)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Text)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selected_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectedText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_selected_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectedText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectionLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_selection_length(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectionLength)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_start(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SelectionStart)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_selection_start(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectionStart)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_length(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaxLength)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_max_length(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaxLength)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_read_only(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsReadOnly)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_read_only(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsReadOnly)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_accepts_return(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_AcceptsReturn)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_accepts_return(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_AcceptsReturn)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_alignment(&mut self, value: super::TextAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_wrapping(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextWrapping)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_wrapping(&mut self, value: super::TextWrapping) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextWrapping)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_spell_check_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsSpellCheckEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_spell_check_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsSpellCheckEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_text_prediction_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsTextPredictionEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_text_prediction_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsTextPredictionEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_scope(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputScope)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_input_scope(&mut self, value: &super::input::InputScope) -> Result<()> { + let hr = ((*self.lpVtbl).put_InputScope)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_text_changed(&mut self, value: &TextChangedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_selection_changed(&mut self, value: &super::RoutedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_SelectionChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_selection_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_SelectionChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_context_menu_opening(&mut self, value: &ContextMenuOpeningEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_ContextMenuOpening)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_context_menu_opening(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_ContextMenuOpening)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn select(&mut self, start: i32, length: i32) -> Result<()> { + let hr = ((*self.lpVtbl).Select)(self, start, length); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn select_all(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).SelectAll)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_rect_from_character_index(&mut self, charIndex: i32, trailingEdge: bool) -> Result<::rt::gen::windows::foundation::Rect> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetRectFromCharacterIndex)(self, charIndex, trailingEdge, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBoxStatics, 2117596411, 42172, 17957, 136, 56, 142, 178, 169, 9, 18, 131); + RT_INTERFACE!{static interface ITextBoxStatics(ITextBoxStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ITextBoxStatics] { + fn get_TextProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_MaxLengthProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsReadOnlyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_AcceptsReturnProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextWrappingProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsSpellCheckEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsTextPredictionEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_InputScopeProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ITextBoxStatics { + #[inline] pub unsafe fn get_text_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_max_length_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaxLengthProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_read_only_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsReadOnlyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_accepts_return_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_AcceptsReturnProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_wrapping_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextWrappingProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_spell_check_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsSpellCheckEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_text_prediction_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsTextPredictionEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_input_scope_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_InputScopeProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBoxFactory, 1896759928, 34089, 18387, 141, 142, 48, 126, 52, 207, 240, 129); + RT_INTERFACE!{interface ITextBoxFactory(ITextBoxFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITextBoxFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut TextBox) -> HRESULT + }} + impl ITextBoxFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBox2, 4145449984, 5170, 17962, 148, 5, 56, 243, 133, 191, 195, 124); + RT_INTERFACE!{interface ITextBox2(ITextBox2Vtbl): IInspectable(IInspectableVtbl) [IID_ITextBox2] { + fn get_Header(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Header(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_HeaderTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_HeaderTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_PlaceholderText(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_PlaceholderText(&mut self, value: HSTRING) -> HRESULT, + fn get_SelectionHighlightColor(&mut self, out: *mut *mut super::media::SolidColorBrush) -> HRESULT, + fn put_SelectionHighlightColor(&mut self, value: *mut super::media::SolidColorBrush) -> HRESULT, + fn get_PreventKeyboardDisplayOnProgrammaticFocus(&mut self, out: *mut bool) -> HRESULT, + fn put_PreventKeyboardDisplayOnProgrammaticFocus(&mut self, value: bool) -> HRESULT, + fn get_IsColorFontEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsColorFontEnabled(&mut self, value: bool) -> HRESULT, + fn add_Paste(&mut self, value: *mut TextControlPasteEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Paste(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl ITextBox2 { + #[inline] pub unsafe fn get_header(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Header)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Header)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_placeholder_text(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaceholderText)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_placeholder_text(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlaceholderText)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_highlight_color(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionHighlightColor)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_selection_highlight_color(&mut self, value: &super::media::SolidColorBrush) -> Result<()> { + let hr = ((*self.lpVtbl).put_SelectionHighlightColor)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_prevent_keyboard_display_on_programmatic_focus(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_PreventKeyboardDisplayOnProgrammaticFocus)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_prevent_keyboard_display_on_programmatic_focus(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_PreventKeyboardDisplayOnProgrammaticFocus)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_color_font_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsColorFontEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_color_font_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsColorFontEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_paste(&mut self, value: &TextControlPasteEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Paste)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_paste(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Paste)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBoxStatics2, 1972564861, 20086, 20196, 142, 15, 125, 110, 26, 35, 50, 107); + RT_INTERFACE!{static interface ITextBoxStatics2(ITextBoxStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ITextBoxStatics2] { + fn get_HeaderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HeaderTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PlaceholderTextProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_SelectionHighlightColorProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PreventKeyboardDisplayOnProgrammaticFocusProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsColorFontEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ITextBoxStatics2 { + #[inline] pub unsafe fn get_header_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_placeholder_text_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlaceholderTextProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_selection_highlight_color_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SelectionHighlightColorProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_prevent_keyboard_display_on_programmatic_focus_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PreventKeyboardDisplayOnProgrammaticFocusProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_color_font_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsColorFontEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBox3, 2112982076, 10278, 16990, 154, 148, 0, 183, 247, 63, 55, 86); + RT_INTERFACE!{interface ITextBox3(ITextBox3Vtbl): IInspectable(IInspectableVtbl) [IID_ITextBox3] { + fn add_TextCompositionStarted(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextCompositionStarted(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_TextCompositionChanged(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextCompositionChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_TextCompositionEnded(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextCompositionEnded(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn get_TextReadingOrder(&mut self, out: *mut super::TextReadingOrder) -> HRESULT, + fn put_TextReadingOrder(&mut self, value: super::TextReadingOrder) -> HRESULT, + fn get_DesiredCandidateWindowAlignment(&mut self, out: *mut CandidateWindowAlignment) -> HRESULT, + fn put_DesiredCandidateWindowAlignment(&mut self, value: CandidateWindowAlignment) -> HRESULT, + fn add_CandidateWindowBoundsChanged(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_CandidateWindowBoundsChanged(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_TextChanging(&mut self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextChanging(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl ITextBox3 { + #[inline] pub unsafe fn add_text_composition_started(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextCompositionStarted)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_composition_started(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextCompositionStarted)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_text_composition_changed(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextCompositionChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_composition_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextCompositionChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_text_composition_ended(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextCompositionEnded)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_composition_ended(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextCompositionEnded)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_reading_order(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TextReadingOrder)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_text_reading_order(&mut self, value: super::TextReadingOrder) -> Result<()> { + let hr = ((*self.lpVtbl).put_TextReadingOrder)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_desired_candidate_window_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_DesiredCandidateWindowAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_desired_candidate_window_alignment(&mut self, value: CandidateWindowAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_DesiredCandidateWindowAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_candidate_window_bounds_changed(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_CandidateWindowBoundsChanged)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_candidate_window_bounds_changed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_CandidateWindowBoundsChanged)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_text_changing(&mut self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_TextChanging)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_text_changing(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_TextChanging)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBoxStatics3, 235931072, 4277, 16630, 146, 194, 206, 19, 75, 13, 52, 87); + RT_INTERFACE!{static interface ITextBoxStatics3(ITextBoxStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_ITextBoxStatics3] { + fn get_DesiredCandidateWindowAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TextReadingOrderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ITextBoxStatics3 { + #[inline] pub unsafe fn get_desired_candidate_window_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_DesiredCandidateWindowAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_text_reading_order_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TextReadingOrderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ITextBox4, 3052512885, 52449, 17839, 174, 249, 196, 120, 123, 187, 94, 48); + RT_INTERFACE!{interface ITextBox4(ITextBox4Vtbl): IInspectable(IInspectableVtbl) [IID_ITextBox4] { + fn GetLinguisticAlternativesAsync(&mut self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + }} + impl ITextBox4 { + #[inline] pub unsafe fn get_linguistic_alternatives_async(&mut self) -> Result>>> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).GetLinguisticAlternativesAsync)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToggleSwitch, 857575168, 50681, 18085, 182, 200, 237, 229, 57, 48, 69, 103); + RT_INTERFACE!{interface IToggleSwitch(IToggleSwitchVtbl): IInspectable(IInspectableVtbl) [IID_IToggleSwitch] { + fn get_IsOn(&mut self, out: *mut bool) -> HRESULT, + fn put_IsOn(&mut self, value: bool) -> HRESULT, + fn get_Header(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Header(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_HeaderTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_HeaderTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_OnContent(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_OnContent(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_OnContentTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_OnContentTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_OffContent(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_OffContent(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_OffContentTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_OffContentTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT, + fn get_TemplateSettings(&mut self, out: *mut *mut primitives::ToggleSwitchTemplateSettings) -> HRESULT, + fn add_Toggled(&mut self, value: *mut super::RoutedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Toggled(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IToggleSwitch { + #[inline] pub unsafe fn get_is_on(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsOn)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_on(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsOn)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Header)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Header)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_on_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OnContent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_on_content(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_OnContent)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_on_content_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OnContentTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_on_content_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_OnContentTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_off_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OffContent)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_off_content(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_OffContent)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_off_content_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OffContentTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_off_content_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_OffContentTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_template_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TemplateSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_toggled(&mut self, value: &super::RoutedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Toggled)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_toggled(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Toggled)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToggleSwitchOverrides, 3218112339, 63690, 20039, 148, 158, 158, 128, 66, 155, 61, 22); + RT_INTERFACE!{interface IToggleSwitchOverrides(IToggleSwitchOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IToggleSwitchOverrides] { + fn OnToggled(&mut self) -> HRESULT, + fn OnOnContentChanged(&mut self, oldContent: *mut IInspectable, newContent: *mut IInspectable) -> HRESULT, + fn OnOffContentChanged(&mut self, oldContent: *mut IInspectable, newContent: *mut IInspectable) -> HRESULT, + fn OnHeaderChanged(&mut self, oldContent: *mut IInspectable, newContent: *mut IInspectable) -> HRESULT + }} + impl IToggleSwitchOverrides { + #[inline] pub unsafe fn on_toggled(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).OnToggled)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_on_content_changed(&mut self, oldContent: &IInspectable, newContent: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).OnOnContentChanged)(self, oldContent as *const _ as *mut _, newContent as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_off_content_changed(&mut self, oldContent: &IInspectable, newContent: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).OnOffContentChanged)(self, oldContent as *const _ as *mut _, newContent as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_header_changed(&mut self, oldContent: &IInspectable, newContent: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).OnHeaderChanged)(self, oldContent as *const _ as *mut _, newContent as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToggleSwitchStatics, 490148991, 38879, 16934, 146, 202, 221, 244, 83, 215, 253, 90); + RT_INTERFACE!{static interface IToggleSwitchStatics(IToggleSwitchStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IToggleSwitchStatics] { + fn get_IsOnProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HeaderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HeaderTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OnContentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OnContentTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OffContentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OffContentTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IToggleSwitchStatics { + #[inline] pub unsafe fn get_is_on_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsOnProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_on_content_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OnContentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_on_content_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OnContentTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_off_content_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OffContentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_off_content_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OffContentTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserControl, 2812714697, 59957, 18041, 191, 41, 244, 240, 146, 134, 211, 20); + RT_INTERFACE!{interface IUserControl(IUserControlVtbl): IInspectable(IInspectableVtbl) [IID_IUserControl] { + fn get_Content(&mut self, out: *mut *mut super::UIElement) -> HRESULT, + fn put_Content(&mut self, value: *mut super::UIElement) -> HRESULT + }} + impl IUserControl { + #[inline] pub unsafe fn get_content(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Content)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_content(&mut self, value: &super::UIElement) -> Result<()> { + let hr = ((*self.lpVtbl).put_Content)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserControlStatics, 3901258102, 11356, 16847, 190, 106, 158, 68, 190, 253, 246, 85); + RT_INTERFACE!{static interface IUserControlStatics(IUserControlStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IUserControlStatics] { + fn get_ContentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IUserControlStatics { + #[inline] pub unsafe fn get_content_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ContentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IUserControlFactory, 951184786, 41610, 18802, 147, 223, 244, 247, 89, 184, 175, 210); + RT_INTERFACE!{interface IUserControlFactory(IUserControlFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IUserControlFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut UserControl) -> HRESULT + }} + impl IUserControlFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVariableSizedWrapGrid, 2628061127, 9161, 20225, 184, 15, 190, 92, 33, 238, 244, 116); + RT_INTERFACE!{interface IVariableSizedWrapGrid(IVariableSizedWrapGridVtbl): IInspectable(IInspectableVtbl) [IID_IVariableSizedWrapGrid] { + fn get_ItemHeight(&mut self, out: *mut f64) -> HRESULT, + fn put_ItemHeight(&mut self, value: f64) -> HRESULT, + fn get_ItemWidth(&mut self, out: *mut f64) -> HRESULT, + fn put_ItemWidth(&mut self, value: f64) -> HRESULT, + fn get_Orientation(&mut self, out: *mut Orientation) -> HRESULT, + fn put_Orientation(&mut self, value: Orientation) -> HRESULT, + fn get_HorizontalChildrenAlignment(&mut self, out: *mut super::HorizontalAlignment) -> HRESULT, + fn put_HorizontalChildrenAlignment(&mut self, value: super::HorizontalAlignment) -> HRESULT, + fn get_VerticalChildrenAlignment(&mut self, out: *mut super::VerticalAlignment) -> HRESULT, + fn put_VerticalChildrenAlignment(&mut self, value: super::VerticalAlignment) -> HRESULT, + fn get_MaximumRowsOrColumns(&mut self, out: *mut i32) -> HRESULT, + fn put_MaximumRowsOrColumns(&mut self, value: i32) -> HRESULT + }} + impl IVariableSizedWrapGrid { + #[inline] pub unsafe fn get_item_height(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ItemHeight)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_item_height(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_ItemHeight)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_width(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ItemWidth)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_item_width(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_ItemWidth)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_orientation(&mut self, value: Orientation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Orientation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_horizontal_children_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HorizontalChildrenAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_horizontal_children_alignment(&mut self, value: super::HorizontalAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_HorizontalChildrenAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_children_alignment(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VerticalChildrenAlignment)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_vertical_children_alignment(&mut self, value: super::VerticalAlignment) -> Result<()> { + let hr = ((*self.lpVtbl).put_VerticalChildrenAlignment)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_maximum_rows_or_columns(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_MaximumRowsOrColumns)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_maximum_rows_or_columns(&mut self, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).put_MaximumRowsOrColumns)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVariableSizedWrapGridStatics, 4271749209, 33063, 19183, 183, 162, 148, 152, 71, 72, 110, 150); + RT_INTERFACE!{static interface IVariableSizedWrapGridStatics(IVariableSizedWrapGridStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IVariableSizedWrapGridStatics] { + fn get_ItemHeightProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ItemWidthProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OrientationProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HorizontalChildrenAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_VerticalChildrenAlignmentProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_MaximumRowsOrColumnsProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_RowSpanProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetRowSpan(&mut self, element: *mut super::UIElement, out: *mut i32) -> HRESULT, + fn SetRowSpan(&mut self, element: *mut super::UIElement, value: i32) -> HRESULT, + fn get_ColumnSpanProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn GetColumnSpan(&mut self, element: *mut super::UIElement, out: *mut i32) -> HRESULT, + fn SetColumnSpan(&mut self, element: *mut super::UIElement, value: i32) -> HRESULT + }} + impl IVariableSizedWrapGridStatics { + #[inline] pub unsafe fn get_item_height_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemHeightProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_item_width_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemWidthProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OrientationProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_horizontal_children_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HorizontalChildrenAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_children_alignment_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VerticalChildrenAlignmentProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_maximum_rows_or_columns_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_MaximumRowsOrColumnsProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_row_span_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_RowSpanProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_row_span(&mut self, element: &super::UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetRowSpan)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_row_span(&mut self, element: &super::UIElement, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetRowSpan)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_column_span_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ColumnSpanProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_column_span(&mut self, element: &super::UIElement) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).GetColumnSpan)(self, element as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_column_span(&mut self, element: &super::UIElement, value: i32) -> Result<()> { + let hr = ((*self.lpVtbl).SetColumnSpan)(self, element as *const _ as *mut _, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVirtualizingPanel, 950719756, 4815, 19742, 168, 132, 201, 223, 133, 240, 124, 217); + RT_INTERFACE!{interface IVirtualizingPanel(IVirtualizingPanelVtbl): IInspectable(IInspectableVtbl) [IID_IVirtualizingPanel] { + fn get_ItemContainerGenerator(&mut self, out: *mut *mut ItemContainerGenerator) -> HRESULT + }} + impl IVirtualizingPanel { + #[inline] pub unsafe fn get_item_container_generator(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ItemContainerGenerator)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVirtualizingPanelOverrides, 1593228669, 26495, 16525, 169, 108, 177, 149, 7, 117, 4, 102); + RT_INTERFACE!{interface IVirtualizingPanelOverrides(IVirtualizingPanelOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IVirtualizingPanelOverrides] { + fn OnItemsChanged(&mut self, sender: *mut IInspectable, args: *mut primitives::ItemsChangedEventArgs) -> HRESULT, + fn OnClearChildren(&mut self) -> HRESULT, + fn BringIndexIntoView(&mut self, index: i32) -> HRESULT + }} + impl IVirtualizingPanelOverrides { + #[inline] pub unsafe fn on_items_changed(&mut self, sender: &IInspectable, args: &primitives::ItemsChangedEventArgs) -> Result<()> { + let hr = ((*self.lpVtbl).OnItemsChanged)(self, sender as *const _ as *mut _, args as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn on_clear_children(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).OnClearChildren)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn bring_index_into_view(&mut self, index: i32) -> Result<()> { + let hr = ((*self.lpVtbl).BringIndexIntoView)(self, index); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVirtualizingPanelProtected, 3385436994, 49714, 18333, 167, 201, 94, 118, 17, 25, 106, 69); + RT_INTERFACE!{interface IVirtualizingPanelProtected(IVirtualizingPanelProtectedVtbl): IInspectable(IInspectableVtbl) [IID_IVirtualizingPanelProtected] { + fn AddInternalChild(&mut self, child: *mut super::UIElement) -> HRESULT, + fn InsertInternalChild(&mut self, index: i32, child: *mut super::UIElement) -> HRESULT, + fn RemoveInternalChildRange(&mut self, index: i32, range: i32) -> HRESULT + }} + impl IVirtualizingPanelProtected { + #[inline] pub unsafe fn add_internal_child(&mut self, child: &super::UIElement) -> Result<()> { + let hr = ((*self.lpVtbl).AddInternalChild)(self, child as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn insert_internal_child(&mut self, index: i32, child: &super::UIElement) -> Result<()> { + let hr = ((*self.lpVtbl).InsertInternalChild)(self, index, child as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn remove_internal_child_range(&mut self, index: i32, range: i32) -> Result<()> { + let hr = ((*self.lpVtbl).RemoveInternalChildRange)(self, index, range); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IVirtualizingPanelFactory, 3189372985, 52176, 17385, 165, 208, 11, 219, 160, 255, 189, 56); + RT_INTERFACE!{interface IVirtualizingPanelFactory(IVirtualizingPanelFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVirtualizingPanelFactory] { + + }} + DEFINE_IID!(IID_IGroupItem, 1256773073, 29224, 18966, 166, 31, 136, 192, 232, 244, 92, 118); + RT_INTERFACE!{interface IGroupItem(IGroupItemVtbl): IInspectable(IInspectableVtbl) [IID_IGroupItem] { + + }} + DEFINE_IID!(IID_IGroupItemFactory, 3651261758, 45536, 17177, 152, 8, 122, 158, 136, 126, 19, 176); + RT_INTERFACE!{interface IGroupItemFactory(IGroupItemFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IGroupItemFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut GroupItem) -> HRESULT + }} + impl IGroupItemFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IListViewBaseHeaderItem, 1829629223, 3353, 16529, 137, 23, 206, 124, 133, 193, 230, 48); + RT_INTERFACE!{interface IListViewBaseHeaderItem(IListViewBaseHeaderItemVtbl): IInspectable(IInspectableVtbl) [IID_IListViewBaseHeaderItem] { + + }} + DEFINE_IID!(IID_IListViewBaseHeaderItemFactory, 947037857, 59929, 17759, 157, 247, 20, 124, 196, 29, 50, 156); + RT_INTERFACE!{interface IListViewBaseHeaderItemFactory(IListViewBaseHeaderItemFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IListViewBaseHeaderItemFactory] { + + }} + DEFINE_IID!(IID_IProgressBar, 2926914697, 103, 18787, 191, 76, 41, 219, 12, 74, 80, 126); + RT_INTERFACE!{interface IProgressBar(IProgressBarVtbl): IInspectable(IInspectableVtbl) [IID_IProgressBar] { + fn get_IsIndeterminate(&mut self, out: *mut bool) -> HRESULT, + fn put_IsIndeterminate(&mut self, value: bool) -> HRESULT, + fn get_ShowError(&mut self, out: *mut bool) -> HRESULT, + fn put_ShowError(&mut self, value: bool) -> HRESULT, + fn get_ShowPaused(&mut self, out: *mut bool) -> HRESULT, + fn put_ShowPaused(&mut self, value: bool) -> HRESULT, + fn get_TemplateSettings(&mut self, out: *mut *mut primitives::ProgressBarTemplateSettings) -> HRESULT + }} + impl IProgressBar { + #[inline] pub unsafe fn get_is_indeterminate(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsIndeterminate)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_indeterminate(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsIndeterminate)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_show_error(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShowError)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_show_error(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShowError)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_show_paused(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_ShowPaused)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_show_paused(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_ShowPaused)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_template_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TemplateSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProgressBarStatics, 2048040922, 22583, 20006, 179, 180, 225, 192, 146, 206, 187, 236); + RT_INTERFACE!{static interface IProgressBarStatics(IProgressBarStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IProgressBarStatics] { + fn get_IsIndeterminateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ShowErrorProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ShowPausedProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IProgressBarStatics { + #[inline] pub unsafe fn get_is_indeterminate_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsIndeterminateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_show_error_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ShowErrorProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_show_paused_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ShowPausedProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IProgressBarFactory, 3667561489, 5521, 16395, 169, 147, 15, 28, 92, 193, 47, 59); + RT_INTERFACE!{interface IProgressBarFactory(IProgressBarFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IProgressBarFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut ProgressBar) -> HRESULT + }} + impl IProgressBarFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISettingsFlyout, 2198579243, 50523, 20018, 165, 28, 87, 145, 224, 36, 200, 175); + RT_INTERFACE!{interface ISettingsFlyout(ISettingsFlyoutVtbl): IInspectable(IInspectableVtbl) [IID_ISettingsFlyout] { + fn get_Title(&mut self, out: *mut HSTRING) -> HRESULT, + fn put_Title(&mut self, value: HSTRING) -> HRESULT, + fn get_HeaderBackground(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_HeaderBackground(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_HeaderForeground(&mut self, out: *mut *mut super::media::Brush) -> HRESULT, + fn put_HeaderForeground(&mut self, value: *mut super::media::Brush) -> HRESULT, + fn get_IconSource(&mut self, out: *mut *mut super::media::ImageSource) -> HRESULT, + fn put_IconSource(&mut self, value: *mut super::media::ImageSource) -> HRESULT, + fn get_TemplateSettings(&mut self, out: *mut *mut primitives::SettingsFlyoutTemplateSettings) -> HRESULT, + fn add_BackClick(&mut self, value: *mut BackClickEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_BackClick(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn Show(&mut self) -> HRESULT, + fn ShowIndependent(&mut self) -> HRESULT, + fn Hide(&mut self) -> HRESULT + }} + impl ISettingsFlyout { + #[inline] pub unsafe fn get_title(&mut self) -> Result { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Title)(self, &mut out); + if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_title(&mut self, value: &HStringArg) -> Result<()> { + let hr = ((*self.lpVtbl).put_Title)(self, value.get()); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_background(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderBackground)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_background(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderBackground)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_foreground(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderForeground)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_foreground(&mut self, value: &super::media::Brush) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderForeground)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_icon_source(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IconSource)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_icon_source(&mut self, value: &super::media::ImageSource) -> Result<()> { + let hr = ((*self.lpVtbl).put_IconSource)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_template_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TemplateSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_back_click(&mut self, value: &BackClickEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_BackClick)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_back_click(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_BackClick)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Show)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn show_independent(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).ShowIndependent)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn hide(&mut self) -> Result<()> { + let hr = ((*self.lpVtbl).Hide)(self); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISettingsFlyoutStatics, 3504583989, 37207, 19428, 164, 42, 245, 145, 105, 136, 70, 172); + RT_INTERFACE!{static interface ISettingsFlyoutStatics(ISettingsFlyoutStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISettingsFlyoutStatics] { + fn get_TitleProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HeaderBackgroundProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HeaderForegroundProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IconSourceProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ISettingsFlyoutStatics { + #[inline] pub unsafe fn get_title_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TitleProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_background_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderBackgroundProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_foreground_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderForegroundProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_icon_source_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IconSourceProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISettingsFlyoutFactory, 1208774673, 22442, 19894, 182, 253, 236, 103, 111, 109, 65, 78); + RT_INTERFACE!{interface ISettingsFlyoutFactory(ISettingsFlyoutFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISettingsFlyoutFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut SettingsFlyout) -> HRESULT + }} + impl ISettingsFlyoutFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISlider, 2304188455, 19528, 18176, 128, 118, 73, 123, 167, 61, 156, 24); + RT_INTERFACE!{interface ISlider(ISliderVtbl): IInspectable(IInspectableVtbl) [IID_ISlider] { + fn get_IntermediateValue(&mut self, out: *mut f64) -> HRESULT, + fn put_IntermediateValue(&mut self, value: f64) -> HRESULT, + fn get_StepFrequency(&mut self, out: *mut f64) -> HRESULT, + fn put_StepFrequency(&mut self, value: f64) -> HRESULT, + fn get_SnapsTo(&mut self, out: *mut primitives::SliderSnapsTo) -> HRESULT, + fn put_SnapsTo(&mut self, value: primitives::SliderSnapsTo) -> HRESULT, + fn get_TickFrequency(&mut self, out: *mut f64) -> HRESULT, + fn put_TickFrequency(&mut self, value: f64) -> HRESULT, + fn get_TickPlacement(&mut self, out: *mut primitives::TickPlacement) -> HRESULT, + fn put_TickPlacement(&mut self, value: primitives::TickPlacement) -> HRESULT, + fn get_Orientation(&mut self, out: *mut Orientation) -> HRESULT, + fn put_Orientation(&mut self, value: Orientation) -> HRESULT, + fn get_IsDirectionReversed(&mut self, out: *mut bool) -> HRESULT, + fn put_IsDirectionReversed(&mut self, value: bool) -> HRESULT, + fn get_IsThumbToolTipEnabled(&mut self, out: *mut bool) -> HRESULT, + fn put_IsThumbToolTipEnabled(&mut self, value: bool) -> HRESULT, + fn get_ThumbToolTipValueConverter(&mut self, out: *mut *mut super::data::IValueConverter) -> HRESULT, + fn put_ThumbToolTipValueConverter(&mut self, value: *mut super::data::IValueConverter) -> HRESULT + }} + impl ISlider { + #[inline] pub unsafe fn get_intermediate_value(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IntermediateValue)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_intermediate_value(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_IntermediateValue)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_step_frequency(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_StepFrequency)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_step_frequency(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_StepFrequency)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_snaps_to(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_SnapsTo)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_snaps_to(&mut self, value: primitives::SliderSnapsTo) -> Result<()> { + let hr = ((*self.lpVtbl).put_SnapsTo)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tick_frequency(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TickFrequency)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_tick_frequency(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_TickFrequency)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_tick_placement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_TickPlacement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_tick_placement(&mut self, value: primitives::TickPlacement) -> Result<()> { + let hr = ((*self.lpVtbl).put_TickPlacement)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Orientation)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_orientation(&mut self, value: Orientation) -> Result<()> { + let hr = ((*self.lpVtbl).put_Orientation)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_direction_reversed(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsDirectionReversed)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_direction_reversed(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsDirectionReversed)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_thumb_tool_tip_enabled(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsThumbToolTipEnabled)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_thumb_tool_tip_enabled(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsThumbToolTipEnabled)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumb_tool_tip_value_converter(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ThumbToolTipValueConverter)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_thumb_tool_tip_value_converter(&mut self, value: &super::data::IValueConverter) -> Result<()> { + let hr = ((*self.lpVtbl).put_ThumbToolTipValueConverter)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISliderStatics, 2319672279, 32735, 19760, 152, 254, 206, 120, 192, 91, 49, 207); + RT_INTERFACE!{static interface ISliderStatics(ISliderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISliderStatics] { + fn get_IntermediateValueProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_StepFrequencyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_SnapsToProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TickFrequencyProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_TickPlacementProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_OrientationProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsDirectionReversedProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsThumbToolTipEnabledProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_ThumbToolTipValueConverterProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ISliderStatics { + #[inline] pub unsafe fn get_intermediate_value_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IntermediateValueProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_step_frequency_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_StepFrequencyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_snaps_to_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_SnapsToProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tick_frequency_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TickFrequencyProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_tick_placement_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TickPlacementProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_orientation_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_OrientationProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_direction_reversed_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsDirectionReversedProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_thumb_tool_tip_enabled_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsThumbToolTipEnabledProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_thumb_tool_tip_value_converter_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_ThumbToolTipValueConverterProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISliderFactory, 61242167, 51135, 17276, 132, 143, 140, 181, 183, 83, 234, 180); + RT_INTERFACE!{interface ISliderFactory(ISliderFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISliderFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut Slider) -> HRESULT + }} + impl ISliderFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISlider2, 1084474638, 34774, 19759, 177, 207, 178, 121, 204, 153, 111, 38); + RT_INTERFACE!{interface ISlider2(ISlider2Vtbl): IInspectable(IInspectableVtbl) [IID_ISlider2] { + fn get_Header(&mut self, out: *mut *mut IInspectable) -> HRESULT, + fn put_Header(&mut self, value: *mut IInspectable) -> HRESULT, + fn get_HeaderTemplate(&mut self, out: *mut *mut super::DataTemplate) -> HRESULT, + fn put_HeaderTemplate(&mut self, value: *mut super::DataTemplate) -> HRESULT + }} + impl ISlider2 { + #[inline] pub unsafe fn get_header(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_Header)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header(&mut self, value: &IInspectable) -> Result<()> { + let hr = ((*self.lpVtbl).put_Header)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplate)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_header_template(&mut self, value: &super::DataTemplate) -> Result<()> { + let hr = ((*self.lpVtbl).put_HeaderTemplate)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_ISliderStatics2, 15176541, 31141, 18265, 150, 166, 41, 224, 169, 74, 221, 51); + RT_INTERFACE!{static interface ISliderStatics2(ISliderStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ISliderStatics2] { + fn get_HeaderProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_HeaderTemplateProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl ISliderStatics2 { + #[inline] pub unsafe fn get_header_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_header_template_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HeaderTemplateProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToolTip, 2112214879, 17429, 17055, 181, 35, 105, 155, 219, 140, 48, 219); + RT_INTERFACE!{interface IToolTip(IToolTipVtbl): IInspectable(IInspectableVtbl) [IID_IToolTip] { + fn get_HorizontalOffset(&mut self, out: *mut f64) -> HRESULT, + fn put_HorizontalOffset(&mut self, value: f64) -> HRESULT, + fn get_IsOpen(&mut self, out: *mut bool) -> HRESULT, + fn put_IsOpen(&mut self, value: bool) -> HRESULT, + fn get_Placement(&mut self, out: *mut primitives::PlacementMode) -> HRESULT, + fn put_Placement(&mut self, value: primitives::PlacementMode) -> HRESULT, + fn get_PlacementTarget(&mut self, out: *mut *mut super::UIElement) -> HRESULT, + fn put_PlacementTarget(&mut self, value: *mut super::UIElement) -> HRESULT, + fn get_VerticalOffset(&mut self, out: *mut f64) -> HRESULT, + fn put_VerticalOffset(&mut self, value: f64) -> HRESULT, + fn get_TemplateSettings(&mut self, out: *mut *mut primitives::ToolTipTemplateSettings) -> HRESULT, + fn add_Closed(&mut self, value: *mut super::RoutedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Opened(&mut self, value: *mut super::RoutedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn remove_Opened(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + }} + impl IToolTip { + #[inline] pub unsafe fn get_horizontal_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_HorizontalOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_horizontal_offset(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_HorizontalOffset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_open(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_IsOpen)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_is_open(&mut self, value: bool) -> Result<()> { + let hr = ((*self.lpVtbl).put_IsOpen)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_placement(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_Placement)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_placement(&mut self, value: primitives::PlacementMode) -> Result<()> { + let hr = ((*self.lpVtbl).put_Placement)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_placement_target(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlacementTarget)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn set_placement_target(&mut self, value: &super::UIElement) -> Result<()> { + let hr = ((*self.lpVtbl).put_PlacementTarget)(self, value as *const _ as *mut _); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_offset(&mut self) -> Result { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).get_VerticalOffset)(self, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn set_vertical_offset(&mut self, value: f64) -> Result<()> { + let hr = ((*self.lpVtbl).put_VerticalOffset)(self, value); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn get_template_settings(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_TemplateSettings)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn add_closed(&mut self, value: &super::RoutedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Closed)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_closed(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Closed)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + #[inline] pub unsafe fn add_opened(&mut self, value: &super::RoutedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + let mut out = zeroed(); + let hr = ((*self.lpVtbl).add_Opened)(self, value as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(out) } else { err(hr) } + } + #[inline] pub unsafe fn remove_opened(&mut self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + let hr = ((*self.lpVtbl).remove_Opened)(self, token); + if hr == S_OK { Ok(()) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToolTipStatics, 4026697144, 19369, 20303, 134, 167, 134, 0, 56, 19, 206, 179); + RT_INTERFACE!{static interface IToolTipStatics(IToolTipStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IToolTipStatics] { + fn get_HorizontalOffsetProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_IsOpenProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PlacementProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_PlacementTargetProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT, + fn get_VerticalOffsetProperty(&mut self, out: *mut *mut super::DependencyProperty) -> HRESULT + }} + impl IToolTipStatics { + #[inline] pub unsafe fn get_horizontal_offset_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_HorizontalOffsetProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_is_open_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_IsOpenProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_placement_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlacementProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_placement_target_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_PlacementTargetProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + #[inline] pub unsafe fn get_vertical_offset_property(&mut self) -> Result> { + let mut out = null_mut(); + let hr = ((*self.lpVtbl).get_VerticalOffsetProperty)(self, &mut out); + if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } + } + } + DEFINE_IID!(IID_IToolTipFactory, 2307101699, 46392, 18915, 164, 48, 58, 192, 55, 220, 111, 224); + RT_INTERFACE!{interface IToolTipFactory(IToolTipFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IToolTipFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut ToolTip) -> HRESULT + }} + impl IToolTipFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + let mut inner = null_mut(); let mut out = null_mut(); + let hr = ((*self.lpVtbl).CreateInstance)(self, outer as *const _ as *mut _, &mut inner, &mut out); + if hr == S_OK { Ok((ComPtr::wrap(inner), ComPtr::wrap(out))) } else { err(hr) } + } + } + DEFINE_IID!(IID_IButton, 671298990, 21872, 18119, 142, 11, 96, 43, 231, 18, 41, 162); + RT_INTERFACE!{interface IButton(IButtonVtbl): IInspectable(IInspectableVtbl) [IID_IButton] { + + }} + DEFINE_IID!(IID_IButtonFactory, 2158050329, 33850, 17692, 140, 245, 68, 199, 1, 176, 226, 22); + RT_INTERFACE!{interface IButtonFactory(IButtonFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IButtonFactory] { + fn CreateInstance(&mut self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut Button) -> HRESULT + }} + impl IButtonFactory { + #[inline] pub unsafe fn create_instance(&mut self, outer: &IInspectable) -> Result<(ComPtr, ComPtr